Hacker News new | past | comments | ask | show | jobs | submit | dmux's comments login

I've heard this referred to as "primitive obsession." You can find a lot of writing that covers the pros and cons.


>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.


Maybe if you tried out of the blue, but if there was a cultural incentive to practice you could probably learn to do it fairly easily.


This sound seems easier to produce with an instrument than with training. It's like a half-human, half-beast, raspy, very loud AAAAAAAAAH! Takes much less training to use the whistle properly than to imitate a signature scream perfectly.


My abject terror scream is a last chance for comedy.


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.


You can add to the list the colors of their wings, rendered by a complex nanostructure that is triply periodic [1].

[1]: https://math.ucr.edu/home/baez/butterfly.html


>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`


ActiveRecord doesn't generate models based on database tables, it uses conventions on table and attribute names along with Ruby's metaprogramming capabilities to define behaviour on models automatically. From my understanding, Cayenne requires manual mapping of the database to your models, which is done via XML files that are either handwritten or generated by their GUI application and have to be regenerated on every database change. That's a far cry from the ease of use of ActiveRecord. How you value that ease of use versus your desire for static typing is up to you, but they’re not comparable from a functionality point of view.

And like I said above while you might be able to recreate some of Rails' functionality in other languages, you wouldn't be able to replicate all of it with the same fluidity and readability that you have in Rails


    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.


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.


>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).


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.


Even that’s going to have many more false positives and be annoying which will cause the attendants to be tempted to hit the “it’s fine” button.

For example, I suspect a decent number are couples/families that print multiple copies of boarding passes and two accidentally try to use the same one.


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.


Rebol (where Rye took this from) is many times associated with Tcl. I've heard good things about it, but haven't really tried it yet.


TCL is kinda similar to Rebol in some ways but in other ways it's the opposite of Rebol, because in TCL everything is a string (although it can ALSO have another type, thanks to clever shenanigans). (You probably knew this!)


I heard this "everything is a string" line many times abot Tcl and it sounded a little unusual, but I havent delved deep enogh in tcl to see what it really meant and brought. I will.


everything has a string rep available. It used to be that every thing was also represented literally by a string. So, for pedagogical purposes, a value 1 would be "1", and to do math, Tcl would do a strtol(val_storage), with the obvious performance implications.

The way things are done now (and have been for a long time), is that values are stored in a

    struct Tcl_Obj{
      int refCount; // objs can be shared
      int myType; // indicates whether currently a long, double, etc
      long longVal;
      double dblVal;
      [...]
      char *stringRep;
      int len;
    }
...in fact, the Tcl_Obj is more sophisticated than this, but for demonstration purposes this is fine.

So "native" (eg: longVal) values are used when appropriate, no marshalling back/forth between strings, but the string rep is always available (can be generated), because that's what Tcl promises: everything is representable as a string. This is what brings the homoiconicity to Tcl - logically it's just passing text tokens around, and emitting text tokens. Internally, again, more sophisticated, but you get the point.


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...


Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: