HNHacker News
TopNewBestAskShowJobs

thamer

2,913 karma · joined October 5, 2007

submissionscomments
thamer··on W3M Rocks
If you want to try w3m in Docker (although without support for images), I found it packaged in 14 MB only:

    docker run -it --rm corbinu/alpine-w3m https://news.ycombinator.com
Press [tab] to navigate from link to link, [enter] to follow a link, [⇧+B] to go back, and [q] to exit. You can also run it with --help instead of a URL for a help page.
thamer··on Zas Editor
This looks like a great start! There's one thing I couldn't find from this page, which I'm sure many developers would ask about: is there a Vim plugin, or Vim mode? And if not, are you planning to add one?
thamer··on AWS Lambda function URLs: Built-in HTTPS endpoints
An engineering blog from the BBC published an update a few days ago on their migration to a serverless architecture, titled "BBC Online – A year with serverless": https://medium.com/bbc-design-engineering/bbc-online-a-year-...

They report 3.3B function invocations for 2.3B requests served, a total of 61,000 hours of execution time and 1,500 concurrent executions at peak.

Using calculator.aws, simply entering the number of requests at 67ms each (61k hours/3.3B invocations) with 128 MB of memory each computes a cost of only $1,107.

Then of course there's bandwidth, databases, file storage, and a lot more… but 3.3B lambda executions for $1.1k is really cheap. Not to mention that a client like the BBC would benefit from negotiated pricing with significant discounts. Even without discounts, serverless is often pretty cheap.

thamer··on IP over Avian Carriers RFC 1149 event (2001)
There are some instances of real data taking much more than 6,389 seconds to travel. Voyager 2 was contacted in November 2020[1], being at the time 18.8 billion km away from Earth. Light takes about 62,000 seconds or 17h25m to travel this distance… each way! Almost a 35-hour ping.

Voyager 1 is further away and still sending data, although I don't think that it has received commands for a very long time.

[1] https://www.forbes.com/sites/startswithabang/2020/11/04/voya...

thamer··on Ask HN: I'd like to practice coding GUI from scratch. Any recommendations?
With Qt you don't really have to deal with unexpected messages. A signal is triggered by an event, like a button click or a slider value changing, a checkbox being toggled, this kind of thing. A slot is just a place to receive it, it's a regular function or method with a compatible signature for the kind of event it's meant to process. There are no unexpected calls because you have to explicitly connect a signal to a slot, something like:

    QObject::connect(&button, &QPushButton::clicked,
                     &mainWindowController, &MainWindowController::onButtonClicked);
If no slot is connected, the signal just doesn't go anywhere.

Something that's special with Qt is that signals and slots are declared in the class using custom syntax, e.g.

    slots:
        void onValueChanged(int value);
    signals:
        void valueChanged(int newValue);
Yes here "signals:" and "slots:" look like the same kind of keyword as "public:" or "private:" in a class declaration, even though internally they're #defined as "public:" and "/**/" respectively.

Qt makes use of a tool called MOC – the Meta Object Compiler – to generate code for signals and slots. It's not a pre-processor but a code generator, which has to run before you can actually compile the code. I think you could probably implement a similar system of event subscriptions without this additional code generation step.

See this page for details: https://woboq.com/blog/how-qt-signals-slots-work.html

thamer··on Ask HN: I'd like to practice coding GUI from scratch. Any recommendations?
I've written a fair share of GUI apps in C++ on multiple platforms, starting with Win32 API and MFC on Windows and later Qt on Linux. The way you write applications with these frameworks is different enough to have a significant impact on the structure and design of the UI layer.

I don't have any suggestions for how to build such a framework, but I would encourage you to play around with a few existing frameworks to see how they are designed, what you like about them, and what ideas to avoid.

For just one example, see the difference between managing the event loop entirely by hand with Win32[1] and using "signals and slots" in Qt[2]. There is a lot more to UI frameworks than this, and they vary on many more aspects.

- [1] https://docs.microsoft.com/en-us/windows/win32/winmsg/using-...

- [2] https://doc.qt.io/qt-5/signalsandslots.html

thamer··on QR Date – signed timestamps inside for verifying dates
I hadn't heard of this, this is a pretty cool way to provide this proof.

Back story: https://www.coindesk.com/markets/2017/06/26/proof-of-life-vi...

The block in question (open "Click to see more" and look for the "Hash" field): https://etherscan.io/block/3930000

thamer··on Possible BGP hijack
This says the prefix being announced by two ASNs is only a /24, which is kind of narrow for a hijack? Considering the countries involved, reporting this as a hijack will inevitably lead to people assuming it is related to the current conflict.
thamer··on Running TypeScript on ESP8266/ESP32 Devices
I can't speak for a JS virtual machine, but for a point of comparison CircuitPython[1] runs on many ESP32 boards and builds are often under 1.5 MB. It does come with a whole set of modules, with the ones you'd expect to have in Python like "re" or "time" (although they only have a few functions in there), but also with CircuitPython-specific modules like "board" or "digitalio" to access peripherals, or "wifi" for networking.

The boards listed on the CircuitPython downloads page usually have between 2 and 8 MB of flash, so you often have enough for the VM and your own code plus a few files.

[1] https://circuitpython.org/

thamer··on I'm common as muck and spent £150 to try a Michelin star restaurant
If you drink alcohol and have the option to get the wine pairing in a Michelin star restaurant, I'd highly recommend it. They are usually offered only with a prix-fixe menu where all the courses are pre-selected.

With (say) 7 dishes you'd have 5-7 small glasses of wine, each selected from the restaurant's cellar by a sommelier who knows what would go perfectly with each dish. This is a much better option than getting your own drink or a bottle to share with the table, and the experience of pairing amazing food with just the right drink is on another level.

thamer··on Badger 2040 – Fast updating RP2040 based e-Ink badge
With the STEMMA QT port you can attach something like this $4 RFID breakout[1] and have a badge that people can scan at a conference to get your details. No soldering needed, you can connect it directly to the board with a $1 cable and it's probably easy to program with MicroPython, although I'm not sure how extensible their "Badge OS" is.

edit: there's no MicroPython library for it apparently, but the datasheet[2] is pretty detailed. I've written Python libraries from such protocol definitions before, it's not too difficult.

[1] https://www.adafruit.com/product/4701

[2] https://www.st.com/resource/en/datasheet/st25dv04k.pdf

thamer··on FAA says 5G could impact radio altimeters on most Boeing 737s
If the page says that "you have reached your article limit": http://archive.today/a4pso
thamer··on Slack is down for some users
I'm in an organization with many thousands of people and find search to work very well.

Does the pricing plan influence the amount of resources your organization can use? e.g. slow search on the free plan, but much better on Enterprise Grid.

thamer··on 1Password for SSH and Git (Beta)
The feature exists on mobile, there's a "Related items" section that has a list of file names with a ">" caret next to each one. If you tap on an entry it opens in a new page where you can tap "View document" to see its contents. You can also see when it was created and updated, share it, add tags to it, add it your favorites, and more.

It works perfectly fine, with no missing features. I use it to store private keys and recovery codes, mainly.

thamer··on My thoughts on writing a Minecraft server from scratch in Bash
I searched for "font" in this thread and certainly did not expect this comment. I found it so hard to read that I added custom CSS rules to replace it with 'sans-serif' for the body and 'monospace' for the code.
thamer··on Show HN: Jless, a command-line JSON viewer
I only saw your comment after a day and just tried your extension, it works great! I really like how much faster it is than JSONVue, and the JQ integration looks super useful; this is a really good start.

Oh and welcome to HN :)

thamer··on Show HN: Jless, a command-line JSON viewer
This is great! I use the JSONVue Chrome extension at work to display JSON files, and I can see the similarities.

If I could suggest one thing: ctrl-u and ctrl-d are pretty common shortcuts for page up and page down, they're even supported in Vim and less. It would make sense to add support for those in addition to the actual PageUp/PageDown keys.

thamer··on New Zealand's bid to become a dark sky nation
A couple of years ago I had a coworker ask me if I had ever seen the Milky Way, after he had finally seen it for the first time. He must have been maybe 25 at the time. I was taken aback by the question, and felt sad for him that he had never experienced this awesome sight.

It's never too late I guess, but this made me wonder what proportion of people had never had this opportunity. I've read stories of people calling 911 to report strange lights in the clear skies when it was visible; some of those are likely apocryphal but I'm sure it happens.

thamer··on Ask HN: Do you use TLA+?
I've used it a few times. It was the most useful either to "prove" the conditions for a bug[1], or to gain confidence that an algorithm I had worked on was safe under tricky conditions involving concurrency.

The main downside of TLA+/PlusCal is that it's so different from programming languages that very few engineers are familiar with it. Even PlusCal which is supposed to provide a Pascal-like syntax that gets translated to TLA+ can be tricky to use and has a few pitfalls that can be frustrating for beginners.

The tooling is improving, but some design choices are really not ideal. For example, you write PlusCal in a `.tla` file inside a comment block(!) and when you transpile it to TLA+ the generated code is written after your comment, in the same file[2]. This is just one of a number of baffling decisions that create a ton of friction when using these tools. Others on this page have mentioned issues with scope, this is certainly something I've had to fight with.

[1] The bug I wrote a model for was CASSANDRA-8287, "Row Level Isolation is violated by read repair": https://issues.apache.org/jira/browse/CASSANDRA-8287. The error trace describes a clear scenario under which this would happen.

[2] See this very simple model for an example of how PlusCal is written in a comment block followed by the TLA+ code that's generated from it: https://gist.github.com/nicolasff/bcc92627485c3d4d9e0c25eeea...

thamer··on Impacts of lack of sleep
The answer is "yes"… from online pharmacies that ship it from India. Whether you get the real product or a counterfeit version is anyone's guess.
thamer··on Generate static sites from Markdown files with Caddy (2018)
Does Caddy support generating HTML files? I use Hugo for a few websites that I host on S3 + CloudFront and am very happy with AWS handling the back-end part this stack, and wouldn't want to switch to a server that I would now need to manage.
thamer··on Guess the daily Wordle in one try using the tweet distribution
Or open your browser's dev tools and type:

    $('game-app').solution
thamer··on GitHub Actions by Example
I've mentioned this before on HN, but `act` was completely unusable for me when I tried it. Tons of errors that required digging deep into the code to understand, missing features… has it improved over time? It seems very useful and I gave it a solid try at the time (maybe a year ago), but just had to give up after a few hours.

edit: I decided to upgrade and give it a try, went from 0.2.21 to 0.2.25 (Mar 30, 2021 → Nov 24, 2021). It's still failing to run a basic "build and test" pipeline, and really not doing anything fancy: apt-get install + make + ./service + ./tests.py, with a Redis sidecar. This seems to be because services are not supported in `act`: https://github.com/nektos/act/issues/173

thamer··on Const all the things?
> I don’t need a keyword just to tell me that a variable isn’t modified during its lifetime.

I agree that this isn't very well argued, and variable re-use is a common source of bugs – especially variables that are used several times in a single function for different purposes.

On a similar point, Java has `final` instead of `const` and it does apply to local variables, including to guarantee that a variable is not only not modified, but set exactly once. Something like this:

    final String foo;
    if (condition) {
        foo = someValue();
    } else {
        foo = otherValue();
    }
Omitting any of the assignments leads to a compilation error. It works with complex if conditions with multiple branches, and even with `switch`. If a branch throws an exception, that's also acceptable as the variable is guaranteed not to be used below.

I find it pretty useful; doesn't C++ provide a similar construct?

thamer··on Ask HN: Those making $500/month on side projects in 2022 – Show and tell
I was curious about this too. From the dimensions listed on the website, it looks like the screen is about 6.3×3.7 inches, or about 7.3 inches diagonal.

There seem to be 8-inch e-ink displays for sale on AliExpress for $20-$40, actually much cheaper than I expected. No idea about the quality though.

thamer··on Examining the covidtests.gov architecture
Chrome Dev tools says 2,615,081 bytes loaded in 67 requests for the first 2 pages (home page + form).

Some of it is on Akamai as the article describes, but if we had everything on CloudFront and wanted to estimate the cost of 1M orders: 2.38 TiB out + (say) 1 KiB/request * 67M or 67 GiB in: that's $275.50 per 1 million orders (approximately $207 out + $67 in + $1 requests cost).

If we add 1M Lambda executions, we still get $0 since that's the entire free tier. 10M Lambda calls at 50 ms each and 128 MB of RAM cost $1.8, so that's pretty much free as well.

Assuming that CloudFront caching is configured correctly, there would be very few requests to the S3 origin so their cost would be negligible.

Someone please correct me if I've got this completely wrong. Source: https://calculator.aws/ (CF: 2.38 TB + 67 GB + 67M req).

thamer··on NASA: Tonga blast was 10 megatons, more powerful than a nuclear bomb
There had been coverage of the eruption between December 29th and January 4th, and landslides due to the island's instability were certainly reported as a possible danger. Among other sources, this was covered extensively by the GeologyHub channel on YouTube which pretty much predicted this collapse.
thamer··on Show HN: My New Personal Website
First impressions: the font is kinda small; the contrast is a bit too low. My first attempt at scrolling down from the intro screen immediately pushed the most recent entries above the top of the page and I had to scroll up to get back to them.

Run a Lighthouse report with Chrome which will point out which elements need work, you'll also get advice like "Delaying first content paint makes users give up on your page" (paraphrased) or "Avoid enormous network payloads: total size was 4,397 KiB". Why is this page of text 4 MB? You might also want to take a look at the number of requests.

I would consider removing this first screen/page if I were you.

thamer··on Engine cooling – why rocket engines don’t melt
I've seen this kind of comment before about his presentation, and I don't really understand it. It's true that he's a fanboy and that's especially visible in his video interviews/visits with Elon Musk, but the style of those videos is markedly different from the more educational ones which are often trying to cover a topic with a lot of detail while remaining relatively accessible.

I watched the video version of the article linked here this morning, and don't recall any part that was fawning over anyone or anything in particular.

What is it about his presentation that puts you off?

thamer··on Minitel: The Online World France Built Before the Web (2017)
For context for "36.15": you would access Minitel services by typing a numeric code followed by a short textual name, the most common code being 3615.

Advertisements for Minitel services would say something like "Dial 3615 HOTSTUFF to meet a passionate lover". A lot of these services were adult chat, games, or extremely low-res porn, and it was easy to rack up a massive phone bill by connecting to them (you'd have to remember to disconnect, too!). Another very common use cases was phone book lookups.

Think of it as a physical terminal for a ncurses-style terminal app using a remote client, with the display updating line by line with a scanning cursor as you received data. There's an example of what that looked like in this short documentary about Minitel: https://www.youtube.com/watch?v=zlUmxUB9RhI&t=500s – every single page loaded line by line that way.

← PreviousPage 5 of 17Next →