News for hackers. Stuff that matters.
Re:Crystal 1.0 – What to expect by tomc1985 on Monday March 22, 2021 @03:22PM (#26545478)
Really happy to see this go 1.0. Between Crystal and Zig it's nice to see C++/Rust get some competition
Re:Crystal 1.0 – What to expect by the_duke on Monday March 22, 2021 @04:04PM (#26546121)
Crystal has a GC. I see it as more similar to the likes of Nim, Swift, Java or C#.

It's a great language regardless.

Re:Crystal 1.0 – What to expect by socialdemocrat on Monday March 22, 2021 @10:20PM (#26550252)
Does languages don’t belong together. Java and C# sure. They use sophisticated garbage collectors and target intermediate code.

Nim, Crystal and Swift all compile to native code and is designed for that.

Swift is not a GC language in the normal sense since it uses automatic reference counting. That is fully deterministic and with low latency. There is no stop the world to collect garbage like with Java and C#.

Swift is akin to C++ code with smart pointers.

Re:Crystal 1.0 – What to expect by the_duke on Tuesday March 23, 2021 @01:29AM (#26551436)
You can group languages in different ways.

VM vs native is one way, but you can also go by the level of abstraction they provide, which very much puts them in the same category.

Also, this debate comes up every time, but ARC is widely classified as a form of garbage collection, just not a tracing one. It is transparent and automatic to the user. (Well, apart from cycles)

Re:Crystal 1.0 – What to expect by viktorcode on Tuesday March 23, 2021 @03:41AM (#26552149)
I disagree with that classification, as there's no "garbage" state for references as they are destroyed immediately. All garbage collecting languages on the other hand have period of time where the references are intact but marked as garbage.

FWIW Chris Lattner, the language creator, put Swift into a non-GC camp.

Re:Crystal 1.0 – What to expect by pjmlp on Tuesday March 23, 2021 @05:44AM (#26552936)
Because he needs to sell it, and Apple developers got a bad taste of Objective-C GC implementation that never worked out properly.

Widely acknowledged CS books see it differently,

https://gchandbook.org/

Re:Crystal 1.0 – What to expect by pulse7 on Tuesday March 23, 2021 @07:03AM (#26553536)
Even in Swift the references are not "destroyed immediately" but because of various performance optimizations this "garbage state removal" is deferred - for example to the end of scope... The truth is, that they >>don't want to call it GC<< for marketing and other reasons... One could implement ARC with cycle collector for Java as well - and it would be just another form of GC... it would use less memory (because garbage would be released faster), but it would be slower...
Re:Crystal 1.0 – What to expect by mega-tux on Friday March 26, 2021 @10:29AM (#26592573)
Re:Crystal 1.0 – What to expect by pjmlp on Tuesday March 23, 2021 @05:46AM (#26552955)
C and C++ also target intermediate code,

LLVM, GIMPLE, TIMI, TenDRA,...

Java and C# also targeet native code,

.NET Native, CoreRT, IL2CPP, Mono AOT, SubstrateVM, GCJ, ExcelsiorJET, OpenJ9, PTC, Aicas,...

Languages and implementations are orthogonal.

Re:Crystal 1.0 – What to expect by bitmapbrother on Tuesday March 23, 2021 @12:51AM (#26551260)
Isn't reference counting a form of garbage collection, though? If you want performance then Objective C and Swift aren't the languages you should be using. There's a reason why Apple recommends C/C++ if you need your code to run as fast as possible and also the reason why the high majority of professional games are written in C++ with either a thin Objective C / Swift wrapper.

Also, you can compile both Java and Kotlin to native images with Graal.

https://www.graalvm.org/examples/java-kotlin-aot/

Re:Crystal 1.0 – What to expect by pjmlp on Monday March 22, 2021 @04:12PM (#26546246)
My experience porting C++ stuff into Java/.NET, with occasional native libs, most of the time using a GC based language is more than enough for the expected system performance.

Naturally it requires understanding the whole stack, how to improve performance in general, picking the right data structures and algorithms as well.

Of course, there are scenarios where that might not be enough, and that is where a C or C++ native library might come into play.

No need to be siloed into a single language.

Re:Crystal 1.0 – What to expect by ksec on Tuesday March 23, 2021 @05:41AM (#26552915)
Lilith: x86-64 OS written in Crystal

https://github.com/ffwff/lilith

Re:Crystal 1.0 – What to expect by tomc1985 on Monday March 22, 2021 @04:07PM (#26546173)
Ah! I hadn't thought of those, though I think because 3 out of 4 are tied to a specific platform
Re:Crystal 1.0 – What to expect by coder543 on Monday March 22, 2021 @05:23PM (#26547329)
I think you mean 1 out of 4?

Swift is the only one on that list that really feels tied to any particular platform.

C# has been extremely portable for years now thanks to .NET Core. Even SQL Server runs on Linux these days, if you really just enjoy spending money.

Java has always had a strong focus on portability, of course.

Nim... I don't know much about. Doesn't it compile to C? I don't think it intentionally has any particular platform affinity, although I wouldn't be surprised if it worked best on Linux.

Re:Crystal 1.0 – What to expect by tomc1985 on Monday March 22, 2021 @06:24PM (#26548155)
C# is tied to .net, and the cross-platform story on that framework is...complicated

Java is tied to JVM

Swift is tied to MacOS.

Of course, with the exception of JVM, they are all nominally "cross-platform" in the OS sense of the word. But I haven't seen any substantial Linux/Mac .Net codebases yet, same with Swift on Windows

Re:Crystal 1.0 – What to expect by travv0 on Monday March 22, 2021 @08:39PM (#26549475)
The cross-platform story of .NET hasn't been complicated in a while. It's fully cross-platform between Windows, Linux, and macOS and has been for a few years.

Edit: I just saw the person that you replied to said the same thing, so I'm not sure why you're pushing that it has a complicated cross-platform story.

Re:Crystal 1.0 – What to expect by tomc1985 on Tuesday March 23, 2021 @12:32AM (#26551154)
So... pretty much everything I could do on .net framework runs on Linux and Mac now? Even Winforms, or WPF?

To be fair I haven't written .net code in like 10 years, and the docs explaining how to navigate the transition from framework to core were extremely confusing. Has that soup of different technologies solidified any?

Re:Crystal 1.0 – What to expect by travv0 on Tuesday March 23, 2021 @10:21AM (#26555348)
> So... pretty much everything I could do on .net framework runs on Linux and Mac now?

No, which doesn't really matter since we're talking about .NET, not .NET Framework. Poor naming choice by Microsoft I guess.

Re:Crystal 1.0 – What to expect by nullsense on Tuesday March 23, 2021 @02:33AM (#26551751)
The docs can be summed up as:

TL;DR rewrite it - there is no migration path!

Re:Crystal 1.0 – What to expect by rafaelvasco on Monday March 22, 2021 @10:21PM (#26550263)
C# ? Not complicated at all. In fact it's currently one of the most cross platform language/runtime in existence after .NET Core appeared, and now more than ever with .NET 5.0. I even managed to AOT compile code and run it without a trace of .NET. Just amazing.
Re:Crystal 1.0 – What to expect by nonbirithm on Monday March 22, 2021 @10:42PM (#26550406)
C# is a really good language, but I had nothing but problems trying to develop with it on Linux exclusively. MonoDevelop doesn't support Linux anymore since a bunch of proprietary components were added to it (and this isn't even mentioned on its homepage), so you have to use a community fork. That didn't bode well for me. The fork didn't have packages for my distro and I couldn't get it to compile for two hours. VS Code wasn't much different, given I couldn't seem how to get OmniSharp working for my project. Eventually I found the only thing that worked half the time was Rider, which actually allows you to manage NuGet packages but costs $139. And still, I often had to load and unload projects or even create new projects entirely just to get it to find the new assemblies I added.

It left a bad taste, but maybe that was because I wasn't using a distro like Ubuntu.

Re:Crystal 1.0 – What to expect by Const-me on Monday March 22, 2021 @11:59PM (#26550934)
Matches my experience. Linux runtime worked great for me, SDK has not. To use it to full extent, I think you have to develop on a Windows PC with Visual Studio. However this way you can only debug on Windows i.e. if you want debugger, the project has to be runnable on Windows too.
Re:Crystal 1.0 – What to expect by oblio on Tuesday March 23, 2021 @03:51AM (#26552217)
Use Rider.
Re:Crystal 1.0 – What to expect by metaltyphoon on Tuesday March 23, 2021 @12:08AM (#26550990)
What a weird case. I have successfully used dotnet core on these distros (alpine, centos, fedora, debian, ubuntu) without a single problem. If you don't mind, what distro are you using ?
Re:Crystal 1.0 – What to expect by nonbirithm on Tuesday March 23, 2021 @02:44AM (#26551814)
Arch Linux.
Re:Crystal 1.0 – What to expect by rafaelvasco on Tuesday March 23, 2021 @08:02AM (#26554020)
Yeah, I tested it on Ubuntu, had no problems. But yeah, VSCode doesn't cut it completely. Rider is as better or better than VS in some regards but it's paid.
Re:Crystal 1.0 – What to expect by nullsense on Tuesday March 23, 2021 @02:37AM (#26551771)
I use Ubuntu + Rider and works pretty darn good for me.
Re:Crystal 1.0 – What to expect by socialdemocrat on Monday March 22, 2021 @10:23PM (#26550272)
Swift is not any more tied to macOS than C# is tied to Windows. Compiler LLVM and everything is open source and cross platform. Not all the libraries but that holds true for C# as well, last time I checked.
Re:Crystal 1.0 – What to expect by metaltyphoon on Tuesday March 23, 2021 @12:09AM (#26550997)
C# (CLR specifically) is not tied to windows and hasn't been for a while now. Perhaps the last time you checked was pre 2016 ?
Re:Crystal 1.0 – What to expect by heavyset_go on Monday March 22, 2021 @11:14PM (#26550605)
> C# has been extremely portable for years now thanks to .NET Core. Even SQL Server runs on Linux these days, if you really just enjoy spending money.

My experience with C# and .NET Core on ARM Linux is that it comes with a lot of crashes and segfaults. On x86-64 Linux it works well, though.

Re:Crystal 1.0 – What to expect by Const-me on Monday March 22, 2021 @11:49PM (#26550873)
In my case the ARMs were Raspberry Pi3, Pi4, and RK3288. Linux was Debian in all cases, and .NET was 2.1 and 2.2. Worked great for my use cases, only crashed when I screwed up with unsafe or unmanaged code.

If your environment is anywhere similar, and you OK with .NET 2.1.18, you can try my package: https://github.com/Const-me/Vrmac/releases/tag/1.0 Sources: https://github.com/Const-me/Vrmac/tree/master/net-core

Re:Crystal 1.0 – What to expect by dixego on Monday March 22, 2021 @08:20PM (#26549334)
Nim does/can indeed compile to C.
Re:Crystal 1.0 – What to expect by genuine_smiles on Monday March 22, 2021 @03:44PM (#26545793)
Would a developer looking a Zig/C++/Rust really also consider Crystal?

I figured Crystal was for Ruby developers who want a good static type system.

Re:Crystal 1.0 – What to expect by tomc1985 on Monday March 22, 2021 @04:06PM (#26546142)
Ruby 3 does static typing, so that would be the quickest path for static types.

Crystal is interesting to me because its a systems language, using Ruby syntax and idioms.

I'm a Rails developer by trade but I've been pining to go back into desktop GUI development. Right now the only viable cross-platform options seem to be Swing and Electron. I'm not sure what the desktop story is with Crystal but if it there is a workable solution based on GTK or something similar I'd be very happy!

Re:Crystal 1.0 – What to expect by viraptor on Monday March 22, 2021 @07:43PM (#26549035)
Ruby 3 has static typing, but it's opt-in and doesn't affect the runtime. Here it's both enforced and directly translates to better performance.
Re:Crystal 1.0 – What to expect by iomcr on Tuesday March 23, 2021 @10:26AM (#26555414)
> Ruby 3 does static typing

Categorically, what I've seen of this falls closer to "lintable comments" than it does "actual static types". Static types are a foundational aspect of crystal, it's not like a sticker slapped on as an after thought.

Re:Crystal 1.0 – What to expect by zem on Monday March 22, 2021 @04:56PM (#26546906)
still no windows support :( desktop gui development was my main wish for crystal too, but ruling out a bunch of end users right out of the box was not an option.
Re:Crystal 1.0 – What to expect by tomc1985 on Monday March 22, 2021 @05:20PM (#26547288)
It looks like Windows support is preliminary. They are working on it...
Re:Crystal 1.0 – What to expect by atraac on Tuesday March 23, 2021 @04:12AM (#26552341)
https://github.com/crystal-lang/crystal/issues/5430

this issue tracks Windows progress, it hasn't been really updated in a while. I've been following Crystal Windows port for over a year, nothing changed yet.

Re:Crystal 1.0 – What to expect by ljm on Monday March 22, 2021 @07:21PM (#26548827)
I'd consider it more seriously now it's 1.0. You've basically got an ecosystem of Ruby-likes:

- Ruby itself

- Crystal

- Elixir

I'm massively keen on Zig, too, but it still feels like early days for the language itself. The C-interop is utterly astounding but I don't want to write Zig as syntax-sugar around C libraries.

Re:Crystal 1.0 – What to expect by ksec on Tuesday March 23, 2021 @05:47AM (#26552970)
And Julia as well.
Re:Crystal 1.0 – What to expect by forgotpwd16 on Tuesday March 23, 2021 @08:48AM (#26554366)
Julia if anything is unlike Ruby. The very first Ruby example on the official site showcases its object-oriented nature. Julia instead of objects has multiple dispatch.
Re:Crystal 1.0 – What to expect by cbkeller on Tuesday March 23, 2021 @09:00PM (#26562292)
On one hand you're absolutely correct in that Julia is dispatch-oriented, and doesn't have ton in common with what is commonly considered OOP today.

However, as far as I understand it there is also an argument to be made that multiple dispatch is at least as close to Alan Kay’s original intent for OO (e.g. [1]) than is the currently-ubiquitous class-based version of OO that leads to things like `RequestProcessorFactoryFactory` s with `RequestProcessorFactoryFactory.getRequestProcessorFactory(Class)` methods.

[1] https://medium.com/javascript-scene/the-forgotten-history-of...

Re:Crystal 1.0 – What to expect by straight-shoota on Monday March 22, 2021 @03:54PM (#26545950)
Crystal comes from a Ruby background, but it's far more than compiled Ruby. As a general purpose language mainly aiming at application development it can surely compete with any of the above in that field. The main objective inherited from Ruby is the focus on developer hapiness. While doing that it doesn't back down on performance or interoparability.
Re:Crystal 1.0 – What to expect by yellowapple on Monday March 22, 2021 @03:49PM (#26545865)
I mean, as someone who previously looked at Rust and is currently looking at Zig, Crystal is certainly on my radar.

That said, my current dayjob is around a Rails codebase, so I might not be representative of the normal systems programming crowd.

Re:Crystal 1.0 – What to expect by nwmcsween on Monday March 22, 2021 @03:55PM (#26545956)
Ruby is a great language, the only nits I have with it are error handling, types and a bit of the perlisms and shellisms that crept in. If Crystal fixed these I would be interested
Re:Crystal 1.0 – What to expect by cutler on Tuesday March 23, 2021 @12:18AM (#26551068)
Ruby stole elegant word lists %w(tic tac toe) and the regex operator =~ from Perl so I'll keep my Perlisms, thank you very much.
Re:Crystal 1.0 – What to expect by Doctor_Fegg on Monday March 22, 2021 @03:49PM (#26545864)
Crystal's appeal, for me at least, is the productivity of Ruby with the memory efficiency and execution speed of C++. Static typing is just a way of achieving that, it's not something I'm seeking per se.
Re:Crystal 1.0 – What to expect by socialdemocrat on Monday March 22, 2021 @10:26PM (#26550296)
As an old Ruby fan, you should seriously check out Julia. It had a lot of the same meta programming goodies as Ruby but with performance that often rivals C/C++. Actually I think Julia will frequently pull off being faster. It is crazy how good JIT compilation works today with a language specifically designed designed for it.
Re:Crystal 1.0 – What to expect by straight-shoota on Monday March 22, 2021 @03:58PM (#26545998)
Remember static typing is also really useful for code quality and avoiding hidden bugs. Some code in Ruby requires a ton of specs to discover bugs caused by type issues, while the Crystal compiler tells you immediately that something doesn't work out. I love Crystal's type system really for productivity reasons.
Re:Crystal 1.0 – What to expect by sjwright on Monday March 22, 2021 @05:50PM (#26547725)
I haven’t ever understood the argument against static typing. I’ve never declared a variable and not simultaneously thought “this is going to be a float, always a float, never not a float.”

The only exception to this is untrusted input, but for that an string is usually always fine.

Re:Crystal 1.0 – What to expect by pansa2 on Monday March 22, 2021 @06:51PM (#26548482)
> I’ve never declared a variable and not simultaneously thought “this is going to be a float, always a float, never not a float.”

Never written generic/template code? Making that much easier is one of the main benefits of dynamic typing.

Re:Crystal 1.0 – What to expect by viraptor on Monday March 22, 2021 @07:56PM (#26549149)
Change it to "this variable is always going to be a T, never not a T" and it still stands.
Re:Crystal 1.0 – What to expect by sjwright on Monday March 22, 2021 @11:33PM (#26550773)
It's possible—nay likely—that I don't understand the true value of generics. It's something that I've looked into on occasion and it never seemed all that useful to me. Most examples I've come across in the past were C++ and seemed like formalised workarounds for deficiencies in the C++ type system rather than being actually useful. I'm sure I've failed to grok them—or based on the code I write I'm not the target audience for them.

I have no problem when a language allows the programmer to explicitly opt for a variable to be an undefined/dynamic type, whether as part of generics or as part of a defensive ingest of untrusted data. I admit this is previously unspecified nuance but in my mind this doesn't break my rule: "this variable is always going to be a dynamic type, never not a dynamic type." This means you know when to interact with it defensively.

The thing I'd like in a hybrid static-dynamic language is type assertion blocks which restore some benefits of static typing while dealing with dynamic typed variables. E.g.:

  declare x as dynamic;
  x = untrusted_source();
  if (x IS_A string) {
    // Inside here, x behaves as a statically typed string.
    // The compiler knows it and checks types appropriately.
    // Passing x elsewhere will send a static typed string.
    function_that_demands_a_string(x);
  }
  else if (x CAN_SAFELY_BECOME_A uint) {
    // True for any non-negative integer regardless of data type.
    // Inside here, x is always a statically typed uint.
    // If it was some other type, it was converted for me.
  }
(This probably already exists in some language somewhere but my familiarity with languages is narrow.)
Re:Crystal 1.0 – What to expect by ezrast on Tuesday March 23, 2021 @01:10AM (#26551349)
Crystal does some of what you want:

https://tio.run/##ZVDBbsIwDL33KywmrRcaUXbbhHbeaYdpJ4RQaA1kCk...

Note how the language is pretty smart about flow-typing variables as you narrow down their types. `x` here is typed as a tagged union (String | Int32 | Array(Char) | Float64 | UInt32), but by the time the program gets to the final `else` the compiler has figured out that the String and Array cases have already been dealt with (even though we never mentioned Array by name, just asked if the object implements a method that only Array implements), so it lets us call `x.abs`, which only works for numeric types. Of course, `abs` has different implementations for Int32 and Float64, but the signatures are compatible so the compiler lets it fly, resorting to dynamic dispatch at runtime.

The missing part is that there's nothing like a CAN_SAFELY_BECOME_A operator so I had to implement that test myself (as `try_to_u32`) and call it early to get the flow typing to work.

The Wikipedia article for the concept is https://en.wikipedia.org/wiki/Flow-sensitive_typing

Re:Crystal 1.0 – What to expect by sjwright on Tuesday March 23, 2021 @03:46AM (#26552178)
That's very cool. And especially thanks for surfacing the Wikipedia article.
Re:Crystal 1.0 – What to expect by mekkkkkk on Tuesday March 23, 2021 @07:25AM (#26553718)
The main benefit of generics is to easily maintain strong type information for implementers.

With a

  <T>createMapWithStringKey(T arg) -> Map<string, T>
You can keep strong type info with

  AType a
  var b = createMapWithStringKey<AType>(a)
  // b is for certain a Map<string, AType>
Re:Crystal 1.0 – What to expect by dragonwriter on Tuesday March 23, 2021 @06:46AM (#26553399)
Python typecheckers (both pyright and mypy, I believe) do this (isinstance checks and some other checks in conditionals narrow the type on the defended path.)
Re:Crystal 1.0 – What to expect by aryehof on Wednesday March 24, 2021 @06:09AM (#26565346)
The classic use case for generics is when creating Abstract Data Types. Implementing stacks, queues, dynamic arrays etc of differing Types is made relatively simple using generics.
Re:Crystal 1.0 – What to expect by ncmncm on Monday March 22, 2021 @07:28PM (#26548896)
If all you get from static typing is runtime performance and correctness, your type system is not pulling its weight.

In any serious statically-typed language, the type system does real heavy lifting. In practice that means that libraries execute code at compile time that, in effect, generate the code you would otherwise need to write (again) yourself.

C, Pascal, and Go are examples of statically typed languages whose type system does only trivial work.

Re:Crystal 1.0 – What to expect by onlyrealcuzzo on Monday March 22, 2021 @06:05PM (#26547925)
Is static typing really necessary for speed?

The fastest JavaScript engines and LuaJIT are closer in speed to Crystal than Crystal is to C.

Granted - all these languages are really fast - and unless you're doing something INSANELY performance dependent and you REALLY know what you're doing - I think familiarity trumps all. You're almost certainly going to write faster Crystal code if you're a Crystal expert than you would write C, C++, or Rust.

Re:Crystal 1.0 – What to expect by viraptor on Monday March 22, 2021 @07:51PM (#26549109)
It's not necessary strictly speaking, but it make things MUCH easier. JS in v8 has 3 (4?) layers of compilers already and each time some type changes at runtime you're taking a hit to go back to the interpreted version while functions jit compile again.

There's a crazy amount of engineering effort that has to counteract a missing "this has one parameter and it's either a string or a float" annotation.

In practice if you don't have a world class well funded team - yes, static typing is necessary for performance.

Re:Crystal 1.0 – What to expect by socialdemocrat on Monday March 22, 2021 @10:31PM (#26550325)
That is because JS was not built for JIT compilation. With a dynamic language like Julia built for JIT compilation from the very start you get both much simpler and cleaner design and higher performance.

It uses a method JIT so it is deterministic and easy to analyze unlike JavaScript.

You can lookup ahead of time how each function will get compiled with given input types.

Re:Crystal 1.0 – What to expect by viraptor on Tuesday March 23, 2021 @05:18AM (#26552749)
I'm not sure what you mean by this. Why do you think Julia was made for JIT from the beginning?

You can't analyse functions like this ahead of time:

   function foo(x)
     x + y
   end
You've got an Any type interacting with an Any global. There's no better answer than you'd get from JS analysis.
Re:Crystal 1.0 – What to expect by eigenspace on Tuesday March 23, 2021 @12:22PM (#26556826)
> Why do you think Julia was made for JIT from the beginning?

It's very explicit in almost anything the language designers wrote from the beginning. Julia has always had it's language semantics designed around a JIT. Keep in mind, julia's JIT is not at all like JS JITs, julia's style is often called 'just ahead of time'.

For the you quote, the only thing causing a problem is the global y. Using global variables is very frowned upon in julia for this reason. However, if you write

    function g(y)
        function f(x)
            x + y
        end
    end
or something, then there is no `Any` involved at runtime. What will happen is that say you call g(1.0)(2), as soon as julia sees this, it will do static type inference on the function bodies, knowing that y :: Float64 and x :: Int, all the code can be inferred and compiled down. Julia specializes on all arguments of functions, whether or not you put a type assertion on them.

If there's a point in the program where type inference fails to produce concrete types, then the compiler just generates code up to that point and then waits until the types are resolved at runtime, and then using the new runtime type information does static analysis going forward from that point until it either encounters another type instability, or the program is finished.

This is why writing code that isn't concretely inferrable can carry a heavy performance penalty in julia, but it's also why inferrable code can be so fast. The trick is just to keep type dynamism away from performance bottlenecks and you'll be fine.

Re:Crystal 1.0 – What to expect by otabdeveloper4 on Tuesday March 23, 2021 @04:41AM (#26552534)
Type inference can only get you so far when the language and runtime allow you to devolve values to an 'Optional[Any]' at literally any given statement.

Sometimes discipline must be enforced on the programmer.

Re:Crystal 1.0 – What to expect by socialdemocrat on Monday March 22, 2021 @10:28PM (#26550308)
No, Julia is not statically typed and will outperform pretty much anything, at least when dealing with numerical code.

Next generation climate models are built with Julia. You would not pick a slow language for such a high performance dependent task.

Re:Crystal 1.0 – What to expect by otabdeveloper4 on Tuesday March 23, 2021 @04:37AM (#26552498)
Julia is statically typed, or at least it is for the inner bottleneck loops. If you want fast numeric code in Julia then you have to have homogeneous arrays. (Besides, I'd be very surprised if Julia doesn't have Fortran libraries driving it under the hood.)

You're confusing dynamic typing and type inference.

Re:Crystal 1.0 – What to expect by eigenspace on Tuesday March 23, 2021 @12:27PM (#26556875)
Julia is not statically typed semantically. It has the semantics of a dynamic language.

As an implementation detail, it has a statically typed intermediate representation that's used for very aggressive and impressive optimization.

But that's an implementation detail, and is not what most people mean when they talk about a language being dynamically or statically typed.

Re:Crystal 1.0 – What to expect by junippor on Tuesday March 23, 2021 @10:24AM (#26555383)
https://julialang.org/

> Julia is dynamically typed, feels like a scripting language, and has good support for interactive use.

Literally on the front page.

Re:Crystal 1.0 – What to expect by dklend122 on Tuesday March 23, 2021 @11:01AM (#26555838)
Julia can also generate fast code for arrays of small unions
Re:Crystal 1.0 – What to expect by otabdeveloper4 on Tuesday March 23, 2021 @04:38AM (#26552505)
> Is static typing really necessary for speed?

Absolutely yes. If you don't know the shape of your data at compile time then you're going to destroy your performance discovering and validating it at runtime.