HNHacker News
TopNewBestAskShowJobs

bArray

7,479 karma · joined March 14, 2016

Why jump in one pond when you can dip your foot in many?
submissionscomments
bArray··on Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock
> The ESP8266 reconnects to the NTP server every 15 minutes which keeps the clock accurate.

It doesn't seem to be hammering the NTP server 30 times a second.

bArray··on Is the RAM shortage killing small VPS hosts?
I think that poorly optimised software is killing small VPS hosts... We used to have very usable systems with less than 1MB of RAM.

I've personally built a smart watch that connects to the internet, helps me perform organisation duties, all whilst running (micro-)Python, in far less RAM. To do the equivalent on desktop would require some form of sandboxed browser engine, JavaScript and some weird client-server stack.

I recently upgraded my servers with RackNerd from 768MB to 1GB because it was near free to do so, but I didn't need that extra memory. Before anybody claims they don't do anything, these servers deal with thousands of users a day.

I'm cautiously hoping that we start to see a period of optimisation again. There is currently zero incentivize to optimise anything any more, even if it negatively affects the end user.

bArray··on Spacecurve: A space-filling curve playground
> It's is the latest symptom of a long preoccupation with these beautiuful mathematical objects.

It's not just a beautiful concept, they have other uses too. It turns out some patterns can be pretty efficient for search if there is a spatial movement cost.

Some questions that interest me:

1. Can you get these search patterns as part of an emergent behaviour?

2. Can multiple searchers work together in order to produce these patterns efficiently?

3. Instead of searching linear 2D and 3D space, what if you want to search non-linear spaces?

bArray··on Some C habits I employ for the modern day
> I don’t personally do things that require dynamic memory management in C often, so I don’t have many practices for it. I know that wellons & co. Have been really liking the arena, and I’d probably like it too if I actually used the heap often. But I don’t, so I have nothing to say.

> If I find myself needing a bunch of dynamic memory allocations and lifetime management, I will simply start using another language–usually rust or C#.

I'm not sure what the modern standards are, but if you are writing in C, pre-allocate as much as possible. Any kind of garbage collection is just extra processing time and ideally you don't want to run out of memory during an allocation mid-execution.

People may frown at C, but nothing beats getting your inner loops into CPU cache. If you can avoid extra fetches into RAM, you can really crank some processing power. Example projects have included computer vision, servers a custom neural network - all of which had no business being so fast.

bArray··on It looks like the status/need-triage label was removed
Yes and no. This was the IT of a school, most likely low-paid College/University graduates trying to patch together a working system on a shoe-string budget 20 years ago. Maybe they were fully aware of the issues and struggled to get time to deal with them - try convincing an uneducated management that you need to fix something that is currently working.

I remember IT were continuously fixing computers/laptops broken by students, fixing connectivity issues (maybe somebody has pushed crayons into the Ethernet ports), loading up software that teachers suddenly need tomorrow, etc. Maybe they also have to prevent external actors from accessing important information. All the whilst somebody well above your pay grade is entering into software contracts without knowing anything about software.

Things are likely far more plug & play now for IT infrastructure, back then (XP I think) it was more the Wild West. Only five years ago I know that a University login system used to send username and password credentials via plaintext, because that's how the old protocols worked. The same University also gave me sudo to install/run programs, which provided sudo over all network drives.

You would probably be horrified to know how much infrastructure still runs on outdated stuff. Just five years ago the Chinese trains stopped working because Adobe disabled Flash [1]. I know of some important infrastructure that still uses floppy disks. Not so long ago some electrical testing could not be conducted because the machine that performed it got a corrupted floppy disk.

[1] https://arstechnica.com/tech-policy/2021/01/deactivation-of-...

bArray··on It looks like the status/need-triage label was removed
Maybe 20 years ago... As a student, the school had an email server that allowed rules to be set. You could set an email to be sent as a result of another email.

IT were not stupid though, and set a series of rules:

1. You cannot have a rule trigger to email yourself.

2. You cannot reply to an email triggered by a rule.

3. You have ~50MB max of emails (which was a lot at the time).

Playing around one lunch, my friend had setup a "not in office" automated reply, I setup a rule to reply to any emails within our domain with a "not in office", but put their name in TO, CC and BCC. It turns out that this caused rule #2 not to trigger. After setting up the same rule on my friend's email, and sending a single email, the emails fired approximately one every 30 seconds.

A few hours later we returned to our email boxes to realise that there were thousands and thousands of emails. At some point we triggered rule #3, which in turn sent an email "out of space", with a small embedded school logo. Each one of these emails triggered our email rule, which in turn triggered an email "could not send message", again with an embedded logo. We desperately tried to delete all of the emails, but it just made way for more emails. We eventually had to abandon our efforts to delete the emails, and went to class.

About an hour later, the email server failed. Several hours later all domain logins failed. It turned out that logins were also run on the email server.

The events were then (from what I was told by IT):

* Students could not save their work to their network directory.

* New students could not login.

* Teachers could not login to take registers or use the SMART white boards.

* IT try to login to the server, failure.

* IT try to reboot the server, failure.

* IT take the server apart and attempt to mount the disk - for whatever reason, also failure.

* IT rebuild the entire server software.

* IT try to restore data from a previous backup, failure. Apparently the backup did not complete.

* IT are forced to recover from a working backup from two weeks previous.

All from one little email rule. I was banned from using all computers for 6 months. When I finally did get access, there was a screen in the IT office that would show my display at all times when logged in. Sometimes IT would wiggle my mouse to remind me that they were there, and sometimes I would open up Notepad and chat to them.

P.S. Something happened on the IT system a year later, and they saw I was logged in. They ran to my class, burst through the door, screamed by username and dragged me away from the keyboard. My teacher was in quite some shock, and then even more shocked to learn that I had caused the outage about a year earlier.

bArray··on Are arrays functions?
Forgetting Haskell, technically speaking, everything could be expressed as a function. I thought about writing a type of shell script that reflected everything as a function to clean up the likes of bash.

Take the command `ls` for example, it could be expressed as either:

    ls -la *.png # lazy
    ls(-la, *.png); # formal
For pipes, they could be expressed as either:

    ls -la *.png | grep cat # lazy
    ls(-la, *.png) | grep(cat)
    |(ls(-la, *.png), grep(cat)); # formal
I thought about writing this with something like Micropython that could have a very small memory footprint.
bArray··on Giving university exams in the age of chatbots
> I got a final project feedback from them that was clearly done by an LLM

I've heard of this and have been offered "pre-prepared written feedback banks" for questions, but I write all of my feedback from scratch every time. I don't think students should have their work marked by an LLM or feedback given via an LLM.

An LLM could have a place in modern marking, though. A student submits a piece of work and you may have some high level questions:

1. Is this the work of an LLM?

2. Is this work replicated elsewhere?

3. Is there evidence of poor writing in this work?

4. Are there examples where the project is inconsistent or nonsensical?

And then the LLM could point to areas of interest for the marker to check. This wouldn't be to replace a full read, but would be the equivalent of passing a report to a colleague and saying "is there anything you think I missed here?".

bArray··on Giving university exams in the age of chatbots
I personally don't believe that terrible handwriting should have any hold over a computer science student.
bArray··on Giving university exams in the age of chatbots
For large classes or test questions used over multiple years, you need to take care that the answers are not shared. It means having large question banks which will be slowly collected. A good question can take a while to design, and it can be leaked very easily.
bArray··on Nvidia Stock Crash Prediction
> My 30k ft view is that the stock will inevitably slide as AI datacenter spending goes down. Right now Nvidia is flying high because datacenters are breaking ground everywhere but eventually that will come to an end as the supply of compute goes up.

Exactly, it is currently priced as though infinite GPUs are required indefinitely. Eventually most of the data centres and the gamers will have their GPUs, and demand will certainly decrease.

Before that, though, the data centres will likely fail to be built in full. Investors will eventually figure out that LLMs are still not profitable, no matter how many data centres you produce. People are interested in the product derivatives at a lower price than it costs to run them. The math ain't mathin'.

The longer it takes to get them all built, the more exposed they all are. Even if it turns out to be profitable, taking three years to build a data centre rather than one year is significant, as profit for these high-tech components falls off over time. And how many AI data centres do we really need?

I would go further and say that these long and complex supply chains are quite brittle. In 2019, a 13 minute power cut caused a loss of 10 weeks of memory stock [1]. Normally, the shops and warehouses act as a capacitor and can absorb small supply chain ripples. But now these components are being piped straight to data centres, they are far more sensitive to blips. What about a small issue in the silicon that means you damage large amounts of your stock trying to run it at full power through something like electromigration [2]. Or a random war...?

> The counterargument to this is that the "economic lifespan" of an Nvidia GPU is 1-3 years depending on where it's used so there's a case to be made that Nvidia will always have customers coming back for the latest and greatest chips. The problem I have with this argument is that it's simply unsustainable to be spending that much every 2-3 years and we're already seeing this as Google and others are extending their depreciation of GPU's to something like 5-7 years.

Yep. Nothing about this adds up. Existing data centres with proper infrastructure are being forced to extend use for previously uneconomical hardware because new data centres currently building infrastructure have run the price up so high. If Google really thought this new hardware was going to be so profitable, they would have bought it all up.

[1] https://blocksandfiles.com/2019/06/28/power-cut-flash-chip-p...

[2] https://www.pcworld.com/article/2415697/intels-crashing-13th...

bArray··on Giving university exams in the age of chatbots
> This approach still works, why do something else?

One issue is that the time provided to mark each piece of work continues to decrease. Sometimes you are only getting 15 minutes for 20 pages, and management believe that you can mark back-to-back from 9-5 with a half hour lunch. The only thing keeping people sane is the students that fail to submit, or submit something obviously sub-par. So where possible, even for designing exams, you try to limit text altogether. Multiple choice, drawing lines, a basic diagram, a calculation, etc.

Some students have terrible handwriting. I wouldn't be against the use of a dumb terminal in an exam room/hall. Maybe in the background it could be syncing the text and backing it up.

> Unless you're specifically testing a student's ability to Google, they don't need access to it.

I've been the person testing students, and I don't always remember everything. Sometimes it is good enough for the students to demonstrate that they understand the topic enough to know where to find the correct information based on a good intuition.

bArray··on x86 prefixes and escape opcodes flowchart
Copy the URL and manually paste it into a new tab, no referrer then.
bArray··on Iterative image reconstruction using random cubic bézier strokes
I wrote something similar years ago, which would instead convert an image into a mesh of polygons. The idea was to have a vector low-size SVG that could be used as an image placeholder or background for web pages.

I think I lost the code, but it was initially a genetic algorithm that randomly placed overlapping polygons, but the later improved method had connected polygons that shared points - which was far more computationally cheaper.

Another method I explored was to compose a representative image via a two-colour binarised bitmap, which provided a pixelated version of the image as a placeholder.

The core idea is that you drop the image as a small Data URI straight into the page, and then fetch the high-detail version later. From the user's perspective, they are getting a very usable web page early on, even on poor connections.

bArray··on Cardputer uLisp Machine (2024)
> How much time could you conceivably use this for?

I also thought the same. It's a nice feature to have, but typing out significant code on that keyboard is a burden compared to a full-sized keyboard. Plus, it's not small enough to carry on the daily.

I personally believe the correct form factor for such devices is a smart watch, where code is written off-device and deployed to it, and the results of the code can be enjoyed throughout the day.

For example, I've developed(/ing) a Micropython based smart watch [1] where code is deployed onto the watch. The idea is to be able to deploy apps and interact with them via a simple interface. Being able to interact with my code daily helps keep the device relevant and to be able to make continual progress.

[1] https://coffeespace.org.uk/projects/smart-watch-v2.html

bArray··on Ask HN: Share your personal website
https://coffeespace.org.uk - started 2014

In a recent article I wrote about an ongoing ESP32-based custom smart watch: https://coffeespace.org.uk/projects/smart-watch-v2.html

bArray··on GitHub should charge everyone $1 more per month to fund open source
$1 USD is ~90 Indian Rupees, 1450 Argentinian Peso or over 1 million Iranian Rial [1]. In some places, $1 USD could be a week's work. On the collection side, you could be seriously over-charging people. On the distribution side, you could be seriously overpaying people for their work - and encourage scams, etc.

> GitHub should charge every org $1 more per user per month and direct it into an Open Source fund, held in escrow.

Sure. It'll be some charity, then somebody gets paid $200k+ per year to distribute what remains after they've taken the majority, all whilst avoiding most taxes. To receive the money the person has to ID themselves, financial background checks need to be done, a minimum amount needs to be reached before a payment is made, and then after passing through multiple wanting hands, they end up with a fraction.

> Those funds would then be distributed by usage - every mention in a package.json or requirements.txt gets you a piece of the pie.

What even is "usage"? How many times it appears in a number of repos? How many users there are of the project? Is the usefulness and value of a project limited to the number of people that directly use it?

> Or don’t! Let’s not do anything! People’s code and efforts - fueling incredibly critical bits of infrastructure all around the world - should just be up for grabs. Haha! Suckers!

> Anyway, you all smarter than me people can figure it out. I just cannot accept that what we have is “GOOD”. xx

It's entirely possible you can make things worse by avoiding doing nothing. Sometimes in life you have to pick the lesser of evils.

[1] https://www.x-rates.com/table/?from=USD&amount=1

bArray··on 39c3: In-house electronics manufacturing from scratch: How hard can it be? [video]
> For higher-end board that seems likely. For cheap hobby-grade boards just the job fee[1] is more than 10 boards delivered is from JLCPCB.

Just checked myself using a board I already had manufactured, and can confirm it's a lot higher than JLCPCB or PCBWay.

Maybe for rapid prototyping it is okay, but at scale, to make one board is more than the entire selling point of the whole device.

bArray··on BasiliskII Macintosh 68k Emulator Ported to ESP32-P4 / M5Stack Tab5
Looking at the M5Stack Tab5 IoT Development Kit [1] based on the ESP32-P4 - it's a really nice piece of kit.

[1] https://shop.m5stack.com/products/m5stack-tab5-iot-developme...

bArray··on Spherical Snake
Quite a good implementation, got to 62 and was playing a "space filling curve" strategy to bleed off some of the length. Looking at the leader-board I suspect some people are just sending off their own custom submissions [1].

[1] https://kevinalbs.com/spherical_snake/leaderboard/

bArray··on Vietnam bans unskippable ads
I love the picture of politicians sitting by themselves, annoyed by something as all other people are, and thinking "there's nothing I can do about it". Good on Vietnam for actually doing something about it.

I got a taste of this from an EU MEP that I proposed something to, and they replied "it can't be done because of the law". I then replied "but you make the law, it's literally your job!" - and they looked at me, blank faced. Imagine large rooms filled with people who mindlessly act within a framework they dislike, whilst being the only people who could actually change it, and not having the will to do so. It sounds like some special type of hell.

I shudder to think how many people sitting in positions of power just mindlessly continue doing a thing because of some form of complacency. Madness.

bArray··on Sandboxing Untrusted Python
I have been thinking about this myself, but am still not convinced about how to run untrusted Python code. I'm not convinced that the right solution is to run the code as WebASM [1].

I have been looking towards some kind of quick-start qemu option as a possibility, but the project will take a while.

[1] https://github.com/mavdol/capsule

bArray··on Sandboxing Untrusted Python
See the linked project at the end: https://github.com/mavdol/capsule
bArray··on Say No to Palantir in the NHS
> NHS England is rolling out software to run our health records from Palantir – a US spy-tech firm that has supported mass deportation in the US and enabled genocide in Gaza.

Forget politics, not everything has to be framed this way. This is simply something that should be done in-house. What if the UK's relations with the US break down, or there is a cyber attack on the infrastructure?

> One of Palantir’s founders is also openly against the NHS. Peter Thiel claimed it “makes people sick” and said that the British people love the NHS because we’re suffering from Stockholm syndrome.

Is the insinuation that Thiel will sabotage the NHS servers because he wants to see it fail, at the cost of billions if he were to be caught? Do we have to be politically aligned with absolutely everybody at all times in every part of life in order to be able to function?

> With the government putting NHS trusts under pressure to adopt the software, we need to act right now. If you want to keep Palantir out of our NHS, send an email to your local trust and Wes Streeting, secretary of state for health.

This Wes Streeting guy has a high chance of being the next UK Prime Minister in early 2026.

bArray··on We replaced H.264 streaming with JPEG screenshots (and it worked better)
I've literally been here (many) years ago whilst trying to stream video from a potato Linux SBC via WiFi. As you walked further away, the H264 stream would just die and hang, no matter what you did. Stream JPEGs? Worked excellently and adjusted the number of JPEGs per second depending on connection (only requested the next frame after the current one arrived or a timeout occurred).

This got me thinking about video calls, which have be notoriously bad on bad connections. Half the time I am just streaming a screen with static information on it, we're not watching videos together. And yet the streaming pipeline is optimised as this article suggests for the higher bandwidth modes - when we're never really using it at all.

The most important part about a video call is rarely the video, is usually the audio. It's counter-intuitive but you are better off having your call without video than you are without sound, and yet when the video falls over it takes the audio with it. Insanity!

bArray··on Fabrice Bellard Releases MicroQuickJS
And if you find you need more features than that - just build an app, don't make the web browser into some overly bloated app!
bArray··on Fabrice Bellard Releases MicroQuickJS
If there were some form of "developed contributions to computing" award, his name is definitely up there. I think there could be a need for such an award - for people who reliably have created the foundations of modern computing. Otherwise it's almost always things from an academic context, which can be a little too abstract.
bArray··on The Polyglot NixOS
> So do we want to do: We want to build one disk image that boots on x86_64, ARM AArch64, and RISC-V 64-bit. We limit ourselves here to UEFI platforms, which makes this pretty straight forward.

It kind of feels like this should have been the default across all architectures - a single disk that supports multiple instruction sets. 32 bit? 64 bit? Intel x86? Intel x86_64? RISC-V? Imagine how much simpler it would be for the end-user.

I still believe to this day that it has been a massive mistake to not ship ARM devices with some form of BIOS/UEFI chip to allow the system to boot without a bootable image.

bArray··on Your Supabase is public if you turn off RLS
> Of course when a friend sends me their new project my natural tendency is to try hack it.

Yep. Probably the most relatable tech friend thing to do. I send my projects to friends and get a list of improvement suggestions, it's always fun!

bArray··on CEOs to Keep Spending on AI, Despite Spotty Returns
> Having seen a lot of AI-generated ads, I'm so skeptical that AI is actually improving marketing metrics.

I'm sure that firing tonnes of marketing people for prompt engineers will be a good return on investment... Perhaps it reveals something deeper - which is that a 30 second Youtube ad doesn't generate that much revenue at all.

> With that said, I'm long-term bullish on AI

In the long run, yes. But a lot of people will end up losing their shirts over this.

← PreviousPage 5 of 34Next →