Luc Tielen's Avatar

Luc Tielen

@luctielen.bsky.social

I talk about functional programming and compilers. Building a high performance Datalog called “eclair” with Haskell and LLVM.

698 Followers  |  210 Following  |  71 Posts  |  Joined: 26.04.2023
Posts Following

Posts by Luc Tielen (@luctielen.bsky.social)

Post image

Extremely educational thread that shows the Achilles Heel of many vibe-coding apps (and how customers churn).

A founder got super excited and was on track to spend ~$100K/yr with the tool ($8,000/mo)

And then… BOOM

Agent deleted prod DB (!!). Gives up!

Churned - for good?

20.07.2025 04:09 — 👍 153    🔁 20    💬 9    📌 12

Thanks for putting in all this work! Anything related to futamura projections is supercool. 😁

15.07.2025 16:43 — 👍 1    🔁 0    💬 1    📌 0
Compilation of JavaScript to Wasm, Part 3: Partial Evaluation

Great blogpost about partial evaluation / futamura projections applied to WASM: cfallin.org/blog/2024/08...

15.07.2025 14:55 — 👍 9    🔁 2    💬 1    📌 1
Post image

The LLM-for-software Yo-yo tratt.net/laurie/blog/...

14.07.2025 09:39 — 👍 24    🔁 5    💬 2    📌 1

The year is 2025 and I am finally enjoying writing #python.

(This skeet made possible by uv and type hinting.)

01.07.2025 07:46 — 👍 2    🔁 0    💬 0    📌 0

Exercise and a weighted blanket helped me a lot. I also try to limit blue light towards the evening.

Hope you figure it out, insomnia is brutal. 🥲

15.05.2025 21:07 — 👍 1    🔁 0    💬 1    📌 0

Sorry, I misread that then.

But isn't it really hard to get >50% then? What was it like with biden last time?

(And don't get me wrong, I'm definitely not looking forward to the coming 4 years.)

19.01.2025 15:27 — 👍 2    🔁 0    💬 1    📌 0

Forcing people to vote can also have a bad effect on results.

Here in Belgium we have that and there's a far-right party that get lots of votes because people view it as a "fuck you" vote to the current system (which admittedly does have a lot of flaws).

19.01.2025 14:35 — 👍 0    🔁 0    💬 1    📌 0

Power usage / cost per answer for latest models like o3 is very high.

Can't find the picture but power usage of LLMs seems to go up exponentially the bigger the model gets. 😅

16.01.2025 07:49 — 👍 2    🔁 0    💬 1    📌 0

I have been catching up on AI developments recently and it's wild how far we have come already.

But I'm also wondering how far LLMs etc can be pushed to the limit. At some point, they need to rethink how these models work..

16.01.2025 07:27 — 👍 0    🔁 0    💬 1    📌 0

I followed a copy writing course once and it was eye opening to me. It really put emphasis on writing short, simple sentences.

Maybe these journalists should also start doing that 😅

09.01.2025 07:46 — 👍 1    🔁 0    💬 0    📌 0
Preview
GitHub - typst/typst: A new markup-based typesetting system that is powerful and easy to learn. A new markup-based typesetting system that is powerful and easy to learn. - typst/typst

Typst?

github.com/typst/typst

27.12.2024 15:22 — 👍 6    🔁 0    💬 1    📌 0

Oh and if you want all the results that are k steps away from all nodes, you just remove the start node clause in the last rule.

21.12.2024 08:30 — 👍 0    🔁 0    💬 0    📌 0

So yes, it does take an iterative approach and we use steps <k to find all intermediate results.

(Technically, you do that too in your approach after every multiply. You just don't look at the intermediate results.)

21.12.2024 08:28 — 👍 0    🔁 0    💬 1    📌 0

Datalog inductively reasons about the rules until it finds no other results. So you write down a recursive rule and it automatically expands it recursively. 😄

First rule is the base case, 2nd rule computes all derived results starting from the results of the first.

21.12.2024 08:26 — 👍 0    🔁 0    💬 1    📌 0

Ok that is a clever use of math to find the result, need to keep that in mind in the future 😄

Also nice use of rot13 to hide spoilers, i need to start doing that!

21.12.2024 08:24 — 👍 0    🔁 0    💬 0    📌 0

It automatically handles transitive edges. And how would you handle it then if you don't increment by 1?

20.12.2024 16:45 — 👍 1    🔁 0    💬 1    📌 0

Something to note: Datalogs like Souffle nowadays do a lot of optimizations at compile time. e.g. it will generate a specialized BTree datastructures optimized specifically for relations used in this program. (Even the indices are calculated automatically!)

And that results in very fast programs.

20.12.2024 16:15 — 👍 1    🔁 0    💬 0    📌 0
A Datalog code snippet to calculate the set of nodes k hops (k hardcoded to 5) away from a starting node.
Below is the full snippet as plain text:

```
// using numbers to identify the nodes in the graph

.decl edge(node_a: number, node_b: number)
.decl reachable(node_a: number, node_b: number, hops: number)
.decl max_hops(x: number) inline
.decl start_node(node: number)
.decl result(node_a: number, node_b: number)

.input edge
.input start_node
.output result

max_hops(5). // hardcoded for now, could be an input also

reachable(node_a, node_b, 1) :-
  edge(node_a, node_b).

reachable(node_a, node_b, x + 1) :-
  // first 2 clauses are optional, otherwise datalog would calculate *all* reachable paths transitively
  max_hops(y),
  x < y,
  reachable(node_a, node_b, x).

result(start, end) :-
  start_node(start),  // this filters results down significantly as well
  reachable(start, end, hops),
  max_hops(hops).
```

A Datalog code snippet to calculate the set of nodes k hops (k hardcoded to 5) away from a starting node. Below is the full snippet as plain text: ``` // using numbers to identify the nodes in the graph .decl edge(node_a: number, node_b: number) .decl reachable(node_a: number, node_b: number, hops: number) .decl max_hops(x: number) inline .decl start_node(node: number) .decl result(node_a: number, node_b: number) .input edge .input start_node .output result max_hops(5). // hardcoded for now, could be an input also reachable(node_a, node_b, 1) :- edge(node_a, node_b). reachable(node_a, node_b, x + 1) :- // first 2 clauses are optional, otherwise datalog would calculate *all* reachable paths transitively max_hops(y), x < y, reachable(node_a, node_b, x). result(start, end) :- start_node(start), // this filters results down significantly as well reachable(start, end, hops), max_hops(hops). ```

Something like this.. didn't run it or anything so probably contains bugs 😇, but it would give you a rough idea how to tackle it. And there's variations on this depending on the exact problem.

20.12.2024 16:13 — 👍 1    🔁 0    💬 2    📌 0

I think this is would be a fairly trivial problem in datalog (e.g. souffle), idk if that's an option for you?

20.12.2024 15:34 — 👍 1    🔁 0    💬 1    📌 0
NANOWAR OF STEEL - HelloWorld.java (Source Code Video) | Napalm Records
YouTube video by Napalm Records NANOWAR OF STEEL - HelloWorld.java (Source Code Video) | Napalm Records

2024 is nearing to its end, and we finally found a use case for long java class names 🤘:

youtu.be/yup8gIXxWDU?...

14.12.2024 11:18 — 👍 0    🔁 1    💬 0    📌 0

Impressive!

14.12.2024 10:35 — 👍 1    🔁 0    💬 0    📌 0
Preview
GitHub - llaisdy/PrologInfo: Prolog, Datalog, languages, resources, and beyond! Prolog, Datalog, languages, resources, and beyond! - llaisdy/PrologInfo

First draft of a Prolog languages list. Sections on Lambda Prolog, Datalog, and other logic programming languages.
Feedback, PRs, etc., most welcome!

github.com/llaisdy/Prol...

16.11.2024 18:31 — 👍 8    🔁 5    💬 0    📌 0

.. or maybe I should just use Lisp 😅

08.12.2024 16:40 — 👍 1    🔁 0    💬 1    📌 0

I've been writing a lot of terraform the past week, and I wonder if a similar approach could be used in other languages to structure things.

E.g. what if you have a DSL that takes template vars separately, and spits out code with everything interpolated. Simple alternative to C++ templates?

08.12.2024 16:39 — 👍 1    🔁 0    💬 1    📌 0

Just removing the fluff from some books probably achieves more than that 😅

08.12.2024 12:57 — 👍 1    🔁 0    💬 0    📌 0

I used to be team ORM, but now I'm all for writing SQL by hand.

Much more control, no more funky DSLs to learn, no limitations.

Can't believe I didn't start doing it sooner..

29.11.2024 10:10 — 👍 2    🔁 0    💬 1    📌 0

Good reminder that I should write more Erlang/Elixir code again.

28.11.2024 17:31 — 👍 2    🔁 0    💬 0    📌 0

I think a lot of things are going to get more expensive. 😅

28.11.2024 11:28 — 👍 4    🔁 0    💬 0    📌 0
You can use C-Reduce for any language C-Reduce is a tool by Regehr and friends for minimizing C compiler bug reproducers. Imagine if you had a 10,000 line long C file that triggered a Clang bug. You don’t want to send a massive blob to th...

I have been stuck debugging the eclair runtime for quite some time now.

Maybe I need to try C reduce to shrink the 22k LLVM IR instructions? 🤔

Based on: bernsteinbear.com/blog/creduce/

27.11.2024 20:25 — 👍 2    🔁 0    💬 0    📌 0