Hacker News new | past | comments | ask | show | jobs | submit login
89 Operating Systems (haxx.se)
108 points by HieronymusBosch on Nov 25, 2022 | hide | past | favorite | 25 comments



If my code ran on the Mars helicopter I'd never be able to shut up about it.


Especially if it wasn’t designed specifically for that purpose. Someone else looked at your code and said “this is good for space”.


"This is good for a one of a kind billion dollar project at the frontier of science." That would feel pretty dope.



List of qualifying repos for the Mars 2020 Helicopter Contributor achievement:

https://docs.github.com/en/account-and-profile/setting-up-an...


They must to run doom on that helicopter


Wait, curl can read pop3? And smb? And fricking mqtt?? I learn something new every day. Time to go replace my email client with curl.


MQTT was surprising to me too. I’m a big fan and i’m wondering what I can replace with this new found info.

Edit: Qos 0 only so nothing . Interesting though


Reminds me of the canonical list of operating systems that suck from alt.sysadmin.recovery (spoiler: all of them).



Title would be clearer as ''How curl has reached nearly ten billion installations''


curl is amazing[0]. But I use maybe 10% of it. And AFAIK it can't be statically linked. Is there an alternative that includes mainly the HTTP functionality and is static?

[0]: you can read my blog using curl: https://apitman.com/17/#curlable


Someone got a static build working on MacOS: https://github.com/curl/curl/issues/9359 (it looks like a pain, but certainly doable given enough time and dependency fiddling)


If you've got perl installed you'll might have a "GET" binary present, mine is /usr/bin/GET, which comes with the WWW-module.

Although this is written in portable perl, rather than being compiled, so the static vs. dynamic choice doesn't really mean much it is a simple alternative.

Otherwise I built a simple busybox-inspired collection of tools, written in golang, which includes a simple HTTP client too:

https://github.com/skx/sysbox

Those are just a couple of examples, I'm certain there are multiple other choices out there. But I guess curl is ubiquitous enough that most people just use it directly, and add it when missing!


Wild stats. Kudos.

What things did you do right/wrong on this amazing journey?


Better title: 2 Planets


Here's an unnecessary use of curl:

  curl perdu.com
You can use netcat instead, HTTP is easy to write and read:

  nc perdu.com 80 <<< 'GET / HTTP/1.1'$'\r\n''Host: perdu.com'$'\r\n''Connection: close'$'\r\n\r\n'
Inspired by https://fasterthanli.me/articles/the-http-crash-course-nobod...


you've blown chunked transfer encoding, which is a client MUST https://www.rfc-editor.org/rfc/rfc2616#section-3.6

If you control both ends, no big deal. If you're just working out some protocol, no big deal. I love simple toy solutions to problems, especially when understanding the problem space. But this is going to fall apart under any sort of pressure.


This was a joke to poke fun at people who comment "unnecessary use of cat", but yeah, it's bad on many levels. However, in many simple cases, it will produce a valid response, since http server implementations are often extremely lenient. But I'd never use it because curl is truly everywhere.


That's not the same at all, because the nc example dumps the response headers to stdout and the curl example does not.

It's more similar to "curl -i perdu.com", except (on my system? maybe it's non-default) curl colourises the header names when output to a TTY, and prints a progress report to stderr when output to a non-TTY.


You probably don’t ever actually want to do that, except as a demonstration to someone who doesn’t know how HTTP works.

(It also doesn’t support TLS or any version of HTTP other than 1.1, whereas curl can negotiate a newer version.)


Looking forward to you doing TLS by hand with netcat.



That is actually pretty cool, thanks!


Curl supports parsing.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: