Roger Peppe

5.5K posts

Roger Peppe

Roger Peppe

@rogpeppe

Campaigning against unnecessary indirection everywhere. Hacker at https://t.co/yYGknd3jo2

Northumberland, UK Katılım Ocak 2009
453 Takip Edilen1.8K Takipçiler
Roger Peppe
Roger Peppe@rogpeppe·
@aramh In your gist, the output from the command line `dune exec _build/default/bin/main.exe reduce /tmp/a.cue` seems to define `y` without respect to `x`, thus losing that constraint. But again, I'm probably missing something.
English
1
0
0
22
Aram Hăvărneanu
Aram Hăvărneanu@aramh·
Sorry, I don't follow. The point is that `cue-ng reduce` *does not* lose the constraint. cue eval // loses the constraint cue-ng reduce // keeps the constraint cue-ng value // loses the constraint, but intentionally
English
1
0
0
15
Aram Hăvărneanu
Aram Hăvărneanu@aramh·
I'm going to tease one essential improvement I have in my CUE implementation compared to the existing one. Evaluation truly is monotonic (!!) and a model can always be extracted even if it's not concrete. For comparison `cue eval` is undefined, and not monotonic with respect to future unification.
English
5
0
13
1.2K
Roger Peppe
Roger Peppe@rogpeppe·
@aramh ISTM that losing the constraint between y and x isn't quite valid there, because that reduced result will unify with `{x: z: 1, y: z: 2}` which the original would not. Am I missing something?
English
1
0
0
23
Roger Peppe
Roger Peppe@rogpeppe·
@aramh Wouldn't it be more accurate to model it as incompleteError(string) ? That is, it's definitely an error currently, pending x being made more specific, because operators don't work on noncrete values, but we know that the result must be string.
English
1
0
1
145
Aram Hăvărneanu
Aram Hăvărneanu@aramh·
Let's take this CUE program: x: _ a: x + x b: x * 1 c: x * "a" d: x || true e: x && false My CUE implementation computes the following model: a: _ b: _ c: string d: true e: false x: _ Observe that `c: string`. Why? Because `*` has the following type: (int `*` int → int) & (int `*` string → string) `*` can produce both an `int` and a `string`, but because the second argument is known to be "a", a string, it deduces the output can only be a string. (In case you're wondering why `*` has this type, the second form is for string repetion. I will not comment on the wisdom of this language feature.) Why doesn't it infer that `a` and `b` must be int? Precisely because both `+` and `*` also work on string, so it infers `int|string` (but I don't have disjunctions wired in yet). Anyway, this is just basic type inference, common in many functional language. But here is the big reveal: I didn't implement type inference! It did this all by itself, and it's all a consequence of the algebraic properties of the model. There is no special unification algorithm, type reconstruction algorithm or anything else like that. Type inference is simply a consequence of computing the model, and computing the model is done by purely algebraic means. Of course none of this should be a surprise to anyone with experience in logic languages. But what is surprising is how emergent this behavior is. I have not implemented it. I simply compute the projection of the denotation of the closed term in the shape of the original term. That's what the model is. Only my CUE implementation computes models, the existing CUE implementation lacks this ability.
English
4
0
27
4.9K
David Crawshaw
David Crawshaw@davidcrawshaw·
Thinking of hosting a hackathon, but it's an extended brunch where we all check our exe.dev agents every few minutes on our phones.
English
7
1
34
3.4K
Roger Peppe
Roger Peppe@rogpeppe·
@ibuildthecloud Or memory! (I recently saw Claude using 77GB VM, 500MB RSS, more than Chrome with 70 tabs; not even a memory leak: restarting made no difference)
English
0
0
0
21
Darren Shepherd
Darren Shepherd@ibuildthecloud·
why, why!? it doesn't make sense that a TUI can use this much CPU. Why!? 😭 I seriously think this is just from vibe coding slop. I can't explain it otherwise.
English
9
0
19
3.1K
Roger Peppe
Roger Peppe@rogpeppe·
@aramh If you're actually vibe coding, you're not seeing the code at all, so I fail to see why a vibe coder would care about the language being used beyond "is it effective with my LLM?"
English
0
0
0
36
Aram Hăvărneanu
Aram Hăvărneanu@aramh·
If you like vibe coding you should also like typed pure functional programming. Any other position is inconsistent. Pure functional programming is the only sort of programming which permits unrestricted denotational reasoning. Denotational reasoning means the scope necessary for the LLM to perform its task is finite (and in principle knowable, as long as you have types). Even more important it also means that you (and the type checker) can review the LLM output and be confident in the lack of accidental coupling. Denotational reasoning enables reliable top-down reasoning at arbitrary scale. You can be certain that high-level reasoning, albeit incomplete, is absolutely correct, you don't need to attempt low-level reasoning if you do not care about low-level details. However, it seems to me that vibe coding enthusiasts do not care a bit about pure functional programming, or about software engineering in general. In fact I see an inverse correlation between people who care about scalable and correct engineering and vibe coding enthusiasts.
English
49
44
396
42.3K
Martin Fowler
Martin Fowler@martinfowler·
NEW POST Powerful context engineering is becoming a huge part of the developer experience of modern LLM tools. Birgitta Böckeler explains the current state of context configuration features, using Claude Code as an example. martinfowler.com/articles/explo…
English
26
94
626
60.4K
Roger Peppe retweetledi
CUE
CUE@cue_lang·
Want to talk about how to end configuration chaos? We will be at @fosdem (Brussels, Jan 31–Feb 1) and @cfgmgmtcamp (Ghent, Feb 2–4) 🚀 Ping us if you’re around.
English
0
3
5
489
Roger Peppe
Roger Peppe@rogpeppe·
@0xlelouch_ My Q: what are good patterns you like to use for making your Go deadlock-free by design?
English
0
0
0
19
Abhishek Singh
Abhishek Singh@0xlelouch_·
Go channels interview Qs I ask (because production bugs look exactly like these): 1. Buffered vs unbuffered: what blocks, when, and how it changes backpressure. 2. `select`: what happens with multiple ready cases, `default`, and `nil` channels. 3. Goroutine leaks: show me the code path that blocks forever on send/recv. 4. Context cancellation: where do you check `ctx.Done()` and how do you make send/recv cancellable. If you can’t explain the blocking story, you don’t understand channels yet.
English
6
10
144
24.6K
Shayan
Shayan@ImSh4yy·
I forked this repo and had Opus 4.5 optimize the code and Gemini 3 to create more themes. Give me a few cities to generate. github.com/originalankur/…
Shayan tweet media
English
366
103
1.8K
152.5K
Roger Peppe
Roger Peppe@rogpeppe·
@DuncanWChisholm Johnny Findlay is such a banger of a tune! I never knew its name or that it was written by Donald Riddell though - very happy to know that.
English
0
0
1
54
Duncan Chisholm
Duncan Chisholm@DuncanWChisholm·
It’s never too early for a bit of craic and so I’ve popped in to my favourite bar in Inverness, ‘MacGregors’ to have a wee tune with my old pal Bruce MacGregor Here are a couple of reels for #Tradvent written by our teacher Donald Riddell - ‘Colin Clachair’ and ‘Johnny Findlay’
English
6
17
91
2.3K
Roger Peppe
Roger Peppe@rogpeppe·
@oldmanuk @fatih And testify isn't even consistent in this respect: for example, ErrorContains has the arguments the other way around. And even with LSP, quite a few of the functions don't even say which is which (Greater, for example).
English
0
0
0
54
Roger Peppe
Roger Peppe@rogpeppe·
@oldmanuk @fatih In most places, we put the actual value on the left and the expected on the right (I write `if x == 3` not `if 3 == x`). I might be old fashioned, but I don't think good APIs shouldn't require LSP support to use intuitively.
English
1
0
0
52
Fatih Arslan
Fatih Arslan@fatih·
Here are two examples from our Agents.md/Claude.md file making sure the agents have some information while writin Go code and tests. We also have a few in-house libraries that I can't share, but we make sure to tell it to use them. We have a really nice storage abstraction package to deal with bytes for example, but the LLM's don't know anything about it. Just tell it. Easy way is to show a BAD example and a GOOD example (that uses your preferred library). It worked well for us so far.
Fatih Arslan tweet mediaFatih Arslan tweet media
Tobias Möritz@tobimori

@fatih Can you share some examples?

English
4
2
124
23.9K
Roger Peppe
Roger Peppe@rogpeppe·
@oldmanuk @fatih I'm not keen on the implied DeepEqual semantics of Equal (or its argument order, so easy to get wrong!), the API surface area and the lack of extensibility, the gotchas through use of `any` as arguments, and probably more - haven't used it for ages.
English
2
0
0
67
Roger Peppe
Roger Peppe@rogpeppe·
@fatih Ha, no I just remembered - it's the other way around: I have a test failure in a table-driven test and I want to find out where the table entry is defined but I can't just copy and paste the name from the test output into my search. I really want github.com/golang/go/issu…
English
0
0
1
311
Fatih Arslan
Fatih Arslan@fatih·
@rogpeppe I believe Go automatically converts spaces though, I never copied them myself and converted test names.
English
1
0
0
82
Roger Peppe
Roger Peppe@rogpeppe·
@fatih Yeah, that's one of the things (I'm not keen on testify). And I don't like spaces in test names because then I can't copy and paste the test name into `go test -run` without manually converting spaces to underscores...
English
2
0
1
96
Fatih Arslan
Fatih Arslan@fatih·
@rogpeppe Oh definitely, over time though I kinda AM ok with some of the rules. But for example, you could also tell it to NEVER use require for example.
English
1
0
0
233
Catalin
Catalin@catalinmpit·
You need to create an endpoint that accepts an array of IDs and returns the corresponding items. Do you use HTTP GET with URL params or HTTP POST with a JSON body?
Catalin tweet media
English
148
7
166
60.9K