Sharing with HN: a starter app to understand Cloudflare Containers (introduced in June 2025 as beta)
The official docs were vague and examples pretty bare, so I made a inspector/debugger app to understand the reverse proxied container env that you cannot ssh to.
This could unlock cost effective Python services for you.
pro tip: if you're dwelling in apartments and can't spare a bedroom or closet, use a "grow tent" ($150-$250 on Amazon) to isolate your workspace from toddlers and spouses
- big enough for standing desks
- most noise isolation headphones will clean up your audio for meetings
- add whatever solid color backdrop or virtual backgrounds to clean up your video
- built-in air circulation to/from windows
Best part of reading this is coming away having learned the existence of units the CLI. How did I spend 20 years on the shell and not have needed or discovered this?
One thing I got bitten by was the handling of Fahrenheit/Celsius, because it's a non-linear conversion between the two. When you ask to convert `10 degC` to `degF` you get 18, which is the delta of ºF corresponding to increment of 10ºC. To get the absolute temperature, you have to ask to convert `tempC(10)` to `tempF` which is 50, as expected.
"Non-linear" threw me off for a second - I almost never see the mathematically correct definition of linear in computer science spaces. For anyone wondering, Celsius to Fahrenheit is an affine transform, technically not linear, because you have to add an offset, not just multiply.
On the other hand, an equation of the form y = a x + b is a linear equation. If you have Celsius and want Fahrenheit you accomplish that by applying a linear equation (F = 1.8 C + 32), so I certainly can't fault people for saying that the transformation they are doing is linear.
I wonder what people would say for something using an equation of the form y = a x^2 + b x + c to transform something? I can't say that I've heard anyone talk of quadratic transformations. On the other hand, I can't think of ever transforming anything with a quadratic equation, so never had the need t speak of it.
(Also, he called it a linear conversion, not a linear transformation).
$ units
Currency exchange rates from FloatRates (USD base) on 2020-05-12
$ sudo units_cur
$ units
Currency exchange rates from FloatRates (USD base) on 2020-07-09
Looking at the source of the default configuration (cat /usr/share/misc/units.lib), I believe it only defines conversions for currencies that are pegged to another one (mainly to EUR or USD).
You have: 10 franc
You want: dollar
conformability error
1.5244902 euro
1 usdollar
You have: 10 franc
You want: euro
* 1.5244902
/ 0.655957
I didn’t look too deep into it, my understanding was that the source it uses to update itself has been taken offline. There are workarounds involving data massaging and a cron but honestly that’s a lot more work than typing “1000 chf to usd” into ddg and getting the converted amount. But if you know something I don’t, maybe you could share for everyone’s benefit?
'units' was new to me too. The version I have on my Mac wouldn't accept 'millilightseconds' but it would take 'milli-c-seconds' - presumably the units.lib database is a little different from one in the original article.
the Talk Python series is actually a great way for Python programmers to discover authors and libraries you wouldn't organically come across on HN or GitHub browsing. I highly recommend it to intermediate python programmers to expand their knowledge scope.
If you want to build the web with Python, IMO the emphasis should be bringing Python to the web. I think a more promising project is http://pypyjs.org/ - a Python runtime in your browser powered by asm.js
I think it's certainly an interesting project, but the goal of compiling to JS today is to be able to access the DOM and interface easily with existing JS infrastructure.
I want to also vote up Cactus despite the lack of attention paid to it lately. IMO it's very well designed and deserves to be worked on by a wider community.
I've gone down that path before of storing encrypted secrets in SimpleDB. Unfortunately, encrypting string values will bloat the length of your strings, bumping against the 1024 value limit of SimpleDB: http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGu...
Didn't think about that. There are, of course, ugly workarounds, but I just asked about SimpleDB not because it's fun to use, but because of its low cost in this scenario.