Hacker Newsnew | past | comments | ask | show | jobs | submit | soupshield's commentslogin

What do we call the "--" part in a command like this:

    git checkout HEAD -- <filename>
I find it hard to remember things unless I understand their purpose. It looks like it's specifying an argument but without an argument name (e.g. --verbose), unless it's similar to a pipe | symbol and <filename> is being passed to the checkout command as some special kind of argument?


It is a delimiter indicating the end of options:

https://unix.stackexchange.com/questions/11376/what-does-dou...


I don't know what it is called, but it forces what comes after to be interpreted as a filepath.

This is not git specific, but a common convention for CLI tools. Try running:

    > touch -- -i foo
    > rm -- -i foo
And compare what happens without the "--".


And then we have startx, which starts both an X server and the X client specified:

  startx /path/to/client --with --client-options and arguments -- --server-options -go --here
Here, the double dash is used to separate the client options from the server options (the path to the server binary is compiled-in, IIRC).


Not only a filepath, this means pass anything past “—-“ ‘as is’ as an input and not an option flag.

docker run -it nginx —- ls la


Ah yes I've seen it in those kind of contexts too. Thanks everyone this has really clicked in to place for me :)


ObAgainstTheGuidelines: Me too.


Not a file path specifically and not an input exactly but I think the proper word would be an argument.


Thank you for this brilliant explanation (complete with interactive example :) I completely get it now.


It means “stop processing arguments as options and leave them alone” to getopt-likes. E.g. to rm file named “-f”:

  rm -- -f
Idk the word, just minus minus.


> E.g. to rm file named “-f”:

I've defintely had this sort of problem in the past :)


rm ./-f



We have extension methods; I would like extension properties.


I agree this could have compelling uses.


Can you share how it's doing cpu/memory wise and his it's holding up in general under what I assume I heavy load from HN?


Right now I cannot even access it locally from my lan, but it does answer to some of my pings. The HDD led is also blinking, which means that it is in fact answering to some HTTP requests. The TCP/IP stack is compiled for 64 simultaneous sockets.


Please paste an image up on Archive.org, so at least we can stare at the 'pre-meltdown' server.

P.s. I used a 486 as a router for years, and even upgraded it when I found a Pentium Overdrive... which of course was vulnerable to the F00F bug...



Next iteration: Caching HTTP server


I can't access it either. It looks like it's just timing out. We did it, guys! :D


Video: https://www.youtube.com/watch?v=erM0K0oXk4M

In the end I minimized the HTTPSERV.APP window so that scrolling down the text would not consume too much CPU time.


Not holding up great it seems :)


Loaded now. This is what's there:

"Tämä palvelin käyttää graafista 16-bittistä lEEt/OS-käyttöliittymää. Järjestelmä on yhdellä 1,44 megatavun 3,5 tuuman levykkeellä. Tämä sivusto on kiintolevyllä. BBS on 360 kilotavun 5,25 tuuman levykkeellä. Vieraile myös BBS-purkissa portissa 486 (telnet)."

Translated:

"Server uses a graphic lEEt/OS-user interface. The system is on a single 1.44 MB 3.5 floppy disk. This site is on a hard drive and the BBS is on a 360 KB 5.25 inch floppy disk. Visit the BBS on port 486 (telnet)."


We used to serve serious traffic off 486 machines, so if anything it's probably a software issue. Perhaps FreeBSD/i386 would be an appropriate choice?

If you weren't there you probably don't realize that the 486 was a huge leap over the 386. We don't get 100% generational improvements these days. The 486 enjoyed a long life and its later incarnations were giving contemporaneous Pentium models a run for the money, and I'm not even counting socket-compatible upgrades from AMD and so forth. You could put 64MB RAM and big L2 caches and there were PCI motherboards in the later 486 years.

Consider that the AMD Geode was basically the last 486 standing, and it was (is) more than adequate for routing between or firewalling fast ethernet links, serving HTTP etc.


My system is 100% 16-bit code and cannot access more than 640 kB of memory, and that's why it is so limited. I could probably increase the maximum amount of sockets and file handles to give it more capacity, but it still has its limits.


The least you could do is EMS/XMS. Quick, somebody give this person a copy of DesqView/386! :)


Firing up EMM386/JEMM386 underneath this environment, or writing 32-bit code, may go against the 8088 spirit of the project. A physical EMS card is an expensive pain to obtain, and you'd probably want to speak to its hardware directly rather than loading a DOS device driver, but it would be period-accurate :) There's old ones on eBay and modern replicas like https://texelec.com/product/lo-tech-ems-2-mb/

You can do virtual memory above the 256kb mark with the most advanced 80s cards but they're even rarer (I think DESQview worked best with this setup, and its what the 386+ software EMM implementations give you). For regular EMS which only works in a single 64kb region, disk caching and RAMdisk were common use cases, which didn't require rearchitecting the OS or applications to understand a new addressing scheme.

On 286+ you can also call a BIOS function to copy to/from extended memory, using only 8088 instructions in your own code, but of course the BIOS code will rely on newer processor instructions to make it happen. http://www.ctyme.com/intr/rb-1527.htm

Aside: cool project! I wrote a protected mode bootloader for old PCs recently and that was quite enough work!


They probably rolled there own, omitting all the edge cases pertaining to a coagulated mess of spaghetti code.


Yep this! People would regularly run windows 95 on a 486 with 8-16mb of ram. This was their daily driver which did word, dial up/aol/prodigy, messaging, games, etc. I think the reaction here that someone is able to run a little web server off of it is perhaps a bit overdone. Yes, its impressive he wrote his own stack, but the hardware itself is still beefy.


Yeah, a 486 is not a slow CPU - not even the 25 MHz SX version that the server has. But Windows 95 is a 32-bit protected mode OS. My OS also works on a 8088, but I don't have a 8088 computer that I could use as a server.


I paid $8700 for a tower 25MHz 486 back in the day. Sheesh!


Yeah, I remember the times where 486 servers were quite normal. On the other hand, most users were on dialup and unlikely to cause serious trouble.


I find it a bit strange that in this system my identity is conflated with my wallet.


My heart is with vim but I switched to emacs as I love orgmode too much for note taking. I tried a few vim orgmode plugins but they seemed quite flakey even though I only really use orgmode for outlining. Excuse my ignorance but could all this LSP/Lua stuff allow neovim to take over from emacs?


I’d say cautiously maybe. Using lua to me seems like it could open doors for neovim that before we’re either not possible or very complicated to do with vimscript.

Neovim doesn’t have such incredible and almost ridiculous power to change itself like emacs does with elisp since vim is still not written in lua, lua is just used to access its api, but that api is quite extensive. So, maybe? Hopefully?


And if you really want Lisp in Neovim, you can use the Aniseed framework to write your plugins and scripts in Fennel.


Thanks for pointing out Fennel! every since I learned a little of elisp I really enjoyed the experience but common lisp seems like a beast to big to take on, clojure run on java and tbh I'm prejudiced against it... but fennel is just a simple lisp that runs on lua with no overhead? now that's something I can get behind!


MST3K's Tom Servo bears a striking resemblance to the Quasar Klatu robot:

http://www.theoldrobots.com/QuasarKlatu.html


When I switched to Firefox I also switched to bitwarden for password management. Auto-filling is still in beta but I don't miss it. The Firefox extension is fast and simple to use.

https://bitwarden.com/


I use the built in auto fill with Kee (for KeePass). It works great, my password manager types my passwords in initially and Firefox stores and syncs them across devices with reliable auto fill.


Pinboard archives it with wget: https://pinboard.in/faq/


Have you ever had any false alarms with this?


I have not!


I seen an issue on github[0] which mentions that a lot of development time is still spent on version 3, which is slowing down progress on version 4. I suppose future versions might take longer to roll out if they're supporting the previous version at the same time.

0: https://github.com/twbs/bootstrap/issues/20631


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: