HNHacker News
TopNewBestAskShowJobs

leprechaun1066

133 karma · joined June 30, 2020

submissionscomments
leprechaun1066··on Hobbes – A Language and Embedded JIT Compiler
For those interested, previous discussions here:

https://news.ycombinator.com/item?id=14783539

https://news.ycombinator.com/item?id=21892432

leprechaun1066··on It's not about physical vs. digital games, it's about ownership
It's not just the arcade machine implementation. The owners of these companies want to go all the way and move everything to data centers so they can rent compute time, similar to the idea of the time-sharing days of the 60s.
leprechaun1066··on Designing DB partitions you don't have to babysit
Or just use kdb+ and 1bn rows a day is par for the course.
leprechaun1066··on Programming in K
The aj function at its heart is a bin (https://code.kx.com/q/ref/bin/) search between the two tables, on the requested columns, to find the indices of the right table to zip onto the left table.

  aj[`sym`time;t;q]
becomes

  t,'(`sym`time _q)(`sym`time#q)bin`sym`time#t
The rest of the aj function internals are there to handle edge cases, handling missing columns and options for filling nulls.

A lot of the joins can be distilled to the core operators/functions in a similar manner. For example the plus-join is

  x+0i^y(cols key y)#x
leprechaun1066··on Claws are now a new layer on top of LLM agents
> just like LLM agents were a new layer on top of LLMs, Claws are now a new layer on top of LLM agents, taking the orchestration, scheduling, context, tool calls and a kind of persistence to a next level.

Layers of "I have no idea what the machine is doing" on top of other layers of "I have no idea what the machine is doing". This will end well...

leprechaun1066··on I ported JustHTML from Python to JavaScript with Codex CLI and GPT-5.2 in hours
In this case the majority of the work was done by another company on your instruction. When you signed up was there anything in the terms that said you get ownership over the output?
leprechaun1066··on Waymo is bringing autonomous, driverless ride-hailing to London in 2026
Wayve have been working on London streets for some time now. This is from a few months ago:

https://www.youtube.com/watch?v=KvctCbVEvwQ

leprechaun1066··on GPT-5o-mini hallucinates medical residency applicant grades
Another way to look at it is everything a LLM creates is a 'hallucination', some of these 'hallucinations' are more useful than others.

I do agree with the parent post. Calling them hallucinations is not an accurate way of describing what is happening and using such terms to personify these machines is a mistake.

This isn't to say the outputs aren't useful, we see that they can be very useful...when used well.

leprechaun1066··on SQL Injection as a Feature
Most applications backed kdb+ do just this. It comes with its own parser and you can query tables using something like an ast.

For example the user might ask for data with the constraint

  where TradingDesk=`Eq, AvgPx>500.0
which kdb+ parses into

  ((=;`TradingDesk;(),`Eq);(>;`AvgPx;500.0))
As a dev on the system I can then have a function which takes in this constraint and a list of clients that I want to restrict the result to. That list of clients could come from another function related to the entitlements of the user who made the request:

  applyClientRestriction:{[constraint;clients] constraint,enlist(in;`Client;enlist clients)}
Which results in an extension of the constraint like this for two clients A and B:

  q)applyClientRestriction[((=;`TradingDesk;(),`Eq);(>;`AvgPx;500.0));`ClientA`ClientB]
  ((=;`TradingDesk;enlist`Eq);(>;`AvgPx;500.0);(in;`Client;enlist`ClientA`ClientB))
Then that gets passed to the function which executes the query on the table (kdb+ supports querying tables in a functional manner as well as with a structured query language) and the result has the restrictions applied.

It's really nice because, once parsed, it's list processing like in a lisp and not string processing which is a pain.

leprechaun1066··on KX Community Edition
Given Wes McKinney created Pandas for quantitative analysis, it's possible that Pandas wouldn't exist if AQR were paying for a q license.
leprechaun1066··on KX Community Edition
The overview here is better than the marketing:

https://code.kx.com/q4m3/0_Overview/

leprechaun1066··on Why LLMs Can't Write Q/Kdb+: Writing Code Right-to-Left
That does require someone to know that the take operator continues to treat the y list as circular when x is a list.

I think this form might be a bit easier: {(x,x)#(x*x)#1,x#0}

leprechaun1066··on Why LLMs Can't Write Q/Kdb+: Writing Code Right-to-Left
It's not because of the left of right evaluation. If the difference was that simple, most humans, let alone LLMs, wouldn't struggle with picking up q when they come from the common languages.

Usually when someone solves problems with q, they don't use the way one would for Python/Java/C/C++/C#/etc.

This is probably a poor example, if I asked someone to write a function to create an nxn identity matrix for a given number the non-q solution would probably involve some kind of nested loop that checks if i==j and assigns 1, otherwise assigns 0.

In q you'd still check equivalence, but instead of looping, you generate a list of numbers as long as the given dimension and then compare each item of the list to itself:

  {x=/:x:til x}3
An LLM that's been so heavily trained on an imperative style will likely struggle to solve similar (and often more complex) problems in a standard q manner.
leprechaun1066··on I struggled with Git, so I'm making a game to spare others the pain
I use perforce for my personal projects. Helix P4V's various ways of visualising streams, diffs and revisions are so nice.
leprechaun1066··on Sid Meier's Civilization VII
These days it's usually better to try and find players on youtube or twitch than to read text based reviews.
leprechaun1066··on Where is London's most central sheep?
> they're goats, as any self-respecting three year old could tell you

Sheep or goat? https://www.youtube.com/watch?v=dCzZN--4Its

leprechaun1066··on Should you ditch Spark for DuckDB or Polars?
Financial market data (especially FX data) can have thousands of ticks per second. It's not unheard of for data engineers in that space to sometimes handle 1TB per day.
leprechaun1066··on Elixir/Erlang Hot Swapping Code (2016)
We do this in q/kdb+ systems often for patches. An important thing about these languages is that this kind of workflow is part of the core for solving problems. So when you are building a system one of the aspects of its design will always allow for this update method. Then when you push a patch you both know the impact of the change (because you've tested the exact same steps in a dev/QA/UAT/Beta environment) and the work required to do it safely.

Major releases do go through a full shutdown and release cycle though.

leprechaun1066··on AI hallucinations: Why LLMs make things up (and how to fix it)
Calling them hallucinations was a huge mistake.
leprechaun1066··on Who died and left the US $7B?
In 2021/2022 there were 60 people in the UK who probably fall into that last group. Together their taxes accounted for about 1.4% of the UK tax bill despite being something like 0.002% of the population.
leprechaun1066··on The Liberating Experience of Common Lisp
Shinmera recently talked about porting SBCL to the switch: https://reader.tymoon.eu/article/437
leprechaun1066··on German Navy blasts out Darth Vader theme on Thames
A couple of old fogies down in Tunbridge Wells, "I say old chap, how very uncouth." Meanwhile everyone else, "It's been almost 50 years since Fawlty Towers. Took them long enough."
leprechaun1066··on Awesome Engineering Games
Transport Fever 2 if you like choo-choos.
leprechaun1066··on What learning APL taught me about Python
APL (along with Matlab, K, Mathematica, etc.) was one of the influences for NumPy anyway.
leprechaun1066··on The IBM mainframe: How it runs and why it survives
Or q:

https://code.kx.com/q4m3/9_Queries_q-sql/#93-the-select-temp...

leprechaun1066··on Kchat: Persistent group chat in <50 lines using kdb+/k/q web sockets, JavaScript
Azure has prices that vary:

https://azuremarketplace.microsoft.com/en-us/marketplace/app...

That's for commercial though.

One can get a personal use license for hobbies as other commenters have pointed out.

leprechaun1066··on Kchat: Persistent group chat in <50 lines using kdb+/k/q web sockets, JavaScript
https://spacetraders.io/ is API based. Considering that q is used for trading and analysis in the real world seems like it's a good way to go on an adventure.
leprechaun1066··on Clock
The favicon for that site is the Zimbabwean flag. Interesting...
leprechaun1066··on APL: An Array Oriented Programming Language (2018)
And Dyalog also has https://course.dyalog.com/
leprechaun1066··on APL: An Array Oriented Programming Language (2018)
Sounds like you want q:

https://code.kx.com/q/ref/

https://code.kx.com/q4m3/

Page 1 of 2Next →