jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.8.0 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
NeverDie has joined #crystal-lang
NeverDie has quit [Client Quit]
RX14 has quit [Ping timeout: 252 seconds]
RX14 has joined #crystal-lang
n0xff has quit [Ping timeout: 252 seconds]
n0xff has joined #crystal-lang
juancate has quit [Ping timeout: 252 seconds]
juancate has joined #crystal-lang
<pragmatism> It's everywhere!
waj has joined #crystal-lang
waj has quit [Remote host closed the connection]
pragmatism has quit [Quit: Textual IRC Client: www.textualapp.com]
AckZ has quit []
waj has joined #crystal-lang
CraigBuchek has joined #crystal-lang
waj has quit [Remote host closed the connection]
greengriminal has joined #crystal-lang
waj_ has joined #crystal-lang
NeverDie has joined #crystal-lang
havenwood has joined #crystal-lang
waj_ has quit [Remote host closed the connection]
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 250 seconds]
waj_ has joined #crystal-lang
Philpax has joined #crystal-lang
<caryanne> how y'all doin'
<willl> good, you?
<caryanne> proggin' some crystal
<caryanne> and having a great fucking time
greengriminal has quit [Quit: Leaving]
nakilon has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
kulelu88 has quit [Quit: Leaving]
waj_ has quit [Remote host closed the connection]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
NeverDie has quit [Quit: http://radiux.io/]
trapped has joined #crystal-lang
<crystal-gh> [crystal] bcardiff opened pull request #1552: add deflate http handler (master...http-deflate-handler) http://git.io/vnESN
caryanne has quit [Ping timeout: 246 seconds]
caryanne has joined #crystal-lang
nakilon has quit [Ping timeout: 256 seconds]
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
havenn has quit [Quit: Textual IRC Client: www.textualapp.com]
Ven has joined #crystal-lang
havenwood has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pawnbox> how to make recently compiled crystal to work throughout the system.
CraigBuchek has quit [Quit: Leaving.]
<pawnbox> like replace the outdated system version
Philpax has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
<trapped> vifino: why coke instead of coffee?
Philpax has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
jtarchie has quit [K-Lined]
guilleiguaran__ has quit [K-Lined]
willl has quit [K-Lined]
emmanueloga has quit [K-Lined]
chdorner has quit [K-Lined]
iamstef has quit [K-Lined]
danzilio has quit [K-Lined]
bjmllr has quit [K-Lined]
aemadrid has quit [K-Lined]
avdi has quit [K-Lined]
manveru has quit [K-Lined]
n1ftyn8_ has quit [K-Lined]
manveru has joined #crystal-lang
chdorner has joined #crystal-lang
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] jhass pushed 3 new commits to master: http://git.io/vnugl
<crystal-gh> crystal/master bde3711 Adler: add ecr library usage
<crystal-gh> crystal/master 9d25cf5 Adler: Update ECR introduction & add explanations to <% %> <%= %> syntax
<crystal-gh> crystal/master 5e53fb1 Jonne Haß: Merge pull request #1547 from adlerhsieh/master...
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 252 seconds]
<travis-ci> manastech/crystal#5e53fb1 (master - Merge pull request #1547 from adlerhsieh/master): The build passed. https://travis-ci.org/manastech/crystal/builds/81543125
<jokke> hello!
<jokke> can anyone help me with this: https://p.jreinert.com/Ibq6h/ruby
<jokke> it segfaults if i try to run it
<jokke> if i use the function in c there's no problem though
leafybasil has joined #crystal-lang
<jhass> jokke: FILE is not an FD iirc
<jhass> it's the struct fopen returns or something
<jhass> jokke: check fdopen(3)
<trapped> jhass: http://carc.in/#/r/gjn
<jokke> oh
<jhass> trapped: sorry, rebuilding whitelist atm :P
<jhass> oh, actually...
<trapped> ah, ok
<jhass> well that's weird
<trapped> jhass: ping me when whitelist is rebuilt
<jhass> k
<jhass> gotta fix a bug in crystal afterwards and workaround it in carcin first :P
pawnbox has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 255 seconds]
<crystal-gh> [crystal] jhass opened pull request #1554: Handle signal exits from commands run by the compiler (master...handle_signal_exits_from_linker) http://git.io/vnuD6
Philpax has quit [Read error: Connection reset by peer]
danzilio has joined #crystal-lang
<jokke> jhass: hmm now _something_ happens, as in no segfault, but it's still broken somehow
<jokke> jhass: here's the thing: It worked great with the trick of reopening STDOUT as STDERR and reopening STDIN as /dev/tty
<jokke> only problem: after i'm finished showing the curses stuff i need to print something to stdout
<jokke> to the _original_ stdout
<jhass> gotta keep a copy of that then
<jokke> i already tried cloning STDOUT before reopening and then putsing to that clone
<jhass> simply .clone? I don't think that's overloaded properly
<jokke> hm ok
<jhass> you want to open /dev/null or something and reopen that FD from stdout
<jokke> oooh
<jhass> or overload .clone to properly dup it
<jokke> didn't think of that!
aemadrid has joined #crystal-lang
guilleiguaran__ has joined #crystal-lang
emmanueloga has joined #crystal-lang
bjmllr has joined #crystal-lang
iamstef has joined #crystal-lang
avdi has joined #crystal-lang
<jokke> hm not even that worked..
<jokke> i can puts but it seems to dissappear
<jokke> somewhere in the fd nirvana
<jhass> dev_null.reopen(STDOUT); STDOUT.reopen(tty); STDOUT.reopen(dev_null) ?
<trapped> what's the "recommended" way to convert a Slice(UInt8) to some other type? e.g. Int32
<jhass> trapped: you could just cast the pointer
willl has joined #crystal-lang
n1ftyn8_ has joined #crystal-lang
<jhass> (.pointer as Pointer(Int32)).value
<jokke> jhass: omg!
<jokke> yess
<jokke> with STDOUT.reopen(stdout) it works!
<jhass> trapped: http://carc.in/#/r/gkm
<trapped> alright
<jhass> should probably the default
jtarchie has joined #crystal-lang
<trapped> jhass: what about converting it to a string
<jhass> String.new(slice) or String.new(slice.pointer(0))
<trapped> ok thanks
greenarrow has joined #crystal-lang
<greenarrow> Anyone here to help me with a simple problem https://gist.github.com/ahmetabdi/377eab068f726de58fdc
<greenarrow> problem is in the comment of the gist
<greenarrow> nvm fixed
<jhass> greenarrow: api is an instance method, you try to call it from a class method
<greenarrow> yeah..
<greenarrow> thanks
<jhass> uh, overlooked the fixed, sorry :D
Ven has joined #crystal-lang
Ven has quit [Client Quit]
Ven has joined #crystal-lang
Ven has quit [Client Quit]
pawnbox has joined #crystal-lang
<pawnbox> what should be reasonable expectation here : https://github.com/manastech/crystal/issues/1472
<pawnbox> Should directory First be created or not.
<pawnbox> ?
<jhass> pawnbox: no it should check if it exists (regardless of being a file or directory) and print a nice error message instead
<pawnbox> so if a executable with same name exits it shouldprint a nice error?
<jhass> I'd say even if a directory with the same name already exists, yes
<pawnbox> Sry for being uninformed, but what wrong with creating a directory if a file with same name exits?
<vegai> is it so that the compiler doesn't check code that isn't called from any place?
Ven has joined #crystal-lang
<jhass> pawnbox: it's impossible
<jhass> pawnbox: try: touch foo; mkdir foo
<vegai> will that be a permanent feature?
<jhass> vegai: probably, it allows to be a real lot faster
<jhass> imagine a full Gtk binding with wrappers for example
<vegai> does it happen because the compiler drops everything it doesn't use?
<jhass> tens of thousands loc of generated code
<vegai> right
<vegai> well, I guess in practice it shouldn't be a problem, since I should have good test coverage anyway
<vegai> it was just a bit surprising when I first saw it
<vegai> might be a good idea to document the fact
<jhass> basically, it's not so much actively dropping than not actively doing type inference and semantic checks for it in the first place
<vegai> yeah, ok
<pawnbox> jhass: thanks
<vegai> jhass: do you think it'd be possible to have it as an option?
<jhass> I'm not sure, gut feeling says yes
<vegai> I imagine it'd be a nice piece of tooling, to be able to run simple checks every time the code changes
<vegai> over the whole codebase, regardless of whether it's being called
<jhass> mmh
<vegai> rust has this thing called racer which does pretty much that
<vegai> quite handy
<jhass> there's also the issue that if you have say def foo(bar) bar.to_s; end; and never call that
<jhass> you have no idea what bar is
<jhass> or could be
<vegai> ah, right
<jhass> so you also have no idea if it responds to to_s
greenarrow has quit [Quit: 500]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> so we maybe could do it for things we can fully type, as a tool
<jhass> but I'm not sure if it's worth that much after all
<jhass> a duck typed language will always need tests for all valid inputs
greenarrow has joined #crystal-lang
<vegai> yeah
greenarrow has quit [Quit: 500]
Ven has joined #crystal-lang
Ven has quit [Client Quit]
greenarrow has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Client Quit]
<vifino> trapped: Because I drink soda more often. I only drink coffee once every day.
<greenarrow> Is there a shorter way to write this using JSON::Mapping inside the json_mapping method
<trapped> isn't coffee better for your health?
<greenarrow> poster_path: {type: String, nilable: true}
<jhass> no
<greenarrow> :(
<greenarrow> thanks
<jhass> I guess the mapping could special case something like poster_path: String?, but it doesn't atm
<greenarrow> yeah tried that blew up
<greenarrow> wonder how easy it will be to implement I made a issue
<jhass> >> {{(String?).class_name}}
<DeBot> jhass: Syntax error in eval:20: unexpected token: ) - http://carc.in/#/r/glz
<jhass> mhmp
<jhass> >> {{(String|Nil).class_name}}
<DeBot> jhass: undefined macro method 'TypeNode#|' - http://carc.in/#/r/gm0
<jhass> >> macro class_name(x); {{x.class_name}}; end; class_name String?
<DeBot> jhass: Syntax error in eval:21: expecting any of these tokens: :, NEWLINE (not 'EOF') - http://carc.in/#/r/gm1
<jhass> common
<greenarrow> :D
<jhass> >> macro class_name(x); {{x.class_name}}; end; class_name(String?)
<DeBot> jhass: Syntax error in eval:20: unterminated call - http://carc.in/#/r/gm2
<jhass> really?
<jhass> >> macro class_name(x); {{x.class_name}}; end; class_name(String|Nil)
<DeBot> jhass: # => "Call" - http://carc.in/#/r/gm3
<jhass> wat
<greenarrow> Nice result :)
<jhass> nah I know, it didn't enter the type grammar
<jhass> but that means {foo: String?} won't work either
<jhass> so sorry but it doesn't work
<greenarrow> String? is suppose to work but doesnt?
<jhass> >> macro class_name(h); {% for name, v in h %} {{v.class_name}}; {% end %}; end; class_name({foo: String?})
<DeBot> jhass: Syntax error in eval:20: unterminated hash literal - http://carc.in/#/r/gm4
<jhass> String? is only valid in the type grammar
<greenarrow> in docs it says String? is just short for String | Nil
<greenarrow> i see
<jhass> so foo :: here, or def foo(bar : here) : here
<trapped> i'm getting "undefined table_path" presumably here https://github.com/trapped/fs_adapter/blob/master/src/fs_adapter/driver.cr#L144
<jhass> >> [foo :: String]
<DeBot> jhass: # => [nil] - http://carc.in/#/r/gm5
<jhass> >> [foo :: String?]
<DeBot> jhass: # => [nil] - http://carc.in/#/r/gm6
<jhass> trapped: presumably? would be a bug if so
<jhass> oO why do you +x everything
<trapped> those are the only lines in the file where table_path is referenced and the compiler says "in ./src/fs_adapter/driver.cr:164: undefined method 'table_path' (if you declared 'table_path' in a suffix if, declare it in a regular if for this to work)"
<trapped> jhass: it's a bug in the sshfs driver i'm using on a windows machine
<jhass> wow that sucks
<trapped> just editing the files marks them as +x for them to be accessible by all users, i think
<jhass> +x means executable
<jhass> +x for directories means listable
<jhass> so on directories it makes sense
<jhass> on all files, very much not so
<trapped> i know, i know
<trapped> that's why it's a bug
<trapped> i believe the driver doesn't actually check whether nodes are directories or files and marks everything
greengriminal has joined #crystal-lang
<jhass> trapped: so that it doesn't work is definitely a bug, however lock_write(table_path) do works around it. There's also a definitive (separate bug) that the line numbers are off
<trapped> i noticed too that adding parentheses makes it work
<trapped> the line numbers thing is an old bug
<trapped> very old
<trapped> due to the fact they're checked before expanding macros, i think
<jhass> you reported it?
<jhass> there's been some fixes around that recently
<trapped> i think i did but i'm not sure, and if i did it would've been a month ago or so
<jhass> I don't see any
<jhass> in fact there's no single issue by you open https://github.com/manastech/crystal/issues/created_by/trapped
<trapped> i guess i didn't open it then
<jhass> you should
waj_ has joined #crystal-lang
<trapped> probably because most of them kind of "resolved themselves" after a couple git pulls of the compiler
<jhass> I bet I opened issues for you for half of them ;)
<trapped> that's definitely possible
<trapped> honestly if i hadn't so little time i would at least try to help a bit on the compiler but i'm pretty constrained
<jhass> just open issues, not that hard ;)
<jhass> both of these are of type Ary usually fixes the same day
<trapped> alright
<trapped> have you already reported these two or shall i do it
<jhass> I didn't
<trapped> i'll do it as soon as i get back from the grocery store then
andrew-l has joined #crystal-lang
kostya has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Client Quit]
NeverDie has joined #crystal-lang
<crystal-gh> [crystal] js-ojus opened pull request #1557: Add difference and symmetric difference operations on `Set` (master...set-ops) http://git.io/vng8e
<andrew-l> >> 1 + 2
<DeBot> andrew-l: # => 3 - http://carc.in/#/r/gm8
<kostya> >> p 1
<DeBot> kostya: 1 - more at http://carc.in/#/r/gm9
<kostya> >> puts `ls -la`
<DeBot> kostya: # => nil - more at http://carc.in/#/r/gma
<andrew-l> just found out about crystal-lang through the NYC.rb mailing list flame war. :-)
<andrew-l> perusing through the documentation, i like it a lot. especially this! http://crystal-lang.org/2013/07/13/null-pointer-exception.html
<andrew-l> that's a very good design choice. ;-)
<jhass> :)
<kostya> >> p File.read("/etc/issue")
<DeBot> kostya: "Arch Linux \\r (\\l)\n\n" - more at http://carc.in/#/r/gmb
<andrew-l> but i've fallen in love with Haskell's Maybe Monad... would this be possible in crystal? (from the docs: (socket.gets || {}).capitalize ? this is a pattern i've used a lot in ruby and js: http://blog.osteele.com/posts/2007/12/cheap-monads/
Ven has joined #crystal-lang
Ven has quit [Client Quit]
havenwood has joined #crystal-lang
<jhass> probably, there's a macro method_missing hook
<andrew-l> cool, i'll have to check out the language more. thanks!
Ven has joined #crystal-lang
Ven has quit [Client Quit]
<waj_> andrew-l: isn't that similar to: socket.gets.try &.capitalize ?
<andrew-l> maybe...? i've only looked at the docs on the site and haven't worked with crystal code yet. (the no-null pointer exception stuck out to me as a great thing!)
rvchangue has joined #crystal-lang
waj_ has quit [Remote host closed the connection]
Ven has joined #crystal-lang
<kostya> make in crystal dir, now broken
<kostya> src/llvm/ext/llvm_ext.cc:2:30: fatal error: llvm/IR/DebugLoc.h: No such file or directory
<jhass> kostya: mmh, maybe missing llvm devel headers?
<greenarrow> whats the most progressed web framework for crystal atm?
<jhass> /usr/include/llvm/IR/DebugLoc.h
<jhass> greenarrow: mmh, probably amethyst, though I like artanis
Ven has quit [Client Quit]
<kostya> dir /usr/include/llvm-3.5/llvm/IR/ is here, but no file DebugLoc.h
<kostya> maybe need llvm-3.6?
<jhass> mmh, might be, not sure how to check
<pawnbox> 1 + "2"
<pawnbox> >> 1 + "2"
<DeBot> pawnbox: - Int32#+() - http://carc.in/#/r/gmm
<jhass> pawnbox: did you expect otherwise?
<jhass> Ruby gives you a TypeError
<pawnbox> just exploring DeBot codebase.
<pawnbox> :)
<jhass> and yeah, the new wrapper doesn't play well with the old error extraction code, thanks for finding that one
<pawnbox> yeah seems like it.
waj_ has joined #crystal-lang
waj_ has quit [Client Quit]
waj_ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
waj_ has quit [Client Quit]
waj has joined #crystal-lang
vjdhama has joined #crystal-lang
vjdhama has quit [Remote host closed the connection]
sasha_ has joined #crystal-lang
<greenarrow> Is it possible to make attributes in json_mapping optional? I get missing json attribute: foo if its not included in the json
<jhass> foo: {type: String, nilable: true}
<greenarrow> How would I do that if it was an array -> genres: Array(Tmdb::Genre)
<jhass> greenarrow: just specify the Array(Tmdb::Genre) as type
<jhass> foo: Bar is merely a shortcut to foo: {type: Bar}
<greenarrow> thanks jhass
vjdhama has joined #crystal-lang
<crystal-gh> [crystal] adlerhsieh opened pull request #1560: Add documentaion to markdown (master...master) http://git.io/vn2v6
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vn2UT
<crystal-gh> crystal/master bb8ecf1 Ary Borenszweig: Automatically free LLVM memory
shama has joined #crystal-lang
Ven has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
Ven has quit [Client Quit]
NeverDie has quit [Quit: http://radiux.io/]
<travis-ci> manastech/crystal#bb8ecf1 (master - Automatically free LLVM memory): The build passed. https://travis-ci.org/manastech/crystal/builds/81614117
Ven has joined #crystal-lang
Ven has quit [Client Quit]
waj has quit []
NeverDie has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Quit: ZNC 1.6.1 - http://znc.in]
NeverDie has quit [Quit: http://radiux.io/]
greenarrow has quit [Quit: 500]
waj has joined #crystal-lang
NeverDie has joined #crystal-lang
qard has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybasil has quit [Ping timeout: 240 seconds]
leafybas_ has quit [Ping timeout: 246 seconds]
apt-get has joined #crystal-lang
leafybasil has joined #crystal-lang
<jhass> >> true.to_unsafe
<DeBot> jhass: undefined method 'to_unsafe' for Bool - http://carc.in/#/r/goe
<jhass> mmh, compiler magic I guess
BlaXpirit has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vn293
<crystal-gh> crystal/master ffce807 Ary Borenszweig: Spec: also capture block in describe/context
<crystal-gh> crystal/master 2842fee Ary Borenszweig: Some refactors in spec_helper
<crystal-gh> crystal/master 346be02 Ary Borenszweig: Fixed #1562: print float bug
NeverDie has quit [Quit: http://radiux.io/]
havenwood has joined #crystal-lang
<travis-ci> manastech/crystal#346be02 (master - Fixed #1562: print float bug): The build passed. https://travis-ci.org/manastech/crystal/builds/81633423
NeverDie has joined #crystal-lang
kostya has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vn2N5
<crystal-gh> crystal/master 12d1cc3 Ary Borenszweig: Wrap LibLLVM.add_instr_attribute
<crystal-gh> crystal/master 725fe76 Ary Borenszweig: Fixed #1559: var argument in call should never be considered a call
<travis-ci> manastech/crystal#725fe76 (master - Fixed #1559: var argument in call should never be considered a call): The build passed. https://travis-ci.org/manastech/crystal/builds/81636191
kulelu88 has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vnate
<crystal-gh> crystal/master 9e1ccd6 Ary Borenszweig: Error if doing `private macro` inside a class. Once we define what that would mean we can remove this error.
<crystal-gh> crystal/master 0a572e2 Ary Borenszweig: Fixed #1558: incorrect line number due to \r\n
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vnam0
<crystal-gh> crystal/master f7fa74e Ary Borenszweig: Small fix to previous commit
<jhass> asterite: I've been thinking, on undefined constant errors (at the toplevel/inside classes/modules etc.) wouldn't it be nice to basically dump the current require "stack", that is the path from the file given on the commandline to the file with the error. Is that info even available?
<jhass> trapped: ^ see ;)
<jhass> both fixed
<travis-ci> manastech/crystal#0a572e2 (master - Fixed #1558: incorrect line number due to \r\n): The build passed. https://travis-ci.org/manastech/crystal/builds/81641491
<travis-ci> manastech/crystal#f7fa74e (master - Small fix to previous commit): The build passed. https://travis-ci.org/manastech/crystal/builds/81642271
greengriminal has joined #crystal-lang
<jhass> jokke: pushed some signal code to crystal-gobject: https://github.com/jhass/crystal-gobject/commit/e7d3db162a491fd1624b0324d43ec09ff33254fe
<jokke> ah cool
<jhass> will probably still fail in dozens of ways if you try to use it for a real app though
<jokke> :)
<jokke> yeah i'll stick to curses for now
<jokke> i'm a console kind of guy anyway :)
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] waterlink opened pull request #1564: [RFC: HTTP::Request] provide uri component accessors (master...http/request/provide-uri-component-accessors) http://git.io/vnaup
n0xff has quit [Ping timeout: 240 seconds]
qard has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vnaoF
<crystal-gh> crystal/master 3d622d4 Ary Borenszweig: Fixed #1553: Provide a variant of `Hash.new` that accepts a size hint
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 264 seconds]
<travis-ci> manastech/crystal#3d622d4 (master - Fixed #1553: Provide a variant of `Hash.new` that accepts a size hint): The build passed. https://travis-ci.org/manastech/crystal/builds/81654599
vjdhama has quit [Remote host closed the connection]
havenn is now known as havenhaze
havenhaze has quit [Quit: Textual IRC Client: www.textualapp.com]
<jokke> any idea why the first variant works and the second doesnt? https://p.jreinert.com/m-YxLW/
<jokke> the second doesn't seem to yield :escape
<jhass> is this the game where you guess error messages? does it contain an e?
<jokke> aaah
<jokke> i think i might know what the problem is
<jokke> in the method calling this i return from the block
RX14 has quit [Quit: Fuck this shit, I'm out!]
<jokke> and i guess since i pass the block to the second method it just returns from there
<jhass> though I didn't explore if it turns back to no-captured block if you pass a captured block
<jokke> hm so there's no way to do what i want atm?
RX14 has joined #crystal-lang
<jokke> that's why i like rubys catch throw
RX14 has quit [Remote host closed the connection]
<trapped> jhass: that was relatively quick i guess
RX14 has joined #crystal-lang
<jhass> jokke: you can probably forward the block, special do |a, b| block.call(a, b) end
<jhass> or yield a, b, idk
<jokke> yeah
<jokke> hmm
<jokke> seems that i can't
havenwood has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
NeverDie has joined #crystal-lang
n0xff has joined #crystal-lang
sasha_ has quit [Quit: Page closed]
<trapped> somehow i made something segfault
<jhass> build -d foo.cr
<jhass> valgrind ./foo
<trapped> great idea
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
greengriminal has quit [Quit: Leaving]
NeverDie has joined #crystal-lang
<trapped> there seems to be something in the json deserialization code that makes it silently die
BlaXpirit has quit [Quit: Konversation]
<trapped> seems like i can't manage to call from_json at all
<trapped> JSON.parse works fine though
toydestroyer has quit [Ping timeout: 252 seconds]
havenwood has quit [Ping timeout: 244 seconds]
toydestroyer has joined #crystal-lang
Kilo`byte has quit [Ping timeout: 252 seconds]
rappo has quit [Ping timeout: 252 seconds]
rappo_ has joined #crystal-lang
Kilo`byte has joined #crystal-lang
apt-get has quit [Remote host closed the connection]
<trapped> seems like a missing field without omit_null set makes from_json die silently
<trapped> not completely sure but my code works again
<jhass> as always, make a testcase that shows the bug and open an issue ;)
<trapped> is there any way to set a global variable at compile time?
<jhass> you mean as a commandline option?
<trapped> yes
<trapped> or through env
<jhass> there's -D to set flags for ifdef
<jhass> and there's env as macro method
<trapped> env as macro method might be what i'm looking for
<jhass> http://crystal-lang.org/api/Macros.html#env%28name%29%3AStringLiteral|NilLiteral-instance-method
<trapped> thanks
<trapped> by the way, a program written in crystal probably just saved a life
rappo_ is now known as rappo
<trapped> we're using it for an experimental web interface to mobile network providers' data on cell towers' locations
<trapped> and the local police is trying it out to look for missing or lost people using cellphone usage data
<jhass> oO you put it into prod for client stuff?
<jhass> that's brave
<trapped> it's technically not prod
<trapped> they asked even if i told them it wasn't actually stable and stuff
<trapped> for some reason i can't replicate the json issue, maybe i reduced the code too much
NeverDie has quit [Quit: http://radiux.io/]
<trapped> either way i'm going to sleep and see if i can open an issue tomorrow
<jhass> cool, hf
<jhass> and sleep well
<trapped> you too
trapped has quit [Quit: int random { /* ensure randomness */ return 3; }]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
NeverDie has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
jeromegn has quit [Quit: jeromegn]
NeverDie has joined #crystal-lang
jeromegn has joined #crystal-lang