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> <Sija> how to define a callback with va_args?
<FromGitter> <Sija> `alias DebugHandler = LibC::Char*, … ->` gives `SyntaxError`
soveran has joined #crystal-lang
onethirtyfive has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
onethirtyfive has quit [Ping timeout: 252 seconds]
Philpax has quit [Ping timeout: 250 seconds]
ruby_ has quit [Remote host closed the connection]
onethirtyfive has joined #crystal-lang
BlaXpirit has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
BlaXpirit has joined #crystal-lang
LastWhisper____ has joined #crystal-lang
ruby_ has joined #crystal-lang
ruby__ has joined #crystal-lang
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby_ has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
Philpax has quit [Ping timeout: 244 seconds]
Philpax has joined #crystal-lang
ruby__ has quit [Remote host closed the connection]
ruby_ has joined #crystal-lang
Philpax has quit [Ping timeout: 244 seconds]
ruby_ has quit [Remote host closed the connection]
kulelu88 has quit [Quit: Leaving]
ruby_ has joined #crystal-lang
Philpax has joined #crystal-lang
matp has quit [Ping timeout: 255 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 265 seconds]
ruby_ has quit [Remote host closed the connection]
ruby_ has joined #crystal-lang
<wmoxam> Q: How do I change what is linked in line 17? On OpenBSD I need to link a few extra libs: https://gist.github.com/wmoxam/df80c47e6451850a7e0b725eccd984e8
BlaXpirit has quit [Quit: Bye]
BlaXpirit has joined #crystal-lang
wmoxam has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 244 seconds]
Philpax has joined #crystal-lang
ruby_ has quit [Remote host closed the connection]
wmoxam has joined #crystal-lang
pawnbox has joined #crystal-lang
ruby_ has joined #crystal-lang
qard_ has joined #crystal-lang
Philpax_ has joined #crystal-lang
qard has quit [Ping timeout: 265 seconds]
Philpax has quit [Ping timeout: 244 seconds]
ruby_ has quit [Remote host closed the connection]
matp has joined #crystal-lang
soveran has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
soveran has quit [Ping timeout: 244 seconds]
soveran has joined #crystal-lang
Philpax_ has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
qard_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 255 seconds]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 255 seconds]
akwiatkowski has joined #crystal-lang
kizeto has joined #crystal-lang
kizeto has quit [Client Quit]
bjz has joined #crystal-lang
Nik736 has joined #crystal-lang
mark_66 has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
globalkeith has joined #crystal-lang
bjz has joined #crystal-lang
globalkeith has quit [Max SendQ exceeded]
onethirtyfive has quit [Remote host closed the connection]
onethirtyfive has joined #crystal-lang
<hmans> <3
grindhold_ is now known as grindhold
soveran has quit [Remote host closed the connection]
<FromGitter> <Sija> @cjgajard: #214 is exactly my problem
<DeBot> https://github.com/crystal-lang/crystal/issues/214 (Unable to declare a C function pointer with varargs )
<BlaXpirit> Sija, wait, what is your problem?
<FromGitter> <Sija> Unable to declare a C function pointer with varargs -> In my case I want to define `alias DebugHandler = LibC::Char*, … ->`
<FromGitter> <Sija> but such syntax doesn’t exist atm
<BlaXpirit> ah, a callback
<FromGitter> <Sija> yep
<BlaXpirit> yeah, callbacks are kinda broken anyway :/
<BlaXpirit> no structs and no varargs
<FromGitter> <Sija> meh
pawnbox_ has quit [Remote host closed the connection]
<FromGitter> <Sija> wtf… `pp` when given a method call invokes it twice in a row before printing result, but only sometimes… what a weird story
pawnbox has joined #crystal-lang
bjz has quit [Ping timeout: 250 seconds]
<FromGitter> <Sija> ok, got it
bjz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<hmans> If there's no blog post about 0.19, maybe at least change this channel's topic...? :>
<hmans> bitch, bitch, bitch all day, it's all I can
dhk has joined #crystal-lang
<BlaXpirit> hmans, yeah this release wasnt done properly
<BlaXpirit> also no docker image
<BlaXpirit> and it was done too soon imho
<hmans> I still love you
soveran has quit [Remote host closed the connection]
BlaXpirit has quit [Quit: Bye]
BlaXpirit has joined #crystal-lang
Philpax has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
badeball_ is now known as badeball
FromGitter has quit [Remote host closed the connection]
BlaXpirit has quit [Quit: Bye]
FromGitter has joined #crystal-lang
pawnbox has joined #crystal-lang
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Client Quit]
BlaXpirit has joined #crystal-lang
globalkeith has joined #crystal-lang
pawnbox has joined #crystal-lang
bott has joined #crystal-lang
bott has quit [Client Quit]
pawnbox has quit [Ping timeout: 264 seconds]
LastWhisper____ has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
ruby_ has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
akwiatkowski has quit [Ping timeout: 244 seconds]
<asterite> I uploaded docker images yesterday, before that I had some troubles with docker for mac
mgarciaisaia1 has joined #crystal-lang
mgarciaisaia1 has left #crystal-lang [#crystal-lang]
pawnbox has joined #crystal-lang
m4t has joined #crystal-lang
<m4t> Hi, I'm trying to convert a ruby app and I'm stuck trying to find an equivalent of « send("attribute_#{i}") » to set and get object attributes
<FromGitter> <sdogruyol> You don't have send in Crystal
<RX14> m4t, can you give us an idea of exactly what you're trying to do?
ponga has quit [Quit: Connection closed for inactivity]
globalkeith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<asterite> m4t: maybe you can replace that with an array? i looks like an index
<m4t> the idea is to access attributes from a string. My app have some attributes named « pit_1, pit_2 etc... » and I want to manipulate it inside a loop like [1,2,3].each {|i| object.send("pit_#{i}") }
<m4t> my english is not terrible sorry
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vilDf
<crystal-gh> crystal/master 4d69af6 Ary Borenszweig: Compiler: support same type names modulo case. Fixes #3116
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vilDk
<crystal-gh> crystal/master fbb5b16 Ary Borenszweig: Added missing spec for HTTP::ChunkedContent
<crystal-gh> [crystal] asterite opened pull request #3279: Add file-private types. Part of #2950 (master...feature/file_private_types) https://git.io/vilDx
<asterite> m4t: case i; when 1; pit_1; when 2; pit_2
ruby_ has quit [Remote host closed the connection]
globalkeith has joined #crystal-lang
globalkeith has quit [Client Quit]
globalkeith has joined #crystal-lang
globalkeith has quit [Client Quit]
<travis-ci> crystal-lang/crystal#4d69af6 (master - Compiler: support same type names modulo case. Fixes #3116): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/158487030
<DeBot> https://github.com/crystal-lang/crystal/issues/3116 (compiler crash with types named Xml and XML)
<m4t> asterite: you got me some ideas, I will try a macro to find the key on every attributes
ruby_ has joined #crystal-lang
<travis-ci> crystal-lang/crystal#fbb5b16 (master - Added missing spec for HTTP::ChunkedContent): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/158487148
ruby_ has quit [Remote host closed the connection]
ruby_ has joined #crystal-lang
ruby_ has quit [Ping timeout: 244 seconds]
ruby_ has joined #crystal-lang
globalkeith has joined #crystal-lang
tomchapin has joined #crystal-lang
tomchapin has quit [Client Quit]
<FromGitter> <sdogruyol> how can i call a proc from a macro?
<FromGitter> <sdogruyol> actually call and return it
<BlaXpirit> sdogruyol, you can't call anything in a macro, you can only output the code that will run something at runtime
onethirtyfive has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> yeah
<FromGitter> <sdogruyol> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=57d19660cdbf820f7fa96485]
<FromGitter> <sdogruyol> kinda weird
globalkeith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
globalkeith has joined #crystal-lang
<FromGitter> <jwoertink> Has anyone attempted to add something like GDB in to crystal yet?
<FromGitter> <jwoertink> Like a shard, or even in to the language itself....
<BlaXpirit> jwoertink, i think generic debugger for llvm works
<BlaXpirit> or what do you mean
<BlaXpirit> sdogruyol, I don't think the 'to' macro does anything
<FromGitter> <jwoertink> I'm not too familiar with debugging in a static language outside of using something like XCode where you click and have a debugger
globalkeith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<FromGitter> <jwoertink> I want to use something like Pry from ruby. I know GDB can do all that stuff
<FromGitter> <jwoertink> like remote debugging, and setting breakpoints, etc..
<BlaXpirit> adding prints is state of the art anyway
<FromGitter> <sdogruyol> BlaXpirit well i want to call and return the proc with to("index_route")
<FromGitter> <sdogruyol> any ideas?
mark_66 has quit [Remote host closed the connection]
aaaaaaaaaaaaaaaa has joined #crystal-lang
aaaaaaaaaaaaaaaa has quit [Client Quit]
Philpax has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
globalkeith has joined #crystal-lang
pawnbox has joined #crystal-lang
dhk has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
globalkeith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
globalkeith has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
globalkeith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
onethirtyfive has joined #crystal-lang
onethirtyfive has quit [Ping timeout: 265 seconds]
soveran has quit [Remote host closed the connection]
globalkeith has joined #crystal-lang
LW___ has joined #crystal-lang
LastWhisper____ has quit [Ping timeout: 244 seconds]
qard has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
akwiatkowski has joined #crystal-lang
globalkeith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
georgiev has joined #crystal-lang
<georgiev> Hello
<georgiev> Anybody up?
<FromGitter> <sdogruyol> yo
<georgiev> I would like to ask if crystal is featuring garbage collector
<georgiev> and if there is possibility for manual memory managment
<asterite> georgiev: crystal has a GC, you can use struct and tuple to avoid heap allocations. And you can invoke LibC.malloc if you really want to
<georgiev> Thank you for your answer
<georgiev> May I ask what algorithm is used to implement the GC?
<georgiev> or I should dig into the cod
<georgiev> code*
<BlaXpirit> boehm/libgc
<georgiev> Thanks again
pawnbox_ has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: https://git.io/vi8Zx
<crystal-gh> crystal/master 7cd0fa6 Brian J. Cardiff: Add WeakRef class (#3276)...
georgiev has quit [Quit: Page closed]
onethirtyfive has joined #crystal-lang
onethirtyfive has quit [Ping timeout: 240 seconds]
LW___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ven_ has joined #crystal-lang
LastWhisper____ has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<BlaXpirit> so I need to store a diff of two texts in memory
<BlaXpirit> so maybe I can call `diff` but only one of the files that it accepts can be stdin
<BlaXpirit> a bit of an ugly situation
<Papierkorb> BlaXpirit: use a FIFO or named pipe?
<BlaXpirit> it's so complicated and os-specific
xmgx has joined #crystal-lang
<travis-ci> crystal-lang/crystal#7cd0fa6 (master - Add WeakRef class (#3276)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/158539000
xmgx has quit [Ping timeout: 264 seconds]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has quit [Ping timeout: 252 seconds]
<BlaXpirit> is there any way to run a crystal script than invoking crystal executable directly?
<BlaXpirit> require is a way to do it... once
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <jwoertink> @BlaXpirit `Crystal::Parser.parse(some_code)` ?
<BlaXpirit> that won't run code
<BlaXpirit> i'm satisfied with the 'require' hack for now
<FromGitter> <jwoertink> Has anyone here played around with gdb?
<FromGitter> <jwoertink> on OSX
onethirtyfive has joined #crystal-lang
Nik736 has quit [Quit: Textual IRC Client: www.textualapp.com]
onethirtyfive has quit [Ping timeout: 240 seconds]
mkl0501 has joined #crystal-lang
Val has joined #crystal-lang
<FromGitter> <jwoertink> when I run `crystal build whatever.cr -d` I get a bunch of `Unsupported type for debugging` notices... Not sure if they're errors or warnings
<FromGitter> <jwoertink> is that something that should be reported?
globalkeith has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vonKingsley has joined #crystal-lang
<vonKingsley> Quick Q, Precompiled binaries pick up the libs directory, but when I build from source It doesn't pick up the libs directory from `pwd`. Is there anything I need to add to get that behavior?
<BlaXpirit> vonKingsley, I don't think precompiled binaries are supposed to pick up anything
<BlaXpirit> I don't understand
<vonKingsley> BlaXpirit I compile from source and then alias as ccrystal, when I use this to build outher projects, from the project root directory, I always get an error while requiring "xxxxx": can't find file 'xxxx' relative to `my current path`
<BlaXpirit> vonKingsley, do you alias ccrystal='/full/path/to/crystal/bin/crystal' ?
<vonKingsley> alias ccrystal='/Users/vonkingsley/Code/Crystal/current_crystal/crystal'
<BlaXpirit> vonKingsley, I don't understand what all these directories are.
<BlaXpirit> vonKingsley, inside the crystal folder cloned from github, you run `make`
<BlaXpirit> and use 'bin/crystal'
<vonKingsley> after running make the binary ends up in .build/crystal, for some reason I cannot remmeber any more, i move that over to the path you see above
<BlaXpirit> vonKingsley, well don't do that!
m4t has quit [Quit: Lost terminal]
<vonKingsley> LOL yup I just ran the one in bin/crystal and it works and is the same version
<vonKingsley> ill redirect my alias and it should work
<vonKingsley> thanks
pduncan has joined #crystal-lang
vonKingsley has quit [Quit: Page closed]
zacts has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 244 seconds]
onethirtyfive has joined #crystal-lang
onethirtyfive has quit [Ping timeout: 255 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pduncan has quit [Ping timeout: 244 seconds]
Raimondi has quit [Ping timeout: 240 seconds]