jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.17.4 | 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
Philpax has joined #crystal-lang
Philpax_ has joined #crystal-lang
ragmaanir_ has joined #crystal-lang
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ragmaanir has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
matp has joined #crystal-lang
Philpax_ has quit [Ping timeout: 240 seconds]
Philpax has quit [Ping timeout: 240 seconds]
ragmaanir_ has quit [Quit: Leaving]
willl has quit [Quit: Connection closed for inactivity]
LastWhisper____ has joined #crystal-lang
|meta has quit [Quit: Connection closed for inactivity]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
LastWhisper____ has joined #crystal-lang
tommoor has quit [Quit: Connection closed for inactivity]
pawnbox has joined #crystal-lang
Philpax has joined #crystal-lang
Philpax_ has joined #crystal-lang
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax_ has quit [Quit: Leaving]
Philpax has quit [Ping timeout: 246 seconds]
sdogruyol has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
mark_66 has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
ruslux has joined #crystal-lang
sdogruyol has quit [Quit: Connection closed for inactivity]
pawnbox has joined #crystal-lang
<jsaak> do you think crystal is able to run in a browser with the help of emscripten and asm.js? Is there any c code linked or used?
<jhass> jsaak: not without a lot of work, there's tons of C used, libevent, libgc (boehm-gc), libxml2, tons of syscalls...
steenuil has joined #crystal-lang
<jhass> libyaml
<jsaak> thanks jhass
TheLemonMan has joined #crystal-lang
Philpax has joined #crystal-lang
triangles has joined #crystal-lang
triangles2 has quit [Ping timeout: 240 seconds]
triangles2 has joined #crystal-lang
triangles has quit [Ping timeout: 240 seconds]
trapped has joined #crystal-lang
<jokke> jhass: do you need something for https://github.com/crystal-lang/crystal/pull/2630 ?
<jhass> I think I won't touch the openssl stdlib
pawnbox has quit [Remote host closed the connection]
<jokke> jhass: aww come on
<jokke> hm i think i'll add another method thoguh
<jhass> no, I'd have the aspiration to do it right, not patch things in as needed but provide an actual more usable abstraction. And not the time for that
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
LastWhisper____ has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vryNF
<crystal-gh> crystal/master 7181da8 Ary Borenszweig: Replace some `macro def`s with simple `def`s
<crystal-gh> crystal/master e773e69 Ary Borenszweig: Use splat and double splat restrictions in Tuple and NamedTuple for more type correctness. Fixes #1828
<travis-ci> crystal-lang/crystal#e773e69 (master - Use splat and double splat restrictions in Tuple and NamedTuple for more type correctness. Fixes #1828): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/133397315
mark_66 has quit [Quit: Leaving.]
kulelu88 has joined #crystal-lang
kulelu88 has quit [Changing host]
kulelu88 has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
Philpax has quit [Ping timeout: 252 seconds]
|meta has joined #crystal-lang
ruslux has quit [Ping timeout: 250 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kulelu88 has quit [Quit: Leaving]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LastWhisper____ has joined #crystal-lang
<asterite> jhass: <3 for cleaning up a lot of issues
<asterite> we need someone to take care of openssl...
<asterite> like, giving him/her committer access, probably
<jhass> yeah...
* jhass hides
* asterite hides too
<jhass> btw some more discipline in labeling issues would be great :P
<asterite> sure! how can we improve things?
<jhass> don't close the tab for/navigate away from an issue until it has a label ;)
<jhass> *keep it empty
<jhass> perhaps we also should start to label PRs
<asterite> I see
<asterite> Well, I'd personally close that issue, you can't fork a std library and redefine the same constants. Contributions should go to the openssl module in the standard library (but then we have the issue of who takes care of that, but it's another issue)
<jhass> oh next thing, be more aggressive about closing issues
<asterite> Ok, I'll start :-)
<jhass> https://github.com/crystal-lang/crystal/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aquestion should also probably never have anything older than a month, else it's not a question and should not be labeled as such
<jhass> and I guess it would be great if you could go through https://github.com/crystal-lang/crystal/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3ARFC+label%3Adraft and remove the draft label and add accepted for things which should happen eventually
<jhass> and close ones that should not happen
<asterite> We can probably check "question" and "need more info" once a month and close the ones that are old
<asterite> I'll do that for those, now
<jhass> yeah
<jhass> asterite: btw tail recursion is not just a performance thing
<jhass> it allows certain ways to write stuff in the first place
<jhass> some problems are much more elegantly expressed using recursion
tomchapin has joined #crystal-lang
<asterite> True, but I think that style happens more in functional languages, where you have, say, List with tail and head
<asterite> I'd like to close #2499, until 1.0 I don't see a good reason to start distributing debian packages
<asterite> (or, if someone wants to distribute an unofficial one, they can do it)
<asterite> what do you think?
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<jhass> yeah I agree
<jhass> we wouldn't want a version < 1.0 to land in stable
<jhass> !enable GithubIssues
<DeBot> jhass: GithubIssues is already enabled.
<jhass> mh
<jhass> broken I guess
pawnbox has quit [Ping timeout: 246 seconds]
<jhass> asterite: the popular examples for tail recursive functions are fibonacci and factorial of course
<jhass> have yet to see a language where the iterative versions would be remotely as elegant ;)
<jhass> though implicitly recognizing would be a lot nicer than a tag of course
<jhass> and if you have a tag you kinda want to verify correctness anyway, else you get segfaults I imagine
<asterite> but I don't know what we can do about it... rewrite a function from recursive to using a stack?
<asterite> I can leave the issue open, though :)
<asterite> we could maybe find a solution in the future
<asterite> Go doesn't have tail call optimization either, and I read in a few places that it's because Go is not a functional language. I really believe that TCO is more for languages that without it can't work. And cases like fact and fib don't happen in real life, and when they do you can write it with a loop
<BlaXpirit> /agree
<asterite> Recursion does happen, though, but it usually never consumes the whole stack... and when that happens it's probably a bug in the code
<jhass> close it, we can easily revisit it after 1.0
<jhass> btw Ruby has TCO as a compile time flag or explicitly via the RubyVM API or so ;)
<RX14> what are the downsides to implementing tail call?
<jhass> work
<RX14> well, i like tail call really
<RX14> there has been plenty of time i wished i had TCO in java
<RX14> it's not top priority though
mgarciaisaia has left #crystal-lang [#crystal-lang]
<jhass> yup, I too disagree with the "only useful in functional languages" stance, it is mandatory for most functional languages but can still be useful in OOP languages
<RX14> plus, crystal can be pretty functional
<RX14> just like ruby
<RX14> it's not exactly java OOP is it?
<RX14> even java is becoming more functional
<RX14> ruby and crystal is a nice mix
<jhass> well, for ruby I'd argue it's even stronger OO than java :P
<RX14> thats what i emant
<jhass> everything but variables and constants are or can be represented by an object
<RX14> well
<RX14> yes, it's stringer OO
<RX14> and it's stronger FP
<RX14> its both
<jhass> :)
<RX14> it's why i like ruby so much
<RX14> and crystal even more
<RX14> ruby feels nice but has this kinda dirty feel where you're hoping nothing breaks in the next 5 mins
<RX14> crystal being compiled and typed doesn't really feel the same
<jhass> while being self referential I like how even the class hierarchy root is following a OO design in ruby
triangles2 has quit [Quit: Leaving]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vrSaS
<crystal-gh> crystal/master ed38949 Ary Borenszweig: Parser: add some missing locations to ast nodes
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
willl has joined #crystal-lang
Raimondi has quit [Quit: The road to wisdom?—Well, it's plain and simple to express: Err and err and err again, but less and less and less. — Piet Hein]
Raimondi has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
pawnbox has joined #crystal-lang
<jhass> oh we broke through the 5k stars today
<wmoxam> we did it! Ship it!
<asterite> yes! :-)
<asterite> something happened lately that more stars and tweets are happening. Maybe it's sidekiq
<BlaXpirit> :)
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 250 seconds]
ryanw-se has joined #crystal-lang
pawnbox has joined #crystal-lang
TheLemonMan has joined #crystal-lang
<|meta> I am fighting with crystal: http://hastebin.com/cateceneci.vala
<|meta> why doesnt crystal know what type @words should be?
<|meta> asterite: Sidekiq in crystal was in Ruby Weekly, which reaches many thousands of people. probably responsible for some influx
<jhass> |meta: the compiler is giving you the rules in the error message
<jhass> it doesn't have .scan and .map typed at this point, so it can't infer the type for @words
<|meta> at some point in the future, would this code run unhindered?
<jhass> unlikely, we just moved into the opposite direction with 0.16
<jhass> let me get the issue
<|meta> so how would I accomplish what im trying to do
<|meta> what is the idiomatic way
<BlaXpirit> |meta, are you sure you need the file as an instance variable?
<|meta> thats what I did in ruby, but I'm sure that's probably wrong too
<asterite> probably adding `@words : Array(String)` is enough in this case
<BlaXpirit> |meta, https://carc.in/#/r/zzp
pawnbox has quit [Ping timeout: 246 seconds]
<|meta> I added @words : Array(String) and made a getter for words and it works perfectly
<jhass> |meta: another variant https://carc.in/#/r/zzt
pawnbox has joined #crystal-lang
<BlaXpirit> neat
<|meta> ^
<BlaXpirit> this `new File.read` can be confusing. especially because it has an entirely different meaning in javascript
<|meta> javascript is terrible though
<BlaXpirit> sure
<BlaXpirit> i'd use new(...) . well, I'd leave it in two lines, too
<jhass> heh, wouldn't notice I don't do enough JS :P
<|meta> I'd even argue that confusing javascript-ers is a feature, not a bug
tomchapin has joined #crystal-lang
<RX14> "new x" is hardly a javascript thing
<RX14> it's from C++ isn't it?
<BlaXpirit> yeah, that too
<RX14> but yes, it is confusing
<RX14> self.new would work?
<RX14> >> class F; def self.t; self.new(); end; end; pp F.t
<DeBot> RX14: F.t = #<F:0x8d73fe8> - more at https://carc.in/#/r/zzx
<RX14> yeah that works
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vrSdE
<crystal-gh> crystal/master ca3b71c Ary Borenszweig: Fixed #2655: named tuple without comma compiles
<jhass> mmh, bug? https://carc.in/#/r/zzz
<jhass> uh oh, last 3 digit paste :(
<jhass> asterite: ^
Dreamer3 has joined #crystal-lang
dhk has joined #crystal-lang
<asterite> Mmm... yes, casting to Int shouldn't be supported right now
<jhass> not the answer I hoped for :P
<travis-ci> crystal-lang/crystal#ca3b71c (master - Fixed #2655: named tuple without comma compiles): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/133480566
<jhass> also master is somehow broken for me, the record macro and/or GC's usage of it is all over the place, mmh
Davy_CC_ has joined #crystal-lang
<jhass> asterite: you can compile master with a master compiler?
Davy_CC has quit [Ping timeout: 240 seconds]
<asterite> yes
<asterite> you can't?
<BlaXpirit> jhass, compiles here
<jhass> make twice?
<BlaXpirit> jhass, yes git pull && make && git pull && make
<jhass> mmmh
<jhass> it's like macro level .is_a?(TypeDeclaration) is broken for me
<BlaXpirit> jhass, but how is it possible? get a fresh repo clone maybe?
<jhass> idk, was my thought too
<jhass> one other thing first though, my global crystal is still at .3
<jhass> getting a global .4 for the first build first
<BlaXpirit> jhass, i reproduced
<jhass> :o
<BlaXpirit> make clean && make && make
<jhass> yup
<BlaXpirit> same distro as you, same situation
<BlaXpirit> but this is kinda scary..? so compiling with a different compiler doesn't error but produces a different compiler
<jhass> yeah, it is
<jhass> so, .4 -> master -> master works
<BlaXpirit> indeed.
LastWhisper____ has quit [Ping timeout: 260 seconds]
<asterite> jhass: I can't reproduce this on mac, just tried `make` and `make` again. Please open an issue :-)
<jhass> asterite: read the logs :P
<jhass> it happens with 0.17.3 -> master -> master
<jhass> 0.17.4 -> master -> master is fine
<asterite> Oh! Phew...! :-)
<asterite> I guess it's because new(*args : *T) in tuple didn't work well
<asterite> I thought I had solved that in 0.17.3 but soon found out a small bug. But 0.17.4 has that solved
<asterite> Or maybe the macro stuff, don't know :-)
<jhass> well, to be clear 0.17.3 can compile master
<jhass> the resulting compiler can't compile master again
<jhass> apparently .is_a?(TypeDeclaration) in the macro language no longer matches
<jhass> for whatever reason
grios has joined #crystal-lang
willl has quit [Quit: Connection closed for inactivity]
Redfoxmoon has quit [Ping timeout: 252 seconds]
Kitt3n has joined #crystal-lang
Kitt3n has quit [Excess Flood]
Kitt3n has joined #crystal-lang
Kitt3n has quit [Changing host]
Kitt3n has joined #crystal-lang
pawnbox has quit [Ping timeout: 272 seconds]
pawnbox has joined #crystal-lang
willl has joined #crystal-lang
<Dreamer3> so we still not calling crystal production ready?
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<RX14> Dreamer3, well i don't think anyone will till 1.0
<RX14> doesn't mean people won't use it in production
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Kitt3n is now known as Redfoxmoon
|meta has quit [Quit: Connection closed for inactivity]
<jhass> asterite: btw what about moving https://github.com/manastech/crystal-sqlite3 to crystal-lang?
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Ven has quit [Client Quit]
pawnbox has joined #crystal-lang
Ven has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
LastWhisper____ has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]