ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.5 | Fund Crystal's 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
unshadow has quit [Ping timeout: 240 seconds]
<adam12> Am I crazy or are compile times getting longer?
bjz has joined #crystal-lang
<RX14> adam12, where did you download crystal?
<adam12> RX14: Installed through homebrew. Not sure if crystal tap tho
<RX14> hmm
<adam12> I think it's through manastech/crystal. I haven't debugged but tiny app is like 10second compile. Maybe it's just me.
<adam12> 0.20.5
<RX14> huh
<RX14> run it with --stats
<RX14> interesting
<RX14> seems like a perf regression
<RX14> i've never seen that high a percentage of time spent in crystal versus llvm
<adam12> Yeah. seems strange.
<adam12> This is basically generated app + one shard (crouter) and one small file with a few lines for crouter.
<RX14> ohh, macros
<adam12> Yeah. Lots of macros in crouter I think
<adam12> I looked briefly.
<RX14> what are the compile times in a similar kemal app?
<RX14> would that be easy to check?
<adam12> It started as a kemal app. Maybe I can just revert. Hang tight.
<adam12> RX14: no real difference that I can see, tho I am not familiar with stats format. https://gist.github.com/adam12/431c7c9ae2102a547a11db00ceb3f5c4
<RX14> look at the times
<RX14> oh
<RX14> nevermind
<adam12> They look close. And `time` is very close.
<RX14> didn't see that 6 in there
<RX14> between all the zeroes
<adam12> Yeah. Heh.
<RX14> yeah thats weird
<adam12> Hmm. Oh well. Maybe it won't be horribly linear as app grows.
<RX14> would it be possible to send me your app to have a look?
<RX14> i can compile the whole crystal compiler in dev mode in about 20s so it should not be that long
<RX14> 26s for the whole crystal compiler in dev mode on my machine so your compile times being 10s is weird
<adam12> Yeah - should be no prob, but it's basically just crystal init app + kemal (or crouter) shard, and one hello world route.
<RX14> hmm
<RX14> well i just looked at the time
<RX14> and I really should be going to sleep so i'm just going to say that those compile times aren't normal
<RX14> you should try cloning the crystal repo and building crystal with make crystal release=true
<RX14> and then using /path/to/repo/bin/crystal build foo.cr
<adam12> Does that use installed crystal?
<RX14> and see if that takes less time
<adam12> OK I'll give it a shot.
<RX14> adam12, it uses the currently installed crystal to build a new crystal
<adam12> RX14: https://github.com/adam12/crystal-compile-debug if you're still around
<adam12> and after that I'll leave you alone :) much thnx.
<adam12> src/agent.cr is the entry point.
<RX14> hmm
<RX14> I do get 3.91s
<adam12> removing dependencies brings it right down.
<adam12> (ie. compiling empty app)
<RX14> yeah...
<RX14> it's something in kemal
<RX14> I get 2.7s compile times on a much larger webapp
<RX14> so maybe report that to kemal...
<adam12> I get same times with crouter
<adam12> so maybe it's macros?
<RX14> but it's not many macros
<RX14> in either case
<RX14> it's weird
<adam12> No.. not many at all.
<adam12> It is.
<adam12> What's the larger webapp running? Just plain HTTP?
<RX14> it's compiling like 5 libraries
<RX14> and a HTTP server, and some background processing stuff
<RX14> crystal-db especially is really quite large in terms of code
<RX14> also I use macros too
<RX14> and quite a lot of them
<RX14> so
<adam12> Hmm
<RX14> anyway i need to go now
<RX14> cya
<adam12> thnx
<RX14> np
<RX14> maybe report it to @sdogruyol
<adam12> okie
<RX14> or maybe on the crystal issue tracker
<RX14> it's reproducable so...
<RX14> for reference
<RX14> Semantic (main) took more than half the time on your tiny kemal app as the WHOLE of the crystal compiler
<RX14> considering that the crystal compiler uses a large part of the stdlib too
<adam12> yeah I don't get it. Gonna try HEAD and maybe a version or two back of crystal. see if I can isolate something
sz0 has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
soveran has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 256 seconds]
soveran has quit [Ping timeout: 240 seconds]
unshadow has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #3922: Removes `assert do ... end` (master...remove-assert) https://git.io/vMH0e
<DeBot> https://github.com/crystal-lang/crystal/pull/3922 (Removes `assert do ... end`)
<travis-ci> crystal-lang/crystal#566bd74 (master - Adds deprecation note on `assert do ... end`): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/196261798
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 245 seconds]
matp has quit [Quit: ZZzzzZz...]
<crystal-gh> [crystal] asterite pushed 18 new commits to master: https://git.io/vDUnB
<crystal-gh> crystal/master 0e44106 Ary Borenszweig: Char::Reader: add backwards traversal
<crystal-gh> crystal/master ae8afca Ary Borenszweig: IO: increase skip buffer size
<crystal-gh> crystal/master 2edd4d3 Ary Borenszweig: Compiler: fixed incorrect associativity of `foo bar.baz(x) do ... end`
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
Kug3lis is now known as Kug3lis_off
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 240 seconds]
matp has joined #crystal-lang
matp has quit [Quit: ZZzzzZz...]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
unshadow has quit [Quit: leaving]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 245 seconds]
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 245 seconds]
bungoman has joined #crystal-lang
bungoman has quit [Client Quit]
bungoman has joined #crystal-lang
matp has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 245 seconds]
unshadow has joined #crystal-lang
<unshadow> Do you guys know how to update https://github.com/crystal-lang/crystal_lib to work with Crystal 0.20.5 ? It gives me cannot convert struct error
unshadow has quit [Quit: leaving]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
A124 has quit [Ping timeout: 255 seconds]
DeBot has quit [Remote host closed the connection]
DeBot has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 260 seconds]
Raimondii is now known as Raimondi
unshadow has joined #crystal-lang
A124 has joined #crystal-lang
Ven has joined #crystal-lang
danielpclark has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<danielpclark> Hey all! I just ported the first Ruby gem I ever wrote over to Crystal as my first shard. It's on Github, where do I publish it? (like crystalshards.xyz)
<danielpclark> I can't seem to find a publish script, command, or form.
<BlaXpirit> danielpclark, there is no such thing. putting it on github is publishing it
<danielpclark> I see. Then maybe crystalshards.xyz scrapes Github for them.
<BlaXpirit> danielpclark, yes basically
<BlaXpirit> what you might want to do is letting people know about it
<danielpclark> Thanks. It provides a few more methods for working with strings. Here's the link https://github.com/danielpclark/MightyString/tree/crystal . Shared on Twitter also.
<BlaXpirit> danielpclark, welp actually this is not a properly published library
<BlaXpirit> any way that someone may choose to install it would basically just see ruby code
<BlaXpirit> look at github, press on the maroon bar below "47 commits/2 branches/..."
<BlaXpirit> says Ruby 99.1%, so no tools will detect it as a crystal library
<BlaXpirit> basically what i'm getting at is just making a branch is no good
<danielpclark> Ah. hmmm...
<BlaXpirit> releases of two different things can't be shared in one repository
<danielpclark> I'll get to it later. Need to get two hours of sleep before church. Thanks for your help!
<BlaXpirit> ok np
<unshadow> Oh right, for some ppl it's a free day XD
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 245 seconds]
soveran has quit [Remote host closed the connection]
Kug3lis_off is now known as Kug3lis
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
<jokke> adam12: hi
<jokke> adam12: i'm the author of crouter
<jokke> adam12: as explained in the readme, crouter generates all routes at compile time which is also responsible for the good performance during runtime
<jokke> it would be interesting to see if the performance gain is in any relation to the compile time.
<jokke> maybe i'll create a "runtime" branch at some time and benchmark the different implementations
<jokke> i'm glad to see people use crouter :) Even with mighty alternatives such as kemal out there
bjz_ has joined #crystal-lang
<RX14> I would use kemal if it had the option of routes not being at the top level...
<RX14> I recently made my own tiny little router which I like though, using the radix tree shard that kemal uses too
soveran has joined #crystal-lang
bjz has quit [Ping timeout: 255 seconds]
<jokke> RX14: ah interesting :) i'd love to see a comparing bechmark between crouter and your radix tree router!
<RX14> well it would be the same as kemal
<RX14> really
<RX14> routing is such a small percentage of the time I don't think it really matters
<jokke> yeah i guess you're right
<jokke> also it's way better to test
<RX14> although the implementation is a bit long... https://github.com/luislavena/radix/blob/master/src/radix/tree.cr
<jokke> does it support optional parts?
<RX14> i'm not sure
soveran has quit [Ping timeout: 245 seconds]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
unshadow has quit [Quit: leaving]
DeBot has quit [Remote host closed the connection]
DeBot has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Client Quit]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 245 seconds]
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
<BlaXpirit> note: in the last few days Gitter has been unstable, so the bridge bot was inactive for about a day, and then for the last day, the bot was able only to send messages from IRC to Gitter, not the other way. the streaming API (to receive messages) returns 502 Bad Gateway
FromGitter has joined #crystal-lang
<Papierkorb> oh boy
unshadow has joined #crystal-lang
bew78 has joined #crystal-lang
<danielpclark> Hey all, I ported the first Ruby gem I ever wrote over to Crystal as my first shard. https://github.com/danielpclark/mightystring.cr . It adds some helpful methods for strings.
<RX14> danielpclark, looks nice, a few comments: #first and #last could return Char instead of a String, and "0".."9" should work instead of the Range.new
<adam12> jokke: Crouter is nice, thanks. I like Kemal too but I prefer to have my routes inside a class. I don't know where the performance hit is - I moved on temporarily.
<danielpclark> Thanks for the tips. I haven't used Crystal much so I'm not sure how important it is for single characters to be Char. I wrote it to preserve original behavior.
<danielpclark> Which may not be ideal...
<RX14> well it'll obviously still work, but returning char would be more consistent with the stdlib
<RX14> if it's guaranteed to be a string with only 1 char anyway
<danielpclark> Right.
<jokke> danielpclark: chars can be concatenated with strings and be used in string interpolation so for most use cases i think returning a char should be fine
<RX14> there's no real disadvantage as I see it
<jokke> ^
<RX14> plus, char is represented as an integer instead of a class, so it's got a performance advntage
<jokke> i was thinking of writing something similar to davenport/rofi in crystal but using a higher abstraction level for the ui and to be usable as a lib. any suggestions for a ui library that works with crystal?
<jokke> i think jhass wrote bindings for gtk+ but gtk+ seems too much for this simple gui
<jokke> basically i only have a text field which narrows down a list with fuzzy search
<jokke> plus some key bindings
soveran has joined #crystal-lang
<bew78> jokke: you want a GUI or TUI ?
<jokke> gui
soveran has quit [Ping timeout: 240 seconds]
<jokke> but i don't think it has a list component
<RX14> jokke, you could bump this: https://github.com/andlabs/libui/issues/44
mikolaj9 has joined #crystal-lang
<mikolaj9> crystal is a compiler for ruby?
<mikolaj9> it uses all C extension or not?
<RX14> no, crystal is a completely new programming language heavilly based on ruby
<RX14> it's not compatible at all
<mikolaj9> aha
<mikolaj9> crystal have bytecode?
<RX14> you can read the language goals on the website: https://crystal-lang.org/
<RX14> crystal compiles to native code
<mikolaj9> I read, show me where is answer on this page about bytecode
<RX14> that was responding to your earlier question
<mikolaj9> yes compile to native code but AST,bytecode
<mikolaj9> is possible generating AST or bytecode, opcode in compiling chains
<RX14> you can dump the llvm ir
<mikolaj9> gcc have AST, llvm have AST too
<mikolaj9> ir is not bytecode, ast != ir
<RX14> well the compiler obviously has an internal AST
<mikolaj9> Aha
<RX14> but it's not stable, nor can you dump it to a text format
<RX14> you can require the compiler from crystal and traverse the AST
<RX14> but thats pretty advanced
<mikolaj9> Aha
<mikolaj9> thanks
<RX14> by the way bytecode is usually executed by a VM, so if crystal used bytecode it wouldn't compile to native code
mgarciaisaia has joined #crystal-lang
<mikolaj9> teoreticaly I can write my own bytecode and i 'm not needed write compiler to native code ;-)
mikolaj9 has left #crystal-lang [#crystal-lang]
<jokke> weird dude :D
Kug3lis is now known as Kug3lis_off
balduin has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
bew78 has quit [Quit: WeeChat 1.7]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<unshadow> XD
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
balduin has quit [Remote host closed the connection]
balduin has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Ping timeout: 240 seconds]
bjz_ has joined #crystal-lang
bjz_ has quit [Read error: Connection reset by peer]
Kug3lis_off has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
soveran has quit [Remote host closed the connection]
<danielpclark> How does the shard handle semver from git repos? Is it handle by git tags?
<RX14> danielpclark, yes, git tags vx.x.x are parsed to provide shard versions
<RX14> you can read the shards spec
<danielpclark> Thank you
<RX14> in the repo
<RX14> make sure it has the "v" prefix though
<RX14> it's caught me out a few times!
<danielpclark> Got it.
<danielpclark> In Ruby with rake release the v is the standard.
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<danielpclark> I guess using branch: master rather than version: 1.0.0 is a big risk for updates
balduin has quit [Remote host closed the connection]
soveran has quit [Ping timeout: 245 seconds]
balduin has joined #crystal-lang