HNHacker News
TopNewBestAskShowJobs

andreypopp

1,040 karma · joined June 30, 2011

just sitting there, looking shiny...

https://github.com/andreypopp https://twitter.com/andreypopp

submissionscomments
andreypopp··on MaxxBench – "Nice DeepSWE score. But is it true?"
How did you use it? I was using it as "implementor" subagents orchestrated by opus 5.5 and it was pretty good and fast.
andreypopp··on Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
hehe, I also have done the same, but I'm building on top of tmux. Though much more minimal in scope. https://kido.tools (website showcases the TUI only but there's native macOS app in the PR which I'm using but still refining).

We should compare notes!

andreypopp··on Iosevka is an open-source, sans-serif and slab-serif monospace font
You meant Pragmata Pro :)
andreypopp··on What is Codemode
Agree, but this orthogonal to JS or bash question. (I mean can always run some bash locally as well, even wasm compiled one).
andreypopp··on What is Codemode
it cannot use cat but you can make a command which communicates back to agent. Armin mentions that:

> While in theory the agent could provide a CLI tool that talks to the outer harness via environment variables and Unix sockets, it’s a rather crude process

But I don't know why it's crude to be honest. I'm running pi in tmux and have a CLI to prompt it from any shell session / neovim and it works good. So such way of communication is already needed besides codemode.

JS was chosen probably because (1) it's easy to sandbox (there's QuickJS) and (2) (my guess) some models are probably post-trained on JS Codemode.

andreypopp··on What is Codemode
There's no limitation, just have bash commands `read` or `view_image` which communicate back to agent.
andreypopp··on I love my Bluetooth keyboard
Cmd+Tab works on iOS on iPad, when keyboard is connected, not sure about iPhones
andreypopp··on I prefer human-readable file formats
try clickhouse-local, it's amazing how it can crunch JSON/TSV or whatever at great speed
andreypopp··on Teal – A statically-typed dialect of Lua
> this also seems a way to declare types for your own code in an external file, thus keeping your code as runnable Lua and benefiting from type checking too

The declaration file isn't used to typecheck the code the declaration is for. It is only for consumers of the code.

andreypopp··on Argdown, like Markdown for argument mapping
checkout http://docopt.org then
andreypopp··on Melange 2.0: Compile OCaml / ReasonML to JavaScript
Would be interesting to know what’s the plan regarding supporting effects in melange. IIRC jsoo (the another OCaml to JS compiler) is doing some whole program analysis to compile to efficient CPS.
andreypopp··on Dart 3.1 and a retrospective on functional style programming in Dart
Does it (Dart, C#) support exhaustivity checking for such matching over subclasses?
andreypopp··on Using command line to process CSV files (2022)
Agreed here, it's impressive how easy it is to use and how performant it is.

Would be nice to add a seamless ability to call executable UDFs from clickhouse-local, last time I checked clickhouse-local required executables to be in a special directory (as in proper clickhouse). Instead it'd be nice to be able to reference any executable in an ad-hoc way.

andreypopp··on Show HN: ScrapScript – A tiny functional language for sharable software
OCaml has a similar thing but purely on syntactic level — http://jobjo.github.io//2019/04/24/ocaml-has-some-new-shiny-...
andreypopp··on BQN: Finally, an APL for your flying saucer
BQN brings back joy of programming for me — I was using it for Advent Of Code 2021 and it was so much fun.

Also check out BQNPAD[1], the online BQN REPL built with codemirror (syntax highlighting, history).

[1]: https://bqnpad.mechanize.systems

andreypopp··on SpaceVim 2.0
To be honest it seems vim/neovim ticks all those points already.
andreypopp··on CodeMirror 6.0 Stable Release
CodeMirror 6 is an awesome piece of software and very flexible — I was even able to build a notebook UI with it — https://bqnpad.mechanize.systems/notebook — this is a notebook (WIP) for BQN[1].

The nice thing is that the whole notebook is a single CodeMirror editor with cells stored as ranges in CodeMirror state. This way intercell actions like selection/copy/paste are possible and still you can control execution per cell.

Shortcuts at https://bqnpad.mechanize.systems/notebook

* Shift+Enter to eval cell

* Cmd-Enter to create new cell

* Cmd-Option-Enter to split cell at cursor

* Cmd-Backspace to join cell with the previous one

[1]: https://mlochbaum.github.io/BQN/index.html

andreypopp··on K – A simple, fast vector programming language
It's very cool to see ngn/k on the HN front page.

After the recent AoC which I've attempted to solve with BQN[1] (another array language) I've got interested in array languages and now exploring K too.

K seems like a nice blend between an array language and a lisp: list is a primary data structure in K, no multidimensional data. K is good at symbolic workloads as well — visit http://nsl.com for some examples.

Also, make sure to check out the C code style ngn/k is written with :-) another K implementation Kona (uses similar C code style) has a wiki page with explanation[2].

[1]: https://mlochbaum.github.io/BQN/index.html [2]: https://github.com/kevinlawler/kona/wiki/Coding-Guidelines

andreypopp··on GraphQL is now available on Supabase
It's impressive that the entire thing is in pl/pgsql (apart from parsing).

Have you considered any other implementation strategies (C native extension, any other pl/* or maybe running an out of PostgreSQL process which does GraphQL to SQL compilation)?

andreypopp··on Microsoft YARP
Lua in nginx can you get very far in my experience.
andreypopp··on 2021 at OCamlPro
> What’s wrong with opam?

I'd say the main problem is that local switches and lock files are still not the default mode of operation.

Also opam lacks a global cache of built packages which esy provides (esy's cache is modelled after Nix package manager). So every new opam local switch effectively compiles everything from scratch. Though, as I understand this aspect is going to be addressed by dune at some point (though esy caches not just OCaml built artefacts but also C/C++).

(Full disclosure: I'm biased as I'm one of the original developers of esy)

andreypopp··on I’m porting the TypeScript type checker tsc to Go
Specification isn't being followed is of course useless. But yeah, tests are definitely useless and in the absence of the spec is the only sane way to approach such rewrite.
andreypopp··on I’m porting the TypeScript type checker tsc to Go
Well... How many paid work hours spent on tsc? Then does TypeScript have a formal language specification? I'm pessimistic it's possible to rewrite tsc with full compat (bug-to-bug, otherwise it doesn't really make much sense) without MS support... but who knows... I'd like fast compiles too, so good luck!
andreypopp··on FunSQL.jl – Julia library for compositional construction of SQL queries
Given the recent posts about compile-to-SQL languages, I thought I'd post here a link to FunSQL.jl which is another interesting point in the design space and which, I think, has quite a few really useful design decisions.

The library presents an API of combinators for query construction but it's totally possible to build a concrete syntax around it (in fact I did it for my port in OCaml). But syntax isn't really this important (it is of course) but the compositional semantics FunSQL.jl provides:

1. Query combinators can be composed together in any order (if they are "compatible") unlike SQL where structure SELECT .. FROM .. WHERE .. is rigid:

    from users
    where is_active
    select username
(also `from` being the first combinator makes code completion much powerful).

2. The way FunSQL.jl treats `group by` as just another kind of namespace, aggregates are then specified as just expressions under this namespace:

    from users as u
    join (from comments group by user_id) as c on c.user_id = u.id
    select
      u.username,
      c.count() as comment_count,
      c.max(created_date) as comment_last_created_date
In the example above the `c` subrelation is grouped by `user_id` but it doesn't specify any aggregates - they are specified in the `select` below so you have all selection logic co-located in a single place.

This is a really useful feature, from my point of view, as it's allows you to construct re-usable query fragments first and then combine them to build complete quries.

3. In other aspects FunSQL.jl is really close to SQL which I think is a big plus as well — familiriaty.

andreypopp··on PRQL – A proposal for a better SQL
FunSQL.jl requires Julia to run (obviously as it is a Julia library) but it produces standard SQL so Julia in this case is just an implementation language.

I have re-implemented parts of FunSQL in Python and OCaml (the one I have ended up using) and have added a concrete syntax similar to what you have in PRQL.

    from employees
    define
      salary + payroll_tax as gross_salary,
      gross_salary + benefits_cost as gross_cost
    where gross_cost > 0 and country = 'usa'
    group by title, country
    select
      title,
      country,
      avg(salary) as average_salary,
      sum(salary) as sum_salary,
      avg(gross_salary) as average_gross_salary,
      sum(gross_salary) as sum_gross_salary,
      avg(gross_cost) as average_gross_cost,
      sum(gross_cost) as sum_gross_cost,
      count() as count
    order by sum_gross_cost
    where count > 200
    limit 20
But, in my mind, the biggest difference between PRQL and FunSQL is the way FunSQL treats relations with `GROUP BY` - as just another kind of namespaces, allowing to defer specifying aggregates. A basic example:

    from users as u
    join (from comments group by user_id) as c on c.user_id = u.id
    select
      u.username,
      c.count() as comment_count,
      c.max(created_date) as comment_last_created_date
The `c` subrelation is grouped by `user_id` but it doesn't specify any aggregates - they are specified in the `select` below so you have all selection logic co-located in a single place.

I think this approach is very powerful as it allows you to build reusable query fragments in isolation but then combine them into a single query which fully specifies what's being selected.

andreypopp··on Nial Array Language
I’m learning BQN while solving AoC puzzles.

While this is my first array language and I cannot compare with others I like BQN very much:

- excellent documentation

- small but excellent community

- context free grammar

- good text editor support (I’m using neovim)

- FUN!

andreypopp··on Multicore OCaml: October 2021
See "Kindly Bent to Free Us"

https://dl.acm.org/doi/pdf/10.1145/3408985

andreypopp··on The problem of effects in Rust (2020)
Upcoming OCaml multicore won't expose effects at all. I believe the intention is to finish work on typed effects[1] and only then add it to the language.

[1]: https://www.janestreet.com/tech-talks/effective-programming/

andreypopp··on Vim Creep (2011)
:ALEHover
andreypopp··on Zheap – Reinvented PostgreSQL Storage
That’s a different thing. In some cases the whole table needs to be replaced. Then inserts into UNLOGGED tables are still much faster than into regular tables (even if there wasn’t a DELETE before).
Page 1 of 5Next →