Free for non-commercial use. I wish GitHub would flag things with proprietary licenses. I was fortunate to see the license in the FAQ before looking at any of the code.
Unusually it does explicitly state a future date at which it becomes licensed under the Apache license… not sure how GitHub could manage automatically flagging that.
Is this an issue with Python, or an issue with your parents having strayed from the style guide?
JJ, meet my wife Jo, and understand why you don’t both get a function that cases your name correctly 100% of the time.
Public domain products are strictly faster to use than non public domain products. Not just faster, orders of magnitude faster.
While I agree with the general gist of your argument, you’re building a tripod of support and this one seems unsupported. I think most people can figure out the trust and cost legs, but why is PD strictly faster?
Very helpful feedback, thanks!
I’ve updated the post;
https://github.com/breck7/breckyunits.com/commit/65bc0aa36eaaa9345350181c444ab0b41c54e434
I appreciate the changes, though I’m not sure the updates will carry the day.
When you sum the time savings across all possible use cases of all possible products, you’ll see the orders of magnitude speed up caused by public domain products.
This assumes the time cost of public domain software is effectively zero … that is nonsensical, if for no other reason than, in many jurisdictions, it’s not entirely clear if it is even possible to declare a work to be public domain. If we assume a similarly expansive stance for this thought experiment then you’d have to admit that at least one of the all possible use cases for any public domain product would be one in which the legal system of one (or more) jurisdictions would have to decide on a challenge to the factual basis of the public domain claim. Such a challenge (for instance for SQLite), raised by a sufficiently well-resourced legal team (possibly including the legal team of the jurisdiction itself) could drag on for decades, and might never be decided in the favor of the public domain at all. In that edge case PD software could take an infinite amount of time to use, relative to something less than PD but permissively (if conditionally) licensed.
A plan for that: https://breckyunits.com/the-intellectual-freedom-amendment.html
Ahh, well, I admire the ambition… I dare say there may be some more pressing potential amendments, but good luck getting this one through.
I dare say there may be some more pressing potential amendments
On the surface, but when you look upstream you see how a lot of issues stem from restrictions on information rights.
Edit: that’s my take anyway. But I could be wrong.
Stop calling everything “Nix”
Advice that probably should have been given before the Nix project proceeded to prepend “Nix” to (almost) everything.
Or, in other words, ship, meet sailed… can’t chastise demand-side users for overloading a supply-side overloaded term.
Always good to see someone diving into the interpreter internals, but man I find supporting -‘ incomplete ternary expression to be a weirdly uncomfortable motivation for doing so.
It is a complete expression, else defaults to None and you can’t return from your weirdly comfortable ternary expression whereas you can conditionally return from a function with postfix if which btw is a one-liner.
It is a complete expression
Didn’t say it wasn’t; I said it was an incomplete ternary expression, which is definitionally true.
else defaults to None
Understood, but not obviously a compelling syntactical feature and, if you ever decide to take up typing discipline, an antipattern in the making.
and you can’t return from your weirdly comfortable ternary expression whereas you can conditionally return from a function with postfix if which btw is a one-liner
Also not exactly a compelling feature, and returning from within an expression is ambiguous in a statement based language:
value = return 42 if True
Is that valid syntax? Is value dead code? Or can it only ever be None if reachable?
Besides, you can already conditionally return in one line, so not sure that ability adds anything:
if True: return 42
I’m not some huge fan of Python’s ternary conditional, having picked up TCL’s terser version first, but shoe-horning TCL style syntax would also be an odd motivator for forking my own personal Python, with all the distribution problems that brings.
Return with a bottle of wine if you can. I want wine conditionally and you want my statement to be as readable as possible. So it is obviously not an anti-pattern.
value = return 42 if True
# Is that valid syntax? Is value dead code? Or can it only ever be None if reachable?
It would be invalid syntax. rhs can’t be a void value. Are we just making up uses where syntax might be confusing or harder to read? Is that the point?
value = if True: return 42
This would probably throw the same error if if expressions
could be used as rhs. Unfortunately they cannot be and it is an error. Another missing feature. The syntax is miserable, but yes, it is a one-liner.
Return with a bottle of wine if you can. I want wine conditionally and you want my statement to be as readable as possible. So it is obviously not an anti-pattern.
The statement:
return bottle if wine else None
… is arguably more readable than:
return bottle if wine
… if only because what is returned is explicit in all cases. Both are an antipattern when you’re being disciplined on types, because you’ve got one expression that evaluates to more than one possible type.
Are we just making up uses where syntax might be confusing or harder to read? Is that the point?
No attempt at straw manning, I’m actually uncertain of what valid syntax is for return in this two-thirds-of-ternary form. That uncertainty comes from its inherent instability, does:
return bottle if wine
print(“foo”)
Return either bottle or None, terminating the function and making the print unreachable, or does control flow continue past that line of wine is False?
return bottle if wine else None
print(“foo”)
Notice how there’s no question here that the print is unreachable.
Unfortunately they cannot be and it is an error.
The ternary if form — the only form of if expression in Python — can be used as the RHS of a return. The language just requires that such an expression must unambiguously evaluate to either the LHS or the RHS of the “if predicate” portion. Trying to return an if statement is nonsensical and should error.
Another missing feature. The syntax is miserable, but yes, it is a one-liner.
I see no missing feature. All I see is a bit of syntactic sugar that seems to have no obvious positives — without more clearly understanding the valid uses of return-if it certainly looks like it’s just the ternary if with “else None” elided — but which very clearly conflicts with two of the maxims of the Zen of Python (one obvious way to do things and explicit is better than implicit). As for the syntax being “miserable”… well that’s how I feel about Ruby, generally, so not sure we’ll come to any meaningful conclusions on that particular unprovable value judgement.
I think the confusion lies where you missed the second half of the post where postfix if makes the return conditional. Else None makes it completely different. It will return None if condition is not met. This is not what it does. Yes, “finding syntax useful” is subjective, but it exists, and it is used, so it is useful. And it will lose its use when people stop using it. That’s the pragmatic solution to your philosophical dilemma. And you can have Optional[int] as the return type in python, so I don’t understand your protests of having anti-patterns and type inconsistencies. That’s where python does better I think. And that’s why I use it instead of ruby.
I think the confusion lies where you missed the second half of the post where postfix if makes the return conditional. Else None makes it completely different. It will return None if condition is not met. This is not what it does.
No, I didn’t miss the second half of the post, what I’m saying is that the Ruby-style syntax is inherently ambiguous, and that using the nil case to bypass return is semantically weird, logically inconsistent, and confusing to learners, all in one go.
In Python the semantics of;
var = EXPR
return var
raise RuntimeError()
… are unambiguous; we always return whatever EXPR evaluates to, and in all cases control flow ceases and any code below the return statement is unreachable. I can glance at this and know that error is never raised.
More importantly those first lines contracted into one one always has precisely the same behavior (modulo incrementing and decrementing a reference counter):
return EXPR
raise RuntimeError()
But in Ruby-style syntax that’s not the case:
var = EXPR
return var
raise RuntimeError()
… can never throw that error, while:
return EXPR
raise RuntimeError()
… might do so, because EXPR may include a conditional.
Besides, there already exists an obvious way to do this motivating example:
def foo(test):
a = 1
return a if test
a += 1
return a
… without considering early return at all:
def foo(test):
a = 1
if test:
a += 1
return a
Yes, “finding syntax useful” is subjective, but it exists, and it is used, so it is useful. And it will lose its use when people stop using it.
Ahh, but it doesn’t exist in Python, and the present debate is over whether or not it makes sense to go to the trouble of adding an ambiguous and inconsistent feature to the language when, again, the addition essentially duplicates and mildly bikesheds functionality that has already been provided in an unambiguous and consistent way. Personally I’m all for this useful thing losing its use, but I’m sure it shouldn’t be added to the language in a misguided attempt to increase its use.
That’s the pragmatic solution to your philosophical dilemma.
I haven’t got a dilemma, and arguably the most pragmatic solution is to use the idioms of a language as you find them, rather than trying to shoehorn in idioms lifted from other languages, especially when those foreign idioms already have native solutions that are perfectly workable.
I think this is a pointless argument for inconsistency and shoehorning full of your personal preferences using counterexamples since you can do it for any language where the same keyword is used for two different idioms.
Think what you’d like, but if you’re not ready to address concerns such those as I’ve raised you’ll never get your personal preference for this new idiom adopted into Python. Of course you’re welcome to incorporate it into your own personal Mython, though I’m not sure the distribution pain is worth it. But hey, you choose what hill to die on.
You think I’d go to lengths to get my idea implemented and that your “arguments” provide some sort of basis for validity? Illusions of grandeur? It’s inconsistent because I don’t expect it. It’s an anti-pattern because I don’t know what Optional means. Languages don’t need new features because you can use existing syntax. Clicking reply on lobste.rs or any forum is not the kind of actual I would take if I wanted to get this implemented. I would go implement it, come up with a couple of actual useful real life examples, write a PEP and send a diff.
I would go implement it, come up with a couple of actual useful real life examples, write a PEP and send a diff.
Please do. Then watch it be rejected for all the reasons listed above.
The phrase is “delusions of grandeur”, BTW.
I’m posting this in a top-level comment so nobody thinks I’m singling/calling them out when I say this:
I’ve heard the criticism of the blog post title and will take it to heart for future posts. We don’t need to keep talking about it in depth, and I worry that the discussions are going to get excessively heated if they continue their current trajectory.
As many of you have pointed out, I’m also a programmer. So I’m punching myself with that remark too. And that part’s deliberate; many of my jokes have a tinge of self-deprecation to them. (That’s not because of, like, depression or low self-esteem or anything. I just have enough humility to make fun of myself without drawing blood.)
My intention was to grab people’s attention and comment on a common cognitive bias I hear from programmers–many whom are renowned experts in the field–when someone brings up hash functions. It was not meant to make anyone feel bad. Quite the opposite: These misunderstandings are pervasive, and everyone makes dumb mistakes at least once.
Here’s a real world example of what I mean.
PASETO v1/v2 used a naked hash instead of HMAC for hedged nonces, which means if your RNG failed (unlikely), the derived nonce would be a hash of the plaintext–which is congruent to this problem from my blog post. PASETO was intended to be a boring cryptographic design. This was an interesting failure mode that was made possible by misunderstanding the correct way to use hash functions to solve a specific problem. Does that mean PASETO is bad? No, but you should probably switch to v3/v4 for other reasons.
Mistakes are how we learn, but patterns in mistakes implicate one of two things:
Please don’t get discouraged by the (harsh) criticism to make more blog posts, I like the technical detail and content.
The only thing that would effectively discourage me from making more blog posts is running out of interesting things to talk about, and needing to sate my boredom with low-quality garbage.
For the record, I though the title was brilliant… because no, very few of us understand hash functions — and most who do are more mathematician than programmer — but also we should be willing to admit that.
“Humans are ignorant, inherently rather stupid, and prone to knee jerk reactions.” — A. Human
It’d be nice to have some actual background on hashing in here instead of just broad generalizations and links to various hash functions. Examples:
f(x) =0
or f(x)=x
) and why they cause problems even in non-hostile environments, but that would’ve required more of an introduction to how hashing works…)Programmers might not understand hash functions, but infosec furries may also not understand pedagogy.
(also, can you please cool it with the inflammatory article headlines?)
Programmers might not understand hash functions, but infosec furries may also not understand pedagogy.
Please don’t pick a fight. It seems more angry than friendly.
Honestly I think it’s a valid concern. One of the biggest problems with the computer security world, as stated repeatedly by leading experts in the field, is communication and teaching.
A valid concern would be “infosec experts may not understand pedagogy” but why call out “infosec furries” specifically? Unless we should be concerned about infosec furries in particular vs other infosec experts?
Are these acceptable?
No. So why furries? People need to get over it and quit furry bashing. This isn’t acceptable behavior on Lobste.rs, and I’m tired of it.
See elsewhere for the explanation; furry bashing doesn’t enter into it, though I see why you might have read it that way. Furries are internet denizens like the rest of us, with all that entails.
I agree with you that it’s a bad title.
I also think that you wouldn’t have reacted nearly this strongly to the title if it wasn’t a furry blog.
I read your other comments. But you said what you said, and that undermines all your pontificating about the harm of “insulting/demeaning a group” and “the sort of microaggression/toxicity that everybody talks so much about.” Take your own advice.
“Furry” is a kink, not an identity or protected class. And normally you have to get people’s consent before you bring them into your kink.
The OP’s site has some pretty well reasoned and presented articles on precisely why “furry” cannot reasonably be summarized as “a kink”.
And, no, you do not “normally” have to get someone’s consent to introduce them to the idea of your kink, unless said introduction involves you engaging them in the practice of your kink.
Sorry, I didn’t realize the “furry” part was what you were opposed to. It sounded like you were upset with the implication that the infosec world is bad at teaching.
Programmers might not understand hash functions, but infosec furries may also not understand pedagogy.
(also, can you please cool it with the inflammatory article headlines?)
One of the things he talks about there is testing the hypothesis and seeing which title actually worked. I only clicked this link because I recognized your domain name and knew you had written interesting articles in the past and might legitimately explain something I didn’t know. If not for that, I probably would have bypassed it since the title alone was not interesting at all.
Even so, it is still possible to write clickbait titles that aren’t predicated on insulting/demeaning a group.
How would you feel if I wrote “Gay furries don’t understand blog posting”? Even if I raise good points, and even if more people would click on it (out of outrage, presumably), it would still probably annoy a gay furry who wrote blogs and they’d go in with their hackles raised.
The important difference between what I wrote and your hypothetical is the difference between punching up and punching down.
My original title was along the same lines as “Falsehoods Programmers Believe About _____” but I’ve grown a distaste for the cliche.
The difference between “Programmers don’t understand hash functions” and “Gay furries don’t understand blog posting” is quite obvious to me and I definitely don’t want to engage in whatever Internet flame is going on here. Especially since, uh, I have a preeetty good idea about what the problem here is, and I tend to think it’s about gay furries, not article titles, which is definitely not a problem that I have. (This should probably be obvious but since I’m posting in this particular thread, I wanted to make sure :P).
But I also think this title really is needlessly nasty, independent of how it might be titled if it were about other audiences. It’s a bad generalisation – there are, in fact, plenty of programmers who understand hash functions – and it’s not exactly encouraging to those programmers who want to get into security, or who think their understanding of these matters is insufficient.
I am (or was?) one of them – this was an interest of mine many, many years ago, at a time when I was way too young to understand the advanced math. My career took me elsewhere, and not always where I wanted to go, and I tried to keep an eye on these things in the hope that maybe one day it’ll take me there. Needless to say, there’s only so much you can learn about these topics by spending a couple of evenings once in a blue moon studying them, so I never really got to be any good at it. So I think the explanation is amazing, but it would definitely benefit from not reminding me of my inadequacy.
And I’m in a happy boat, actually, this is only an interest of mine – but there are plenty of people who have to do it as part of their jobs, are not provided with adequate training of any kind, have no time to figure it out on their own, and regularly get yelled at when they get it wrong.
Now, I realise the title is tongue-in-cheek to some degree, the playful furries and the clever humour scattered throughout the post sort of gives it away. If you think about it for a moment it’s pretty clear that this is meant to grab attention, not remind people how much they suck. But it’s worth remembering that, in an age where web syndication is taken for granted to the point where it sounds like a Middle English term, this context isn’t carried everywhere. Case in point, this lobste.rs page includes only the title. Some people might react to it by clicking because you grabbed their attention, but others might just say yeah, thanks for reminding me, I’ll go cry in a corner.
Even if I didn’t realise it was tongue-in-cheek, it probably wouldn’t bother me, partly because I understand how writing “competitively” works (ironically, from around the same time), partly because I’ve developed a thick skin, and partly because, honestly, I’ve kindda given up on it, so I don’t care about it as much as I once did. But I can see why others would not feel the same way at all. You shouldn’t count on your audience having a thick skin or being old enough to have given up on most of their dreams anyway.
I know this is a real struggle because that’s just how blogs and blogging work today. You have to compete for attention to some degree, and this is particularly important when a large part of the technical audience is “confined” to places like HN and lobste.rs, where you have to grab attention through the title because there’s nothing else to grab attention through. But maybe you can find a kinder way to grab it, I dunno, maybe a clever pun? That never hurt anyone. These radical, blunt (supposedly “bluntly honest” but that’s just wishful thinking) headlines are all the rage in “big” Internet media because, just like Internet trolls, they thrive on controversy, us vs. them and a feeling of smugness, but is that really the kind of thing you want to borrow?
(Edit: just to make sure I get the other part of my message across, because I think it’s even more important: title aside, which could be nicer, the article was super bloody amazing: the explanation’s great, and I like the additional pointers, and the humour, and yes, the drawings! Please don’t take any of all that stuff above as a criticism of some sort: I wanted to present a different viewpoint from which the title might read differently than you intended, not that the article is bad. It’s not!)
How do you know that you’re punching up?
What if the person encountering your blog is a programmer from an underrepresented background, just barely overcoming imposter syndrome, and now here’s this scary suggestion that they don’t understand hash functions? What if they actually made one of the mistakes in the article, and feel like they’re a complete fraud, and should leave the industry? This is the sort of microaggression/toxicity that everybody talks so much about, if I’m not mistaken.
The point is: you don’t know. You can’t know.
So, err on the side of not adding more negative shit to the world accidentally in the name of pageviews–especially when there are many, many other more positive options in easy reach.
EDIT:
I wouldn’t care if it weren’t for the fact that you’re a smart dude and clearly passionate about your work and that you have good knowledge to share, and that it pains me to see somebody making mistakes I’ve made in the past.
I wouldn’t care if it weren’t for the fact that you’re a smart dude and clearly passionate about your work
I’m neither of those things :P
and that you have good knowledge to share, and that it pains me to see somebody making mistakes I’ve made in the past.
I appreciate your compassion on this subject. It’s definitely new territory for me (since forever I’ve been in the “boring headline out of clickbait adversion” territory).
Do you actually not see a difference between saying a slightly negative thing about people of a certain profession and how they engage in that profession, and an ad-hominem using sexual orientation? What a weird and bad analogy?
I’m trying to assume good intent here but all your comments make it sound like you’re annoyed at the furry pics and awkwardly trying to use cancel culture to lash out the author.
Neither the label of programmers (with which I identify) nor of gay furries (with which the author identifies, according to their writing) is being misapplied. I’m sorry you feel that a plain statement of fact is somehow derogatory–there is nothing wrong with being a proud programmer or a proud gay furry.
My point in giving that example was to critique the used construction of “ is ”. I picked that label because the author identified with it, and I picked the “bad at blogging” because it’s pretty obviously incorrect in its bluntness. If I had picked “lobsters” or “internet randos” the conjured association for the person I was in discussion with may not have had the same impact it that “programmers” had on me, so I went with what seemed reasonable.
What if the person encountering your blog is a programmer from an underrepresented background, just barely overcoming imposter syndrome, and now here’s this scary suggestion that they don’t understand hash functions?
Or they may read this and think ‘I’m glad it’s not just me!’. As a programmer who probably has a better than average understanding of hash functions, I don’t feel demeaned by this generalisation, if I were worried about my level of understanding I’d feel comforted by the idea that I wasn’t in a minority in my lack of understanding.
What if they actually made one of the mistakes in the article, and feel like they’re a complete fraud, and should leave the industry?
Or they may feel better that this mistake is so common that someone writes about it on a list of mistakes programmers make.
What if the person encountering your blog is a programmer from an underrepresented background….
While I said you’re picking a fight (and would add: “look at the thread, it’s a fight”), I see what you’re saying in this paragraph. I also value non-judgmental explanations.
My problem with the title isn’t that it’s insulting, but that it’s inaccurate. Clearly some programmers do understand hash functions, even if other programmers do not. If nothing else, @soatok, a programmer, presumably understands hash functions, or why else would he write a blog post purporting to explain the right way to use them?
Programmers don’t understand hash functions, and I can demonstrate this to most of the people that will read this with a single observation:
When you saw the words “hash function” in the title, you might have assumed this was going to be a blog post about password storage.
Specifically is wrong, at least about me, and almost certainly among other programmers as well. I don’t claim to have deep knowledge about cryptography, and I do expect that there’s probably something I could learn from this blog post, which I will read more carefully when I have a chance. But I am aware that the computer science concept of hash functions is useful for a variety of programming problems, and not just storing password-related data.
Interesting language, but does suffer from some unfortunate brand confusion … I had actually hoped this article was a discussion of Inkle’s Ink which is a brilliant domain specific scripting language for interactive narrative that’s been open source since 2016 and (finally) hit a 1.0 stable release earlier this year.
What’s going on here? How did this get to the top of lobste.rs with 26 upvotes? I’m happy for the OP that they could get their system to work, but as far as I can tell, the story here is “package manager used to manage packages.” We have been doing that for decades. Is there any way the community can get a lever to push back on thin stories like this one?
Would it change your opinion if the article mentioned that the nix shell being used here is entirely disposable and this process leaves no mark in your OS setup? Also that even if this required some obscure versions of common system dependencies you could drop into such a shell without worrying about version conflicts or messing up your conventional package manager?
I agree that the article is thin in content, but I don’t think you can write this story off as “package manager used to manage packages.” , I think nix shell is very magical in the package management world.
Yes, but then you’d be inside a container, so you’d have to deal with the complexities of that, like mounting drives, routing network traffic etc. With nix shell, you’re not really isolated, you’re just inside a shell session that has the necessary environment variables that provide just the packages you’ve asked for.
Aside from the isolation, the nix shell is also much more composable. It can drop you into a shell that simultaneously has a strange Java, python and Erlang environment all compiled with your personal fork of GCC, and you’d just have to specify your GCC as an override for that to happen.
I get that, but I have to go through the learning curve of nix-shell, while I already know docker, since I need it for my job anyway. I am saying that there are more ways to achieve what the article is talking about. It is fine that the author is happy with their choice of tools, but it is very unremarkable for the title and given how many upvotes that article got.
Why not learn nix and then use it at work as well :) Nix knows how to package up a nix-defined environment into a docker container and produce very small images, and you don’t even need docker itself to do that. That’s what we do at work. I’m happy because as far as I’m concerned Nix is all there is and the DevOps folks are also happy because they get their docker images.
I work in a humongous company where the tools and things are less free to choose from atm, so even if I learned nix, it would be a very tough sell..
As someone who hasn’t used Docker, it would be nice to see what that looks like. I’m curious how the two approaches compare.
I think that the key takeaway is that with Docker, you’re actually running a container will a full-blown OS inside. I have a bias against it, which is basically just my opinion, so take it with a grain of salt.
I think that once the way to solve the problem of I need to run some specific version of X becomes let’s just virtualize a whole computer and OS because dependency handling is broken anyway, we, as a category simply gave up. It is side-stepping the problem.
Now, the approach with Nix is much more elegant. You have fully reproducible dependency graphs, and with nix-shell you can drop yourself in an environment that is suitable for whatever you need to run regardless of dependency conflicts. It is quite neat, and those shells are disposable. You’re not running in a container, you’re not virtualizing the OS, you’re just loading a different dependency graph in your context.
See, I don’t use Nix at all because I don’t have these needs, but I played with it and was impressed. I dislike our current approach of just run a container, it feels clunky to me. I think Docker has it’s place, specially in DevOps and stuff, but using it to solve the I need to run Python 2.x and stuff conflicts with my Python 3.x install is not the way I’d like to see our ecosystem going.
In the end, from a very high-level, almost stratospheric, point-of-view: both docker and nix-shell workflow will be the developer typing some commands on the terminal, and having what they need running. So from a mechanical standpoint of needing to run something, they’ll both solve the problem. I just don’t like how solving things by doing the evergreen is now the preferred solution.
Just be aware that this is an opinion from someone heavily biased against containers. You should play with both of them and decide for yourself.
This comment is a very good description of why I’ve never tried Docker (and – full disclosure – use Nix for things like this).
But what I’m really asking – although I didn’t make this explicit – is a comparison of the ergonomics. The original post shows the shell.nix
file that does this (although as I point out in another comment, there’s a shell one-liner that gets you the same thing). Is there an equivalent Dockerfile?
I was surprised to see Docker brought up at all because my (uninformed) assumption is that making a Docker image would be prohibitively slow or difficult for a one-off like this. I assumed it would be clunky to start a VM just to run a single script with a couple dependencies. But the fact that that was offered as an alternative to nix-shell
makes me think that I’m wrong, and that Docker might be appropriate for more ad-hoc things than I expected, which makes me curious what that looks like. It points out a gap in my understanding that I’d like to fill… with as little exertion of effort as possible. :)
But the fact that that was offered as an alternative to nix-shell makes me think that I’m wrong, and that Docker might be appropriate for more ad-hoc things than I expected, which makes me curious what that looks like. It points out a gap in my understanding that I’d like to fill… with as little exertion of effort as possible. :)
I think containers is a perfectly capable solution to this. The closest thing you can use would probably be toolbox.
https://github.com/containers/toolbox
It would allow you to even provide a standardized environment which would be decoupled from the deployment itself (if that makes sense). It also mount $HOME
as well.
I use Nix, but also have experience with Toolbox.
I would recommend most people to use Toolbox over nix-shell
. With toolbox you can create one-off containers in literally seconds (it’s two commands). After entering the container you can just dnf install
whatever you need. Your home directory gets mounted, so you do not have to juggle with volumes, etc. If you need to create the same environment more often, you can create a Dockerfile
and build your toolbox containers with podman
. The upstream containers that Fedora provides are also just built using Dockerfiles
.
The post shows a simple use case, but if you want to do something less trivial, it often entails learning Nix the language and nixpkgs
(and all its functions, idioms, etc.). And the Nix learning curve is steep (though it is much simpler if you are familiar with functional programming). This makes the toolbox approach orders of magnitude easier for most people - you basically need to know toolbox create
and toolbox enter
and you can use all the knowledge that you already have.
However, a very large shortcoming of toolbox/Dockerfiles/etc. is reproducibility. Sure, you can pass around an image and someone else will have the same environment. But Nix allows you to pin all dependencies plus the derivations (e.g. as a git SHA). You can give someone your Nix flake and they will have exactly the same dependency graph and build environment guaranteed.
Another difference is that once you know Nix, it is immensely powerful for defining packages. Nix is a turing-complete functional language, so nixpkgs can provide a lot of powerful abstractions. I dread every time I have to create/modify and RPM spec file, because it is so primitive compared to making a Nix derivation.
tl;dr: most people will want to use something like Toolbox, it is familiar and provides many of the same benefits as e.g. nix-shell (isolated, throw-away environments, with your home directory available). However, if you want strong reproduciblity across systems and a more powerful packaging/configuration language, learning Nix is worth it.
A cool aspect of Docker is that it has a gazillion images already built and available for it. So depending on what you need, you’ll find a ready-made image you can put to good use with a single command. If there are no images that fill your exact need, then you’ll probably find an image that is close enough and can be customised. You don’t need to create images from scratch. You can remix what is already available. In terms of ergonomics, it is friendly and easy to use (for these simple cases).
So, NixPkgs have a steeper learning curve in comparison to dockerfiles. It might be simpler to just run Docker. What I don’t like is what is happening inside Docker, and how the solution for what looks like simple problems involves running a whole OS.
I’m aware that you can have containers without an OS like described in this thread, but that is not something I often see people using in the wild.
Nit-pick: AFAIK one doesn’t really need Alpine or any other distro inside the container. It’s “merely” for convenience. AFAICT it’s entirely possible to e.g. run a Go application in a container without any distro. See e.g. https://www.cloudbees.com/blog/building-minimal-docker-containers-for-go-applications
Let’s assume nix shell
is actual magic — like sourcerer level, wave my hand and airplanes become dragons (or vice versa) magic — well this article just demonstrated that immense power by pulling a coin out of a deeply uncomfortable kid’s ear while pulling on her nose.
I can’t speak for the previous comment’s author, but those extra details, or indeed any meat on the bones, would definitely help justify this article’s otherwise nonsensical ranking.
Yeah, I agree with your assessment. This article could just as well have the title “MacOS is so fragile, I consider this simple thing to be an issue”. The trouble with demonstrating nix shell’s power is that for all the common cases, you have a variety of ad-hoc solutions. And the truly complex cases appear contrived out of context (see my other comment, which you may or may not consider to be turning airplanes into dragons).
nix is not the first thing most devs would think of when faced with that particular problem, so it’s interesting to see reasons to add it to your toolbox.
Good, as it is not supposed to be the first thing. Learning a fringe system with a new syntax just to do something trivial is not supposed to be the first thing at all.
I find it also baffling that this story has more upvotes than the excellent and original code visualization article currently also very high. Probably some nix up vote ring pushing this
I didn’t think this article was amazing, but I found it more interesting than the code visualization one, which lost me at the first, “From this picture, you can immediately see that X,” and I had to search around the picture for longer than it would have taken me to construct a find
command to find the X it was talking about.
This article, at least, caused me to say, “Oh, that’s kind of neat, wouldn’t have thought of using that.”
This article is useless. It is way simpler (and the python way) to just create a 2.7 virtualenv and run “pip install psycopg2 graphwiz”. No need to write a nix file, and then write a blog post to convince yourself you didn’t waste your time!
Considering all nix posts get upvoted regardless of content, it’s about time we have a “nix” tag added to the site.
This article is not useless just because you don’t see its value.
I work mainly with Ruby and have to deal with old projects. There are multiple instances where the Ruby way (using a Ruby version manager) did not work because it was unable to install an old Ruby version or gem on my new development machine. Using a nix-shell did the job every time.
just create a 2.7 virtualenv and run “pip install psycopg2 graphwiz”
What do you do if this fails due to some obscure dependency problem?
What do you do if this fails due to some obscure dependency problem?
Arguably you solve it by pinning dependency versions in the pip install
invocation or requirements.txt, as any Python developer not already using Nix would do.
This article is not useless just because you don’t see its value.
No, but it is fairly useless because it doesn’t do anything to establish that value, except to the choir.
In my experience there will be a point where your dependencies will fail due to mismatching OpenSSL, glibc versions and so on. No amount of pinning dependencies will protect you against that. The only way out is to update dependencies and the version of your language. But that would just detract from your goal of getting an old project to run or is straight up impossible.
Enter Nix: You pin the entire environment in which your program will run. In addition you don’t pollute your development machine with different versions of libraries.
Arguably that’s just shifting the burden of effort based on a value judgement. If your goal is to get an old project to run while emphasizing the value of incurring zero effort in updating it, then obviously Nix is a solution for you and you’ll instead put the effort into pinning its entire runtime environment. If, however, your value to emphasize is getting the project to run then it may well be a more fruitful choice to put the effort into updating the project.
The article doesn’t talk about any of the hairier details you’re speaking to, it just shows someone taking a slightly out of date Python project and not wanting to put any personal effort into updating it… but updating it by writing a (in this case relatively trivial) Python 3 version and making that publicly available to others would arguably be the “better” solution, at least in terms of the value of contributing back to the community whose work you’re using.
But ultimately my argument isn’t with the idea that Nix is a good solution to a specific problem, it’s that this particular article doesn’t really make that point and certainly doesn’t convincingly demonstrate the value of adding another complex bit of tooling to the toolkit. All the points you’ve raised would certainly help make that argument, but they’re not sadly not present in this particular article.
Just out of curiosity, I’m also dealing with ancient ruby versions and use nix at work but I couldn’t figure out how to get old enough versions, is there something that helps with that?
Do note this method will get you a ruby linked to dependencies from the same checkout. In many cases this is what you want.
If instead you want an older ruby but linked to newer libraries (eg, OpenSSL) there’s a few extra steps, but this is a great jumping off point to finding derivations to fork.
Do note this method will get you a ruby linked to dependencies from the same checkout. In many cases this is what you want.
Plus glibc, OpenSSL and other dependencies with many known vulnerabilities. This is fine for local stuff, but definitely not something you’d want to do for anything that is publicly visible.
Also, note that mixing different nixpkgs versions does not work when an application uses OpenGL, Vulkan, or any GPU-related drivers/libraries. The graphics stack is global state in Nix/NixOS and mixing software with different glibc versions quickly goes awry.
This comment mentions having done something similar with older versions by checking out an older version of the nixpkgs
repo that had the version of the language that they needed.
Like others already said you can just pin nixpkgs
. Sometimes there is more work involved. For example this is the current shell.nix for a Ruby on Rails project that wasn’t touched for 5 years. I’m in the process of setting up a reproducible development environment to get development going again. As you can see I have to jump through hoops to get Nokogiri play nicely.
There is also a German blog post with shell.nix examples in case you need inspiration.
this example, perhaps. I recently contributed to a python 2 code base and running it locally was very difficult due to c library dependencies. The best I could do at the time was a Dockerfile (which I contributed with my changes) to encapsulate the environment. However, even with the container standpoint, fetching dependencies is still just as nebulous as “just apt install xyz.” Changes to the base image, an ambiently available dependency or simply turning off the distro package manager services for unsupported versions will break the container build. In the nix case, it is sort of forced on the user to spell it out completely what the code needs, combine with flakes and I have a lockfile not only for my python dependencies, but effectively the entire shell environment.
More concretely, at work, the powers to be wanted to deploy python to an old armv7 SoC running on a device. Some of the python code requires c dependencies like openssl, protobuf runtime and other things and it was hard to cross compile this for the target. Yes, for development it works as you describe, you just use a venv, pip install (pipenv, poetry, or whatever as well) and everything is peachy. then comes to deployment:
I was able to crap out a proof-of-concept in a small nix expression that made a shell that ran the python interpreter I wanted with the python dependencies needed on both the host and the target and didn’t even have to think. Nixpkgs even gives you cross compiling capabilities.
Your suggested plan is two years out of date, because CPython 2.7 is officially past its end of life and Python 2 packages are generally no longer supported by upstream developers. This is the power of Nix: Old software continues to be available, as if bitrot were extremely delayed.
CPython 2.7 is available in debian stable (even testing and sid!), centos and rhel. Even on MacOS it is still the default python, that ships witht he system. I don’t know why you think it is no longer available in any distro other than nix.
Funny how an appeal to ESR’s authority makes me more inclined to believe the opposite of whatever argument is being made.
I had the same reaction. I also find it amazing that they say ‘folks need CLAs because PRs have not been tested in court’ and then recommend a replacement that has not been tested in court either! Looking at https://developercertificate.org, it isn’t actually any kind of certificate, it’s just a text document, with nothing attached to it that looks like a signature. I don’t see how this actually solves any problems.
The idea is that by using the -s/—sign off flag on commit a contributor makes an implicit affirmative assertion that their commit is bound by the DCO.
My counter to that would be that if I can get a contributor to start using -s reflexively I can have them make an affirmative assertion of equal value about my carnal access to their family members, simply by writing a file anywhere in the repo.
But yeah, there seem to be many holes in the argument, not merely the association with ESR… to their credit the author has updated the post with a counterpoint that kind of blows it out of the water.
As far as I can see, there’s nothing in -s
that looks like c cryptographic signature. I can create a git commit with my author set to you, commit with -s
, and submit it somewhere. In most jurisdictions there’s a requirement that some amount of work is done to establish identity for parties agreeing to a contract. A signature, a corporate stamp, a witness who has checked some form of ID, and so on are all forms that have been tested in court.
To my knowledge, in countries using legal systems derived from English common law, there is no statute law about what constitutes a valid evidence of a contract. The requirement in statute law is that a ‘meeting of minds’ has occurred and it’s up to the court to determine if a particular signature mechanism is sufficient evidence of this. A line in a text file saying that some name + email address has agreed to the contract, honest, doesn’t seem like it would meet this bar. In other countries, there are statute law requirements for a valid contract and CLA processes typically have some mechanism for that association.
The semantic meaning of -s is repo-side defined; it’s certainly possible to require GPG signoff, and is often required, to the point where I’ve personally never used -s except with a configured GPG key and have never actually seen a repo that requires —signoff but does not also require that signoff to be cryptographically verified. Were such a repo to exist I’d agree the legal protections (if any) would be on shaky ground… though honestly I’m not sure cryptographic signatures are any more understood by courts (especially in countries that still regularly employ powdered wigs) than physical marks, the forgeability of which is well established.
Something feels so icky about calling Traits “inheritance of interface”… maybe it’s too much time studying biology, but traits represent characteristics a thing has, regardless of whether or not those characteristics were inherited. The concept doesn’t comment whatsoever on how the traits were acquired.
I don’t know, that’s sort of like me saying “it was his company, why shouldn’t he be able to run it into the ground?”
In both cases, the answer is the same I think: he’s not the only one on the ship, so it’d be pretty awful of him to sink it
The argument was that he supported Epstein.
Some people argued his statement was poorly worded, some argued that it reflected prior statements.
Honestly, I dislike him in general for other reasons, although at least he isn’t ESR.
Personally I feel the better question is:
Why was he kicked out if it’s appropriate for him to return? Or the reverse, if it’s considered appropriate for him to return, why was he kicked out?
e.g. did you make a real choice when he was kicked off or was it purely a political move
The argument was that he supported Epstein.
I think you either misunderstood what was being said at the time, or you’re extrapolating in dangerous ways what RMS posted on the MIT mailing list. Could you please dig up some links that support your statement?
Possibly more problematic than his support for Epstein (in terms of relevance to his board membership): he’s actively transmisogynistic, anti-queer, and apparently awful to be around most of the time if you’re not a cis dude. So for anyone interested in a more forward-thinking and diverse FSF (i.e. one that is not actively hostile to possible members/supporters/contributors who belong to certain demographics), having someone like him on the panel would be a bit concerning.
[..] his support for Epstein
Since parent hasn’t substantiated this claim, could you please do it? I feel like it represents a gross mischaracterization of what RMS posted on the MIT mailing list. If you have evidence to the opposite I’d like to see that.
Do you have a source on transmisogyny/anti-queer? All I could find was https://stallman.org/articles/genderless-pronouns.html, which is pretty tame (he’s just being stupid about grammar, which fits the neuroatypical M.O.)
he’s actively transmisogynistic, anti-queer
What has he said or done that makes him anti-queer and transphobic? (genuine question and not a challenge btw, because I can’t remember seeing this ever being brought up before.)
I am struggling to see it; I am even pleasantly surprised:
A proposed California bill would stop the state from doing business with companies that discriminate against transgender employees.
I think it is a step in the right direction.
I think his opinions on pronouns are perhaps off-the-mark, but not harmful (and oddly plural-friendly).
There was an incident a few years ago where a transgender FSF employee was being harassed by a coworker for being trans. The employee brought it up to Stallman, who responded by terminating the trans employee.
The incident is discussed in this thread https://www.reddit.com/r/transgender/comments/539x50/breaking_the_free_software_foundation_dismissed_a/
In various places on his personal website he announces that he won’t use “they/them” pronouns for individuals and ridicules usage of singular “they/them”, despite the fact that “they/them” pronouns are some people’s chosen pronouns.
So while he posts stuff stating approval/support for queer and transgender folks (and that’s great), it is clear from other writing of his and also from his treatment of transgender folks that his support isn’t rooted in actually talking to people about this stuff.
Who knows what happened with that foring, or even how Stallman was involved. Maybe it was really bad. Maybe it wasn’t. Unless there’s a pattern of things it seems a bit much to attach these sort of descriptions like anti-queer.
And I don’t think that having a different opinion on the future evolution of the English language to be more inclusive makes one “actively transmisogynistic, anti-queer”. I read his pronoun article before; you can dislike his “language innovation” but he seems to be doing it for the right reasons. As you said, you actively supports transgender people, which fits my general impression of him as fairly progressive (some issues with personal behaviour notwithstanding) so I was surprised by your description. He basically agrees with you: language should be inclusive, there is just a disagreement on how this can best be done. If this is the best you can come up with then, to be completely honest, is not a good look for you here, because what it looks like is the casual hurling of slurs over a fairly minor disagreement. It’s kinda toxic to be honest.
As I have described at length elsewhere in this thread, I really don’t like Stallman and haven’t for a very long time. But please, let’s not turn him in to a devil he’s not.
I’m not sure that calling Stallman “anti-trans” is correct either. To me, he seems more like your generally older, left-of-center out of touch dudes who haunt the American internet. He’s not kept up on the social changes in his sphere.
The real question is, should a person like that be in a leadership position of an advocacy group? That’s for the FSF leadership and membership to decide.
To me, he seems more like your generally older, left-of-center out of touch dudes who haunt the American internet. He’s not kept up on the social changes in his sphere.
This sounds about right; combined with perhaps a rather large dose of stubbornness. In Dutch we have a rather nice word for this: “eigenwijs”, literally translated it’s “own wisdom”. It’s not exactly “stubbornness” but more “can only convinced by their own wisdom”. There isn’t really a word in English for this AFAIK.
A lot of people are so quick to take everything in bad faith nowadays. It’s okay to be a bit older, “out of touch”, be pedantic, and have some eclectic opinions you post on your website that 6 people read. That doesn’t make you some sort of horrible person.
The real question is, should a person like that be in a leadership position of an advocacy group?
No, of course not.
In Dutch we have a rather nice word for this: “eigenwijs”, literally translated it’s “own wisdom”. It’s not exactly “stubbornness” but more “can only convinced by their own wisdom”. There isn’t really a word in English for this AFAIK.
Swedish has “envis” but it’s much more connected to being stubborn. Does Dutch have a word that’s more corresponding to “stubborn”?
I’d use “koppig”; which translates to “headish” and probably has the same root as the English “headstrong” (and/or “pigheaded”, since “kop” is, traditionally anyway, only used to refer to the head of an animal).
Eigenwijs does imply some degree of stubbornness, but it’s not exactly the same.
OK, Swedish has “tjurskallig” (bull headed) in similar context. Almost willfully stubborn.
Swedish has more Dutch loanwords than you might expect, and of course both are Germanic languages.
This is getting way off-topic, but thanks for taking the time!
In various places on his personal website he announces that he won’t use “they/them” pronouns for individuals and ridicules usage of singular “they/them”, despite the fact that “they/them” pronouns are some people’s chosen pronouns.
This qualifies as “actively transmisogynistic”? I think your definitions are different than mine, probably to a severe degree. He even says he’s totally fine with using they/them for plural people, and he says that he’ll call you whatever you like even if it makes him personally mad!
Dunno about the FSF firing thing, looking at news articles makes it look not exactly cut and dry. Rowe seems to be on good terms with Stallman now, perhaps it was a misunderstanding of some sort? Still seems absolutely unnecessary to call Stallman these horrible things. Call him out for making people uncomfortable with his “friendship cards” or whatever, sure, but come on.
So, I interpreted his comments in that post and elsewhere as stating that he wouldn’t comply with they/them pronouns. But regardless, ridiculing someone’s choice of pronouns is actively anti-queer. Saying “I’ll respect your pronouns but I think they’re silly” (which is the most charitable interpretation of what he’s written) is actively hostile in my book.
RE: the firing, I err on the side of believing victims. And Rowe was a friend of the person who was fired, not the person who was actually fired, so it’s immaterial what her current relationship is with Stallman.
Yes, and Rowe was the complaintant (spelling?) in that situation, right? I couldn’t see any statement or anything from the fired employee, only Rowe’s. “I err on the side of believing victims” is all well and good, but it doesn’t look like the victim said anything? (and is also a hilarious way to imply that I don’t believe victims, nice one!).
You can read his statements regarding pronouns however you like, I think he’s being a dickhead about it but I don’t think he’s being actively transmisogynistic. Or, to take a page from your book, maybe you’re being ableist to a clearly neurodivergent figure? Probably not, but that’s how I’m going to read what you’re saying now.
Has Stallman ever identified himself as neurodivergent? It’s not a neutral term. I’d hesitate to apply it to someone against their express wishes.
In the previous hellthread, @mempko states that Stallman has described himself as “borderline autistic”.
https://lobste.rs/s/yxj6cd/remove_richard_stallman#c_j6rxy7
Based on a comment in the previous hellthread, someone states that Stallman has described himself as “borderline autistic”.
this is all that needed to be said. people are out here parsing his statements with a magnifying glass when he’s clearly been a mysogynist, he’s been anti-trans and anti-queer for a very long time. If we want a more inclusive community it starts at the top
I like how you have a non-anon account. Then we can have a conversation.
You call him “anti-trans” and “anti-queer”. Can you back that up with data? Does he ever specifically give himself those labels or are you giving him those labels? If you are giving him those labels, based upon what data? What percentage of software and writings by RMS could be labelled that? Does 50% of his writing focus on those categories? 10%? 1%? .1%? 0.01%? 0.00001%?
I for one read a lot of his code and writings, and can’t remember him ever talking about those issues so I would be very surprised if those were relevant labels at all to him.
Also, growing up in Boston it was very common to use the terms “gay” and “fag” and “queer” in a derogatory sense early and often. It wasn’t until I dropped a “that’s gay” freshman year of college and a female hall mate from California (became a best friend) stormed off in disgust that I had any notion I was on the wrong side of that one. Could you have called 18 year old me “anti-gay”? Absolutely. But I just was ignorant, and eventually matured.
I think labelling people is generally a bad idea. It would be like labelling a new garden “dead” before you even gave the seedlings a chance to grow.
He had to leave due to a heated controversy that originated in a MIT mailing list. Details here: https://jorgemorais.gitlab.io/justice-for-rms/
That’s not a particularly good source. The original article that led to his resignation is a better place to start reading:
https://selamjie.medium.com/remove-richard-stallman-fec6ec210794
You can also skip all that and just go read the CSAIL mailing list exchange yourself first, found at the bottom of this Vice article:
Finally, just a general disclaimer: Stallman didn’t resign just because of the article by Selam, but rather because of the wide range of news coverage that documented his past behavior. Selam’s article was really just a catalyst.
Stallman didn’t resign just because of the article by Selam, but rather because of the wide range of news coverage that documented his past behavior.
Or, rather, a bunch of slander, which is documented here.
Truth is an absolute defense to slander, and the article you link must admit that the things it analyzes are all ultimately rooted in things that Stallman actually factually truthfully really said and did. Beyond that it’s just a matter of how the author of that article and the authors of other articles subjectively interpret the given facts, which is a matter of opinion and thus something slander explicitly cannot apply to. So you should probably stop referring to “slander” in this context.
Reporting that someone “says that an enslaved child [implied to be in the general case] could, somehow, be “entirely willing”” when they actually say that a [particular] enslaved minor close to age of majority in one specific country (not a child) may have presented themselves as willing — i.e. acted as if they were willing, i.e. propositioned someone who would have no idea that they were a slave or a minor — is clear, unadulterated slander.
That it’s rooted in something that Stallman said doesn’t change that; twisting someone’s words in such a disgusting way is as wrong a lie as making something up entirely from scratch.
I find it sick that you can actually pretend that the claims made about what Stallman said could be characterised as “truth”. Truth is an absolute defence to slander, but there was plenty of untruth propagated about what Stallman actually said.
So I will not stop referring to slander in this context (though I am not @ethoh).
Just reading some of that first link. The best word used was harem - I mean how does somebody use that word in a serious way in a non-historical context? I always knew the guy was eccentric, but he really comes off as a piece of garbage.
I hadn’t even heard about any of this (don’t really pay attention on that side of the fence), boy oh boy. Thanks for those links.
I see the word harem used all the time (and sometimes use it myself) and don’t at all see how it’s usage would make somebody “a piece of garbage”, can you elaborate?
Have you used it to suggest that economically disadvantaged women and children being actively trafficked by a convicted sex offender constitute a harem*? Because that’s the usage that (among other things) makes Stallman “come off as a piece of garbage.” Which, if we’re going to keep trying to rules-lawyer, is not the same thing as ‘making [him] a “piece of garbage”’.
* If we’re being at all technical a harem is an architectural feature; we probably should retire the word when applied to anything else.
You work on Void Linux, right? Can’t we say the same thing about Juan and Void? Clearly things aren’t always as simple as “it’s his project”.
You can’t be a leader with half of your personality. While I agree that some things are in the realm of private, your personal blog and your public speeches aren’t. You can’t go and have spicy opinions on your personal blog all the time and then pretend that they do not matter when running your projects and finding your peers in your projects.
People are particularly questioning his ability to lead GNU and the FSF in a new era.
I also don’t know how 33 GNU developers signing a letter that Stallman can’t remain the head of the GNU project can be anything but criticism of his working persona. https://guix.gnu.org/blog/2019/joint-statement-on-the-gnu-project/
I guess that depends whether the project wants to be judged by the things RMS says about.. you know … fucking kids.. fucking corpses.. etc.
Anyone else notice code blocks in this article being truncated by several characters on the left if the device is in portrait orientation?
Might just be me, but it makes the article unnecessarily hard to read, at least on an iPhone 12 Mini.
This is understandably tagged “historical”, but do note that it’s extremely relevant to this day. A while back, when I was still doing firmware for medical devices, this was de-factor required reading for everyone who joined the company.
It should be required reading for every developer and manager. I came across some extremely graphic descriptions of some of the injuries and clinical outcomes when I first read about this tragedy… absolutely horrifying what an overflow can do.
Again on clocks starting at midnight instead of 1AM. Again on unit circles starting at 0 radians instead of 1/π. Again on scales being tared at 0kg instead of 1kg. Again on rulers starting at 0cm instead of 1cm.
I suppose my argument is that the index of the nth thing isn’t as useful as the bounds of the nth thing … any 1-based language needs to either compile-time desugar the index by subtracting 1 or incur the runtime cost of subtracting 1 from the index any time it’s actually used – because under the hood there’s just offsets – while gaining only a very mild degree of comfort for primates that first learn to think in fingers.
Also I’m not sure an appeal to tradition is any more valid than an appeal to authority.
Ok, after more diversions and tangents than I can possibly count, and having basically had to hold so much state in my head that I’ve had to page to disk multiple times, I’ve reached the end of the article, and what have I learned?
And I’m really not being flippant or trying to troll here. I truly came in wanting to gain a new perspective on pointsfree and tacit programming… I leave thinking that the line from Spiderman should be “with great power comes the responsibility not to use it”.
I’m sorry that you feel that way; it sounds like neither my coding style nor my writing style are a good fit for your tastes.
One point where I agree with you, however: I don’t think Raku is a great fit for polyglot programming, at least in the way I assume you mean it. Raku has good FFI and can easily call out to anything with a C ABI, so in that sense it’s good at polyglot. But if by “polyglot” you mean “an environment where different parts of the codebase are written in different languages but are understandable to the entire team (including people specializing in other languages)”, well, then Raku isn’t a great fit. As the 101 example shows, you can write Raku code that is easily understood by people without much Raku experience but, imo, that involves giving up most of what makes Raku powerful. At that point, you might as well just use Python/Ruby/JavaScript – and, since everyone already knows those, you can support a polyglot environment.
(As I guess is clear, I believe than the advantages of deep mastery of a set of idioms outweigh the benefits of a polyglot setup, but I’m happy to agree to disagree on that point)
Can a designer explain what the word “stack” means in this context?
Is this a website that showcases my OS’s fonts?
The “stack” is the sequence of typefaces that the browser will try. You prefer the first, you’ll fall back in order to the last until you find one that is present on the users machine.
The site tries shows font styles that are already available on people’s computers as part of their system fonts. If you pick one of these font listings for your CSS, then you don’t need to use web fonts. In that way, this site connects with the Stop Using Web Fonts article that’s also on the front page.
so, pretty much what I used to do in 1998?
Yes, but formalizing what you used to do across platforms you hadn’t considered at that time. Basically it’s helping to answer the question “how am I most likely going to get a passably similar aesthetic across the permutation space of pre-installed font choices made by disparate vendors that don’t communicate with each other and can’t agree on a standard?”
I remember fiddling extensively to get fonts to appear similar in Windows/IE4 and Linux. Windows at the time had the meticulously hinted Verdana/Georgia/Tahoma TrueType fonts, whereas Linux (I think) only supported Type1 and bitmap fonts, and certainly couldn’t do hinting. Type1 fonts didn’t look good until you increased the point size to about 12-13, which was frankly too large for a resolution of 640x480.
I didn’t have access to a Macintosh at the time, and neither did anybody I knew, or I probably would’ve included them in my attempts.
I have to say, what the author did looks very good (and certainly better than my attempts at the time). I’m just amused by the word “modern”.
Pretty sure the “modern” is just to bring the stack collections up to date with current device trends; most of the other such stack recommendations out there are several years and numerous device generations out of date. The underlying problem predates the Windows/Mac/*nix trichotomy by at least the Gutenberg Press.
To be fair, someone born in 1998 is 25 now, it’s not surprising they’d not heard of this before…
Thanks for pointing that out :p
I feel old. Everyone else should also feel old.
Yeah, but OSs ship with a lot more built-in fonts now, and nicer ones, so you don’t have to fall back on the same old Times/Arial/Verdana/Trebuchet/Georgia set. (Ugh. The only one of those I can still stand is Georgia.)
In this case, it’s just a list of operating system native fonts to use for similarish appearances. You can see more detail at the GitHub page: https://github.com/system-fonts/modern-font-stacks.