1. 10

    Nice write up on the OpenStruct object in ruby!

    However, I have to do my due diligence here. For most (all?) cases, using OpenStruct is a terrible anti-pattern. Any OpenStruct object will respond to any method you call on it and if it doesn’t exist, returns nil. This causes uncertainty within the system and makes testing a nightmare.

    As I recommend to most people, you’re better off using a PORO (plain old ruby object)!

    1. 10

      And anima makes it very easy to avoid OpenStruct/Struct.

      1. 1

        Nice! TIL!

      2. 3

        Using OpenStruct can also kill your performance due to effects it has on the global method cache.

        1. 2

          I thought so too, until a friend corrected me: That was fixed several years ago and isn’t still the case.

        2. 2

          Thanks for sharing your precious experience with OpenStruct :-)

          Anyway, the goal of my articles is just to describe a notion as deeply as possible. I prefer to keep a neutral point-of-view because each notion that I describe can be useful in many cases.

          Implementing the notion in real use cases is just a matter of sensitivity for each developer.

          That’s why I’m glad that you share your opinion and your experience with the OpenStruct class here.

          1. 2

            I like reading about all the nooks and crannies about Ruby so your articles are very interesting to me! Thanks for sharing.

            1. 1

              Why do you want that neutral position? One of the things I really love in articles is seeing how people evaluate the benefits and risks of tools like OpenStruct. I get to understand when to use or not use something, learn general strategies useful for other tools. Let the documentation be non-judgemental description, I want experienced opinions. :)

              1. 1

                Actually my articles are made to demystify a misunderstood or opaque notion. By doing so, developers can take the decision to apply the notion or not by knowing all the aspects of it.

                Also, this enhances their general culture about the language.

                After, your point of view is also correct. Maybe, in a near future I’ll start to share my experience with the notions that I treat in my articles.

                Thanks for the feedback. It’s really appreciated :-)

          1. 3

            The send button on the conversation should be un-clickable, if a message has already been sent but has not received a response

            Wouldn’t this mean that if you never get a response, you can’t use the app anymore?

            1. 3

              Yes, but moreover, it does not make the client request idempotent. The definition given for idempotence is “the property of certain operations whereby they can be applied multiple times without changing the result beyond the initial application”. Making the button un-clickable doesn’t make it possible to apply the operation multiple times without changing the result; it prevents the operation from being applied more than once via the UI.

              To make chat message sending idempotent, one could add a unique id or sequence number to each message so that it’s possible to detect and drop the duplicate message.

              1. 2

                Good point. Even nowadays, the web still relies on the “refresh” button as well as system issues are still magically fixed on reboot :)

              1. 2

                As a man who had to wear boys’ pants (trousers) for much of his adult life, I feel the same way – for an equivalent waist size, boys’ pockets are usually smaller. I suspect the reason is because boys have shorter arms than men for a given waist size. If the pockets are too deep, then it’s awkward to retrieve small objects from the pockets. I wonder if something similar is true for ladies’ jeans.

                1. 10

                  One-line summary for the impatient: A BSD proponent defends systemd (at a BSD conference) and suggests that BSD can take ideas from it

                  Interesting talk.

                  1. 4

                    A comment about the actual video and not just a pro-/anti-systemd rant? Fantastic!

                  1. 12

                    The whole point of shell scripting is getting shit done and move on to focus on more important stuff.

                    Once the script takes the life of its own and try to grow up, just spend some time on this teenager and make it speak in a real adult language. Another option that is sometimes preferable would be keeping it young and little, while replacing its limbs with cybernetics made of the real grownup stuff.

                    1. 3

                      I would say the point of shell is composing other programs well, not hacking stuff poorly, that is what python/perl is for :)

                      That being said, I agree with you, shell has so much potential, but is so shitty for some unknown reason.

                      1. 3

                        For me the whole point of shell scripting is that if it breaks, I can easily decompose the program into parts, and execute each part independently.

                        For getting things done, I’d rather use any general-purpose dynamically-typed scripting language.

                      1. 3

                        The problem turns out to be some obscure FUSE mounts that the author had lying around in a broken state, which subsequently broke the kernel namespace system. Meanwhile, I have been running systemd on every computer I’ve owned in many years and have never had a problem with it.

                        Does this not seem a bit melodramatic?

                        1. 9

                          From the twitter thread:

                          Systemd does not of course log any sort of failure message when it gives up on setting up the DynamicUser private namespace; it just goes ahead and silently runs the service in the regular filesystem, even though it knows that is guaranteed to fail.

                          It sounds like the system had an opportunity to point out an anomaly that would guide the operator in the right direction, but instead decided to power through anyways.

                          1. 8

                            A lot like continuing to run in a degraded state is a plague that affects distributed systems. Everybody thinks it’s a good idea “some service is surely better than no service” until it happens to them.

                            1. 3

                              At $work we prefer degraded mode for critical systems. If they go down we make no money, while if they kind of sludge on we make less but still some money while we firefight whatever went wrong this time.

                              1. 8

                                My belief is that inevitably you could be making $100 per day, would notice if you made $0, but are instead making $10 and won’t notice this for six months. So be careful.

                                1. 4

                                  We have monitoring and alerting around how much money is coming in, that we compare with historical data and predictions. It’s actually a very reliable canary for when things go wrong, and for when they are right again, on the scale of seconds to a few days. But you are right that things getting a little suckier slowly over a long time would only show up as real growth not being in line with predictions.

                              2. 2

                                I tend to agree that hard failures are nicer in general (especially to make sure things work), but I’ve also been in scenarios where buggy logging code has caused an entire service to go down, which… well that sucked.

                                There is a justification for partial service functionality in some cases (especially when uptime is important), but like with many things I think that judgement calls in that are usually so wrong that I prefer hard failures in almost all cases.

                                1. 1

                                  Running distributed software on snowflake servers is the plague to point out.

                                  1. 1

                                    Everybody thinks it’s a good idea “some service is surely better than no service” until it happens to them.

                                    So if the server is over capacity, kill it and don’t serve anyone?

                                    Router can’t open and forward a port, so cut all traffic?

                                    I guess that sounds a little too hyperbolic.

                                    But there’s a continuum there. At $work, I’ve got a project that tries to keep going even if something is wrong. Honest, I’m not sure I like how all the errors are handled. But then again, the software is supposed to operate rather autonomously after initial configuration. Remote configuration is a part of the service; if something breaks, it’d be really nice if the remote access and logs and all were still reachable. And you certainly don’t want to give up over a problem that may turn out to be temporary or something that could be routed around… reliability is paramount.

                                    1. 2

                                      And you certainly don’t want to give up over a problem that may turn out to be temporary

                                      I think that’s close to the core of the problem. Temporary problems recur, worsen, etc. I’m not saying it’s always wrong to retry, but I think one should have some idea of why the root problem will disappear before retrying. Computers are pretty deterministic. Transient errors indicate incomplete understanding. But people think a try-catch in a loop is “defensive”. :(

                                2. 4

                                  So you never had legacy systems (or configurations) to support? I read Chris’ blog regularly, and he works at a university on a heterogeneous network (some Linux, some other Unix systems) that has been running Unix for a long time. I think he started working there before systemd was even created.

                                  1. 3

                                    Why do you say that the FUSE mounts were broken? As far as we can see they were just set up in a uncommon way https://twitter.com/thatcks/status/1027259924835954689

                                    1. 3

                                      It does look brittle that broken fuse mounts prevent the ntpd from running. IMO the most annoying part is the debugability of the issue.

                                      1. 2

                                        Yes, it seems melodramatic, even to my anti-systemd ears. It’s a documentation and error reporting problem, not a technical problem, IMO. Olivier Lacan gave a great talk last year about good errors and bad errors (https://olivierlacan.com/talks/human-errors/). I think it’s high time we start thinking about how to improve error reporting in software everywhere – and maybe one day human-centric error reporting will be as ubiquitous as unit testing is today.

                                        1. 2

                                          In my view (as the original post’s author) there are two problems in view. That systemd doesn’t report useful errors (or even notice errors) when it encounters internal failures is the lesser issue; the greater issue is that it’s guaranteed to fail to restart some services under certain circumstances due to internal implementation decisions. Fixing systemd to log good errors would not cause timesyncd to be restartable, which is the real goal. It would at least make the overall system more debuggable, though, especially if it provided enough detail.

                                          The optimistic take on ‘add a focus on error reporting’ is that considering how to report errors would also lead to a greater consideration of what errors can actually happen, how likely they are, and perhaps what can be done about them by the program itself. Thinking about errors makes you actively confront them, in much the same way that writing documentation about your program or system can confront you with its awkward bits and get you to do something about them.

                                      1. 1

                                        Interesting, but I was hoping the conclusion was going to be a bit deeper than what seems obvious to me – that the number of edges directed in must equal the number of edges directed out for each node in the graph. I’m also confused by the term “move”, which I associate with a move in checkers or chess. I’m not a mathematician so perhaps I lack an appreciation for rigor.

                                        1. 2

                                          6/20 and the only AWS service in the quiz I even knew existed was EC2 (but I got that question wrong).

                                          These icons take cubism to a whole new level.

                                          1. 2

                                            Interesting post. I never realized that vi was just a wrapper around ed/ex! I am surprised there’s no mention of sed, the next in line after qed and ed in the genealogy of the non-interactive editing tools.

                                            Regarding the editor wars, I recall a mini-war back in the day between elvis, nvi, and vim. Some linux distros used elvis as their default for what gets invoked when a user typed “vi”; others used nvi, and others used vim. I don’t remember which vi clones went with which distributions, but I do remember getting flamed in the #vi channel for not knowing the difference between vi, elvis, and vim. The end result was I decided all those guys are nutty and switched to joe (which was familiar due to my Turbo C background). I am now a hardcore vim user, but still yearn for an editor with a function key template, to satisfy my inner WordPerfect-raised child.

                                            1. 3

                                              std::enable_if does kinda suck. But isn’t that why constexpr if was added to C++17? It’s both more elegant and takes less mental energy to grok.

                                              1. 4

                                                I LOVE YOU.

                                                1. 3

                                                  The question wrestled with here is whether the source code was directly copied from CP/M to create QDOS. This isn’t the only relevant question; also relevant is whether QDOS copied the API.

                                                  Starting with commands, we have:

                                                  CP/M   86-DOS  Meaning
                                                  ------------------------------------
                                                  ERA    DEL    Delete a file
                                                  DIR    DIR    List files on disk
                                                  REN    REN    Rename a file
                                                  SAVE   ?      Save a file to disk
                                                  TYPE   TYPE   Print the contents of a file to the console
                                                  

                                                  What about system calls?

                                                  #   CP/M                   86-DOS
                                                  ----------------------------------------------
                                                  0   System Reset           Program Terminate
                                                  1   Console Input          Console Input
                                                  2   Console Output         Console Output
                                                  3   Reader Input           Auxiliary Input
                                                  4   Punch Output           Auxiliary Output
                                                  5   List Output            Printer Output
                                                  6   Direct Console I/O     Direct Console I/O
                                                  7   Get I/O Byte           ?
                                                  8   Set I/O Byte           ?
                                                  9   Print String           Output String
                                                  10   Read Console Buffer   Input String
                                                  11   Get Console Status    Check Console Status
                                                  12   Return Version Number ?
                                                  13   Reset Disk System     Disk System Reset
                                                  14   Select Disk           Select Default Drive
                                                  15   Open File             Open File
                                                  16   Close File            Close File
                                                  17   Search for First      Search for First
                                                  18   Search for Next       Search for Next
                                                  19   Delete File           Delete File
                                                  20   Read Sequential       Sequential Read
                                                  21   Write Sequential      Sequential Write
                                                  22   Make File             Create File
                                                  23   Rename File           Rename File
                                                  24   Return Login Vector   ?
                                                  25   Return Current Disk   Get Default Drive
                                                  26   Set DMA Address       Set Disk I/O Address
                                                  27   Get Addr (Alloc)      Allocation Address
                                                  28   Write Protect Disk    ?
                                                  29   Get Read/Only Vector  ?
                                                  30   Set File Attributes   ?
                                                  31   Get Addr (Disk Parms) Parameter Address
                                                  32   Set/Get User Code     ?
                                                  33   Read Random           Random Read
                                                  34   Write Random          Random Write
                                                  35   Compute File Size     Get File Size
                                                  36   Set Random Rector     Get File Address
                                                  

                                                  Of these, the only one that’s really different is the last one (#36). The others are the same, as I understand, to facilitate porting code from CP/M to 86-DOS. Sounds a lot like the Oracle/Google debate/lawsuit to me.

                                                  There are more similarities, too, beyond just the API. Both systems have a jump vector to make it easy to port to new hardware:

                                                  CP/M              86-DOS
                                                  ---------------------------------------
                                                  4A00  JMP BOOT    0400  JMP INIT
                                                  4A03  JMP WBOOT   0403  JMP STATUS
                                                  4A06  JMP CONST   0406  JMP CONIN
                                                  4A09  JMP CONIN   0409  JMP CONOUT
                                                  4A0C  JMP CONOUT  040C  JMP PRINT
                                                  4A0F  JMP LIST    040F JMP AUXIN
                                                  4A12  JMP PUNCH   0412 JMP AUXOUT
                                                  4A15  JMP READER  0415 JMP READ
                                                  4A18  JMP HOME    0418  JMP WRITE
                                                  4A1B  JMP SELDISK 041B  JMP FLUSH
                                                  4A1E  JMP SETTRK  x
                                                  4A21  JMP SETSEC  x
                                                  4A24  JMP SETDMA  x
                                                  4A27  JMP READ    x
                                                  4A2A  JMP WRITE   x
                                                  4A2D  JMP LISTST  x
                                                  4A30  JMP SECTRAN x
                                                  

                                                  So 86-DOS skips some entries like WBOOT, but for the most part, these entries line up.

                                                  Any how about the boot loaders? They look superficially different, but I think there are some interesting similarities.

                                                  CP/M                                    86-DOS
                                                  ---------------------------------------------------------------------------------------
                                                  cold:
                                                    lxi b,2 ; b=0, c=sector 2             MOV DI,LOAD  
                                                    mvi d,sects                           MOV DX,SECTOR               
                                                    lxi h,ccp                             MOV BL,2                    
                                                  
                                                  lsect:                                  SECT:
                                                    ; load the next sector                  MOV AL,0D0H ; Force interrupt command
                                                                                            OUT DISK    ; To force Type I status
                                                    ;    insert inline code at this         AAM                       
                                                    ;    point to read 128 byte sector      CMP BL,MAXSECT+1 
                                                    ;    from the track given in            JNZ NOSTEP   
                                                    ;    register b, sector given in        MOV AL,58H ; Step in with update
                                                    ;    register c, into the address       CALL DCOM
                                                    ;    given by <hl>                      MOV BL,1
                                                    ;                                     NOSTEP:
                                                    ; branch to location "cold" if a        MOV AL,BL
                                                    ; read error occurs                     OUTB DISK+2  
                                                                                            inb disk ; Get head load status
                                                                                            NOT AL
                                                                                            AND AL,20H   
                                                                                            JZ OUTCOM
                                                                                            MOV AL,4
                                                                                          OUTCOM:
                                                                                            OR AL,READCOM
                                                                                            OUTB DISK
                                                                                            MOV CX,128   
                                                                                            PUSH DI
                                                                                          READ:
                                                    ; ************************              INB DISK+4   
                                                    ; * user supplied read                  TEST AL,DONEBIT
                                                    ; * operation goes here...              JNZ DONE
                                                    ; ************************              INB DISK+3   
                                                                                            STOB
                                                                                            LOOP READ
                                                    dcr d ; sects=sects-1                 DONE:                       
                                                                                            POP DI
                                                    jz boot ; head for the bios             CALL GETSTAT 
                                                      ; more sectors to load                
                                                      ; we aren't using a stack,
                                                      ; so use <sp> as as scratch
                                                      ; register to hold the load        
                                                      ; address segment                     
                                                    lxi sp,128 ; 128 bytes per sector       
                                                    dad sp ; <hl> = <hl> + 128              
                                                    incr c ; sector = sector + 1                                      
                                                    cpi 27 ; last sector of track?         AND AL,9CH
                                                    jc lsect ; no, go read another         JNZ SECT
                                                      ; end of track, increment to         ADD DI,128
                                                      ; next track
                                                    mvi c,1 ; sector = 1                                              
                                                    inr b ; track = track + 1              INC BL
                                                                                           DEC DX
                                                    jmp lsect ; for another group          JNZ SECT           
                                                                                           JMP 0,SEG
                                                                                         DCOM:
                                                                                           OUT DISK
                                                                                           AAM
                                                  

                                                  Sources:

                                                  1. 11

                                                    “We need a more complex build system” seems to be a pretty common trap. “We had our reasons” is always offered, but some years later there’s always a monumental undertaking to replace it. There’s a few projects I’m thinking of where building resembles an iterative process of building tools to build to tools to generate python scripts that create make files that build tools… “But that was the only way to create a debug build for windows!”

                                                    You think you have a problem nobody else has? You open this door, you’re really going to have problems nobody else has.

                                                    1. 3

                                                      I saw several times this pattern and as a junior, I’ve often blamed my naiveness in favor of trusting more experienced people. Although, it still feels like “we’re doing something very complicated to do something that should be simple”. At the end I’m always told that this is because it’s more flexible and will adapt better if the packaging needs shift. Which I find odd, since it’s making the whole company slower everyday for a “future” need that nobody knows what it will be.

                                                      So exacly like you said, it seems a good idea at first but finally everybody has problem with this…

                                                      1. 2

                                                        I have no data to support this theory, but I feel like this mostly happens because people don’t want to learn cmake (or don’t know that they should).

                                                        1. 1

                                                          Yes, people should learn cmake, if only to learn how awfully limiting it is.

                                                          1. 1

                                                            And you would suggest?

                                                            1. 1

                                                              For real-world use it depends on the use case; after all these years, there is unfortunately still no one-size-fits-all C/C++ build system. For personal projects I usually use GNU make (non-recursive).

                                                              I keep hoping that something like tup (but a little less minimalist) will take the stage one day, but it hasn’t happened yet.

                                                        2. 1

                                                          You think you have a problem nobody else has? You open this door, you’re really going to have problems nobody else has.

                                                          On the other hand, if you never face problems that nobody else had before, you are not doing anything new.

                                                        1. 4

                                                          Having PRIMARY and CLIPBOARD is a good thing and once you get used to it, it’s like having two clipboards.

                                                          Shame he never tells how to actually use them both. Afaict only the primary selection is usable with the default binds.

                                                          XTerm.VT100.translations: #override \n\
                                                                  Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
                                                                  Ctrl Shift <Key>V: insert-selection(CLIPBOARD)
                                                          

                                                          Now if only I could get all the other software to support them both as well.

                                                          EDIT: Another tip. If you find the font sizes available in the menu to be ridiculous, they’re pretty easy to change.

                                                          XTerm*faceSize1: 8
                                                          XTerm*faceSize2: 10
                                                          XTerm*faceSize3: 13
                                                          XTerm*faceSize4: 16
                                                          XTerm*faceSize5: 20
                                                          XTerm*faceSize6: 26
                                                          

                                                          faceSize1 corresponds to “Unreadable.”

                                                          Now would someone give me key binds to decrease/increase font size? :-)

                                                          1. 6

                                                            You might want to read X Selections, Cut Buffers, and Kill Rings for how to use the PRIMARY and CLIPBOARD selections in X Windows.

                                                            1. 1

                                                              It doesn’t, and can’t really explain how to use them because there is no way to use them in X. Instead, you have to use them in applications running under X and each application does its own thing. I still don’t know if there’s a way to copy to clipboard in xterm without creating a custom bind.

                                                              1. 0

                                                                Does it also work with X?

                                                                1. 1

                                                                  If by “X” you mean “the graphical interface that runs on Linux” then yes, it works, because that is X Windows.

                                                                  1. -1

                                                                    Eh, the developers would disagree, but what do they know?

                                                                    1. 1

                                                                      Where did this X Windows meme even start?

                                                                      Some lamer back in 1995 thinking it sounded cool and having it go viral on Usenet?

                                                                      1. 2

                                                                        Where did this X Windows meme even start?

                                                                        I don’t know. Probably people who think it’s the X-TREME version of Microsoft Windows.

                                                                        1. 1

                                                                          It’s mentioned in The Unix-Haters Handbook as a reliable tool for getting Unix weenies angry.

                                                                          1. 1

                                                                            I’m pretty sure “X Windows” is much older than that (as is MS Windows). I vaguely recall reading about “X Windows” in Byte magazine in 1993 or so.

                                                                            The comp.windows.x newsgroup goes back to at least 1987 (https://groups.google.com/forum/message/raw?msg=comp.windows.x/TtNRIfTKqsw/i7hzWBiDfkgJ), a month after X11 was created. They even refer to it as “x-windows”.

                                                                            1. 1

                                                                              Could it have been a different implementation? Cuz I remember doing the RTFM thing way back when, and it was very clear about not being “X Windows”, though didn’t specify why.

                                                                              Sorry if this is explained in the link. Can’t be arsed with Google. Usenet used to come without opt-in spying.

                                                                          2. 1

                                                                            Well, excuse me for using outdated terminology then. Would if have been better had I said “You might want to read X Selections, Cut Buffer, and Kill Rings for how to use the PRIMARY and CLIPBOARD selections in X”?

                                                                            1. 1

                                                                              Not outdated, just incorrect.

                                                                    2. 3

                                                                      Now would someone give me key binds to decrease/increase font size? :-)

                                                                      i have the following

                                                                      *VT100*translations: #override \
                                                                          Meta <Key> minus: smaller-vt-font() \n\
                                                                          Meta <Key> plus: larger-vt-font() \n\
                                                                          Super <Key> minus: smaller-vt-font() \n\
                                                                          Super <Key> plus: larger-vt-font() \n\
                                                                      

                                                                      and either meta/super keys work as expected.

                                                                    1. 13

                                                                      The argument against succinctness seems odd to me. Yes, regular expressions (the example given) are notoriously succinct, but is

                                                                      a(b{3,10}|c*)d
                                                                      

                                                                      really harder to read than

                                                                      ("a" (or (repeat "b" 3 10) (any "c") "d")
                                                                      

                                                                      or some other notation? The verbose one might be easier to read for someone unfamiliar with regex notation, but once you’ve learned regexes, it becomes a lot easier to see “the whole picture” with a succinct notation (IMHO).

                                                                      It’s like saying we should write arithmetic like (to use an example that totally isn’t a real programming language ahem):

                                                                      ADD 1 TO X GIVING Y
                                                                      

                                                                      instead of

                                                                      Y = 1 + X
                                                                      

                                                                      Mathematical notation is notoriously succinct, and it has succeeded because it makes communicating mathematics much easier (yes, I’m intentionally echoing “Notation as a Tool of Thought” here). Standard mathematical notation is the world’s most common DSL and is so common as to be ubiquitous. It is also notoriously succinct.

                                                                      Many of the arguments in TFA against regex notation seem to be at least partially answered by extended regex notation, which allows whitespace. To whit:

                                                                      a
                                                                      (
                                                                        b{3,10}
                                                                      |
                                                                        c*
                                                                      )
                                                                      d
                                                                      

                                                                      is just as if not more readable as the s-expr above (again IMHO) and still lets me see the trees and the forest.

                                                                      I suppose the argument comes down to ease-of-use for beginners versus ease-of-use for experienced users. Experienced users want brevity and conciseness and beginners what code that is self-explanatory.

                                                                      1. 4

                                                                        I think that there should be tools for converting from a dsl to the unsugared powerful syntax. As much as I love regexes, not everyone knows them and there are lots of subleties, complexities, and variations (is that perl, vim, shell?).

                                                                        1. 1

                                                                          The tricky parts of regex don’t go away with verbalising the operators.

                                                                          For example: is the statement above evaluated in a greedy or non-greedy fashion?

                                                                        2. 2

                                                                          The problem with regular expressions isn’t so much that they are overly succinct but that the sub-expressions typically go unnamed. E.g. we might have a regular expression for IPv4 addresses (from https://stackoverflow.com/a/5284410):

                                                                          re = /\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}\b/
                                                                          

                                                                          but this would be much easier to read if we wrote:

                                                                          octet = /25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?/
                                                                          re = /\b(#{octet}).(#{octet}).(#{octet})\.(#{octet})\b/
                                                                          

                                                                          and as a side benefit it does stricter validation and correctly captures all 4 octets.

                                                                          The most important facility any language can provide IMO is the ability to give names to constructs we create.

                                                                          1. 1

                                                                            Excellent point. Giving names and recursive ability to regexes gets you Parsing Expression Grammars, though there’s no standardized notation for them.

                                                                            1. 1

                                                                              Once you can name subexpressions you have the question of recursion. If you support recursion this is essentially PEG. That’s why I call PEG “regex++”.

                                                                          1. 8

                                                                            a.out binaries are smaller than elf binaries, so let’s statically link everything into one big executable ala busybox.

                                                                            Similarly, a modular kernel with all its modules takes up more total space than a single kernel with everything built in. So don’t even bother implementing modules. Linux 1.2 was the last great Linux before they ruined everything with modules.

                                                                            64-bit code takes up more space than 32-bit, so let’s build for 32-bit instruction sets. Who has more than 4GB of addressable memory anyway?

                                                                            Optimized code usually takes up more space, often a lot more when inlining is enabled. Let’s build everything with -Os so we can fit more binaries on our floppies.

                                                                            Icons are really superfluous anyway, but maybe we’ll want X11R5 or some other GUI on a second floppy. (I’d say X11R6 but all those extensions take up too much space). Make sure to use an 8-bit storage format with a common palette – 24-bit or 32-bit formats are wasteful.

                                                                            (I lament the bloated nature of the modern OS as much as the next Oregon Trail Generation hacker, but really – is “fits on a 1.7MB floppy really the right metric? Surely we can at least afford to buy 2.88MB drives now?)

                                                                            1. 5

                                                                              64-bit code takes up more space than 32-bit, so let’s build for 32-bit instruction sets. Who has more than 4GB of addressable memory anyway?

                                                                              Most programs don’t need more than 4GB of addressable memory, and those that do, know it. Knuth flamed about this some, but while you can use X32 to get the big registers and little memory, it’s not very popular because people don’t care much about making fast things.

                                                                              I lament the bloated nature of the modern OS as much as the next Oregon Trail Generation hacker, but really – is “fits on a 1.7MB floppy really the right metric? Surely we can at least afford to buy 2.88MB drives now?

                                                                              No, but smaller is better. If you can fit inside L1, you’ll find around 1000x speed increase simply because you’re not waiting for memory (or with clever programming: you can stream it).

                                                                              There was a time when people did gui workstations in 128kb. How fast would that be today?

                                                                              1. 2

                                                                                Most programs don’t need more than 4GB of addressable memory, and those that do, know it.

                                                                                All the integer overflows with values under 64-bits suggests otherwise. I know most programmers aren’t doing checks on every operation either. I prefer 64-bit partly to cut down on them. Ideally, I’d have an automated tool to convert programs to use it by default where performance or whatever allowed.

                                                                                “No, but smaller is better. If you can fit inside L1, you’ll find around 1000x speed increase simply because you’re not waiting for memory”

                                                                                Dave Long and I agreed on 32-64KB in a bootstrapping discussion for that very reason. Making that the maximum on apps kept them in the fastest cache even on lots of older hardware. Another was targeting initial loaders to tiny, cheap ROM (esp to save space for updates). Those were only memory metrics we could find that really mattered in general case. The rest were highly situation-specific.

                                                                                1. 1

                                                                                  Most programs don’t need more than 4GB of addressable memory, and those that do, know it.

                                                                                  All the integer overflows with values under 64-bits suggests otherwise.

                                                                                  How?

                                                                                  I know most programmers aren’t doing checks on every operation either. I prefer 64-bit partly to cut down on them. Ideally, I’d have an automated tool to convert programs to use it by default where performance or whatever allowed.

                                                                                  What does that mean?

                                                                                  1. 0

                                                                                    My point isn’t about the addressable memory: it’s about even being able to represent a number. Programs are usually designed with assumption that the arithmetic they do will work like real-world arithmetic on integers. In machine arithmetic, incrementing a number past a certain value will lead to an overflow. That can cause apps to misbehave. Another variation is a number coming from storage with many bits goes to one with fewer bits which caller didn’t know had fewer bits. That caused the Ariane 5 explosion.

                                                                                    Overflows happen more often with 8-16-bit fields since their range is so small. They can happen to 32-bit values in long running systems or those with math pushing numbers up fast. They either won’t happen or will take a lot longer with 64-bit values. I doubt most programmers are looking for overflows throughout their 32-bit applications. So, I’d rather just default on 64-bit for a bit of extra, safety margin. That’s all I was saying.

                                                                              2. 1

                                                                                Linux 1.2 was the last great Linux before they ruined everything with modules.

                                                                                https://twitter.com/1990sLinuxUser :P

                                                                                1. 2

                                                                                  Why has systemd deprecated support for /usr on a different filesystem!!

                                                                                  That issue bit me last month! I moved my /usr because it was too large, and the damned system couldn’t even boot into an init=/bin/sh shell! It dropped me into an initrd shell. I had to boot off a live CD to fix it. (If the initrd shell should have been sufficient, pardon me. I tried, but lvm wasn’t working.)

                                                                              1. 2

                                                                                Is there any room for innovation in sound-reduction here? I’ve always imagine something like double-glazed glass panels rising up from the backs of desks, maybe all the way to the roof. With a good vacuum between the glass I thought maybe you’d cut down on some noise, especially if the sound travels through multiple of these screens. Certainly the windows in my house cut down the outside noise a bit. And you’d still let light through, which would make them less grim than gray panels.

                                                                                1. 2

                                                                                  Good acoustic design is a must in an open floor plan. If the room echoes, conversation volume gets amplified. Decorative acoustic foam is inexpensive and can be hung on the walls and ceiling to reduce echo. Dividers can be used in a large room to give separation to conversations and absorb some sound.

                                                                                  Glass is not what you want, because it will echo; if you have cubicle-shaped glass dividers, you’ll end up with an amphitheater effect. Glass would also separate people physically, but would still allow for visual distractions. Ideally we want to maximize collaboration opportunity and minimize distractions.

                                                                                  A good break room is also important, otherwise break time will happen at desks.

                                                                                  1. 3

                                                                                    They will pry the carpet in our open space office from my cold, dead hands. We are the last place with it and we are not going to give it up. It softens the noise so much!

                                                                                    1. 2

                                                                                      Ahh, good point about the glass reflecting sound - I suppose a lot of the sound blocking I experience in my house could be due to the window reflecting outside noise back, not the double-glazing.

                                                                                  1. 20

                                                                                    The yet-another open-plan office blog post is a terrible, horrible, no good, very bad idea.

                                                                                    1. 20

                                                                                      And it should be repeated over and over until pointy-haired management stops with the open plan office abuse, and people start demanding reasonable working conditions en masse.

                                                                                      1. 6

                                                                                        Things won’t change until a very successful company or startup says their success was because of their not-open office plans. PHBs follow what the big, successful companies do.

                                                                                        1. 4

                                                                                          We already have that. Microsoft always gave their employees offices. And they are somewhat successful. Yet no other company ever followed their lead. Go figure.

                                                                                        2. 3

                                                                                          TBH if I had to tackle one of the management issues today, I’d choose overtime instead of open offices…

                                                                                        3. 1

                                                                                          Yeah, is anyone ever arguing for those things? I don’t mind the one at my office, but we’re also a very small office with an average of six employees in it. I might like it better if we were even more isolated, but except for my coworkers’ typing, I hardly ever hear anything at all.

                                                                                          1. 2

                                                                                            It’s not really a big problem until you’re surrounded by people who work on unrelated stuff who like to have loud conversations.

                                                                                            1. 2

                                                                                              Yes, this is exactly the problem – not the open floor plan itself, but an open floor plan with lack of strategic desk placement.

                                                                                        1. 2

                                                                                          After years of sitting in an office by myself, I’ve come to prefer an open floor plan. I find ten floor mates preferable to the loneliness of an office, and less distracting than one or two office mates.

                                                                                          1. 2

                                                                                            I like this comment: “By the way, every few years a new Management Philosophy is announced and the previous Management Philosophy is denounced. Matrix Management seems to have been a product of the Industrial Revolution. It was superseded in the 1970s by Management By Objectives, which was superseded in the 1980s by Theory Z. I don’t know what the latest Management Theory is called. In any event, Matrix Management has been rather thoroughly discredited. I do know that it doesn’t work very well.”