Potential client: You have 1 hour to implement this concurrent #golang program in any language you choose.
Me: uhmm ANY language?
PC: well we have to be able to understand it so no BrainF*ck, no obscure Perl, no AWK
Me: Ok what about shell?
PC: you mean bash?
Me: No I mean shell
PC: isnt’ that BASH?
Me: no.. shell is.. *sigh* that’s like asking me if I mean a DeLorean when I say I want a sports car. In this case “sports car” == “shell” and “DeLorean” == “bash”.
PC: ok so what ZSH?
Me: uhmm something like that but different
PC: sure
Me: for the channels stuff can I use named pipes?
PC: what?
Me: fifos?
PC: You mean writing to the file system? No!
Me: <<debates explaining how named pipes actually work and decides to go another route>>
Me: can I do this in Korn Shell?
PC: isn’t that the same thing?
Their code was a pretty straightforward fan out producer-consumer demo. About 30 minutes after reading theirs I had my solution. This is a much simplified version only demonstrating the key features of ksh I used: scm.notadiscussion.com/ksh93/artifact…
Me: Done
PC: you have an error on line....
Me: uhmm you can’t run it with ‘bash ....’ you need to just..
PC: that’s how you run bash scripts!
Me: 🤦♂️
Me: just do the ‘./‘ thing and the name of the file
PC: ok it works. But what about when we scale it up over 100 producers?
Me: should work just fine on a box with more than 2 cores
PC: This can’t be working...
**We stopped doubling the number of producers at 4096
Me: this is kinda trivial ksh93 stuff.
**We discuss the solution for 45 minutes in detail with the ksh93 man page open
PC: why would anyone learn how to do that in some obscure dialect of bash when theres go?
Me: do you know anything about the guy who created go? The team around him? What they did before and who they worked with?
PC: Who cares about that stuff?
Me: Thank you for your time. G‘Bye
• • •
Missing some Tweet in this thread? You can try to
force a refresh