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

Here it is:

https://github.com/sorbet/sorbet/blob/master/gems/sorbet-run...

As you'll notice, `sig` doesn't actually do anything.


So....then....how does Sorbet use the type signature provided to sig?


Sorbet has two components, broadly speaking: the typechecker, which is a standalone application, and the runtime, which is a Ruby gem. The typechecker can parse Ruby code and find the sig blocks in the code to extract type information from them, and it then can use this type information to perform type-checking without ever loading a Ruby interpreter, to say nothing of the actual Ruby code in question. This is intended to happen in a CI pass or a pre-processing step, but it is entirely offline.

On the other hand, when you run your code, the sig blocks may or may not be used. There's a lot of machinery in https://github.com/sorbet/sorbet/blob/master/gems/sorbet-run... that handles understanding what a sig means and installing a wrapped version of a method that does type-checking on entry and exit. The intention is that the standalone sorbet executable should be used during development, but it can't catch every error, so the runtime system will double-check types at runtime, which is especially helpful when some parts of your code are typed and other parts are untyped, and control flow passes back and forth between those sections: the runtime will ensure that you don't accidentally pass an object with an unintended runtime type into code with static type expectations.


Doesn't every major RDBMS support JSON out of the box these days?


(Last I checked atleast) JSON isn't as well supported on MySQl or MSSQL compared to PG.

In PG, a JSON column is so well integrated that you can do all sorts of crazy stuff (indices over JSON queries is my favorite). You could build an entire RDBMS on top of PG's JSON column.


MSSQL indexes and provides dot notation/object query from 2016 forward, schemas are supported as well.


From the first sentence of the abstract:

> monolithic source-code repositories

A monorepo is a monolithic repository


To answer the parent, it doesn’t imply a monolith application, but deployment to multiple server roles and apps will happen using the same source repository.


Lest anyone forget, the Centralia (coal) mine fire has been burning since at least 1962 and no one knows how to stop it. The Fukushima Daiichi incident really doesn't seem that bad to me, comparatively speaking.

https://en.wikipedia.org/wiki/Centralia_mine_fire


Granted that coal fires can occur due to other causes than mining (such as simply exposing a coal seam to air during construction). That said, mining greatly increases the number of incidents that occur.


The choice is not between coal and nuclear.


Agreed. 200KB is far too small to effectively evaluate the offering.

A blank Ruby on Rails app is several times that amount, and the yarn.lock file alone is nearly 300KB.


You can still evaluate it if your project is larger than 200KB. TabNine will choose files to index that are relevant to the files you are editing (determined by distance in the directory tree).


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

Search: