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
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vKsng
<crystal-gh> crystal/master 8014c49 Ary Borenszweig: Better error message for #2953
<crystal-gh> crystal/master 599d68a Ary Borenszweig: Fixed #2178: %s bug in macros
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
<travis-ci> crystal-lang/crystal#599d68a (master - Fixed #2178: %s bug in macros): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/143481420
ozra has joined #crystal-lang
Philpax has joined #crystal-lang
snsei has joined #crystal-lang
pawnbox has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
pawnbox has quit [Ping timeout: 258 seconds]
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 252 seconds]
mbarbar has joined #crystal-lang
pawnbox has joined #crystal-lang
snsei has joined #crystal-lang
snsei__ has joined #crystal-lang
snsei__ has quit [Remote host closed the connection]
snsei_ has quit [Ping timeout: 252 seconds]
pawnbox has quit [Ping timeout: 258 seconds]
snsei has quit [Ping timeout: 250 seconds]
ome has joined #crystal-lang
pawnbox has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
ozra has quit [Ping timeout: 240 seconds]
mbarbar has quit [Ping timeout: 276 seconds]
<BlaXpirit> how can I forward named args in a macro? https://carc.in/#/r/13kk
<BlaXpirit> wait a second, that seems totally broken
<BlaXpirit> ah there we go. https://carc.in/#/r/13kt - this illustrates the problem
<BlaXpirit> fixed https://carc.in/#/r/13kv
ome has quit [Quit: Connection closed for inactivity]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
<FromGitter> <sdogruyol> hey all
<mose> heya
Raimondii has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
<FromGitter> <sdogruyol> mose: how are you?
<mose> quite well sendar, but a bit sad to hear that crystal doesn't handle multipart / file upload
<FromGitter> <sdogruyol> well, it's just around the corner https://github.com/crystal-lang/crystal/pull/2967
<FromGitter> <sdogruyol> i think it's gonna be there for 0.19.0 :)
<mose> lovely corner this one is!
<FromGitter> <sdogruyol> and it seems really performant
<mose> like crystal used us to be :)
<FromGitter> <sdogruyol> hehe yeah
<FromGitter> <sdogruyol> i'm waiting for this to be merged into 0.19.0 and then i'm gonna add it into Kemal
<mose> amazing
<FromGitter> <sdogruyol> file upload is necessary for any web app
<mose> well, it's expected to be available at leat
<FromGitter> <sdogruyol> and this also gives us the ability to write email / smtp stuff
<mose> ah yes indeed
<mose> big step forward
<FromGitter> <sdogruyol> yeah, we need to thank @RX14 for this :P
<mose> RX14 you are our hero!
<FromGitter> <sdogruyol> i think he did an exceptionally well job
akwiatkowski has joined #crystal-lang
<FromGitter> <sdogruyol> now we need someone to write a email / smtp library :P
<FromGitter> <sdogruyol> this is awesome btw https://github.com/mikel/mail
<mose> yeah great candidate for doing some porting over :)
* mose just received crystal weekly and is thankful for this publication
<FromGitter> <sdogruyol> thank you :)
<mose> btw do you know if the travis issue was fixed?
<FromGitter> <sdogruyol> it's fixed
<FromGitter> <sdogruyol> Kemal specs are passing
<mose> ah superb
<mose> gonna need to verify if my app works with kemal 0.14 :)
<FromGitter> <sdogruyol> it should work :)
<FromGitter> <sdogruyol> session and csrf support added so no breaking changes
<FromGitter> <sdogruyol> :P
<mose> that 0.14 fixes things that I added to my app my myself
<FromGitter> <sdogruyol> like what?
<mose> like session handling and config vars
<FromGitter> <sdogruyol> oh really? that's great to hear
<FromGitter> <sdogruyol> but i think i'm gonna drop this https://github.com/sdogruyol/kemal/issues/160
<mose> but my config thing is special
<mose> I wanted a config I could override with ENV
<mose> selectively
<FromGitter> <sdogruyol> then KEMAL_ENV would definitely work for you, right?
<mose> certainly but I wanted more vars configurable via ENV
<FromGitter> <sdogruyol> i see
<mose> I love when I can remove code to my repo haha
<FromGitter> <sdogruyol> haha yeah :)
<FromGitter> <sdogruyol> for now Kemal has in-memory session store
<FromGitter> <sdogruyol> pretty simple to use
<FromGitter> <sdogruyol> thanks to @mperham
<mose> yeah mine was that way too
<FromGitter> <sdogruyol> i need to update the documentation of website
soveran has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> there we go http://kemalcr.com/docs/sessions/
<mose> \o/
<mose> oh seems your https://github.com/sdogruyol/kemal/blob/master/shard.yml still indicate 0.12.0
<FromGitter> <sdogruyol> ouch
<mose> doesn't seem to hurt though
<FromGitter> <sdogruyol> yeah, nice catch though
<FromGitter> <sdogruyol> thanks
onionhammer has quit [Ping timeout: 250 seconds]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
soveran has quit [Ping timeout: 244 seconds]
trapped has joined #crystal-lang
soveran has joined #crystal-lang
willl has joined #crystal-lang
pawnbox has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
<RX14> hmmn my PR still hasnt really been triaged
Raimondii is now known as Raimondi
<FromGitter> <sdogruyol> it seems pretty OK
<RX14> yeah well i woldn't mind asterite's opinion on the PR, seeming as he's the main contributor
Oliphaunte has joined #crystal-lang
<RX14> i mean its been 2 days and not even tagged
trapped has quit [Read error: Connection reset by peer]
jeromegn has quit [Ping timeout: 272 seconds]
jeromegn has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
Oliphaunte has quit [Remote host closed the connection]
ozra has joined #crystal-lang
<FromGitter> <sdogruyol> well i'm pretty sure that they're busy with something else
<FromGitter> <sdogruyol> or you can ping them yourself
ozra has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
onionhammer has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 252 seconds]
<crystal-gh> [crystal] RX14 opened pull request #2971: Fix bin/crystal in the case of stdout (master...fix-bin/crystal) https://git.io/vKsyX
Oliphaunte has quit [Remote host closed the connection]
<RX14> looks like travis is having a hiccup
<RX14> their number of active jobs has suddenly massively decreased
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <sdogruyol> having a tough time with ecr..
<FromGitter> <sdogruyol> i'm trying to achieve something like content_for / yield_content like stuff
<RX14> i'm not quite sure what you mean
<FromGitter> <sdogruyol> a placeholder for the layout which can be modified by a subview
<RX14> what are you finding hard?
<FromGitter> <sdogruyol> think of something like you want to specify some custom js, css e.g for a specific subview but you dont want to have it in all views
<RX14> capture the block, store it in a map againt the name then call the block when yield_content is called
<FromGitter> <sdogruyol> yeah that's exactly what i am doing
<FromGitter> <sdogruyol> but the thing is that render happens at compiler time it's a macro https://github.com/sdogruyol/kemal/blob/master/src/kemal/helpers.cr#L8-L15
<RX14> uhh
<RX14> why is that a problem?
<FromGitter> <sdogruyol> here's the branch that i am working on https://github.com/sdogruyol/kemal/blob/content-for/src/kemal/helpers.cr
<RX14> you want to compile it in?
<FromGitter> <sdogruyol> you can pull and run the specs if you want.. actually it's ecr which forces to return an io
<RX14> oh uhh yeah the io stuff is an issue
pawnbox has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> when i capture the block
<RX14> you can choose the io name right
<FromGitter> <sdogruyol> it captures the io which the view is hold on and then tries to return that io with the captured block
<FromGitter> <sdogruyol> yeah guess so
pawnbox has joined #crystal-lang
<FromGitter> <sdogruyol> even though i just want to capture the content inside.. not the io
<RX14> if you make the content_from a macro, you can create an io of the same name
<RX14> and then you recieve the data in that io when the block is run
<FromGitter> <sdogruyol> hmm
<FromGitter> <sdogruyol> well actually i dont want to get a handle of that io i just wanna get the content of the block :P
<RX14> then define the proc as taking the current io
<RX14> well uhh
<RX14> hmmn
<RX14> that is the way you would get the content of the block
<FromGitter> <sdogruyol> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=57812006b79455146f7922a7]
<RX14> by overriding the io
<FromGitter> <sdogruyol> i even tried creating a temporary io though
<RX14> did it have the right name?
<RX14> ugh
<FromGitter> <sdogruyol> no just a new MemoryIO
<RX14> yeah well do you know what the code ecr generates looks like?
<FromGitter> <sdogruyol> <html>Hello Kemal\n\n</html>\n\n#<String::Builder:0x10b9afde0>"
<FromGitter> <sdogruyol> i want to get the content of the String::Builder though :P
<RX14> no, the code the ecr macro generates
<RX14> it generates crystal code which writes directly to the IO
<RX14> if you can shadow the io variable in a block you can capture the generated code in that block
<RX14> and kemal controlls the name of the io
<FromGitter> <sdogruyol> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=578120d4064f828707f53b8b]
<RX14> so you can do that
<FromGitter> <sdogruyol> it's weird
<RX14> let me program up what I eman
<FromGitter> <sdogruyol> sure
<FromGitter> <sdogruyol> and also i'm dependent on Kilt
<RX14> this works, i've tested it
<RX14> just updated it to remove something redundant
<RX14> the question is how you want this to work
<RX14> i find it weird that the blocks are in the same file as the templates
<RX14> it makes it so that you need to call the template that the blocks reside in before they are used
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <alex-lairan> Hi here ! How I can change the output color on an `puts` instruction? Thank a lot ! :)
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
<FromGitter> <alex-lairan> Oh ok thank you ! Isn't on the doc? https://crystal-lang.org/docs/
<BlaXpirit> alex-lairan, I sent a link to API docs, you were looking at introductory documentation
<FromGitter> <sdogruyol> RX14 thank you let me check it
<FromGitter> <alex-lairan> Ok :) If I search on the bad place I cannot go far away :D
<FromGitter> <alex-lairan> Thank you for this quick help
<RX14> yeah, the docs are split into book-style docs about the langauge, and api docs for the stdlib
<FromGitter> <sdogruyol> RX14: read before definition of '__blocks__'
<FromGitter> <sdogruyol> trying to call it from render macro
<RX14> what?
<RX14> well
<FromGitter> <sdogruyol> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5781299a3eaf66535e5bd6c4]
<RX14> __blocks__ needs to bet into the local scope somehow
<FromGitter> <sdogruyol> yeah
<RX14> i have no idea how to architect that
<FromGitter> <sdogruyol> let's make it a CONSTANT
<RX14> it really depends on how you want the behaviour to be
<RX14> whether all blocks are globally visible or is it a per-file thing?
snsei_ has joined #crystal-lang
<FromGitter> <sdogruyol> yay, actually making it a CONSTANT worked :P
<FromGitter> <sdogruyol> thanks
<RX14> its not the cleanest solution...
<FromGitter> <sdogruyol> yeah
<FromGitter> <sdogruyol> hacky
<RX14> i think there are better ways of solving the whole prblem
<RX14> so
<RX14> you have an ecr file containing part definitions like these
snsei has quit [Ping timeout: 250 seconds]
<RX14> and you load in kemal
<FromGitter> <sdogruyol> yeah
<RX14> then you can use those functions by anme anywhere
<RX14> and it makes it easier
<RX14> because you only run that file once - on statup
<RX14> which registers the blocks using macros
<FromGitter> <sdogruyol> yeah
<RX14> then the macro in templates becomes a normal function
<RX14> thats how I would do it
snsei_ has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> well i'm not following you that much actually
<RX14> i mean just seperating the content_for bloks into a seperate file basically
snsei has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> well
<FromGitter> <sdogruyol> i'd like to have the same behaviour as Sinatra / Rails
<RX14> well, what scope do content_for blocks exist in with sinatra?
<RX14> is it per-file?
<FromGitter> <sdogruyol> probably but not sure
<FromGitter> <sdogruyol> let me check the source
<RX14> if you try and use yield_content before content_for, what happens?
<FromGitter> <sdogruyol> ughh
<FromGitter> <sdogruyol> dunno :D
<RX14> yeah i found it
<FromGitter> <sdogruyol> looks pretty cool
<FromGitter> <sdogruyol> they handle the case you mentioned
<RX14> looks like the blocks are global
<RX14> to me
<FromGitter> <sdogruyol> yeah, seems the same
<RX14> depends where heper is included
<FromGitter> <sdogruyol> and yeah travis is really slow atm
<FromGitter> <sdogruyol> the build hasnt even started after 2 mins lol
<RX14> uhh its not slow
<RX14> its been down for 2.5 hours
<FromGitter> <sdogruyol> lol
<FromGitter> <sdogruyol> they should rewrite those sinatra apps with kemal :P
<RX14> and the team must be out getting smashed because they havent responded to anything or updated their status the whole time
<RX14> damn weekends
<FromGitter> <sdogruyol> now i'm gonna check what happens if i try to call a non-existent key for yield_content :P
<RX14> you'll get a key error
<RX14> of course
<FromGitter> <sdogruyol> gotta like compile-time errors :P
<RX14> it's not a compile time erro though
<RX14> it'll just error accessing the hash with a non-existant key
<FromGitter> <sdogruyol> you are right
snsei_ has joined #crystal-lang
Oliphaunte has joined #crystal-lang
snsei has quit [Ping timeout: 250 seconds]
Oliphaunte has quit [Ping timeout: 272 seconds]
<FromGitter> <deepj> I’m getting the following warning on macOS Sierra PB1
<FromGitter> <deepj> [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
<RX14> i don't thnik thats a crystal problem
<FromGitter> <deepj> but I can’t run a simple Kemal app (I’m not sure if the above issue is connected to this) on macOS Sierra but other simple crystal scripts yes
<RX14> well actually it looks like a libevent issue
<RX14> according to a bug report on the chrome bug tracker, it's a libevent issue
<RX14> they fixed it by editing their vendored libevent
<RX14> but we don't vendor libevent so you'll have to update the shard library - if there's a fix
<RX14> shared*
<FromGitter> <deepj> @RX14 I see, thanks. I’ll take a look at if there is a patch for Homebrew version
<RX14> if you want to DIY thats the patch to libevent
<RX14> i'm not familiar how to use homebrew etc. so I can't really help you more than that
<crystal-gh> [crystal] RX14 opened pull request #2972: Add IO::Sized (master...feature/sized-io) https://git.io/vKsdL
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 240 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
trapped has joined #crystal-lang
Raimondii is now known as Raimondi
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 244 seconds]
pawnbox_ has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
sergey_makagon has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
soveran has quit [Remote host closed the connection]
trapped has quit [Read error: Connection reset by peer]
Oliphaunte has quit [Remote host closed the connection]
sergey_makagon has quit []
<16WAAM0WH> [crystal] asterite pushed 2 new commits to master: https://git.io/vKshA
<16WAAM0WH> crystal/master 933d07c RX14: bin/crystal fix for cd stdout
<16WAAM0WH> crystal/master 8e622b1 Ary Borenszweig: Merge pull request #2971 from RX14/fix-bin/crystal...
<18VABAY0A> [crystal] asterite closed pull request #2971: Fix bin/crystal in the case of stdout (master...fix-bin/crystal) https://git.io/vKsyX
elia has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
<crystal-gh> [crystal] RX14 opened pull request #2973: Add IO::Delimited (master...feature/delimited-io) https://git.io/vKsjK
<travis-ci> crystal-lang/crystal#8e622b1 (master - Merge pull request #2971 from RX14/fix-bin/crystal): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/143605853
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 276 seconds]
soveran has joined #crystal-lang
elia has quit [Ping timeout: 240 seconds]
willl has quit [Quit: Connection closed for inactivity]
llamatarianism_ has joined #crystal-lang
Oliphaunte has joined #crystal-lang
llamatarianism_ has quit [Quit: Page closed]
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
zodiak has joined #crystal-lang
zodiak_ has quit [Read error: Connection reset by peer]
zodiak_ has joined #crystal-lang
zodiak has quit [Ping timeout: 240 seconds]
zodiak has joined #crystal-lang
zodiak_ has quit [Ping timeout: 240 seconds]
soveran has quit [Remote host closed the connection]
akwiatkowski has quit [Ping timeout: 244 seconds]
Oliphaunte has quit [Remote host closed the connection]
snsei_ has quit [Remote host closed the connection]
SShrike has joined #crystal-lang
kulelu88 has joined #crystal-lang
kulelu88 has quit [Changing host]
kulelu88 has joined #crystal-lang