Better HN
topnewbestaskshowjobs
Log inSign up

gavinray

8,183 karma · joined Jan 29, 2019 (7y ago) · 2,144 submissions

Engineer @ PromptQL (Hasura), working on Data Connectors

Interests: GraphQL, JVM, TypeScript, Relational DB's (particularly Postgres), Query Engines.

Github: https://github.com/GavinRay97

Email: ray.gavin97@gmail.com

Twitter: @GavinRayDev

Submissions

comment 3d ago · link · parent

  > "Since logging was the first line to execute after installation, the welcome screen took 15 seconds to load."
Apparently written by a dev that never got the email that computers can do more than one thing, nowadays.

The logging could have taken 1,500 seconds and it wouldn't be a big deal if it had been punted off the main/UI thread...

comment 4d ago · link · parent

On that note, here's my favorite little-known tip for running Docker/Container JVM apps:

The Redhat image distros, like UBI and the JDK ones, have a really handy bash script, "run-java.sh". It's a wrapper script for best-practice and intelligent JVM runtime args inside of container envs:

  /opt/jboss/container/java/run/run-java.sh
It started life as fabric8's run-java-sh, and it's what the Dockerfile.jvm generated by Quarkus apps uses as its entrypoint.

The script handles, among other things:

- Heap sized as a percentage of the container's memory limit via -XX:MaxRAMPercentage (default 80%, compared with JVM's default of 25%). Tunalbe with JAVA_MAX_MEM_RATIO env.

- -XX:+ExitOnOutOfMemoryError, so an OOM kills the container and your orchestrator restarts it

- Defaults for GC and metaspace

- JAVA_DEBUG=true / JAVA_DEBUG_PORT=*:5005 turns on JDWP without you having to edit the Dockerfile

- http_proxy/https_proxy/no_proxy env vars get translated into -Dhttp.proxyHost etc

comment 4d ago · link · parent

I think there's another bit to it, which is that similar individuals tend to read the same news sources

So discussion and mindset-shifts will happen in a community and cause the members to start to think down certain paths, some of which have shortly-reached conclusions on valuable unbuilt products or areas of research

comment 4d ago · link · parent

I just realized the username of the comment I replied to.

The OP undoubtedly knows this, whoops.

comment 4d ago · link · parent

Modern JVM's (JDK +10) have runtime detection for whether they're operating in a container environment, and apply sensible defaults based dynamically on resources if so.

Google term: "-XX:+UseContainerSupport"

comment 4d ago · link · parent

https://en.wikipedia.org/wiki/Multiple_discovery

I consider it anecdotal evidence of something like a genuine "zeitgeist" in terms of collective human consciousness.

The list is staggeringly large:

https://en.wikipedia.org/wiki/List_of_multiple_discoveries

comment 4d ago · link · parent

Didn't Google's "sleep" paper already show this?

https://research.google/blog/the-sleep-framework-a-new-way-f...

  > During the offline sleep phase, the model unlocks pre-allocated Mixture-of-Experts (MoE) memory blocks and updates its numerical weights using self-generated practice examples.

comment 5d ago · link · parent

One of the best (and most humorous) posts I've read on the internals of Linux servers + networking.

If you enjoyed this post, you might also like the "Lord of the io_uring" series which walks through how epoll/kqueue work and then onto async services with io_uring:

https://unixism.net/loti/async_intro.html#async-intro

comment 5d ago · link · parent

Take a peek into the Rust stdlib method implementations. The lang is built on a house of "unsafe".

comment 5d ago · link · parent

I have the opposite experience.

Only once have I taken the time to submit a Chrome bug report.

Chrome Canary updated and then refused to launch entirely, on Windows 11. I dumped the Event Viewer and application crash logs into the bug report.

It was fairly promptly fixed, and an overall positive experience.

- https://issues.chromium.org/issues/465823612

- https://chromium-review.googlesource.com/c/chromium/src/+/72...

comment 1w ago · link · parent

  > "Take note of the emphasis I added: the very notion that something else could be "as good as I am" is, first of all, hard to believe and secondly necessarily means that it's "superhuman".
Unironically, I recommend psychedelics. The right experience will make you aware of just how tiny a part of a vast universe you are -- and obliterate any sense of hubris.

comment 1w ago · link · parent

Let me play Devil's Advocate, without having dug into his personal life at all:

Is it possible that the person accused of being a Chinese spy, was a businessperson located in China who was coerced by authorities?

IF the above is true -- do others genuinely believe they would stare down the face of a world power and dare to defy them, if they were not the only living member of your family tree within the geographic area?

comment 1w ago · link · parent

Every task that would be a multi-week engineering effort, I defer for a few months, until inevitably a model that trivializes it appears, repeat ad-nauseum.

comment 2w ago · link · parent

Languages have not yet evolved to multi-core properly IMO

I've sketched what I think an ideal "language of today" would look like, and one of the core tenets is making concurrent code explicit and part of the design surface.

You might imagine a webserver with main code like:

  spawn(on_core: 0) {
    await receive_packet(input)
  }
Or iterating over "num_cpus" and doing the same thing, with hashing based on CPU number for shared-memory resources.

comment 2w ago · link · parent

  > What the hell do you need a library for?
On the frontend, you have to re-calculate the display state for all the possible drop positions, in-between transitions, and drop-end-snap-back.

Think of a grid of cards, and all the possible drag, hover, and drop state transitions it can be in with any other card, and the animations required to make it look nice

Now also consider that you need to persist the final state on the backend, and handle things like rejection, cancellation, failed updates/errors.

It becomes a massive state chart and web of complexity

comment 2w ago · link · parent

This was circa 2010 or so, and it was a web app. So pre-ES6 JavaScript, before React.

Nowadays you would just "npm install drag-and-drop" but back then you often had to hand-roll solutions.

If anyone can dig up an ancient library on GitHub for drag-and-drop back in those days, I'd imagine it would be several thousand lines long, not to mention the absolute nightmare that testing something like this with a proper framework and accompanying testing library.

comment 2w ago · link · parent

Funny story about drag-and-drop:

At my very first job, we had a weekly meeting to assign tickets and estimates.

Our non-technical PM wrote "drag-and-drop" on a whiteboard, and then my name.

"Gavin, how long do you think this will take?"

"All week. At least. Maybe longer?"

PM laughed, then realized I wasn't making a joke.

"What do you mean 'all week'? That's ridiculous, do I need to give this to someone else?"

"Well, you could, but I wouldn't count on you getting it any sooner."

Appalled, he exclaims: "It's just drag-and-drop!"

After 10-15 minutes of a room full of engineers trying to explain the difficulty, he gave up with an unhappy "Fine."

The phrase "it's just drag-and-drop" became an inside joke for the rest of my time there...

comment 2w ago · link · parent

  > "The page is only a viewer — git is the record."

  > "Then comes the part that matters most."

  > "That closing is the whole trick."
Not sure how much I trust an article on fighting AI brain fry in which the author outsourced writing a handful of paragraphs to AI...

I hope the irony is not lost on anyone else, lol

comment 2w ago · link · parent

How is 2 x 15 more expensive than 89?

comment 2w ago · link · parent

ChatGPT does a similar thing

My personal ChatGPT account is a Business account with 2 seats at $30/ea (minimum 2 seats required).

Why? Because for $60 you get ChatGPT Pro, significantly cheaper than the $100 normally required for the next level personal plan!

comment 2w ago · link · parent

For programming, I care about correctness and intelligent/robust design at the expense of all else

I'd rather wait all day for an impeccable implementation of a single feature than get 10 features worth of "okayish" code

comment 2w ago · link · parent

I've been working on a decomp + translation of another RPG that was never released in English:

Uncharted Waters IV: Porto Estado (Daikoukai Jidai IV)

The second game, Uncharted Waters 2: New Horizons is one of the greatest and most unique games I've ever played.

Unfortunately, despite being wildly popular in Japan, the series never caught on here and so later games don't have an English release.

I've heard the 4th game is excellent and so have been using LLM's to reverse and translate it, with intent to publish the patch once complete so others can enjoy it

comment 2w ago · link · parent

Comparing the sort of models that would run on that to frontier models like Opus 5.5 or Astra is silly

comment 2w ago · link · parent

  > "run SQL against 110+ databases"
This is one of the most useful web tools I've ever seen.

I work on connectors for datasources (mostly DB's. Being able to quickly test things like sorting behavior and how the same function can be emulated across DB's would have made my life so much easier.

comment 2w ago · link · parent

Language ecosystems tend to exist on a continuum. I love TypeScript but dread the dependency management because it's so often bit-rotted.

On the other hand, I routinely build Java/JVM projects with dependencies that haven't been updated in a decade that compile without issues.

Somewhere in the middle are most languages, I think.

comment 2w ago · link · parent

Great for static assets, potentially not-so-great for "load bearing" ;^) code

comment 2w ago · link · parent

I wrote this same concern in February: what happens when it's easier to build custom software than spend one search looking for mature libraries?

https://gavinray97.github.io/blog/llm-build-cheaper-than-sea...

comment 2w ago · link · parent

  > Acceptance proves, of the function's translation into the calculus, that for inputs and a heap meeting their declared types it does not get stuck and does not return a value outside its result type.
TypeScript's type-checker already proves the latter bit, no?

comment 3w ago · link · parent

Funnily enough, I commented earlier in the thread, but this benchmark is a collaboration between $DAYJOB and the university =)

comment 3w ago · link · parent

In the product I work on, there's a Metadata layer that maps user-supplied definitions, notes and commentary onto the raw table descriptions

These are optional but it allows manual override when schema design is poor

12345
72