Readit News logoReadit News
valenterry commented on UIs Are Not Pure Functions of the Model – React.js and Cocoa Side by Side (2018)   blog.metaobject.com/2018/... · Posted by u/PKop
embedding-shape · a month ago
I'm well aware of what "pure functional programming" is about, I spend most of my time in Clojure during a normal work day, and done my fair deal of Haskell too :)

And yes, even the most pure functional language eventually needs to do something non-pure, even if the entire flow up until that point is pure, that last step (IO) just cannot be pure, no matter how badly you want it to.

With that said, you'd have to pry my pure functions out of my cold dead hands, but I'm not living under the illusion that every function can be pure in a typical application, unless you have no outputs at all.

valenterry · a month ago
That last step is still pure, because it's still just return a value. A data-structure. You did Haskell, so you should know how it works.
valenterry commented on UIs Are Not Pure Functions of the Model – React.js and Cocoa Side by Side (2018)   blog.metaobject.com/2018/... · Posted by u/PKop
embedding-shape · a month ago
Nothing of value is 100% "pure", eventually you are gonna need to draw something to the screen, so trying to reach that sort of utopia seems futile.

With that said, the "mental model" of React, or maybe the focus, is "pure" where it matters, namely that you have data, pass it through a function, and you get a view/UI, and if you pass the same data, you get the same UI, regardless of what happened before.

When it appeared, was very different from us web developers were used to, where sometimes the DOM even was our data store, and mutation was the name of the game.

So when people say "React is pure", I don't think they're talking about internally, or "100% pure", just that the mental model you need to adjust to is that the UI gets created from (mostly) pure functions.

Of course, this all breaks down once the frontend application actually runs in a browser, but that doesn't mean it isn't valuable for the developer as things gets a lot simpler.

Not disagreeing with you in the end I guess, just clarifying for those who might not be familiar with React, and get confused when some people say it's pure, while others don't. Both are right :)

valenterry · a month ago
Nope, that is precisely what pure functional programming is about: to turn actions like "draw something to the screen" into regular values that you can store into a variable, pass around, return from a function and so on.

It's not an utopia. It will eventually happen and it will replace how react.js currently works. effect.website will probably be the foundation.

valenterry commented on Germany outfitted half a million balconies with solar panels   grist.org/buildings/how-g... · Posted by u/bilsbie
oezi · 2 months ago
Well of course but the manufacturers of the micro inverters sure try to cheat:

https://www.heise.de/news/RelayGate-Deye-Solar-Microinverter...

valenterry · 2 months ago
From what I remember, it turned out that the electronics were sufficient. Though the chance of issues (e.g. in case of a software but) were/are increased.
valenterry commented on Germany outfitted half a million balconies with solar panels   grist.org/buildings/how-g... · Posted by u/bilsbie
brucehoult · 2 months ago
In the summer the optimal angle where I live (35.5º S) is 12º. Panels lying flat on the lawn are losing only 2% from that. Just now, near the equinox, panels lying flat on the lawn lose around 18% at noon.

I'll find a way to prop them up at 50º for winter when the time comes for that (April or May), though that's for sunny conditions. In our typical overcast in winter flat on the ground is probably still fine to catch the most diffuse light. I'll experiment when the time comes.

valenterry · 2 months ago
Right. I mentioned the suboptimal 60 degrees because many people hang it from the balcony (90 degrees) and the tilt it a bit, but usually not too much. From what I've seen 60 degrees seems like a good average number.
valenterry commented on Germany outfitted half a million balconies with solar panels   grist.org/buildings/how-g... · Posted by u/bilsbie
lm28469 · 2 months ago
I'm in Germany and keep seeing these, I always wonder what a 400w poorly oriented panel getting like 3 hours of sun a day is good for. If they weren't basically free thanks to tax reduction and other tricks I assume no one would get them
valenterry · 2 months ago
A 400W half decently oriented panel (i.e. south facing balcony, 60 degree angle) is sufficient to run your AC to cool your 50sqrm apartment during summer for free.
valenterry commented on Germany outfitted half a million balconies with solar panels   grist.org/buildings/how-g... · Posted by u/bilsbie
WaitWaitWha · 2 months ago
Great idea! Want to learn more on the safety though...

> Once in place, people simply plug a micro-inverter into an available wall outlet.

later

>Gründinger and experts at the German Solar Industry Association noted that the devices don’t generate enough power to strain the grid, and their standardized design and safety features allow them to integrate into balconies smoothly and easily.

This seem to talk to the safety of the grid and the balcony. What is done when electricians power down the apartment or worse, the building to work on something? The wires remain energized despite proper distribution panel shut down. Do these setups have auto shut off if they see no other power on the plug they are on? what if it is the building, wouldn't other panels still energize the wires, so they would not shut down? Just asking, as my personal experience is quite hair raising and crispy when it comes to inappropriately de-energized circuits. ;)

valenterry · 2 months ago
> Do these setups have auto shut off if they see no other power on the plug they are on?

Yes. This is Germany we are talking here. I doubt any other country has higher (and more annoying) safety standards.

valenterry commented on AI models need a virtual machine   blog.sigplan.org/2025/08/... · Posted by u/azhenley
armcat · 3 months ago
When you use ChatGPT and it executes code, i.e. when you tell it to do something with a CSV file, it seems to run in a VM with certain tools and libraries available to it, and a sandboxed disk access; no internet access though. So it's kind of already there.
valenterry · 3 months ago
Not really.

Now imagine you run two AIs (like ChatGPT) on your machine or on a server. You maybe even want them to cooperate on something. How do you do that? Right, you cannot, there is no standard, no interoperability, nothing.

valenterry commented on AI models need a virtual machine   blog.sigplan.org/2025/08/... · Posted by u/azhenley
cosmic_cheese · 3 months ago
In general the security model of desktop operating systems is woefully inadequate for the modern era. Given the sheer volume of software known to do things not in the user’s best interest it’s borderline insanity that we hand it the keys to the kingdom without so much as a second thought with such frequency.

Of course if the user truly desires a zero-guardrail experience they should be able to get that, but it probably shouldn’t be the default. Software should be on a very short leash until the user has indicated trust, and even then privileges should be granted only on a per-domain basis. A program designed to visually represent disk usage will need full filesystem access for example, but there’s no reason it should be able to sniff around on my local network (or on platforms where package managers handle updates, connect to the internet at all).

valenterry · 3 months ago
> In general the security model of desktop operating systems is woefully inadequate for the modern era. Given the sheer volume of software known to do things not in the user’s best interest it’s borderline insanity that we hand it the keys to the kingdom without so much as a second thought with such frequency.

This. It must be the problem of having grown up with it that makes people not realize it.

Software will need to operate like people in the real world. You can give your friend power of attorney, but usually you don't, you find a better way to get things done.

valenterry commented on Good system design   seangoedecke.com/good-sys... · Posted by u/dondraper36
maxbond · 4 months ago
Audit tables are a big ask both in terms of programming effort to design and support them, and in terms of performance hit due to write amplification (all inserts and updates cause an additional write to an audit table). Whereas making a bool into a timestamp is free. Including timestamps on rows (including created_at and updated_at) are real bacon savers when you've deployed a bug and corrupted some rows and need to eg refund orders created in a certain window.
valenterry · 4 months ago
This. The mere fact that it's much easier to find deleted/impacted entities is worth it.
valenterry commented on Claude Sonnet 4 now supports 1M tokens of context   anthropic.com/news/1m-con... · Posted by u/adocomplete
Miraste · 4 months ago
Yes, you can't use any of the heuristics you develop for human writing to decide if the LLM is saying something stupid, because its best insights and its worst hallucinations all have the same formatting, diction, and style. Instead, you need to engage your frontal cortex and rationally evaluate every single piece of information it presents, and that's tiring.
valenterry · 4 months ago
It's like listening to a politician or lawyer, who might talk absolute bullshit in the most persuading words. =)

u/valenterry

KarmaCake day2610December 6, 2018View Original