News for hackers. Stuff that matters.

thenonameguy

Re:Hacking the Postgres Wire Protocol on Tuesday April 15, 2025 @02:20PM (#43696576)
> One of the things that puts metaprogramming on wheels is being able to pull in grammars, schemas and such for external systems.

That's what I've been trying to do with: https://github.com/schemamap/schemamap

For a well-constrained Postgres schema, a deterministic SQL compiler can be built (with plenty of logic programming/constraint-solving/hypergraph-analysis) that can integrate arbitrary external systems data.

While this is NP-hard, with some clever use of embeddings and ontologies, and use of every single constraint AST within the DB to reduce the search space, this becomes a feasible problem.

For any Clojurists interested, I've packaged `pg_query`, so you can use it in your applications: https://github.com/schemamap/pg-query-clj

At the moment I'm saving up for the next development cycle, so not only PG->PG schema mappings can be solved for (JSON schema is next!). Hope this sounds interesting :)

Re:Datomic and Content Addressable Techniques on Monday September 16, 2024 @02:01PM (#41558733)
Yup, it's still the best tool for me. Especially for complex domains, as it does not allow you to over-abstract data structures.

Schemamap.io has a declarative SQL compiler and backend implemented in it, solving Postgres database syncing.

Re:Inline previous result in Emacs Lisp on Tuesday July 09, 2024 @07:37AM (#40914888)
I'm not certain, but Clojure supports this through CIDER's Enlighten mode: https://docs.cider.mx/cider/debugging/enlighten.html

It would be even better if larger values were inspectable, as it becomes challenging to view more complex data types beyond numbers and short strings.

It works on MacOS/Windows, unlike systemd. Therefore it's well suited for development environment setups for polyglot teams.

https://devenv.sh/ is one example that uses it to do just that.

Re:I Built an Ld_preload Worm on Tuesday April 30, 2024 @05:40AM (#40208994)
NixOS/GNU Guix is uniquely positioned in this area, as it tracks all dependencies explicitly, with exact versions. If there is a paradigm where this can be achieved on the OS level, they are the closest to it today.

See this related talk from NixOS 2022: https://www.youtube.com/watch?v=HZKFe4mCkr4

The IMO superior https://github.com/F1bonacc1/process-compose project has this built in, while allowing to manage regular programs that don't require containers.

See: https://f1bonacc1.github.io/process-compose/health/?h=port#r...

Re:Show HN: Local development with .local domains and HTTPS on Tuesday August 01, 2023 @09:02AM (#36955409)
This looks really great!

When do you expect to add Linux support? Until then, I'm using a devenv.sh Nix-based setup (without mDNS), with something like this: https://github.com/cachix/devenv/blob/main/examples/mkcert/d...

Re:ContainerSSH: Launch containers on demand on Saturday September 10, 2022 @08:21AM (#32789986)
I've been using https://github.com/F1bonacc1/process-compose with great success.

It's a userspace process orchestrator/scheduler that works across all relevant platforms, supporting daemon processes and k8s style readiness/health checks.

In combination with nix flakes, it quickly reduced my projects docker-compose usage for easy-to-configure services.

This gave huge performance benefits for the M1 Mac folks on my team especially for CPU intensive processes thanks to native binaries.

For maximal ease of use, the remaining docker-compose containers are started/stopped as a process-compose task. Quite meta :)

Re:No script is too simple on Tuesday September 22, 2020 @07:43PM (#24561350)
Thankfully we have solved this issue by adopting nix for setting up developer machines/project setup on top of your OS's package manager of choice (OSX/Linux).

Additionally, you automatically get shell completion too! https://github.com/NixOS/nixpkgs/blob/3bb54189b0c8132752fff3...

As described in the README, avoiding the 'build' part from Makefiles cut unnecessary complexity like .PHONY targets, which improves clarity. In smaller teams/companies it makes sense IMO.

Re:No script is too simple on Tuesday September 22, 2020 @12:46PM (#24556758)
I saw that the cost/benefit ratio of adopting https://github.com/casey/just in non-trivial projects was worth it as an alternative to bash scripts in script folders.
Re:Clj-kondo: a linter for Clojure code that sparks joy on Friday July 19, 2019 @11:44AM (#20479566)
Put something like this in your .clj-kondo/config.edn: https://gist.github.com/thenonameguy/d9f13155b2996e7d672542c...
Re:Elsa: Emacs Lisp Static Analyzer on Tuesday July 16, 2019 @06:13AM (#20448779)
I asked the same question on the Clojure subreddit and the answer is yes for all practical purposes.

https://www.reddit.com/r/Clojure/comments/5fc706/datomic_upd...

Re:My time with Rails is up on Sunday May 22, 2016 @01:47PM (#11749500)
It's because of this bug in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1250947

Disable the box-shadow on .widewrapper.main and it works fine.

Re:Hjson, the Human JSON on Thursday April 14, 2016 @08:34PM (#11501297)
Something like edn[1] perhaps? Worked really well in my projects.

[1]: https://github.com/edn-format/edn

Re:Learn X in Y minutes where X = Go on Wednesday September 04, 2013 @03:48AM (#6326183)
My hungarian translation of it: http://learnxinyminutes.com/docs/hu-hu/go/
Re:Learn Haskell in minutes on Monday July 01, 2013 @01:31PM (#5972197)