Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    33comments
  2. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    141comments
  3. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    296comments
  4. “The Secret Life of Circuits” is here(coredump.cx ↗)
    31comments
  5. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    499comments
  6. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    103comments
  7. San Francisco Onion Futures Company(onionfutures.com ↗)
    88comments
  8. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    139comments
  9. Communication by means of modulated Johnson noise(pnas.org ↗)
    12comments
  10. Cloudflare Quick Tunnels(cloudflare.com ↗)
    294comments
  11. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    3comments
  12. How to Write with an LLM(sockpuppet.org ↗)
    352comments
  13. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    20comments
  14. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    1comments
  15. SDCC – Small Device C Compiler(sourceforge.net ↗)
    20comments
  16. Saving another 100TB of RAM(cloudflare.com ↗)
    85comments
  17. Science Is Open Software(jepedersen.dk ↗)
    45comments
  18. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    102comments
  19. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    42comments
  20. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    5comments
  21. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  22. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    113comments
  23. OpenJev(openjev.com ↗)
    273comments
  24. Goroutine Leak Profiles(go.dev ↗)
    6comments
  25. Show HN: I wrote a custom assembler for CHIP-8 in C++(github.com/tackx ↗)
    3comments
  26. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    89comments
  27. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    76comments
  28. Veronese's Dogs(publicdomainreview.org ↗)
    2comments
  29. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    94comments
  30. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    16comments

A small (and objective) taste of Objective-Smalltalk

48 pointsby 7y agoblog.metaobject.com
10 comments
7y agoHN ↗

An interesting project. And the first that I know of that integrates something like Smalltalk directly into a Unix environment.

7y agoHN ↗

I like the syntax.

I also like the interesting direction you went with pattern matching selectors. That is a nice change and quite different from your typical Smalltalk or Objc code.

7y agoHN ↗

I briefly thought about the beginnings of this after looking at KVC. I pondered the dots vs slashes question, what a query would look like, and whether every object in a process could have a name. Fun to think about, but that is as far as I got. You have taken this much further.

7y agoHN ↗

:-)

The problem with something like KVC is that you then have to lift everything into this new "KVC language", which is embedded as strings in the main programming language.

Which then gets you to dictionary-oriented programming (Xcode, I'm looking at you) and that's really quite painful. While doing performance work at Apple, I though about forming an association called DUKE, Developers United against Keyed Everything :-)

On the other hand, there obviously is a lot of benefit to KVC and KVC-like mechanisms, because we keep re-inventing them everywhere and all the time. I myself had done so with the BBC project that led me to in-process REST. And at one point it just clicked: language support for URIs, and URIs really are universal, so we don't need any other identifiers.

7y agoHN ↗

Huh, this is an interesting solution. When I started reading this post and took a look at the syntax, I had expected some sort of sugar that looked like Swift's @dynamicCallable where the "selector" would be passed in as a string and you'd parse it at runtime. This way, you don't have a specify an "endpoint" for every operation, but I guess you lose some compile-time checking?

7y agoHN ↗

Thanks!

Scheme handlers (or stores[1]) were initially implemented that way. There is a protocol of methods taking references, and you implement these methods, for example -objectForReference:, with, as you write, runtime parsing of the reference (often, but not necessarily strings).

Having implemented a good number of stores[2] and scheme handlers[3] that way, I can tell you it gets old quick. :-)

Given the emphasis I put on Polymorphic Identifiers in Objective-Smalltalk, it was obvious that I needed better language support for scheme-handlers, generalising the "properties" concept found in many languages now (Objective-C, C#, Swift, Python) with path- and pattern-matching as found in various REST toolkits was one of those in-the-shower epiphanies.

The patterns ( /:table/count ) mean that you don't actually have to have a separate endpoint for each path, you can group semantically related paths as you wish. There is also a wildcard pattern (the asterisk) if you want to just match everything beyond that. So for example:

   /property/* { |= { 3.} }

Returns the number "3" for all paths prefixed by "/property".

   /property/*:path { |= {  path. }  }}

Returns the remainder of the path (or you can use it for your own custom matching).

[1] https://github.com/mpw/MPWFoundation/blob/master/Documentati...

[2] https://github.com/mpw/MPWFoundation/tree/master/Stores.subp...

[3] https://github.com/mpw/Objective-Smalltalk/tree/master/Schem...

7y agoHN ↗

Interesting, I will have to try it out myself when I get some free time. While I don't know Smalltalk very well, from the perspective of an Objective-C developer the way you have designed the project's features is quite fascinating.

7y agoHN ↗

don't know Smalltalk very well

It's just "Objective-C without the C". Except for real.

Mostly just leave out the square brackets and enjoy the unified syntax.

perspective of an Objective-C developer

That's my perspective :-) Have been programming in Objective-C for well over 30 years now.

I actually started pre-NeXT with my own pre-processor and runtime, had a C compiler and read a lot about OO and really wanted to program that way. Objective-C seemed achievable, and it was.