HNHacker News
TopNewBestAskShowJobs

romaniv

2,750 karma · joined February 2, 2011

submissionscomments
romaniv··on Rethinking DOM from first principles
Yes, but not in the sense of dumping serialized JSON into HTML. It ends up being represented by custom HTML attributes and their values. For example, if you need to keep track if the user clicked on some button, you might represent it as follows:

  <button i-was-clicked="false">
or

  <button i-count-clicks>
The content of the attribute becomes "1" after the first click and keeps increasing. The job of the corresponding JS code would be purely to keep track of clicks, so it would be very simple. Meanwhile, the value could be used for a variety of different tasks (including in CSS) and the exact same library could be applied to any element without any modification or writing "glue code".
romaniv··on Rethinking DOM from first principles
Devs have learned not to keep state in the document, because it's inadequate for it.

Web devs have moved the state out of the document into JS variables and have been piling bloated, short-lived crap on top of those variables ever since.

If you actually keep state in the document things become rather simple. Scripts themselves become stateless and do not require direct dependencies on one another. Data can be queried across the page with CSS selectors. Many visual transformations on data can be handled in CSS as well. There is a well-developed system of events to handle interactions, which removes the need to handle user changes, AJAX and WebSockets separately. You gain the ability to dynamically examine and modify the state of your "application" simply by pressing F12 and changing things in the elements tab.

While it's definitely possible to imagine better ways of dealing with documents, layouts and so on, seeing how JS frameworks handle state makes me fear any "improvements" on this front.

romaniv··on Job-seekers are dodging AI interviewers
Step one, companies create AI gauntlet for their applicants.

Step two, those companies lose access to the top talent who will simply go interview somewhere else or get a job in some other way.

Step three, less scrupulous candidates start to cheat these automated systems. There will also be paid services helping you cheat.

Final outcome: most of the people who get to the actual interviews in those companies will be candidates with dubious skills at the actual job, willing and able to cheat corporate policies.

Unfortunately, this will take a couple of years to play out to its logical conclusion.

romaniv··on Google's shortened goo.gl links will stop working next month
URL shorteners were always a bad idea. At the rate things are going I'm not sure people in a decade or two won't say the same thing about URLs and the Web as whole. The fact that there is no protocol-level support for archiving, versioning or even client-side replication means that everything you see on the Web right now has an overwhelming probability to permanently disappear in the near future. This is an astounding engineering oversight for something that's basically the most popular communication system and medium in the world and in history.

Also, it's quite conspicuous that 30+ years into this thing browsers still have no built-in capacity to store pages locally in a reasonable manner. We still rely on "bookmarks".

romaniv··on The Big Oops: Anatomy of a Thirty-Five-Year Mistake [video]
From the video: "It's like, yeah, he said that in 2003, right? He said that after a very long time. So why did he say it? It's because 10 years earlier, he was already saying he kind of soured on it."

https://youtu.be/wo84LFzx5nI?t=823

He mentions Alan Kay about dozen times and uses quotes and dates to create a specific narrative about Smalltalk. That narrative is demonstrably false.

romaniv··on The Big Oops: Anatomy of a Thirty-Five-Year Mistake [video]
This video contains many serious misrepresentations. For example, it makes a claim that Alan Kay only started talking about message-passing only in 2003 and that it was a kind of backpedaling due the failures of the inheritance-based OOP model. That is a laughable claim. Kay had given detailed talks discussing issues of OOP, dynamic composition and message-passing in mid-80s. Some of those talks are on YouTube:

https://www.youtube.com/watch?v=QjJaFG63Hlo

Also, earlier versions of Smalltalk did not have inheritance. Kay talks about this is his 1993 article on the history of the language:

https://worrydream.com/EarlyHistoryOfSmalltalk/

Dismissing all of this as insignificant quips is ludicrous.

romaniv··on LLMs pose an interesting problem for DSL designers
The title should be "DSLs pose an interesting problem for LLM users".

It is significant that LLMs in coding are being promoted based on a set of promises (and assumptions) that are getting instantly and completely reversed the moment the technology gets an iota of social adoption in some space.

"Everyone can code now!" -> "Everyone must learn a highly specialized set of techniques to prompt, test generated code, etc."

"LLMs are smart and can effortlessly interface with pre-existing technologies" -> "You must adopt these agent protocols, now"

"LLMs are great at 0-shot learning" -> "I will not use this language/library/version of tool, because my model isn't trained on its examples"

"LLMs effortlessly understand existing code" -> "You must change your code specifically to be understood by LLMs"

This is getting rather ridiculous.

romaniv··on Custom JavaScript controls can't capture the nuance of form fields (2021)
The best unit of isolation for web functionality is behaviors, not controls. Think of them as traits enabled and configured via attributes. I've used such things on many different projects with very good results. The main advantage is that if you design them properly it is trivial to extend built-in functionality without reinventing the flat tire.
romaniv··on In our cashless society, we need to take digital jail seriously
> The government’s action is troubling enough, but what should really disturb us is the ease and invisibility with which it is being done.

This is such a great point. I'm not sure why it needs to be made over and over again, but it seems that's the only way it doesn't get buried.

Let's play a game. I will be the institution, you will be the person. You will get ability to record me with your cellphone and post stuff online to complain about various issues. I will get the ability to see all your financial transactions, listen to all your communications, track your location, arrest you when I don't like you recording me, smear you online and pressure companies to ban you from literally any service imaginable, including banking.

Both of us will be bound by the legal framework, but when I don't like it, I will have the ability declare the state of emergency and scrap all the rules. Also, I will have sovereign immunity when I break the rules. Also, many of my actions will be secret because of national security.

Oh, and I will be doing all the things described above using your money.

Sounds fair?

romaniv··on In our cashless society, we need to take digital jail seriously
> Carrying cash is exactly how you lose it all to police corruption, sometimes called civil asset forfeiture.

If you have police seizing assets for bad reasons, allowing them to automate the process is going to make things worse, not better.

Not to mention that accounts can also be locked (at least temporarily) via software bugs, overzealous security processes and identity theft, all of which happen all the time. Cashless society is a horrible idea on so many separate levels I'm not even sure why this debate is happening.

It's not like having cash prevents you from also having a bank account and cards. No, we're debating something that's a pure reduction of personal choice.

romaniv··on Father who used a signal jammer to keep his kids offline at night faces jail
> An illegal action which causes harm to (many) others should come at a cost.

Peak irony here, considering why he was doing it. Protecting his children from social media harm. Were anyone at big tech companies ever jailed for the myriad ways they harmed the society and countless individuals? No?

It's batshit crazy how the HN crowd always gives ideologically aligned tech corporations infinite benefit of doubt while applying this keyboard-warrior-tough stance to individuals - often for somewhat equivalent infractions.

romaniv··on Ontario government staffer fired after $100 donation to Ottawa convoy
> Rosa Parks was jailed.

Are we at the point where jailing of Rosa Parks is somehow used to mock and chastise people who just participated or supported a civil liberties protest? This is some bizarre mental gymnastics.

romaniv··on Ontario government staffer fired after $100 donation to Ottawa convoy
My cynical take is this is exactly why CTV, which was clearly and strongly biased against the protest when it was happening, decided to publish this particular story right now. Normalization aka boiling the frog. You start with a case in the gray area that generally seems okay, allow people to process it, then move to cases on the other side of the gray area, then move outside of (old) gray area entirely. This happened with so many things recently. Social media is making this process a hundred times more powerful.
romaniv··on List of free cybersecurity services and tools from US CISA
>CISA’s purview is information security.

Is it only? Doesn't seem like it from what they do. 'I' stands for "Infrastructure" and it's a very stretchable term:

https://www.cisa.gov/chemical-security

romaniv··on Server-sent events, WebSockets, and HTTP
I understand that right now people just want some way to make pages update with minimum fuss, but when you start talking about extending HTTP (even more), that automatically brings up the question of whether you're solving the wrong problem.

> What's the best way to do pub/sub on the Web?

I think it's the wrong question. Or at least it will become the wrong question at some point. Should we be pushing for web technologies even when we need communication models that the Web clearly was not designed for? After having used NATS for some things, web services, web sockets and all other related stuff feels archaic and byzantine. Too much ducktape on top of a very simple, but limited idea of hyperlinked documents.

romaniv··on Things that used to be hard and are now easy
The general theme of this list is that technology gives us more and more hoops to jump through, then provides some trampoline to jump through them. We're supposed to be eternally grateful. I'm not. I want to focus on problem-solving, not masterfully using trampolines.

> SSL certificates, with Let’s Encrypt

Semi-mandatory SSL certificates weren't a thing on the web until fairly recently. Not managing them at all was certainly easier than managing them with Let's Encrypt, which has a lot of gotchas, requires tooling, knowledge and can suddenly break your website if something is off.

> Concurrency, with async/await (in several languages)

async/await usage is literally the main reason why my recent project is written in Go instead of C#. I like C#. I don't like Go. But dealing with all the gotchas of .NET Core async/await APIs drove me away.

Moreover, Erlang had a much more sane and powerful parallelism model way before async/await.

> Centering in CSS, with flexbox/grid

Again, like with SSL, this is technically correct, but generally incorrect. Centering in CSS has gotten much easier with flexbox/grid. However, centering in HTML only became hard because tables were abandoned as the layout mechanism. Sure, they're not "semantic". But we're talking about what became easier, right? Not about what became more ideologically correct, semantic, etc.

> Configuring cloud infrastructure, with Terraform

Again, there used to be no Cloud infrastructure to configure. Personally, I find Terrafrom annoying more than anything else.

> Setting up a dev environment, with Docker

As opposed to doing what? Keeping my dev environment simple is a constant battle and most of the time Docker is the weapon used by the other side. In 00s my dev environment was a text editor and some upload tool.

I haven't used PHP in well over a decade, but for my latest personal project I've decided to brush up on PHP 8.1. Despite awful syntax, I can do stuff by writing a handful of lines of code in a text editor. It's very refreshing. 100% focus on the outcome rather than tooling.

romaniv··on List of free cybersecurity services and tools from US CISA
I don't trust any government agency that sponsors and publishes literal propaganda:

https://www.cisa.gov/resilience-series-graphic-novels

Especially when it's designed to encourage a kind of pro-establishment paranoia and hysteria.

They have section about NATIONAL RISK MANAGEMENT that mentions 5G (which isn't even fully deployed and barely used yet) and doesn't mention the fact that US doesn't manufacture antibiotics and many essential drugs domestically?

Their whole website has a very bizarre feel to it. It does not look like a normal government website. No, I'm not talking about design, but the kind of subjects they cover and how they cover them. Click around.

romaniv··on Happy 15th birthday Hacker News
It's not just Reddit's "etiquette", it's the general direction where most social media comment sections are pushing their users via design and algorithms.

1. Click on the next thing in the feed.

2. Upvote/downvote.

3. Leave one-liner comment.

4. Got to #1.

romaniv··on Omicron at 100% Prevalence, Colorado
I highly recommend everyone here to watch these two cannels for Covid news and analysis:

https://www.youtube.com/c/Campbellteaching

https://odysee.com/@DrMobeenSyed:1

The first one is a bit more user-friendly, the second one goes more in-depth into mechanics and research, but neither peddle fear or moralism. There is actually quite a bit of positive news lately:

Omicron uses two different ways to enter cells. This is part of why it's so transmissible, but it's also why it is less severe: https://odysee.com/@DrMobeenSyed:1/omicron-science-is-differ...

Omicron generates some immunity for Delta, so it is likely to displace Delta entirely: https://www.youtube.com/watch?v=PYLbJ0H8zdc

Most Omicron hospitalization are accidental so far: https://www.youtube.com/watch?v=OM2VgBm9pTI

romaniv··on Maybe We Can Have Nice Things
>Programming languages advance by introducing new constraints.

Among other things.

>throw is a little bit too goto-y for my taste

Conceptually, throw is not at all like GOTO. It's not a control structure, but a communication tool. Throw interrupts execution of logic in a subsystem that encounters abnormal conditions and communicates those conditions to the containing system. The second part is the most important one.

>However, for all of NPM’s problems, at least it is a package management system at all! It’s easy to pick on NPM [...], but even at its worst it’s a huge improvement over manually managing dependencies

This really depends. In many ways NPM made introduction of new dependencies easier, while making handling dependencies over long periods of time a much more hairy problem. I don't like that most devs today assume that versioned packages is the only way you can do things. Many also don't understand that "dependencies" is not a real thing, it's an aggregate label that is applied to a set of problems that happen to be solved by package managers. Problems like discovery, deprecation and compatibility checking.

romaniv··on Functorio
In 1986 people wanted to make real programming more like a computer game:

https://www.youtube.com/watch?v=I9LZ6TnSP40

Today, when we have much more computational resources, I'm reading this article about representing Factorio as static text with compiler checks. Something somewhere is off.

romaniv··on A tale of webpage speed, or throwing away React
http://quickenloans.github.io/Behaviors.js/

Once I got past certain mental blocks, it became fairly obvious that you can structure all your GUI scripts to be configured and to interact with one another via DOM.

The next insight was to use CSS selectors for targeting.

Then using consistent name prefixes and separating behaviors into self-contained libraries.

The stuff above was proof-of-concept. The possibilities behind this approach are mostly unexplored.

romaniv··on Green AI
I'm willing to bet this will be used as one of the arguments in a corporate push for global automation in ~10 years.
romaniv··on Ask HN: What are weird and/or novel ways to do web UIs?
>And the web was designed with the intent of running code practically from the beginning

This is absolute nonsense. In the beginning the web didn't even have inline images. It was a text-only protocol.

https://www.wired.com/2008/09/history-of-img-and-embed-tags/

Cookies and script tags were hacks added by Netscape, IIRC.

romaniv··on HTTP/3: the past, the present, and the future
Do you seriously expect Google and Cloudflate to make basic web development easier when they are making tons of money by "managing" its complexity for others? It's in their best interest to make hosting your own content or using smaller hosting providers absolute hell. Just like it's in Google's best interest to make browsers so complex that other browser devs just give up and Chrome derivatives become the only choice.

I'm predicting that eventually Google will start deranking HTTP 1.1 websites.

romaniv··on Get Started Making Music
>Any thoughts on how to dip my toes in the water with hardware to see if that's a better fit?

How much money is "dip my toes"? If you're talking less than a hundred bucks for some cool toys, you can buy Korg Volca and one of PO-x0 series from Teenage Engineering.

If you're thinking $500+ you can get something like Alesis Micron (designed by Bret Victor, BTW) or Korg Electribe, or Elektron Model:Sample. If you're fine with real-time recording, you can instead get something like Behringer Neutron or Kors Minilogue. You can make entire tracks on those even if all you have is a linear recorder.

If you're in ~$1000+ range you can buy Analog Four or OP-1. The former is a very practical machine, the latter is a marvel of design, very fun and great for experiments.

Or you could go for a workstation. FA-06 has pretty good UX, although it's closer to DAW-on-a-keyboard than other things I mentioned here.

Find a device you like and learn it inside out. It's a very rewarding experience. Also, try to buy a used device. You can save tons of money this way.

romaniv··on Get Started Making Music
>Menu diving on a 20x2 char display is no fun at all.

I own Elektron Analog 4 and it's extremely fun to use and make quick loops. You may need to organize your sounds a bit at first, but when you have a reasonable "palette", editing is easy. The UI is extremely well-organized when it comes to common operations. If I needed to make a professional-sounding track in hurry, that's probably what I would use.

romaniv··on The End of Moore’s Law and Faster General Purpose Computing, and a Road Forward [pdf]
Some of the most drastic simplifications I've made to real-life code in the recent years were achieved by splitting a "classic" program into multiple independent agents. Making things "parallel" wasn't even the goal. The goal was to clean up some messes.

>As soon as you need to acquire two locks that are only known at runtime

Why would you need to acquire two locks that are only known at runtime when using the actor model?

romaniv··on The End of Moore’s Law and Faster General Purpose Computing, and a Road Forward [pdf]
>CPU speed isn't relevant anymore

Only because most software is conceptually stuck in the 50s and Intel fell asleep at the wheel. Having extra cores can allow you to move away from cludgy and insanely complicated solutions to much simpler code. In turn, this enables faster development and experimentation.

romaniv··on The End of Moore’s Law and Faster General Purpose Computing, and a Road Forward [pdf]
>Perhaps the future is: you buy an old laptop with specs like today and then you buy one additional piece of hardware (TPU, ASIC, Graphics for gaming etc).

If Google has its way, the future will be: you buy a Chromebook and do all the real work on Google Cloud. Note that John Hennessy is a chair of Alphabet. And in case someone here forgot, TPUs were developed by Google and so was Tensorflow.

← PreviousPage 3 of 30Next →