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

I made a poster showing how one might write a Hello World program in 39 different programming languages, and even different versions of some common languages like Java:

https://troymcconaghy.blog/2025/01/13/39-hello-world-program...


Nice, but as of JDK 25 (the preview JEP 445 has become the permanent JEP 512), the canonical Hello World in Java is:

    void main() {
        IO.println("Hello World");
    }

Since it seems like you work on Java, would you mind taking a look at https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-836673..., where this syntax does not work for shebangs?

Not a java developer but why the void? Shouldn't your main function and program return an integer?

I believe that is a C-ism, where the C runtime calls your main() and exits the process with the return value. The Java equivalent is System.exit(int status).

The return type of a Java main is the JVM platform return type

Sending system signals is external to the JVM platform


Thanks, I made a note to update that someday.

Cool poster! If you don't mind me asking, would you share what tools you use to create this poster? You've got syntax highlighting going on there too. What did you use for that?

You just have to read his blog, it is short and he answered everything.

> he used python and xelatex

> https://github.com/ttmc/hello-world-ways


Yep, and for syntax highlighting, I used the minted package [1]. Internally, minted uses the Pygments library [2].

[1] https://ctan.org/pkg/minted

[2] https://pygments.org/


Thanks!

This is super cool! Now someone should make a similar poster with Hello World sent to a serial port.

Bonus points if it is a RS485 port.

Some language that seem to look good might show their true ugly face...


Objective C is by far the weirdest on that list.

Objective-C is basically Java so I wouldn’t call it that weird.


Correct, Java was designed with a strongly influence from Objective-C.

One might even say Java is basically Objective-C

Kind of, but with C++ syntax to make it more appealing,

https://cs.gmu.edu/~sean/stuff/java-objc.html


No, Java never took anything good from the language.

Sun folks disagree,

https://cs.gmu.edu/~sean/stuff/java-objc.html

https://en.wikipedia.org/wiki/Distributed_Objects_Everywhere

Sure, they could have taken a bit more, like proper AOT instead of it being a feature only available in third party commercial JDKs, or some low level niceties like C#.


I was talking about good parts of the language

Like [] and @ all over the place, C lack of safety, and manual memory management?

Because I don't see what else good Java has left out, besides AOT in the box and unsigned types.


Uh, the entire runtime?

I would look to the UCSD p-System as a precedent to the JVM. Both are byte-code interpreted VMs. Gosling used the p-system earlier in his career, prior to joining Sun.

https://en.wikipedia.org/wiki/James_Gosling#Career_and_contr...

The Objective-C runtime is very small: just enough to do late-bound fn calls to a tree of class defs. All on top of C.


I beg to differ, given the engineering effort that went into JVM across various Java vendors, versus Apple and NeXT have done.

Proven by the fact that Swift had to be invented, as there was nothing left to fix Objective-C in a proper way.


Swift has that runtime, by the way.

Nope, Swift interops with Objective-C runtime to ease code migration from legacy Objective-C code, and existing Apple frameworks predating Swift.

A runtime that isn't part of the cross-platform Swift project, with missing functionality being rewriten into Swift.


Yes, and those platforms are worse off for it.

Smalltalk, but in C

I wonder about a Ford F-250 owned by an ox (an ox Ford).


Essential oils from plants (terpenes/terpenoids) are hydrogen-rich hydrocarbons and they smell nice. Menthol is an example, with a hydrogen mass fraction of about 12%. For comparison, water has a hydrogen mass fraction of about 11.2%.

If you abandon the "smell nice" constraint, you can get an even higher hydrogen mass fraction. For example, n-pentane has a hydrogen mass fraction of about 16.8% and it's liquid at a pressure of 1 atmosphere and a temperature of 25 degrees Celsius, but it evaporates rapidly, so you need to keep it in a container.

If you don't mind pressurizing the container a bit, you could put ammonia in there, and it has a hydrogen mass fraction of about 17.6%.


I didn’t realize the mass fractions were that low. Is that correct??


Yes, because hydrogen atoms are so light. It takes 12 hydrogen atoms to equal the mass of a carbon atom and 16 hydrogen atoms to equal the mass of an oxygen atom.


It’s a surprisingly good rocket fuel to be mostly carbon then.


It was a joke about gasoline


Smells nice?


Some people actually think it does. Especially before it had so much ethanol added. I don't think it smells particularly nice but it is definitely a memory trigger of being a small kid helping my dad get the lawn mower ready to cut the grass.


Ethanol free gas definitely has a more enjoyable smell than gas with ethanol, but nice is maybe the wrong word.


My main learning is that character.ai is consistently in the top four, along with ChatGPT (always #1) and Claude. I didn't even know it was in the running.


It reminds me of that old joke:

- "Say milk ten times fast."

- Wait for them to do that.

- "What do cows drink?"


But... cows do drink cow milk, that's why it exists.


You’re likely thinking of calves. Cows (though admittedly ambiguous! But usually adult female bovines) do not drink milk.

It’s insidious isn’t it?


If calves aren’t cows then children aren’t humans.


No, you're thinking of the term "cattle". Calves are indeed cattle. But "cow" has a specific definition - it refers to fully-grown female cattle. And the male form is "bull".


Have you ever been close enough to 'cattle' to smell cow shit, let alone step in it?

Most farmers manage cows, and I'm not just talking about dairy farmers. Even the USDA website mostly refers to them as cows: https://www.nass.usda.gov/Newsroom/2025/07-25-2025.php

Because managing cows is different than managing cattle. The number of bulls kept is small, and they often have to be segregated.

All calves drink milk, at least until they're taken from their milk cow parents. Not a lot of male calves live long enough to be called a bull.

'Cattle' is mostly used as an adjective to describe the humans who manage mostly cows, from farm to plate or clothing. We don't even call it cattle shit. It's cow shit.


So, this joke works only for natives who know that calf is not cow.


I guess a more accessible version would be toast… what do you put in a toaster?


Here's one for you:

A funny riddle is a j-o-k-e that sounds like “joke”.

You sit in the tub for an s-o-a-k that sounds like “soak”.

So how do you spell the white of an egg?

// All of these prove humans are subject to "context priming".


My brain said "y" and then I caught myself. Well done!

(I suppose my context was primed both by your brain-teaser, and also the fact that we've been talking about these sorts of things. If you'd said this to me out of the blue, I probably would have spelled out all of "yolk" and thought it was correct.)


Notably, this comment kinda broke my brain for a good 5 seconds. Good work.


Well, it works because by some common usages, a calf is a cow.

Many people use cow to mean all bovines, even if technically not correct.


Not trying to steer this but do people really use cow to mean bull?


No one who knows anything about cattle does, but that leaves out a lot of people these days. Polls have found people who think chocolate milk comes from brown cows, and I've heard people say they've successfully gone "cow tipping," so there's a lot of cluelessness out there.


> Many people use cow to mean all bovines, even if technically not correct.

Come on now :0

I just complained non-natives would have a problem distinguishing between a cow and a calf, and you had to bring those bovines.

To make it easier, would just drop that in my native language, the correct term for bovine is more used to describe people with certain character, that animal kind.


Colloquially, "cow" can mean a calf, bull, or (female adult) cow.

It may not be technically correct, but so what? Stop being unnecessarily pedantic.


In this context it is literally the necessary level of pedantic yes?


Are you referring to the Stargate Project? I guess so, since there weren't any other 500 billion USD AI projects announced recently in the USA.

Construction of the first data center Abilene, Texas site is ongoing. Emily Chang visited the site over a month ago and got video footage [1]. So it's not nothing. Will they actually invest 500 billion in the end? I dunno; I guess we'll see. The main challenges seem to be the availability of electrical power and skilled workers, not demand, investment or ambition.

[1] https://www.youtube.com/watch?v=GhIJs4zbH0o


The overall impression I get of such projects is that politicians celebrate the funding victory, and then forget about it. Then the project's funds get eaten up by administrative costs over time. Ezra Klien [1] recently highlighted two such examples: high speed rail in CA, and rural broadband subsidies. Personally, I haven't seen much, if anything, actually spent out of Biden's infrastructure bill. The money from these programs just seems to...vanish. Allowing this to happen undermines the idea that the USG is a trustworthy spender of our money. I would personally prefer it if political success wasn't just grabbing more budget, but actually overseeing successful execution of public projects.

1 - https://www.youtube.com/watch?v=NcZxaFfxloo


I've seen a lot of transportation infrastructure projects at least partially funded from the bill around me. I've charged at EV charging locations funded by NEVI, and I've charged at some stations built expecting NEVI funding that is now on hold. I've ridden on busses purchased by grants issued through the IIJA. I've seen the ground broken for building new bike trails around me based on grants from the IIJA, and they're getting close to done. The highways around me have current construction projects underway which were funded through the IIJA.

I see some of the things funded by the IIJA every day of my life.

And that's not including the projects which are still being worked on getting approved including projects to replace sewage lines in my area, reworking stormwater drainage systems, and additional flood control projects, all of which are planned to be funded through the IIJA and all of which I think my city could really use. 60% of the IIJA funding hasn't been spent yet.


I have fiber, as do the 9 counties around mine because of rural broadband investment. My sister moved to downstate Illinois, and most rural counties offer high speed Internet if not straight up fiber now.

Go to flyover States to see the impact of that money.


Are these instances actually funded by 2021 IIJA BEAD program?

I don’t think Illinois has actually awarded any of that funding to providers to build anything yet. It looks like the original schedule was to start awarding grants this summer after planning process from 2021-2025.

https://dceo.illinois.gov/broadband/bead.html


That's round 4.


If your run was government funded, it was under RDOF


> Personally, I haven't seen much, if anything, actually spent out of Biden's infrastructure bill.

Then you are part of the problem, pull your fingers out of your ears.


So if we build one data center a year, how long will it take to invest 500B? Will Trump still be president for that parade?


Nvidia's data center revenue was $39B last quarter. Between chips and electric/cooling infrastructure, a billion dollars doesn't get you far.

Obviously $500B is a lot of money, but it's not actually an unbelievable amount of money.


The one location will probably be several billion dollars. The $500B initiative is supposed to be spread across 20 or so locations.


It doesn't matter how many locations they spread it over, they aren't spending that much money in under 20 years on chatbots and buggy code writers. Maybe if a massive unforeseen breakthrough comes and breaks us past the wall of diminishing returns we've hit.


Micel mē þynceð þanc, þæt þū gemanst

mǣl-gespreca ealdra.

Wæs þū hāl.


Here's a quote that predates Newton by some centuries:

"We are like dwarfs on the shoulders of giants, so that we can see more than they, and things at a greater distance, not by virtue of any sharpness of sight on our part, or any physical distinction, but because we are carried high and raised up by their giant size." -- John of Salisbury, The Metalogicon (1159)

https://www.oxfordreference.com/display/10.1093/acref/978019...


Thank you for your comment. We appreciate you taking the time to share your thoughts.


It might make more sense to put data centers on the Moon.

It's fairly close, about 1.3 light seconds away. You wouldn't use it for anything realtime, but it would be fine for long AI training jobs.

You could bury the servers underground to shield them from cosmic rays. That would also be good for any people living there.

You could get power from solar panels on peaks near the poles that get light almost all the time. For example, some ridges around Shackleton Crater are sunlit up to ~90% of the time, with short periods of darkness. Use batteries to smooth out the power supply.

For heating and cooling, just use the standard techniques. It's not easy, but it's a solved problem. As a bonus, near the poles, the temperature extremes aren't as bad as at the equator.

You could also sell tickets to tourists. People will pay to see the darndest things.


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

Search: