News for hackers. Stuff that matters.
Re:Two Bites of Data Science in K by RodgerTheGreat on Sunday January 26, 2025 @06:58PM (#42835650)
I had a go at rewriting the latter half in Lil, flexing its K/Q heritage:

    t:readcsv[read["ICC Test Bowl 3003.csv"] "ssiiiiisffiiis"]

    sorted: select orderby Wkts desc orderby Ave asc where Wkts from t
    best: select where !gindex by Wkts from sorted

    bestInClass: select where each v i in Ave v~min (i+1) take Ave end from best

    allWkts: sorted.Wkts
    mostCompetitive: extract where (gindex=0)&15<count gindex by value from allWkts
    mostCompetitiveBowlers: select where Wkts in mostCompetitive from best

    gap: min allWkts drop 1+range max allWkts
"bestInClass" is probably the most awkward adaptation; I didn't see a tidy way to make a suffix list like ",\".
Re:Two Bites of Data Science in K by evertedsphere on Sunday January 26, 2025 @08:38PM (#42836402)
is there a website or similar for this language? couldn't find anything with a quick google
Re:Two Bites of Data Science in K by RodgerTheGreat on Sunday January 26, 2025 @10:48PM (#42837214)
In addition to the resources others have linked, the main "entrypoint" page for Lil is here: http://beyondloom.com/tools/trylil.html
Re:Two Bites of Data Science in K by mlochbaum on Sunday January 26, 2025 @08:52PM (#42836499)
https://beyondloom.com/decker/lil.html

See also https://beyondloom.com/blog/rankingoffruits.html for a nice introduction to the query syntax and its relation to K. (And RodgerTheGreat is John Earnest, the author).

Re:Two Bites of Data Science in K by gitonthescene on Sunday January 26, 2025 @08:51PM (#42836491)
The readme has links to various resources including tutorials: https://codeberg.org/ngn/k
Re:Two Bites of Data Science in K by gitonthescene on Sunday January 26, 2025 @08:53PM (#42836509)
Oh, sorry. I misunderstood the question.