<FromGitter>
<drosehn> That's because your example has two local variables (or at least looks like it does -- I realize that `b` could be a method call). but if the line was `if (l_var=@var)` then it's easier to understand why that's being done.
<FromGitter>
<cjgajard> well, that's just discourage `unless`
<FromGitter>
<johnjansen> kind of … its also clearer that you are trapping `nil`… its really up to you though, the language lets you do it all ways … you need to decide what seems most readable … lets say in 6 months time
<FromGitter>
<johnjansen> it will make total sense either way (when you are writing it)
<crystal-gh>
[crystal] MakeNowJust opened pull request #3616: Fix doc of the type inherited from generics class or module (master...fix/doc/inherited-from-bug) https://git.io/v1sN9
muelleme has quit [Ping timeout: 258 seconds]
x0f_ has quit [Ping timeout: 260 seconds]
muelleme has joined #crystal-lang
x0f has joined #crystal-lang
pawnbox has joined #crystal-lang
muelleme has quit [Ping timeout: 256 seconds]
Davy_CC has quit [Ping timeout: 250 seconds]
Davy_CC has joined #crystal-lang
muelleme has joined #crystal-lang
muelleme has quit [Ping timeout: 245 seconds]
ome has quit [Quit: Connection closed for inactivity]
tomchapin has quit [Read error: Connection reset by peer]
gloscombe has joined #crystal-lang
tomchapin has joined #crystal-lang
tomchapi_ has joined #crystal-lang
tomchapin has quit [Ping timeout: 245 seconds]
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
p0p0pr37 has quit [Read error: Connection reset by peer]
p0p0pr37_ is now known as p0p0pr37
Philpax_ has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
tomchapi_ has quit [Ping timeout: 265 seconds]
pawnbox_ has quit [Ping timeout: 265 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: No route to host]
matp_ has joined #crystal-lang
matp has quit [Ping timeout: 250 seconds]
tomchapin has joined #crystal-lang
hako_ has joined #crystal-lang
pawnbox has joined #crystal-lang
rolha has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 245 seconds]
pawnbox has joined #crystal-lang
pawnbox_ has quit [Ping timeout: 258 seconds]
Philpax_ has quit [Ping timeout: 248 seconds]
gloscombe has quit [Ping timeout: 245 seconds]
gloscombe has joined #crystal-lang
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh>
[crystal] asterite closed pull request #3616: Fix doc of the type inherited from generics class or module (master...fix/doc/inherited-from-bug) https://git.io/v1sN9
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/v1ZtP
<crystal-gh>
crystal/master 6b098eb Ary Borenszweig: Let method_missing also generate a def
vasilakisfil_ has quit [Ping timeout: 244 seconds]
<FromGitter>
<drosehn> @catmando I'm not sure why you'd want crystal done in javascript. (or maybe I'm misunderstanding the question...)
<BlaXpirit>
drosehn, it's basically for writing crystal instead of writing javascript
<BlaXpirit>
why? because javascript is terrible
<FromGitter>
<drosehn> I sympathize with that view enough that I make sure to avoid javascript :smile:
<FromGitter>
<drosehn> but for me one of the biggest attractions of crystal is that it's compiled. If I could ever convince myself to do some web-based programming, I'd probably try clojurescript. but then, I liked LISP when I took it in college.
<FromGitter>
<catmando> @droshen : @BlaXpirit is correct. The point is to be able to write code in Crystal - yes you are right you lose the speed advantage, but you still get a much better language. Also (and more importantly) you then can write both server and client code in one language.
<FromGitter>
<drosehn> Ah, yes, I can see the major advantage of using the same language for both server and client.
<FromGitter>
<catmando> We currently do this with the Ruby->Js transpiler called opal which is great, and all of our code is written in Ruby (both server and client.)
<FromGitter>
<catmando> But if we had a crystal -> JS transpiler then we could write all of our code in crystal. We would not see a huge speed increase in the browser (but that is not really an issue these days) BUT we would see big speed increase in the server.
<FromGitter>
<drosehn> the main reason I *don't* do anything with Clojure is that they don't have a compiled version of it. Rich Hickey is all about writing to virtual machines (JVM, JS, etc).
<FromGitter>
<catmando> Well VMs make things much much easier, and frankly speed for most apps is not the major issue.
<FromGitter>
<catmando> Currently there is a world wide developer shortage NOT a world wide compute power shortage. So my first priority is always to have an easy to use, fun, productive eco system. Once you have that you can go back and optimize stuff.
<BlaXpirit>
there's still a developer shortage? whew
<FromGitter>
<johnjansen> @catmando +1 on all that ;-)
<FromGitter>
<catmando> So I see Crystal as a logical evolution. Ruby = GREAT language (best of the dozens that I have used) Now that we know what features are really important, its time to go back and optimize ruby into a language that can be compiled.
<FromGitter>
<drosehn> I certainly agree with that. that's why I'm here! :smile:
<FromGitter>
<catmando> So back to why crystal -> js.... browser performance is frankly not that important. Sorry. But fact is every one of my customers logged in to my site has a fairly powerful computer. I want to offload as much work as possible to the customers box. The stuff that runs on my server I want as fast as possible to save me $$$. So the fact that crystal is interpreted in the browser is a non-issue as long as I have it compiled on the
<FromGitter>
... server, AND as long as my dev's only have to deal with one language.
<FromGitter>
<catmando> Fyi if you are interested checkout http://ruby-hyperloop.io its what we are using now to write react.js components in ruby, and interface directly to our active record models on the server.
<FromGitter>
<catmando> Crystal looks like the perfect next step!
<FromGitter>
<drosehn> You had me agreeing completely back at "same language on client and server". It's just that in my world I'm either writing server-side applications (completely unrelated to web sites), or *maybe* some web-client development where I have no input whatsoever on the server-side. So that advantage didn't occur to me.
<FromGitter>
<catmando> @drosehn sorry but I got on my favorite soap box :-)
<FromGitter>
<drosehn> My biggest problem is a shortage of time to explore everything that I'd like to work on.
<FromGitter>
<catmando> Time is the only scarce resource. That is why standard economics is so screwed up.
<FromGitter>
<catmando> argh you doing it again, I'm off on soap box # 2!!!
pawnbox has quit [Remote host closed the connection]