Hacker Newsnew | past | comments | ask | show | jobs | submit | rrrx3's commentslogin

This is nice.

Thank you!


On the other spectrum, shortest JS fizzbuzz (62 characters):

    for(i=0;++i<101;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz'
Anyone can beat it? (any language accepted)

Perl6: say "Fizz"x$_%%(2+1)~"Buzz"x$_%%(4+1)||$_ for 1..100

from here - https://github.com/rsha256/shortest-fizzbuzz/blob/master/Per...


Why does this use 2+1 and 4+1 instead of 3 and 5?

LLM: wrt frst 100fizzbuzz

Actually kind of curious challenge; what's the shortest prompt you can use, which would produce the shortest possible fizzbuzz?

Edit: counting including the entire assistant reply, any text + code


"golf fizbuz" works well, giving a 54 Python one

    for i in range(1,101):print("Fizz"*(i%3<1)+"Buzz"*(i%5<1)or i)
"golf fizzbuzz" gave a 46 perl one

    print$_%15?$_%3?$_%5?$_:Buzz:Fizz:FizzBuzz,$/for 1..100
Both "code fizzbuzz" and just "fizbuz" gave this longer python one-liner

    print('\n'.join("Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i) for i in range(1, 101)))
That's the magic of using a known problem, you don't need to write much and even with incomplete prompts it can be understood. Everything a different new chat in kimi.ai, which was the AI window that I found first among mine.

Not interesting enough, to me, to try with other LLMs or phrases.


Whenever I try those short prompts, I get bunch of text + the code itself, but way more than just the code. Which model specifically are you doing this with?

I'm getting the text too, of course. Several variations of the code with it usually.

Trying to get an AI give ONLY a simple answer and not several is "boring" to me, as for me AI is a supplement to my reasoning ability, not a substitute.

Appending "code only" seems to work, at least with "golf fizbuz code only" gave me this one liner, which is long, but at least doesn't have the text that you dislike.

    for i in range(1,101):print('FizzBuzz'[i%3*4:8-i%5*4]or i)

> golf fizbuz code only

Yeah, seems to work. Guess it depends if we count bytes, characters, tokens or what, but "写Fizbuz只码" seems shorter than the above, String.length says 9 :)


My attempt:

> Prompt: mkfzbuzgolf

> LLM Used: Default ChatGPT free LLM

> Output: for i in range(1,101):print("Fizz"*(i%3<1)+"Buzz"*(i%5<1)or i)

So, 11 prompt characters and 62 output.

——-

Did a few more tries and I can get the 4-character string “glfz” (2 tokens) to work surprisingly consistently. But only on ChatGPT


Update: this is because ChatGPT was cheating and reading my conversation history. The closest I can get on a standard LLM is golffizbuz (10 characters)

"100fizzbuzz" as the prompt works to satisfys fizz buzz to 100 on Claude.

Python:

[(x%3<1)*'Fizz'+(x%5<1)*'Buzz'or x for x in range(1,101)]

edit: Hacker News stripped the * character. Now it's properly escaped.


>>> len("[(x%3<1)'Fizz'+(x%5<1)'Buzz'or x for x in range(1,101)]")

57


you can flip it and save a few bytes, but not valid fizzbuzz then:

for(i=100;i--;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz'


> but not valid fizzbuzz then

Well, if we let that requirement be broken, I'll present an even shorter JS version:

    1

just thought it was fun. thanks for your reply.

grass touching not allowed. shareholder profits must increase

Don't think of it as being unable to work, just like github outages, it's two weeks a year of mandatory time off

fairs... lemme go log 17 hours in an airport to make it authentic

ahhh, sonnet shitting the bed explains why I started getting prompted for basic approvals last night and early this morning

Ed's whole cornerstone thesis is that "AI doesn't work." Like, if I had to sum him up in a short sentence, that's what it'd be

that or "Angry but doesn't know much"


I think when cornered, he does say it works for coding and some other tasks. But to be honest it also makes a lot of bugs when writing code.

I don't agree with everything he thinks, but I think I agree with him more than I do Sam Altman or Jensen.


I’d be interested in a real accounting of what he said, rather than what people say they’ve heard.

If he says AI is changing work in some places but not-at-all in most… that’s defensible. Or at least we can look at that. Did he say it about the llm offerings from one or two providers or about (broad gesture) all AI efforts, everywhere? Etc.

Certainly it’s changing sw development work. It’s less clear, most everywhere else.


No, the cornerstones of his thesis are:

- LLM’s potential and capability are dramatically overstated

- Business leaders are either driven by the Emperor’s New Clothes effect, or the legitimate fear of stock price or valuation drops, to admit it.

- The amount of money being dumped into this industry will never pay off.

He’s snide and condescending, to the detriment of his message. I can completely understand why people aren’t interested in listening to him. However, straw-manning his stances by oversimplifying or flat-out making uninformed assumptions about them isn’t a useful response to what he’s saying.

Frankly, this industry squirts out enough bullshit to smother an active volcano every single day. If you think Ed isn’t credible, I sure hope you dismiss the industry leaders just as readily.


> No, the cornerstones of his thesis are: [...] The amount of money being dumped into this industry will never pay off.

That has only been a cornerstone of his thesis for the last 10 months or so, once Claude Code and Codex began making gobs of revenue. Before that the cornerstone of his thesis was "nobody will ever pay for AI" and then he silently pivoted, without acknowledging any error, once it was clear that was not true.

This is what bugs people about Zitron and why people aren't listening to him. He's has repeatedly been proven wrong, and every time it happens he just silently moves the goalposts and never admits any mistakes. It's fine-- actually, correct-- to write someone off once it's clear that every time they get disproven they'll just move to a new thesis instead of reflecting on what went wrong and what assumptions might be fundamentally incorrect about their thinking.


Do you know anyone whose understanding of the LLM business has remained static for the past 10 months? Would it be a positive trait?

In less than 3 years we’ve completely redefined how we interact with computers, and Zitron’s saying that there’s no way that investment in that pays off. He moves the goalposts every time something new proves him wrong.

To me, that’s not only not a credible stance, it’s immensely stupid.

The only way anyone could logically take that stance in the face of all the evidence otherwise is if their entire livelihood depended on it.

Oh… wait.


You could make the monetary motivation argument against anyone involved— much moreso Altman, et. al.

What specifically about the criticism do you find stupid? That’s a very general dismissal of some pretty specific criticism.


if you amass 115k subscribers by basically being wrong along the way just about everything and the shift as to "not remain static" and then continue to be full of shit, that is one thing - another things is going from "hm, what a great toy this is" to "holy shit, I can take on 4 contracts at the same time and run 25 terminals of CC is parallel" :)

Zitron’s superpower is to get reasonable people like you to turn his bullshit into prose.

He’s a scam artist. So is Altman. The correct answer is to not listen to either one, at least not on a regular basis and certainly not as a source of truth.

> straw-manning his stances by oversimplifying

He literally lies about numbers. The spreadsheet errors the article describes are either gross negligence or simple evidence of lying.


I was a fan of his writing for a long time, but it's clear that the guy has fallen down the "build an audience that's only here for baying for blood on one particular topic" hole and won't be able to escape it.

He used to be really thoughtful and funny about the topics he took on. And I realize that's pretty standard for a critic. But now he just keeps digging deeper and deeper, getting more things wrong post after post. His posts have grown to probably 3x the frequency and 3x the length of when he was talking about stuff like Google tanking their Search business by bringing in the Ad guys.

He really used to be a "little extreme" with some really grounded viewpoints. Now it's more like he's performing the "angry british guy" in order to maintain his impression count and audience.

It reminds me a LOT of that Eli Schiff guy in the design world. A mediocre designer who couldn't get untangled from one specific design style, who figured out that anger drives clicks. Schiff became a "design critic" who eventually fell down the alt-right pathway and ended up becoming a pariah. I'm not saying Zitron is gonna turn into some right wing nutjob, but he's falling down the nutjob path right now in real time by consistently staking out the worst ungrounded takes and continually doubling down on them.


Needs dumber, less capable models for the exec roles.


> My guess is people are tired of the "AI is the greatest thing since [cultural reference]" being forced down their throat and grasp at every straw to combat it, which is a sane response in my opinion and should be taken into account.

Let's engage in some parallelism then

This happens with literally everything in our society. Right now, every single food product seems to be infused with protein. In the past, they've had GMOs removed, MSG removed, been Fiber-infused... the list goes on and on.

We don't see people bullying and threatening grocery store clerks and managers over clear hype-cycle bullshit. Why? Because every rational person knows this is pure nonsense.

This behavior is NOT sane.

As many others have pointed out, this is just a regression that occurred during regular software development. There's nothing remarkable here that makes it AI-specific, other than that the contributions were AI-assisted. Regressions in software happen. You roll back to a stable version and make a bug report. You don't shit your diaper and sling it at the maintainer.

Acting like a giant fucking douche is NOT NORMAL BEHAVIOR.


> this is just a regression that occurred during regular software development

From a cursory look, it looks like a security fix in response to a CVE surfaced a coding error which (as far as i bothered to check) has been present in the code since 2007.

This is so banal that it's actually hilarious to see people lose their shit over it. But of course nobody is talking about the actual issue but about the _hypothetical potential for issue_ introduced by potential use of AI. It's so meta i don't even know how to make sense of it.


>regression happens

Yes, but some should absolutely be caught with a robust test suite, especially if it is not an edge case.

When was the last time there was a breaking regression in SQLite again?


What does your strawman argument about a hypothetical regression in SQLite have to do with this? What would a regression in the Windows Calculator have to do with this? What does your whataboutism prove here? Nothing.

A mistake was made. There are well worn paths for fixing the mistake. Acting like a giant fucking petulant pissbaby is not the critical path to getting things fixed and is deeply corrosive to the positive collaborative environment we’ve all spent decades building within shared, community software.

Get the fuck over yourself.


> positive collaborative environment

Yeah for human, by humans

For some critical software, open-source or not, a regression could literally kills, that's why I put SQLite as an example. A simple miss should NOT pass into stable, if it's an edge case due then yeah learn from it and built a test suite for that if possible

rsync is highly popular tools and a lot of people depends on them, whether you like it or not. At a certain point (I don't know what point, 10k, 20k, 500k users?) maintainers should respect the user expectations over their own ego and convenience

This is a problem for OSS in general, people treats their project like a hobby because it didn't pay enough, or corporates uses it without contributing back


"Mystery" doing a whole lot of heavy lifting in that headline


The proportion of "really good" PMs on product engineering teams has to be less than 0.1%.

The counter to that is "the proportion of 'really good engineers' to product engineering teams has got to be in the single digits," and I would agree with that, as well.

The problem is what is incentivized to be built - most teams are working on "number go up?" revenue or engagement as a proxy to revenue "problems." Not "is this a good product that people actively enjoy using?" problems.

Just your typical late-stage capitalism shit.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: