frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Compiling a Lisp: Lambda Lifting

https://bernsteinbear.com/blog/compiling-a-lisp-12/
55•azhenley•3h ago•4 comments

Show HN: Reactive: A React Book for the Reluctant – a book written by Claude

https://github.com/cloudstreet-dev/React-is-Awful
19•DavidCanHelp•59m ago•13 comments

Try and

https://ygdp.yale.edu/phenomena/try-and
416•treetalker•12h ago•219 comments

GPT-OSS vs. Qwen3 and a detailed look how things evolved since GPT-2

https://magazine.sebastianraschka.com/p/from-gpt-2-to-gpt-oss-analyzing-the
302•ModelForge•10h ago•56 comments

1910: The year the modern world lost its mind

https://www.derekthompson.org/p/1910-the-year-the-modern-world-lost
181•purgator•4h ago•136 comments

Show HN: Bolt – A super-fast, statically-typed scripting language written in C

https://github.com/Beariish/bolt
140•beariish•7h ago•47 comments

Fight Chat Control

https://fightchatcontrol.eu/
798•tokai•8h ago•229 comments

Show HN: Engineering.fyi – Search across tech engineering blogs in one place

https://engineering.fyi/
282•indiehackerman•12h ago•74 comments

One Million Screenshots

https://onemillionscreenshots.com/?q=random
120•gaws•5h ago•46 comments

Diffusion language models are super data learners

https://jinjieni.notion.site/Diffusion-Language-Models-are-Super-Data-Learners-239d8f03a866800ab196e49928c019ac
140•babelfish•9h ago•10 comments

Creating the Longest Possible Ski Jump in “The Games: Winter Challenge”

https://mrwint.github.io/winter/writeup/writeup2.html
101•alberto-m•3d ago•4 comments

PHP compile time generics: yay or nay?

https://thephp.foundation/blog/2025/08/05/compile-generics/
47•moebrowne•3d ago•14 comments

Battery charge limiter for Apple Silicon MacBook devices

https://github.com/actuallymentor/battery
45•rahimnathwani•3d ago•30 comments

Show HN: A Sinclair ZX81 retro web assembler+simulator

4•andromaton•1h ago•0 comments

Reflections on Soviet Amateur Photography

https://www.publicbooks.org/strangers-in-the-family-album-reflections-on-soviet-amateur-photography/
21•prismatic•3d ago•2 comments

Booting 5000 Erlangs on Ampere One 192-core

https://underjord.io/booting-5000-erlangs-on-ampere-one.html
175•ingve•14h ago•29 comments

Squashing my dumb bugs and why I log build IDs

https://rachelbythebay.com/w/2025/08/03/scope/
10•wglb•3d ago•0 comments

Writing simple tab-completions for Bash and Zsh

https://mill-build.org/blog/14-bash-zsh-completion.html
218•lihaoyi•15h ago•70 comments

Conversations remotely detected from cell phone vibrations, researchers report

https://www.psu.edu/news/engineering/story/conversations-remotely-detected-cell-phone-vibrations-researchers-report
30•giuliomagnifico•7h ago•4 comments

How I code with AI on a budget/free

https://wuu73.org/blog/aiguide1.html
563•indigodaddy•1d ago•188 comments

Abogen – Generate audiobooks from EPUBs, PDFs and text

https://github.com/denizsafak/abogen
278•mzehrer•19h ago•66 comments

Type (YC W23) is hiring a founding engineer to build an AI-native doc editor

https://www.ycombinator.com/companies/type/jobs/1idOunL-founding-product-engineer
1•stewfortier•8h ago

Events

https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Scripting/Events
33•aanthonymax•5h ago•12 comments

ECScape: Understanding IAM Privilege Boundaries in Amazon ECS

https://www.sweet.security/blog/ecscape-understanding-iam-privilege-boundaries-in-amazon-ecs
13•eyberg•4d ago•4 comments

My Dream Productivity Device Is Done – and It's Becoming a Kit [video]

https://www.youtube.com/watch?v=pf3BxNq1cp4
47•surprisetalk•4d ago•38 comments

Inside OS/2 (1987)

https://gitpi.us/article-archive/inside-os2/
102•rbanffy•12h ago•47 comments

Open Lovable

https://github.com/mendableai/open-lovable
142•iamflimflam1•15h ago•42 comments

Flintlock – Create and manage the lifecycle of MicroVMs, backed by containerd

https://github.com/liquidmetal-dev/flintlock
68•Palmik•10h ago•3 comments

Abusing Entra OAuth for fun and access to internal Microsoft applications

https://research.eye.security/consent-and-compromise/
330•the1bernard•1d ago•98 comments

The Framework Desktop is a beast

https://world.hey.com/dhh/the-framework-desktop-is-a-beast-636fb4ff
413•lemonberry•2d ago•383 comments
Open in hackernews

PHP compile time generics: yay or nay?

https://thephp.foundation/blog/2025/08/05/compile-generics/
47•moebrowne•3d ago

Comments

tobinfekkes•3h ago
Can someone smarter than me explain what they mean by "reified generics", "erased generics", and a use case for when to use one over the other?
gloryjulio•2h ago
Example, Java is using erased generics. Once the code is compiled, the generics information is no longer in the bytecode. List<String> becomes List<>. This is called type erasure.

C# is using reified generics where this information is preserved. List<String> is still List<String> after compilation

branko_d•1h ago
And as a consequence, C# can pack the value types directly in the generic data structure, instead of holding references to heap-allocated objects.

This is very important both for cache locality and for minimizing garbage collector pressure.

svieira•1h ago
And Java has been working on Project Valhalla for ~20 years to retrofit the ability to do this to the existing Java language...
PaulGaspardo•51m ago
Incidentally if you do what they're proposing for PHP in Java (where you define a non-generic subclass of a generic type), the actual generic type parameters actually are in the bytecode, and depending on the static type you use to reference it, may or may not be enforced...

   public class StringList extends java.util.ArrayList<String> {
       public static void main(String[] args) throws Exception {
           StringList asStringList = new StringList();
           java.util.ArrayList<Integer> asArrayList = (java.util.ArrayList<Integer>)(Object)asStringList;
           System.out.println("It knows it's an ArrayList<String>: " + java.util.Arrays.toString(((java.lang.reflect.ParameterizedType)asArrayList.getClass().getGenericSuperclass()).getActualTypeArguments()));
           System.out.println("But you can save and store Integers in it:");
           asArrayList.add(42);
           System.out.println(asArrayList.get(0));
           System.out.println(asArrayList.get(0).getClass());
           System.out.println("Unless it's static type is StringArrayList:");
           System.out.println(asStringList.get(0));
       }
   }
That prints out:

   It knows it's an ArrayList<String>: [class java.lang.String]
   But you can save and store Integers in it:
   42
   class java.lang.Integer
   Unless it's static type is StringArrayList:
   Exception in thread "main" java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
    at StringList.main(StringList.java:11)
Gibbon1•2h ago
I'm not smarter than you but.

I believe the terms reified generics and erased generics is the type sweaty donkey ball terminology you get for professional CS academics.

Sticking my neck out further.

Reified generics means the type is available at run time. In C# you can write if(obj.GetType() == typeof(typename))

Erased generics the type information is not available at run time. That's the way Java does it and it kinda sucks.

p1necone•2h ago
Academics invent short names for common (in their field) concepts not because they're 'sweaty' but because if the thing you're going to mention in every second paragraph in a good chunk of the communication you do with other people working on the same topic requires a full sentence to explain you're going to A. get really annoyed at having to type it out all the time and B. probably explain it slightly differently every time and confuse people.

Academic jargon isn't invented to be elitist, it's invented to improve communication.

(of course there's a good chance you understand this already, and you're just making a dumb joke, but I figured I'd explain this anyway for the benefit of everyone reading)

fuzzy_biscuit•2h ago
I don't take issue with the naming but with the names that feel a bit beyond my ken. "Erased" makes sense when explained but not before. "Reified" is a word I simply do not use so it feels like academia run amok.

Regardless, I recognize myself as the point of failure, but those names do strike me as academia speak, though better than some/many. <shrug>

klodolph•20m ago
Another shrug, but part of it is that the PL community (programming language community) is pretty deep into its own jargon that doesn’t have as much overlap as you might think, with other subfields of computer science.

People describe a type system as “not well-founded” or “unsound” and those are specific jabs at the axioms, and people talk about “system F” or “type erasure” or “reification”. Polymorphism can be “ad-hoc” or “parametric”, and type parameters can be invariant, covariant, and contravariant. It’s just a lot of jargon and I think the main reason it’s not intuitive to people outside the right fields is that the actual concepts are mostly unfamiliar.

skissane•2h ago
> Erased generics the type information is not available at run time. That's the way Java does it and it kinda sucks.

To be more precise: in Java, generics on class/method/field declarations are available at runtime via reflection. The issue is that they aren’t available for instances. So a java.util.ArrayList<java.lang.String> instance is indistinguishable at runtime from a java.util.ArrayList<java.lang.Object> instance

twiss•2h ago
I may be missing something about how the PHP compiler/interpreter works, but I don't quite understand why this is apparently feasible to implement:

    class BlogPostRepository extends BaseRepository<BlogPost> { ... }
    $repo = new BlogPostRepository();
but the following would be very hard:

    $repo = new Repository<BlogPost>();
They write that the latter would need runtime support, instead of only compile time support. But why couldn't the latter be (compile time) syntactic sugar for the former, so to speak?

(As long as you don't allow the generic parameter to be dynamic / unknown at compile time, of course.)

jasone•1h ago
The former merely exposes a `BlogPostRepository` class. The latter requires some mechanism for creating a generic object of concrete type, which is a lot bigger change to the implementation. Does each parametrized generic type have its own implementation? Or does each object have sufficient RTTI to dynamically dispatch? And what are the implications for module API data structures? Etc. In other words, this limitation avoids tremendously disruptive implementation impacts. Not pretty, but we're talking PHP here anyway. ;-)
SoftTalker•1h ago
In the sense of an affirmative vote, the proper word is "yea."
calvinmorrison•39m ago
write PHP a lot. every day.

I wish we had typed arrays. Totally not gonna happen, theres been RFCs but I have enough boilerplate classes that are like

Class Option Class Options implements Iterator, countable, etc.

Options[0], Options[1], Options[2]

or Options->getOption('some.option.something');

A lot of wrapper stuff like that is semi tedious, the implementation can vary wildly.

Also because a lot of times in php you start with a generic array and decide you need structure around it so you implement a class, then you need an array of class,

Not to mention a bunch of WSDLs that autogenerate ArrayOfString classes...