frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Occupancy Math on the AMD MI355X: A From-First-Principles Guide

https://indianspeedster.github.io/blog/occupancy-math-mi355x/
1•skidrow•15s ago•0 comments

3k users, 0 revenue: a Google Sheets add-on postmortem

https://developerwithacat.com/blog/202606/google-sheets-forecasting/
1•mmarian•24s ago•0 comments

Embeddings is all you need

https://lusob.github.io/embeddings-is-all-you-need/
1•lusob•1m ago•0 comments

Quaternion Rotations, Claude, and Lean

https://www.johndcook.com/blog/2026/06/15/quaternions-claude-lean/
1•ibobev•1m ago•0 comments

Three Examples Suffice

https://www.johndcook.com/blog/2026/06/16/three-examples-suffice/
1•ibobev•1m ago•0 comments

Testing in Python with pytest: from the basics to advanced techniques

https://en.andros.dev/blog/b6bf68de/testing-in-python-with-pytest-from-the-basics-to-advanced-tec...
1•ibobev•3m ago•0 comments

Anthropic CEO's Response on Iranian Girl School Strike [video]

https://www.youtube.com/watch?v=SIUrshGwgDI
1•Bender•3m ago•0 comments

Stop Blaming QA and Start Diagnosing the Hidden Inefficiencies Behind Delivery

https://dl.acm.org/doi/10.1145/3800646.3800650
1•qaprof•3m ago•0 comments

Show HN: visual hcker.news extension – story preview images for HN headlines

https://github.com/ilyaizen/hcker-news-previews
1•ilyaizen•3m ago•0 comments

Hardware Debugging for Reverse Engineers Part 2: JTAG, SSDs and Firmware Extrac

https://wrongbaud.github.io/posts/jtag-hdd/
2•petee•3m ago•0 comments

Why weak handoffs matter more when agents are involved

https://productnow.ai/blogs/why-weak-handoffs-matter-more-in-an-agentic-world
1•kadhirvelm•4m ago•0 comments

Xiaomi Launches MiMo Claw

https://aistudio.xiaomimimo.com/#/
1•Jotalea•5m ago•0 comments

GPT‑NL: a sovereign language model for the Netherlands

https://www.tno.nl/en/digital/artificial-intelligence/gpt-nl/
3•root-parent•10m ago•0 comments

Show HN: HckrNight now ships as a mobile app (iOS/Android)

https://hckrnight.com/
1•omer_k•11m ago•0 comments

Lessons learned from shipping the same product, every Friday, for 57 weeks

2•fazkan•11m ago•1 comments

Apple's 2028 iPhones to Use 1.4nm A22 Pro Chips

https://www.macrumors.com/2026/06/16/2028-iphones-a22-pro-chips/
1•tosh•12m ago•0 comments

Reservations are open for XREAL AURA

https://www.xreal.com/aura
1•ChrisArchitect•12m ago•1 comments

Don't throw the (cryptographic) baby out with the bathwater

https://blog.apnic.net/2026/06/15/dont-throw-the-cryptographic-baby-out-with-the-bathwater/
1•speckx•12m ago•0 comments

France to stop certifying products without quantum-safe encryption

https://www.reuters.com/legal/litigation/france-stop-certifying-products-without-quantum-safe-enc...
2•onemoresoop•13m ago•1 comments

Show HN: Pen and paper resource development game

https://www.jameshylands.co.uk/2026/06/sortis-paper-empire-game.html
2•jhylands•14m ago•0 comments

10Gb/s Ethernet: switching to a Broadcom SFP+ module

https://www.gilesthomas.com/2026/06/10g-ethernet-switching-to-broadcom-sfp-plus
4•gpjt•15m ago•0 comments

Plakar: Open-source backup tool, 95% faster restores in v1.1.3

https://www.plakar.io/posts/2026-06-16/plakar-v1.1.3-is-here/
2•vcoisne•16m ago•0 comments

OAuth proves who you are. Wallet auth proves what you hold

https://insumermodel.com/blog/one-thesis-five-companies.html
1•dcborthwick•17m ago•0 comments

Stop Destroying Videogames Submission and Examination

https://citizens-initiative.europa.eu/stop-destroying-videogames_en
2•ortusdux•18m ago•0 comments

Ask HN: How do you stay at the bleeding edge of AI tooling?

1•otekengineering•18m ago•3 comments

FastAPI and Nuxt and Web3 Boilerplate

https://www.pynuxt.com/en/
1•k0ngz1•21m ago•1 comments

Claude Workout Gate

https://github.com/BotchetDig/workout-gate
1•kyleblarson•21m ago•0 comments

U.S. battery industry cuts losses, shifts to new ventures amid EV bust

https://www.dallasfed.org/research/economics/2026/0303
2•speckx•22m ago•1 comments

Pinning down a hardware bug in Intel 13th/14th gen CPUs

https://fgiesen.wordpress.com/2025/05/21/oodle-2-9-14-and-intel-13th-14th-gen-cpus/
1•fanf2•22m ago•0 comments

GLM-5.2: Built for Long-Horizon Tasks

https://z.ai/blog/glm-5.2
2•meetpateltech•23m ago•1 comments
Open in hackernews

TIL: You can make HTTP requests without curl using Bash /dev/TCP

https://mareksuppa.com/til/bash-dev-tcp-http-without-curl/
49•mrshu•1h ago

Comments

mrshu•1h ago
I ran into this while checking connectivity between containers on an internal Docker network where the image had neither curl nor wget.

The main surprise was that Bash has /dev/tcp which lets you do the equivalent of an HTTP request with a bit of shell magic, for instance:

  exec 3<>/dev/tcp/service/8642
  printf 'GET /health HTTP/1.1\r\nHost: service\r\nConnection: close\r\n\r\n' >&3
  cat <&3

Where `service` is just the hostname of whatever you’re talking to and 8642 is the port you are trying to talk HTTP to.

Pretty cool!

sevenzero•47m ago
It seems pretty cool, but I am wondering if there's any drawback on just using images that support curl? I can't think of any and to me it's kinda a must have, even on production images
mrshu•34m ago
That is indeed a solid pushback! :)

For what its worth, this container used `python:3.12.2-slim-bookworm` and I really would not expect that sort of an image to bundle `curl` -- even if it is intended for production.

sevenzero•31m ago
Ah I see so it was basically a minimal image that bundles just python? I can see why it wouldn't bundle curl! Thought it was a custom Image for some reason, hence my original comment
mrshu•27m ago
Yes, a very minimal image indeed. Had it been a custom image, curl would be one of the first things I would make sure it contains :)
figmert•31m ago
This of course only supports http, not https. It's great for health checks e.g. in a docker environment. To do https, you'd have to use something like socat, but of course that doesn't use bash only.
giobox•28m ago
It's also a two line Dockerfile to add wget or curl to almost any pre-existing container image. This is a fun idea though.
OptionOfT•22m ago
I always recommend to not have any dependencies outside of the code.

So we start at compiling the codebase (Rust) against MUSL. That way we can run it with FROM scratch images.

If we need more tooling available at runtime, then we look at alpine, but still using MUSL.

If MUSL itself is proving problematic, or if some of the libraries we use need glibc then we can look at using some locked down image.

The cool part about FROM scratch images is that you'll never have to update your base image to address CVEs. Only your software and its (compiled) dependencies.

xmodem•15m ago
> The cool part about FROM scratch images is that you'll never have to update your base image to address CVEs. Only your software and its (compiled) dependencies.

What's the benefit really, though? If you still need to be able to rapidly deploy a new image in response to a dependency CVE, what have you gained?

xmodem•22m ago
More than one ~500 employee company I've worked at has had security policies either encouraging or requiring the use of "distro-less" images - images with no OS components other than the absolute minimum required to run the application. For go binaries this meant literally nothing in the container apart from the executable.

In theory it has a couple of benefits. You don't have to re-deploy your image to patch CVE's in OS components if you don't have any OS components. And it provides some measure of defence-in-depth - one could certainly theory-craft a scenario where an attacker gains some limited control over your application and then uses some OS component to escalate.

These days if a security engineer is proposing my team adopt distro-less containers to receive these benefits, I would point out that we need to weigh them against the very real drawbacks of not having standard debugging tools available where and when weneed them. And also to consider the relative impact of other defence-in-depth measures they could be pursuing instead - such as any sort of network policy to limit network traffic.

sc68cal•44m ago
That's pretty neat, thanks for sharing
AndrewStephens•38m ago
This is pretty neat if all you need is to ping a local server but please use curl (or something equivalent) for contacting remote services. HTTP1.1 seems like such a simple protocol but in the real world you need to deal with proxies, different encodings, and redirects. Curl takes care of that (and a host of other annoying stuff) for you.
mrshu•33m ago
Totally!

I was really just trying to see if intra-container connectivity works, and this ended up being a very quick way of doing so. (The alternative being building and deploying a new image, which would likely take significantly longer.)

KomoD•24m ago
> The alternative being building and deploying a new image, which would likely take significantly longer

You said the image was Python, though? Using that is way easier and faster. https://news.ycombinator.com/item?id=48558763

If all you need to know is that it can connect:

python3 -c 'import socket as s;s.create_connection(("8.8.8.8",53))'

or http:

python3 -c 'from urllib.request import*;print(urlopen("http://example.com").status)'

basilikum•33m ago
> As it turns out, bash can speak HTTP by itself.

No, it can not. Bash lets you open TCP sockets.

What you are doing here is trying to speak HTTP yourself, which is fine for testing and debugging, and hella cool for fun to do by hand, but you will shoot yourself in the foot if you try to use this pseudo http client unattended in reality. This toy code does not parse HTTP properly and will break.

You could of course write a full http/1.1 client in bash, you can even do a full http server in pure bash: https://github.com/bahamas10/bash-web-server

For less insane, non-bash shells there is always nc which is usually probably the wiser choice.

mrshu•30m ago
> No, it can not. Bash lets you open TCP sockets.

Very fair pushback -- I did get carried away and will update the article to be more precise. Thanks for raising it!

> For less insane, non-bash shells there is always nc which is usually probably the wiser choice.

For completeness, `nc` or any netcat equvialent I could think of was not available in the image I was trying this with. It would certainly be a better option though.

bearjaws•15m ago
This is the most Claude pilled comment I've seen here.
a-dub•29m ago
it's not that insane. i've been manually typing http requests in since before http/1.1 and the mandatory host header.

it is insane to use it for anything serious (also the opposite, implementing webservers in bash), but for quick testing it's pretty great!

simonw•26m ago
Neat, works against example.com

  exec 3<>/dev/tcp/example.com/80
  printf 'GET / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n' >&3
  cat <&3
Outputs:

  HTTP/1.1 200 OK
  Date: Tue, 16 Jun 2026 17:37:45 GMT
  Content-Type: text/html
  ...
I always end up on example.com for this kind of thing because there are so few domains these days that don't enforce https!
QuantumNomad_•6m ago
example.com is also great for that reason when something fails about a captive portal on a public WiFi.

I open my web browser and go to http://example.com and get redirected to the captive portal page again and retry completing what they need from me to get internet access.

devsda•11m ago
Yes, it used to be my goto few times when some devices tried to lockdown everything with bare minimum core utils and no network capable tools like curl etc.
orthogonal_cube•8m ago
It was fun exploring this to make a native-shell-only peer-to-peer file transfer utility at work for some automation scripts. At least, it was until trying to replicate it in Powershell was somehow triggering Crowdstrike and the corporate Cybersecurity team thought I was writing malware.
geoctl•4m ago
I discovered this bash trick by chance when I was once trying to healthCheck the Envoy's official OCI image container which didn't include curl or wget while forcing the envoy admin interface to listen on localhost which breaks the traditional k8s httpGet checks.
sam_lowry_•1m ago
A few years ago I had to do this for a health check in a Docker container:

FROM openjdk:11-jre-slim HEALTHCHECK --start-period=10s --timeout=3s --retries=5 \ CMD perl -e "use IO::Socket; $sock = IO::Socket::INET->new(Proto => 'tcp', PeerAddr => 'localhost', PeerPort => '8888') or die $@; $sock->autoflush(1); print $sock 'GET /actuator/health HTTP/1.1' . chr(0x0a) . chr(0x0d) . 'Host: localhost:8888' . chr(0x0a) . chr(0x0d) . 'Connection: close' . chr(0x0a) . chr(0x0d) . chr(0x0a) . chr(0x0d); while (my $line = $sock->getline ) { if ($line =~ /UP/) {exit;} }; close $sock; exit 1;"

morpheuskafka•13m ago
> No, it can not. Bash lets you open TCP sockets.

I thought you had to use a program called netcat for that--if not then what is the point of that binary? And for that matter, can't you also use telnet to manually send HTTP?