Gonna date myself but, for ~80% of configuration needs good old INI never let me down. Named sections of name value pairs with string and number data types (maybe bools too. do not recall). et voilà!
Honestly if the config layout fits in ini, there's no reason not to use it.
YAML is great for human-readable config, and there are footguns.
XML is terrible for human-readable config. JSON is not great for human-readable config. TOML is okay for human-readable config.
The problem is there's no clean way to abstract strings, bools, lists, objects, trees, etc. into a human-readable configuration syntax that does not have a footgun.
> The problem is there's no clean way to abstract strings, bools, lists, objects, trees, etc. into a human-readable configuration syntax that does not have a footgun.
My favorite take on this by far is that any types beyond string, list, and dict don't belong in the format at all, and should be left to the ingesting code. I started on the path thanks to StrictYAML and found a home with NestedText.
INI is great for some flatter types of configuration (and I still use it too), but once you need a little bit of nesting, or lists, INI starts to get cumbersome.
XML, XSD, XSLT, and the rest of that stack was actually useful. Overengineered and verbose, but useful - enough so, in fact, that the JSON ecosystem still hasn't fully caught up on standardizing the same feature set.
XSD mostly served to make people believe that XML standards could, as the name suggests, be extended. If you just specify your extension XSD it will work, right?
In the real world it turns out that an extended XML standard is just another standard, it may look a bit like the old one, but nothing is going to save you from writing new logic if you want to support the new standard.
While there are surely a few oddballs out there who just want to make standards for the sake it, to most of us, JSON doesn't need any "features", it makes parsing and generating data blobs quick and easy, that is all it needs to do.
XSLT (or rather XPath, and even more so XQuery FLWOR) have very expressive ways to walk the tree while filtering/mapping/folding data - much more so than JS over JSON.
XSD is just a way to define schemas for XML documents. I don't know what you mean by "extended XML standard", but islands of one schema within another were not uncommon.
Agree. Modern C++, and discussions around it, become more esoteric with every revision. As software engineers we should spend our time understanding the esoterica of the problem domain, not the toolset.
I'm of the same opinion. Frankly, when Go first appeared, I felt we would finally get something almost as simple as Python and almost as fast as C. Unfortunately not everything was as nice as I had expected. Still, in that respect it's better than Rust as it makes it easier to focus on the problem rather than the language.
The complexity of C++0x is one reason Go was created.
"For me, the reason I was enthusiastic about Go was just about the same time we were starting on Go, I read (or tried to read) the C++0x proposed standard. And that was the convincer for me." - Ken Thompson
For reference of anybody too young to remember: C++0x is what you'd have called what became C++ 11 back when the committee thought it might happen in 2009 or, worst case 2010.
The fact that their "2009" standard shipped only in 2011, after ripping out features everybody agreed were good yet never seemed finished, is why they moved to their current "train" model where there's a new C++ every three years, like it or not. The train will leave, if your feature wasn't ready well there's another train in three years.
> Still, in that respect it's better than Rust as it makes it easier to focus on the problem rather than the language.
Quite the opposite. In Go/Java I find myself frequently thinking how to adapt my problem so it can be expressed in a very limited set of language features. I want to build a house but I only get a hammer and some nails. Works nice if I want a wooden house but not so much if I want to use bricks and concrete. In Rust I get a giant toolbox with almost everything and I just pick the right tool for the job. So although I had to learn more tools initially, later I can focus more on the job, not the language, because the language adapts to the problem. And the final result is typically also better in terms of quality, performance, etc.
Having used both professionally (several years each), Go is massively simpler than Java, at least for the problems we tackle. We sometimes will get a new dev on the team from Javaland, and the biggest thing for them is unlearning all of unnecessary complexity. YMMV.
I should have clarified I was one of early adopters and my main gripe then was mainly about its performance, not the syntax. I mean it was okay, but still not up to my expectations. But that was over a decade ago! Next time when I have the luxury of choosing the language for a new project I'll definitely take Go into consideration. It has its quirks but overall it's quite simple and manageable - you can easily understand code written by someone else which is a huge advantage.
> Frankly, when Go first appeared, I felt we would finally get something almost as simple as Python and almost as fast as C. Unfortunately not everything was as nice as I had expected.
Would you care to elaborate what exactly is not as nice as you had expected? I'm really into Go and to me it really does seem as good as expected. Just curious about what made it suck for your usecase.
Go's design always struck me as really hypocritical. At least it's initial design.
Go's designers get to use tuple for their favourite use case: returning from a function.
You as a user of the language don't get to use tuples for anything else.
(And using tuples to indicate failure is really, really silly. You'd want algebraic datatypes for that. Ie a beefed up enum, not an ad-hoc struct.)
Go's designers get to use generic functions and datastructures for their favourite use cases. Eg the infamous `make` is sort-of generic, and Go's arrays, maps and channels etc are generic.
> Go's designers get to use tuple for their favourite use case: returning from a function.
I wouldn't call multiple return values a "tuple". I understand where you coming from, since Python multiple return values are implemented with tuples, but still that point sounds like saying that passing multiple parameters to C functions is "a tuple".
That being said, Go's "simplicity" in design is not only about interface simplicity - it's a lot about implementation simplicity. I imagine that adding tuples would cause a whole lot of complexity that they'd have to deal with. Since Go doesn't have a concept of immutable data types (except consts), tuples would effectively be just variable-typed constant-size slices, which are already implementable as arrays of empty interfaces, but have a runtime overhead...
I hope you see where I'm getting. Creating a language is complex and has a lot of tradeoffs. Then again, I see where you're coming from. I suppose it's a question of whether or not the tradeoffs (the "hypocritical design") is worth the good parts (simplicity of language, which leads to fast compile times, fast runtime, etc.). For me, personally, it is.
> [...] like saying that passing multiple parameters to C functions is "a tuple".
You intended this as a reductio ad absurdum, but you are entirely right. That's how it's handled in eg Haskell.
> I imagine that adding tuples would cause a whole lot of complexity that they'd have to deal with. Since Go doesn't have a concept of immutable data types (except consts), tuples would effectively be just variable-typed constant-size slices, which are already implementable as arrays of empty interfaces, but have a runtime overhead...
I'm not sure that would be a good way to implement tuples. In fact, I suspect it's probably close to the worst way to implement them?
I'd image you'd want to take the machinery you have for structs, and adjust it so that it can deal with anonymous structs with anonymous fields identified by position. (But still preserve all the static typing, instead of throwing your hands up and going with 'variable-typed'.) The runtime overhead would be more or less exactly the same as for structs.
In general, I see tuples as a syntactic sugar over structs and expect them to be compiled like that (or better) in a statically typed language; instead of representing them as some kind of weird slice.
Theoretically, you could probably even implement tuples-via-structs as a preprocessor.
> I imagine that adding tuples would cause a whole lot of complexity that they'd have to deal with.
Yes, so instead of abstaining from tuples, because of these complications, they added a special case for their favourite use case.
Have a look at OCaml for a relatively simple language with less design hypocrisy, and fast compile times and fast runtimes. (Compared eg to the much more complex Haskell.)
Now that I've had more time to think about it, I think the problem of Python-like tuples in Go is that they require Pythonesque everything-is-a-reference paradigm in order to function the same way, otherwise they just act as heterogenous arrays in Go (which exist as arrays of empty interfaces, with a slight runtime cost). Go is mainly value-oriented language like C, with the exception of built-in container types and strings (and maybe a few others that slipped my mind).
I suppose that adding fixed-type pass-by-value tuples would essencially be reimplementing struct. Go doesn't like duplicating functionality.
See my other comment: tuples should be thought of as syntactic sugar over structs, not arrays.
Whether to pass by reference or value and other design decisions should probably be taken (as much as practicable) from the design decisions for structs in your language.
I think this is more of a meme than reality. In the past, C++ needed manual memory management and writing ctors over and over with myriad footguns. Now someone can contribute to a C++ codebase barely knowing what a heap or reference is and the compiler will create decent code.
It should be noted that the DOJ started phasing out private prisons last year, and most states don't have any significant number of people in private prisons: https://www.sentencingproject.org/publications/private-priso.... Additionally, the prisons folks tend to hear about in terms of abuses, like Rikers in NY, are good old public prisons.
Rikers is a jail, not a prison. It might seem like I'm being pedantic but when you're talking about problems in the criminal justice system it's important to recognize the difference between the two and how the problems and solutions may be different.
I agree that’s true in general. But people can be in Rikers for months and sometimes years (average is over 9 months). So the capacity for the government to abuse prisoners is demonstrated: https://nymag.com/intelligencer/2014/08/8-appalling-stories-...
I don’t think we should have private prisons, but the level of focus on them is about politics. It’s an issue that unifies the economic left, who support unions and oppose privatization but may or may not care about prisoner abuse, with the criminal justice movement.
But at the end of the day, most prisoners (over 90%) are not in private prisons, and there is little evidence that private prisons are worse than public prisons. The reality is that our government run, union-staffed prisons are really bad. But prisons are a major source of jobs, and public unions that represent prison employees are powerful—and Americans are punitive—so it’s difficult to tackle the real issues.
Prison means you’re going away for a while. Jail means you’re awaiting trial or have a minor sentence to serve for something like failing to pay a fine, vandalism, etc. Jail is also usually operated locally by a city or county while prison is state or federal.
A prison is usually run by the government. A private prison is run by a corporation hired by the government; payment is usually prisoner * time.
It's understood that the incentive for the private prison is to spend as little on the prisoners as possible, because the rest is profit; although I understand some contracts regulate this.
I meant prison vs. jail. It seems mildly blurry to me considering that in my country we do have some distinctions between different types of detainment facilities but from what I grasped, the distinctions are delineated somewhat differently in the US that they are around here.
I see that someone answered, but the cultural feel is that jail time is anything from a few hours to a few years for reasons that could include public drunkenness, assault, prostitution, or just awaiting trial, it's kind of ambiguous what it means when someone was in "jail", but it could really be no big deal. Most cities or towns would have a jail.
Prison is a bigger deal. A prisoner was convicted for something unambiguously bad, and there is this cultural expectation that they have become somewhat hardened or institutional in prison. A state or Feds would run a prison.
While I've known people to be in jail for longer sentences than prisoners, the expectation is that prison sentences are much longer.
I'm speaking only to the social meaning of the two concepts, which might help to understand the underlying understanding that Americans share about this difference, but the actual legal realities are no doubt quite different. Most of us are pretty naive about our legal system.
Ah, this is interesting. I thought we had a somewhat clearer distinction in my country since we call "věznice" ("prison", presumably) the facility where you serve your sentence, and we call "vazební věznice" (literally "detention prison", I guess?) the facility where you're detained before your sentence and while your court case is pending. This would seem to indicate that these are separate facilities. But then I went to check the list of "detention prisons" (there's like nine of them or so) and it turned out that there's a wing for sentenced prisoners in pretty much all of them. So in fact our "detention prisons" would seem to be like US jails in function (with the exception that drunk people don't end up in jail -- they're taken to "záchytka" instead: https://en.wikipedia.org/wiki/Drunk_tank#Czech_Republic).
Having said that, the operating term is still "věznice" here; there's no word with different etymology for it. Colloquially, it's called "vězení" -- we have a form of limited diglossia in my country where you commonly wouldn't use formal names of things in normal speech without sounding weird, so some phrases are somewhat different in speech than they often are in writing. And additionally, while you would say "byl jsem ve vězení" ("I was in prison") after serving a sentence, if you were detained before sentencing, you'd say "byl jsem ve vazbě" ("I was in pre-trial detention"), NOT anything like "Byl jsem ve vazebním vězení" ("I was in jail"). So we don't really have this distinction you could make between "people who did unambiguously bad things" and "people who did some light infractions". Basically you have no way to make it sound like what you did was no big deal -- everyone convicted is a prisoner and that's it (if institutionalized, that is; not after a suspended sentence, fine, or community service of course). But in American English, you apparently do. Interesting.
My homeland being the US, which has a notoriously dysfunctional incarceration system. It's amazing that the Czech drunk tank is concerned with treatment!
If you want to be specific jail can be used to describe a place for those awaiting trial or held for minor crimes, whereas prison describes a place for criminals convicted of serious crimes.
I believe the timeline is that Obama started phasing them out, Trump halted that, and then Biden started phasing them out again. Good reminder that executive action isn’t worth the paper it’s written on either way.
(Perhaps most importantly, most private prisons are not federal)
> Good reminder that executive action isn’t worth the paper it’s written on either way.
That doesn’t at all follow from your previous statement that the executive orders of the last three presidents regarding private prisons have in fact been followed
You are right, a better way to look at it would be that only the Democrat executive orders have been worthless since the federal private prison contracts that were already signed pre-Obama action (or signed during Trump admin) are not instantly dissolved by their executive action.
> Among the immigrant detention population, 40,634 people – 81% of the detained population – were confined in privately run facilities in 2019. The privately detained immigrant population grew 739% since 2002 to 2019.1) Biden’s executive order does not limit private contracts with immigrant detention facilities.
So the page you linked is from a plaintiff’s law firm, talking about the Federal Bureau of Prisons, and doesn’t say anything about private prisons. The first article linked from that page is about sexual abuse at FCI Dublin. That sounds terrible, but it’s public servants employed by the federal government running that “rape club”—members of the American Federation of Government Employees.
In Justice period. The victims often have no relation to crime or criminal prosecution.
It's not a bug, it's a feature. The system is working as intended. It is no accident that the US has #1 incarceration rate on the planet. A significant portion of the population and and even higher portion of those in government believe manipulation and control of certain groups in the population is more important than any notion of justice or law an order. Their love for their country pales in comparison to their hatred and greed.
Let's say someone smoked weed outside your house and right off your property, your house can be taken by the police even if you have no relation with the person and they did not enter your property because your lack of relationship or their history at your property is contested by the government and your house itself is the accused and the evidence therefore being an inanimate object that can't defend itself it now belongs to them. Can't make this up lol
As a current prisoner, one of the nice things about private prisons is that they are so thirsty for profit that a lot of them bypass all the asinine rules about security that government prisons have in order to sell you anything and everything, e.g. games consoles, steel-stringed guitars, etc.
So, while you are more likely to come to grief in a private prison due to them under-spending on guards, health care, physical plant, etc, you will die in luxury as long as your family have money to send you.
Please bargains themselves aren't terrible. They're only bad because the trial wait times and bail conditions are so bad that innocent people are accepting a plea bargains. If the rest of the system was fair, like with reasonable bond and not waiting years for a trial, then it could still be a valid tool. I won't hold my breath though.
It is just me or there seems to be a strange lack of criticism about TikTok on the same or stricter level than FB. Especially that it is a Chinese company HQ’ed in Beijing. Neither do I ever see discussion about the asymmetry in China’s trade policies with regards to FB/Tiktok. Tiktok enjoys free market access (except India), whereas FB is banned in China just like many other US-based platforms. On the contrary, there seems to be praise about TikTok on HN!
How come we don’t see scathing articles on NYT about TikTok but on WSJ? Has this become a partisan issue (Trump wanted to ban Tiktok)?
The problem with TikTok is that it's even more opaque than Facebook.
Content can be said to exist or not exist on Facebook, and that's usually it. Sure they monkey with the feed, but it's still essentially user-derived.
TikTok effectively exposes one interaction: get next.
What that returns is completely at the mercy of whatever TikTok decides it should be. They've optimized for virality. But it would be pretty easy to tweak that and optimize for something else.
Why do I feel like I've read hundreds of comments saying "is there a strange lack of criticism about China?"
We literally almost banned TikTok, and statements were made about the necessity of doing it from the President of the United States. For weeks. Almost resulting in a government mandated forced sale.
Don't worry, tik tok is just new. Wait a few more years and they'll be put through a similar rigamarole, although I don't think it will be as severe as FB. Maybe youtube level?
I think it's because of the perception TikTok=cat and dance videos, FB=misinformation. At least that's what my feeds looks like. Also: TikTok=kids, FB=adults
I use Instagram daily. I love it. And so do my friends. Ads are also very on point and small business oriented. No scams. Instagram has super cool retro computing and countless vaporwave aesthetic channels that frankly are unique to IG. It’s incredible. I have curated my own feed using the save feature. Never used FB but IG seems to be better than Tiktok mentally and otherwise.
Could “misinformation” be a misnomer? I think the problem is in the way it’s consumed that is similar to a rhyme or a chant, rather than accuracies of information contained therein.
I think researchers are starting to notice mass psychological phenomenon specific to the platform already, though maybe 'tiktok tics' just sounds nicer than any of the other social media networks and 'tics'
I don't use either service, but it's my impression that the misinformation on TikTok is more on the "petty harm to individuals" level and less on the "destroys the social and political fabric of societies" level.
There are tons of questionable political propaganda in Tiktok too.
It's not just a kids app anymore, if you start dismissing content aimed at teenagers, you quickly get into a bubble of content made for more mature audiences: daddy jokes, bloopers, political content and more. It's surprising the number of creators above 20, 30 and more years old there.
In my country, there are even congressmen and runner-ups that post content there daily.
Anyway, the problem with it, in my opinion, is how content is promoted in the app. The next video is just a swipe away (and every time an user swipes too early, you loose "points"). It encourages sensationalist and alarmist content, the creator must keep the audience engajed without swiping it, so the more chocking, the best - just like any other social media platform nowadays. And that's where the fabric of society starts ripping.
LOL at the downvotes. Seems like a lot of comments critical of TikTok are being downvoted in this thread. I wonder if they are hiring vote farms to manage their reputation online.
Perfect Facebook: Break off groups, silo it. I've been off FB for almost a decade but I'm at the point where I have to actually use it for the first time, as it's where all the types of events I want to go to exclusively get organized. For amateur racing at least, it's pretty much all Facebook.
Groups used to be broken off into a separate iOS app. That time period was blissful. Then they removed that app because it allowed users to escape the newsfeed.
Platforms like Facebook just expose some of the bad parts of human nature such as cult like behaviour. Tech is neither the source of all evil nor the solution to all our problems like people in tech like to treat it to be.