News for hackers. Stuff that matters.
Re:Larry Wall has approved renaming Perl 6 to Raku by xyproto on Friday October 11, 2019 @05:06PM (#21228470)
I didn't know that Elixir had such a low-threshold for one-off programs.

Have you tried Crystal? Both are on my list of programming languages to look into next, together with Elm, Reason and Zig.

Re:Larry Wall has approved renaming Perl 6 to Raku by jtms on Friday October 11, 2019 @06:05PM (#21228920)
Oh man I just love and adore Crystal. I am a long time rubyist and I have to say they just nailed it with Crystal. I just wish I had more opportunity to use it professionally!
Re:Larry Wall has approved renaming Perl 6 to Raku by core-questions on Friday October 11, 2019 @08:59PM (#21229778)
It must be time to take my Ruby skills and go and learn this. Is it really as easy as it sounds like it should be for a lazy, dynamic-typing sort of Ruby dev to pick up?
Re:Larry Wall has approved renaming Perl 6 to Raku by jtms on Friday October 11, 2019 @11:23PM (#21230436)
If you have never worked with a strongly typed language before there might be some getting used to that, but any pain is well worth it. Catching all your mistakes at compile time and not at runtime is so amazing. Oh and it’s literally 100x faster than Ruby in some cases.
Re:Larry Wall has approved renaming Perl 6 to Raku by dragonwriter on Saturday October 12, 2019 @01:53AM (#21230958)
> Catching all your mistakes at compile time and not at runtime is so amazing

It would be, but IME Crystal, or statically typed programming languages that don't have a type system at least as powerful as Haskells in general, don't get anywhere remotely close to that, and the overhead added to get what they do give is of dubious net benefit outside of large projects.

And even with Haskell, while you can express a much richer set of constraints in types, there's also more space for bugs in the type level programming.

Re:Larry Wall has approved renaming Perl 6 to Raku by core-questions on Monday October 14, 2019 @12:40AM (#21245303)
I don't get it. How many types do I need, before the kind of data I am talking about becomes better represented by an object comprised of smaller pieces?

Why would I want to spend my time "type level programming"?

Maybe I don't understand what's meant by a type. Is it on the level of string/double/int, or is it expected to cover more (string with a well formatted ISO 8601 datetime, etc)? What is accomplished that couldn't be done in vanilla Ruby with an object representing a more complex datatype with its own getters/setters to cover validation?

Re:Larry Wall has approved renaming Perl 6 to Raku by greglindahl on Saturday October 12, 2019 @01:30AM (#21230891)
Every mistake? Wow. I rarely make that kind of mistake, I usually screw up the logic.
Re:Larry Wall has approved renaming Perl 6 to Raku by Willamin on Friday October 11, 2019 @05:50PM (#21228809)
Crystal is wonderful for one-off programs in my experience.

Elixir had a long startup time for one-off scripts in my experience, but Elixir’s syntax is still one of my favorites for scripting.

Re:Larry Wall has approved renaming Perl 6 to Raku by dnautics on Friday October 11, 2019 @06:26PM (#21229054)
Is a 100ms startup time really a big deal for something that is either going to be manually triggered or cronjobbed and expected to take on the order of minutes?
Re:Larry Wall has approved renaming Perl 6 to Raku by Myrmornis on Friday October 11, 2019 @07:28PM (#21229332)
Those sorts of startup times discourage writing command-line tools (e.g. composable text processing things one might join with pipes).
Re:Larry Wall has approved renaming Perl 6 to Raku by cutler on Saturday October 12, 2019 @12:29AM (#21230690)
Ruby scripting has occupied the sysadmin space for over a decade yet on my 2013 Macbook Pro the latest Ruby 2.6.5 takes around 250ms to start. That's a mere 1/4 of a second. Sure, Python, Perl and PHP have shorter startup times but surely this is a non-problem?
Re:Larry Wall has approved renaming Perl 6 to Raku by Myrmornis on Sunday October 13, 2019 @02:09PM (#21241815)
No, things like sort, grep, uniq, cut, wc, cat, awk, sed, tr, etc etc. You wouldn't want them to take 1/4 second to start up.
Re:Larry Wall has approved renaming Perl 6 to Raku by emmelaich on Saturday October 12, 2019 @01:44AM (#21230935)
Crystal's startup time is not great though. 700ms vs 100ms for ruby.

Compared with

   time crystal eval <<<"puts 1"
   time ruby <<<"puts 1"
Re:Larry Wall has approved renaming Perl 6 to Raku by bhaak on Saturday October 12, 2019 @02:44AM (#21231104)
You know that you are timing the compiler and not the compiled program here?

Rather try "echo 'puts 1' > puts.cr && crystal build puts.cr && time ./puts"

BTW, you can dramatically decrease the cold startup times of ruby if you call it with the options '--disable-gems --disable-rubyopt' if that's an option to you. For many scripts it certainly is.

But even on a 8 years old machine with spinning rust, after the ruby stuff is cached in the OS filesystem cache, my startup time are smaller than 10ms.