Ruby used to be my most beloved language. I've since developed a strong appreciation for good type system. However, working with collections of any kind in Ruby is just such a joy. The methods around it are so well thought throug and make writing code a joy that in most other languages just would be tedious. On top of that the Ruby team is constantly working on making that aspect even better. I truly don't understand…
Try Crystal and you get the joy of Ruby enumerables together with a static type system.
Ruby 2.6
71–80 of 164 posts
Re: Ruby 2.6
#72> non-ASCII constant names This is actually a security risk, avoiding all Unicode security recommendations. See e.g. http://websec.github.io/unicode-security-guide/visual-spoofi... All they did was open the floodgates: https://github.com/ruby/ruby/commit/f852af0e59899157ef695edc... no rtl checks, no spoofing, no mixed script checks, no normalization.
I only skimmed over the linked resource, but non of the mentioned attack vectors and issues seem to be a problem for variable names in source code?
But I can't see much else that is a realistic security risk (readability and code clarity risks are another story.)
Re: Ruby 2.6
#73Is it a good time to learn Ruby? I mostly do React and Node + Java work professionally, but I've been looking into Ruby as a fun side project language. I would appreciate any anecdotes!
Re: Ruby 2.6
#74Earlier quoted context omitted.
Try Crystal and you get the joy of Ruby enumerables together with a static type system.
Crystal is nice, but my love affair with Swift is going strong. Not exactly Ruby syntax but pretty similar in terms of simplicity. I am a Rubyist who feels right at home with Swift. But for the new year, I definitely want to give Crystal a fair shot!
Re: Ruby 2.6
#75I am always happy to unwrap my Christmas present from the Ruby team! Some questions about this release: - Are there any benchmarks for the new JIT? - Why was `(Date.today..(Date.today + 1)) === DateTime.now #=> true` false in Ruby 2.5? It seems correct that right now is between today and tomorrow. Is it because one is a Date and the other a DateTime?
> (Date.today..(Date.today + 1)) === DateTime.now #=> true It took me a minute to parse this. (I have never had this problem with Python or JS.)
Re: Ruby 2.6
#76Ruby used to be my most beloved language. I've since developed a strong appreciation for good type system. However, working with collections of any kind in Ruby is just such a joy. The methods around it are so well thought throug and make writing code a joy that in most other languages just would be tedious. On top of that the Ruby team is constantly working on making that aspect even better. I truly don't understand…
Can you comment on why a good type system became so important to you? I can understand the value in interfaces but not really in any other context.
Re: Ruby 2.6
#77Earlier quoted context omitted.
In Ruby it can easily be used to submit malicious source code to a repository (for example the reviewers thinking that a variable is set to some value, when in fact a new variable is created).
An attacker would still have to _do_ something with their new maliciously named constant, which would be as noticeable as any other malicious contribution. This is grasping at straws.
Re: Ruby 2.6
#78Earlier quoted context omitted.
Crystal is nice, but my love affair with Swift is going strong. Not exactly Ruby syntax but pretty similar in terms of simplicity. I am a Rubyist who feels right at home with Swift. But for the new year, I definitely want to give Crystal a fair shot!
Kotlin is my new love. Best collections library of any language I've used, great type system, coroutines are amazing, and all of it integrates perfectly with 25 years of rock-solid Java libraries.
Re: Ruby 2.6
#79Ruby used to be my most beloved language. I've since developed a strong appreciation for good type system. However, working with collections of any kind in Ruby is just such a joy. The methods around it are so well thought throug and make writing code a joy that in most other languages just would be tedious. On top of that the Ruby team is constantly working on making that aspect even better. I truly don't understand…
const list = [ 1, 3, 4, 2, 8, 5];
const [fst, ...snd] = list;
But I suppose that's just a result of JS implementing pseudo-pattern matching.Re: Ruby 2.6
#80Is it a good time to learn Ruby? I mostly do React and Node + Java work professionally, but I've been looking into Ruby as a fun side project language. I would appreciate any anecdotes!
Depends what you want to do, 90% of what I code in is python or Ruby, and I'll switch to C when I want performance. I've done a lot of rails (Ruby), Django (python), and flask (python) work in web development. Much prefer rails, eaiser, and better thought out. I have several websites with hundreds of thousands of visits a year, it is fine (all the frameworks are). I have had to do some inline C to speed up my Ruby in…