1.  

    I recently tried to use the libyaml C library, and that’s where I first realized how complex YAML really is. The library is so abstract, for it to support all the stuff that YAML allows, just parsing key-value data already seems like overkill.

    1. 5

      I found the sound of the printer hitting the paper in response to commands oddly satisfying and retro-futuristic (reminded me of films like WarGames). Also very fun to see how a REPL is really the logical way of interacting with a computer, even back when the “UI” was so limited.

      1.  

        with a computer, even back when the “UI” was so limited.

        Why are you quoting UI? It’s a UI, just as much as any terminal emulator, Graphical UI or sound-based-assistant is nowadays.

        1.  

          You’re right of course. It’s just not what we would typically think of as a UI nowadays.

      1. 2

        Curiously, uMatrix still informs me that medium.com wants to save three cookies in my browser.

        1. 1
          #define strscpy(dst, src, len)  \
              do {                        \
                  memset(dst, 0, len);    \
                  strlcpy(dst, src, len); \
              while (0);
          

          How’s this? I bet there’s still a one-off bug somewhere.

          1. 3

            not that it matters, but memset(3) will return dst, so you could (maybe not should) also do

            #define strscpy(dst, src, len) \
            	strlcpy(memset(dst, 0, len), src, len)
            
            1. 2

              Still has the problem of evaluating len twice.

              For clarity’s sake, a better approach here would be to implement strscpy as a (potentially inline) function rather than a macro. The types of all the arguments are known and there’s no preprocessor trickery going on.

            2. 2

              Probably just a typo, but drop the semicolon after while (0). Having it defeats the purpose of wrapping your code in a do {} while loop in the first place.

              1. 1

                You’re right that it’s a typo, but it doesn’t break anything, as far as I see. It would just equality valid to add or to omit a semicolon in the real code.

                1. 9

                  The whole point of using do { ... } while (0) is to handle the case where adding a semicolon in the real code is not valid. Consider the calling code

                  if (a)
                      macro();
                  else
                      foo();
                  

                  If you define your macro as #define macro() do { ... } while (0) then this works fine. But if you define it as do { ... } while (0); then this expands to

                  if (a)
                      do { ... } while (0);;  /* note two semicolons here */
                  else
                      foo();
                  

                  That extra semicolon counts as an extra empty statement between the body of the if and the else. You can’t have two statements in the body of an if (without wrapping things with curly braces) so the compiler will refuse to compile this. Probably complaining that the else has no preceding if. This is the same reason why plain curly braces don’t work properly in a macro.

              2. 2

                How do you detect truncation?

                strlcpy will also attempt to evaluate strlen(src), meaning that if src is malformed, you will read memory that should not be read, and you will waste time evaluating it in every case.

                ssize_t strscpy(char *dst, const char *src, size_t len)
                {
                	size_t nleft = len;
                	size_t res = 0;
                
                	/* Copy as many bytes as will fit. */
                	while (nleft != 0) {
                		dst[res] = src[res];
                		if (src[res] == '\0')
                			return res;
                		res++;
                		nleft--;
                	}
                
                	/* Not enough room in dst, set NUL and return error. */
                	if (res != 0)
                		dst[res - 1] = '\0';
                	return -E2BIG;
                }
                
                1. 1
                  char *dir, pname[PATH_MAX];
                  if (strlcpy(pname, dir, sizeof(pname)) >= sizeof(pname))
                      goto toolong;
                  
              1. 11

                I don’t think we should allow these people into open source spaces and I don’t want a company that works with them to profit off of my work.

                It doesn’t work that way, for very good reason. See the FSF on censorship envy and licensing.

                1. 14

                  I find that unconvincing. FSF finds it difficult to draw a line, but that doesn’t mean the line shouldn’t exist at all. This problem doesn’t exist for an individual, who can decide exactly for themselves who they’re going to support.

                  1. 3

                    I tended to do so too, but Stallman’s argument:

                    A condition against torture would not work, because enforcement of any free software license is done through the state. A state that wants to carry out torture will ignore the license. When victims of US torture try suing the US government, courts dismiss the cases on the grounds that their treatment is a national security secret.

                    is pretty convincing to me. If your software doesn’t directly interface with users, or if work has been put into hiding it, it one might often not even realize that one is running enclosed software.

                    Anyways, since the free software movement when it comes to the fundamental question opposed to copyright and intellectual property, they wouldn’t want to have to extend it further than necesary, as argued here:

                    It is not clear these [conditions] would be enforcible. Free software licenses are based on copyright law, and trying to impose usage conditions that way is stretching what copyright law permits, stretching it in a dangerous way. Would you like books to carry license conditions about how you can use the information in them?

                    In the end you can choose to oppose those you don’t want to help in all other ways: don’t help them with issues, ban them from mailing lists, etc. but starting to limit who can and cannot use certain software, can only lead down a rabbit hole of less software for everyone to use, and a even worse/abusable legal situation – it should be obvious that this isn’t the goal of free software, but if this is a higher priority, then nobody is forcing software to be free…

                  2. 6

                    Those arguments make sense in the context of a license, but they don’t apply here. The FSF itself is one of the best examples of condemning and refusing to do business with companies like Microsoft, even if the GPL doesn’t prevent Microsoft from using their code.

                    1. 6

                      I don’t understand what this article about including politics in software licensing has to do with people boycotting businesses they believe engage in acts of evil.

                      1. 2

                        I strongly disagree with the FSF on this issue. We don’t have to, and should not, treat all things the same regardless of ideology. Good things are good and bad things are bad, and we should treat them accordingly. I think that a free software movement that doesn’t take a stance on moral issues outside of software licensing is hollow at best. The first amendment doesn’t apply to open source projects so we’re all perfectly free to not allow Palantir to participate, though I agree that licenses aren’t a good way to enforce this as it’s a social rather than legal problem.

                      1. 2

                        A good proof of concept that patch-based approach to plugins can work.

                        1. 3

                          Not necessarily by itself. The main problem I encounter is applying two or more patches to the same codebase, leading to a later one failing, just because of the order. For that to be properly portrayed, one would have to have some hyper-matrix or densly-connected graph to display which patch-orders work.

                          1. 1

                            And then it becomes exponential with the number of patches…

                            On the other hand, composable tools get none of these drawbacks.

                            But composable tools face the problem when you need to edit data structures that are held within the program memory (the windows). To expose these to the outside, heavy IPC mechanisms would be needed. Either a chatty protocol (socket with a window editing protocol?) or another (9P as used in wmii).

                            If your needs are not those of a X11 WM power user, 1~2 patches are probably fine.

                            If one is interested in a fully composable window manager, wmutils provides that.

                        1. 17

                          Do not delete the path part of that URL, yikes.

                          Anyway, what is “Suckless”? That’s what I was trying to see, and instead got an image of a naked man holding a bottle of wine.

                          1. 15

                            For Suckless, see https://suckless.org/, not the users subdomain.

                            It’s a project/group related to cat-v and classical-unix/plan9 advocacy, rejecting tools that “suck” and wanting to replace them with “simpler” alternatives (dwm for window managment, st for terminals, dmenu for reading keyboard input, …). This often entails that configurations have to be applied pre-compilation and that the default distributions of various tools and projects are pretty lean – hence additional features are collected as patches, which are listed here, showing which can be successfully applied, and which can’t.

                            1. 4

                              I can report that dwm and st are great tools.

                              The only hitch is recompiling them after modifying their configuration files, which are written in C. Many people don’t like this. Some, like myself, don’t mind.

                              1. 3

                                I used st (off and on) for a while (~1yr), and for me the biggest annoyance was having to rebase some patches when multiple patches modify similar lines of code. Once that headache was resolved, it was generally OK unless some st commits triggered rebasing some stuff again. Basically it was all the fun of maintaining your own branch of st with patches someone else wrote.

                            2. 13

                              Suckless was in its heyday around the time of the systemd eruption, as far as I know. This would be around 2010. Slightly prior was this one weird viral video of an artist named Gunther, a self-styled “sex prophet,” who made the rounds with a (completely SFW in the most technical of senses, though apparently not germane to your sensibilities, bheisler, which is fine with me, thus this explanatory note to lessen the blow of freakishness herein) music video called “Ding Ding Dong.” Pop music beats, euro summer beach ditzy style. Not amazing, but pretty good, definitely unique. The naked man is that same gunther. Just wanted to clear that up, because this is a clear case of an overreaction to a misunderstood joke. As far as I know, the suckless community was and is to the extent that it still exists, pretty insular. Probably didn’t anticipate being posted on an HN style board

                              1. 7

                                Probably didn’t anticipate being posted on an HN style board

                                Lobste.rs has even “suckless developer” hat used by several people. Not quite buying the unanticipated part.

                                1. 1

                                  Reasonable.

                                  Would you, however, admit that Gunther, the individual who presumably is the man behind gunther.suckless org, is not the OP of this link?

                                  In admitting this, if you do admit this, are you not therefore forced to agree with me that the post we’re discussing was not intentionally put forth as a display of nudity to eyes averse to that same nudity?

                                  If a list of patches to utilities and other programs is hosted at a path of a subdomain which contains the image a naked man holding a vertical wine bottle (with suggestive verticality) is posted without awareness of the suggestive verticality of said bottle, then can’t we conclude that the proximate nature of that suggestively vertical bottle to said list of patches to utilities and programs is in some sense accidental, and therefore unanticipated?

                                  By this argument, I intend to demonstrate that your claim, while seemingly reasonable, is eliding the quite clear nature of the circumstances, in an effort to maintain that all suckless developers and subdomain holders should be aware of all possible audiences for their online “speech” (or however you wish to define what the image is), when in fact it is absurd to believe that all speech of all suckless developers would be anticipated to agree with all possible audiences. I’m afraid that, unless Gunther appears to justify his position, we’ll have to remain in a misunderstanding silence regarding the reason why a suggestively vertical bottle and naked man are so closely associated with this list of patches.

                                  I tried to explain it, because it seemed necessary to explain, to me. Perhaps one day, your doubt regarding this explanation will itself be exposed to the eyes of someone on a far away news site, and they will be as horrified as if they had seen a vertical and suggestively placed bottle.

                                  1. 2

                                    @varjag simply wanted to inform you that @FRIGN not only has an account here, but also has the [suckess.org developer] hat. So a lot of the community knows about Suckless (presumably not @bheisler, who asked the question in the first place).

                                    I must confess to be in the same position as @bheisler. I knew of suckless, but had no idea what the linked page meant in context of that project.

                                2. 3

                                  So the guy probably thought since he had the same name as this weirdo that for internet reasons (remember when memes were cool and unique signifiers of in-group identification?) it would naturally follow to have him around on the ol’ personal page

                                  1. 2

                                    Sorry for the long-winded explanation, but I miss the old web, and I am not even old! Would you, Herr heisler, have been hip to a tidy game of Flash-powered Sandspiel, even if it were on a subdomain of ebaumsworld?

                                3. 8

                                  The suckless project makes and maintains a bunch of Unix programs that meet their definition of “sucking less” - http://suckless.org/philosophy/

                                  I’ve been caught off guard by them offering personal subdomains on their site before, too - suckless.org is SFW, but any individual subdomain?

                                  I use and like dwm when I can.

                                  1. 17

                                    They like to send mail from hosts with names like wolfsschanze. You can also see FRIGN’s opinion about diversity as shared on lobsters. Or the time someone pointed out there are torchlit marches at suckless conferences and someone else asked FRIGN to clarify and he basically admitted to being a white nationalist, complete with dogwhistles like “cultural marxism”?

                                    I’m not saying that suckless is definitely a white nationalist organization but I am saying someone would have to do a lot of work to convince me otherwise.

                                    1. 4

                                      Must we do this everytime someone posts something suckless related? Can we please just talk about technology instead of all this political nonsense and random accusations?

                                      1. 13

                                        Look, for every person who thinks this is “political nonsense and random accusations,” there’s at least one person who thinks this is so damning that they want literally nothing to do with suckless ever again.

                                        And despite Lobster’s general “politics is off-topic” policy, this thread is literally someone asking “what is ‘Suckless’?”, so if it’s on-topic anywhere, it’s here.

                                        1. 2

                                          Please see my reply above.

                                          1. 4

                                            Um. Welcome to lobsters? A couple of words to a wise guy:

                                            1. Your previous comment is not “above” this one. The whole tree gets reordered based on upvotes.
                                            2. That stream-of-consciousness-wall-of-text style may play well wherever @enkiv2 invited you from, but it’s gauche here. At least, I find it exhausting more than amusing.
                                            3. For heaven’s sake, please don’t feed the trolls! No matter how many big buckets of troll slop you may have handy.
                                            1. 0

                                              Thank you, minimax! – for your welcome, since it is utterly welcoming. A couple more words in response, and whether they contain a wisdom equivalent to my similar and apparently inherent quality of same is entirely your determination. I am so grateful to have run into an authority on these matters. Perhaps you can finally solve the trolley problem for us all, and divide good people from bad ones, as you scry into your palantir of forum posts.

                                              To wit -

                                              (1) My previous comment is in a tree of comments.

                                              (a) What is the precise and preferred nomenclature, such that an ignoramus could understand?

                                              (b) In the sense that a tree (such as this comment tree) goes from a single node to plenty of nodes, is it entirely inappropriate to say “above” in order to indicate, where n is the depth indicated away from the origin, trunk, root, or base of the tree, the position n - 1? I understand if your perspective is like the protagonist of Ender’s game, and you feel like n-1 compared to n is down, not up, but Ender held that of his enemies, and I am not yours. Are you mine?

                                              (2) I don’t care. Actually, like a total four-year-old, I feel an evil glee.

                                              (a) When you say, “stream-of-consciousness-wall-of-text,” you are committing a grammatical error by hypenating between “chunks” of words. One noun is “stream-of-consciousness” and the other is “wall-of-text,” and, while neither necessitates hyphens, it is an elegant stylistic choice, and redounds back upon my usage of “implied-by-you.” But the nouns you connected simply don’t need to be joined. In fact, they should be separated by a comma. I’m running out of breath just looking at it.

                                              (b) Gauche – what is the meaning of this word in the sense you’re applying?

                                              (b, cont.) John Ohno is no concern of yours in this regard, is he? What are you, a partisan of webbiness that wants to condemn hypertext? What beef could you possibly have with the guy? How do you even go from his proto-post-communism on the one hand and quasi-Ludditic radically conservative ideals of “small computing” on the other, to me? Am I to consider you as thinking that my response, “below,” (in opposition to ngoldbaum’s unfair condemnation of an entire ideal of technical practice in contemporary FOSS on the basis of his own flawed reasoning, equating cultural marxism, which predates the ilk whom ngoldbaum is, in abject ignorance, confusingly attempting to condemn, by about 45 years) the same as enkiv2’s opinions?

                                              (b, cont.) That you find it exhausting to read: good for you. :)

                                              (3) This would be humorless, except it is meaningless.

                                              Please, oh minimax, solve the trolley problem, since you know how to identify trolls and can give advice to the gauche. I am happy to lay on the tracks if you want to flip that switch to experimentally determine once and for all whether it is worth saving some arbitrary group of people as opposed to me. Regarding the basic subject matter at hand, which is suckless, and someone’s unfair-in-my-opinion (see how that’s grammatical?) condemnation of suckless, I should say that I find a policy of opposition to affirmative action intolerant. I support techne, and it follows that I support suckless. It does not therefore follow that I support what ngoldbaum very confusedly understands to be a persecution of the Jews by FRIGN. This seems absurd to have to point out, but here we are. Again: I find intolerance disgusting. I also find vendettas disgusting. Lastly, I find hubris disgusting. I am painfully aware that I, too, sadly lack the cleanliness that would come with an absence of this very quality. However, you have to admit, your hubris in judging me is incomparably greater than my hubris in defending myself against your allegations of . . .

                                              1. Being a “wise guy.”
                                              2. Having a “gauche” “style.”
                                              3. Having an exhausting and unamusing style.
                                              4. Feeding the trolls, in contradiction to the “sake of heaven.”
                                              5. Having handy “troll slop.”

                                              Your welcome is most welcome.

                                              And you’re welcome.

                                              Regards,

                                              Myself

                                              P.S.: “A couple of words” is merely a figure of speech! And you don’t have to type “um,” even if you habitually say it!

                                              1. 4

                                                This sardonic flippancy is tedious and unwelcome. Please treat others better than this.

                                                1. 2

                                                  Noted

                                                2. 1

                                                  (a) What is the precise and preferred nomenclature, such that an ignoramus could understand?

                                                  I prefer to simply provide a link to the comment.

                                                  (2) I don’t care. Actually, like a total four-year-old, I feel an evil glee.

                                                  This is not a good attitude to have on Lobste.rs.

                                                  (b) Gauche – what is the meaning of this word in the sense you’re applying?

                                                  I’m not @minimax, but I would read it as “socially awkward”.

                                                  (b, cont.) John Ohno is no concern of yours in this regard, is he?

                                                  Actually he is, as he invited you and has a certain responsibility for that invitation.

                                                  1. 2

                                                    Yeah, um, @lettucehead, please don’t get yourself banned. I would not have invited you if I didn’t expect you to acknowledge community norms & practices.

                                        2. 1

                                          Hey, because minimax decided to play mod with my “gauche style,” and I suspect he just disagrees with what he believes to be my assumptions about what you said, I have some further, legitimate, serious questions. What can you say to substantiate your reduction of the “stream-of-consciousness, wall-of-text style” (to use minimax’s phrase with my improvement) post by which FRIGN “[clarified,] and … basically admitted to being a white nationalist,” in the torchlit marches link, above?

                                          I’m honestly confused, I just don’t see how you get that from what he said. Can you, please, substantiate your reduction of what he actually said, to what you said he said?

                                          Or, can you remove your unnecessarily politicizing post, in violation of pushcx’s general wishes for this forum? I will happily delete (or respect the deletion of) my replies to it, so that we’re “even.” But let it be known, I do wish substantive answers because I am sincerely curious about your opinion and understanding, and would rather not have the kabosh put on a polite and principled discussion. We’re all crustaceans here, instead of denizens of the orange site, because the discussion is of a much higher quality. At least, that’s what I’m here for, and I care deeply about that.

                                          I should also add that I never would have been aware of any rift between certain members of this community were it not for one of your posts on almost the exact same subject several months ago, and while I have picked on specific points of contention regarding the “dogwhistles,” I was glad to receive the intelligence represented by your… saintly screeds… in this regard, both initially and now.

                                          1. -5

                                            I believe your characterization of FRIGN and some generally-applicable ad hominem arguments about suckless devs as a whole are accurate and appropriate. Furthermore, I do think it’s not unreasonable to maintain that the qualifier “definitely,” being dropped, would result in a statement of something that you are indeed saying. I encourage you to unequivocally embrace your own opinions, since greater accuracy and forthrightness about a diminished predicate (the implied-by-you “absolute” white-nationalism of suckless being reduced to a mere quality thereof) will remove the difficulty necessitating a disavowal of your own opinion in the first place.

                                            It is an intellectual error to equate white nationalism with opposition to cultural marxism. The preeminent hypervisor over the various and factional containers of that latter opposition, Jordan Peterson, was interested when Zizek pointed out that during the passion of Christ, he said, “Why hast thou forsaken me?,” a point of contention in scholastic philosophy that, from Zizek’s point of view, cut at a certain root of Peterson’s misunderstanding of what communism was all about, in relation to the nominal subject of their appearance together recently. The fact that that seems unrelated, is because it is. However, it is definitely in the strictest possible sense of “relating to definition,” relevant to cultural marxism as such. All this is to say – there is such a thing as conversation, and it is stymied when an equation is made between unequal parts. I dont dispute the apparent co-location of nationalism and anti-Marxism, but this goes without saying, and I don’t dispute the divergent interests of “whiteness” (as concieved by the so-called cultural Marxists) and “culture” (read: “diversity;” as conceived by the self-styled neoreactionaries).

                                            In the final analysis, we’ll all go along with some eventual victory in the political arena, and either condemn or glorify the ideologues of the suckless branch of post- simplicity accordingly, but that victory has not yet been obtained by either belligerent party in this technical and confounded arena. Until then, FRIGN is probably gonna go on with his agenda in every sense, the mods are gonna maintain their positions of relative non-interference, and you might remain willing to conflate ethics with techne. I shall not.

                                            (The only remaining position is cultural Trotskyism!)

                                        1. 1

                                          This is cool, I always wondered in what order links get reposted, being of course a bit more biased to this site.

                                          Maybe binding in something like Reddit would be cool too, since I sometimes notice a emacs-related link I post here appear on /r/emacs, and it’s happened a few times too many for me to think that it’s random. But since I don’t keep up to the other subforms over there, there might be more going on?

                                          1. 3

                                            Maybe binding in something like Reddit would be cool too

                                            If @gerikson is willing to add Reddit, it would be interesting to add (just) r/programming. (I think that subreddit should be enough for the most of the stuff that usually gets cross-posted)

                                            1. 2

                                              I’m not familiar with the Reddit API, but maybe if there was a firehose of every link submission one could get stuff that was posted to all subreddits. I tried to keep my code written so adding another source would be possible, and doing so would be a good test. Thanks for the suggestion,

                                              1. 9

                                                Also in case it’s helpful, here’s a blog post about how f5bot watches all of reddit: https://intoli.com/blog/f5bot/

                                                1. 2

                                                  Well… that’s a bit more impressive than my little app. Thanks for the link!

                                                2. 3

                                                  there’s https://www.reddit.com/new.json (docs).

                                              1. 5

                                                Looking forward to this in 5 years on Debian stable!

                                                But seriously, Xfce and MATE are the two main DE’s I ever consider using, and with Xfce improving a bit again, it might be worth considering to try it out again, after a period of MATE.

                                                1. 1

                                                  I’m guessing my yak-shaving tree isn’t deep, but wide, since I indulge in many smaller projects, rather than recursively working on one.

                                                  1. 11

                                                    This is the dumbest nerd fight ever. This is the tabs vs spaces of arithmetic. The dress of calculation. The Yanny or Laurel of notation.

                                                    Nerds, the notation is ambiguous. Some of you nerds are disambiguating one way and other of you nerds are disambiguating the other way. There is no god-given way to disambiguate that we will all agree on. So, nerds, just agree ahead of time which way you want this to go and stop acting like you know the one true way.

                                                    1. 6

                                                      Nerds, the notation is ambiguous.

                                                      Every single nerd has been saying this the whole time.

                                                      1. 2

                                                        Haha, not every single one, but yes, there’s quite a few of us.

                                                      2. 4

                                                        You don’t appear to have read the linked article.

                                                        1. 2

                                                          Why, because I’m agreeing with it?

                                                          I did read it. I’m just tired of this nerd fight. It’s been all over my radar for the past three days. It bears repeating that the fight is dumb. In unequivocal language that doesn’t fall afoul of Poe’s Law.

                                                          Edit: By the way, here is a more interesting one that physicists and mathematicians tend to evaluate differently. Suppose T(x, y) = k(x^2 + y^2). What is T(r, θ)? Physicists tend to answer kr^2 and mathematicians tend to answer k(r^2 + θ^2).

                                                          1. 1

                                                            Whoa…is that because physicists would interpret that as T(v) = k(v) where v is a vector, and see (r, θ) and (x, y) as just two views of the same vector?

                                                            1. 2

                                                              Sort of, yes, there’s a geometrical thinking behind it. It’s just a huge convention in physics and most of science that certain variable names are reserved for certain coordinate systems, so they think the question is about writing the temperature in Cartesian or polar coordinates.

                                                              Mathematicians are a little more used for their variables to be meaningless so they don’t attempt a change of coordinates for the expression.

                                                              1. 2

                                                                Choose epsilon smaller than zero and see how that trips mathematicians up :) …

                                                                Just kidding :) Physicists employ a lot of patterns in their calculations. One for example is, that we “can” calculate with differentials just like with normal variables. I had room mates who studied math, and we had this game where I would show them a short physics calculation while preparing for my physics exam and they would cringe and point out the spots where a mathematician would stop to clarify whether a function was actually integrable at that spot, or similar things.

                                                                You surely know these memes, were a calculation is shown that proofs that “0 = 1” or something similar, right? They are mostly based on dividing by zero at some point. Mathematicians know a lot more of such “loopholes” that need to be watched out for.

                                                            2. 1

                                                              Basically nobody will ask such question in real life. As such both answer are equally good. It is exactly the same thing than the OP. Something which never happen have answers depending of who you ask. And the best answer is not answering.

                                                          2. 2

                                                            Nerds, the notation is ambiguous

                                                            Things like these have recently had me thinking about what a “good style guide” for mathematics should look like, or if it is even possible. It wouldn’t even have to just be one style, could be different ones for different preferences, but at least some coherency across different subjects would really be nice from time to time. Interestingly TeX has done some work in this directory, at least when it comes to notation, but there’s still a lot more that should and could be improved on.

                                                            1. 2

                                                              TeX doesn’t make the notation less ambiguous. You can use TeX to write all sorts of ambiguous things. Professional mathematicians do this all the time! This is because they rely on humans to pick the right way to disambiguate things because they know the context where things make sense. Most written mathematics (mathematical logic and other computery subjects excepted) is just shorthand for English (or whatever other natural language), can be read out loud in English, and with natural languages being ambiguous themselves, we manage just fine.

                                                              Edit: But if you insist…

                                                              1. 2

                                                                No, you’re totally right that notation hasn’t become less ambiguous. I guess calligraphy would have been a better term instead of notation – and maybe also how a document is structured?

                                                            2. 2

                                                              So it isn’t convention to evaluate left to right when there are operators of equal precedence? (In this case, division and multiplication.) Not challenging you. Just an honest question.

                                                              1. 5

                                                                Obviously not a common enough convention to prevent Twitter wars. Rewrite your expression in a way that will confuse people less.

                                                                It’s actually fairly standard in mathematical expositions I know of to be aware of the ambiguity of the obelus or fraction bar and write expressions so that it’s absolutely clear what is the numerator and what is the denominator.

                                                                1. 2

                                                                  APL goes right to left! There’s definite advantages to doing it that way, too.

                                                              1. 4

                                                                With regards to what was mentioned about spam and spam handling towards the end of the article, I’d recommend listening to the last Libre Lounge episode, to find out what methods are being considered in that area.

                                                                1. 2

                                                                  It’s sitting on my phone waiting to be listened to.

                                                                1. 5

                                                                  It always terrifies me that a few years back I was using these boards (albeit not for /pol/, and always opposing it’s brigading) and might have encountered these people in discussions. What’s sad is that even if such a site is taken down, it’s quite easy for them to move on, as long as this movement manages to be coordinated and they don’t fragment.

                                                                  It took a while for infinity chan to take the place of the second western image board, next to 4chan, but honestly, if it would come to the site being taken down, I think the chances are higher than ever that they could set up a new host faster than before, or even start using a decentralized approach, which coupled with anonymity might become even more “dangerous” (only limited by the need for images to be stored).

                                                                  It’s horrible what this kind of format has been associated with, and I sometimes wonder (but don’t hope) that it isn’t intrinsic to image boards per se.

                                                                  1. 7

                                                                    Yeah, I used to use 8chan a lot. Moved from 4chan in 2014 (the exodus) after the moderation started banning people for speaking out against the cultural zeitgeist, and never went back. The site never used to be like this. I think the political situation in the US radicalised the userbase of /pol/ to such an extent they just took over the entire site. It wasn’t always about antisemitism, white nationalism, and celebrating mass murder. /pol/‘s incessant spamming of every board drove most of the users who aren’t far right away to different platforms.

                                                                    1. 6

                                                                      /pol/‘s incessant spamming of every board drove most of the users who aren’t far right away to different platforms.

                                                                      I am reminded of a quote from Scott Alexander’s The Eternal Struggle:

                                                                      The moral of the story is: if you’re against witch-hunts, and you promise to found your own little utopian community where witch-hunts will never happen, your new society will end up consisting of approximately three principled civil libertarians and seven zillion witches. It will be a terrible place to live even if witch-hunts are genuinely wrong.

                                                                  1. 2

                                                                    I’ll be visiting Berlin until Tuesday (any general recommendations on what to see, besides the “standard stuff” would be nice) to meet up with relatives, and in what time is left I’ll have to be probability/statistics for an exam next Thursday.

                                                                    My university didn’t think it was necessary to inform us of when the exams will take place, until after we made our plans for this summer, and I’m kind of dealing with it now ^^

                                                                    1. 2

                                                                      If you’re into archaeology and history, you should visit the Neues Museum. In general, the Museum Island (Museumsinsel) is interesting, and has very fair prices for university students. Have a nice trip!

                                                                      1. 2

                                                                        Sounds interesting, will see if I’ll make it.

                                                                      2. 2

                                                                        Idk if the Turkish Market counts as the “standard stuff” but it’s worth checking out.

                                                                        1. 1

                                                                          No, didn’t know about this. I was thinking about Brandenburger Tor, Bundestag, … when I said “standard stuff”. No the best term, I know.

                                                                        2. 2
                                                                          1. 1

                                                                            Go visit a hacker space. C-base, raumfahrtagentur,… (there’s more. Ask the Internets)

                                                                            1. 2

                                                                              I regret not allocating time to see C-base. Is that considered a hacker space?

                                                                              1. 1

                                                                                It’s actually a space ship, but many people consider it a hacker space ;)

                                                                                1. 1

                                                                                  Ah, yes. I read it was a spaceship, too. I regret missing it even more now.

                                                                            2. 1

                                                                              I literally just got back from Berlin. Here are some of my recommendations:

                                                                              • Eat as much doner and currywurst as you can. I recommend Mustafa’s track stand for doner and Curry36, which is located near Mustafa’s.

                                                                              • Cold war bike tour with Fat Iron Tours. The tour is about four hours and the bike ride isn’t strenuous. Our tour guide was really knowledgeable, and we learned a lot about life in Berlin during the Cold War. This is much better than the Checkpoint Charlie museum, which is disorganized mess with walls-of-texts as exhibits. It’s still cool to visit the stop.

                                                                              • Hitler’s bunker and Jewish Memorial

                                                                              • The Turkish Market is cool but only happens on certain days.

                                                                              • Neues Museum to see the bust of Nefertiti. In the words of a famous critic: “Description is useless. See it.”

                                                                              • Pergamon Museum to see the Ishtar Gate

                                                                            1. 2

                                                                              I love emacs cals and use it a lot, but it does not seem to have programmers in mind. Maybe that can be fixed, though.

                                                                              I often have to paste hexadecimal numbers (often addresses) and perform some operations on them. First, to reliably do so, this requires me to go into algebraic mode (’) and paste the number into the modeline. Then, calc does not recognize the now ubiquitous 0x prefix, wanting me to replace it with its “16#…” prefix instead. Same with binary (0b…/2#…).

                                                                              Finally, I don’t remember the keyboard commands that I often need well (shift left/right, binary AND, OR, NOT…), but I guess I would get used to them if the previous problems were not happening.

                                                                              Instead, I now mostly just fire up the python repl, where I can paste the numbers prefixed with 0x into anywhere in the terminal, and directly type in stuff like “(0xf00f1234 >> 20) & 0xffffffffc”.

                                                                              1. 3

                                                                                If you turn on the C mode (calc-c-language, d C) you can enter hexadecimal numbers in the algebraic entry that start with 0x, btw. I guess that this could be patched so that entering 0x with calc-c-language turn on would real a hexadecimal number…

                                                                                1. 2

                                                                                  The existence of calc-c-language is a revelation already. I will revisit now that I know it exists, thanks.

                                                                              1. 2

                                                                                If RPN’s what you’re after, I’ve also used and quite liked qalculate in RPN mode, which has a nice GTK+ interface.

                                                                                1. 2

                                                                                  While it might not be the best, xcalc -rpn is also relatively nice (especially with the Debian Xresources).

                                                                                1. 5

                                                                                  It’s a wonderfully small editor which I use as my scratchpad and to keep a notes.txt open with a low memory footprint. (My only editor without vim keybindings, and I don’t like gvim either).

                                                                                  1. 2

                                                                                    I do the same thing, although I usually just use whatever text editor comes with the desktop environment I happen to have installed at the moment. This is a nice little editor, surprised I haven’t come across it before.

                                                                                    1. 4

                                                                                      I’ve also been looking at it for a while, but what surprises me is that it doesn’t seem to be distributed in many package managers, otherwise I might be using it more.

                                                                                  1. 8

                                                                                    The comment field there doesn’t permit editting and correcting typos…..

                                                                                    So let me try again here…

                                                                                    In a galaxy far far away….

                                                                                    Larry Wall wondered why he needed to learn 3 pretty bad languages, sh, awk, sed…., and devised perl as the Grand Unifying Language.

                                                                                    Perl sadly borrowed too much from it’s inspirations, and wasn’t much more readable.

                                                                                    Then Matz came along and resolved to borrow the best from perl and scheme and ….. and make something more powerful than them all, yet more readable.

                                                                                    It’s called Ruby.

                                                                                    And yes, you can do everything in Ruby, in one line if you must, that you can do in bash, awk, sed, jq, perl…. but in a more powerful and maintainable form.

                                                                                    All this has been available for decades, why are we (still) bashing (pun intended) our heads against the Lowest Common Denominator?

                                                                                    1. 8

                                                                                      serious question: what does “doing some awk in Ruby” look like? This might be a pretty big motivator for me to finally figure out Ruby for scripting (I’m more of a Python guy myself but awk works nicely for small scripts on line-oriented stuff when I want a one-liner)

                                                                                      1. 8

                                                                                        Compare:

                                                                                        # Official way of naming Go-related things:
                                                                                        $ grep -i ^go /usr/share/dict/* | cut -d: -f2 | sort -R | head -n1
                                                                                        goldfish
                                                                                        

                                                                                        Versus Ruby:

                                                                                        puts(Dir['/usr/share/dict/*-english'].map do |f|
                                                                                          File.open(f)
                                                                                            .readlines
                                                                                            .select { |l| l[0..1].downcase == 'go' }
                                                                                        end.flatten.sample.chomp)
                                                                                        

                                                                                        Simple example, but I think it demonstrates that doing various basic and common tasks are quite a bit more complex to do in Ruby than in the shell.

                                                                                        That doesn’t mean I’m always in favour of shell scripts – I got that example from an article I wrote saying you shouldn’t use shell scripts – but there are definitely reasons shell scripting persists, even though we have things like Perl and Ruby.

                                                                                        In that article I wrote “I regret writing most shell scripts [..] and my 2018 new year’s pledge will be to not write any more”. I’ve mostly failed at that new years’ pledge, and have happily continued shelling about. I have started rewritting shell script prototypes to other languages at the first sign of getting hairy though, and that seems like a middle ground that is working well for me (I should update/ammend that article).

                                                                                        1. 5

                                                                                          To be fair, it looks like most of the additional complexity in the Ruby code comes from reading files: the first command in the pipeline, grep -i ^re glob, is what becomes

                                                                                          Dir[glob].map do |f|
                                                                                            File.open(f)
                                                                                              .readlines
                                                                                              .select { |l| l[0..1].downcase == re }
                                                                                          end.flatten
                                                                                          

                                                                                          The rest of the script contributes very little to the Ruby code.

                                                                                          I suspect this is a recurring theme when trying to replace shell pipelines with programs. Only Perl avoids some of this additional complexity for reading files, I think.

                                                                                          1. 5
                                                                                            puts Dir['/usr/share/dict/*-english'].
                                                                                              flat_map { |f| File.readlines(f).grep(/^go/i) }.
                                                                                              sample
                                                                                            
                                                                                            1. 6

                                                                                              At least with Ruby I don’t have to constantly cross-reference the man page and my cargo-culted knowledge of Unix’s multitude text manipulation DSLs, all unlike. It’s pretty obvious what it’s doing.

                                                                                              1. 1

                                                                                                Actually you used very little shell there in your first example.

                                                                                                You also used grep, cut, sort and head.

                                                                                                Why do you assume the backtick operator and the | operator for io doesn’t exist in ruby? In fact why do people assume shell and jq do not exist if you use ruby?

                                                                                                Personally I tend to reduce the number of tools involved to reduce the cognitive load of needing to understand each tool to understand the one liner.

                                                                                                I balance that against considerations like going IO.read(”|sort -u fileName”) can be a huge performance boost

                                                                                                Anyhoo… some examples of ruby onliners

                                                                                                http://reference.jumpingmonkey.org/programming_languages/ruby/ruby-one-liners.html

                                                                                              2. 7

                                                                                                Because code in sed or awk that worked a decade ago (or, hell, two years) still works. Ruby code seems to bit rot faster than any other language I’ve use for nontrivial work.

                                                                                                Also, with awk, I could put it down for a year, then use it again, and everything I’d need to be productive fits in a small man page. (The same seems to be true of sed, though I don’t use it much.) The Ruby ecosystem moves a lot faster, and if you haven’t been following it closely, catching up will add extra work. (Whether it’s actually going anywhere is neither here nor there.)

                                                                                                Yes, awk is a more limited language, but that’s a trade-off – there are upsides, and I know which I’d prefer.

                                                                                                1. 1

                                                                                                  Not true.

                                                                                                  The awk scripts I wrote decades ago with in Solaris awk which is not quite the same thing as gnu awk.

                                                                                                  Well thought out growth in a language is good.

                                                                                                  I find the maintenance burden in ruby rolling forward with language versions is very low.

                                                                                                  Doubly so since rubocop will often autocorrect stuff.

                                                                                                2. 6

                                                                                                  I don’t know Ruby. But for me these are the reasons why I am writing more and more bash programs:

                                                                                                  • Bash is my command line. So I am doing a lot of small steps, file modifications, comparing, searching analysing. At some point I can see that some of the steps can be composed and I pull them out of the history, try them out on the console and at some point put them into a script. If Ruby would have a REPL in which I can do all the operations that I am doing on the command line with less typing and more comfort, I would maybe give it a try.

                                                                                                  • Bash is on every Linux box. Ruby is not.

                                                                                                  1. 4

                                                                                                    Ruby does have a REPL. It’s called IRB and it comes with every Ruby installation. I use it exactly as you describe, for composing small programs iteratively.

                                                                                                    1. 1

                                                                                                      Are you using the Ruby REPL as your daily all-time console or just when you have in mind to create a program? I am asking honestly because I do not know anything about Ruby or their REPL and I am quite interested how good this REPL is as a replacement for the daily life?

                                                                                                      My point is that shell scripts are a by-product of using the shell for doing manual tasks. And I get better and better at my shell usage, and even after 20 years of shell usage I am still discovering new features or ways to do something in a more efficient way. While the shell language is really ugly, but being very succinct plus the composition of unix commands, the history, the prompt customization, the possibility to have vi mode for editing (and I probably forgot a lot of features), all this makes using shell such an efficient tool.

                                                                                                      1. 2

                                                                                                        Well, no, not as my daily shell. I dislike shell scripting enough that I switch to Ruby pretty quickly if I’m having to spend any amount of time or effort on a task, but it’s not meant to be a replacement for bash/zsh/fish.

                                                                                                    2. 3

                                                                                                      Bash is on every Linux box. Ruby is not.

                                                                                                      Let’s not limit ourselves here. For those not using Bash and/or Linux, how about this:

                                                                                                      • Bourne-compatible $SHELL is on every Unix box. Ruby is not.
                                                                                                      1. 2

                                                                                                        Bash is on every Linux box. Ruby is not.

                                                                                                        So is ed.

                                                                                                        However sudo apt install ruby solves that problem.

                                                                                                        And yes, ruby does have a REPL.

                                                                                                        1. 2

                                                                                                          apt: command not found.

                                                                                                          sudo: permission denied

                                                                                                          $

                                                                                                          1. 2

                                                                                                            Have fun with ed then, it’s the Standard!

                                                                                                            https://www.gnu.org/fun/jokes/ed-msg.html

                                                                                                            1. 1

                                                                                                              I have written scripts in ed before to do some sufficiently tricky text manipulation. It’s a good tool.

                                                                                                      2. 5

                                                                                                        Mostly, because picking up enough jq, awk and sed to be useful is faster than learning the ins and outs of Ruby?

                                                                                                        I suppose you could make a similar argument about learning Ruby one-liners, but by the time I’m writing a very long bash script, I’m probably writing a larger program anyway, either in Go or Python. Ruby as a language doesn’t have much appeal to me, at least at the moment.

                                                                                                        Awk, at least, fits very nicely into a small space right next to regex. jq is a bit fiddilier to pick up, but very nice for basic stuff. Sed, I still don’t have down very well, but also is nicely regex adjacent.

                                                                                                        1. 3

                                                                                                          I regularly write sed one liners to do refactorings on my Ruby code. Usually the sed call is fed by the result of grep or find. I could write a Ruby one liner to do the same, but it would be a much longer line and escaping would be much more difficult. Ruby is simply not a replacement for the convenience of sed.

                                                                                                          And maintainability is a red herring here: the whole point of something like sed is that you use it for one-off commands.

                                                                                                          1. 2

                                                                                                            I’m not that experienced with jq, but when it comes to awk (and sed), one of their benefits is that you can easily write a program in the shell, since they act as glue between pipe operations.

                                                                                                            For example, to filter out all lines that have less than 4 characters, all you have to write is

                                                                                                            ... | awk 'length >= 5' | ...
                                                                                                            

                                                                                                            no imports or types required. It was made for stuff like this, which makes it easy to use. I’ve only read a book about Ruby a few years ago, but to process stdin/out this was should require a bit more overhead, shouldn’t it?

                                                                                                            1. 1

                                                                                                              One part of your history lesson is missing: Paul McCarthy and Steve Russell saw what was going to happen and pre-emptively invented Lisp. And yes, you can do everything in Lisp, in one line if you must, that you can do in bash, awk, sed, jq, perl… but in a more powerful and maintainable form.

                                                                                                              ;)

                                                                                                              1. 2

                                                                                                                s/Paul/John/

                                                                                                                This gotta be one of my most common brainarts…

                                                                                                                1. 2

                                                                                                                  It was Yoko’s fault.

                                                                                                                2. 1

                                                                                                                  Ruby equivalents of the basic awk and sed examples from the article, as examples of Ruby one-liner structure:

                                                                                                                  • AWK: awk '{print $1}' logs.txt
                                                                                                                    • Ruby: cat logs.txt | ruby -ne 'puts $_.split[0]'
                                                                                                                    • Ruby: cat logs.txt | ruby -ane 'puts $F[0]'
                                                                                                                  • sed: sed 's/^[^ ]*//' logs.txt |sed 's/"[^"]*"$//'
                                                                                                                    • Ruby: cat logs.txt | ruby -ne 'puts $_.gsub(/^[^ ]*/, "").gsub(/"[^"]*"$/, "")'
                                                                                                                1. 4

                                                                                                                  I’ve recently had fun being masochistic with writing idiomatic and boring C code, and finished a skeleton generator last week, and now I’ve moved on to sort of a Pelican clone, just smaller.

                                                                                                                  A more normal project I’ve been working on for the last few months is a web based video synchronising tool (like WatchTogher) named Ijod. I’ve been using it to watch movies and series with a few friends of mine, so I fix bugs as they come along.

                                                                                                                  And then there’s all my Emacs stuff, especially my literate confugration, that constitutes very enjoyable Yak shaving – just today I added a first usable version of a function that let’s me add header files from anywhere in a file

                                                                                                                  All in all, nothing too impressive – Oh, and all of this while I should be studying for tests, which make it just that bit more enjoyable.

                                                                                                                  1. 12

                                                                                                                    This conference is “virtual”, so it won’t influence your travel(/CO₂)-budget 👍

                                                                                                                    1. 2

                                                                                                                      Actually this disappointed me a bit, “real” presentations tend to easier to follow and conversations/questions are more natural too.

                                                                                                                      But I get the CO2 point. If I would have to fly to get there, I wouldn’t go, either way.

                                                                                                                      1. 3

                                                                                                                        Yeah, but putting together a physical conference is a lot of work¹, and the audience might be limited - so I tried to spin it as a positive thing :-)

                                                                                                                        ¹ It has been “real” before, though, unfortunately I wasn’t able to attend the one in London, and I don’t want to fly to the US.

                                                                                                                        1. 5

                                                                                                                          We need more of those. For a lot of people, any real world conference is completely out of reach.

                                                                                                                          1. 5

                                                                                                                            Both. We also need more local conferences, so that people who need to be close to people to be in touch don’t have to fly across the globe.

                                                                                                                            Seriously, I’d wish we’d go back from 1000-2000 people conferences to something like 100-150 where it is rather easy to find a room for in any city across the globe.

                                                                                                                            Also, there’s conference models that are easy to organise and literally can be set up in 2-3 days.

                                                                                                                            All that with experience, mind you, which is a good reason to not frustrate our community organisers and make sure they run another one after trying it out once.

                                                                                                                            1. 1

                                                                                                                              I’d like to hear about those models.

                                                                                                                              1. 4

                                                                                                                                This is kind of how we ran Fennel Conf: https://conf.fennel-lang.org/2019

                                                                                                                                It was very low-key with a small conference-room full of attendees in person and 4-6 folks who joined our Jitsi stream as we went.

                                                                                                                                1. 2

                                                                                                                                  Yeah, stuff like that. There’s tons of value in not overworking yourselves in running a large conf. I see a lot of good in raising the organisational quality of FOSS community conferences, but we need to constantly remind people that all this isn’t always necessary.

                                                                                                                                2. 4

                                                                                                                                  First off all: get an easy venue. For small conferences, a contact to a professor is at a university is nice, or a friendly company in town that has an event room of that size. Get no catering, just drinks. If you want to get catering, ask around the organiser scene in your location for a recommendation, pick that. Nothing mindblowing, just good food. You may want vegan, vegetarian and all the options: caterers are professionals, just ask for that.

                                                                                                                                  Volunteer organisers are well-connected and are very willing to give out help of that kind. They were all beginners once and want to keep others of that harm.

                                                                                                                                  Format: don’t do speakers management. That is the biggest time-sink. There’s models that don’t need it!

                                                                                                                                  • Unconferences: everyone brings their session suggestions, but the choice is at the location. Needs a location with multiple rooms.
                                                                                                                                  • Spontanous conferences: Kind of similar to the above, but you have just one room, people can suggest talks beforehands on a wiki or Github or so.

                                                                                                                                  You can take that to the extreme, e.g. lightning.io was a conference that only had lightning talks and every attendee needed to talk.

                                                                                                                                  The point is that you want strategies that organise on the day.

                                                                                                                                  Ticket sales: Stripe and ti.to are the low-friction option. Especially ti.to, it’s completely geared towards events like this. The biggest problem here is where the money goes. Setting up a company/non-profit/bank-account is easily the biggest part in this. Finding someone at your location to take you in their books is the best option. Again, get in touch with other organisers.

                                                                                                                                3. 1

                                                                                                                                  150?! I find 5 or 6 people to be great for a conference.

                                                                                                                                  1. 1

                                                                                                                                    I’d call that a small meeting?

                                                                                                                                    25 is definitely a feasible thing for a conference though. I don’t want to be judgemental there. I picked 100-150 because it is an easy number to reach for even fringe subjects even without advertising in places like Berlin.

                                                                                                                                    1. 1

                                                                                                                                      Conference is just a fancy word for “meeting” :)

                                                                                                                                      I personally get a lot more out of smaller group meetings. When it’s someone giving a talk to a larger audience, even 20 people, I have a harder time paying attention and I feel more shy about asking questions. Maybe that’s just me?

                                                                                                                                      Of course having more people in a room is more efficient for conveying information, provided they are paying attention and understanding what is said.

                                                                                                                                      1. 1

                                                                                                                                        Conference is just a fancy word for “meeting” :)

                                                                                                                                        Yes, and indeed, it is one of those words with a 1000 meanings. In the context we’re talking about, conferences are usually larger endeavours. If I say “I tend to run conferences”, no one assumes I do 20 person things.

                                                                                                                                        I personally get a lot more out of smaller group meetings. When it’s someone giving a talk to a larger audience, even 20 people, I have a harder time paying attention and I feel more shy about asking questions. Maybe that’s just me?

                                                                                                                                        Probably, but that’s fine. I’ve been running many events in different styles of all sizes and all have their advantages to certain people. That’s why I’m such a huge proponent to have more events. (Some people think that there should be less events, nowadays)

                                                                                                                                        E.g. the first larger event I ran (eurucamp) consciously reduced talk time for a very long lunch break (5 hours), where people could just hang around an chat around a Berlin lake in summer. It’s a common problem that organisers mistake “program” for “the useful time” for attendees. People loved it, and came back specifically for that, yet some wanted a more classic schedule at an easier reachable place and didn’t come next year.

                                                                                                                                        If rigorous learning of a subject is what you want, something over 6 people is probably indeed not the right thing. Conferences above 50 people mainly use the talks as inspirations for things to later chat about.