RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.0 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
<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> <johnjansen> returning to the original example ⏎ ⏎ ``` return if (localvar = collection[key]?).nil?``` [https://gitter.im/crystal-lang/crystal?at=583f68a873abd79c55b9e7f3]
<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)
emancu has joined #crystal-lang
Philpax has joined #crystal-lang
<travis-ci> crystal-lang/crystal#c5cf484 (master - Add ArrayLiteral#[]= in macros): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180136645
emancu has quit []
matp has quit [Quit: ZZzzzZz...]
<travis-ci> crystal-lang/crystal#760268b (master - Move filename and some file location methods under to Crystal::Macros::ASTNode): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180068551
ome has joined #crystal-lang
emancu has joined #crystal-lang
<travis-ci> crystal-lang/crystal#17c829d (master - Pretty print: call inspect if redefined): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180083500
dhk has quit [Quit: Leaving]
emancu has quit []
matp has joined #crystal-lang
triangles has quit [Quit: Leaving]
triangles2 has quit [Quit: Leaving]
<crystal-gh> [crystal] MakeNowJust closed pull request #3601: Correct IO#read_fully example (master...fix/io-read-fully-example) https://git.io/v1I1q
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 265 seconds]
soveran has joined #crystal-lang
Philpax has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
ponga has quit []
Philpax has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<crystal-gh> [crystal] MakeNowJust opened pull request #3615: Add missing ArrayLiteral#[]= doc (master...fix/doc/array-lit-assign) https://git.io/v1sNz
muelleme has joined #crystal-lang
<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…]
rolha has joined #crystal-lang
snsei has joined #crystal-lang
poikon has quit [Ping timeout: 260 seconds]
poikon has joined #crystal-lang
jeromegn has quit [Ping timeout: 246 seconds]
jeromegn has joined #crystal-lang
rolha has quit [Quit: Textual IRC Client: www.textualapp.com]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 256 seconds]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/v1ZtT
<crystal-gh> crystal/master 9a99bca TSUYUSATO Kitsune: Add missing ArrayLiteral#[]= doc
<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
<crystal-gh> [crystal] asterite closed pull request #3612: Add finished macro hook (master...feature/finished) https://git.io/v13Jj
hako_ has quit [Remote host closed the connection]
hako_ has joined #crystal-lang
catmando has joined #crystal-lang
<catmando> Hello - wondering how much work has been done to get crystal (or reasonable subset) working in JS on the browser?
<FromGitter> <catmando> not sure how this works, but I dropped off the IRC, and am just listening here...
catmando has quit [Ping timeout: 260 seconds]
gloscombe has quit [Remote host closed the connection]
<FromGitter> <cjgajard> links of interest: https://github.com/geppetto-apps/crow , #829 and #535
<DeBot> https://github.com/crystal-lang/crystal/issues/829 (Plans about WebAssembly) | https://github.com/crystal-lang/crystal/issues/535 (Crystal Compiler can't target asm.js)
<FromGitter> <catmando> yes I saw both those issues, but it was very unclear where the direction was or the resolution.
<FromGitter> <catmando> @cjgajard - thanks seems like crow was the one I was looking for :-)
hako_ has quit [Remote host closed the connection]
hako_ has joined #crystal-lang
<travis-ci> crystal-lang/crystal#9a99bca (master - Add missing ArrayLiteral#[]= doc): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180454466
hako_ has quit [Client Quit]
<travis-ci> crystal-lang/crystal#135fc1c (master - Fix doc inherited from generics class or module): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180454753
vasilakisfil has joined #crystal-lang
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.
<travis-ci> crystal-lang/crystal#258be5b (master - Add finished macro hook): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180455355
<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]
<FromGitter> <drosehn> :smiley:
<travis-ci> crystal-lang/crystal#6b098eb (master - Let method_missing also generate a def): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180455242
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
pduncan has quit [Ping timeout: 240 seconds]
matp has joined #crystal-lang
matp_ has quit [Ping timeout: 250 seconds]
soveran has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 5 new commits to master: https://git.io/v1nBZ
<crystal-gh> crystal/master cc533e4 Ary Borenszweig: Macros: added `TypeNode#constant`. Fixes #1586
<crystal-gh> crystal/master 81f949d Ary Borenszweig: Macros: support double splat
<crystal-gh> crystal/master 0ce0600 Ary Borenszweig: Parser: fixed bug when parsing case ... when ... then