Hacker Newsnew | past | comments | ask | show | jobs | submit | draw_down's commentslogin

I’ve worked in two places now with Ruby Sorbet servers. Ruby always drives me nuts how things are just in-scope and we don’t know why or where they came from.

I certainly wouldn’t want to go back to working in dynamic languages without typing on top. That takes too much brain power, I’m too old for that now.

I would say Sorbet seems more “basic” than something like Typescript. It handles function calls matching signatures, potential nulls, making sure properties actually exist, that kind of thing. Whereas TS can get quite abstract, and at times you’re fighting to convince it that a value actually is the type you say it is.

TS is very powerful and expressive, to the point that it’s possible to do computation within type code. I’m not convinced I always need that power, or that it’s always more help than hindrance.


> Ruby always drives me nuts how things are just in-scope and we don’t know why or where they came from.

irb(main):005:0> Foo.new.method(:bar).source_location => ["tmp/test.rb", 5]


You appear to be shadow banned. Letting you know since I didn't see anything egregious on a quick scan. Maybe contact HN and plead your case.

I vouched for your reply below, and to answer in the meantime:

Yes, it's runtime, but that only matters if your code can't be initialized without unacceptable side effects.

In which case you don't have a functioning test suite either, and have much larger problems.

Otherwise, just load the code you struggle to figure out into irb, or pry, or a simple test script, and print out source-location.

If that is impossible (aside from the fact that codebase is broken beyond all reason), the marginally harder solution is to use ruby-lsp[1] and look up the definitions.

This is only hard if you insist on refusing to use the available - and built in, in the case of source_location - tooling.

1: https://shopify.github.io/ruby-lsp/


> I certainly wouldn’t want to go back to working in dynamic languages without typing on top. That takes too much brain power, I’m too old for that now.

> and at times you’re fighting to convince it that a value actually is the type you say it is.

Might just be allocating that brain power to the same task but calling it a different thing.


Oops you forgot this part:

> Here we account for the influence of three main natural variability factors: El Niño, volcanism, and solar variation.

Whoops! Whoopsies! Oopsy doodles!


Indeed, if only it were as simple as “{n} rows”.

I18n / l10n is full of things like this, important details that couldn’t be more boring or fiddly to implement.


Which is why Windows UI is littered with language like "number of rows: {n}".


Makes it easier to parse by automatic tools too


> Indeed, if only it were as simple as “{n} rows”.

How long till we just have a LLM do it on the fly?


If I may suggest two artists besides the great Fela Kuti: William Onyeabor (try "Tomorrow") and Dizzy K Falola (try "Sweet Music").


William Onyeabor got me into African fusion. He's definitely one of the most interesting characters on the scene and the synthesizers in his music were some of the best. RIP.


I didn’t see the source graph thing, but the Grab episode always seemed odd to me. He wrote these breathless rants about how epic it all was, then quit after a year or so. I just figured the long hours eventually stopped being awesome.


Man we better hope the solution to that problem is working code. Otherwise we better start working the fryers or something.


From what I can tell, he was insufficiently enthusiastic about immigration. And, you know. You can't be saying that stuff.


I can't agree, it's been nice to have these people off Twitter. They don't contribute much and their shrillness got really old.


Yeah. I don’t want to see “wow look at how pretty this markup is”. I want to see “look how flexible and easy to change this is, without redoing everything”.

If you’re not talking about change, the other stuff is pointless.


I gather by the mention of fascism that the correspondent is a bad person. So it makes sense that Russell told him to get bent. But, that is all that he's really saying here.

I can only guess this is noteworthy due to the parties corresponding because it isn't very interesting outside of that.


Have you been reading the news? Perhaps about someone who engaged people in debate while holding extreme views? In the process, they gained some measure of credit amongst people with less radical views, merely for the act of having conversations. Except in this case the debates were not with Bertrand Russell, but with 18 year old college freshman.

I understood the posting to be a subtweet-style comment on that.


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

Search: