1002 points · by tambourine_man · 3y ago · 257 comments
So many packages make these kinds of assumptions. I tend to find that in those situations, the likelihood of some other salient bit of information gets left out as well. Also bonus for not being an npm install type of something.
Please, at the very least, put a full-fat example or a link to it at the bottom of the page. Something.
They are relatively easily converted between formats (ie: deb/rpm)... once any is made. Personally, I appreciate that this is generally available in distributions.
This is the entire purpose behind Linux distributions. Package up and distribute the software.
I don't begrudge anyone plugging away at development, but using the source as the distribution model drives me mad.
It would be nice if the author states explicitely what the dependencies are so you don't have to spend hours installing the libraries. Yep I get it
Must have missed this.
THIS! I was a little disheartened when I saw I had to build it, but the repo is tiny, and the build is a second. This should be the norm, not a pleasant surprise!
I 100% agree with the frustration. Anything that involves make as described by a repo such is this is not something I want in any of our processes. It's going to fail.
But this is really a toy and not meant to be taken seriously.
The very first part of the 'Download and Install' section says to check the distribution package manager so that building isn't necessary
These users are better served not even knowing about builds. In this spirit, the bit saying 'if you aren't absolute latest, adopt the build from source pain' should be removed.
Toys like this don't demand the latest and greatest. Save the [complete] build instructions, including the libraries (ideally their package names), for developers/contributors
It's a good term, everybody should use it, it's even a little useful for getting the intuition behind the attack (a lot of cryptanalytic attacks work by finding creative ways to isolate a single byte of ciphertext instead of having to work against the entire 128 or 2048 bit message).
I really do love this movie, it's really well done all around.
No:
* Setting up an isolated build env
* Pulling 1600 dependencies and building them from source
* installing a filesystem layer with 1600 .so libraries
* running docker, npm, etc?
_AND_ it compiles in a fraction of a second?
Amazing what this new language C can do.
No. You need make and a C toolchain installed.
If you have those installed, you almost certainly also have Python, Perl, and possibly even a reasonably recent Java (not on MacOS, yes on most Linux distros, i think) installed, and all of those are also capable of doing this with zero dependencies.
I've seen embedded C code that requires Python AND Ruby to build.
Linux is still using makefiles (+ config). Your project cannot possibly be more complicated
Like, a ton of our ops-scripting, things have 2-3 direct dependencies and maybe 10 transitive dependencies. And the latter is an actual flask application with pydantic, so a bit outside of "scripting". We've settled on a set of these versions, put them into a venv on a system and that's it. Update every few weeks, get accustomed to the libraries. Nice and stable base to work with.
And then we have some of our python-based ML teams. I'm not joking, but I have entire classes of servers which - including their dataset - are smaller in storage footprint than some of their python containers including tensorflow and models and panda and all manner of things. Feel free to accuse me of comparing apples and oranges, but that feels very, very strange.
Of course they did. But they made it sound like the language is the deciding factor, and that's not true.
C can have horrific-to-install dependencies, even worse than you see with binary python packages.
The upside of that copy-and-paste coding is that you don't have dependencies. But I'd hardly call it a virtue.
12 year old me would choke seeing NPM, pip, or bundle these days... or Electron!
We could do so much with so little!
He did not make it past me.
Not that we don’t care about those things, but we have better uses for our time and money than implementing an in-house version of React. Also, our other engineers would probably have strangled him.
Using stdlib is almost free on most systems. It is usually preloaded so it doesn't even use up ram. Unlike functions you write yourself. And with static linking, linkers will only take the functions you actually use, not the whole library.
A js library needs to be downloaded and compiled in its entirety by the user browser. There are techniques to make it less bad, none of them ideal.
The way I interpret GP post is that 12 year old didn't want to bloat his code but had a misguided idea of what causes bloat. You are saying that bloat is fine if it saves on dev costs. Two very different ideas.
Please give me a little credit! It wasn't that I'm against writing code in-house. That's my favorite part of my job! But someone insisting that they want to write everything themselves is a huge red flag. I mentioned React to give it a contemporary context. The interview was a few years ago, and they were ranting against the bloat in jQuery.
That also wasn't the only reason I said no, and I won't go into detail about the rest.
Yeah sure, that's what must be broken. Not my code.
A while later I got smarter, and progressed enough to hook into DOS interrupt handlers with my C code and some assembly glue code. I decided to make a program that would click the PC speaker every time the hard drive is accessed (not a new idea, but a good exercise), by hooking into INT 13h (in DOS/x86 in general, sw interrupts were basically used as system calls).
To my delight, it worked, and it suddenly seemed like I had a very loud hard drive. But DOS would also spit out strange I/O errors when trying to list the current directory.
Huh, weird, I wonder if the same happens in the root directory? So, "cd \", followed by "dir", and, yep, I/O error.
Okay, let's reboot and... doesn't boot?
It dawned on me pretty much immediately what must have happened: I didn't restore all registers correctly before calling the old hard drive sw interrupt handler (again, system call in modern parlance). It must have been unlucky enough to convert some reads into writes. And by trying the same thing on the root directory, I probably converted some reads to the sectors making up that root directory into destructive writes... oops.
I mean, fundamentally, you weren't completely wrong.
$ gcc foo.c; cp a.out ~/bin/foo
$ foo
Now that is a REALLY good build experience. $ go run main.goThis one needs some unspecified versions of gcc, make, and ncurses installed.
Actually, C is worse: it could all be any compiler/version, make version, or ncurses lib version - nothing is fixed, not even documented. At least in other language there is some standard way of pinning dependencies.
That's not what happened for me, and it seems to be a very odd way of presenting a very different message.
Turns out the minimal dependencies needed involve several OS packages and also the special "dev" versions of those packages installed, and I need to use one of the right subset of terminals.
Having the implicit knowledge to get the "magic", doesn't have anything to do with minimizing dependencies. Sounds like the real thing being said is: "It's neat when people use a toolchain and environment I'm familiar with". I don't think that extrapolates to "minimal dependencies are what we want".
We build on the shoulders of giants. We pull in other peoples code because we don't want to duplicate work, ours is likely not to be as good, any code is a liability, and sometimes _we just aint got time for that._
They don't think on the big picture the efficiency on the resulting binary size and build time (implied by the number of dependencies).
Another thing that is ignored is the external dependency that the user would need to run the program (whether none with a native compiled binaries or a whole runtime environment to run your python program)
Python used to be fantastic. It actually used to just work. That stopped once everyone caught on to the language, Nvidia got involved, and tensorflow / pytorch /ML ruined everything with so many script kiddies writing nonsense that had no interest in making their packages compatible with anything. The community is the best, but also very very much the worst part of the language.
C is not special in this regard. Special part is an OS itself that takes the role of a single system-wide virtualenv or node_modules/.. with all common trouble packaged in.
Python and others didn’t create this trouble, they ejected it from your system into a single rm-able folder.
This project built fine, though.
Python is actually smaller, 82MB and 1461 files, and has a much better stdlib.
If you never wrote zero-dependency python scripts, give it a try! It's a very nice experience: download file / clone repo, run a file and that's it. Not even a build step.
I wonder how minimal a giant web app written in C would be? Would it still compile in a fraction of a second?
And probably also contain a bunch of RCE vulnerabilities.
Took me hours to get Audacity building on Windows. Actually, I might have given up and installed Linux instead, and built it there. That's usually way easier!
But the other day I built an old MP3 encoder (BladeEnc) in a split second. It brought a tear to my eye. That's with Visual Studio 6. Which somehow builds an entire project before the new VS even begins compiling!
git clone https://github.com/bartobri/no-more-secrets.git
cd no-more-secrets
make
./bin/nms
It worked!
One well-maintained C project in isolation. I've also seen nightmares that are difficult to build on certain platforms or require undocumented build dependencies. Let's not forget how horrible the automake/Cmake/Scons/etc. ecosystem can be.
Everything is awful when there's no attention to the dev experience.
> make: The term 'make' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Everything else is weirdo legacy crap.
/s
I'll note that this project does come with an `uninstall` Makefile target, but not a lot of projects do/did.
An effect that I could write in high school using Pascal and that would require only builtin library and few loops, in proposed source code requires so much *stuff*. Given that this is a fun demo and not something that one needs to maintain as enterprise software, I totally would accept such trade off and remove dust of something simpler.
Oh, memories.
Using Crt;
GotoXY();To be fair it's a very old language, but what's crazy is that decades later engineer still have not come up with a way to execute the C directly, but have to rely on a process called "compilation". I mean how hard is it to make a CPU that understands C? /s
The dynamic C listener from symbolics C could do this decades ago.
It's a C program running under UNIX/X11 that was last updated in 1993. Last I tried, it still compiled with absolutely minimal changes (I think I had to change an #include directive or something) after typing `xmkmf; make` (which was the way to compile X11 programs at the time), and runs, on macOS. Provided you have Xquartz installed.
/s in case anyone is confused.
Second: usually docker, npm, etc are not needed. If the code use 3rd party C libraries, you need to install it. On Debian, again you can use `apt` to make life easier.
How do you know which is the wrong version of GCC? That's the neat part, you don't.
* For this C program: Let's say a default install of a Debian system, with GCC and Make installed. Nothing else. Just clone and run make && ./bin/nms.
* For an hypothetical JavaScript implementation: Same Debian system, with Node.js installed. Nothing else. Just clone and run node ./src/nms.js.
Now tell me that the second point would ever happen, of course without the obvious trick of vendoring tens or hundreds of dependencies in the repo itself. Given the current trends and ecosystem incentives in the JS development world, I highly doubt it.
These trends only favor mindless composition, of which the latter is good, but the former is bad. IMHO most devs would probably not even consider the idea of writing a compact, self-contained piece of code and have their own termio [1] or charset [2] implementations, to begin with.
[1]: https://github.com/bartobri/no-more-secrets/blob/master/src/...
[2]: https://github.com/bartobri/no-more-secrets/blob/master/src/...
Not a fan, I disabled it right away.
https://phonelosers.com/2008/05/pla-radio-episode-17-voice-a...
(Pretty sure it was this one, or very similar: https://www.argecy.com/ibm-3290-plasma-terminal)
brew install --cask cool-retro-term
This is for the lonely boring nights...
Totally fits in with the original Sneakers "no more secrets" meme.
I actually think the original holds up shockingly well, for a movie that is at least tangentially about technology. It in part got lucky that it was juuuuust pre-WWW and that critical systems running on mainframes is still a thing in 2023.
Thank you for this lovely surprise.
Back when there were trade shows this would have been great on the show floor (fun to look at and give the salesperson more time to talk). Beeps on keypresses, noises while computing, and of course cool graphics like this.
That stuff would be super annoying when actually using the software for real. Perhaps it could be enabled in the free version and suppressed when you bought the license.
sneakers
you could also trigger playback of the appropriate track ("Too Many Secrets") from James Horner's soundtrack: https://www.youtube.com/watch?v=4KOuCe2-fj8Sneakers, Wargames, and BBS culture were pretty influential for me at the time.
https://user-images.githubusercontent.com/121322/32070715-16...
Previously: https://news.ycombinator.com/item?id=11584535
Perhaps this is the time to quit and become a farmer, so I don’t have to witness the decline.
Are there other movie graphics available too?
I've seen plenty of Matrix screen savers.
I've seen some things like Global Thermonuclear War from War Games.
What other movie effects exist?
Then you could have a web page with static DOM elements that do this effect!
let's try that again, but I think you should... the beauty of open
I'm with you. I think the constant "Do it yourself, everything is trivial!" meme has a chilling effect on people who would like to contribute their ideas.
I also think it's part of the reason that some people get turned off by Linux.
Someone will write, "I wish Linux did x," and the response they'll get is "Well, the beauty of Linux is that you can write your own drivers and compile your own kernel all by yourself!"
No, not everyone can.
Some people have families and jobs and other obligations, responsibilities, and restrictions that prevent them. That doesn't mean their ideas aren't good ideas. The fact that their ideas are not welcomed by the core Linux community because they can't roll their own is one of the things keeping Linux back.
Some people are "idea people" and some people are "execution people." There are entire industries built around both of these things. Very few people are good at both.
But seriously, for every 100 startups that post their Show HN on here, there's been 10.000 ideas but only 1 that will eventually translate into a product.
I'm the author of https://github.com/nojvek/matrix-rain
I should cook up a piped command mode. This is v neat.
Edit: as helpful comments below me explained, you either have to press another key to decrypt, or launch it with the `-a` option.
xbps-query -Rs no-more-sec
[-] no-more-secrets-1.0.1_1 Recreate the famous decryption scene from SneakersThe "I looked at the source code and 1 out of every 337 payments went to <name>", or the "The printer is coded using assembly" while HTML is shown (two opposite ends of the spectrum) really convinced me that the tech was supposed to be so obviously fake to tech people that it allowed them to still be entertained by it.
Compare this to CSI:Cyber which wasn't taking the piss out of IT and simply made stupid, ridiculous things up ("cyber nuke") or Numb3rs which described IRC as "two boats passing in the ocean communicating through the ripples of the water" or "thankfully I speak leet".
NCIS seemed to actually try to either get things right, or make them purposefully outlandish. I respect the writers for that.
- Whistler.
Or, define $DESTDIR if I'm reading the makefile correctly.