HN user

pgt

3,643 karma

Petrus G. Theron

BEng Electrical Engineering w/Comp. Sci (Stellenbosch, 2010). Former CTO of CloudAfrica, weFix.

Making software professionally for 20+ years, ideally with Clojure, Electric Clojure & Datomic. Based in Cape Town, South Africa.

Links:

- EACL is a ReBAC Authorization based on SpiceDB, built in Clojure & backed by Datomic (https://github.com/theronic/eacl)

- Grug's Guide to Sound (I sell high-fidelity amplifiers): https://petrustheron.com/posts/2024-12-12-grug-guide-to-sound.html

- ExplainGame: The Party Explanation Game (explaingame.com) (mobile-friendly, built in Electric Clojure)

- BraaiSim: Braai Simulator (braaisim.com) (mobile-only, Electric Clojure)

- Essays: http://petrustheron.com/

- Twitter: https://twitter.com/BraaiEngineer

- GitHub: https://github.com/theronic

- Top 2% on StackOverflow: https://stackoverflow.com/users/198927/petrus-theron

- Wallfly Smart Volume Control — https://wallfly.webflow.io/

- Music: http://theronic.com/

(Old HN account was @FreshCode)

Posts17
Comments902
View on HN

This is helpful, because practically many functions in the wild have assert-like checks at the top of the function, e.g.

`(if-not key1 (throw (Exception ...))`

...and pre-conditions, e.g. `:pre [condition1 condition2]` do not run when `assert` is off.

Show HN: Zanagrams 23 days ago

Very cool! Idea: show the definition of the word when you find it, so you can learn new words.

(edit: ah, I see they are shown later)

CSSQuake 1 month ago

In case you want to view the menu, press Tab. Click outside menu items to resume game.

I’m surprised to see the model names hardcoded as an enum (e.g. `.sonnet4_6`), instead of a string with model discovery so that the user can select their preferred model without having to get a new app version through the App Store to support newer models.

Ooh, thanks for this. I'm going to try quercetin for my histadine sensitivity in red wine, which causes a skin reaction. I thought it was the sulphites, but after trying older wines (which have fewer sulphites), it made it worse. So I've narrowed it down to histadines. The dilemma here is that wines tend to improve with age, but they contain more histadines.

"I do wish there were an easier way to move in the ]}]})))}-ness of block ends though."

If he means navigating the AST, there is Parinfer: https://shaunlebron.github.io/parinfer/

Paredit / Parinfer ruined other languages for me. It lets you navigate up/down/in/out of the Clojure AST with keyboard commands and mutate those expressions, e.g. "Split" will split open the current data structure you're in: `(a| b)` =Split=> `(a)| (b)`, where | is caret. Join is the inverse, and it works for all data structures.

This reminds me of the META [^1] II paper [^2]:

META II is a domain-specific programming language for writing compilers. It was created in 1963–1964 by Dewey Val Schorre at University of California, Los Angeles (UCLA). META II uses what Schorre called syntax equations.

The interesting part of META II is that it can be defined in itself on one page (refer page 8 of the paper).

[^1] Wikipedia https://en.wikipedia.org/wiki/META_II

[^2] Paper: https://dl.acm.org/doi/epdf/10.1145/800257.808896

Tree Calculus 3 months ago

thx that looks much better, but I'll forget that syntax in the next 3 months. nowadays I am just casual commenter on HN spending points on contrarian views that I know will be downvoted and I know no one else will say it.

Tree Calculus 3 months ago

@dang, pleaaase can we get proper markdown formatting on HN? I tried adding two spaces after each line, but I don't want paragraphs between code

Tree Calculus 3 months ago

The inversion is really cool, e.g.

f = λa λb concat ["Hello ",a," ",b,"!"] f "Jane" "Doe" Hello Jane Doe!

then,

g = f "Admiral" invert g "Hello Admiral Alice!" Alice

PCB Tracer 5 months ago

I wanted to test this but if I decline file access I can't do anything. What gives? Do you want people to understand your product? Demo your product.

Why do you need file access to sell me?

Closed immediately.

btw. I am your target market.