HNHacker News
TopNewBestAskShowJobs

ghoul2

1,309 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 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.

ghoul2··on Shine: A super fast fixed-point MP3 encoder
Ah yes, should have guessed. WMA was pretty big in the early 2000s. Around 2004 I even had access to the official wma source from Microsoft.

Spent about 4 months porting and then optimizing the wma decoder on a proprietary very-low-power dsp. It was hard work, but I got it down to about 12mhz for real-time decode on the dsp. The product this was intended for was going to be powered by a watch battery - hence the extreme optimization requirement. The source code, as received, used to consume ~400mhz on an athlon iirc. But with a lot of assistance from the dsp hardware and 4 months of elbow grease it could decode in less than 12mhz - for some profiles. Insane codebase!

ghoul2··on Shine: A super fast fixed-point MP3 encoder
Exactly right. Due to the missing psycoacoustic model, Shine can't really compress well. Don't even bother with bitrates lower than 128kbps if you want your audio to sound decent. But exactly due to the lack of the psycoacoustic model, its very light on cpu and memory, and perfect for the specific embedded use cases where encoded bitrate is not a concern.
ghoul2··on Shine: A super fast fixed-point MP3 encoder
I am aware of lyra. Its pretty good. Very computationally expensive though - no audio application I have ever worked on had even close to the power/thermal budgets that would allow use of the deep-learning codecs. Maybe someday we will get very low-energy hardware accelerators for them, but until then, these are a non-starter for things I work on.

The thing is (and maybe this is a nitpick), once you are down to several hundred bps for speech, its getting to be more like speech-to-text (the encoder) and text-to-speech (decoder) than an audio codec.

I am actually not aware of any non-speech audio codecs which can go that low. Any links?

ghoul2··on Shine: A super fast fixed-point MP3 encoder
What codec did you use for your 8000bps? In my experience opus is the only codec that can encode general audio to an "acceptable" (for low values of acceptable) quality at that bitrate. There are speech codecs that can go below 2kbps, but they are useless for non-speech audio (and are also very computationally expensive).

Opus is simply magic. Iirc, they now even have a 6kbps mode.

ghoul2··on Shine: A super fast fixed-point MP3 encoder
Wow, nice seeing this here. Shine was a life saver when I was building the live broadcast capability of othernet.is.

Our Satellite link was really low bitrate ( less than 20kbps). I wanted to keep as much of that as possible for the data-casting part, which was our core offering. So after experimenting with varioud codecs I narrowed down to using Opus@8kbps as my downlink from the satellite to our custom receivers. The problem was, Opus wasn't natively supported as a codec by most browsers (Safari being a major culprit). In fact after analysis, I found the only format that could be reliably played on every browser (including mobile) is mp3. So the solution I derived was to have the downlink in opus, decode that on the reciver, reencode it to mp3, and stream that out to the users browser. Now the reciever was a very low end linux device - 1GHz Arm6, 256MB ram - that ran the entire stack. Satellite receiver, UI server, filesystem maintenance, Wifi Hotspot (softAP). We also didn't want to load it down with large heat sinks or fans as a design goal. So the cpu could not be loaded to its full capacity. Every other MP3 encoder I tried was too heavy duty, and would cause thermal issues for the SoC. But Shine worked perfectly - total cpu consumption remaining less than 10% for real time decoding (from opus) and encoding (to mp3).

ghoul2··on A New Library for Network Optimization
Tangentially related: For my masters thesis I developed a framework to model biological reaction networks as electrical circuit elements - concentrations as capacitors, enzymatic activities as (reciprocal of) resistance, etc. This allowed an easy description of the reactions, and then simulations using spice. This was a while back, and good biochem simulation software wasn't available.

My solution was far from perfect, but as a 20-year-old, I was rather proud :D

ghoul2··on Android 13 virtualization lets Pixel 6 run Windows 11, Linux distributions
Yes, and that can improve the situation a bit, but it quickly becomes a tail-wagging-the-dog situation. A heatsink requires very good thermal contact with the main heat-dissipating elements - the SoC, the DRAM, the flash, and the radios to be effective. None of those are easily accessible on a phone unless you are willing to dissassemble it entirely. And even then the contact with the heat sink will be poor due to the package and the other components.

An external case can help to a very limited extent. I tried attaching a large PC heatsink, and it did help, but not to the extent that made the "server" any good. I just switched it out for a 50$ RPI4 and its vastly better in pretty much every way.

ghoul2··on Android 13 virtualization lets Pixel 6 run Windows 11, Linux distributions
I did this a while back with a Pixel 2. I decided it wasn't worth the trouble.

Phones are not designed for continuous power draw (and consequent heat dissipation) - contant-use power dissipation limits are very low. The performance dips dramatically, and the constant high temperature kills the onboard flash prematurely. Same thing applies to the radios - wifi and cellular. Sustained data transfer on either of those interfaces causes issues - dropouts/disconnects/thermal reboots.

This is in addition to the fact that phones just don't have great I/O.

ghoul2··on Ask HN: General Mood of the Community
Huh. My algorithm, exactly!

I quit slashdot when basically every story started hitting 100+ comments. When 100+ comment stories were maybe once-a-day thing, slashdot was an outstanding board.

I have noticed the rule applies very widely, including on subreddits.

ghoul2··on Ask HN: Is Hacker News Blocked in India?
I raised a ticket with Airtel - their technical team called back and said they were having "routing table" issues and that they were working to fix it. He was unable to provide more details and did not provide a time-to-fix.
ghoul2··on Remember Aaron Swartz
protecting and replicating sci-hub is probably one of the better ways to remember him.
ghoul2··on Ask HN: Anyone else having trouble reaching HN from Airtel (India)?
I raised a ticket with Airtel. First time in my 16-year customer-ship with them I have had to raise a technical ticket.

Someone called back from their technical team and said they are working on the problem, they are having a "routing table" issue. He was unable to give me anything more specific, and was unwilling to give me a time-to-fix.

Lets see.

ghoul2··on RasPBX Installation for Beginners
That needs the "boot host" rpi to be a usb device or usb otg - afaik, only the pi0 and pi4 have usb otg. These can emulate a usb storage device via the usb gadget subsystem. Additionally, only RPI4 has USB boot capability, and it does not work with all usb devices.

More importantly - something like this can only be hooked up to _one_ boot device, so the usb hub and multiple pi's are a no go. I don't see any advantage compared to just using a usb stick instead of making a rp0/rpi4 pretend to be a usb stick.

You should look into network booting the multiple pi's - if thats suitable for your use case. You will still need an sdcard in each pi to provide the network bootloader, but once the boot is done, the sdcard isn 't used anymore (until the next boot)

ghoul2··on RasPBX Installation for Beginners
Its true that buildroot/yocto-based immutable images are a lot more resilient and prevent regular sd-card death, for most one-off uses you can get 90% of the way by simply using the "overlay file system" option in raspi-config already built-into the Raspberrypi OS.

Essentially, you start with your Rpi OS, configure it the way you want it - install services etc, and once you are done, just do "sudo raspi-config", select "Performance Options" and under that enable "overlay file system" (also select "read-only /boot" when asked). Reboot when prompted to complete this setup.

This will cause all changes to go to a temporary ramfs - and these changes will be lost on reboot. Most importantly, this means your SDcard won't be written to at all during normal operation. Do note that if you are using one of the older Rpis with 1GB RAM, you might face issues with RAM availability - depending on the amount of changes you make while the overlay is enabled. RPI4 variants with 4GB/8GB ram work really well, though.

If you do need to make persistent changes, just repeat the process starting with "sudo raspi-config", disable the overlay and read-only /boot, reboot, make changes, then renable the overlay. Its is a good idea to do an apt update/upgrade every month of so after disabling overlay.

Another thing you can do is to simply use USB sticks or USB drives as boot media (on RPI4). Those have much better lifetimes than sdcards, and are much faster as well.

While this does not compare to the performance/speed/safety/etc of a fully custom buildroot/yocto image, its a good compromise considering its almost effortless.

Shameless plug: I build such custom OS images for RPI and other SBCs for a living.

ghoul2··on Elfshaker: Version control system fine-tuned for binaries
If I already have, lets say a 100MB pack file containing (say) 200 builds of clang and then I import the 201st build into that pack file - is it possible to send across a small delta of this new, updated pack file to someone else who already had the older pack file (with 200 builds) such that they can apply the delta to the old pack and get the new pack containing 201 builds?
ghoul2··on My letter to Medicaid, appealing my child's Medicaid denial
writing to government(s) isn't going to do much, I believe.

Denial of policy renewal - if thats what you are saying is happening - is indeed illegal. Instead of wasting time, you should file a writ petition in your jurisdictional High Court, and make sure your lawyer does not let the matter go on for "date after date". If you can't afford a lawyer, this is something you can try to file on your own - High courts tend to take dim views of such behaviour by companies, and don't stand too much on ceremony. There are people called "law clerks" that operate on the High court campuses. They are the ones who do all the paper work for all lawyers (excluding actually drafting) - and they tend to be underpaid. Find one of them who is willing to help you unofficially for a small fee - this will help you take care of the basics (you need this form, so much fee stamps, this signature here, etc etc - this is needed to just get the matter before a judge). Once it goes in front of a judge, plead your case in normal speech, respectfully, without theatrics, and state the remedy you are seeking.

ghoul2··on Things to say when you're losing a technical argument (2001)
At an Internet-major co in my country, my VP Engineering told me "We don't run stuff downloaded from the internet around here" - I was proposing to trial a Solr/Lucene based search backend as a replacement for the awful MySQL based hacked-together search they then had.

I wanted to ask him if he got his copies of Apache/Mysql/php/Redhat on government stamp paper. Instead, I quit two weeks later.

ghoul2··on In-ears headphones fit matters a lot
Slightly tangential: can anyone recommend a good _wired_ noise cancelling headset (with mic) that is powered off the cable (or is USB). That is, it doesn't need batteries at all.
ghoul2··on A World Without Sci-Hub
Everytime scihub is mentioned on HN, multiple comments go on about how it should go "distrubuted" - ipfs, torrents, etc. While the current database of scihub is hugely valuable and must be protected in whatever way we can, the true value of scihub is in the "invisible" network of sources for the papers - how quickly papers find their way into the scihub db once they are published. A non-updating scihub will start to depreciate in utility very quickly. _Thats_ the true value Alexandra E brings to scihub - and not easily replaced if she quits/gets into legal trouble/etc.
ghoul2··on Sir Clive Sinclair has died
heh. I fortunately did not know things like assemblers existed. I hand-assembled my assembly to machine code using the mnemonic table provided at the end of the programming manual. I had an entire diary full of columns of hand-encoded hex numbers (and a decimal column - you needed the numbers in decimal to "poke" them into RAM).
ghoul2··on Sir Clive Sinclair has died
Oh wow. Memories.

Sin/Cos were just the gateway drug. To do interesting stuff on the computer, I ended up learning matrix algebra (for rotating things on screen) and even simple calculus (filling out areas) years before they were mentioned at school. When school math caught up, my math grades shot thru the roof - while remaining a below-avg student on everything except math and science.

I used to literally bring the spectrum programming manual with me to all our vacations - using it to hand "assemble" assembly programs into machine code (I had never heard of an assembler - and I won't have had any way to get my hands on one even if I had known about them) so that I could type them in when we got back home.

ghoul2··on Sir Clive Sinclair has died
RIP Sir.

I was gifted the 48K when I was 6 yrs old - it changed my life. I am here because Sir Sinclair built a machine whose setup instructions said:

Now that you have set up the computer, you will want to use it. The rest of this booklet tells you how to do that; but in your impatience you will probably already have started pressing the keys on the keyboard, and discovered that this removes the copyright message. This is good; _you cannot harm the computer in this way._ Be bold. Experiment. If you get stuck, remember that you can always reset the computer to the original picture with the copyright message by taking out the '9V DC IN' plug and putting it back again. This should be the last resort because you lose all the information in the computer.

"You cannot harm the computer in this way."

That single sentence started a life long journey. I doubt I would have been bold enough at that age to mess around with one of our most valuable possessions.

ghoul2··on The Distribution Vector That Changed Linux Forever
On the topic of cloop, any idea why it never made it to mainline? Its hugely useful in itself, and I use it for some custom boot images built with buildroot, but it breaks on nearly every kernel upgrade. Also finding the latest cloop source always feels like a treasurehunt.

Everytime I ask about cloop in mainline, I get told to switch to squashfs - which is fine, just that cloop has uses well outside squashfs' domain.

ghoul2··on SciHub commits in court to not upload content from Indian publishers till Jan 6 [pdf]
Whats surprising is that SciHub actually appeared in court (thru counsel) at all. The petitioners (group of Indian science publishers) are seeking a ban on the sci-hub website(s) in India (via ISP blocks) and revelation of the people behind SciHub and its location.
ghoul2··on OpenWrt Joins Software Freedom Conservancy
Thank you.

Could you please link me to the specific AP you picked?

As an aside - this would make a good writeup if you had the time. Theres very little good info on this - at least that I could find.

ghoul2··on OpenWrt Joins Software Freedom Conservancy
I have been looking into this exact route. You sound like you have experience with this, so maybe you could give some recommendations:

a. How critical is it to use such dedicated hardware - could I use a RPI4 with an added usb3-gigabit eth adapter? (I don't need a wired lan, only a wifi one). How much worse would that be compared to the hw you link?

b. Which AP would you recommend? I think the Ubiquity AP lite one is reasonably low cost - are there better options with similar cost?

ghoul2··on Saving money on international payments as a remote freelancer
Tangentially related: is there any payment gateway that allows one to accept international payments (for SAAS) paid out to transferwise accounts? I know paypal doesn't connect with TW. Is there any other gateway that does? Especially for Freelancers (not operating as a business).
ghoul2··on Not everyone has an internal monologue
I actually didn't used to have this "internal monologue". Until a couple years ago - when it just sorta showed up. And at some point I became consciously aware of it - and its ...power, I guess. Without the inner monologue it had been impossible for me to have "insincere" conversations. Using that word for the lack for a better one - I mean where I am talking to someone and consciously controlling what I say instead of just freely saying whatever - now the monologue can sort of "front run" the conversation and help me control what I say. I had never under stood earlier how people managed to pull that off...and when the monologue showed up it was an "enlightenment under the bodhi tree" level event.

From the other comments:

1. I hated audio books before the monologue, and I still do after.

2. (from @echelon's post) I was quite imaginative before the monologue - but more in a sort of a fuzzy, visual way. I had entire fantasy realms just "visible" inside my head. After the monologue showed up, my imagination is more like @echelon describes - I can talk to/against myself, go off on variants of movies etc. I am not entirely sure, but I _think_ my visual imagination has gotten weaker though, and I find it harder to enjoy fantasy now. Could be just age though.

3. Can't seem to be able to turn it off, or control it entirely. The monologue is my worst critic - not a bad way, but it'd be nice for it to not _be_ there all the time.

ghoul2··on Ask HN: Who is hiring? (February 2019)
This sounds perfect. Except for the "citizenship is a job requirement" :-(
← PreviousPage 3 of 6Next →