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

This is my biggest irk about Sorbet: because its signatures are wordy and because it can't infer the generic type of a private method, it slightly pushes you towards NOT extracting helper methods if they are going to be 2-5 lines. With Sorbet annotation, it'd easily become 10 lines. So it pushes towards bigger methods, and those are not always readable.

If only private methods would be allowed not having typing at all (with a promise of not being used in subclasses, for example), and Sorbet would be used mostly on the public surface of classes, it'd be much more tolerable for me.


eh, it's just a little celebration. Let Matz have it.

One issue is gems which are locked `ruby < 4.0` which will now require updating, and releasing 4.0 instead of 3.5 was only done very recently.

For a more concrete example, the grpc gem locks Ruby versions (< 3.5), and they refuse to change it. So until they support the next Ruby version, we could test ruby-next by testing with a preview release. This worked for 3.4 and 3.5, but now doesn't work with 4.0 (bundler resolves 4.0-preview2 > 3.5, whereas we are able to do 3.5-preview1).

So unless I feel like doing a lot of grunt work (which I don't), I can't even test Ruby 4 in our app until they release a new version. And while I recognize this is an issue with the gem, it is a consequence of choosing to do 4.0.


For future readers, I mistakenly referenced the grpc gem; I was thinking of the gem `gruf` which is a grpc framework

from what I understand, ruby::Box has nothing to do with GIL. At least, not yet.

I only have it when iphone simulator is running and using the same audio output.

And earth contains so much of heavier elements.


As I learned it long ago in school, elements up to the mass of iron are formed by stellar fusion. That's the point where fusion is no longer exothermic. Any element on earth that is heavier than iron is the product of a supernova. So we live on a ball of supernova debris.


Most of what we live on, the vast majority, is iron or lighter. So it's more that we're sprinkled with supernova debris. But we are made out of stardust, so that's something.


An interesting fact is that while almost all of the Solar System has started as gas, which has then condensed here into solid bodies that have then aggregated into planets, a small part of the original matter of the Solar System has consisted of solid dust particles that have come as such from the stellar explosions that have propelled them.

So we can identify in meteorites or on the surface of other bodies not affected by weather, like the Moon or asteroids, small mineral grains that are true stardust, i.e. interstellar grains that have remained unchanged since long before the formation of the Earth and of the Solar System.

We can identify such grains by their abnormal isotopic composition, in comparison with the matter of the Solar System. While many such interstellar grains should be just silicates, those are hard to extract from the rocks formed here, which are similar chemically.

Because of that, the interstellar grains that are best known are those which come from stellar systems that chemically are unlike the Solar System. In most stellar systems, there is more oxygen than carbon and those stellar systems are like ours, with planets having iron cores covered by mantles and crusts made of silicates, covered then by a layer of ice.

In the other kind of stellar systems, there is more carbon than oxygen and there the planets would be formed from minerals that are very rare on Earth, i.e. mainly from silicon carbide and various metallic carbides and also with great amounts of graphite and diamonds.

So most of the interstellar grains (i.e. true stardust) that have been identified and studied are grains of silicon carbide, graphite, diamond or titanium carbide, which are easy to extract from the silicates formed in the Solar System.


> elements up to the mass of iron are formed by stellar fusion

And elements down to the mass of iron can also be formed. But iron is at the bottom of the well.


The elements heavier than iron are not formed by fusion because of the asymmetry in the initial conditions.

The Universe that we can see has started from a mixture of equal amounts of free neutrons and protons (at a temperature of a few tens of MeV, matter has the simplest possible structure, consisting of free neutrons, free protons, free electrons, free positrons, photons and various kinds of neutrinos; upon cooling, nuclei form, then positrons annihilate, then atoms form), which have formed in the beginning hydrogen, helium and some lithium. Then, through fusion, the next elements until iron have been generated.

Iron is not the last element generated, a few elements after it have also been generated by fusion, because while they have lower binding energies than iron, their binding energies are still greater than of the lighter elements that can fuse into them.

However after the peak of the iron, the abundance of the following elements generated by fusion drops very quickly, e.g. down to germanium that is about 8 thousand times less abundant than iron.

The elements heavier than germanium are produced only in negligible amounts by fusion. They are produced mostly by neutron capture and sometimes by proton capture, and such events happen mostly during supernova explosions or neutron star collisions, because only then high concentrations of neutrons with high energies are present.

Neutron capture produces elements with Z until 100, i.e. until fermium (after that, spontaneous fission happens too fast, before beta-decay can raise the Z and enough extra neutrons can be captured to form a nucleus with long enough half-life). However the half-life of the heaviest elements decreases very quickly with Z, so the elements heavier than plutonium usually decay before reaching a stellar system from the explosion that has generated them. At its formation, it is likely that Earth also contained plutonium (244Pu has a half-life of over 80 million years, enough to survive an interstellar journey), but it has completely decayed until now, leaving uranium as the heaviest primordial element on Earth.


I think idea was that fungi for some time couldn't consume lignin in fallen trees.


I kinda feel that singly linked lists isn't a data structure in FP as much as a (dynamic) control flow structure. It's okay in that application.


interesting. how named arguments work with currying?


Nearly the same as with positional argument: Partially applying a function to a named argument creates a closure with this argument filled in, and you can apply the argument in whichever order you want:

    let f a ~x ~y b = a + x + y + b
    let g = f ~y:1 (* g is closure with the argument named ~y filled in *)
    let h = g 2 (* another closure with the first positional argument filled in *)
    let int_15 = h 8 ~x:4 (* = g 2 8 ~y:4 = f ~y:1 2 8 ~x:4 *)
The more complex interaction is rather with type inference and currying, or the interaction between currying and optional arguments.


this is very unnecessary. Arrays and maps transformations are really easy and concise in core ruby already, one line of map, to_h or whatever.


Well, erlang and elixir operate on almost exclusively immutable data, in addition to message passing between "processes". They are more strict than most other languages in that regard.


Mutation occurs at the actor level. Their state is mutated by changing how they respond to future messages.


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

Search: