frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

StageConnect: Behringer protocol is open source

https://github.com/OpenMixerProject/StageConnect
108•jdboyd•5h ago•39 comments

Andrej Karpathy – It will take a decade to work through the issues with agents

https://www.dwarkesh.com/p/andrej-karpathy
797•ctoth•17h ago•739 comments

Ruby Blocks

https://tech.stonecharioteer.com/posts/2025/ruby-blocks/
47•stonecharioteer•3d ago•24 comments

./Watch

https://dotslashwatch.com/
4•shrx•57m ago•0 comments

New Work by Gary Larson

https://www.thefarside.com/new-stuff
261•jkestner•13h ago•58 comments

AMD's Chiplet APU: An Overview of Strix Halo

https://chipsandcheese.com/p/amds-chiplet-apu-an-overview-of-strix
63•zdw•6h ago•14 comments

The early Unix history of chown() being restricted to root

https://utcc.utoronto.ca/~cks/space/blog/unix/ChownRestrictionEarlyHistory
20•kencausey•4d ago•0 comments

The Unix Executable as a Smalltalk Method [pdf]

https://programmingmadecomplicated.wordpress.com/wp-content/uploads/2025/10/onward25-jakubovic.pdf
86•pcfwik•9h ago•8 comments

The pivot

https://www.antipope.org/charlie/blog-static/2025/10/the-pivot-1.html
324•AndrewDucker•15h ago•143 comments

Live Stream from the Namib Desert

https://bookofjoe2.blogspot.com/2025/10/live-stream-from-namib-desert.html
490•surprisetalk•22h ago•91 comments

Exploring PostgreSQL 18's new UUIDv7 support

https://aiven.io/blog/exploring-postgresql-18-new-uuidv7-support
232•s4i•2d ago•173 comments

PlayStation 3 Architecture (2021)

https://www.copetti.org/writings/consoles/playstation-3
149•adamwk•4d ago•37 comments

Claude Skills are awesome, maybe a bigger deal than MCP

https://simonwillison.net/2025/Oct/16/claude-skills/
564•weinzierl•17h ago•285 comments

EVs are depreciating faster than gas-powered cars

https://restofworld.org/2025/ev-depreciation-blusmart-collapse/
356•belter•23h ago•783 comments

WebMCP

https://github.com/jasonjmcghee/WebMCP
84•sanj•12h ago•21 comments

Show HN: ServiceRadar – open-source Network Observability Platform

https://github.com/carverauto/serviceradar
40•carverauto•9h ago•1 comments

4Chan Lawyer publishes Ofcom correspondence

https://alecmuffett.com/article/117792
405•alecmuffett•1d ago•541 comments

Tahoe's Elephant

https://eclecticlight.co/2025/10/12/last-week-on-my-mac-tahoes-elephant/
56•GavinAnderegg•6d ago•36 comments

If the Gumshoe Fits: The Thomas Pynchon Experience

https://www.bookforum.com/print/3202/if-the-gumshoe-fits-62416
34•prismatic•1w ago•0 comments

The Underscore Music Player

https://kottke.org/25/10/the-underscore-music-player
4•tobr•1w ago•0 comments

The Rapper 50 Cent, Adjusted for Inflation

https://50centadjustedforinflation.com/
641•gaws•18h ago•162 comments

Asking AI to build scrapers should be easy right?

https://www.skyvern.com/blog/asking-ai-to-build-scrapers-should-be-easy-right/
110•suchintan•15h ago•50 comments

When if is just a function

https://ryelang.org/blog/posts/if-as-function-blogpost-working-on-it_ver1/
56•soheilpro•3d ago•61 comments

The Wi-Fi Revolution (2003)

https://www.wired.com/2003/05/wifirevolution/
84•Cieplak•6d ago•67 comments

Claude Code vs. Codex: I built a sentiment dashboard from Reddit comments

https://www.aiengineering.report/p/claude-code-vs-codex-sentiment-analysis-reddit
102•waprin•1d ago•46 comments

Cyberpsychology's Influence on Modern Computing

https://cacm.acm.org/research/cyberpsychologys-influence-on-modern-computing/
17•pseudolus•6d ago•3 comments

Researchers Discover the Optimal Way to Optimize

https://www.quantamagazine.org/researchers-discover-the-optimal-way-to-optimize-20251013/
53•jnord•4d ago•11 comments

Amazon’s Ring to partner with Flock

https://techcrunch.com/2025/10/16/amazons-ring-to-partner-with-flock-a-network-of-ai-cameras-used...
521•gman83•1d ago•451 comments

How I bypassed Amazon's Kindle web DRM

https://blog.pixelmelt.dev/kindle-web-drm/
1623•pixelmelt•1d ago•492 comments

MIT physicists improve the precision of atomic clocks

https://news.mit.edu/2025/mit-physicists-improve-atomic-clocks-precision-1008
88•pykello•6d ago•39 comments
Open in hackernews

Ruby Blocks

https://tech.stonecharioteer.com/posts/2025/ruby-blocks/
45•stonecharioteer•3d ago

Comments

stonecharioteer•3d ago
I've been very taken by Ruby and how it uses blocks everywhere! This is an article I wrote just to emphasize that.
pjmlp•1h ago
Have a look at Smalltalk blocks, or FP languages, to see where Ruby's inspiration comes from.
frou_dh•37m ago
An interesting thing about Smalltalk and Ruby blocks is that they aren't just anonymous functions/lambdas, right? i.e. if you 'return' / '^' in a block, it's the context around the block that you return from, not just the block itself? That's what struck me about both of them when I was used to thinking in basic Lisp terms.
stonecharioteer•13m ago
My next post, which is on loops, is about the common stuff with smalltalk as well!
janfoeh•1h ago
I discovered Ruby (through Rails) about twenty years ago on the dot. Coming from Perl and PHP it took me a while, but I remember the moment when I had the same realisation you did.

I still love this language to bits, and it was fun to relive that moment vicariously through someone elses eyes. Thanks for writing it up!

stonecharioteer•12m ago
I'm glad folks are having fun reading this. I want to write a few more articles, particularly dissecting the internals of Ruby and how amazing it feels.
PufPufPuf•1h ago
Take a look at Kotlin, it perfected this idea
pjmlp•4m ago
What Kotlin offers is already present in Scala or other languages from ML linage.
hshdhdhehd•52m ago
Is a block basically a lambda or is there more to it?
simonask•47m ago
They are closures. But Ruby can do interesting and slightly reckless things, like transplanting a closure into a different evaluation scope. It’s very powerful, and also very dangerous in the wrong hands.
hshdhdhehd•42m ago
Sounds a bit like a lisp macro? Or in JS using eval?
somewhereoutth•44m ago
My understanding is that the 'extra thing' is control flow - blocks can force a return in their calling scope. For example a loop that calls a block may be terminated/skipped by a break/continue statement in the block itself. However I'm not a Ruby programmer, so please check my working.
masklinn•35m ago
Assuming that by lambda you mean "an anonymous function"[1], for most intents and purposes they are, except their returns are non-local whereas functions usually have local returns.

However blocks are special forms of the language, unless reified to procs they can only be passed as parameter (not returned), and a method can only take one block. They also have some oddities in how they interact with parameters (unless reified to lambda procs).

[1] because Ruby has something called "lambda procs"

kace91•51m ago
Coming from a language with functions as first class objects, blocks felt a bit limited to me, because it feels as if you almost have functions but not really, and they get inputted by a back door. Used for example to:

let isLarge = a => a>100;

numbers.filter(isLarge)

Blocks let you do the same but without extracting the body as cleanly. Maybe it’s a chronological issue, where Ruby was born at a time when the above wasn’t commonplace?

>When you write 5.times { puts “Hello” }, you don’t think “I’m calling the times method and passing it a block.” You think “I’m doing something 5 times.”

I’m of two minds about this.

On the one hand, I do agree that aesthetically Ruby looks very clean and pleasing. On the other, I always feel like the mental model I have about a language is usually “dirtied” to improve syntax.

The value 5 having a method, and that method being an iterator for its value, is kinda weird in any design sense and doesn’t seem to fix any architectural order you might expect, it’s just there because the “hack” results in pretty text when used.

These magical tricks are everywhere in the language with missing_method and the like, and I guess there’s a divide between programmers’ minds when some go “oh that’s nice” and don’t care how the magic is done, and others are naturally irked by the “clever twists”.

WJW•42m ago
> The value 5 having a method, and that method being an iterator for its value, is kinda weird in any design sense and doesn’t seem to fix any architectural order you might expect, it’s just there because the “hack” results in pretty text when used.

I don't think this is particularly weird, in Ruby at least. The language follows object orientation to its natural conclusion, which is that everything is an object, always. There is no such thing as "just data" in Ruby, because everything is an object. Even things that would just be an `int` in most other languages are actually objects, and so they have methods. The `times` method exists on the Integer classes because doing something exactly an integer number of times happens a lot in practice.

kace91•28m ago
I don’t have an issue with the “everything’s an object” part, because it _is_ consistent, even though it gets a bit trippy when classes are objects as well and they are implementation of a Class class which is an implementation of itself (trickery again!).

The issue is more with this part:

>The `times` method exists on the Integer classes because doing something exactly an integer number of times happens a lot in practice.

It is practical, but it breaks the conceptual model in that it is a hard sell that “times” is a property over the “5” object.

The result is cleaner syntax, I know, but there is something in these choices that still feels continually “hacky/irky” to me.

WJW•3m ago
Perhaps I've been doing Ruby for too long, but it's still not that weird to me. The quantity "5" is very abstract without anything to have "5" of. That is why "5.days" and "5.times" exist, among others. Mathematically it makes just as much sense to start with the amount and add the unit later than it does to start with the unit and add the amount later (ie like `time_to_wait = SECONDS_IN_A_DAY * 5` as you might do in some other languages).
judofyr•41m ago
Blocks are fundamentally different from functions due to the control flow: `return` inside a block will return the outer method, not the block. `break` stops the whole method that was invoked.

This adds some complexity in the language, but it means that it’s far more expressive. In Ruby you can with nothing but Array#each write idiomatic code which reads very similar to other traditional languages with loops and statements.

jhbadger•37m ago
If you are familiar with a true object-oriented language like Smalltalk (rather than the watered-down form of OO in C++, Java, etc.), an integer like 5 having methods makes sense because it (like everything else) is an object. Objects in Ruby aren't just window dressing -- they are its core.
chao-•9m ago
The "aesthetically pleasing" aspect of blocks is not mutually exclusive with real, first-class functions! Ruby is really more functional than that. Ruby has both lambas and method objects (pulled from instances). For example, you can write:

  let isLarge = a => a>100;
as a lambda and call via #call or the shorthand syntax .():

  is_large = ->(a) { a > 100 }
  is_large.call(1000)
  # => true
  is_large.(1000)
  # => true
I find the .() syntax a bit odd, so I prefer #call, but that's a personal choice. Either way, it mixes-and-matches nicely with any class that has a #call method, and so it allows nice polymorphic mixtures of lambdas and of objects/instances that have a method named 'call'. Also very useful for injecting behavior (and mocking behavior in tests).

Additionally, you can even take a reference to a method off of an object, and pass them around as though they are a callable lambda/block:

  class Foo
    def bar = 'baz'
  end

  foo_instance = Foo.new
  callable_bar = foo_instance.method(:bar)
  callable_bar.call
  # => 'baz'
This ability to pull a method off is useful because any method which receives block can also take a "method object" and be passed to any block-receiving method via the "block operator" of '&' (example here is passing an object's method to Array#map as a block):

  class UpcaseCertainLetters
    def initialize(letters_to_upcase)
      @letters_to_upcase = letters_to_upcase
    end

    def format(str)
      str.chars.map do |char| 
        @letters_to_upcase.include?(char) ? char.upcase : char
      end.join
    end
  end

  upcase_vowels = UpcaseCertainLetters.new("aeiuo").method(:format)
  ['foo', 'bar', 'baz'].map(&upcase_vowels)
  # => ['fOO', 'bAr', 'bAz']
This '&' operator is the same as the one that lets you call instance methods by converting a symbol of a method name into a block for an instance method on an object:

  (0..10).map(&:even?)
  # => [true, false, true, false, true, false, true, false, true, false, true]
And doing similar, but with a lambda:

  is_div_five = ->(num) { num % 5 == 0 }
  (0..10).map(&is_div_five)
  # => [true, false, false, false, false, true, false, false, false, false, true]
inopinatus•50m ago
For this audience it may be worth noting that Ruby’s blocks are closures and are passed to methods either anonymously/implicitly or as a named parameter, may be subsequently passed around to any collaborator object, or otherwise deferred/ignored, have the same range of argument arity as methods and lambdas, can even be formed from (and treated similarly to) lambdas, and are thereby fundamental to Ruby’s claim to being a multiparadigm language even as they also betray the Smalltalk roots.

In addition they have nonlocal return semantics, somewhat like a simple continuation, making them ideal for inline iteration and folding, which is how most new Rubyists first encounter them, but also occasionally a source of surprise and confusion, most notably if one mistakenly conflates return with result. Ruby does separately have callcc for more precise control over stack unwinding, although it’s a little known feature.

teaearlgraycold•45m ago
This level of cuteness and obsession with syntax is partly what drives me away from Ruby. A function should just be a function. We don't need to make programming languages look more like English. There are certainly issues with other languages and their verbosity (like with Java). But I don't want to have more ways to do the same thing and worry about how poetic my code reads as English - we should worry how poetic it reads as computer code.

That said, we don't need just one programming language. Perhaps Ruby is easier to learn for those new to programming and we should introduce it to students.

stonecharioteer•34m ago
I think Ruby teaches a sense of style, but I'm not sure that style carries over to other languages. Python was my primary language for 12 years but I'm disappointed in the depth of Knowledge python Devs have. Most barely understand the language or try to. Ruby seems to coax people into coding into a ruby way. I like that.
shevy-java•29m ago
Blocks yield a lot more flexibility to ruby. It was the primary reason why they are so well-appreciated.