I disagree, I use metaprogramming in application code quite regularly, although I tend to limit myself to a single construct (instance_eval) because I find that makes things more manageable.
In my opinion the main draw of Ruby is that it's kind of Lisp-y in the way you can quickly build a metalanguage tailored to your specific problem domain. For problems where I don't need metaprogramming, I'd rather use a language that is statically typed.
The two are not mutually exclusive. On many occasions I've used C# to define domain-specific environments in which snippets of code, typically expressions, are compiled and evaluated at runtime, "extending the language" by evaluating expressions in the scope of domain-specific objects and/or defining extension methods on simple types (e.g., defining "Cabinet" and "Title" properties on the object and a "Matches" extension method on System.String so I can write 'Cabinet.EndsWith("_P") || Title.Matches("pay(roll|check)", IgnoreCase)').
I know this is tangential to your overall point, but did really they murder everyone in the room? I was under the impression that a few Venezuelan generals kidnapped Maduro themselves, left him at a predetermined point for US forces to pick up, and had their soldiers fire some small arms into the air to make a token show of resistance. There's no way the US would have flown a slow-moving convoy of helicopters into a hostile city unless they knew a priori that Venezuelan air defense missile batteries would be ordered to stand down.
I agree there was almost certainly some collaboration with some factions in Maduro's military standing down for the mission to go so smoothly, but its pretty well-established that a number of soldiers were killed, with some US soldiers coming back with the wounds to show for it. The entire bodyguard being killed is something the US and Cuba actually agree on!
Who knows what's true, but the official US narrative is that they entered his bunker, slaughtered the (mostly Cuban) security guards, and stopped Maduro just before he could hide behind a reinforced door. So the official narrative is indeed that US forces slaughtered a bunch of people and took Maduro.
Whether there was also cooperation from the Venezuelan military, failure to shoot down helicopters, etc, is a different matter.
spinel_codegen.rb is an eldritch horror. I always get spaghetti code like this when using Claude, and I've been wondering if I'm doing something wrong. Now I see an application that looks genuinely interesting (not trivial slop) written by someone I consider to be a top notch programmer, and the code quality is still pretty garbage in some places.
For example infer_comparison_type() [1]. This is far from the worst offender - it's not that hard to read - but what's striking here that there is a better implementation that's so simple and obvious and Claude still fails to get there. Why not replace this with
COMPARISON_TYPES = Set.new(["<", ">", "<=", ">=", "==", "!=", "!"])
def infer_comparison_type(mname)
if COMPARISON_TYPES.include?(mname)
"bool"
else
""
end
# Or even better, strip the else case
# (Which would return nil for anything not in the set)
end
This would be shorter, faster, more readable, and more easily maintainable, but Claude always defaults to an if-return, if-return, if-return pattern. (Even if-else seems to be somewhat alien to Claude.) My own Claude codebases are full of that if-return crap, and now I know I'm not alone.
Other files have much better code quality though. For example, most of the lib directory, which seems to correspond to the ext directory in the mainline Ruby repo. The API is clearly inspired by MRI ruby, even though the implementation differs substantially. I would guess that Matz prompted Claude to mirror parts of the original API and this had a bit of a regularizing effect on the output.
The solution to this with Claude is to use a small agent harness and include refactoring steps once tests are written and pass. For some things you will need to include rules on coding style it should prefer. This is especially true for Ruby or other languages it has not seen as much training data for as for e.g. Python.
It's true that it's shorter, but I suspect that the if-return, if-return pattern compiles down to much faster code. Separately, this code was originally written in C then ported. There are reasonable explanations for why Matz has the code written this way besides the typical AI slop.
I'm skeptical of that reasoning because the original C wasn't too clean or performant either. For example emit.c from an earlier commit [1]
It writes a separate call to emit_raw for each line, even though there many successive calls to emit_raw before it runs into any branching or other dynamic logic. What if you change this
emit_raw(ctx, "#include <stdio.h>\n");
emit_raw(ctx, "#include <stdlib.h>\n");
emit_raw(ctx, "#include <string.h>\n");
emit_raw(ctx, "#include <math.h>\n");
// And on for dozens more lines
to this
emit_raw(ctx,
"#include <stdio.h>\n"
"#include <stdlib.h>\n"
"#include <string.h>\n"
"#include <math.h>\n"
// And on for dozens more lines
);
That would leave you with code that is just as readable, but only calls the emit function once, leading to a smaller and faster binary. Again, this is a trivial change to the code, but Claude struggles to get there.
It's interesting how variable people's experiences seem to be.
Personally, I tend to get crap quality code out of Claude. Very branchy. Very un-DRY. Consistently fails to understand the conventions of my codebase (e.g. keeps hallucinating that my arena allocator zero initializes memory - it does not). And sometimes after a context compaction it goes haywire and starts creating new regressions everywhere. And while you can prompt to fix these things, it can take an entire afternoon of whack-a-mole prompting to fix the fallout of one bad initial run. I've also tried dumping lessons into a project specific skill file, which sometimes helps, but also sometimes hurts - the skill file can turn into a footgun if it gets out of sync with an evolving codebase.
In terms of limits, I usually find myself hitting the rate limit after two or three requests. On bad days, only one. This has made Claude borderline unusable over the past couple weeks, so I've started hand coding again and using Claude as a code search and debugging tool rather than a code generator.
> In terms of limits, I usually find myself hitting the rate limit after two or three requests.
I'd absolutely love to see exactly what you're doing (...well, maybe in a world where I had unlimited time or could clone myself...) because as tight as the usage limits are I absolutely cannot fathom hitting them THAT early.
What are the requests like, and have you noticed what is Claude doing during them? Is it reading an entire massive codebase or files that are thousands of lines long? Or are you loaded up with many MCPs or have an ever-growing CLAUDE.md?
I'm writing a compiler. When I have Claude write a new feature, I have validate that suite against a test suite of ~200 tiny programs.
I have a shell script that automates this. If all tests pass, the shell script prints "200/200 passing" with very little token spend. If only 190/200 pass, the shell script reports the names of every test that failed, and now Claude does a process of
1) run the compiler binary -> 2) get assembly output and inspect for obvious errors -> 3) assemble -> 4) verify that the assembler did not report errors -> 5) run test binary, connect with gdb, and find the issue -> 6) edit the compiler source -> 7) recompile the compiler -> 8) back to 1
multiplied by 10 for the 10 failing tests. This eats up tokens very quickly. I realize that not every use case is going to look like this. But if I didn't have Claude verify against the test suite, then I'd be getting regressions left and right, and then what's the point?
The whole codebase (tests included) is less than 15k lines, so I don't think that's the issue. No MCPs. CLAUDE.md about 1.5k lines.
also add "no hallucinations" and "make it works this time pretty please" while also say Claude will go to jail if does not do it right should work all the time (so like 60%)
Similar to the observation (by simonw) that they respond reasonably to "TDD: Red => Green"
I've used that ever since. Works most of the time, but other stuff is often failing and I've learned to become distrustful of an agent very quickly. One mistake where I point it out and the agent corrects itself is fine if it keeps working well after. A second mistake when it's trying to fix the first one or an inability to understand or a claim that it fixed it but it didn't is instant termination (after dumping context for the next agent).
It's really hard to cry victim about others misrepresenting Trump's motives for the Iran war as oil, oil, oil when the US did in fact launch a military attack on a country - within the last six months - where the subsequent negotiated agreement on oil rights was quite literally described by the White House press secretary as "the president’s control of Venezuela’s oil" [1] and just a few weeks later the president held a public, televised conference with Chevron and ExxonMobil executives in the White House where he pitched them on investing in the Venezuelan oil industry [2]
It's not an insightful statement right now, but it was at the peak of cloud hype ca. 2010, when "the cloud" often used in a metaphorical sense. You'd hear things like "it's scalable because it's in the cloud" or "our clients want a cloud based solution." Replacing "the cloud" in those sorts of claims with "another person's computer" showed just how inane those claims were.
No, it doesn't at all. "it's scalable because it's in the cloud" may be reductive nonsense or it could be true. It's scalable because it's on someone elses computer and in a matter of minutes it can be on one of their computers with twice the ram and vCPUs. That is a meaningful thing to say when the alternative is CAPEX heavy investment in your own infrastructure. Same with "our clients want a cloud based solution" in contrast with on-prem installs. They don't want your shitty pizza box in their closet, they want someone else to be doing the hosting.
I still don't understand why Theil and Karp decided to name their surveillance tech company after a device that is best known for being used by an evil dark lord to decieve and corrupt. It's like the Mitchell and Webb skit "are we the baddies" except they're the ones who designed the uniforms with skulls on them.
I don't think you have to understand why they made that decision, you just have to understand who they are and what they believe in. Just have a look at what they talk about, and what they are quoted as saying.
You know what? It's all on the public record, and if someone wants to defend these guys or challenge my opinion they can do better than asking for sources of well reported behaviour.
How am I supposed to prove a negative here? Post a transcript of every statement Thiel and Karp have ever made?
You're the one making an assertion about Palantir. Apparently whatever you're referring to is well reported, but not quite well reported enough for you to actually point out the statements you're referring to.
If I was to say "Musk is an asshole just look at what he did at the presidential inauguration in 2025" and you said "you'd make a better point by giving a source for that ominous reference", I would think you were acting in bad faith because of how widely reported Musk's nazi salutes were at the time, and I would feel completely fair in saying "go and find out for yourself, you have all of the necessary information to do so."
I would actually think that you were in a position to defend that person but weren't ready to express that yet. So here we are with Thiel and Karp where 5 minutes of using Google or something would bring up various reports of Karp's recent conference statements. And I could have done that myself originally but "source?" is quite an irksome reply to deal with.
In your example with Musk, you actually gave a concrete reference: doing a Nazi salute. You've yet to do even that with Thiel and Karp.
> 5 minutes of using Google or something would bring up various reports of Karp's recent conference statements
And for the third time, you couldn't even be bothered to actually share those statements.
This is the first result from googling "Alex Karp Conference":
> “And so these disruptions are gonna disrupt every aspect of our society. And to make this work, we have to come to an agreement of what it is we’re going to do with the technology; how are we gonna explain to people who are likely gonna have less good, and less interesting jobs.”
What does this demonstrate about Karp's beliefs, besides the fact that he thinks AI is going to disrupt large parts of society? That's a pretty normal belief, is it not?
Perhaps you can't actually find quotes to match your rhetoric, and that's why you repeatedly fail to actually share any statements from Karp and Thiel.
I'm not sure you can describe somebody who supports ICE in its current incarnation, who profits from surveillance of vulnerable populations, who believes in revenge (cf Gawker), who abuses wealth (NZ citizenship shenanigans) as "a very thoughtful Christian", unless you do a lot of definitional work on "Christian".
Talking about the antichrist doesn't make you Christian.
Yes, when it makes the front page of the FT (2 days ago) you know there's some interesting stuff going on. The whole article is worth a read (I didn't known JD Vance's career was "largely bankrolled by Thiel").
>US tech billionaire and Maga donor Peter Thiel is starting a series of closed-door lectures about the antichrist in Rome on Sunday, putting him on a collision course with Pope Leo XIV, the Catholic Church’s first American pontiff....
>Thiel apparently gives talks about the Antichrist
You forgot to mention the part where Thiel tells, in all seriousness, that the Antichrist is on Earth, now, and may literally be Greta Thunberg [1].
And that's one of the reason Greta Thunberg must be opposed.
> He's actually a very thoughtful Christian
That's one way to upsell "deranged".
Thoughtful he is (as many lunatics are).
As far as religious aspects go, him losing faith in democracy after women and "benefits recipients" got the right to vote[2] doesn't sound very Christian-like to my ears.
Neither does his argument to end affirmative action[3], if you read it carefully, but that's a whole another can of worms.
> following the works of Rene Girard.
Ah yes, the fine fellow who (like Thiel) sees religion as a technology to manage humans by designating sacrificial scapegoats, which is the Girard's final solution to all problems.
In Girard's (and Thiel's) view, scapegoating isn't only an emergent outcome, it is necessary to stave off the end of the world.[3]
Thiel's support of Trump and his influence and backing of the Heritage Foundation / Project 2025 is very consistent with this philosophy.
Trump/Project 2025 make scapegoats out of immigrants, DEI, minorities, trans people, women who don't dedicate their lives to being breeding machines, ... - the list goes on.
So, in Thiel, we have:
- a gay man (who destroyed the paper that outed him out of spite) who thinks women are not just ewww, but are the reason democracy failed and is antithetical to freedom and are to blame for the Great Depression. And one of them (Greta Thunberg) is literally the Antichrist, in all likelihood.
- a white German raised in apartheid South Africa[5], in a city described as "more German than Germany" in 1976 where "Heil Hitler!" salutes were still the norm [6], who thinks that affirmative action has never been a good idea and was utterly unnecessary by the 1990s in the US because, quote [3][7]: “There are almost no real racists . . . in America’s younger generation”, and whose politics have declared "DEI" as an enemy. Here's a reminder that DEI stands for Diversity, Equity, and Inclusion.
- a Christian who sees Christianity as an instrument of "political theology". See, aside from "let's make scapegoats" Girard, he has been heavily influenced by the writing of Carl "Hitler is good for us" Schmitt[8]. Schmitt was not just a Nazi, but a jurist who provided legal (and moral) basis for Hitler's power grab.
- a self-proclaimed "Libertarian" whose primary source of fortune is selling totalitarian surveillance products to governments
We have that person effectively controlling the US policy and executive actions (Thiel has groomed JD Vance into vice presidency[9]).
I don't see any signs that Thiel has a sense of humor at all, dark or otherwise.
But the universe in which he gets to do all that and be called a "very thoughtful Christian" sure does.
Thiel grew up in what today is Namibia, not South Africa, see your 6. His parents left for the US when the planned opening of a uranium mine nearby made clear that there would be an influx of black people.
On the notion of Thiel being a very thoughtful Christian (your parent poster): if you can define adherence to Nazi philosopher's Carl Schmitt doctrine thoughtful where he fears "the satanic unification of the world", then by all means.
>Slight correction: Thiel grew up in what today is Namibia, not South Africa
What today is Namibia was, when Thiel lived there, called South West Africa as a territory under South African control.
Namibia only gained independence in 1990. By all means, Thiel living there before moving to the US in 1976 was growing up in South Africa (by the same measure as kids living in Donbas region of Ukraine today are growing up in Russia, even if these territories will be reclaimed in the future).
But yes, Namibia deserves recognition, and the more specificity, the better. "Namibia under SA control" would be a better choice of words.
>if you can define adherence to Nazi philosopher's Carl Schmitt doctrine thoughtful where he fears "the satanic unification of the world", then by all means.
O_O
Me: things are bad
Helpful comment: actually, things are worse.
>If you like to read an In-depth article about the influences on Thiel (incl. by Wolfgang Palaver) there is a very thorough article in Wired
Thanks for the reference! I've got a Wired subscription to support their journalism, but I haven't read this article yet. Time to make use of it!
This is a good point. It is not humanly possible to verify every claim you read from every source.
Ideally, you should independently verify claims that appear to be particularly consequential or particularly questionable on the surface. But at some point you have to rely on heuristics like chain of trust (it was peer reviewed, it was published in a reputable textbook), or you will never make forward progress on anything.
> In this case, the idea that Cantor can't do something because the former head is now in a government job is crazy. No one "in the business" thinks Cantor is suddenly hobbled.
That's not the idea, and it almost seems like a straw man to be honest. The actual idea is that the current head of Cantor can't do something because he's a direct relative of a high ranking government official whose powers and job duties present a conflict of interest for this specific set of transactions.
Cantor Fitzgerald is an investment bank. Rather than claim a straw man, think about what they do and how it interacts with the administration. Everything they do is heavily regulated. If they couldn't do anything that gave an appearance of a conflict, they literally couldn't do a single thing that makes up their business and would be hobbled.
I think a lot of people feel like people who have one foot in a heavy regulated industry shouldn't have their other foot in the regulatory body that regulates that industry.
> If they couldn't do anything that gave an appearance of a conflict
This time I won't say maybe - that's a straw man.
I never said Cantor shouldn't be able to do anything that even gives the appearance of a conflict. Or anything even close to that really.
As you said yourself further up the thread, investments of investment bank employees are highly regulated. And not only employees themselves, but also their immediate family members.
Yet that same level of legal regulation doesn't apply to immediate relatives of government officials. We've seen frequently with spouses and children of congressmen, and now we're seeing it with the son of a cabinet member. Yes, this may technically be legal, but legal does not equate to just and desirable. This reads to me like a serious loophole in the law that needs to be closed.
You are just out of your depth in this area. You don't understand what Cantor has done here, you don't understand what Howard can or cannot do in his role.
Howard Lutnick's positions have been directly opposite of what Cantor has bet will happen. Cantor has 10 or 12 thousand employees and is constantly doing all manner of things. Howard has no power over the supreme court. His son is the chairman, he's miles away from being in the weeds on what specific things they do. He isn't going to be comped like crazy as the chairman.
There is no conflict. There is only the appearance of one and it only appears that way to people who don't understand the situation.
In my opinion the main draw of Ruby is that it's kind of Lisp-y in the way you can quickly build a metalanguage tailored to your specific problem domain. For problems where I don't need metaprogramming, I'd rather use a language that is statically typed.
reply