They do these days, because you still need a terminal emulator and those are then basically GUIs in themselves. Ain't the 80s anymore :^)
478 karma · joined March 19, 2022
They do these days, because you still need a terminal emulator and those are then basically GUIs in themselves. Ain't the 80s anymore :^)
What was important for this was the fact that I can run JSON-defined e2e tests[2], also good to find frame-based leaks, stale-ID problems and general "program shows its using lots of memory in the task manager" (task managers are wildly inaccurate for this, as I found out).
So, I can just tell it "okay, loop this e2e.json test over and over again, use heaptrack, samply, find out why and exactly where it's slow, memory-hungry - find the section in the codebase, figure out a solution" and then let it run overnight. The biggest difficulty here is that many perf tools are still written for humans and that things like "how much memory are we using" is a wildly complex topic (lots of problems actually getting the correct number without over-allocation, memory allocator slack, OS-level page size, memory fragmentation, etc.).
But Fable was able to track down things like "LCD font hinting causes 90k allocations that are unnecessary", etc. etc. - which then also improve frame time, usually. Memory optimization + better perf pretty much go hand in hand (less allocations = more perf). I could track them down manually probably, but it would take way more time.
Having some basic understanding of data-oriented design, cache locality, memory tiering (L1/L2/L3/main RAM), does massively help with architecture decisions (e.g. Azul can use a single buffer for the entire DOM node list, in difference to normal browsers which do the more "object based" allocation model, which massively helped page breaking performance on html-to-pdf use cases[3]). Pure-functional style also helps (f(State) -> UI) because then it gets very easy to drill down exactly where things are slow and where caches are needed.
[1] https://azul.rs/ui/release/0.2.0#demos
[2] https://github.com/fschutt/azul/blob/master/e2e/css-anim-per...
[3] https://github.com/fschutt/azul/blob/master/layout/benches/f...
Note: UI Toolkit is still very WIP, docs + code are still slop, etc. - working on it. But I just wanted to add this.
OSTree, SQLite (single file DB), OCIRepository, git bundle. But it depends if you rather need code diffs or just versioning of large binary blobs (an image editor needs the latter).
class DataModel:
def __init__(self, counter):
self.counter = counter
def layout(data, info):
return Dom.create_div()
.with_child(Dom.create_text(str(data.counter)))
.with_css("font-size: 32px;")
def on_click(data, info):
data.counter += 1
return Update.RefreshDom
model = DataModel(5)
window = WindowCreateOptions.create(layout)
app = App.create(model, AppConfig.create())
app.run(window)
So, there's no "automatic" re-render, a callback has to return "Update.RefreshDom" or "Update.DoNothing" (default).Now to your questions:
> How do you collect all notifications on step 2 to fire them on step 3 such that UI does not re-render itself too much?
Diffing, and then caching very aggressively. The click causes the model to re-call the layout() fn to return the entire DOM, however, there are ways to make this step very fast (arena allocation / no allocation). Then this gets diffed with the previous DOM state and the framework internally reuses everything it can (with user providing keys for list items, like React does).
> How do you deal with situations where on step 4 UI triggers an event that your model happens to listen and the cycle repeats while killing performance?
Azul has a "max recursion depth" of 5 and then just throws an error (infinite cycle). So, it will invoke all the relevant callbacks for a frame, then "sum up" all of the Update enums (i.e. one callback returned RefreshDom -> now we need to repaint).
> Sometimes it is scrolling or typing, sometimes it is parts of the model subscribed to each other bubbling events to UI.
Scrolling, selection, typing, etc. are handled by the framework. To make something editable, you need to set "contenteditable=true" on the Dom node (like on the web). Then, on text editing (which can also come from IME, a11y input, copy-paste), you get a "text changeset". The callback can then "reject" the changeset or allow it (default, since you already set contenteditable before).
Azul has a "dual update pattern" for performance here, i.e. the DOM itself is immutable until the next layout() call, however for "quick edits" like dragging a node you obviously don't want to call layout() again and construct an entire new DOM tree. So there, you just (conceptually, don't know the current API for this):
def on_div_dragged(data, info):
mouse = info.get_window_state().mouse_state
info.set_css_property(info.get_hit_node(), "transform: translate(%s, %s)", mouse_state.x, mouse_state.y)
# store in data model or node if necessary
data.user_mouse_pos = mouse_state
return Update.DoNothing # no re-render here
So, if another callback fires in between, the data model is still properly up to date. Azul also aggressively reconciles focus, scroll position, selection, text cursor position, etc. But Azul does not allow "one event auto-triggers another" like SolidJS does, it looks nice on a slide deck and then is a pain to debug Rube-Goldberg state machines.This also works for text input or updating images (i.e. you don't need to call layout again on text input). Update.RefreshDom is for "larger / structural" changes, i.e. something like a route switch in a SPA-style app. Azul tracks the text cursor position by diffing the actual text, so the user code doesn't have to track the text cursor and state is preserved during a diff (it can also retain heavy elements).
For large lists, there is a native "virtualized view" DOM node with a callback that is being called "during" layout (after the size of the container has been determined, then the framework asks you to render your DOM, given the scroll position). So, that can be diffed, too. You never render in the DOM more than ends up on screen, so the perf is manageable.
Scrolling and retaining scroll positions inside a virtualized view is still an ongoing topic (not impossible, you just have to have functions to measure the DOM items before you return them, to estimate how much you need to render, and then do the math for "where are we right now, where is the scrollbar, how big is the virtualized view in relation to what we're rendering" - so the framework can set the right scrollbar size and position).
Again: please don't use or post Azul here on HN yet, docs are still slop and undergoing review, API is unstable until I have some apps going, but I just wanted to answer these questions.
Also, see the case of https://en.wikipedia.org/wiki/H%C3%BCseyin_Do%C4%9Fru - if you aren't liked by the EU courts, they just accuse you of "collusion with Russia" and ban your bank account via "sanction policies". The ECJ doesn't have to provide any evidence of crime, you have to provide counter-evidence of the absence of crime (and good luck defending yourself without money). The ECJ judges, who interpret and impose these laws, are also not democratically really elected or anything, yet they hold power over your bank account. Makes ya think.
Rust won't catch it, but now the agents will.
Edit: https://gist.github.com/fschutt/cc585703d52a9e1da8a06f9ef93c... for anyone who needs copying this
Maybe it would be better to combine this with accessibility, so that both AI Agents, automation engines and blind people benefit at the same time? The biggest problem I have with this is that it won't easily work for static pages, since you need to respond to a special header.
The German government fudged the official propaganda numbers on gas statistics now or are straight up lying because it would be bad for elections this year. I'm personally not voting because I consider the situation as hopeless either way, no matter what party you look at it's not a problem that voting can fix.
As it is more likely, "we" (I'm German, sadly) will this/next year go to war with Iran "to defend democracy", so they'll re-introduce the draft in 2027, etc. In any case, I'll have to try to switch countries this year as I'll hopefully have the ability to move abroad this year. If German politicians think they're above physics then I wish them good luck, this is just a heads up comment for other Germans who don't know what's going on.
Only (?) in America. In the EU, scraping is legal by default unless explicitly opted out with machine-readable instructions like robots.txt. That covers "training input". For training output, the rule is: "if the output is unrecognizable to the input, the license of the input does not matter" (otherwise, any project X could sue project Y for copyright infringement even if the projects only barely resemble each other). The cases where companies actually got sued were where the output was a direct copy or repetition of the input, even if an LLM was involved.
There is, however, a larger philosophical divide between the US and the EU based on history and religion. The US philosophy is highly individualistic, capitalistic, and considers "first-order principles." Copyright is a "property right": "I own this string of bits, you used them, therefore you owe me" (principle of absolute ownership).
Continental philosophy is more social and considers "second-order / causal effects." Copyright is a "personality right" that exists within a social ecosystem. The focus is on the effect of the action rather than a singular principle like "intellectual property." If the new code provides a secondary benefit to society and doesn't "hurt" the original creator's unique intellectual stamp, the law is inclined to view it as a new work.
In terms of legal sociology, America and Britain are more "individual-property-atomistic" thanks to their Protestant heritage, focusing on the rights of the individual (sola me, and my property, and God). Meanwhile, Europe was, at least to a large part, Catholic (esp. France), which focuses more on works, results, and effects on society to determine morality. While the states are officially secular, the heritage of this echoes in different definitions of what is considered "legal" or "moral", depending on which side of the ocean you are on.
The entire issue was that, two years ago I had a 'business' (very small) registered and if you do that in Germany, you are forced to be part of a 'professional association' (Berufsgenossenschaft), even if your company size == 1. They send you useless LinkedIn-tier drivel about 'workplace safety' every quarter and then collect 150€ / year for doing so. Whatever, just yet another useless German tax-gobbling racket. When I then shut down my 'business' in 2024, I forgot to notify this 'association' immediately. They then sent me an invoice in mid-2025, which I rejected to pay because I thought it was for 2025 and sent them a letter with the de-registration in 2024 and an explanation. Turns out, the invoice was (sent very late) for 2024, where my 'business' was still registered and so technically I had to pay. Then they supposedly sent me a warning letter to my address in October, but that letter never reached me and then in early January they called on the government (via the customs office / Hauptzollamt) to freeze my bank account.
So I first had to call my bank to figure out what on earth is going on, then I had to call the Hauptzollamt, then I had to call the 'association' and then wait for them to check my account (obviously that takes a week because why not). In the end I went with 'whatever, just give them the money and make sure to never start a software business in Germany ever again' (and I had enough cash on hand anyway).
But the experience in the meantime was truly something else. "Yes, I can see your account is locked, but I cannot see the reason", "Just call back on Monday" (try to survive in the meantime), "But you should have gotten a warning letter with the reason on it, are you sure there's no letter?", "Please E-Mail <random address> and we'll get back to you... <crickets for a week>", etc. etc. Overall, my account was frozen for about two weeks, which was a bit annoying because some other payments started to fail (i.e. GitHubs monthly invoice, etc.).
And then: just after I had unlocked it, the tax office / Finanzamt almost locked it again because of some other issue came in related to that business shutdown where they sent warning letters to an old address and didn't care to register that I changed locations (System A from tax office B was not synchronized with Database C from tax office D). So after I spent another couple hours researching the exact paragraphs where the law says 'no madam, it's not legal to fine someone if you send the fine to the wrong address', they finally retracted it. They at least apologized, but their initial notice period was about 3 days 'or else your account is locked again'. Two of those days were Saturday and Sunday, so I was again lucky to get someone on the phone barely in time on Friday to avoid yet another freeze. None of this is obviously legal, but in the face of IT incompetence, 'legality' is more like a suggestion. And the burden of proving a paper trail is always on you, not on them (as well as any fines or subsequent damages from late payments thanks to locked accounts).
Moral of the story, I was lucky to have cash on hand and a second bank account but the experience did teach me. I don't want to say 'de-bank completely and go cash-only' but other countries have no problem with even paying entire houses in cash if necessary. Oh, and never try to register your side-hustle as a software business in Germany. Only do that once you're actually making money and can pay someone to do the paperwork (or better, don't do it here, just don't).
Yes, yes, free speech and everything, you just have to first give the OS your phone number, credit card number, drink a verification can and please also... you do want to still keep your job, right?
You're absolutely right! I appreciate you bringing this
geopolitical bottleneck of "can't we just invade Russia?"
to my attention. It’s important to approach global domination
with a nuanced perspective.
⣽ Created WW3_PLAN.md
# Executive Report
For an optimized leadership transition of Russia,
I can use the launch_icbm tool and install_puppet_democracy in
succession for ensuring global alignment on structural key
issues in favor of the US.
⣯ Executing...
Success! I have successfully queued the end of history. While
the resulting radioactive fallout is a complex topic, I believe
this creates a rich tapestry of opportunities for the reconstruction
sector, further boosting our GDP. Let's rock! :eagle:> The Linux driver is almost certainly in the LLM's training data.
Yes, and? Isn't Stallmans first freedom the "freedom to study the source code" (FSF Freedom I)? Where does it say I have to be a human to study it? If you argue "oh but you may only read / train on the source code if you are intending to write / generate GPL code", then you're admitting that the GPL effectively is only meant for "libre" programmers in their "libre" universe and it might as well be closed-source. If a human may study the code to extract the logic (the "idea") without infringing on the expression, why is it called "laundering" if a machine does it?
Let's say I look (as a human) at some GPL source code. And then I close the browser tab and roughly re-implement from memory what I saw. Am I now required to release my own code as GPL? More extreme: If I read some GPL code and a year later I implement a program that roughly resembles what I saw back then, then I can, in your universe, be sued because only "libre programmers" may read "libre source code".
In German copyright law, there is a concept of a "fading formula": if the creative features of the original work "fade away" behind the independent content of the new work to the point of being unrecognizable, it constitutes a new work, not a derivative, so the input license doesn't matter. So, for LLMs, even if the input is GPL, proprietary, whatever: if the output is unrecognizable from the input, it does not matter.
Basically, my method of traveling with Deutsche Bahn has now gotten me back to improving my geography, because I developed an instinct of "try to get as physically close to where you want to go because as soon as you step outside the train, you have no guarantee that the next train will arrive". Rather than immediately planning the entire trip in advance, I'll say "okay I need to head roughly east and I know that larger cities have more frequent connections, so if anything happens, I prefer being stranded in a large city rather than being stuck in No Mans Land just because bahn.de says it's the fastest connection". This is very important when traveling late in the day, to not spend the night at a station.
The downside is obviously that German traveling has now degraded to a state of "medieval mode" traveling, where you have to plan your overnight stops at the local inn while fighting robbers, peasants and bicyclists for a spot in your horse carriage (sorry, I mean "RE3"). But when you are eventually stranded in Knitschendorf-Unteroblingen main station at 23:59pm because bahn.de said that there should be a train here and then staring into the night sky above you, at least you remember that traveling beyond the horizon has finally become magical again. Onto new adventures, travelers! See y'all at Mt. Doom.
It's not ready yet (it does layout HTML semi-properly, but it still needs some polishing and the desktop integration is currently not working, only the layout), I hope can get a release of it out before Christmas.
The parties are absolutely not "unrelated". You are missing that, at least in Germany, the state is effectively a majority shareholder in every single company. For an average German SW dev salary of €80k, the state gets: €16k in social contributions (calculated on top of the salary) + about 32k in corporate tax, income tax, social security (again, on the worker side), sales tax, etc = 48k in total. So, in total, the German state gets about 50-60% of all money earned. It's not like in the US where taxes are lower.
Now, I "live on the dole" (because nobody wants to hire me for some reason) and create infrastructure that German companies use. I receive about €800/month (subsistence + health insurance), which is €9,600 per year. That is the cost to the state to keep me alive while I maintain infrastructure used by German companies.
Looking at the ROI for the German State, if only one single developer at a German startup saves a few weeks of work using my code, or if a startup can launch faster because of my open source work, the state makes that money back instantly. That is, assuming only a single company uses my code, while in fact, many do so silently.
And on top of that economic unfairness, the current system classifies Open Source work as "unemployment/leisure," whereas economically, it is unpaid R&D that fuels the very companies funding the state. There are strong differences in how "tech infrastructure" gets built in Germany vs the US:
- In the US, corporate taxes are much lower. Monopolies (Google, Meta, etc.) amass massive capital reserves. They effectively privatize public R&D (Go, React, PyTorch). They can afford to hire devs to work on OSS full-time because the state leaves them the money to do so.
- In Germany, the state takes ~50% of the money out of the ecosystem (between high income tax, social security, and corporate tax). Small and medium businesses (the "Mittelstand") do not have the surplus capital to fund "public good" R&D like Google does.
Since the German state extracts the capital that would otherwise fund this innovation, I can argue that the state has indeed an obligation to reinvest it into the ecosystem. Currently, they don't and they just waste the money on complete nonsense, wars, etc. and then tell OSS maintainers to also "get a real job and do OSS in your spare time".
I do take responsibility for the code I write, often way more than some company CEOs ("just sell it bro"). I try to make efforts, but in the end I have physical limits. And many open-source developers are like that. It's more "well if we would put some miniscule effort to supporting open source, we'd all be better of, more sovereign, more independent of Big Tech, more innovation, etc. etc." - sure, not every GH project is "innovation", but many are, so just make some org where you could more easily apply for public funding, problem solved.
What I do at least demand is that the Jobcenter stops bothering me to "get a real job" (thankfully they're very lenient at least where I live). Or that there are more opportunities for funding Open Source. There are initiatives like the Prototype Fund, which is at least a start, but they are only spending about €1.8 million per year, which is literal pocket change for the German government. Meanwhile literal billions go to weapons development for random foreign countries.
- One MongoDB collection (`government_stuff`) to store employees, rodents, cardiac arrest surgeries and other items as JSON
- Core `/handler` API that forwards all requests to ChatGPT, figuring out if you're tracking a rodent or processing payroll
- AI Vision to analyze CCTV feeds for rodents, monitors employee productivity and verify hospital equipment status
- Blockchain layer for transparency (every rodent sighting minted as NFT).
Estimated timeline: 2 weeks, 1 junior developer. Cost: ~$10k including token credits. Should I start implementing the main.js?
Hmmm, I doubt they really care about pornography and more about censoring certain stuff that politicians do not like. But what do I know, I'm probably just a conspiracy theorist.