Hacker Newsnew | past | comments | ask | show | jobs | submit | tekkk's commentslogin

Never thought of that. Probably a bit too generous given that it could be just as well waste of time and resources, nevermind the bias of the voodoo doctor. Most of it was just weirdly provided therapy I suppose to relieve stress.

But it is funny that humans put a great lot of weight on social contracts and being given explicit orders, maybe even publicly, must help pursuing action instead of rumination. Especially in a world where things seemed to happen randomly anyway.


"Evolution doesn't optimize for correctness, it optimizes for minimum error cost."

It's a subtle but important distinction.


That is such a good line. Another important note is the time horizon of that error function is often quite short.


I'd say React has become broken. The fact you have to by default wrap everything in a hook and cycle the boilerplate from one component to another is insane. useMemo, useCallback-use this and that. What are we even doing here in the first place? Playing whack-a-hook?

And then you still can end up with stale closures.

The fact they are over-engineering the server-side rendering is a cherry on top. React used to prize itself as the minimalistic solution but now they invent abstractions just to feel smart it seems.


I can see your point and sometimes I myself include PoC code as commented out block that I clean up in a next PR incase it proves to be useful.

But the fact is your complete PR commit history gives most people a headache unless it's multiple important fixes in one PR for conveniency's sake. Happens at least for me very rarely. Important things should be documented in say a separate markdown file.


The fundamental problem in my mind is the mixing of binary and text content. An optimal solution would separate them, allowing systems like Git do the versioning. But separating the tightly coupled parts into own files would also be annoying sharing/management wise.

Base64:ing the images into strings, like one could do with html, would probably not be ideal for compression. As a matter of fact, text-files as such would not be ideal compression-wise.

So I suppose if binary-format cant be avoided, SQLite would be as good as any other compression format. But without built-in collaboration protocol support, like CRDT, with history truncation (and diverged histories can always fall back to diff) I dont think it'd be good enough to justify the migration.


What a stupid argument. Maybe grandpas and grandmas should get a different phone then, like a Doro, and stop bringing the rest of us down. And it doesn't even hold water as my mother has been scammed by legitimate App Store apps that have charged extra-fees just because they could.


> Maybe grandpas and grandmas should get a different phone then, like a Doro

They did, they got an iPhone.

> my mother has been scammed by legitimate App Store apps that have charged extra-fees just because they could.

Did it empty her bank balance by abusing the private NFC payment APIs that Apple are being ordered to open up?

Did it cryptolock all her files?

Did it activate the camera and mic to spy on her for blackmail?

These are things that we need to worry about with random things we download on desktop these days. It's not 2007 any more, I have an entire spare computer for untrusted software.


I don't want to get into politics but dont you think it's funny when you can purchase assault rifles, made for killing people, yet we are so afraid of having the poor individuals in control of their own phones. Or farming equipment - the list seems to keep growing.

It's just corporate propaganda that all hell would break loose, you could just offer installing baby mode at Apple physical store that can only be removed at said places. Yeah some people would still climb the fence and touch the power lines but look, can we save them all? Should we? In this world of merciless exploitation, wouldnt it be just fair we stopped pretending it never was about anything else but money?


> I don't want to get into politics but dont you think it's funny when you can purchase assault rifles, made for killing people

I'm British by birth, living in Berlin. We definitely think Americans are a bit "funny", in the not-at-all-funny sense of the word, about guns.

> It's just corporate propaganda that all hell would break loose, you could just offer installing baby mode at Apple physical store that can only be removed at said places.

Thing is, with computers, we've had decades of watching malware infect, destroy, corrupt, ransom, and blackmail. It's still happening, even.

And we even have a way to get past "baby mode" restrictions: be a developer.

But guess what? Developers also face supply chain attacks, because malware is everywhere.

I do miss the olden days when I didn't need to care. A mac online in 2009 was worry-free.


>Did it empty her bank balance by abusing the private NFC payment APIs that Apple are being ordered to open up?

NFC payment APIs have been open on Android for decades and no such thing of the sort has ever happened. You cannot magically conjure up a payment from Apple Pay to <X> without user involvement and confirmation.

>Did it cryptolock all her files?

Apps do not have write access to all your files.

>Did it activate the camera and mic to spy on her for blackmail?

Every mobile device now has a giant notification saying that the device is using the microphone or recording video.

The disingenuous "having an open app store/not being locked in the walled garden is a security risk" is getting tiring, especially when it's basically all lies now. Unless your argument is that Apple is too incompetent to write APIs properly, in which case I wonder why you think that said APIs being private would prevent anything.


> NFC payment APIs have been open on Android for decades and no such thing of the sort has ever happened.

Google is also getting legal action for monopoly abuse of their app store, so what's possible today on Android is not sufficient to say what's safe or not.

Despite this, they're also already facing legal action for sharing too much data from Google Wallet.

Fail on all directions at the same time.

> Apps do not have write access to all your files.

> Every mobile device now has a giant notification saying that the device is using the microphone or recording video.

And this can't be circumvented ever, even when private APIs are no longer vetted? And none of the voices describing downloads warnings as "scare screens" aren't making the same demand on this?

> The disingenuous "having an open app store/not being locked in the walled garden is a security risk" is getting tiring, especially when it's basically all lies now. Unless your argument is that Apple is too incompetent to write APIs properly, in which case I wonder why you think that said APIs being private would prevent anything.

The disingenuous "force platforms to be open, there's no security risk" position was tiring decades ago when the iPhone was brand new, especially when it was obviously lies even then. Apple obviously isn't magically competent enough to write APIs properly, they had "goto fail" and all the jailbreaks we've seen in so many versions of iOS were specifically some random doc that users could install that included a way to escalate privileges, and even without that evidence we've also got access to the black market prices for zero-day exploits that for a long time showed they're cheaper than Android, and the obvious reason why this prevents "anything" is that "anything" is a massive subset of "everything".


Or maybe the iPhone should be that phone and those who don’t like the closed ecosystem should get something else?

Why would buy a phone that doesn’t work the way you like when alternatives exist?


Because we want the iPhone on our terms.


So? I want it on my terms, which are mutually exclusive to yours. Who wins?


You can choose not to download anything.

We're asking to rewire the economics and regulatory framework, not change how you personally use your phone.

I don't care how you use your phone. I care how the world works.


What you are proposing is the balkanization of software delivery.

I indeed choose not to download software from Facebook and friends, but it’s quite likely others will need to as it will become the only way to get their software. At that point: tracking out the ass.


"Balkanization" is the wrong way to view this. This is waking up the regulatory arm of the government that has been asleep at the wheel. And it should have been done over a decade ago.

The better analogy is a forest fire. We're clearing up the overgrowth (ossification, unfair taxation, and unfair control) and creating room for new life to start and flourish.

> I indeed choose not to download software from Facebook and friends, but it’s quite likely others will need to as it will become the only way to get their software. At that point: tracking out the ass.

Don't like a negative externality? Tax and regulate it. It's what Europe does. And it's what we're good at doing in every industry except for the software industry. We need to stretch those muscles and get back into the habit of doing it.

We should pass regulations on giant social media companies as well.

But in a world where we have no software freedoms and where certain software tracks us, having software freedoms is the more important cause and it's where we must start our battle. You don't need to use Facebook, but you need to use a smartphone. New social media apps are started all the time (TikTok, Tea, etc.) but smartphones are trillion dollar moats.

Our smartphones are our gateway to digital life. They need to be liberated from Apple and Google. Mobile computing belongs to all of us.


> "Balkanization" is the wrong way to view this.

It's a perfectly valid way to view it. Forest fire might be another valid way to view it, but is different. Both are equally valid, and represent different views of what ideal is.

> Tax and regulate it. It's what Europe does.

I am European. Nice try though.

> We need to stretch those muscles and get back into the habit of doing it.

I don't disagree. Start there then. Make it so that tracking me incurs such a heavy penalty payable to me personally that it is not worthwhile. Then go after the distribution mechanisms that allow someone to live a relatively tracking-free life without having to be an uber-nerd to make it reality.

> Mobile computing belongs to all of us.

There are plenty of platforms. What you are saying is it belongs to the people who want it to be a certain way with particular negative outcomes for many people. I want it to be a different way with negative outcomes that affect me less.


Wow. Didnt know there were these CRDT examples for mere mortals. I supppose once you put Rust in the mix the heads start to explode, mine included. Cool!


The thing that can make real world text CRDT implementations complex is that the optimisations kinda bleed into all the rest of your code. The 2 big optimisations you want for most text CRDTs - including egwalker - are:

- Using a b-tree instead of an array to store data

- Use internal run-length encoding. Humans usually type in runs of characters. So store runs of operations instead of individual operations. (Eg {insert "abc", pos 0} instead of [{insert "a", pos 0}, {insert "b" pos 1}, {insert "c" pos 2}]).

But these two ideas also affect one another. Its not enough to just use a b-tree. You need a b-tree which also stores runs. And you also need to be able to insert in the middle of a run. And so on. You need some custom collections.

If you do run-length encoding properly, all iteration throughout your code needs to make use of the compressed runs. If any part of the code works character-by-character, it'll become a bottleneck. Oh and did I mention that it works even better if you use columnar encoding, and break the data up into a bunch of small arrays? Yeahhhh.

So thats why diamond types - my optimized egwalker implementation - is tens of thousands of lines of code instead of a few hundred. (Though in my defence, it also includes custom binary serialization, testing, wasm bindings, and so on.)

Rust makes the implementation way easier to implement thanks to traits. I have simple traits for data that can be losslessly compressed into runs[1]. A whole bunch of code takes advantage of that, by providing tooling that can work with a wide variety of actual data. For example, I have a custom vec wrapper that automatically compresses items when you call push(). I have a "zip" iterator which glues together other iterators over run-length encoded data. And so on. Its great.

Though now that I think about it, maybe all that trait foo is what makes it headache inducing. I swear its worth it.

[1] Eg MergableSpan: https://github.com/josephg/diamond-types/blob/00f722d6ebdc9f...


Jeezs. Thanks for the breakdown. I suppose the layering of different, complicated patterns make it too thick to parse. And some of the CRDT APIs leak quite a bit of complexity once you want to do something a little more complicated eg wrap rich text editor content.


I put at least some of the blame on text editors themselves. Many text editors - particularly on the web - don't expose a clean event based API telling you what changed. Its very annoying.


Really impressive, great job! I was interested to see how you had solved Result type and that seems quite developer-friendly—no wrappers just value & error union. I should try it out to see how it's to write if I can run it on ARM64. I wish Godot Script looked like this.


Figma's stock quadripled in price from 33 to whatever it is now. Not saying it's good or bad, just that those gains must have been nice with effort akin to staring spreadsheets a while and babbling in meetings.


Here's my take as TS dev. You just never learned to use types in the first place where there is very little ambiguity on any types anywhere because there is close to no any's used. Sounds like you guys get high and mighty on your tunnel-visioned copium—I mean I used to write JS for god's sake and thought it was okay. And I remember when I first tried TS felt annoyingly hampered by having to actually use interfaces properly.

Sure, the nature of Elixir probably makes it easier but I find little joy in dynamic whack-a-mole and mental gymnastics to infer types instead of fricking actually being able to see them immediately.

I could go commando in TS as well and switch to JS and JSDoc, leaving everything gradually typed and probably be fine but I'd feel terribly sorry for anyone else reading that code afterwards. It'd be especially silly since I can now just infer my auto-generated Postgres zod schemas with little effort. Moreover, a good type system basically eliminates typing-related bugs which you guys apparently still have.

So please, don't over-generalize just because you think you got it figured out.


Lmao. This has to be the funniest comment I’ve ever read on here. I can assure you, the only copium being huffed is by you, mate. I have written Scala, Swift, Java, and more (including TypeScript). I have zero trouble with type systems, but I have wasted enough time fighting them for little real world benefit. In Elixir, and this is the best part, I don’t fight type bugs. You probably do because type erasure means you can still have them if someone has mistyped something or shit on something at runtime— the joys of JavaScript.

It sounds like you’re really trying to justify something and that’s great for you. I’m really happy for you. Keep it up. May you soar where no junior dev has dared to soar before. God speed.


Hah. Sure buddy, Mr. Sr Dev. Sorry if I offended you and your vast experience. Without types there definitely aren't type bugs, I grant you that, and JVM languages are quite different to TS. I don't know if your argument on type erasure is any better than advocating for dynamic typing but it definitely happens when you just start throwing anys.

And look, I'm first to admit that TS type system isn't perfect (and it can cause some devs to go overboard) but I have read my share of Python scripts that were read-only from the minute they were born.

  It sounds like you’re really trying to justify something and that’s great for you. I’m really happy for you. Keep it up. May you soar where no junior dev has dared to soar before. God speed.
And please, your condescension just sounds insecurity to me. It's highly amusing though that you try to play me down as a silly junior dev, I'm quite satisfied that my original assessment was correct.


> I'd feel terribly sorry for anyone else reading that code afterwards.

I feel terribly sorry for people that have to read typescript and work with TS zealots


I got a wave of shudder reading the acronym "HAM stack". Yugh. MEAN, MERN, RERN–once hyped up hot air which now sounds so dated and hackneyed. It's cool to be excited about tech but if your main selling point is building "faster and cheaper", I don't know if picking up a minimalistic framework you know nothing about is faster than just re-using your trusty boilerplate.

Be it React or Svelte or whatever. With serverless backend if you want to keep costs down. Although a server from Hetzner isn't that expensive and you can host multiple APIs there.


> I don't know if picking up a minimalistic framework you know nothing about is faster

That's the whole point of HTMX: Going back to what works: trusty old HTML attributes, but giving them intuitive interactions.

Instead of learning the microframework du jour, you just add some attributes into your HTML templates, and get your desired result.


The problem is not the server cost, the problem is maintaining the (multiple) APIs altogether.


cute stack names have gone downhill since LAMP


Since when did LAMP go down? Maybe only Apache is getting less popular but still has no problem.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: