Skip to content

John Earnest, array language audio+graphics hacker

alexalejandre.com
3 pointsvi_sextus_vi1 comment
On HN

Comments

This interview put me down a rabbit hole exploring tables. Janet recently "got" dataframes which I merged with Lil's query language: https://codeberg.org/veqq/vutils/src/branch/master/dataframe... I'm happy with the overall picture but it still needs work.

It roundtrips csvs into/from dataframes `(load-csv "temp-titanic.tsv" :sep "\t" :header false)`, filters, joins, inserts rows etc.

    (def people {:name @["Alice" "Sam" "Thomas" "Sara" "Walter"]
                 :age  @[25 28 40 34 43]
                 :job  @["Developer" "Sales" "Developer" "Developer" "Accounting"]})
    (def salaries {:job    @["Developer" "Sales" "Accounting"]
                   :salary @[75000 85000 60000]})
    
    (insert! {:name "veqq" :age 500 :job "Developer"} :into people)
    
    (print-df (select :name
                      [:salary |(* $ 17)] #  change output val to MX Peso
                      [:job "Job Role"] # rename header
            :where |(> ($ :salary) 70000)
            :from people :join salaries))
Outputs:
    Job Role   name    salary 
    ---------  ------  -------
    Developer  Alice   1500000
    Sales      Sam     1700000
    Developer  Thomas  1500000
    Developer  Sara    1500000
    Developer  veqq    1500000
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.