Readit News logoReadit News
shivawu commented on How we made JSON.stringify more than twice as fast   v8.dev/blog/json-stringif... · Posted by u/emschwartz
monster_truck · 7 months ago
I don't think v8 gets enough praise. It is fucking insane how fast javascript can be these days
shivawu · 7 months ago
On the other hand, I consider v8 the most extreme optimized runtime in a weird way, in that there’re like 100 people on the planet understand how it works, while the rest of us be like “why my JS not fast”
shivawu commented on Show HN: Vet – A tool for safely running remote shell scripts   getvet.sh... · Posted by u/a10r
kevincox · 8 months ago
My main question is in 90% of cases these are installers. How are you actually verifying the software that you install? In some cases it is signed and verified but in many cases it is just coming down from the same HTTPS server with no additional verification. So are you then diffing the code (which may be compiled) as well?

I'm not saying that random running random installers from the internet is a great pattern. Something like installing from your distribution can have better verification mechanisms. But this seems to add very little confidence.

shivawu · 9 months ago
The other thing is.. installer generally only runs once on a single machine, not sure how useful it is to “show the changes since last run”
shivawu commented on A critical look at MCP   raz.sh/blog/2025-05-02_a_... · Posted by u/ablekh
shivawu · 10 months ago
Obviously the article is making valid points. But a recent epiphany I had is, things by default are just mediocre but works. Of course the first shot at this problem is not going to be very good, very much like the first version of JavaScript is a shitshow and we’ll take years to pay down the technical debts. In order to force a beautiful creation, significant effort and will power needs to be put in place. So Id say I’m not surprised at all and this is just how the world works, in most cases.
shivawu commented on Cognitive load is what matters   minds.md/zakirullin/cogni... · Posted by u/zdw
lr4444lr · a year ago
Mantras like "methods should be shorter than 15 lines of code" or "classes should be small" turned out to be somewhat wrong.

So much this.

The whole point of functions and classes was to make code reusable. If the entire contents of a 100 line method are only ever used in that method and it's not recursive or using continuations or anything else weird, why the hell would it be "easier to read" if I had to jump up and down the file to 7 different submethods when the function's entire flow is always sequential?

shivawu · a year ago
I agree except I think 100 lines is definitely worth a method, whereas 15 lines is obviously not worthy for the most cases and yet we do that a lot.

My principle has always been: “is this part a isolated and intuitive subroutine that I can clearly name and when other people see it they’ll get it at first glance without pausing to think what this does (not to mention reading through the implemention)”. I’m surprised this has not been a common wisdom from many others.

shivawu commented on Starbase: SQLite on the Edge   starbasedb.com/... · Posted by u/hunvreus
shivawu · a year ago
Am I right to say that this is a template on top of cloudflare durable objects, not an actual software of its own?
shivawu commented on I avoid async/await in JavaScript (2022)   uniqname.medium.com/why-i... · Posted by u/fanf2
tyleo · 2 years ago
Chapter 15 of the 2007 release of "Programming Languages: Application and Interpretation" gives a really good motivation for the async/await syntax. Here is a link: https://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-0...

> I would prefer an approach where calls to "async" functions are implicitly awaited unless a keyword turns then into a promise, and all functions are implictly treated as async as needed, unless a keyword specifies that they return a promise, which should be awaited instead. This would make the majority case clearer, and force you to make the minority case explicit where it's currently implicit.

This is a very interesting idea and feels good in an initial 'gut check' sense.

shivawu · 2 years ago
This is I believe how ziglang works on its asynchronous story
shivawu commented on Structure of FTS5 Index in SQLite   darksi.de/13.sqlite-fts5-... · Posted by u/ellieh
AlexErrant · 2 years ago
I had a... suboptimal experience with SQLite's FTS, so here it is for others: match queries don't work with `OR` conditions. You have to do this work around:

    WHERE
        fa.rowid IN (SELECT rowid FROM address_fts WHERE address_fts MATCH 'google')
        OR
        ta.rowid IN (SELECT rowid FROM address_fts WHERE address_fts MATCH 'google')
Source https://sqlite.org/forum/forumpost?udc=1&name=1a2f2ffdd80cf7...

I'm building a search feature for my app, that parses a user's search query (a la Github search) and returns relevant results. Generating the above workaround SQL on the fly is just... ulgh.

shivawu · 2 years ago
Yeah this is exactly what I ended up doing, like two days ago. It’s quite a pitfall… (and not optimal in terms of performance)
shivawu commented on OpenAI negotiations to reinstate Altman hit snag over board role   bloomberg.com/news/articl... · Posted by u/himaraya
hn_throwaway_99 · 2 years ago
Everyone keeps saying that Microsoft made a huge mistake by not having board representation, and I couldn't disagree more.

Microsoft's relationship with OpenAI was really ideal from a speed-of-advancement perspective. That is, reams and reams have been written about how Google has to move at such a slow pace with AI productization because, essentially, they have so much to lose. Microsoft saw this first hand with their infamous Tay AI bot, which turned into a racist Hitler lover in a day.

Microsoft's relationship with OpenAI was perfect - they could realistically be seen as separate entities, and they let OpenAI take all the risk of misaligned AI, and then only pull in AI into their core services as they were comfortable. Google's lack of this sort of relationship is a direct hindrance to their speed in AI advancement and productization. Microsoft's lack of a board seat gives them a degree of "plausible deniability" if you will.

Plus, it's not like Microsoft's lack of a board seat impacts their influence that much. Basically everyone believes that the push to get Altman back has Microsoft's/Nadella's fingerprints all over it. Their billions give them plenty of leverage, and my bet going forward is that even if they don't take a board seat outright, they will demand that board membership be composed of more "professional", higher caliber board members that will likely align with them anyway.

shivawu · 2 years ago
Exactly this. This incident has proven MSFT’s strong hands without a board seat and they don’t really need it if things do/did go off the rails.
shivawu commented on eBPF-based auto-instrumentation outperforms manual instrumentation   odigos.io/blog/ebpf-instr... · Posted by u/edenfed
shivawu · 2 years ago
How does it work with nodejs? Iirc they don’t support ebpf
shivawu commented on How a startup loses its spark   blog.johnqian.com/startup... · Posted by u/_xivi
Zetice · 3 years ago
> If you find an idea that you think is both valuable to the company and interesting to you, you can just drop everything to work on it.

What.

How is an engineer deciding what to work on like this, even at a small startup?!

shivawu · 3 years ago
Engineers at small startups are generally founder minded. They’re like founders, and are passionate about the product and the problem. That’s how they get to decide/involve in the decision about what to work on

u/shivawu

KarmaCake day270May 1, 2015View Original