HNHacker News
TopNewBestAskShowJobs

ghoul2

1,308 karma · joined August 28, 2010

Embedded Linux consultant with 20 years of idea-to-product development (C/C++/Go/Python/Node, Linux Kernel, Buildroot/Yocto/Custom), hardware-software co-design. If you have a viable Idea, I can build it into a product - efficiently and fast. Please reach out on email.

email: 600kvv0rm@gmail.com

submissionscomments
ghoul2··on US Court nullifies FTC requirement for click-to-cancel
Thats how it works in India: all your "repeating" charge authorizations show up on a portal maintained by the issuing bank. All services that charge via these authorizations send an SMS alert before they debit the next charge. At any time, you can go into the portal and cancel any of these authorizations. No need to talk to the charging co at all, though still, best to first cancel from them. Jus that they know its trivial for the user to go and cancel the auth, so no one makes it difficult to cancel.
ghoul2··on Cloudflare's Expanded Startup Program
Google does this: 100% discount for upto 100K of usage the first year, and 25% discount upto 100K for the second year.

But I disagree: I think what AWS does is a LOT better: credits last two years, which is a lot more practical (if i migrate to AWS for the credits, I have two years during which I don't have to consider migrating again), plus with the upfront payment plans, I can even stretch the credits to a third year. I like that a LOT better.

ghoul2··on Tail Call Recursion in Java with ASM (2023)
Sigh. I have been kicking this horse forever as well: an "optimization" implies just a performance improvement.

Tail call elimination, if it exists in a language, allows coding certain (even infinite) loops as recursion - making loop data flow explicit, easier to analyze, and at least in theory, easier to vectorize/parallelize, etc

But if a language/runtime doesn't do tail call elimination, then you CAN'T code up loops as recursion, as you would be destroying you stack. So the WAY you code, structure it, must be different.

Its NOT an optimization.

I have no idea who even came up with that expression.

ghoul2··on Show HN: Sort lines semantically using llm-sort
Given that the comparison function doesn't have the transitive property (if line a > line b and line b > line c that implies line a > line c), does this sort really work?

The 'allpair' variant, which aggregates the score across all n*(n-1) comparisons will work, but the other two couldn't possibly have stable results - it would depend on the order of the items in the input.

ghoul2··on How well does your LLM do?
R1 got it correct in one shot, I just pasted the statement.
ghoul2··on Ask HN: Who wants to be hired? (February 2025)
Are you open to relocating within India?
ghoul2··on How to build your own ZX80/ZX81 (2019)
Whoa. Are you me?

Same here. Lived in India, my fathers' friend (based in the UK) gifted him a ZX Spectrum. I was hooked from the day I typed 10 PRINT "myname" on it. Taught myself Z80 assembly, just from the appendix in the Spectrum programmers manual that listed the opcode encodings and mnemonics (mostly just guessing what the opcode did from the mnemonic) - at around 10 years old, I could hand-write and hand-encode the assembly code without needing to lookup the opcode encodings.

I was 6 years old at the time.

Completely determined the trajectory of my life/career.

ghoul2··on Is Cloudflare overcharging us for their images service?
Honestly, the main point of the story here isn't the weird billing processes.

Its, yet again, the utter refusal by CF to provide even basic support. Even for paying users. Even for users who bought the so-called "pro" plan, mainly so that they can access the support that comes with it.

I myself had a metering/billing issue that:

1. I first posted on the forum. Instead of responding there, I was told by staff to raise a ticket. 2. No response to the ticket. Autoclosed after ~1 month. 3. I immediately reopen it. No response, autoclosed after ~1 month. 4. Repeat, for 5 months. 5. Then, I wrote an angry rant in the ticket, and finally the support response arrives: "the customer is misinterpreting the reported numbers, they mean X, not Y". Fair, enough, not obvious from the UI, but could you not have told me this without so much ... friction?

I love what CF has built (I even own a small amount of stock!). Its not perfect, but its far more of a serveless/cloud model than any other player. Makes so many things so much easier.

But, _PLEASE_, CF: improve tooling, and commit to a basic level of support.

ghoul2··on The Most Common Last Name in Every Country
sigh. They picked "devi" for India. "Devi" is not a last name. Literally it means "goddess". Its used as a suffix to indicate "woman"/"lady". If they picked "Devi" for India, they should have picked "Mr"/"Mrs" for the US.
ghoul2··on Run llama3 locally with 1M token context
I agree, definitely a game changer. Finally made me a convert.

re latency: yes, latency can get quite high, for large contexts. minutes, 10s of minutes when you try to max out the context.

ghoul2··on Ask HN: Do you use ChatGPT to generate code? What were your experiences?
gemini 1.5 pro is very good. far from perfect, but the long context window helps it stay focussed when iterating on a code base. I tried chatgpt, etc, but it was obvious (to me) that I was wasting more time trying to get these models to work right - I could have just coded it myself faster. But Gemini 1.5 pro has changed that. For moderate-sized stuff (mainly automation, ops scripts etc), its now my goto. And I discovered its much better at golang than even at python. I have converted quite a few fairly-complex python/shell scripts, with feature additions and cleanups, to golang code using gemini 1.5 pro. Just give it the original code, ask it to redo it in golang, and then keep prompting it to add feature-after-feature. One main advantage of this is golang can be cross-compiled to other OSen, and generated a single, stand-alone binary - this means I can distribute these scripts/utilities easily - while I could not do the same for python or shell, as people who would use them are on windows typically.

So gemini 1.5 pro has enabled scenarios which were remaining un-done earlier: It was too much work to deploy and keep updated the bash/python scripts on other peoples computers, and it was not worth my time to develop these automations in golang from the get-go. But with this, I hand out management scripts like candy to other users, dramatically reducing dependence on me.

ghoul2··on The 'blem wit' error messages: Things get terse (2008)
In the late 90s, DOS-era, I was working on a simulation in Matlab. Something just wasn't working right - as per the limited docs. Getting very frustrated, I typed "f_ck you" on the matlab prompt. It came back with "Your place or mine?".

This was so unexpected, I burst out laughing. Definitely released some stress. I went looking for how this worked: turns out matlab had a "command" called "f_ck" and it had 10-something fixed messages as responses hard-coded into it. It would return one of these randomly.

ghoul2··on Diffoscope – In-depth comparison of files, archives, and directories
When I was working on Othernet (www.othernet.is), I wanted to do Over-The-Air updates of our firmware. Over a unidirectional, slow (~20kbps), broadcast satellite link with significant packet dropout this was quite a challenge. Amongst the many tools that helped in making it work was diffoscope. I used it to make our buildroot-based firmware have deterministic, minimal-diff build, thus reducing the amount of update I needed to send out.

For a few weeks, I simply iterated between building the firmware, using diffoscope to diff the new build against a previous build to find what files changed and where, fix buildroot packages to eliminate these file changes whereever possible, lather-rinse-repeat.

In the end I was able to reduce our OTA update sizes to a typical 20-50KB (base, compressed firmware image as 30MB).

Fun times!

ghoul2··on Cream is thicker than blood: the rise and fall of the Devon split
Oh wow. I thought this was just my personal quirk. I absolutely cannot tolerate malai in my milk. I (involuntarily) spit the milk out if the mouthful happened to have even small bits of malai.
ghoul2··on Show HN: Material Files – Open Source Material Design File Manager for Android
Could you possibly add NFS (client) support?
ghoul2··on Before-and-after images show how Greenland's glaciers have rapidly retreated
I visited Franz Josef glacier twice, once in 2000 and next in 2002. Just between those two years the retreat was so major, it spooked me. First time, one crossed the bridge and within a couple minutes walk you were at the mouth of the glacier. Two years later, it was now over a half-n-hour walk.
ghoul2··on Ask HN: How would you build a budget CPU compute cluster in 2023?
I have been wanting to do something similar. But there's a snag:

How do you tell which of these available boxes has Intel AMT (or its AMD equivalent) fully enabled?

No listing reports this, and sellers seem to not be able to answer the question either.

How did you figure that out? Or are you managing without remote management? If so, how?

ghoul2··on Analog computing may be coming back
As I understand it, analog computing is entirely impractical simply from a Information Theoretic viewpoint.

For a signal to convey 8-bits worth of information, it will need to have 256 distinct levels. It we want the signal to range from, lets say, 0 to 5v (which is already quite high), each level only has about 2mV range. This much can easily come from cross-talk, EMI and power supply noise. So all your logic/calculation will be wrong.

Once you start talking about 16 bits, it becomes entirely ridiculous: we now can only have 75uV range for each level. This is getting into RF interference territory - just receiving a phone call close to such an analog signal would disrupt it.

The way I understand it, there is simply not enough SNR available in our electronics (on die traces or PCB traces) for analog computing to work. Thats why we restrict the number of level we use in our signal: digital being just two level, but even with higher level-counts, we typically use 4 levels or 8. This is somewhat analog, but not really.

I am not an EE, so I am entirely open to being corrected on this.

ghoul2··on Ask HN: Declarative HTTP API test DSL/tool?
YES! Thank you! Not being able to find it was driving me nuts.
ghoul2··on Detailed list of USB WiFi adapters that work well with Linux
This is fantastic. I have wasted SO much time trying to choose the right wifi adapter/chipset for projects over the years. Combination of in-kernel-driver status, cost of adapter/chipset, support for Soft-AP, USB-vs-SDIO interface support - all factors need to satisfied.

They only way of figuring it out is to trawl thru the kernel sources (for whichever version is required for the project) and look into the driver defines one-by-one checking for each feature.

I wish they would add a separate list of adapters that support Soft-AP.

ghoul2··on Ask HN: Host a website from a living room in 2022?
Enable read-only overlay for your rootfs and make your /boot readonly. Just use raspi-config, and go into performance options.

There are some gotchas - everything you write after that goes to a tmpfs. Meaning it starts cutting into your available RAM. So this overlay is only really useful if you are using the high-memory variants like the 4GB/8GB RPI4. With the 1GB Pi variants, this gets painful.

Alternatively, You could setup a cron job to reboot every night thus clearing the tmpfs.

Do remember to disable the overlay (and make /boot rw) every few weeks to apply updates.

ghoul2··on Pup: Parsing HTML at the command line
Is there a tool to transform html?

Simple example, select all img tags without alt text, and insert given text into the alt tag. Or change the domain for all a.hrefs

ghoul2··on Ask HN: What are your favorite books/courses of 2022? Why?
I agree - Scrimba is terrific.

My only complaint with their system is there is no way for the course to work offline.

ghoul2··on I finally found a use case for my Raspberry Pi Model B+
SD card corruption is a big problem with the Pi, but its easily solved: enable the read-only overlay for your boot/root filesystems. This is built into the RPI OS. start raspi-config, and go into performance options.

Every month or two, disable the overlay (again using raspi-config), reboot, apply updates, re-enable the overlay, and you are good to go.

Also, if you are using a PI4, switch to booting from a USB stick and just forget about the SDcard.

ghoul2··on WriteFreely: Open source federated microblogging platform
Airtel, one of the largest Indian ISPs - does not put users behind CGNAT. Plus, now that they have deployed IPv6, each of your devices gets a routable ipv6 (bit scary when I first discovered that!). So if you use airtel as an ISP, you can definitely self host: on IPV4 using the right port mapping, or on ipv6 without any additional configuration.

Additionally, airtel uses pppoe. If you wish, you can connect a PI to your airtel modem via a bridged connection (look in your airtel modem configuration) and then just run pppd and get a dedicated (though still dynamic!) IPV4 for your PI - seperate from the rest of your network. It works beautifully!

ghoul2··on India is almost 80% IPv6
This is required by law. [0][1] Every ISP is required to be fully ipv6-enabled by the end of this year. The deadline has been pushed back multiple times , most recently due to covid. But this time it seems its going to stick. All lagging ISPs seem to have deployed v6 at this time.

There has been a "National IPV6 Plan" in place since 2010, and full coverage has been pushed under that plan in stages. Anyone interested can read all about it in (extensive) detail[2].

0. https://dot.gov.in/ipv6-transition

1. https://dot.gov.in/sites/default/files/Revision%20in%20IPV6%...

2. https://dot.gov.in/sites/default/files/2016_11_18%20IPv6%20N...

ghoul2··on Tell HN: PayPal Charges 10.57% in Fee (USD-INR)
Best I understand it, this is required by Indian rules. They cannot permit you to carry out "banking" transactions with your paypal account. Meaning the dollars received must get back to a "real" bank account denominated in INR. And any USD you need to send out must be obtained by sourcing INR from your bank account, going thru RBI to get those USD (so they can monitor and control forex flows, including annual limits etc).

In brief, paypal is not a bank (in India) and is not allowed to act like one. Any money it receives it needs to transfer to a real bank immediately, and money to be sent out must come from a real bank as well.

ghoul2··on Analog Phones
On a slight tangent: is there a "modern" (single-chip?) landline telephone design available anywhere? Everything I search for ends up being about cellular phones. I find old circuits built around opamps, and thats fine - I just expected to see a single-chip solution handling ring tones, keypad, caller-id etc - but haven't found one.

On that topic, is there an (available) DECT-based solution as well?

ghoul2··on 3M tape with anisotropic z-axis electrical conductivity
Oh, I had a cheap magnifying glass; And I had access to a "Community Science Center" where they would have let me use a high-school-class microscope if I begged enough* . The problem was it didn't even occur to me to take that tiny rubbery strip that seriously. True shame really - by that time I had taken apart enough LCD calculators for there to be nothing surprising in any of them. This was the first surprise, in a while. I really should have focused on figuring it out. Just never occurred to me that the 10mmx1mmx1mm thingy was such an awesome thing.

*for free too; It was my favorite Saturday hangout spot - watching lab demonstrations, animal dissections etc, playing with the ever-changing interactive science demos).

ghoul2··on 3M tape with anisotropic z-axis electrical conductivity
This stuff confused the hell out of me as a 6-yr old electronics hobbyist (read unskilled-tear-downer). Took apart a non-functioning lcd calculator. Everything looked normal, except the lcd display itself was just pressed onto a rubbery tape like thing which seemed to be stuck to a line of pads in the pcb.

I expected a flex cable connecting the lcd to the PCB but couldn't find one. I 'knew' rubber was an insulator, so no matter what that rubbery thing was (I guessed it was simply a spacer) it wasn't the connection between the two.

Didn't learn about the existence of z-tape for another decade or so and immediately the light bulb in my brain flashed, solving a childhood mystery.

← PreviousPage 2 of 6Next →