jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.7 | 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
fowlduck has quit [Remote host closed the connection]
kyrylo has quit [Ping timeout: 255 seconds]
NeverDie has quit [Quit: http://radiux.io/]
NeverDie has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 244 seconds]
dyulax has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
<dyulax> is it too soon to start translating the manual?
fowlduck has joined #crystal-lang
waterlin1 has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
waterlink has quit [Ping timeout: 268 seconds]
fowlduck has quit [Remote host closed the connection]
waj has joined #crystal-lang
blue_deref has joined #crystal-lang
sadin has quit [Remote host closed the connection]
NeverDie has joined #crystal-lang
shama has quit [Remote host closed the connection]
sadin has joined #crystal-lang
sadin has quit [Remote host closed the connection]
waterlin1 has quit [Ping timeout: 244 seconds]
sadin has joined #crystal-lang
sadin has quit [Remote host closed the connection]
sadin has joined #crystal-lang
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sadin has quit [Remote host closed the connection]
sadin has joined #crystal-lang
sadin has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
qard has joined #crystal-lang
qard has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has joined #crystal-lang
waj has quit [Read error: Connection reset by peer]
waj_ has joined #crystal-lang
<crystal-gh> [crystal] 5t111111 opened pull request #1432: Remove redundant description in docs (gh-pages...fix-redundant-description) http://git.io/vZWNm
sadin has joined #crystal-lang
dyulax has quit [Quit: Saindo]
blue_deref has quit [Quit: Taking myself out of hear.]
sadin has quit [Remote host closed the connection]
waj_ has quit [Read error: Connection reset by peer]
waj has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 264 seconds]
fowlduck has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
dyulax has joined #crystal-lang
<crystal-gh> [crystal] waj pushed 1 new commit to master: http://git.io/vZlka
<crystal-gh> crystal/master 7711879 Juan Wajnerman: Add attributes to each function to ensure a proper unwind table is generated. Disable frame pointer elimination in Darwin (fixes some random issues with exceptions in Darwin)
waj has quit [Read error: Connection reset by peer]
waj_ has joined #crystal-lang
<travis-ci> manastech/crystal#7711879 (master - Add attributes to each function to ensure a proper unwind table is generated. Disable frame pointer elimination in Darwin (fixes some random issues with exceptions in Darwin)): The build passed. https://travis-ci.org/manastech/crystal/builds/79594987
waj_ has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
kulelu88 has quit [Quit: Leaving]
sadin has joined #crystal-lang
sadin has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 268 seconds]
Ven has joined #crystal-lang
sardaukar has quit [Ping timeout: 256 seconds]
sardaukar has joined #crystal-lang
BlaXpirit has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
miah has quit [Ping timeout: 246 seconds]
Ven has joined #crystal-lang
ryanf has quit [Ping timeout: 256 seconds]
kyrylo has joined #crystal-lang
ryanf has joined #crystal-lang
<jhass> dyulax: mmh, I do expect it to change/grow quite a bit still. Could be tricky to keep the translation in sync
lokulin has quit [Quit: bye!]
leafybasil has joined #crystal-lang
lokulin has joined #crystal-lang
leafybasil has quit [Ping timeout: 272 seconds]
<crystal-gh> [crystal] jhass closed pull request #1432: Remove redundant description in docs (gh-pages...fix-redundant-description) http://git.io/vZWNm
havenwood has quit [Ping timeout: 264 seconds]
lokulin has quit [Quit: bye!]
<crystal-gh> [crystal] benoist opened pull request #1435: Add read timeout to HTTP Client (master...master) http://git.io/vZlht
leafybasil has joined #crystal-lang
_whitelogger has joined #crystal-lang
ryanf has quit [Ping timeout: 250 seconds]
ryanf has joined #crystal-lang
prp-e has joined #crystal-lang
<prp-e> Greetings, I have a question about writing user entry programs
<prp-e> I use print, and I use gets after it
<prp-e> but it doesn't show the prompt
<prp-e> :|
<jhass> prp-e: mmh, it should
<jhass> prp-e: oh, print doesn't flush for some reason :/ you can workaround for now with STDOUT.flush after print but before gets
lokulin has joined #crystal-lang
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vZ8JN
<crystal-gh> crystal/master e65b33d Benoist: Add read timeout to HTTP Client...
<crystal-gh> crystal/master 4fc89ac Jonne Haß: Merge pull request #1435 from benoist/master...
<prp-e> jhass, Thanks!
ryanf has quit [Remote host closed the connection]
<jhass> prp-e: https://github.com/manastech/crystal/issues/1436 may want to subscribe there ;)
Ven has quit [Ping timeout: 268 seconds]
ryanf has joined #crystal-lang
elia has joined #crystal-lang
elia_ has joined #crystal-lang
elia has quit [Ping timeout: 264 seconds]
<dzv> STDOUT.sync = true
<jhass> maybe we should make it the default?
<dzv> the current behavior is similar similar to stdio i think. buffering is line by default if the output is a tty, otherwise full buffering
<dzv> if i remember correctly
<dzv> i have little to no opinion on the matter. buffering does increase performance some, especially with very small writes. you could probably change the default from line buffered to no buffer when stdout is a tty
<dzv> that MAY effect the performance of some curses programs that manage the output buffer manually
<jhass> mh, yeah that might be a good idea. I'd rather have curses programs turn it off manually than the common case turn it on manually
<dzv> no buffer may also effect the performance of data spewing programs that do lots of small writes. i think those are the most common in unix
<jhass> but in those cases you usually pipe the data somewhere, no?
<dzv> normally, except by accident or tee
<dzv> honestly i don't think it matters much as long as it's buffered when not a tty
<jhass> yeah
<dzv> jhass: thoughts on https://github.com/manastech/crystal/pull/1428 and how that starts to solve problems mentioned in https://github.com/manastech/crystal/issues/835 ?
<jhass> I'm afraid I'm really not into the plans for the IO design
Ven has joined #crystal-lang
<dzv> you mean splitting them in to different interfaces?
<dzv> or you don't care?
<BlaXpirit> in every case that i'm aware of, stdout is buffered
<BlaXpirit> as much trouble as it causes, seems like it's worth it
<jhass> dzv: I mean in general, I think asterite & waj have some general ideas for the stdlib IO design but I'm not in their heads ;)
<dzv> it's always newline buffered. the tty checks were for something else
<dzv> jhass: like what?
<dzv> how do i get in their heads?
<jhass> it's an idiom. It means I don't know what their plans are and can't predict them either
trapped has joined #crystal-lang
jiriki has quit [Ping timeout: 246 seconds]
<dzv> but i want in their heads right now. if you have a key or spade you could loan me...
buggs has joined #crystal-lang
<buggs> hoi
elia has joined #crystal-lang
elia_ has quit [Ping timeout: 268 seconds]
sdogruyol has joined #crystal-lang
sdogruyol has quit [Quit: Leaving...]
<jhass> hi
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ssvb has quit [Ping timeout: 264 seconds]
Ven has joined #crystal-lang
n0xff has quit [Remote host closed the connection]
<vegai> hmm, does to_s really require a parameter for an io typo
<vegai> typo=>type :P
kgadek has joined #crystal-lang
<willl> vegai: yes and no. Object has a #to_s with no parameters that calls the #to_s(io : IO) that you define on your classes https://github.com/manastech/crystal/blob/master/src/object.cr#L79-L95
<vegai> ok
<vegai> does ruby does it like this too?
<willl> no, it just uses the first #to_s it finds as it goes up the method lookup chain
<vegai> it seems sorta magical how it works in crystal
<vegai> if I have an object f whose to_s is "io.puts("Foo")"
<vegai> and I call puts f
<vegai> meh, perhaps I'll just check the code if I care enough why it works
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> vegai: puts calls to_s on its argument. In Ruby too
<jhass> vegai: so does print and "#{interpolation}" btw
ssvb has joined #crystal-lang
dyulax has quit [Read error: Connection reset by peer]
dyulax has joined #crystal-lang
waj has joined #crystal-lang
sadin has joined #crystal-lang
dylanmei has joined #crystal-lang
Ven has joined #crystal-lang
prp-e has quit [Quit: Leaving]
apt-get_ has joined #crystal-lang
<apt-get_> hey
<apt-get_> I wanted to know, is there an equivalent for the fileutils lib on crystal?
<apt-get_> I wanted to test a quick project with Fileutils::mkdir_p
<apt-get_> but it doesn't recognise the lib
<jhass> apt-get_: iirc we got mkdir_p on File
<jhass> or Dir
<jhass> http://crystal-lang.org/api/Dir.html#mkdir_p%28path%2Cmode%3D%3Cspanclass%3D%22n%22%3E511%3C%2Fspan%3E%29-class-method
<jhass> yup
<apt-get_> jhass: thanks
<apt-get_> also, how is `raise` supposed to be used?
<apt-get_> it just showed me a "wrong number of arguments" exception
havenwood has joined #crystal-lang
<jhass> apt-get_: pass it an exception instance, raise ArgumentError.new("meh")
<apt-get_> oh
<apt-get_> ok
<apt-get_> jhass: probably last time I'm gonna bother you
<apt-get_> what's with this error? Why should I give a pointer for the File#file? method
<jhass> your dir variable may be a Bool
<jhass> make sure it's a string only
<apt-get_> jhass: it's wrapped up in a "unless dir == false" condition
<jhass> #== is a method call so crystal can't infer anything from that
<jhass> make that if dir.is_a? String
<jhass> or set dir to a String or nil and just if dir
<apt-get_> jhass: yeah, seems like so
<thor77> does anyoe have some ideas for porting tail to crystal?
kgadek has quit [Ping timeout: 264 seconds]
<jhass> File.foreach and count lines?
<jhass> mmh, guess you'll have to read it into memory once
<apt-get_> jhass: foreach doesn't work I think
<apt-get_> Error in ./file-converter.cr:21: undefined method 'foreach' for File:Class
<jhass> or read twice, counting \n's and remembering offsets
<apt-get_> I had to replace it with File.read.each_line
<jhass> oh
<jhass> well, that's not better than File.read_lines
<jhass> ah, there we go http://crystal-lang.org/api/File.html#each_line%28filename%2C%26block%29-class-method
<jhass> File.each_line is a thing
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apt-get_> also, what's the equivalent of `equal?` ?
<thor77> https://github.com/flori/file-tail/ maybe i can just take this implementation and convert it
<jhass> apt-get_: I can never remember what that one is, object identity?
<apt-get_> yeah jhass
<jhass> mmh, I guess you can compare the #object_id's for now
<apt-get_> in ./file-converter.cr:56: undefined method 'gsub' for (Int32 -> Void) (compile-time type is (String | (Int32 -> Void)))
<apt-get_> this happens even if I wrap the variable into a `x.is_a? String`
<apt-get_> uh
<apt-get_> I mean if I wrap the line
<jhass> ?code
<DeBot> jhass: Nothing known about code.
<jhass> ?code=We can't help you without your code, please post it to https://gist.github.com
<DeBot> jhass: Set code.
sadin has quit [Remote host closed the connection]
<jhass> team[:team] is a method call, the return value may change between invocations
<jhass> assign it to a local variable, then resolve the union on it
Ven has joined #crystal-lang
<apt-get_> okay
<jhass> alternatively try to use something that doesn't create so many unions. For example we got the record macro which is similar to Ruby's Struct.new
<jhass> >> record Foo, team, callback; foo = Foo.new("foo", -> { puts "hi"); foo.team.gsub("o", "e")
<DeBot> jhass: Syntax error in eval:4: unexpected token: ) - http://carc.in/#/r/enf
<jhass> >> record Foo, team, callback; foo = Foo.new("foo", -> { puts "hi" }); foo.team.gsub("o", "e")
<DeBot> jhass: # => "fee" - http://carc.in/#/r/eng
<jhass> asterite: got my pm btw?
<jhass> oh, signed off already -.-
<apt-get_> I'm wondering how to check if an index isn't out of bounds in an array
<apt-get_> before trying to check that index
<apt-get_> oh
<apt-get_> array.size
<thor77> whats the best way to count the lines of a file?
<thor77> just some loop with File.each_line?
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<thor77> but i think it's not that efficient for tailing (doing it every second)
<thor77> maybe i should monitor File.size and if it changed, count lines
<jhass> File.read(...).count("\n") I guess
<jhass> the most efficient way would be to read through it bytewise and compare, but should be good enough
<buggs> is count memchr?
<jhass> no, I don#t think memchr handles UTF-8? ;)
<buggs> then he might want to use a byte representation
<jhass> besides String#count's argument is interpreted the same way (well, close, might not handle all cases yet) as Ruby's
<apt-get_> is the --cross-compile option working?
<apt-get_> it just gives me undefined constant Stat
<jhass> depends on the target
Ven has joined #crystal-lang
<jhass> what do you want to cross compile to?
dylanmei has quit [Quit: ZZZzzz…]
ylluminate has joined #crystal-lang
<jhass> guess it's a secret
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vZ4Hx
<crystal-gh> crystal/master c0ded53 Will Leinweber: Benchmark::IPS interactive mode...
<crystal-gh> crystal/master 691f89d Jonne Haß: Merge pull request #1430 from will/benchmark-ips-interactive...
<thor77> http://carc.in/#/r/eni my tail-implementation works \o/ any improvement suggestions?
<thor77> (ofc delete the puts at l14 ;))
<rhaps0dy> does crystal have two namespaces, one for functoins and one for variables?
<rhaps0dy> else content = content() in a loop doesn't make much sense
<apt-get_> jhass: oh, sorry
<jhass> rhaps0dy: it's like ruby, locals take precedence over methods if there's ambiguity
<apt-get_> windows
<apt-get_> I'm honestly just testing things around
<apt-get_> I have mingw
<jhass> apt-get_: there's no windows support yet
<jhass> ?windows
<DeBot> Windows support is currently developed at https://github.com/xwanderer/crystal/tree/win32/win32
<apt-get_> okay
<thor77> rhaps0dy: i just don't want to parse the file twice, if there are new lines
<thor77> content = content looks confusing to me
<jhass> thor77: could rename the method to read
<thor77> yeah, good idea
<thor77> let's see if i get it to integrate it into the File-class, like to_json does for some other objects
<rhaps0dy> jhass: interesting
<rhaps0dy> so you can have a variable with the same name in kind of a stack of scopes?
<rhaps0dy> if you can define functions inside functions
<jhass> you can't define functions inside functions (nor functions inside methods or methods inside functions)
<travis-ci> manastech/crystal#691f89d (master - Merge pull request #1430 from will/benchmark-ips-interactive): The build passed. https://travis-ci.org/manastech/crystal/builds/79681083
tomchapin has joined #crystal-lang
<rhaps0dy> ah, then there's no stack. better
<jhass> well, there's a callstack, but scope wise there are only closures
<jhass> and method and function definitions do not closure, only blocks & procs do
<rhaps0dy> didn't expect that
<rhaps0dy> you have a different designation for a closure-function and a regular function?
<jhass> yes, the "closure function" is called Proc and is actually an instance of the class Proc and thus anonymous
<jhass> functions are not really used unless you do lowlevel external interfacing, in normal highlevel program you'll only have methods and Procs
<jhass> although toplevel methods are kind off like functions as they do not have a self
<jhass> but maybe I convince Ary to change that sometime :P
<rhaps0dy> I see. Nice way of duplicating implementation of objects and closures with having closures be an object too
<rhaps0dy> wha, toplevel methods?
<rhaps0dy> alright alright
<rhaps0dy> for consistency, self might be the "global scope" ?
<rhaps0dy> not sure you have that
<jhass> yeah we don't really, toplevel stuff is mostly file private
<jhass> in Ruby the toplevel scope is actually an anonymous instance of Object
waj has quit [Remote host closed the connection]
<rhaps0dy> I think that's better in the long run really, no truly global scope.
<jhass> so you're kind implicitly inside a class definition, in ruby
<rhaps0dy> which is different for every file?
<jhass> ah no, in Ruby it's actually shared, though locals are still file private iirc
<rhaps0dy> I see.
tomchapin has quit [Read error: No route to host]
tomchapi_ has joined #crystal-lang
<jhass> btw constant scope is truly global ;)
<jhass> but I have some prospect of getting $global_variables dropped
<rhaps0dy> is $global_variables where constants are stored?
<jhass> no
<jhass> just a type of variable we have
<jhass> local_or_method, @instance, @@class, $global, Constant
<rhaps0dy> so there are "globals", explicityl marked as such
<jhass> yeah, the name of the variable determines its scope
dfockler has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
waj has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
leafybasil has quit [Ping timeout: 264 seconds]
dylanmei has joined #crystal-lang
havenwood has quit [Ping timeout: 244 seconds]
shama has joined #crystal-lang
<dyulax> anyone using OS X El Captain?
<Papierkorb> jhass: Why are you trying to get them dropped btw? Are they just a pain internally, or to 'force' people to not use them?
<jhass> I think they have no valid usecases, yes
<jhass> that is there are always superior alternatives
Kilo`byte has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<jhass> and it would allow to get rid of the discrepancy between them and pseudo globals
<Papierkorb> Why does crystal btw not support raise ExceptionClass, MessageString ?
Kilo`byte has joined #crystal-lang
Kilo`byte has quit [Remote host closed the connection]
Kilo`byte has joined #crystal-lang
<jhass> I don't remember, something about constructors or maybe Ary just doesn't like it ;)
<Papierkorb> Does the splat operator exist? I can only find the form of accepting a variable amount of arguments
<jhass> you do can splat tuples, yes
<jhass> but not as universal as in Ruby
Kilo`byte has quit [Client Quit]
Kilo`byte has joined #crystal-lang
<Papierkorb> A tuple is basically a immutable array, correct?
<jhass> with compile time known length and types per position
<willl> also has the nice property of each element is only it's own type, not a union type of everything in the array
<willl> >> {1,false}[0]+1
<DeBot> willl: # => 2 - http://carc.in/#/r/enj
<willl> >> [1,false][0]+1
<DeBot> willl: Error in line 4: undefined method '+' for Bool (compile-time type is (Int32 | Bool)) - http://carc.in/#/r/enk
<Papierkorb> >> a, b = [1,2]; puts a,b
<DeBot> Papierkorb: 1 - more at http://carc.in/#/r/enl
<Papierkorb> thank god that exists
<jhass> >> a, b, c = [1, 2]
<DeBot> jhass: IndexError: Index out of bounds - more at http://carc.in/#/r/enm
<jhass> and that's runtime
<jhass> so careful
<jhass> >> a, b, c = {1, 2}
<DeBot> jhass: Error in line 4: index out of bounds for tuple {Int32, Int32} - http://carc.in/#/r/enn
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> that one should be a compile time one
<Papierkorb> >> a, b = [1,2,3]
<DeBot> Papierkorb: # => 2 - http://carc.in/#/r/eno
<BlaXpirit> and this one should be an error, at least in debug mode
<Papierkorb> BlaXpirit: why?
<Papierkorb> I like that semantics a lot in ruby. Much easier to destructure arrays which has more entries than you care about.
<Papierkorb> >> typeof([1,2])
<DeBot> Papierkorb: # => Array(Int32) - http://carc.in/#/r/enp
<Papierkorb> >> a = ->(x : Array(Int32)){|(b, c)| b + c }; a.call([1,2])
<DeBot> Papierkorb: Syntax error in eval:4: unexpected token '|', proc literals specify their arguments like this: ->(arg : Type) { ... } - http://carc.in/#/r/enq
<Papierkorb> >> a = Proc.new(Array(Int32)).new{|(b, c)| b + c }; a.call([1,2])
<DeBot> Papierkorb: Syntax error in eval:4: expecting block argument name, not ( - http://carc.in/#/r/enr
Ven has joined #crystal-lang
Kilo`byte has quit [Remote host closed the connection]
kyrylo has quit [Ping timeout: 246 seconds]
Kilo`byte has joined #crystal-lang
fowlduck has joined #crystal-lang
havenwood has joined #crystal-lang
dyulax has quit [Quit: Saindo]
Kilo`byte has quit [Read error: Connection reset by peer]
havenwood has quit [Ping timeout: 252 seconds]
Kilo`byte has joined #crystal-lang
<Papierkorb> When interfacing with C, how do I declare a struct whose size I don't know?
<Papierkorb> I also don't know what's in it, nor is it ever to be new'd or collected in crystal
<Papierkorb> is type TheStruct = Void* good enough?
<jhass> Papierkorb: do you have to allocate it via crystal or is there some sort of struct foo* make_me_foo()
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> jhass: the latter
<jhass> then just type or alias it to Void*, yeah
<Papierkorb> How can I print out the address of TheStruct (as in Void*)? Much like printf("%p", the_pointer);
<Papierkorb> puts the_pointer # prints nothing
<jhass> mmh
<jhass> can you call .address ?
<jhass> or .inspect ?
<Papierkorb> Ah. jhass, I built the binary and called it manually, it segfaults
<jhass> meh
<Papierkorb> When calling it with run, the process exits without any output with a status of 0
<jhass> guess run's broken atm in that regard :/
<jhass> try running through lldb/gdb/valgrind
<willl> p works to get the address http://hastebin.com/jixuxezure
<willl> so, #inspect
<Papierkorb> willl: thanks
havenwood has joined #crystal-lang
<Papierkorb> there we go. The interfaced library changed their API it seems. Or I forgot about that detail since I used it :)
ponga has quit []
<crystal-gh> [crystal] jhass pushed 1 new commit to master: http://git.io/vZBp0
<crystal-gh> crystal/master e5fb9aa tebasaki: Add `Array#delete_at(index, count)` and `Array#delete_at(range)`.
<Papierkorb> The C lib expects a callback function, but a NULL pointer is okay too. How do I pass a NULL for it in crystal? Pointer(MyLib::Function).null does not work: argument .. must be (MyLib::State, Int32, UInt64 -> Int32), not Pointer(MyLib::Function)
Kilo`byte has quit [Read error: Connection reset by peer]
Kilo`byte has joined #crystal-lang
<jhass> Papierkorb: did you use Function in the declaration too?
<Papierkorb> yup
<jhass> weird
<Papierkorb> like: fun call = my_call(state : State, ..., k : Function) : Void
<jhass> mmh, indeed http://carc.in/#/r/eo1
<Papierkorb> jhass: well, I just passed a dummy func for now, that worked
<travis-ci> manastech/crystal#e5fb9aa (master - Add `Array#delete_at(index, count)` and `Array#delete_at(range)`.): The build passed. https://travis-ci.org/manastech/crystal/builds/79712767
<Papierkorb> jhass: http://carc.in/#/r/eo3 first try to write a 'program'. First I thought about interfacing MRI, then check out an old version of crystal to compile the crystal compiler from MRI within crystal to go full circle, but I thought that'd be good enough for a start ;)
<Papierkorb> I actually once wrote a C/C++ parser (based on Clang) which you can feed Lua scripts to generate code. Maybe one could use that to auto generate crystal bindings too
<jhass> we have 3-4 generators already though :P
<jhass> but we would like one based on clang I think
<Papierkorb> jhass: https://github.com/NuriaProject/Tria Although its original intention was to generate introspection code for C++
<jhass> https://github.com/manastech/crystal_lib basically get this usable
<jhass> https://github.com/BlaXpirit/crystalize.py is probably the most usable one
dfockler has quit [Remote host closed the connection]
Kilo`byte has quit [Remote host closed the connection]
Kilo`byte has joined #crystal-lang
<jhass> oh and btw somebody did JS embedding recently https://github.com/jessedoyle/duktape.cr
qard has joined #crystal-lang
<jhass> Papierkorb: Ary just pointed out that passing nil works
<Papierkorb> yup, works
<Papierkorb> What's the correct way of creating a LibC::SizeT value?
<Papierkorb> 123.to_u64 can't be it
<BlaXpirit> >> LibC::SizeT.cast(123)
<DeBot> BlaXpirit: # => 123 - http://carc.in/#/r/eoc
dfockler has joined #crystal-lang
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vZRtI
<crystal-gh> crystal/master a8de25d Ary Borenszweig: Add `llvm_ext` task to Makefile
<crystal-gh> crystal/master fc87725 Ary Borenszweig: Fixed: super call inside initialize should stop looking once a match is found. Fixes #1033. Fixes #1255.
<crystal-gh> [crystal] jhass opened pull request #1440: Document passing nil instead of a function to a C function (gh-pages...callback_doc) http://git.io/vZRt8
<crystal-gh> [crystal] asterite closed pull request #1440: Document passing nil instead of a function to a C function (gh-pages...callback_doc) http://git.io/vZRt8
<crystal-gh> [crystal] jhass opened pull request #1441: Document using nil instead of Pointer.null (master...pointer_nil) http://git.io/vZRm6
<travis-ci> manastech/crystal#fc87725 (master - Fixed: super call inside initialize should stop looking once a match is found. Fixes #1033. Fixes #1255.): The build passed. https://travis-ci.org/manastech/crystal/builds/79718746
qard has joined #crystal-lang
blue_deref has joined #crystal-lang
kyrylo has joined #crystal-lang
dfockler has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
havenwood has quit [Ping timeout: 256 seconds]
sdogruyol has quit [Quit: Leaving...]
dfockler has joined #crystal-lang
Ven has joined #crystal-lang
pdurbin has joined #crystal-lang
elia has joined #crystal-lang
orliesaurus has left #crystal-lang [":'<"]
elia has quit [Read error: Connection timed out]
elia has joined #crystal-lang
waterlink has joined #crystal-lang
havenwood has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vZR1H
<crystal-gh> crystal/master 18aa70d Jonne Haß: Document using nil instead of Pointer.null
<crystal-gh> crystal/master 79edcb8 Ary Borenszweig: Merge pull request #1441 from jhass/pointer_nil...
leafybasil has joined #crystal-lang
<buggs> >> %w[ba[rz]]
<DeBot> buggs: Syntax error in eval:4: expecting identifier 'end', not ']' - http://carc.in/#/r/eps
<buggs> works in ruby
<jhass> open an issue if you want, but I'd recommend to use another separator if you plan to use it inside the literal. Easier to read for the human too
apt-get_ has quit [Ping timeout: 244 seconds]
<buggs> just for fun i tried to run some of my ruby code
<buggs> it doesn't like require 'foo', but i guess that is intentional
<jhass> yup
<jhass> '' is char, "" is string
BlaXpirit has quit [Quit: Konversation]
waterlink has quit [Ping timeout: 260 seconds]
<buggs> is there a %q{} alternative?
<jhass> >> %q(foo)
<DeBot> jhass: Syntax error in eval:4: unexpected token: % - http://carc.in/#/r/ept
<jhass> mmh
<jhass> >> %(foo)
<DeBot> jhass: # => "foo" - http://carc.in/#/r/epu
<buggs> >> %(#{1})
<DeBot> buggs: # => "1" - http://carc.in/#/r/epv
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vZRdW
<crystal-gh> crystal/master edead66 Ary Borenszweig: Fixed #942: erronous super() chain causes double execution of initializer
ylluminate has quit [Quit: Leaving.]
ponga has joined #crystal-lang
<travis-ci> manastech/crystal#edead66 (master - Fixed #942: erronous super() chain causes double execution of initializer): The build passed. https://travis-ci.org/manastech/crystal/builds/79742974
dfockler has quit [Remote host closed the connection]
Ven has quit [Ping timeout: 244 seconds]
waj has quit [Remote host closed the connection]
dfockler has joined #crystal-lang
kyrylo has quit [Quit: Konversation terminated!]
kyrylo has joined #crystal-lang
<dzv> is there a way to compare slices?
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
<crystal-gh> [crystal] technorama opened pull request #1442: Logger: Flush log messages. (master...f/logger_flush) http://git.io/vZ0Ga
waj has joined #crystal-lang
tomchapi_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #crystal-lang
elia_ has joined #crystal-lang
blue_deref has quit [Remote host closed the connection]
elia has quit [Ping timeout: 240 seconds]
waj has quit [Read error: Connection reset by peer]
waj_ has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
kyrylo has quit [Ping timeout: 240 seconds]
elia has joined #crystal-lang
elia_ has quit [Ping timeout: 264 seconds]