HNHacker News
TopNewBestAskShowJobs

buserror

3,794 karma · joined April 29, 2015

UK: Linux Kernel Engineer & General embedded hard/soft; Author & Maintainer of various open source projects. https://github.com/buserror
submissionscomments
buserror··on Create diagrams with code using Graphviz
I use graphviz a lot; here I generate a 'call graph' of the codebase of simavr[0] as a pdf for example [1]. But I also use it for introspection for complex data structure.

[0]: http://github.com/buserror/simavr [1]: https://github.com/buserror/simavr/blob/master/doc/simavr_ca...

buserror··on Show HN: A library to add a command promp (and telnet) to your programs
Yes, I like the single macro, but that doesn't handle the multiple possible names, and multiple lines of help... but I agree, I probably will add a single alias for simple cases.
buserror··on Show HN: A library to add a command promp (and telnet) to your programs
Not in PASV mode, which is the only mode supported these days.
buserror··on Show HN: A library to add a command promp (and telnet) to your programs
Good idea, altho I will have to check if busybox telnet for example supports it.
buserror··on Show HN: A library to add a command promp (and telnet) to your programs
This is a "C19 lockdown project" -- I always want that feature in long running processes: quick way to do introspection in a program without having to create a whole subsystem for it. Also, a way to 'connect' back in, especially for programs that don't log anything.

Demo is in C, but it shouldnt be too hard to add bindings for other languages.

This is very fresh paint, it had a demo of "one" in one of my other program, so I do expect the odd issue!

buserror··on SketchUp Goes Subscription-Only
Completely agree here. I think subscribtions are bad for customers, AND THE DEVELOPERS too. Basically companies cut down on R&D instead of pushing on R&D to gain new upgrade and customers fees.

I bought GraphicConverter [1] a zillion years ago, and I just upgraded to their v11, and so I paid them probably more than I've ever paid any other software -- BUT, they always come up with a list of improvement 5 pages long, and I've been using that stuff on/off for 20+ years.

I have no problems pushing money their way, I know where that money is going ultimately. It certainly doesn't go in shareholder or marketing drone's pocket.

[1]: https://www.lemkesoft.de/en/products/graphicconverter/

buserror··on SketchUp Goes Subscription-Only
I think all these companies rely on /captive audiences/. ie people who have invested in their product already, and they can somehow "up sell" them the subscribtion for a while and it sounds like a GREAT plan.

However, any 'new' customer will not let themselves be trapped. It's happening with Adobe Photoshop and stuff, where they've been skinning their customer base for years, but quite frankly who would now as a new potiential customer decide to shackle themselves to that? I know quite a few people who will use inferior tools JUST so they don't have to hook up to Adobe blood-suck.

Say Adobe Lightroom. Super product, but updates started to slow down and slow down and WOW now look it's all ONLINE baby for a price. I bought all updates until LR6, but now I know it's a lot cheaper to archive my machine with LR6 in a corner and use it for my photo edit than switching to the 'super value online thingy' for $$$/year. I don't use it that much to want that, and next time I want to use it, it actually might be incompatible with /whatever is in my chain of hardware/ anyway.

I'm sad to say Sketchup is doing this, if they had a $100 upgrade price every year or so, I'd pay happily -- however here's lies the other main problem: these companies don't WANT to invest in R&D enough to have a 'valid' reason to have a new major version every 12-18 months, they actually think people will just keep paying.

Well guess what, perhaps some people will, but no NEW people will. In the case of sketchup, whatever the marketing blurbs have spattered about, NOTHING IS NEW for like 10 years, I mean, they try to add 'hooks' here and there, but the main program is exactly the same, same bugs for that long. I suspect the devs who know how to do matrix multiplication have long left after google dumped the product, and they are now left with a handful of webheads.

Do I want to pay for that?

Hmm wait until I clean the coffee off the front my t-shirt.

buserror··on Your First THINK C Program
It's still slow on -O0, it's slow because it doesn't approach the problem of compiling a complete program the right way, like these old compilers did. The fact that everything is a file, the fact that every single header needs to /searched for/ then /compiled/ millions of times, and optimized later on, without context; that is the problem.

I wrote applications that were shipped on millions of computers in the 90s and I didn't have to make hard choices for building, the debug version were quicker to build sure, but the Release versions weren't a chore to make, and I was often building PPC/68k/debug/release in one go.

Also, this is a ridiculous defence of autoshit stuff. It hasn't been needed for well over 20 years, it's only purpose is self propagation where "oh I need autoconf blah because otherwise I can't build everywhere" where there is so much standardisation these days that there are MOSTLY TWO choices for nix systems. Not only that but it fails* all the time, on embedded for example; it doesn't 'save' and give you portability, it just gives you a false assurance that you are doing 'the right thing' by using it, while it's broken is many other ways.

More often than not, you can replace all that garbage with a 1/2 page Makefile. Who the hell needs to check wether the compiler /works/ or strdup /exists/ and all that idiocy. Or add dependencies for stuff while 'pkg-config' exists anyway. Who the hell actually /needs/ 'libtool' when there's about (perhaps) 3 ways of making a shared library on a unix system? And who the hell want or have the time to go and debug some stupid arcane 'm4' file to fix the weird problems that comes up?

Disclaimer: I build embedded distros for fun and profit, I deal with that stuff /all the time/ and most of my 'compile time' for distros is not even spent actually 'compiling' stuff, it's spent in the 'configure' stage, and 90% of my time fixing portability problem isn't in the code, it's in the autoshit stuff that somehow breaks in some new, interesting way.

buserror··on Your First THINK C Program
THINK C was the straight successor of Lightspeed C, and I came from there, and before that from Turbo/TML Pascal on the IIgs.

Whatever people will say, I still miss these "one pass" compilers, they were amazing and peaked with CodeWarrior, the best development suite, ever, in my nearly 40 years experience.

Nowadays we see autoshit "configure" stuff and compilers like gcc (some) or clang (oh my frigging GOD!!) trawl their way slowly and painfully thru the most simple projects without even support for plain basic stuff like automatic precompiled headers.

Wow look, we've NEARLY got Link Time Optimization working (took decades), in 2020 whoohoo, I'm so delighted. I could compile hundred of thousands of lines of light C++ or (better) plain C 25 years ago on a much, MUCH slower machine, with an simple editor that used the compiler lexer output so you had highlighting, real indexing it was 'just there' and always right, and always blinding fast.

I'm pretty sure we are way worse than we were 20 years ago for tooling. I'm sure some people will disagree, these people haven't seen CodeWarrior chew thru hundreds and hundreds of files in seconds.

buserror··on About Musl
I do not have an explanation either. I'm more of a kernel guy so I realized it "should" have worked but it didn't. I suspect perhaps a thread wakening issue of some sort, as the connections were definitely 'queued' on the listen socket. I know that that same code worked perfectly with glibc!
buserror··on About Musl
I had some problems with musl last year and had to back out using it for an embedded system. Typically for example, 2 threads listening to their own socket bound using REUSEPORT wouldn't work; half the connection would arrive on a thread and the second one wouldn't get anything. That scared me a bit as I was on a deadline to deliver, so I had to quickly recompile my distro with glibc, and the problem disappeared.

I really wish it worked as I like the lean&mean&precise approach they've been using!

buserror··on Smart devices are eating the market for accessibly-priced watches
Funny that. I used to never wear a watch. I had a phone after all. One day I decided I might get myself a 'smartwatch' (primitive, it was about 5 years ago or so!) but not being sure I'd like 'wearing' a watch at all, I bought a cheap chinese automatic watch on Aliexpress for £9 shipped.

Guess what? I never bought a smartwatch, instead, I bought a whole collection of real watches, some vintage, some modern, some expensive, some cheapos and I love accessorising with them. Must have 20 of them by now.

The "crown" of my collection is a Bulova Spaceview in 18K gold. It's the nerd's nerd watch, it has A TRANSISTOR in it, a resonator, it 'humes' a 360hz faint hum, and was made in 1964 before Quartz was invented; that movement was onboard the Apollo missions. And that watch has no 'face' so all you see is the innards with the tuning fork in the middle, and a pair of tiny coils around it. </orgasm>

buserror··on GuiLite: Small, cute GUI effects you can reuse
I used Nuklear for a couple of project that needed a little bit of UI, it's pretty neat to add some UI to an OpenGL or similar project. It's more targeted at "game UIs" and the like tho, where the UI isn't the main component..
buserror··on The human body’s remarkable ability to adapt to the cold
Do it gradually -- first one arm, shoulder; then the other arm, shoulder, then your front, then your head, then lastly your back. Don't dither about it, but don't dive into it either :-)
buserror··on Slope Soaring Tips for Beginners (2004)
I do quite a bit of slope soaring in Wales, using 2m wide gliders. It's a lot of fun as the Kite come to check you out and fly with you sometimes.

it's really a GREAT way to enjoy R/C flying. No motor (some glider have fold out props that can be handy tho) and you can fly for HOURS using just the lift from the slope, it's amazing to try to 'park' the glider alongside you and try to keep it motionless, it's as close to anti-gravity as I'll ever taste!

Also, buy 3M tape, gorilla glue, and have your repair kit handy at the back of the car for the times where the wind is a little bit too fierce for your reflexes :-)

If you want a bit of a taster, download "Picasim" for your phone/tablet, it's really really good for training. No affiliation, just a very nice sim for the "sport".

buserror··on The human body’s remarkable ability to adapt to the cold
Well, nothing scientific than I'm aware of, strictly speaking, but I love the effect.

Right after the shower, you'll get super warm, even in winter. You're system just gets going to equalise your temperature.

Also, you'll be woken up no dithering about in a stupor until your coffee kicks in, it definitely gives you a kick in the backside to get going, so even just for that, it's worth it in my opinion.

And, I never get cold. I can work outside in a t-shirt in winter (UK winter) without feeling any cold.

buserror··on The human body’s remarkable ability to adapt to the cold
You get used to that cold shock, I take a cold shower every day for many many years, and quite frankly I don't feel a "cold shock" anymore, even in winter. It's really just requires a bit of training to get less sensitive to cold; on the other hand I also have a tendency to get warm a lot quicker, which can be a bit annoying sometimes. I keep my house at 18C and no warmer, when many people I know want 21C or sometime more...
buserror··on Using Anki to remember what you read
I agree. In fact, what I find the most interesting part about reading is .... forgetting about it! Basically concepts will sip thru, but learning the details is just a waste of brain cells, in my opinion.

Just leave the brain do it's job, don't read as it's a marathon, take breaks, think about that bits you've just read that was interesting, then promptly forget about it. You'll forget the details, but not the backbone of it.

Details don't matter in the end. Quite frankly the idea of knowing /by heart/ the name of the greek goddess blah blah blah he uses as an example would bore me solid. Worse, anyone knowing it and telling me about it would bore me solid :-)

buserror··on A new hash algorithm for Git
Of course they are ?!?!!? https://git-man-page-generator.lokaltog.net/

(never fails to amuse me)

buserror··on Ask HN: I think I’ve burnt out. What should I do?
Well, what's "tech" in my case, photography provided a hell of lot of things my nerdy side found interesting, optics formulas, sensors, films, whatever -- that's still 'tech'. You can't hide from tech for very long. Just curtain it carefully.

Picking up an arduino and 'waste' a couple of days making LED blink can be fantastically relaxing too.

buserror··on Ask HN: I think I’ve burnt out. What should I do?
I went thru that, without external support over 10 years ago -- basically my ability to concentrate and enjoy work vanished... It took me a year to 'recover' -- I don't think I was ever 100% of what I was before TBH, but it's because it helped me realise that there isn't JUST work that matters. I am a lot more pragmatic about work these days, and I no longer 'live to work' as I did before.

I don't know if any of these suggestions will help, but perhaps you should pick up a hobby, something that is not too taxing and is still rewarding. It can but doesn't have to be tech related either. For me it was Photography, and I do a lot of landscape photography to this day -- but it could be anything, perhaps these days I would pick Archery (field archery is a super way to 'zen' out).

The idea is to get back the feeling of doing something you enjoy, and it doesn't requires weeks of setup or zillions of hours of practice to enjoy yourself.

If your company is cool with it, perhaps negotiate a 4 day week, and take that one day for yourself to really unwind. Don't stare at the TV tho, so the thing you enjoy, and go out and do it.

But ultimately, what I suggest is that in the future you watch over your work/life balance. Take care of yourself!

buserror··on Bill Manning has died
Sorry but being from Europe, and not interested in TV sports, I didn't even know who he was. At all. I understand why they were flagged for that reason.

Sometimes I see <xxx> has died and it's clearly technology related, and I will click the link, and discover that this person was great even if I never knew their names, and I feel enriched.

I certainly wouldn't feel enriched being led to a basketball website.

buserror··on Assembly Language Programming: Still Relevant Today (2015)
I'm rarely keen on posting negatives on articles that clearly took a lot of time to make, but I think this requires a bit of correction.

I think this article is very, very simplistic. All of it relates to a 8 bits CPU that is 40+ years old.

I switched to HLL as soon as I could get my hand on a compiler, namely, UCSD Pascal at the time! Then the Pascal, then to C and then myriads of other languages. I covered 6502, Z80, 68k (all of them, to 68040), PowerPC (all of them from 601 prototypes to G5s), ARMs (more than I can count) and x86s (same).

True to be told, the assembly language I started with /helped a LOT/ with be becoming an efficient developer; a developer who understand what 'code' is being generated when he writes an expression, a statement, a loop, and one who understands what the runtime implication are for most of the 'sugar coating' HLL gives.

However, starting (a bit) with the 68k, then even more so with the PowerPC, it became pretty much impossible to write /from scratch/ an assembly equivalent that was QUICKER than the compiler generated code. That was 20+ years ago. DRAM latency happened, pipelining happened and SIMD happened.

Today, hand writing assembly is pretty much stupid on modern CPUs. Given the register files, timings, shadow registers, bus latencies etc etc the compiler will ALWAYS be better because there is so much criteria to think about when generating code...

I'm not saying that having the knowledge is not useful; the best use of assembly is to write some code il HLL, one that is supposed to be super-mega-critical-quick, then disassemble it and see how it looks. More often then not, you can't make it better than it is in situ -- most of the time you will gain is to prepare your data better, align it better etc etc -- basically, 'hinting' the compiler to do a better job. You can do serious code butchery like that, without a hint of assembler [0].

But really, I haven't written any assembly for /performance reasons/ in 15 years, and that was Altivec on PowerPC.

For 8 bits, it's all smooth as butter, but the article also doesn't take into account the massive progress in compilers; I'm the author of SimAVR [1] and I've seen my load of generated code for that CPU, and the GCC toolchain is /very hard to beat/ by hand these days.

[0]: critical audio loop on one of my old PCI card driver, converting float<->int, applying gain etc while using the register file to the max, and making most use of the pipelining of the G4 (at the time) https://gist.github.com/buserror/0a3a69cca927b8da6c9c7ee1605... -- note, the inner loop was generated by a script that was doing the cycle calculations (!)

[1]: https://github.com/buserror/simavr

buserror··on State of C Programming Language in 2019
Looks like some coreless placeholder article. It actually says nothing at all.... New C19 document with... nothing new (as per their own description of it) and nothing actually new since C11 anyway.
buserror··on Condors or Lead Ammunition? (2015)
There are no biodegradable plastic cups -- ask McDonalds.

No need to respond to the rest of your post, as you didn't bother reading mine anyway. Go back to hunting stationary target with 50mm rounds, it's perfect, you'll never find the carcass anyway.

buserror··on Condors or Lead Ammunition? (2015)
Lead or "non toxic" ammunition is a big problem. I only do shotgunning, but for these the empirical evidence is that the lead is a better tool to "kill humanely" than for example, steel. Steel doesn't have that "stopping power" that lead has, and requires a lot more, and bigger, shots, and will also have a shorter range than lead...

Also, one of the biggest improvement in hunting cartridges are the 'wads' which used to be plastic, and now are wool or fiber, in any case, biodegradable -- the steel cartridges don't have these as they need a 'cup' to protect the barrels as the shots go out, so you leave big pieces of plastic all over, to be ingested by /other/ wildlife, potentially.

So no real perfect solutions so far; Legally you can't shoot lead anywhere near waterways so we have to use steel, but for example last year I shot a duck, fair an square, nowhere near "out of range" -- this was a 'dead duck' -- we looked for it for 20 minutes to discover it had gone to ground and was NOT dead, it had been broadsided, but some pellets had gone thru the poor bird, and some of the pellets were in the feathers, because they didn't have the energy.

As much as I like hunting my supper -- and I hunt to fill the freezer so I don't ever have to buy chickens -- I really hate to be in that situation where I inflicted undue pain for no reason other than some city environmentalist (who probably sit at his desk all day) making wide ranging decisions like this.

It's going to be difficult to find a metal as "good" as this job as lead; I would love for steel to work really, perhaps we could somehow devise a 'steel shell around a lead pellet' -- that would allow 1) killing power 2) protection for lead leakage and 3) loads of time to use magnets to recover it from pretty much anywhere... I realise a good part of the energy of lead hitting a target it when it splatters, and the steel shot won't do that, but it ought to be better...?

Anyway, that evening we had duck, and we toasted the duck; unsuitable apology as it is.

buserror··on Inside Macintosh (1985) [pdf]
I've learned English just to be able to read Inside Macintosh. I was 14 at the time, with just primitive 'school' english that was completely useless in the real world. I started to read novels, SF books and all I could find to get better just so I could read Inside Mac. In fact, I probably have to thank Inside Mac from most of my English basics as it also taught me a lot :-)

So I'm a bit 'branded' -- mind you, I still stopped developing for Mac a long while back now. At the time when the company tech was made by bearded cool people for Doctors and Lawyers to the time the company tech is made by Doctors and Lawyers for bearded 'cool people' with a latte :-)

buserror··on Inside Macintosh (1985) [pdf]
Having worked with OpenDoc (and never shipped -- I wonder how many of us reached that point!), it was dire -- the concept was a super good idea and all that, but the implementation was so incredibly complicated that it took a huge amount of work to do.... anything really. And then all your work was a 'component' that had no real branding, identity or way to the market, anyway..

It was the time when Apple APIs went completely overboard in the amount of code required to do /anything/; OpenDoc was incredible in it's complexity; but even something like OpenTransport was fantastic amount of work to do anything simple -- especially compared to BSD sockets!

AppleScript was another one, being 'scriptable' was a lot of work, but being 'recordable' was a complete nightmare, and implementing the most complex language clauses was borderline suicide, the 'whose' clauses were amazing in their complexity for a feature absolutely nobody would use.

But, still, I miss Classic -- I think there was a lot of good that was thrown with the bath water when OSX arrived; sure, the underlying got a serious upgrade, but the user interface and anything associated got a serious downgrade, to this day really. I think the modern Finder is abhorrent, the Classic Finder was a beauty of consistency and ease of use in comparison. Yeah sure you got a couple of gadgets, that's it.

buserror··on Inside Macintosh (1985) [pdf]
You didn't /have/ to really. I was a mac developer for 20+ years, and I never did 'register' them officially... even pretty big commercial apps wouldn't -- it was easy enough to have a unique sequence; one of the basic rule was that all lowercase ones were Apple.

I always thought that the 'creator codes' and other use of that four character sequence system was a great feature. It was gradually lost with osx.

Fun fact: All compilers for Mac had language extensions to deal with four character sequences, like 'AbCd' in C would be an integer with ('A'<<24)|('b'<<16)|('C'<<8)|'d'. Beats 0xdeadbeef and 0xcafef00d!

buserror··on Show HN: Monolinux – A tiny embedded Linux distro
The readme isn't really up to date, but many years ago I started minifs to be the smallest, reproducible linux distro I can get away with. With extra tools like a 'cross linker' that removes /anything/ that isn't used on a filesystem before packing it.

It's mostly bash. And a bit of C for tools. Works on ARM, whatever really, as long as there is a kernel and a toolchain.

https://github.com/buserror/minifs

← PreviousPage 6 of 23Next →