jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.18.7 | 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> <ttdonovan> are there plans to roll http/2 into standard lib or is it going exist as a separate shard? https://github.com/crystal-lang/crystal/issues/2125 https://github.com/ysbaddaden/http2
Philpax has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
ponga has quit [Quit: Connection closed for inactivity]
mgarciaisaia has left #crystal-lang [#crystal-lang]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has quit [Ping timeout: 265 seconds]
Philpax has joined #crystal-lang
xmgx has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 258 seconds]
onethirtyfive has joined #crystal-lang
ome has joined #crystal-lang
Philpax has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
Philpax has quit [Ping timeout: 252 seconds]
mark_66 has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <alex-lairan> With crystal can I read config file on compile time for generate code?
<FromGitter> <alex-lairan> I have macro with method and class name, I want to do a big switch with the name of all element like this
<FromGitter> <alex-lairan> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=57b6c999ed79c5ee4f1bc19b]
<jhass> alex-lairan: have a look at the run macro method, it compiles and runs another crystal program which output is inserted as a result of the macro call
<jhass> ECR works through it for example
<FromGitter> <alex-lairan> It's not another crystal file, it's YAML file ^^
<jhass> yes but you can write a crystal file that reads the yaml file and outputs the code you want to generate from it
<FromGitter> <alex-lairan> Oh yes *_*
<FromGitter> <alex-lairan> \*_\*
<FromGitter> <alex-lairan> That is a realy good idea
<FromGitter> <alex-lairan> So with my crystal code, I read the file, I generate a big string, and I return it?
<jhass> just write it to stdout
<FromGitter> <alex-lairan> I love it :)
<FromGitter> <alex-lairan> Thank you dude ! :p
ome has quit [Quit: Connection closed for inactivity]
<FromGitter> <alex-lairan> If i've understand, I can have this part with another language
<FromGitter> <alex-lairan> like ruby
<jhass> in theory yes
<jhass> with the ` macro method then, not run
bjz has joined #crystal-lang
<FromGitter> <alex-lairan> ```{{ run("./router")}}```
akwiatkowski has joined #crystal-lang
mark_66 has quit [Read error: Connection reset by peer]
mark_661 has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 250 seconds]
xmgx has joined #crystal-lang
<crystal-gh> [crystal] lbguilherme opened pull request #3174: Reimplement NamedTuble#fetch(String) using a Trie (master...patch-7) https://git.io/v6XsN
Tuxified has joined #crystal-lang
<FromGitter> <alex-lairan> Hey guy's ! Stupid question here ! :) Why crystal need a GC ?
<FromGitter> <alex-lairan> I think RAII like C++ isn't good for langage like crystal?
bjz_ has quit [Ping timeout: 250 seconds]
bjz has joined #crystal-lang
<BlaXpirit> alex-lairan, have you extensively worked with any language without a GC?
<FromGitter> <alex-lairan> Yes C++ ^^
<BlaXpirit> welp i have nothing new to say then
bjz has quit [Client Quit]
bjz has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
tubbo has joined #crystal-lang
<FromGitter> <sumproxy> There's some novelty in rustlang meaning GC
Philpax has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Philpax has quit [Ping timeout: 250 seconds]
akwiatkowski has quit [Ping timeout: 244 seconds]
fryguy9 has joined #crystal-lang
fryguy9 has left #crystal-lang [#crystal-lang]
<Yxhuvud> I imagine the current boehm GC will end up a pain point at some time as global stop the world doesn't hold up that well in threaded environments.
peter_ has joined #crystal-lang
<peter_> How would one define a hash of hashes? The following code:
<peter_> h = Hash(String, Hash).new
<peter_> Gives an error: can't use Hash(K, V) as generic type argument yet, use a more specific type
<FromGitter> <Sija> `Hash(String, Hash(String, String))`
<FromGitter> <Sija> or `alias MyHash = Hash(String, String)` and then `Hash(String, MyHash)`
<tilpner> Yxhuvud - Boehm is also painful because of the leaks. C doesn't have a choice, but Crystal...? Crystal doesn't have to leak.
Tuxified has quit [Ping timeout: 258 seconds]
akwiatkowski has joined #crystal-lang
<Papierkorb> A Int#hex method could be handy
<BlaXpirit> Papierkorb, i think you're missing something
<BlaXpirit> >> 123.to_s(16)
<BlaXpirit> uh ok
Oliphaunte has quit [Remote host closed the connection]
<havenwood> #=> "7b"
<Papierkorb> BlaXpirit: longer than #hex
<FromGitter> <sumproxy> too much for a bot I guess
<BlaXpirit> Papierkorb, more elegant and universal than #hex
<Papierkorb> Elegance is in the eye of the beholder I guess
<peter_> Thanks <Sija>!
peter_ has quit [Quit: Page closed]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 250 seconds]
mark_661 has quit [Remote host closed the connection]
<RX14> tilpner, boehm leaks? what do you mean.
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 250 seconds]
<tilpner> RX14 - The GC with the beautiful name bdwgc is conservative, not precise.
<tilpner> It doesn't leak much in practice, but it's still ugly, because the leak frequency depends on the content of your data.
<RX14> well i would call it a leak if it expanded constantly
<RX14> in normal use the overhead fraction is fixed
<RX14> of course it is a problem
<tilpner> I don't think the term "leak" implies anything about constant leakage. You can have one leak of constant size, and it's still a leak.
<RX14> well leak to me implies constant flow
<RX14> GC leak to me implies an expansion rate
<tilpner> Hmm, right, maybe it does imply that.
<RX14> regardless of the naming it is a problem
<RX14> but I wouldn't say it's a big problem
<RX14> it would be nice to get a precise, fast, tailored GC but there's more im[portant things to fix first
<tilpner> I agree, and I keep repeating that it's not a big problem in practice every time this is brought up.
<tilpner> The tracing shouldn't be an afterthought though. If it is not kept in mind, switching to precise may require a lot more work than if it had been part of the plan from the very beginning.
<RX14> well i think LLVM has some GC integration
<RX14> i have no idea what said integration does
<RX14> but it might help
Crizkov has joined #crystal-lang
<RX14> they might just be able to tell llvm to do the tracing stuff
<Crizkov> Does Kemal support path with regex? @sdogruyol https://gitter.im/crystal-lang/crystal?at=57b59f3abe8025f1694d301a
<tilpner> I don't know how well that works, but GCs are a very common breaking point when looking at a language, so I'd rank it above "nice to have".
<jeromegn> finally… I can decode and encode protobuf in crystal. now I just need to generate the .pb.cr from .proto files
<jeromegn> “just"
Oliphaunte has joined #crystal-lang
<RX14> Crizkov, no it doesn't
<RX14> because it uses a tree structure for matching, which means it can't support regex
<Crizkov> RX14: Ok, thanks, but How we can solve this problem https://gitter.im/crystal-lang/crystal?at=57b59f3abe8025f1694d301a
<RX14> Crizkov, 1 million routes?
<RX14> seems a bit pointless
<RX14> the issue is not the router, i think but simply the number of methods
<Crizkov> RX14: Ok, I just had curiosity :-D. Thanks for comment!
willl has joined #crystal-lang
vluft has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
steenuil has quit [Ping timeout: 240 seconds]
akwiatkowski has quit [Ping timeout: 244 seconds]
onethirtyfive has quit [Remote host closed the connection]
onethirtyfive has joined #crystal-lang
onethirtyfive has quit [Ping timeout: 250 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]