skysight-inc/HackerNews huggingface dataset:
I think for progress you need to look outside the js world. Fundamentally, people keep repeating the same mistakes there.

I'm having a lot of fun lately using Kotlin-js for example. We use the Fritz2 framework, koin for dependency injection (popular on Android as well for good reasons), and fritz2 relies on kotlin's co-routines and StateFlow for state management. It makes for a surprisingly concise code base. For example, the counter example from the article with that would look something like this:

class CounterStore : RootStore<Int>(0) {
val koinCtx by lazy { GlobalContext.get() }

// handler that you can bind events to or invoke directly like below
val inc = handle { old -> old + 1 }

init {
// launch co-routine to keep on incrementing the counter
GlobalScope.launch {
while (true) {
inc()
delay(1000)
}
}
}
}

val koinCtx by lazy { GlobalContext.get() }

fun RenderContext.counterComponent() {
val counter by koinCtx.inject<CounterStore>()
h1 { +"A Counter" }
// react to changes in the counter
counter.data.render { currentCount ->
p {
+"Current count: $currentCount"
}
}
pushButton {
icon { arrowUp }
events {
clicks handledBy counter.inc
}
}
}

fun main() {
startKoin {
modules(
module {
single {
CounterStore()
}
})
}
render("#target") {
counterComponent()
}
}

There's a lot going on here that I can't explain here. But having co-routines means having a proper reactive framework that you use to react to events and update stores, which is where you keep your state. counter.data is a so-called StateFlow; the render function maps updates in that flow to the dom. In the example I have both a button and a co-routine updating the store via a handler lambda function.

Using koin here, just means keeping glue code out of places where it doesn't belong. It's technically optional but makes a lot of sense in larger applications. Because components are extension functions on RenderContext, I use a global variable to get to the koin context. That allows me to inject my dependencies into components with a minimum of fuss. Where Fritz2 gets fun is with more complex state using data classes, lenses, validators, routers and a few other things. And they also take care of styled components and they even have a nice component framework that you can use. Not for everyone and there's a bit of overhead in terms of download size. But great if that less of a concern.
> because any non-tail-recursive function call can in principle be made tail-recursive through conversion to explicit continuation-passing style.

I mean, the call stack is literally just a convention for storing continuation state. The C standard describes the effect of calling another function "suspend[ing]" execution of the current function.[1] What differentiates CPS from regular recursive programming is that this behavior isn't maximally transparent, and typically is also less efficient in machine code.

All of these modes of behavior were mostly well understood early on, but it took several years for the literature to rigorously distinguish and define them, and then complete the circle by declaring equivalencies that nobody ever seriously doubted in the first place.

The upshot is we're like in the 4rd or 5th cycle of people rediscovering things like asynchronous programming. During previous epochs people just beefed over different but functionally similar terminology: e.g. interrupts vs polling (in that case, a carry over from hardware terminology). Unix's awkward signals and then threading APIs being a legacy of those (not very distant) debates. One of the first battles was whether to build recursion into languages at all, rather than requiring explicit management of call state, relying on global space for the fast path that didn't require recursion. Today the dispute is CPS vs blocking, but it's the same basic dichotomy and arguably we're just rehashing the same battle over again, without even changing the terminology.

The blocking/polling/recursion camp seems to invariably win out. The whole purpose of general purpose programming languages is to hide basic code flow management, particularly call state, behind an abstraction, and in the vast majority of code written in these languages, even highly concurrent code, such state bookkeeping is obnoxious noise when it leaks through too heavily. It's ironic when some language aficionados (Rust, Javascript, etc) justify it by saying it's about maximizing performance or making things explicit, ignoring the fact that almost all of this "efficient" and "transparent" code is running within a process (also variously described as "threads" and "coroutines" in bygone eras) isolated with hardware-supported virtual memory, all of which are predicated on transparent, blocking behavior. IOW, preferences have already been established and then punctuated multiple times, now we're just haggling over the finer details.

[1] C11 6.2.4p6: "... Entering an enclosed block or calling a function suspends, but does not end, execution of the current block...."
God, so much hate on this thread. Damned if he do, damned if he don't. Always amazes me how HN crowd loves to project their ideals on how people with money should spend their money.
This is what propaganda will make. If you keep your population only speaking a language that the rest of the world does not use, it makes propaganda so much easier.
I havent seen what Russia's and China's combined military stats are to NATO yet.

Russia lead on most nukes, US everything else, but China is 3rd and we know they have some very disciplined military and a far larger population.

Here in the UK we have been forbidden in law from interacting with any Russia entity, so Russian bank accounts are frozen, cant provided good's or services to any Russian entity.
RT is hardly a news agency. They write more fiction that news.
Yeah, exactly that. Every Russian who isn't out on the streets trying to tear down the Kremlin is responsible for this war
I used to have Samsung devices, but the quality just got worse and worse... currently quite happy with my LG V20 but it's on its last legs, and when I replace it I want something with a replaceable battery which is quite a rarity on higher-end phones these days. Am aware of the Librem5, but I still want to be inside the Android and google play ecosystem.
So, its React with the sharp edges smoothed away. Interesting. I am not a web developer, so forgive me if this is a stupid question, but can someone tell me, if you decided to use Solid.js as opposed to React, can you still make use of all the 3rd party React UI frameworks out there? Is it compatible with React in that sense?
> Shells have relatively simple operational models, so _any_ API would probably be workable for shells.

True. Today anyways. Back in the 70s though, there was a lot of innovation going on around process spawning, and fork+exec almost certainly made it easy to play with those ideas. I'm referring to job control, for example. But also things like the parent-child relationships between the shell and all the processes in a pipeline -- not all shells have set those up the same way.

So, yeah, maybe we need not just posix_spawn() but posix_pipeline_spawn(), why not. Make it even easier to write a shell. After all, plumbing a complex pipeline with posix_spawn() requires a fair bit of code.

Will any API do? Yes, provided it covers all the things Unix shells do nowadays. It's still easiest to get all the functionality (that a shell dev might want to build) with fork+exec though, especially since the shell author gets a great deal of control that way, though they get that at the price of having to know a great deal of stuff intimately. Arguably, anyone wishing to implement a posix_pipeline_spawn() would be like a shell developer.
Yes, he appeared for a TV ad for Putin in 2012. Why is this suddenly a firing offence in 2022? Does he bear personal responsibility for what Putin's doing today?

Denouncing McCarthyism in 1950, Truman said, "In a free country, we punish men for the crimes they commit, but never for the opinions they have."
I'm not sure how Mullvad does it, but I keep a record of who purchased what serial number. My number one customer support request is people asking for their serial numbers because they lost them, which is why I keep a record.
Surely, I had to do maintenance. Well worth it. It drives as new.
I sure will miss the balanced perspectives Russian trolls and bot farms bring.
Harnessing Math to Understand Tipping Points (2013)
This article hits on something I've felt for a long time. The idea that "hooks are superior" to me is ridiculous. If a linter is required to tell me when I'm writing a bug that is not immediately obvious, that is a failing in the framework to round those edges. Lints are not rounded edges!

Solid is nice and _seems_ to fix the issues with hooks, but as another comment mentioned, the challenge is with building at scale. It's unclear to me how this scales and where the sharp edges are.

React IMO trades off performance in exchange for ergonomics. These ergonomics bear fruit early on, but you start dealing with this debt very quickly. As "nice" as Redux is, I shouldn't need it so early. React is designed in a way that results in pretty terrible performance. I once wrote a React app, and discovered perf issues 2 weeks in. Any UI framework I used in the past would have scaled beyond this point without having to have the data layer rewritten. Frameworks of the past also had what seemed like way less "magic".

I totally accept that it's seriously nice to write, but how many trees has React alone burnt?
>>> What are the things WE ("the West", generally speaking) have done to trigger the changes in Russian foreign policy?

Exactly this. The western world has this infallible belief that what they are doing if right and everyone else is wrong. They don't even stop to think the consequences. They are doing things which if reciprocated they won't accept and they say .. Oh we just want to spread democracy everywhere"
They were hoping for a nice buffer puppet state between them and NATO. It makes a lot of sense, and in Putin's position, it may well have been the call that would lead to the most peace in the future. Now... Not so much.
Actually I meant it as multiplication. This idea times that idea, a multiplication of factors influencing.
It's increddibly shortsighted, It's cutting out people that is trying to fight with true information, leaving the propaganda unquestioned. This is why we won't cut internet to russia.
Taxes stopped supporting war in the US a long ago because people don’t like paying for wars they don’t support. The “department of defense” finances its wars by borrowing from the FED. These credit card wars inflate the money supply instead and although everyone still loses its a sneaky way to steal money from people.
if those weapons have been sold it is commerce, at any rate lots of things are called commerce that might stretch the definition so...
Will the dead Ukrainians get their lives back? No one cares about your Gmail account mate. Have some respect for what’s going on.
Yes, I like the larval process idea. No doubt it's good.
You have salt water. You heat up the water. Water evaporates off the top, condenses somewhere, the condensed water is clean drinkable fresh water. The stuff that's left is brine, which is essentially a waste product.

The engineering question is how much water do you use? You could use a thick later, like a swimming pool. But that takes a lot of energy to heat up. You could use a thin layer, like an inch thick across a parking lot. This takes less heat energy, but a lot of energy to clear out the brine, and a lot of salt will build up that you will need to periodically need to clean out.

This thingie does the best of both worlds. It is a thin layer at the top. Thin is good, because it takes less energy to heat. The layer between them is insulated, so you don't lose heat energy to the pool of water below it. There are channels between them that transports water upwards and salt downward via convection.

The thin layer at the top heats and evaporates quickly. The salt is transported fairly rapidly past the insulated boundary and into the large pool below. The large pool supplies more water through the same boundary.

The large pool can be slowly mixed with the ocean.

I'm kinda blown away by this. What a shockingly ingeniously simple and effective mechanism. It's like when I learned that the guts of a normal coffee machine that makes coffee machines do coffee machine things is just a heater, a hose, and a one way ball valve, and literally nothing else.

I hope it works and I hope it scales. We could be done with California's drought problem in a decade.
So how do you recommend that the rest of the world support Ukraine's effort to not be swallowed up and pillaged by a neighboring country?
I have been with Namecheap for at least 10 years, probably much longer. Not Russian or Ukrainian or anything remotely similar. I applaud your courage and the fact that you were willing to take such a stance despite the effect this will likely have on your revenues. We need more companies like this. Thank you!
The PTO, and the very concept of a patent in the American legal system, are also controlled and owned by the people of California in that sense. It's not a useful way to look at the world.
What will happen is a Russian dns that many countries will use would be setup. This creates a grey-net where by using this dns sites with content not allowed in the west will live. The possibilities are a little exciting.
Of course, you're right. I suppose the question is if "not that much" should be a contextual matter or not. Should people ever be jailed for protesting a war? Is it any better if previous leaders would have responded more harshly, or were they simply worse leaders?

In any case I find it disturbing.
Killing Russian civilians isn't a solution which is why I am firmly anti-bombing and anti-sanctions.
Too few. Too late. When Russia invaded Ukraine and occupied Crimea in 2014 most Russians cheered. There were some protests, not even close to have any impact.

It seems same today. Russian majority seem to be complacent with the Putin's party line. Brainwashed with propaganda.

I hope for swift end of this war and of Russian empire with it. This country outlived itself by a century, holding on together only with lies and thuggery.
LG does the same.

I bought good OLED and still, I had to connect pihole to block ads...

New LG's are even worse. I don't know what I do if my current TV will stop working.

I want only display, I don't want any additional features (ads, personalization etc.).
Using Emacs Tramp for SSH (Emacs SSH)
You're absolutely correct, and people downvoting you aren't the ones who know about NATO's war crimes. Putin does not want that for his people.
Does it matter to the average Russian if the money goes to a foreign state or a handful of oligarchs? The end result is the same.

After enduring the communist hellhole for 70 years they should at least have been able to enjoy the fruits of all that labour.
Yes, they're called stablecoins. Dai is a decentralized stablecoin that is always pegged to $1 USD. Rai is a stablecoin that is pegged to itself (using a feedback mechanism).

Both are on Ethereum and if you keep wealth in them that wealth cannot be confiscated or censored (except with a physical wrench attack).
This is the same code in Svelte.js

# Counter.svelte

<script>
let count= 0

setInterval(() => {

count += 1

}, 1000)

</script>

<div>The count is: {count}</div>
I agree, there are some really nice choices made by Clement Hurd in the illustrations that enrich the text, the starkest one being that despite the relatively high vantage point of the viewer, as determined by the room's perspective, there is no horizon line, trees, or buildings shown outside the windows. Our awake mind is represented by what is inside the room, I feel like that choice to limit outside distraction mirrors the process of falling asleep.
I can't speak about Middle East, but the wars in Yugoslavia were most definitely not started by the U.S.
I'm Russian. I've been doing everything I can (legally and peacefully) to protest against the regime here for last 10 years. I participated in protests, fought with propaganda on social networks, talked with my friends and relatives who watch TV a lot and showed them a different point of view.
Yep, it's clearly that it wasn't enough — the regime is still here.
Right now I feel screwed. My mates who just left the country for good and obtained EU\US\etc residence permits have no problems right now, but me, who tried to do something to change what's happening in my country, have problems.
Step by step tutorial to set up Docker for running Selenium Tests
Do you think the Ukrainians after enjoying this?

They cannot put every Russian in jail, if you are not on the streets and burning the Kremlin you clearly don't care enough
There is a fine line between making it hurt for normal people and make the affirmation of Putins world view that they are under attack. People are already living with a lie their whole life, it doesn't help if we affirm this just when they start to see the light... Cutting of the people that is trying to get the truth to the population is very counter productive in this case.
Yep, same thing that happened to British Pound Sterling. The Industrial Revolution and the British Empire made it the global reserve currency; war losses, the dismantling of the Empire, and the decline of British industry handled the mantle to the American Dollar. Nothing truly protects USD from the same forces.

China and Russia won't succeed at launching a competing standard though. Autocracy may promote economic growth at home, but it cannot credibly protect the financial interests of foreigners from its own impulsive and selfish desires. You deposit funds into Russian and Chinese banks at your own risk.
Gerald M. Weinberg books. Just get them all. QSM 1-4 for start.
Air raids in Izmail now.

It’s not safe.
> How are you supposed to hire 50,000 people a year with a process like that?

That's not a valid question. No single hiring manager hires 50000 people in a year.

If the company is giant enough to hire 50K people a year, the work is distributed among the many many thousands of hiring managers.
Wow, Putin will love this. He doesn't even need to build a Great China Firewall. Corporates will do the job free for him.
And we "really do believe" in our politicians' speeches, despite how absurd they sound.
Czech IIRC
cool approach to implement matrix multiplication
Unfortunately, you cannot use React code inside Solidjs[1] so you cannot make use of the huge ecosystem of react UI components/libraries. It isn't compatible in that sense. However, there is an "official" option[2] for including Solidjs code inside React.

[1]: https://www.solidjs.com/guides/faq#is-there-react-compat%2C-or-some-way-to-use-my-react-libraries-in-solid%3F
[2]: https://github.com/solidjs/react-solid-state
But you're sharing file descriptors, which might be for devices, or for SOCK_SEQ connections, etc, and you can't just have the parent and child step all over each other writing to them. Now, you wouldn't do that, but you might use a library that lets you end up doing that without noticing. Fork-safety is not trivial.
Hmmm. I'm not sure that Hello World actually counts as a program. It's usually just a code snippet. And anyway, it was created (coined?) way after ELIZA.
Have you ever lived under sanctions? Have you lived your whole life in a country who has only been an imposter of sanctions?
Heh, yeah basically. You get it. But see the above comment for details. If you're unhappy with that, then don't be the one who next time leads with insults: https://news.ycombinator.com/item?id=30226657
That's a generous way of putting it. Just the first chapter nearly had me putting the book down as it read like a press release written on behalf of the scientist. It gets less painful and I understand that authors choose to write books about subjects that interest them but it feels like there's a definite difference in objectivity from his previous works.
They're saying that the fact that Russia is invading Ukraine gives namecheap a legitimate reason to decline to provide services in Russia.
Historically getXbyY functions and the name service switch had a way of doing that, and that was one reason for nscd to come along (another was to cache better, naturally).
“Long lists of generic hooks” is a symptom of devs not having climbed the difficulty curve a bit further, to where they are writing custom hooks, and using fewer in each component, IMO.

It’s understandable to stumble into this difficulty though, and a bit of deceptive marketing on the part of the hooks folks. They should be upfront that using hooks well in a real app requires a lot of careful thinking of the kind that many “typical” programmers do not have much practice in, and then the maintenance of whatever code comes from the effort. The functional-programming-mindshare situation seems to be improving slowly, but still.
Now that's pretty much the answer I was looking for, I believe. This makes things much clearer!
In the past, large companies had research/innovation departments, e.g. IBM Research, Parc Xerox, Bell Labs. In recent times large companies only innovate in terms of coming up with ever faster ways of making more money (financialization) - cutting costs and research departments were the earliest casualties.

These days, real innovation happens mostly within startups.
It is the best position to take. How many civilian deaths is too much for you, if not zero?
React would work well as a compiled to metal language. Instead we end up with React on Typescript on ES6 on ES5 on the browser that still only has one language targetable. We're shackled to a rocketship in motion desperately monkey patching the engines.
Agreed, after 6 years of use, my gripes with React come down to the re-rendering and lack of syntactic sugar for commonly used things. Hooks can get messy, but complicated components were complicated even with the class syntax.

What React has going for it, is that it is predictable. That is an extremely important part of any tool.
You should resign.
That is the argument for vfork(), and it's been the argument for it since it was incepted, decades ago.
The good thing is a lot of labs across the world trying to solve this problem. Here are some I am currently watching https://e-catworld.com, https://www.youtube.com/watch?v=z01586zdnM0
You're defending India standing with the tyrants incinerating Ukrainian civilians' lives like this: (trigger warning) https://twitter.com/maria_avdv/status/1498544825062375434

That's far far far worse than your weak case for racism.
This is whataboutism and it is so tired. A good propaganda tactic though, and the Russians are using it as an attack vector. Westerners seem really vulnerable to this form of propaganda, possibly due to the success of previous information warfare led by Russia.

Bringing up some other terrible thing for comparison does not change in any way whatsoever the severity of what is happening in Ukraine. Whataboutism propaganda is designed to muddy the waters around that indisputable fact.
User "JBaum" denying ownership of an article stolen by "James Blobaum" who loves using the word "Baum" in his ramblings. Sure, okay, totally legit. Hackernews isn't for spam or theft dude. Also, where's your SSL cert???