skysight-inc/HackerNews huggingface dataset:
Here comes the "IO" excuse :)

Effective use of IO at such scale implies high-quality DB driver accompanied by performant concurrent runtime that can multiplex many outstanding IO requests over few threads in parallel. This is significantly influenced by the language of choice and particular patterns it encourages with its libraries.

I can assure you - databases like MySQL are plenty fast and e.g. single-row queries are more than likely to be bottlenecked on Ruby's end.

> the code itself is written in such a way that it would be slow in whichever language. Again, in my experience this involves lots of (oft unnecessary) allocations and slow data transformations.

Inefficient data transformations with high amount of transient allocations will run at least 10 times faster in many of the Ruby's alternatives. Good ORM implementations will also be able to optimize the queries or their API is likely to encourage more performance-friendly choices.

> I wish most performance problems would be solved by just using a """fast language"""...

Many testimonies on Rust do just that. A lot of it comes down to particular choices Rust forces you to make. There is no free lunch or a magic bullet, but this also replicates to languages which offer more productivity by means of less decision fatigue heavy defaults that might not be as performant in that particular scenario, but at the same time don't sacrifice it drastically either.
Grow a mullet and work in a bar.
See my other blog posts and GitHub if you would like some more!
A Pollyanna approach is not the answer (and rarely is.) I believe you've missed my point.

I'll state it again although I don't have good faith in this conversation: because the majority of people don't prioritize (or even believe in climate change), the tactics are going to be different than other social issues.

Literally look up any polling on the matter for "proof."
> A function with well-constrained inputs and outputs is easy to reason about.

It's quite easy to imagine a well factored codebase where all things are neatly separated. If you've written something a thousand times, like user authentication, then you can plan out exactly how you want to separate everything. But user authentication isn't where things get messy.

The messy stuff is where the real world concepts need to be transformed into code. Where just the concepts need to be whiteboarded and explained because they're unintuitive and confusing. Then these unintuitive and confusing concepts need to somehow described to the computer.

Oh, and it needs to be fast. So not only do you need to model an unintuitive and confusing concept - you also need to write it in a convoluted way because, for various annoying reasons, that's what performs best on the computer.

Oh, and in 6 months the unintuitive and confusing concept needs to be completely changed into - surprise, surprise - a completely different but equally unintuitive and confusing concept.

Oh, and you can't rewrite everything because there isn't enough time or budget to do that. You have to minimally change the current uintuitive and confusing thing so that it works like the new unintuitive and confusing thing is supposed to work.

Oh, and the original author doesn't work here anymore so no one's here to explain the original code's intent.
I’m 15 years in and I feel basically the same. I end up making a feature or change, then going back and trying to split it into chunks that are digestible to my colleagues. I’ve got thousands of lines of staged changes that I’m waiting to drip out to people at a digestible pace.

I yearn for the early stage startup where every commit is a big change and my colleagues are used to reviewing this, and I can execute at my actual pace.

It’s really changed the way I think about software in general, I’ve come around to Rich Hickey’s radically simple language Clojure, because types bloat the refactors I’m doing.

I’d love to have more of you where I work, is there some way I can see your work and send some job descriptions and see if you’re interested?
It’s nice that they are adding shadowsocks, but it would be nicer if we could set it to just use shadowsocks 24/7.
It never ceases to amaze me how vacuously shallow the answers to this type of question are (on HN, and in general).

It really is quite clear how few people really appreciate what a miracle their life is.

Literally, the probability of you being here reading this right now is so astronomically low, as to mathematically qualify as a miracle.

Almost every response to this type of question is within the context of the person's job. What a failure of perspective. Is your world really that tiny? Maybe you should pull your head out of your iPhone?

There was a whole lot of time, let's just call it an eternity, before each of us was born. There will be another whole lot of time, let's just call it another eternity, after we're dead. During this tiny little gap in between those eternities is this little window where each of us gets to be a conscious entity. A tiny transient spark of life, aware of the universe around us.

Given that context, you're saying you can't understand why you should be happy to be here?
They're underrated when they work™

Currently at work I'm having issues because
- Auth between an embedded app and javascript's EventSource is not working, so I have to resort to a Microsoft package which doesn't always work.
- Not every tunnel is fond of keep-alive (Cloudflare), so I had to switch to ngrok (until I found out they have a limit of 20k requests).

I know this isn't the protocol's fault, and I'm sure there's something I'm missing, but my god is it frustrating.
In sweden if you dig a canal around some land, they call the result an island.
So it’s websockets, only instead of the Web server needing to handle the protocol upgrade, you just piggyback on HTTP with an in-band protocol.

I’m not sure this makes sense in 2024. Pretty much every web server supports websockets at this point, and so do all of the browsers. You can easily impose the constraint on your code that communication through a websocket is mono-directional. And the capability to broadcast a message to all subscribers is going to be deceptively complex, no matter how you broadcast it.
It’s better to quote a reserved word than to be unable to use it.
>What is the main reason?

I can't guess what is the main reason. There might not even be a main reason, as many groups of people at Apple and its shareholders decided this over the years.

(Also see my speculations below in this thread).

So not in any order of importance to Apple:

1) Create the same moat as NVIDIA has with CUDA.

2) Ability to re-define the microcode instruction set of all the dozens of different Apple Silicon chips now and in the future without having to worry about backwards compatibility. Each Apple Silicon chip simply recompiles code at runtime (similar to my adaptive compiler).

3) Zero hardware documentation needed, much cheaper PR and faster time to market, also making it harder to reverse engineer or repair.

4) Security. Security by obscurity

5) Keeping the walled garden up longer.

6) Frustrating reverse engineering of Apple software. You must realize Apple competes with their own third party developers. Apple can optimize code on the GPU and ANE, third party developers can not and are forbidden too by Apple.

7) Frustrating reverse engineering of Apple hardware.

8) It won't make Apple more sales if 3rd party developers can write faster and more energy efficient GPU and NPU software.

9) Legal and patent infringements considerations

10) Future compiler improvements

11 ) Trade secrets
I was frustrated all day because I couldn't find my fast charging cable and just couldn't leave the phone plugged for more than 15-20 minutes at a time due to various activities, which also required a lot of battery charge (photo/video shooting), so I was dancing around the charger all day...
Semicolons are just an example, and a fairly minor one. A bigger pet peeve of mine is C-style type declarations. If I create a binding for X and initialize it to 1, the compiler should be able to figure out that X is an integer without my having to tell it.

In fact, all type declarations should be optional, with run-time dynamic typing as a fallback when type inferencing fails. Type "errors" should always be warnings. There should be no dichotomy between "statically typed" and "dynamically typed" languages. There should be a smooth transition between programs with little or no compile-time type information and programs with a lot of compile-time type information, and the compiler should do something reasonable in all cases.
Several anti-aircraft systems can and do use fragmentation warheads. The BUK that shot down MH17 used one and the impact patterns are strikingly similar. Take a look at the “Reconstruction” section in this: https://libraryonline.erau.edu/online-full-text/ntsb/miscell...
Habits > Motivation - Develop a set of habits and behaviors that force me to work on my side projects everyday even if for just 5 minutes. The sporadic bursts of motivation that push me into the hyperfocus mode are actually useless if I can’t finish the project and it’s 80% done in perpetuity.

Networking - I find it really hard to approach random people and finding any connection.

Sales - finding and converting clients is a must if I am to seriously consider doing freelance engineering or entrepreneurship.

Do you guys think it’s worth reaching out to a professional coach wrt the points listed above?
Because not everything is a website?
Here's another incident you can compare against:

https://www.reddit.com/r/aviation/comments/1hm0nf7/an_il22_t...
> "tech darling like intel"

I guess you haven't looked at INTC stock price recently? As of yesterday's close on 2024-12-23 it's essentially unchanged from where it was 30 years ago. If you factor in inflation (which you should) it's actually lost 50% of its value over that time period.

Apple, Microsoft and Google are different animals.
stop taking it so personal if some one critiques me at work. in hindsight i never really know why i even care. but in the respective moment i immediately feel attacked.
Great post. I discovered SSE when building a chatbot and found out it’s what OpenAI used rather than WebSockets. The batteries-included automatic reconnection is huge, and the format is surprisingly human readable.
That’s not in disagreement. The question is how traumatised that person coming out is.
I don't think you can have golden rules, if you do, you fall in the usual don't do X, or limit Y to Z lines, etc.

But what you _can_ do is to ask yourself whether you're adding or removing cognitive load as you work and seek feedback from (possibly junior) coworkers.
How much to give is a pragmatic question (effective altruism)
> Python was an example of my point, but I was thinking even more along the lines of any scripting language that employs pre-processors, so the code inlining works

I’m sorry, I’m not really understanding what you mean here.

> client-side PHP subset

I’d dislike it for the same reasons as before.

Php was made to and evolved largely for generating HTML on a server. Not to have snappy, non blocking, event driven user interfaces.

And since PHP is not a standardized the same way JavaScript is, any browser may or may not implement it the same was as another.

We’d be back in the early 2000s world of browsers incompatibilities.

What would native browser support for php give you vs a wasm implementation of it?
Neat, I tried to hit the powerblocks and no matter what I did couldn't get them to pop. Not sure what the point of the game is but it is damned difficult to navigate.
I like (3) to be honest and the number of times it has poised any issue is virtually 0.
Discussion at the time (175 points, 59 comments) https://news.ycombinator.com/item?id=34439387
I hate these silly little code examples where they show some if condition being changed to another format and act as if that's real advice that helps you program.
Thanks a lot for sharing your experience!
Alright! More stuff to set on fire!!!
> Bitcoin is still useless

Oh gosh. You're actually one of those people. Well, it's a pleasure to meet you!

And since you feel Bitcoin is useless (I'm leaving the door wide open for a retort filled with cognitive dissonance), please send me 21BTC for which I'll pay you $1000 immediately? My address is:

bc1q6k9fcpk9z9wrt9fhmu2dnkq7cn0w72rkpwwvmm
Time to bring out the ansible
It's ok, humans don't need water.
As a criticism that applies equally to Google.

Google lays off engineers: https://www.theverge.com/2024/1/11/24034124/google-layoffs-e...

Google boosts their executive's compensation: https://www.businessinsider.com/alphabet-google-executive-pa...
Well, there are two ways to get population - babies and immigration.
It is good and moral that people who commit crimes are punished for doing so; and our current societal norms include ideas like "people can have personal property" and "it's bad to take something that belongs to someone else". The prevention, deterrence and fair handling of crime generally requires people to do that work.

There's no "false pretense" involved in the idea that theft increases the cost of goods for paying customers. The businesses in question appear to be offering insurance which is entirely opt-in. It's not any different from offering an extended warranty.

But even in principle, businesses don't need to be "allowed" to "raise prices to increase profits". Increasing profits is their explicit right, and to some extent even their responsibility (to shareholders). But it turns out that raising prices is often counterproductive to that goal, because prices influence demand. This is both Economics 101 and common sense.

Keep in mind here that we're talking about goods that are being shipped to houses (and possibly being stolen from front porches). Generally speaking, that's not exactly going to include basic necessities.
It's also good to be skeptical about the backtesting itself, there are lots of ways for backtesting to overestimate gains and then you'd lose real money. Don't bet the farm (yet!)

https://www.semanticscholar.org/paper/All-That-Glitters-Is-N...
https://en.wikipedia.org/wiki/Itavia_Flight_870
I've never had hotspot not be fast enough. Even on 20Gb traces, everything is instant.

Only thing that ever takes some time is the initial load of the perf file and filtering (bit still really fast).
https://www.uzbl.org/
Yes most servers support websockets. But unfortunately most proxies and firewalls do not, especially in big company networks. Suggesting my users to use SSEs for my database replication stream solved most of their problems. Also setting up a SSE endpoint is like 5 lines of code. WebSockets instead require much more and you also have to do things like pings etc to ensure that it automatically reconnects. SEEs with the JavaScript EventSource API have all you need build in:

https://rxdb.info/articles/websockets-sse-polling-webrtc-web...
A browser which implements a subset of the specs that major browsers implement is still part of the open web.

A browser which implements unique functionality breaks away from the open web.
Is academic writing getting harder to read?
Sure, changing the syntax is not something to be done lightly. It has to be done judiciously and with great care. But it can be a huge win in some cases. For example, take a look at:

https://flownet.com/gat/lisp/djbec.lisp

It implements elliptic curve cryptography in Common Lisp using an embedded infix syntax.
This puts things really well. I’ll add into it that between the first white boarding session and the first working MVP there’ll be plenty of stakeholders who change their mind, find new info, or ask for updates that may break the original plan
For what it's worth, back in the day (a few years ago, before the LLM boom a few years) I found on a similar sized vector database (gensim / doc2vec), it's possible to just brute force a vector search e.g. with SSE or AVX type instructions. You can code it in C and have a python API. Your data appears to be a few gigs so that's feasible for realtime CPU brute force, <200 ms
> working on AI

I think we're about to enter an incredible new age of mathematics, driven by AI and theorem provers. It's going to be hugely disruptive to mathematics, but lots of fun to amateur mathematicians.
Before OOP became popular the usage of global variables was discouraged in procedural languages because it was the cause of many bugs and errors.

In OOP global state variables were renamed to instance variables and are now widely used. The problem why it was discouraged beforehand did not went away by renaming but is now spread all over the place.
Why exactly should I prefer to read the results of your "ChatGPT explorations", as opposed to prompting ChatGPT myself?
It doesn’t mention the big drawback of SSE as spelled out in the MDN docs:

“Warning: When not used over HTTP/2, SSE suffers from a limitation to the maximum number of open connections, which can be especially painful when opening multiple tabs, as the limit is per browser and is set to a very low number (6).”
There are numerous ETFs which hold BTC. This is not why money is flowing in to MSTR.
Right. And so you'll end up punishing some sites that do it perfectly, while other sites that game the algorithm game first priority.
> Look at the recent semianalysis test to see how not ready AMD is, who would be the only company to have a real shot at this. Their HW on paper is better or equal, yet their software ecosystem is nowhere ready.

Reading that was kind of odd. It seems like their conclusion was that on paper AMD should be significantly less expensive and significantly faster, whereas in practice they're significantly less expensive and slightly slower because of unoptimized software, which actually seems like it'd still be a pretty good deal. Especially if the problem is the software, because then the hardware could get better with a software update after you buy it.

They also spend a lot of time complaining about how much trouble it is to install the experimental releases with some improvements that aren't in the stable branch yet, but then the performance difference was only big in a few cases and in general the experimental version was only a couple of percent faster, which either way should end up in the stable release in the near future.

And they do a lot of benchmarks on interconnect bandwidth which, fair enough, Nvidia currently has some hardware advantage. But that also mainly matters to the small handful of companies doing training for huge frontier models and not to the far larger number of people doing inference or training smaller models.

It feels like they were more frustrated because they were using the hardware as the problems were being solved rather than after, even though the software is making progress and many of the issues have already been resolved or are about to be.
Yeah, I really hope so. I'm hoping that my background is going to allow me to work/play in this area. I'm currently learning about theorem provers so I can get involved.
Weird. For me it opens fine in mobile Safari without being logged in to ChatGPT in the browser on my phone. (Top bar has “log in” button showing I’m currently not logged in.)

> Bit frustrating that it's a 404 rather than a 401.

It is technically ok to give a 404 even if the reason is that you need to log in. But I fully agree that that kind of thing gets super confusing quickly. I run across similar kinds of things sometimes as a dev too trying to use some APIs and then I’m scratching my head extra much.
Having just killed off over a million of the least healthy Americans makes things appear better than they actually are.
I second this, but one should also be extremely wary of newcomers feedback and try to understand their nature.

Some people are extremely resistant to new ideas, some might be simply lazy, some can't be bothered to read documentations, etc.

Spotting the real person behind the feedback is crucial and often those people need to be fired fast.

I myself tend to be lazy when it comes to learn new stuff/patterns, especially when I am in the middle of having to progress a project so my own feedback may be more of a frustration for my inability to progress due to having to understand first a, b, c and d which may take considerable time and pain for something I can do in an old way in few minutes.
You seem to approach this with extremely binary thinking. Either we all starve or we’re all fine. The Earth is destroyed, or climate change isn’t a problem.

No, we’re not all going to starve to death. But it doesn’t take that much change in agricultural output for some people to starve to death. And it doesn’t take that many starving people to severely disrupt a society.
GLP-1 Development Was Abandoned in 1990
Not the OP, but yes. All my friends are former and current coworkers.
Haven't looked into this too deeply but there is a difference between delaying a response (requests get stuck in the tarpit) vs providing a useless but valid response. This approach always provides a response, so it uses more resources than ignoring the request, but less resources than keeping the connection open. Once the response is sent the connection can be closed, which isn't quite how a tarpit behaves. The Linux kernel only needs to track open requests in memory so if connections are closed, they can be removed from the kernel and thus use no more resources than a standard service listening on a port.

There is a small risk in that the service replies to requests on the port, though, as replies get more complicated to mimic services, you run the risk of an attacked exploiting the system making the replies. Another way of putting it, this attempts to run a server that responds to incoming requests on every port, in a way that mimics what might run on each port. If so, it technically opens up an attack surface on every port because an attacker can feed it requests but the trade-off is that it runs in user mode and could be granted nil permissions or put on a honeypot machine that is disconnected from anything useful and heavily tripwired for unusual activity. And the approach of hardcoding a response to each port to make it appear open is itself a very simple activity, so the attack surface introduced is minimal while the utility of port scanning is greatly reduced. The more you fake out the scanning by behaving realistically to inputs, the greater the attack surface to exploit, though.

And port scanning can trigger false postives in network security scans which can then lead to having to explain why the servers are configured this way and that some ports that should always be closed due to vulnerability are open but not processing requests, so they can be ignored, etc.
Then it is going to be adopted everywhere fine except the UK.
And over HTTP/2 and 3 they are efficient?