I'm a go user right now, but I really want to ditch it because I'm in total disarray with the way the go language is managed and the deafness of the go team. Been looking at D,Nim and Crystal. - D is neat but I'm not interested at all in unsafe stuffs and don't want to have to debug programs or 3rd party libs that relies on that, I want a safe language. - Nim looks really good, although some features like (foo_bar =…
If you don't like unsafe stuff perhaps you should be a bit wary about Nim as well. The attitude seems to be that unsafe things aren't that big of a deal as long as you decent tools to debug them.
The Crystal Programming Language
171–180 of 180 posts
Re: The Crystal Programming Language
#172Re: The Crystal Programming Language
#173I'm a go user right now, but I really want to ditch it because I'm in total disarray with the way the go language is managed and the deafness of the go team. Been looking at D,Nim and Crystal. - D is neat but I'm not interested at all in unsafe stuffs and don't want to have to debug programs or 3rd party libs that relies on that, I want a safe language. - Nim looks really good, although some features like (foo_bar =…
Re: The Crystal Programming Language
#174Earlier quoted context omitted.
You definitely should at least look into Julia. I would say it is more elegant than any other language I've seen while being faster than pretty much anything except for straight C / C++ / D / Rust (native systems languages). It should be easy to beat Go in performance and match or exceed Ruby in elegance and simplicity. It's Achilles heel(s) right now though are multi-threading and JIT compilation times (which should…
Julia's 1-based array indexing is counter-intuitive and a turn off.
Re: The Crystal Programming Language
#175Earlier quoted context omitted.
I've built many a class in Ruby.
> I've built many a class in Ruby. I see..... Anyway, this is elegant to me: sum ||= (1..100000).to_a.inject(:+) Maybe you have a different aesthetical sense than the rest of us. That's perfectly fine, we don't have to like the same things. But since you questioned, now I'm curious and I would like to ask you: what language in your opinion has the most elegant syntax? Also if you have 2 extra minutes free, would you…
The Lisp family, Scheme in particular.
(define sum (reduce + 0 (iota 100000 1)))
Re: The Crystal Programming Language
#176Earlier quoted context omitted.
> I've built many a class in Ruby. I see..... Anyway, this is elegant to me: sum ||= (1..100000).to_a.inject(:+) Maybe you have a different aesthetical sense than the rest of us. That's perfectly fine, we don't have to like the same things. But since you questioned, now I'm curious and I would like to ask you: what language in your opinion has the most elegant syntax? Also if you have 2 extra minutes free, would you…
Having migrated to Clojure I prefer: (reduce + (range 1 100001)) but you can make yours a little nicer by relying on a Range being enumerable, hence: (1..100000).inject(:+)
+/>:i.100001
You could takeout the >: but then the range is 0 indexed and not 1-based: +/i.100001Re: The Crystal Programming Language
#177Earlier quoted context omitted.
The person you're replying to wasn't even talking about Rust. You'd also be vastly overestimating the amount of Rust libs that need unsafe code. For example, Rust's most mature web framework, the one powering crates.io, doesn't use unsafe code at all: https://github.com/iron/iron
Crates.io uses Conduit, not iron.
Re: The Crystal Programming Language
#178Earlier quoted context omitted.
Having migrated to Clojure I prefer: (reduce + (range 1 100001)) but you can make yours a little nicer by relying on a Range being enumerable, hence: (1..100000).inject(:+)
I prefer J: +/>:i.100001 You could takeout the >: but then the range is 0 indexed and not 1-based: +/i.100001
Re: The Crystal Programming Language
#179Earlier quoted context omitted.
I prefer J: +/>:i.100001 You could takeout the >: but then the range is 0 indexed and not 1-based: +/i.100001
Now that is incredibly terse. "/" is the J reducing function? Or is it not comparable?
Re: The Crystal Programming Language
#180I don't understand why Ruby's syntax is seen as so elegant. It's ambiguous and a nightmare to parse. http://programmingisterrible.com/post/42432568185/how-to-par...
Yeah, the Ruby-like syntax of Elixir made me stop looking into it more. I remember reading an article (or was that a chapter in a book), which basically said something like "ok, these parentheses are optional, but only for this case. For other cases, parentheses are required." Which is a shame, since the tooling built for it is the most amazing I've ever seen. I know syntax shouldn't matter, but personally I think co…
I'm going to a meetup in a couple of days where Elixir and Phoenix will be presented, I think I'll keep your comment in mind and maybe ask about inconsistencies in the syntax, as I wasn't aware of this. What I know of the syntax relation to Ruby is that it is only superficial - the semantics are very different.