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

Then there’s perl, which doesn’t free at all.

Perl frees memory. It uses refcounting, so you need to break heap cycles or it will leak.

(99% of the time, I find this less problematic than Java’s approach, fwiw).


Unless this has changed recently, perl doesn't free memory to the kernel, only within its own process/vm.

Freedom is overrated... :P

doesn't java also?

I heard that was a common complaint for minecraft


Minecraft for somewhat silly reasons was largely stuck using Java8 for ~a decade longer than it should have which meant that it was using some fairly outdated GC algorithms.

"silly reasons" being Java breaking backwards compatibility

decade seems a usual timescale for that, considering f.e. python 2->3


So much software was stuck on Java 8 and for so long that some of the better GC algorithms got backported to it.

What do you mean - if Java returns memory to the OS? Which one - Java heap of the malloc/free by the JVM?

Java is pretty greedy with the memory it claims. Especially historically it was pretty hard to get the JVM to release memory back to the OS.

To an outsider, that looks like the JVM heap just steadily growing, which is easy to mistake for a memory leak.


> Especially historically it was pretty hard to get the JVM to release memory back to the OS.

This feels like a huge understatement. I still have some PTSD around when I did Java professionally between like 2005 and 2014.

The early part of that was particularly horrible.


Java has a quite strict max heap setting, it's very uncommon to let it allocate up to 25% of the system memory (the default). It won't grow past that point, though.

Baring bugs/native leaks - Java has a very predictable memory allocation.


we aren't talking about allocation, tho

we are talking about DEallocation


it's a reply to:

"To an outsider, that looks like the JVM heap just steadily growing, which is easy to mistake for a memory leak."

I cut the part that it's possible to make JVM return memory heap after compaction but usually it's not done, i.e. if something grew once, it's likely to do it again.


This only really ends up being a problem on windows. On systems with proper virtual memory setups, the cost of unused memory is very low (since the the OS can just page it out)

Unfortunately, the JVM and collectors like the JVM's plays really bad with virtual memory. (Actually, G1 might play better. Everything else does not).

The issue is that through the standard course of a JVM application running, every allocated page will ultimately be touched. The JVM fills up new gen, runs a minor collection, moves old objects to old gen, and continues until old gen gets filled. When old gen is filled, a major collection is triggered and all the live objects get moved around in memory.

This natural action of the JVM means you'll see a sawtooth of used memory in a properly running JVM where the peak of the sawtooth occasionally hits the memory maximum, which in turn causes the used memory to plummet.


Depends on which JVM, PTC and Aicas do alright with their real time GCs for embedded deployment.

I've never really used anything other than the OpenJDK and Azuls.

How does PTC and Aicas does GC? Is it ref counted? I'm guessing they aren't doing moving collectors.


They are real time GCs, nothing to do with refcounting.

One of the founding members of Aicas is the author of "Hard Realtime Garbage Collection in Modern Object Oriented Programming Languages" book, which was done as part of his PhD.


For video games it is pretty bad, because reading back a page from disk containing "freed" (from the application perspective, but not returned to the OS) junk you don't care about is significantly slower than the OS just handing you a fresh one. A 10-20ms delay is a noticeable stutter and even on an SSD that's only a handful of round-trips.

Games today should be using ZGC.

There's a lot of bad tuning guides for minecraft that should be completely ignored and thrown in the trash. The only GC setting you need for it is `-XX:+UseZGC`

For example, a number of the minecraft golden guides I've seen will suggest things like setting pause targets but also survivor space sizes. The thing is, the pause target is disabled when you start playing with survivor space sizes.


Overall if java hits the swap, it's a bad case. Windows is a like special beast when it comes to 'swapping', even if you don't truly needed it. On linux all (server) services run with swapoff.

Not used Windows Server that much?

Native apps are where power users and other non-developers can do programming. The type of things that an engineer who lives in the terminal might make a CLI or TUI for, an accountant or project manager might want to do with a GUI. This is where VB6 and VBA lived, probably also HyperCard. Web tech has too much complexity for that.

> Web tech has too much complexity for that.

Too much complexity like checks notes Google Sheets, VS Code, Notion.


None of which were made by accountants. They were instead made by engineers who have experience and training in dealing with complex software systems.


People will often write about something that worked for them, and from that pull out abstractions they believe are generalised and universal. They rarely are.

Organisational patterns that work for startups rapidly iterating to find product market fit won’t work well for a consultancy building a better defined product for a single client, or a corpo IT department trying to shoehorn a new distribution channel through a 30 year old logistics system.

A team of experienced engineers who know the problem domain and have worked together for years needs different organisational structures than a team of new hires and grads. A team of introverted hermits and a team of extroverts will function differently regardless of organisational structure.

You need to have some idea of where ideas work and don’t work before you can design the ones needed for your specific situation.


I think the observed feminisation isn't a causal factor, but instead shares a causal factor - that every space must now accept everyone. This causes a few problems.

0. One of the ideas that has tagged along with inclusion has been changing from an input focus ("e.g. No girls allowed in treehouse!") to an output focus (Fewer girls than boys are in the treehouse). In the input focused model, you want to change the rule to stop excluding girls. In the output focused model you also need to change the treehouse to be more attractive to girls. From this, any 'deviant' interests that happen to be gendered (or racial, cultural, etc) get suppressed in the name of creating inclusive outcomes.

1. Most humans have a natural urge to conform to those around us, some just experience it stronger or weaker than others. When 'deviants' are included in a non-deviant space, their deviant tendencies face a subtle yet strong conformity pressure that wouldn't be felt if they were excluded entirely.

2. 'Deviants' being accepted more widely means they don't need to create or find their own spaces. Hence there are fewer spaces where the deviation is locally normal, which would allow the conformist pressure to enhance and refine the deviation.


> that every space must now accept everyone

Okay, this is good answer here because this is more of what I was after. I would initially lay this effect exclusively at the feet of feminism, but I agree now that there are a lot of other movements that could be put into that slot as well.

If we could keep the input focus gains of feminism/$movement while identifying/losing the output-focus overreaches of $movement, I think we would all be better off. Moderation is the key.

Politics jumps in to find that level of moderation, and I've already used all of my 'stir the HN pot' tokens for this month so I will leave further discussion there alone.

Thanks for a good comment that expands the discussion further in the direction I wanted to go but couldn't articulate in my post.


You mentioned restrictions around sending money, but not restrictions on receiving money. If you put obligations on the banks receiving payments to refund scam victims, those banks will have incentive to stop people using their services to conduct scams. Basically, unusual payments get stopped or delayed until the bank can confirm their own customer isn’t running a scam, identities haven’t been stolen to open accounts, etc.


It wasn't just storage. In the 90s, most servers were single core. Databases already had network interfaces so they could be shared by non-web applications running on desktops, and so were the natural place to split a website over multiple machines. This turned into the received wisdom of always putting your database on a separate machine, despite processing power and storage latency improving so much since the 486 and pentium days that network overhead dominated response times.


We use invisible light to draw patterns on crystals to control the power of lightning. Definitely magic.


Don't forget the cavernous structures which people are forbidden to enter, buzzing with the activity of objects controlled by those enchanted crystals, like the magic brooms in Fantasia, performing myriad arcane rituals with rare and exotic materials to make more enchanted crystals.


And the high priests guarding the knowledge.


They perform elaborate cleansing rituals on any item brought into the crystal-writing room. When they enter, they wear special clothing, lest the impurities of the outside world taint the crystals.


And the scribes designing the incantations using magical tools, ever more complex, eagerly working towards stronger and faster magic crystals


Those magical tools being self-referential incantations written in the weird and decidedly non-human language of the crystals themselves, containing deep magic [0] derived from the secrets of life itself [1] exploited to solve problems of intractable complexity in creating the next set of incantations.

Disturbingly, using the magical tool twice on the same incantation never produces exactly the same result.

0: https://www.catb.org/jargon/html/D/deep-magic.html

1: https://en.wikipedia.org/wiki/Evolutionary_algorithm


Ah yes, the sandbenders. [0]

0: http://catb.org/jargon/html/S/sandbender.html


This is also the reason perl was used before python began to dominate. It was installed everywhere before python was installed everywhere.


Pre-covid, the real estate conspiracy was that management was pushing for smaller and more crowded open offices so that they would spend less.


Maybe the books that they're trying to market aren't books that kids want to read. There are a couple of quotes that point to that:

> Connor was more blunt: “Maybe you think a book about a school shooting is really important,” she said, “but kids want to read a fun book. That’s what kids want today—they want to have fun.”

> But if you’re a new author who’s written a quiet, issue-oriented debut, “you might have to think about adapting, in a way.”

> Eberly, the book agent, doesn’t think the supply of serious, “award-winning” books will dry up. “Knowing the editors that I sell to, those are the types of books they want to shepherd into the world.”

Maybe kids would rather read fun adventure stories rather than the issue-driven stories that adults are pushing on them.


I think this is a big part of the problem. Publishers are looking for the next Harry Potter as if they were Y Combinator picking startups based on who's most likely to become the next unicorn.


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

Search: