HNHacker News
TopNewBestAskShowJobs

dmux

1,283 karma · joined July 25, 2013

submissionscomments
dmux··on Lowtype: Elegant Types in Ruby
>These runtime typing efforts look nicer than Sorbet but, as far as I can see, you still have to have complete test coverage to trigger runtime checks if you want to spot correctness issues before you deploy into production.

I think you're right, and if that's the case, aren't these libraries (Lowtype, Literal) more akin to Design by Contract mechanisms?

dmux··on Fifty Shades of OOP
Yes, you could also build and deploy a Smalltalk system, but my point is that the “build & deploy” approach (to me) seems antithetical to the message passing and late-binding paradigms. To use another example, it seems like you lose a lot of the benefits of Common Lisp via Slime (hot code reloading) if you deploy your Common Lisp app to a short-lived, ephemeral environment.
dmux··on Fifty Shades of OOP
Regarding Message Passing and Late-binding, I think it's important to take into account that Alan Kay was working on Smalltalk -- a system that was image based; a system where you could change things as it was running. I think that message passing and late-binding are often championed but then sort of fall flat given standard deployment techniques: build & deploy (often to a ephemeral runtime / container).
dmux··on Optimizing Ruby performance: Observations from real-world services
Here's another thread talking about IO- vs CPU-Bound Rails apps from 10 months ago: https://news.ycombinator.com/item?id=42820419
dmux··on Ruby 4.0.0 Preview2
I inherited a project where this was taken to the extreme. We have a class that's used to calculate final pricing taking into account discounts, coupons, shipping fees (or free shipping). Each one of those values was implemented as methods but then we have a call like: method_a - method_b + method_c, but it turns out, method_a may be adding shipping_cost for it to then be subtracted out in method_b. We ended up refactoring this and removing all the needless methods and just have a simple inline calculation. Definitely not "clean".
dmux··on Jeff Bezos creates A.I. startup where he will be co-chief executive
Interesting. If one were to legally change their name to their desired DBA name, I wonder how that would go over.
dmux··on Shutdown with no clear end poses new economic threat
https://archive.is/88Lla
dmux··on Windows 7 marketshare jumps to nearly 10% as Windows 10 support is about to end
I'm not sure if you've tried it or not, but sdkman.io is a really handy JVM ecosystem environment manager that makes getting Java (and other JVM langs) really easy to install and switch between.
dmux··on Windows 10 resists its end: usage share climbs while Windows 11's falls
Windows 2000 was really solid IMO. I have really fond memories of learning and using it at school back around that time.
dmux··on Yet Another TypeSafe and Generic Programming Candidate for C
>Disclaimer: This library is not related to the MISRA C standard or guidelines. The name "MisraStdC" comes from the author's name, Siddharth Mishra, who is commonly known as "Misra" among friends.

Why include the letters Std then? This seems like a purposeful typo-squatting effort and definitely makes me suspicious.

dmux··on Red: A programming language inspired by REBOL
A large part of flightaware.com’s systems were written in TCL.
dmux··on Pony: An actor-model, capabilities-secure, high-performance programming language
I think this is the first time I've seen a github badge (with number of stars) that's for the website itself and not the language repo!
dmux··on Ask HN: If types are good why shouldn't every var be a custom type?
I've heard this referred to as "primitive obsession." You can find a lot of writing that covers the pros and cons.
dmux··on Psychoacoustic and archeoacoustic nature of ancient Aztec skull whistles
>If you wanted a scream you could just make one yourself.

I would personally find it really difficult to produce a scream that replicated the sound of abject terror produced by the whistle.

dmux··on Butterflies accumulate static electricity to attract pollen without contact
This article strengthens my belief that butterflies are some of the most metal animals out there. Flying around at 25mph? Metal. Drinking tears? Metal. Electrostatically charged?! Metal.
dmux··on Mastering Ruby Code Navigation: Ruby LSP Enhancements in the First Half of 2024
>In terms of convention over configuration, Ruby's metaprogramming is crucial for the name-based class conventions that make Rails so convenient. For instance, if you have a class User with the attribute name, at runtime Rails dynamically adds methods to the User class, allowing you to do things like User.find_by_name("Alice"). Rails uses Ruby's metaprogramming capabilities to accomplish this.

This can be accomplished in statically typed languages too. For example, Java has an ORM called Cayenne that generates models based on database tables. You can get similar functionality and ensure you're not accidentally calling something like `find_by_nam`

dmux··on Ruby methods are colorless

    def log_then_get(url, context)
      puts "Requesting #{url}..."
      get(url, context)
    end
 
    def get(uri, context)
      response = Net::HTTP.get(uri)
      puts caller(0).join("\n")
      response
    end
 
    def get_http_thread(url)
      Thread.new do
        log_then_get(URI(url), Thread.current)
      end
    end

Good example of the downsides of dynamic typing:

1) get_http_thread takes a url (String) and converts it to a URI object

2) log_then_get defines its parameter as `url`, but really its expecting a URI object

3) get defines its parameter as `uri`, but we're passing it an argument called `url` from within log_then_get.

Lots of traps readily awaiting an unsuspecting programmer or newcomer to a project that contains code like this.

dmux··on Is Clear Air Turbulence becoming more common?
If you've ever sailed, a more apt analogy would be heeling over extensively (and potentially capsizing) due to a gale. You could be sailing along just fine and then all of a sudden you're overpowered. A sail, after all (at least when sailing towards the wind) acts just like a wing of a plane.
dmux··on Is Clear Air Turbulence becoming more common?
>The Boeing 707 jetliner involved disintegrated mid-air

I'm guessing their use of "disintegrated" there is supposed to be taken literally as dis-integrated, but upon first read, I took it for its more colloquial meaning (which to me is closer to pulverized, turn to dust, dissolve etc).

dmux··on Man creatively sneaks onto Delta flight, but gets caught
I would think adding a simple timestamp to the message would be helpful instead of just a Boolean “has been scanned” type of flag. With the timestamp you could at least say something like “this ticket was previously scanned at <time>.” Then from that message you would know whether it was an accidental double scan (the time being within seconds of now) or whether some time had passed, which I would hope would raise an eyebrow.

Edit: I have no idea what the actual messaging looks like. It could indeed have a timestamp. I’m just hypothesizing.

dmux··on Rye: Homoiconic dynamic programming language with some new ideas
Likewise in Tcl where blocks can either be sent quoted (using {}) or unquoted (using “”). In the latter, variables and procs will have a round of substitution performed before being passed to the proc.
dmux··on Spreadsheets are all you need
It's since changed, but for a while the band [Portugal. The Man]'s website was just a Google Sheet!

https://web.archive.org/web/20230831003431/https://www.portu...

dmux··on The Best Essay
>It is the kind of writing that seems insightful at first glance because it restates somewhat obvious things in new ways. I'm not saying that his arguments are 'wrong' persay, it's just that it's not particularly original or interesting.

You're spot on. Looking to this very comment section, you have people calling this line out as being enlightening:

>While breadth comes from reading and talking and seeing, depth comes from doing.

I would hope this is self evident to anyone who has ever tried _anything_.

dmux··on I'm Betting on Call-by-Push-Value
I’m not familiar with the theoretical aspects, but what you’re describing reminds me of Tcl: arguments to procedures can be passed unevaluated (quoted, using Tcl terms) and the procedure itself can alter the caller’s environment via uplevel.
dmux··on Why my code isn't in TypeScript
>Being presented with lots of double colons, <T> when I'm not sure what T refers to, a wall of interfaces and more is an upfront cost on me, the reader.

I find this an odd point to be arguing given that in a dynamically typed language you have no idea what _anything_ refers to.

dmux··on Ask HN: What is the "Ruby on Rails" of the Node world?
Statically typed languages have vastly improved since Ruby and Rails came on the scene. Your fizzBuzz example can be done in a type-safe way in a variety of languages: C#, Kotlin, Dart, Swift, Nim(?).
dmux··on So long, and thanks for all the bytes
I've just inherited a Rails project that's been in development for the last 10 years. I know one of Ruby's mantras is something along the lines of "Optimized for Programmer Happiness," but after working with it for a couple of months, I have to ask "who is the programmer there?," certainly not the maintenance programmer. If code is read X times more than its written, then aiding comprehension is of the utmost importance. I'm not a huge fan of Go, but I do have to say that its readability greatly improves the developer-experience.
dmux··on XL: An Extensible Programming Language
http://lambda-the-ultimate.org/ is one of the only PL-centric websites with discussion I can think of.
dmux··on Mushroom Sprouting Out of a Living Frog
Thanks for the link; I hadn’t heard of iNaturalist before and I enjoyed reading the discussion. This particular comment gave me a laugh:

> Would you also deny that a fungus could never fruit the the toenail of a human that spent a lot of time in the Amazon Rainforest?

dmux··on Researchers discover physical cause of long Covid tiredness
We could use C data types as inspiration: long covid, and longlong covid.
← PreviousPage 2 of 14Next →