News for hackers. Stuff that matters.
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by anonova on Thursday June 20, 2019 @03:34PM (#20236483)
> To enable static checking with srb, add this line (called a sigil) to the top of your Ruby file:

> # typed: true

Isn't this called a directive/pragma? A sigil is a symbol on a name.

Either way, I'm excited to see this finally out after seeing the past presentations on it.

Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by ptarjan on Thursday June 20, 2019 @03:37PM (#20236521)
Thanks for pointing that out. It can be called all of those. We liked sigil from its connotation:

> Google defines sigil as, “an inscribed or painted symbol considered to have magical power,” and we like to think of types as pretty magical

https://sorbet.org/docs/static#fn1

Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by dochtman on Thursday June 20, 2019 @03:50PM (#20236656)
That's a pretty unintuitive use, since "sigil" is more commonly used (in programming languages) as a single symbol, as in a non-alphanumeric character that's used as some kind of syntax.

https://en.wikipedia.org/wiki/Sigil_(computer_programming)

Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by sdegutis on Thursday June 20, 2019 @04:11PM (#20236847)
Right so the $ in PHP or @ in Perl would be a sigil, (and even the $ and % in QBasic, am I dating myself?) and the # in this example and all C code and some Swift code would be a pragma. Seems pretty cut and dry.
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by e12e on Saturday June 22, 2019 @03:40PM (#20251338)
And the $ and @ in ruby...
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by sdegutis on Thursday June 20, 2019 @04:18PM (#20236905)
I remember there was this CEO once who was new to the software industry and was looking for a word to describe non-small-business customers. When people suggested "Enterprise", he instantly dismissed it, and when they insisted this is already the word we all use to mean this, he actually opened the dictionary to prove that it wasn't quite accurate. What I took from this is that, when cultures or conventions already have momentum, sometimes you just have to go with it. This is the same reason I don't like Go.
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by chessturk on Thursday June 20, 2019 @07:28PM (#20238479)
How does this relate to Go? That flew over my head.
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by sdegutis on Friday June 21, 2019 @10:30AM (#20242779)
They throw every convention out the window and act like they have a true greenfield audience. They don't even allow [variable, Class, CONSTANT] convention, they don't follow the convention of letting devs choose their own project location, and a lot more.
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by fouc on Thursday June 20, 2019 @09:27PM (#20239101)
Could be a reference to Go choosing to use different words for similar concepts that exist in other languages like C++? I'm not familiar enough to think of examples though.
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by weeksie on Thursday June 20, 2019 @06:53PM (#20238216)
Bummer. That kind of name overloading has the potential to be needlessly confusing down the line. "Sigils, I mean well, they're like pragmas but in Sorbet we call them sigils." [x a billion]

Now's the time to fix that stuff.

(In any case, I'm quite keen to start playing with sorbet, looks great!)

Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by fouc on Thursday June 20, 2019 @09:23PM (#20239084)

  test/test_corpus.cc
  364:        auto checkPragma = [&](string ext) {
  368:                    << "Missing `# typed:` pragma. Sources with ." << ext << ".exp files must specify # typed:";
  377:            checkPragma("cfg");
A quick look at the source shows that it may have been called pragma at one point.

EDIT: I'm guessing "sigil" was chosen because it's closely matching the "signatures" or Sigil.sig method name?

Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by ptarjan on Friday June 21, 2019 @02:58AM (#20240494)
Nice spelunking! Yeah, this word means nothing really. Sigil, pragma, directive, typed comment, whatever. Feel free to call it "dohicky" if you'd like.
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by e12e on Saturday June 22, 2019 @03:38PM (#20251325)
Ruby has perl-like sigils, eg: @i_am_instance_var, $i_am_global. Additionally, one might consider array literals sigil-like (like %w[a b c d e f g]).

https://ruby-doc.org/docs/ruby-doc-bundle/UsersGuide/rg/vari...

Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by cperciva on Thursday June 20, 2019 @04:39PM (#20237117)
The terms all overlap a bit, but I would interpret "directive" or "pragma" to indicate that it's conveying meaning to the Ruby interpreter. This is exactly the opposite -- it's a comment as far as the Ruby language is concerned while conveying meaning to an external tool.