jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.17.3 | 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
<jhass> I don't think so
<jhass> you could write a macro that merges two though
soveran has joined #crystal-lang
elia has quit [Quit: (IRC Client: textualapp.com)]
pawnbox has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
matp_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ozra has quit [Ping timeout: 276 seconds]
ozra has joined #crystal-lang
bjz has joined #crystal-lang
<emancu> jhass: that is something thay I tried to do but don't know how to ?
<jhass> emancu: https://carc.in/#/r/z38
<emancu> interesting
<emancu> that is easier than i thought
<emancu> thx jhass! you are awesome
<emancu> jhass: do you know why I can't use it inside a module? https://carc.in/#/r/z39
<jhass> emancu: the issue isn't that you moved it into the module but that you're passing local variables
<jhass> the macro sees what you pass in the arguments, not its runtime value
onionhammer has joined #crystal-lang
<emancu> jhass: so I can only merge fixed tuples ?
<jhass> pretty much
<emancu> hmm what a bummer
<jhass> I assumed in your real usecase you can paste the literal into the macro call because you already have it inside a macro or something
<emancu> well, it is not always inside a macro, but I would like to write it as a macro, maybe I can do some magic and define a "meta-macro"
Raimondii has joined #crystal-lang
<emancu> i'm going for food, but I will give a try later
<emancu> th
<emancu> thx
Raimondi has quit [Ping timeout: 240 seconds]
emancu has quit [Remote host closed the connection]
Raimondii is now known as Raimondi
ozra has quit [Ping timeout: 260 seconds]
ozra has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
|2701 has quit [Quit: Connection closed for inactivity]
aharlan has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
willl has quit [Quit: Connection closed for inactivity]
pawnbox has joined #crystal-lang
Philpax has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
emancu has joined #crystal-lang
soveran has joined #crystal-lang
emancu has quit [Remote host closed the connection]
soveran has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
<wmoxam> https://carc.in/#/r/z3q <-- doesn't work in 0.17.X, but works in earlier versions
<wmoxam> Intentional?
<wmoxam> Same with this variation (case statement instead of if), but with a different error: https://carc.in/#/r/z3x
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
pawnbox has joined #crystal-lang
ozra has quit [Ping timeout: 246 seconds]
ozra has joined #crystal-lang
emancu has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
emancu has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
trapped has joined #crystal-lang
<BlaXpirit> wmoxam, macro def were changed, yeah
pawnbox has joined #crystal-lang
<BlaXpirit> wmoxam, https://carc.in/#/r/z45
pawnbox has quit [Ping timeout: 260 seconds]
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
pawnbox has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 244 seconds]
emancu has joined #crystal-lang
emancu has quit [Ping timeout: 250 seconds]
ozra has quit [Ping timeout: 240 seconds]
ozra has joined #crystal-lang
clal has joined #crystal-lang
clal has quit [Client Quit]
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 240 seconds]
trapped has quit [Read error: Connection reset by peer]
aharlan has quit [Quit: Textual IRC Client: www.textualapp.com]
emancu has joined #crystal-lang
emancu has quit [Ping timeout: 276 seconds]
matp_ has quit [Remote host closed the connection]
jmoriau has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
soveran has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 276 seconds]
kulelu88 has joined #crystal-lang
kulelu88 has quit [Changing host]
kulelu88 has joined #crystal-lang
nwmcsween has joined #crystal-lang
nwmcsween is now known as Guest53590
Guest53590 has quit [Read error: Connection reset by peer]
nwmcsween_ has quit [Ping timeout: 240 seconds]
emancu has joined #crystal-lang
emancu has quit [Ping timeout: 260 seconds]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 244 seconds]
kulelu88 has quit [Quit: Leaving]
Philpax has joined #crystal-lang
trapped has joined #crystal-lang
Ven has joined #crystal-lang
crystal-lang202 has joined #crystal-lang
emancu has joined #crystal-lang
emancu has quit [Remote host closed the connection]
<wmoxam> BlaXpirit: okay great, thanks!
<wmoxam> I didn't understand the changelog initially but now it makes sense
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vrgQD
<crystal-gh> crystal/master 8f216e7 Ary Borenszweig: Merge branch 'release/0.17'
<RX14> i'm getting a really really weird error when using crystal-pg
<RX14> it seems to be a compiler bug
<jokke> hi
<travis-ci> crystal-lang/crystal#8f216e7 (master - Merge branch 'release/0.17'): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/131913688
<jokke> i'm trying to build crystal but i'm getting this error:
<jokke> Syntax error in ./src/object.cr:4 '!' is a pseudo-method and can't be redefined
bjz_ has quit [Ping timeout: 260 seconds]
<RX14> the eroor doesn't seem to happen when i'm running the specs on the library
bjz has joined #crystal-lang
<RX14> there is no possible way @@decoders is nil
<RX14> and it doesn't even give me a nil trace
<RX14> or tell me what other type it thinks it is
<RX14> i don't get it
<RX14> i can't isolate it either
<BlaXpirit> jokke, to build crystal you need latest release of crystal and latest source code of crystal. then run make clean && make
<jokke> BlaXpirit: a simple git pull won't do?
<BlaXpirit> jokke, git pull is one way to get latest source code, sure
<BlaXpirit> but what I should say is, to build crystal at any commit, you need the latest binary release that preceded it
<jokke> ah my earlier git pull just failed. that explains it
<RX14> there's no WAY @@decoders could be nil here right? https://aww.moe/z9bgue.txt
<jokke> BlaXpirit: ah ok gotcha
<RX14> yet the compiler says it is at random, when you actually try to use it in a meaningful way
<jhass> RX14: probably a bug yeah
<jhass> you know how to get them fixed fast, reduce the code :P
<RX14> i can't
<jhass> no time?
<RX14> i just
<RX14> i don't get why in any way
emancu has joined #crystal-lang
<RX14> i can'ty reduce it because i have nowhere to start
<jhass> I usually pull all relevant code into a single file by replacing the "require"'s
<jhass> then get rid of all dead code
<jhass> then try to simplify what's left, inlining methods and stuff
pawnbox has quit [Remote host closed the connection]
<jhass> retrying if the file still reproduces at each step
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
crystal-lang202 has quit [Ping timeout: 250 seconds]
emancu has quit [Remote host closed the connection]
|2701 has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RX14> seems to be something to do with spec2
<RX14> using postgres inside spec2 breaks postgres
<RX14> the hell
<RX14> hmmn, no
<RX14> yes
<RX14> requiring spec2 before pg break it
<RX14> turns out its this
<jokke> BlaXpirit: hm it still fails
<jokke> to build
<jokke> same error
<jokke> Crystal 0.17.3 [8f216e7] (Sat May 21 13:27:29 UTC 2016)
<BlaXpirit> jokke, make clean
<jokke> yeah i did that
<jokke> here's the whole trace: https://p.jreinert.com/bPjV/
<BlaXpirit> jokke, well obviously this is not the latest source code of crystal
<BlaXpirit> check whether remote and branch are correct, i dunno
<jokke> oh
<jokke> yeah
<BlaXpirit> was it the branch? then i recommend adding git branch to shell prompt
<jokke> yeah that was it
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<jokke> how can i make spec only certain specs?
<jokke> ah i'll just use .build/crystal spec
<BlaXpirit> doesn't seem to work just like that
<BlaXpirit> i just tried 'make -d spec', it's scary
<BlaXpirit> "Putting child 0x15950e0 (.build/all_spec) PID 29388 on the chain. \\ Live child 0x15950e0 (.build/all_spec) PID 29388 \\ Reaping winning child 0x15950e0 PID 29388 "
matp has joined #crystal-lang
<jhass> jokke: bin/crystal spec/std/foo should be just fine
<jhass> RX14: you do use 0.17.3 right? because waterlink's reduction from that issue works now https://carc.in/#/r/z4e
<RX14> nope
<RX14> i use 0.15.0
<RX14> because i need power_assert.cr
<jhass> 0.17 revamped how class var / constant initialization is done a bit
<RX14> well i would love to upgrade
<RX14> but until you can make an array of generics
<RX14> i can't
<RX14> or someone manages to work around that restriction and upgrade power_assert.cr
<RX14> or I can use object as a generic
<RX14> so many silly restrictions which just disallow you from creating code which works on any type
<BlaXpirit> yeah, the limitations on generics suck :( i can't wait to be able to use things like Int and Array(Object)
<jhass> all that stuff is likely going to be a focus in 0.18
<RX14> sorry if that rant sounded offensive, i've been trying to run my basic specs for 4 hours and been hitting roadblock after roadblock
<BlaXpirit> assuming it works, I wonder if using : Int instead of : Int32 is gonna cause a performance hit
<RX14> well I assume no more than removing : Int and letting type inference generate the code
<RX14> before using no type restruction then passing n different types of Int should generate perfectly fine code
soveran has quit [Remote host closed the connection]
Ven has joined #crystal-lang
<BlaXpirit> RX14, well for function arguments : Int works even now, but I mean for declaring types of variables
<RX14> oh
<RX14> well
<RX14> how would that work?
<RX14> it would just choose an int
<RX14> and use that
<RX14> i don't think using Int as a variable type would even work
<RX14> it has to have a size
<BlaXpirit> RX14, no it doesn't :| https://carc.in/#/r/z4g
<RX14> oh you need like that
<RX14> well
<RX14> it would have to have a performance effect
<jhass> BlaXpirit: I guess it would be equivalent to using the union of all its subclasses
<BlaXpirit> what if LLVM finds a way to optimize
<BlaXpirit> in the case that only one type from the union is ever used
<jhass> I guess it would indeed optimize that case
<jhass> through dead code elimination already
<BlaXpirit> ok I get it, base class is a special case because it's just a reference
<RX14> BlaXpirit, yeah
<BlaXpirit> but the error message is still weird. proc???
<RX14> reference vs vcalue
emancu has joined #crystal-lang
<jhass> BlaXpirit: the error message is simply wrong, feel free to open an issue
ozra has quit [Ping timeout: 246 seconds]
ozra has joined #crystal-lang
emancu has quit [Remote host closed the connection]
<crystal-gh> [crystal] jreinert opened pull request #2630: add support for gcm ciphers where tag getting/setting is required (master...topic/openssl-tag) https://git.io/vrgbQ
emancu has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
emancu has quit [Remote host closed the connection]
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
matp has quit [Client Quit]
matp has joined #crystal-lang
<RX14> getaddrinfo is broken https://aww.moe/ee9pm2.txt
<RX14> oh god
<RX14> what the fuck
<RX14> what's the workaround?
<RX14> it really shouldn't be an edge case
<jhass> the issue I linked is all i know too
<RX14> it should use the dns server in /etc/resolv.conf and query for the domain I specified
<RX14> its not a .local
<RX14> it's a normal DNS query
<RX14> also
<RX14> it's intermittent
<RX14> which is even worse
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_jungh4ns has joined #crystal-lang
<RX14> well
<RX14> time to do DNS resolution using ``
<RX14> `host -t a db | head -n 1`
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<BlaXpirit> i suppose D:
<RX14> it works
<RX14> I used getent instead
<RX14> because it's more common and more machine readable
<RX14> but it works
Philpax has quit [Ping timeout: 244 seconds]
soveran has joined #crystal-lang
soveran has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
willl has joined #crystal-lang
soveran has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
ozra has quit [Ping timeout: 240 seconds]
ozra has joined #crystal-lang
soveran has quit [Remote host closed the connection]
|2701 has quit [Quit: Connection closed for inactivity]
bjz has quit [Ping timeout: 252 seconds]
<zodiak_> call me stupid but, can I download the crystal docs as a PDF for offline reading ?
<zodiak_> I assume I am missing something obvious
<jhass> uh no we don't render a PDF anywhere
<jhass> but all content of crystal-lang.org is at https://github.com/crystal-lang/crystal/tree/gh-pages
<zodiak_> well boo
<zodiak_> okily dokily. dankeschoen
<jhass> just clone the repo, checkout the branch, open in your browser
<zodiak_> yup.. not tablet toilet friendly but..
<zodiak_> vunderbar
<jhass> ah interesting, didn't know
<jhass> could even consider letting CI do that I guess
<jhass> but meh, more repo bloat
<BlaXpirit> jhass, serving the website from gh-pages in the same repo is so wrong
<BlaXpirit> well, we know about it but
<jhass> heh, I don't do the infra
<BlaXpirit> gh-pages is a terrible idea in the first place but oh well, hype
<jhass> it's okay if you keep only the source stuff in there, adding generated stuff to serve as static file host is meh
<BlaXpirit> well no, keeping the source in gh-pages is also bad. if you don't display the generated content, there's no point in naming it 'gh-pages'
<BlaXpirit> and if you do use gh-pages, then mixing static and nonstatic content is even worse
<BlaXpirit> I wonder if I took a radical approach to this, whether that would be accepted
<jhass> ?
<BlaXpirit> the idea is to remove gh-pages completely, make a new branch with the source content that gh-pages has, preferably keeping commit history but pruning it
<BlaXpirit> then a separate github repo or a proper host to contain generated files
<jhass> start with the latter, convince them to do docs.crystal-lang.org, docs.crystal-lang.org/api
<jhass> then we can just filter-branch gh-pages
<BlaXpirit> jhass, crystal-lang.org blog is also in there
<jhass> yes, the sources
<jhass> github generates the html
<jhass> since it's jekyll
<BlaXpirit> oh?
<BlaXpirit> well that complicates things
<BlaXpirit> i wouldn't advocate a separate domain
<jhass> only the gitbook is generated and committed by us as well as the API docs copied into it on each release
ozra has quit [Ping timeout: 276 seconds]
ozra has joined #crystal-lang
|2701 has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<jokke> does anyone know of a way to create apr type hashed md5 sums in crystal?
<jokke> s/hashed/salted/
sp4rrow has joined #crystal-lang
<sp4rrow> what is the difference between init for app and init for lib?
<jhass> not sure there was one yet
pawnbox has quit [Remote host closed the connection]
<sp4rrow> thanks
<sp4rrow> yeah I didnt see much difference
<sp4rrow> I have not used shareds or anything yet so I was not sure if there was going to be unexpected things down the line
pawnbox has joined #crystal-lang
<jhass> it's mainly there already so people get used to it
<jhass> in case we do need/want to diverge stronger
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
bjz has joined #crystal-lang
<RX14> hmmn
trapped has quit [Read error: Connection reset by peer]
Raimondii has joined #crystal-lang
pawnbox has quit []
pawnbox has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
soveran has quit [Remote host closed the connection]
<pawnbox> how do i capture instance of base class inside a module in that class?
<pawnbox> or reference?
Raimondii is now known as Raimondi
|2701 has quit [Quit: Connection closed for inactivity]
<jhass> I don't quite follow
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Raimondii has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
<pawnbox> An example like https://carc.in/#/r/z5b
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
bjz has quit [Read error: Connection reset by peer]