Live data from Hacker News

Software Disenchantment (2018)

tonsky.me

491–500 of 504 posts

Re: Software Disenchantment (2018)

#491
post #206
post #5

Even quite underpowered phones can boot in ~1-2 seconds if optimized for that. Not everything in the phone will startup in that amount of time (modem, wifi), but it's possible to start to Linux userspace and display fully interactive UI in that amount of time. Even my e-book reader Linux port boots to UI in ~2s. It really is just bloat and lack of care.

To be honest, I have never seen any phone or computer that could boot in about 2 seconds. 6-7 seconds is the absolute minimum I've ever seen, regardless of hardware or OS.

You know? Once upon a time i've done some freelance sysadmin for small businesses. So i installed a new fileserver and a networking gateway with least-cost router functionality for the phones, somewhere. When ready i asked what that big tower did, that stood aside unplugged. 'Nothing, that is just trash we haven't discarded yet.' Since the case had a nice design it seemed wasteful to me, and i took it back home. At home i plugged it into to some spare screen, and since it had a networking card into that also. When ready i rocked the big red switch it had with a satisfying clack into the upwards posistion and wanted to do something else at my other systems while it booted up (i thought). So i rolled, sitting on my chair, maybe 3 feet, and then heard a loud 'Ta-Daa!'. I looked sideways and barely saw how Word 6 and Excel 5 popped up, out of the corner of my eyes. I was dumbstruck!

I shut it down and repeated that, looking at my wristwratch.

FOUR SECONDS!

I couldn't believe that and tested maybe five times again. It took never more than 4 seconds from rocking the switch to WfW 3.11 Desktop with Word 6 and Excel 5 in autostart ready to use! It even got a DHCP address while being at it.

The thing is, at that time i had some Sun SparcStations, some HP PA-Risc Workstations, and assorted X86 PCs, one of them an AMD Athlon XP PR1800 overclcocked to PR2100 with 1.5 GB virtual channel memory SD-Ram, running NetBSD (because it just worked, don't ask). I felt very ahead of 'the curve'.

And then this trash came along and burst my bubble...

I sat there and only thought: 'what for?!'

Now some old Windows running atop of DOS isn't something to really envy, but in this combination of components, BIOS, drivers it got the job done without any hassle, FAST!

That was eye opening for me.

Re: Software Disenchantment (2018)

#492
post #206

Earlier quoted context omitted.

To be honest, I have never seen any phone or computer that could boot in about 2 seconds. 6-7 seconds is the absolute minimum I've ever seen, regardless of hardware or OS.

You know? Once upon a time i've done some freelance sysadmin for small businesses. So i installed a new fileserver and a networking gateway with least-cost router functionality for the phones, somewhere. When ready i asked what that big tower did, that stood aside unplugged. 'Nothing, that is just trash we haven't discarded yet.' Since the case had a nice design it seemed wasteful to me, and i took it back home. At h…

Edit: WRT BIOS. It had a MR-Bios from Microid Research which allowd to use it over the onboard serial ports, you could choose which, how, and so on. Another functionality which has been gone, and came back later only as expensive add on.

Re: Software Disenchantment (2018)

#493

Earlier quoted context omitted.

I was so proud in 2014 that our development team managed to pull a 60 FPS on iPhone 4. Built our own UI framework (before Unity rebuilt theirs), pulled images from network, assembled and updated sprite atlases at runtime and even created our own text rendering - all of it, in order to get 60 frames per second on 4 year old phone. And most likely, it still does, in 2020. Since then, I've never worked in a team that wo…

So the official toolkit wasn't capable of 60fps?

Official toolkit at the time was only immediate mode, calling all gui logic every frame, so, no. But even with the unity UI, building atlases on the fly isn't something that you can do out of the box.

Re: Software Disenchantment (2018)

#494
This is Jevon's Paradox of software development.

As self driving cars enable us to fit far more cars on the road before causing the same level of congestion, people will start taking increasingly longer car rides for decreasingly valuable reasons, up until the roads are equally intolerable as they were before the innovation had occured.

Replace "self driving cars" with "faster hardware / more memory".

Re: Software Disenchantment (2018)

#495
post #417
post #276

Performance is one thing, but I'm really just struck by how often I run into things that are completely broken or barely working for extended periods of time. As I write this, I've been trying to get my Amazon seller account reactivated for more than a year, because their reactivation process is just... broken. Clicking any of the buttons, including the ones to contact customer support just take you back to the same…

Johnathan Blow did a really interesting talk about this topic: https://www.youtube.com/watch?v=pW-SOdj4Kkk His point is basically that there have been times in history where the people who were the creative force behind our technology die off without transferring that knowledge to someone else, and we're left running on inertia for a while before things really start to regress, and there are signs that we may be goin…

This is an interesting talk, thank you. What frightens me, is that the same process could be happening in other fields, for example, medicine. I really hope we won't forget how to create antibiotics one day.

Re: Software Disenchantment (2018)

#496

Earlier quoted context omitted.

I mean... considering the fact that in contains the probabilities of typing every single word in the English language versus every other, at every stage of typing, including potentially the probabilities of all the ways you might mistype each word while swiping without precise accuracy... ...maybe? I don't know if that's 150 MB' worth of data... but it's certainly a lot.

So why is it persistently, perniciously and stubbornly insistent in refusing to spell 'naughty' words like 'duck'?

I'm sure that's intentional... I think you can disable it?

Re: Software Disenchantment (2018)

#498
post #449

Earlier quoted context omitted.

I completely agree, here. React has replaced the DOM, and it's pretty fast, pretty efficient when you understand its limitations... but when you start rendering to the canvas or creating SVG animation from within react code, everything is utterly destroyed. Performance is 1/1000 of what the platform provides. I have completely stopped using frameworks in my day-to-day, and moved my company to a simple pattern for upd…

Can you expand? You actually convinced other folks to stop using React and go back to writing DOM-manipulating VanillaJS?

No one's going back to the messy spaghetti-generating "just-jQuery" pattern of yore.

I devised a way of using plain closures to create DOM nodes and express how the nodes and their descendants should change when the model changes. So a component is a function that creates a node and returns a function not unlike a ReactComponent#render() method:

props => newNodeState

When called, that function returns an object describing the new state of the node. Roughly:

{ node, className: 'foo', childNodes: [ childComponent(props) ] }

So, it's organized exactly like a react app. A simple reconciliation function (~100 lines) applies a state description to the topmost node and then iterates recursively through childNodes. A DOM node is touched if and only if its previous state object differs from its current state object - no fancy tree diffing. And we don't have to fake events or any of that; everything is just the native platform.

I implemented an in-browser code editor this way. Syntax highlighting, bracket matching, soft wrap, sophisticated selection, copy/cut/paste, basic linting, code hints, all of it... It edits huge files with no hint of delay as you type, select, &c. It was a thorough test of the approach.

Also, when we animate something, we can hook right in to the way reconciliation works and pass control of the update to the component itself, to execute its own transition states and then pass control back to the reconcile function... This has made some really beautiful things possible. Fine grained control over everything - timing, order, &c. - but only when you want it.

Sorry for the wall of text.

Re: Software Disenchantment (2018)

#499
post #324

Earlier quoted context omitted.

I completely agree, here. React has replaced the DOM, and it's pretty fast, pretty efficient when you understand its limitations... but when you start rendering to the canvas or creating SVG animation from within react code, everything is utterly destroyed. Performance is 1/1000 of what the platform provides. I have completely stopped using frameworks in my day-to-day, and moved my company to a simple pattern for upd…

It seems to me that using your react components to render SVG animations, or to canvas, is just inviting disaster.

Well yeah. But I've seen it done; the attitude being "this is fine, React is fast, it works on my Mac..."
Post reply on HN