00:15
fowlduck has quit [Remote host closed the connection]
00:20
kyrylo has quit [Ping timeout: 255 seconds]
00:34
NeverDie has joined #crystal-lang
00:36
dylanmei has quit [Quit: ZZZzzz…]
00:37
fowlduck has joined #crystal-lang
00:41
fowlduck has quit [Ping timeout: 244 seconds]
00:50
dyulax has joined #crystal-lang
00:57
leafybasil has quit [Remote host closed the connection]
00:59
<
dyulax >
is it too soon to start translating the manual?
01:02
fowlduck has joined #crystal-lang
01:03
waterlin1 has joined #crystal-lang
01:06
waterlink has quit [Ping timeout: 268 seconds]
01:13
fowlduck has quit [Remote host closed the connection]
01:15
waj has joined #crystal-lang
01:19
blue_deref has joined #crystal-lang
01:19
sadin has quit [Remote host closed the connection]
01:23
NeverDie has joined #crystal-lang
01:30
shama has quit [Remote host closed the connection]
01:36
sadin has joined #crystal-lang
01:38
sadin has quit [Remote host closed the connection]
01:41
waterlin1 has quit [Ping timeout: 244 seconds]
01:44
sadin has joined #crystal-lang
01:44
sadin has quit [Remote host closed the connection]
01:46
sadin has joined #crystal-lang
01:52
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
01:55
sadin has quit [Remote host closed the connection]
01:57
sadin has joined #crystal-lang
01:58
sadin has quit [Remote host closed the connection]
02:19
havenwood has joined #crystal-lang
02:31
qard has joined #crystal-lang
02:53
havenwood has joined #crystal-lang
02:57
waj has quit [Read error: Connection reset by peer]
02:57
waj_ has joined #crystal-lang
03:03
<
crystal-gh >
[crystal] 5t111111 opened pull request #1432: Remove redundant description in docs (gh-pages...fix-redundant-description)
http://git.io/vZWNm
03:22
sadin has joined #crystal-lang
03:26
dyulax has quit [Quit: Saindo]
03:31
blue_deref has quit [Quit: Taking myself out of hear.]
03:36
sadin has quit [Remote host closed the connection]
03:40
waj_ has quit [Read error: Connection reset by peer]
03:40
waj has joined #crystal-lang
03:42
leafybasil has joined #crystal-lang
03:47
leafybasil has quit [Ping timeout: 264 seconds]
03:51
fowlduck has joined #crystal-lang
04:17
dyulax has joined #crystal-lang
04:20
<
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)
04:24
waj has quit [Read error: Connection reset by peer]
04:24
waj_ has joined #crystal-lang
04:30
<
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
04:34
waj_ has quit [Remote host closed the connection]
04:35
havenwood has joined #crystal-lang
04:38
fowlduck has quit [Remote host closed the connection]
04:57
kulelu88 has quit [Quit: Leaving]
05:14
sadin has joined #crystal-lang
05:28
sadin has quit [Remote host closed the connection]
06:13
leafybasil has joined #crystal-lang
06:18
leafybasil has quit [Ping timeout: 268 seconds]
07:03
Ven has joined #crystal-lang
07:15
sardaukar has quit [Ping timeout: 256 seconds]
07:16
sardaukar has joined #crystal-lang
07:43
BlaXpirit has joined #crystal-lang
07:47
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:47
miah has quit [Ping timeout: 246 seconds]
07:59
Ven has joined #crystal-lang
07:59
ryanf has quit [Ping timeout: 256 seconds]
08:00
kyrylo has joined #crystal-lang
08:07
ryanf has joined #crystal-lang
08:11
<
jhass >
dyulax: mmh, I do expect it to change/grow quite a bit still. Could be tricky to keep the translation in sync
08:18
lokulin has quit [Quit: bye!]
08:19
leafybasil has joined #crystal-lang
08:21
lokulin has joined #crystal-lang
08:23
leafybasil has quit [Ping timeout: 272 seconds]
08:31
<
crystal-gh >
[crystal] jhass closed pull request #1432: Remove redundant description in docs (gh-pages...fix-redundant-description)
http://git.io/vZWNm
08:34
havenwood has quit [Ping timeout: 264 seconds]
08:42
lokulin has quit [Quit: bye!]
08:48
<
crystal-gh >
[crystal] benoist opened pull request #1435: Add read timeout to HTTP Client (master...master)
http://git.io/vZlht
08:49
leafybasil has joined #crystal-lang
08:55
_whitelogger has joined #crystal-lang
09:04
ryanf has quit [Ping timeout: 250 seconds]
09:04
ryanf has joined #crystal-lang
09:06
prp-e has joined #crystal-lang
09:07
<
prp-e >
Greetings, I have a question about writing user entry programs
09:07
<
prp-e >
I use print, and I use gets after it
09:07
<
prp-e >
but it doesn't show the prompt
09:10
<
jhass >
prp-e: mmh, it should
09:12
<
jhass >
prp-e: oh, print doesn't flush for some reason :/ you can workaround for now with STDOUT.flush after print but before gets
09:12
lokulin has joined #crystal-lang
09:12
<
crystal-gh >
crystal/master e65b33d Benoist: Add read timeout to HTTP Client...
09:12
<
crystal-gh >
crystal/master 4fc89ac Jonne Haß: Merge pull request #1435 from benoist/master...
09:13
<
prp-e >
jhass, Thanks!
09:14
ryanf has quit [Remote host closed the connection]
09:25
Ven has quit [Ping timeout: 268 seconds]
09:27
ryanf has joined #crystal-lang
09:34
elia has joined #crystal-lang
09:39
elia_ has joined #crystal-lang
09:39
elia has quit [Ping timeout: 264 seconds]
10:05
<
dzv >
STDOUT.sync = true
10:05
<
jhass >
maybe we should make it the default?
10:06
<
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
10:06
<
dzv >
if i remember correctly
10:08
<
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
10:08
<
dzv >
that MAY effect the performance of some curses programs that manage the output buffer manually
10:09
<
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
10:10
<
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
10:11
<
jhass >
but in those cases you usually pipe the data somewhere, no?
10:11
<
dzv >
normally, except by accident or tee
10:11
<
dzv >
honestly i don't think it matters much as long as it's buffered when not a tty
10:15
<
jhass >
I'm afraid I'm really not into the plans for the IO design
10:15
Ven has joined #crystal-lang
10:16
<
dzv >
you mean splitting them in to different interfaces?
10:17
<
dzv >
or you don't care?
10:24
<
BlaXpirit >
in every case that i'm aware of, stdout is buffered
10:24
<
BlaXpirit >
as much trouble as it causes, seems like it's worth it
10:25
<
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 ;)
10:26
<
dzv >
it's always newline buffered. the tty checks were for something else
10:26
<
dzv >
jhass: like what?
10:26
<
dzv >
how do i get in their heads?
10:27
<
jhass >
it's an idiom. It means I don't know what their plans are and can't predict them either
10:29
trapped has joined #crystal-lang
10:30
jiriki has quit [Ping timeout: 246 seconds]
10:32
<
dzv >
but i want in their heads right now. if you have a key or spade you could loan me...
10:37
buggs has joined #crystal-lang
10:39
elia has joined #crystal-lang
10:41
elia_ has quit [Ping timeout: 268 seconds]
10:47
sdogruyol has joined #crystal-lang
11:00
sdogruyol has quit [Quit: Leaving...]
11:42
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:53
ssvb has quit [Ping timeout: 264 seconds]
11:55
Ven has joined #crystal-lang
11:58
n0xff has quit [Remote host closed the connection]
12:22
<
vegai >
hmm, does to_s really require a parameter for an io typo
12:23
<
vegai >
typo=>type :P
12:29
kgadek has joined #crystal-lang
12:50
<
vegai >
does ruby does it like this too?
12:55
<
willl >
no, it just uses the first #to_s it finds as it goes up the method lookup chain
12:55
<
vegai >
it seems sorta magical how it works in crystal
12:56
<
vegai >
if I have an object f whose to_s is "io.puts("Foo")"
12:56
<
vegai >
and I call puts f
12:56
<
vegai >
meh, perhaps I'll just check the code if I care enough why it works
13:01
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:10
<
jhass >
vegai: puts calls to_s on its argument. In Ruby too
13:10
<
jhass >
vegai: so does print and "#{interpolation}" btw
13:24
ssvb has joined #crystal-lang
13:27
dyulax has quit [Read error: Connection reset by peer]
13:27
dyulax has joined #crystal-lang
13:32
waj has joined #crystal-lang
13:35
sadin has joined #crystal-lang
13:36
dylanmei has joined #crystal-lang
13:37
Ven has joined #crystal-lang
13:55
prp-e has quit [Quit: Leaving]
14:22
apt-get_ has joined #crystal-lang
14:22
<
apt-get_ >
I wanted to know, is there an equivalent for the fileutils lib on crystal?
14:22
<
apt-get_ >
I wanted to test a quick project with Fileutils::mkdir_p
14:23
<
apt-get_ >
but it doesn't recognise the lib
14:24
<
jhass >
apt-get_: iirc we got mkdir_p on File
14:25
<
apt-get_ >
jhass: thanks
14:25
<
apt-get_ >
also, how is `raise` supposed to be used?
14:25
<
apt-get_ >
it just showed me a "wrong number of arguments" exception
14:26
havenwood has joined #crystal-lang
14:28
<
jhass >
apt-get_: pass it an exception instance, raise ArgumentError.new("meh")
14:29
<
apt-get_ >
jhass: probably last time I'm gonna bother you
14:30
<
apt-get_ >
what's with this error? Why should I give a pointer for the File#file? method
14:30
<
jhass >
your dir variable may be a Bool
14:30
<
jhass >
make sure it's a string only
14:31
<
apt-get_ >
jhass: it's wrapped up in a "unless dir == false" condition
14:31
<
jhass >
#== is a method call so crystal can't infer anything from that
14:32
<
jhass >
make that if dir.is_a? String
14:32
<
jhass >
or set dir to a String or nil and just if dir
14:32
<
apt-get_ >
jhass: yeah, seems like so
14:35
<
thor77 >
does anyoe have some ideas for porting tail to crystal?
14:35
kgadek has quit [Ping timeout: 264 seconds]
14:35
<
jhass >
File.foreach and count lines?
14:36
<
jhass >
mmh, guess you'll have to read it into memory once
14:36
<
apt-get_ >
jhass: foreach doesn't work I think
14:36
<
apt-get_ >
Error in ./file-converter.cr:21: undefined method 'foreach' for File:Class
14:36
<
jhass >
or read twice, counting \n's and remembering offsets
14:36
<
apt-get_ >
I had to replace it with File.read.each_line
14:37
<
jhass >
well, that's not better than File.read_lines
14:37
<
jhass >
File.each_line is a thing
14:37
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:38
<
apt-get_ >
also, what's the equivalent of `equal?` ?
14:38
<
jhass >
apt-get_: I can never remember what that one is, object identity?
14:38
<
apt-get_ >
yeah jhass
14:39
<
jhass >
mmh, I guess you can compare the #object_id's for now
14:44
<
apt-get_ >
in ./file-converter.cr:56: undefined method 'gsub' for (Int32 -> Void) (compile-time type is (String | (Int32 -> Void)))
14:44
<
apt-get_ >
this happens even if I wrap the variable into a `x.is_a? String`
14:44
<
apt-get_ >
I mean if I wrap the line
14:44
<
DeBot >
jhass: Nothing known about code.
14:45
<
DeBot >
jhass: Set code.
14:45
sadin has quit [Remote host closed the connection]
14:47
<
jhass >
team[:team] is a method call, the return value may change between invocations
14:48
<
jhass >
assign it to a local variable, then resolve the union on it
14:48
Ven has joined #crystal-lang
14:52
<
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
14:53
<
jhass >
>> record Foo, team, callback; foo = Foo.new("foo", -> { puts "hi"); foo.team.gsub("o", "e")
14:53
<
jhass >
>> record Foo, team, callback; foo = Foo.new("foo", -> { puts "hi" }); foo.team.gsub("o", "e")
14:53
<
jhass >
asterite: got my pm btw?
14:54
<
jhass >
oh, signed off already -.-
15:10
<
apt-get_ >
I'm wondering how to check if an index isn't out of bounds in an array
15:10
<
apt-get_ >
before trying to check that index
15:11
<
apt-get_ >
array.size
15:13
<
thor77 >
whats the best way to count the lines of a file?
15:13
<
thor77 >
just some loop with File.each_line?
15:13
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:14
<
thor77 >
but i think it's not that efficient for tailing (doing it every second)
15:14
<
thor77 >
maybe i should monitor File.size and if it changed, count lines
15:15
<
jhass >
File.read(...).count("\n") I guess
15:15
<
jhass >
the most efficient way would be to read through it bytewise and compare, but should be good enough
15:16
<
buggs >
is count memchr?
15:17
<
jhass >
no, I don#t think memchr handles UTF-8? ;)
15:18
<
buggs >
then he might want to use a byte representation
15:18
<
jhass >
besides String#count's argument is interpreted the same way (well, close, might not handle all cases yet) as Ruby's
15:22
<
apt-get_ >
is the --cross-compile option working?
15:22
<
apt-get_ >
it just gives me undefined constant Stat
15:22
<
jhass >
depends on the target
15:22
Ven has joined #crystal-lang
15:22
<
jhass >
what do you want to cross compile to?
15:24
dylanmei has quit [Quit: ZZZzzz…]
15:24
ylluminate has joined #crystal-lang
15:26
<
jhass >
guess it's a secret
15:26
<
crystal-gh >
crystal/master c0ded53 Will Leinweber: Benchmark::IPS interactive mode...
15:26
<
crystal-gh >
crystal/master 691f89d Jonne Haß: Merge pull request #1430 from will/benchmark-ips-interactive...
15:27
<
thor77 >
(ofc delete the puts at l14 ;))
15:28
<
rhaps0dy >
does crystal have two namespaces, one for functoins and one for variables?
15:28
<
rhaps0dy >
else content = content() in a loop doesn't make much sense
15:29
<
apt-get_ >
jhass: oh, sorry
15:29
<
jhass >
rhaps0dy: it's like ruby, locals take precedence over methods if there's ambiguity
15:30
<
apt-get_ >
I'm honestly just testing things around
15:30
<
apt-get_ >
I have mingw
15:30
<
jhass >
apt-get_: there's no windows support yet
15:30
<
thor77 >
rhaps0dy: i just don't want to parse the file twice, if there are new lines
15:30
<
thor77 >
content = content looks confusing to me
15:31
<
jhass >
thor77: could rename the method to read
15:31
<
thor77 >
yeah, good idea
15:32
<
thor77 >
let's see if i get it to integrate it into the File-class, like to_json does for some other objects
15:32
<
rhaps0dy >
jhass: interesting
15:33
<
rhaps0dy >
so you can have a variable with the same name in kind of a stack of scopes?
15:33
<
rhaps0dy >
if you can define functions inside functions
15:35
<
jhass >
you can't define functions inside functions (nor functions inside methods or methods inside functions)
15:37
tomchapin has joined #crystal-lang
15:37
<
rhaps0dy >
ah, then there's no stack. better
15:37
<
jhass >
well, there's a callstack, but scope wise there are only closures
15:38
<
jhass >
and method and function definitions do not closure, only blocks & procs do
15:38
<
rhaps0dy >
didn't expect that
15:39
<
rhaps0dy >
you have a different designation for a closure-function and a regular function?
15:39
<
jhass >
yes, the "closure function" is called Proc and is actually an instance of the class Proc and thus anonymous
15:41
<
jhass >
functions are not really used unless you do lowlevel external interfacing, in normal highlevel program you'll only have methods and Procs
15:41
<
jhass >
although toplevel methods are kind off like functions as they do not have a self
15:41
<
jhass >
but maybe I convince Ary to change that sometime :P
15:41
<
rhaps0dy >
I see. Nice way of duplicating implementation of objects and closures with having closures be an object too
15:42
<
rhaps0dy >
wha, toplevel methods?
15:42
<
rhaps0dy >
alright alright
15:42
<
rhaps0dy >
for consistency, self might be the "global scope" ?
15:42
<
rhaps0dy >
not sure you have that
15:42
<
jhass >
yeah we don't really, toplevel stuff is mostly file private
15:43
<
jhass >
in Ruby the toplevel scope is actually an anonymous instance of Object
15:43
waj has quit [Remote host closed the connection]
15:43
<
rhaps0dy >
I think that's better in the long run really, no truly global scope.
15:43
<
jhass >
so you're kind implicitly inside a class definition, in ruby
15:43
<
rhaps0dy >
which is different for every file?
15:43
<
jhass >
ah no, in Ruby it's actually shared, though locals are still file private iirc
15:45
tomchapin has quit [Read error: No route to host]
15:45
tomchapi_ has joined #crystal-lang
15:46
<
jhass >
btw constant scope is truly global ;)
15:46
<
jhass >
but I have some prospect of getting $global_variables dropped
15:52
<
rhaps0dy >
is $global_variables where constants are stored?
15:53
<
jhass >
just a type of variable we have
15:53
<
jhass >
local_or_method, @instance, @@class, $global, Constant
15:54
<
rhaps0dy >
so there are "globals", explicityl marked as such
15:54
<
jhass >
yeah, the name of the variable determines its scope
16:15
dfockler has joined #crystal-lang
16:24
waj has joined #crystal-lang
16:24
leafybasil has quit [Remote host closed the connection]
16:25
leafybasil has joined #crystal-lang
16:27
elia has quit [Quit: Computer has gone to sleep.]
16:29
leafybasil has quit [Ping timeout: 264 seconds]
16:31
dylanmei has joined #crystal-lang
16:36
havenwood has quit [Ping timeout: 244 seconds]
16:36
shama has joined #crystal-lang
16:47
<
dyulax >
anyone using OS X El Captain?
16:50
<
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?
16:51
<
jhass >
I think they have no valid usecases, yes
16:51
<
jhass >
that is there are always superior alternatives
16:52
<
jhass >
and it would allow to get rid of the discrepancy between them and pseudo globals
16:53
<
Papierkorb >
Why does crystal btw not support raise ExceptionClass, MessageString ?
16:54
Kilo`byte has joined #crystal-lang
16:54
Kilo`byte has quit [Remote host closed the connection]
16:54
Kilo`byte has joined #crystal-lang
16:54
<
jhass >
I don't remember, something about constructors or maybe Ary just doesn't like it ;)
16:56
<
Papierkorb >
Does the splat operator exist? I can only find the form of accepting a variable amount of arguments
16:57
<
jhass >
you do can splat tuples, yes
16:57
<
jhass >
but not as universal as in Ruby
16:57
Kilo`byte has quit [Client Quit]
16:58
Kilo`byte has joined #crystal-lang
16:58
<
Papierkorb >
A tuple is basically a immutable array, correct?
16:58
<
jhass >
with compile time known length and types per position
16:59
<
willl >
also has the nice property of each element is only it's own type, not a union type of everything in the array
17:00
<
willl >
>> {1,false}[0]+1
17:00
<
willl >
>> [1,false][0]+1
17:00
<
Papierkorb >
>> a, b = [1,2]; puts a,b
17:00
<
Papierkorb >
thank god that exists
17:00
<
jhass >
>> a, b, c = [1, 2]
17:00
<
jhass >
and that's runtime
17:00
<
jhass >
>> a, b, c = {1, 2}
17:01
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:01
<
jhass >
that one should be a compile time one
17:01
<
Papierkorb >
>> a, b = [1,2,3]
17:01
<
BlaXpirit >
and this one should be an error, at least in debug mode
17:02
<
Papierkorb >
BlaXpirit: why?
17:02
<
Papierkorb >
I like that semantics a lot in ruby. Much easier to destructure arrays which has more entries than you care about.
17:03
<
Papierkorb >
>> typeof([1,2])
17:04
<
Papierkorb >
>> a = ->(x : Array(Int32)){|(b, c)| b + c }; a.call([1,2])
17:04
<
DeBot >
Papierkorb: Syntax error in eval:4: unexpected token '|', proc literals specify their arguments like this: ->(arg : Type) { ... } -
http://carc.in/#/r/enq
17:05
<
Papierkorb >
>> a = Proc.new(Array(Int32)).new{|(b, c)| b + c }; a.call([1,2])
17:14
Ven has joined #crystal-lang
17:31
Kilo`byte has quit [Remote host closed the connection]
17:40
kyrylo has quit [Ping timeout: 246 seconds]
17:45
Kilo`byte has joined #crystal-lang
17:46
fowlduck has joined #crystal-lang
17:49
havenwood has joined #crystal-lang
17:50
dyulax has quit [Quit: Saindo]
17:56
Kilo`byte has quit [Read error: Connection reset by peer]
17:56
havenwood has quit [Ping timeout: 252 seconds]
17:57
Kilo`byte has joined #crystal-lang
17:59
<
Papierkorb >
When interfacing with C, how do I declare a struct whose size I don't know?
17:59
<
Papierkorb >
I also don't know what's in it, nor is it ever to be new'd or collected in crystal
18:00
<
Papierkorb >
is type TheStruct = Void* good enough?
18:00
<
jhass >
Papierkorb: do you have to allocate it via crystal or is there some sort of struct foo* make_me_foo()
18:00
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:00
<
Papierkorb >
jhass: the latter
18:01
<
jhass >
then just type or alias it to Void*, yeah
18:04
<
Papierkorb >
How can I print out the address of TheStruct (as in Void*)? Much like printf("%p", the_pointer);
18:04
<
Papierkorb >
puts the_pointer # prints nothing
18:04
<
jhass >
can you call .address ?
18:05
<
jhass >
or .inspect ?
18:07
<
Papierkorb >
Ah. jhass, I built the binary and called it manually, it segfaults
18:07
<
Papierkorb >
When calling it with run, the process exits without any output with a status of 0
18:08
<
jhass >
guess run's broken atm in that regard :/
18:08
<
jhass >
try running through lldb/gdb/valgrind
18:11
<
willl >
so, #inspect
18:12
<
Papierkorb >
willl: thanks
18:17
havenwood has joined #crystal-lang
18:18
<
Papierkorb >
there we go. The interfaced library changed their API it seems. Or I forgot about that detail since I used it :)
18:32
<
crystal-gh >
crystal/master e5fb9aa tebasaki: Add `Array#delete_at(index, count)` and `Array#delete_at(range)`.
18:33
<
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)
18:35
Kilo`byte has quit [Read error: Connection reset by peer]
18:36
Kilo`byte has joined #crystal-lang
18:38
<
jhass >
Papierkorb: did you use Function in the declaration too?
18:39
<
Papierkorb >
like: fun call = my_call(state : State, ..., k : Function) : Void
18:40
<
Papierkorb >
jhass: well, I just passed a dummy func for now, that worked
18:41
<
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 ;)
18:42
<
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
18:43
<
jhass >
we have 3-4 generators already though :P
18:43
<
jhass >
but we would like one based on clang I think
18:51
dfockler has quit [Remote host closed the connection]
18:52
Kilo`byte has quit [Remote host closed the connection]
18:53
Kilo`byte has joined #crystal-lang
18:54
qard has joined #crystal-lang
18:56
<
jhass >
Papierkorb: Ary just pointed out that passing nil works
18:56
<
Papierkorb >
yup, works
18:57
<
Papierkorb >
What's the correct way of creating a LibC::SizeT value?
18:57
<
Papierkorb >
123.to_u64 can't be it
19:00
<
BlaXpirit >
>> LibC::SizeT.cast(123)
19:01
dfockler has joined #crystal-lang
19:04
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:05
<
crystal-gh >
crystal/master a8de25d Ary Borenszweig: Add `llvm_ext` task to Makefile
19:05
<
crystal-gh >
crystal/master fc87725 Ary Borenszweig: Fixed: super call inside initialize should stop looking once a match is found. Fixes #1033. Fixes #1255.
19:05
<
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
19:10
<
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
19:11
<
crystal-gh >
[crystal] jhass opened pull request #1441: Document using nil instead of Pointer.null (master...pointer_nil)
http://git.io/vZRm6
19:20
qard has joined #crystal-lang
19:24
blue_deref has joined #crystal-lang
19:35
kyrylo has joined #crystal-lang
19:38
dfockler has quit [Remote host closed the connection]
19:39
sdogruyol has joined #crystal-lang
19:59
havenwood has quit [Ping timeout: 256 seconds]
20:04
sdogruyol has quit [Quit: Leaving...]
20:05
dfockler has joined #crystal-lang
20:07
Ven has joined #crystal-lang
20:13
pdurbin has joined #crystal-lang
20:21
elia has joined #crystal-lang
20:23
orliesaurus has left #crystal-lang [":'<"]
20:33
elia has quit [Read error: Connection timed out]
20:34
elia has joined #crystal-lang
20:42
waterlink has joined #crystal-lang
20:42
havenwood has joined #crystal-lang
20:43
<
crystal-gh >
crystal/master 18aa70d Jonne Haß: Document using nil instead of Pointer.null
20:43
<
crystal-gh >
crystal/master 79edcb8 Ary Borenszweig: Merge pull request #1441 from jhass/pointer_nil...
20:46
leafybasil has joined #crystal-lang
20:55
<
buggs >
>> %w[ba[rz]]
20:55
<
buggs >
works in ruby
20:59
<
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
21:02
apt-get_ has quit [Ping timeout: 244 seconds]
21:03
<
buggs >
just for fun i tried to run some of my ruby code
21:03
<
buggs >
it doesn't like require 'foo', but i guess that is intentional
21:04
<
jhass >
'' is char, "" is string
21:05
BlaXpirit has quit [Quit: Konversation]
21:06
waterlink has quit [Ping timeout: 260 seconds]
21:13
<
buggs >
is there a %q{} alternative?
21:21
<
crystal-gh >
crystal/master edead66 Ary Borenszweig: Fixed #942: erronous super() chain causes double execution of initializer
21:22
ylluminate has quit [Quit: Leaving.]
21:24
ponga has joined #crystal-lang
21:35
dfockler has quit [Remote host closed the connection]
21:36
Ven has quit [Ping timeout: 244 seconds]
22:01
waj has quit [Remote host closed the connection]
22:10
dfockler has joined #crystal-lang
22:27
kyrylo has quit [Quit: Konversation terminated!]
22:28
kyrylo has joined #crystal-lang
22:33
<
dzv >
is there a way to compare slices?
22:35
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
22:47
<
crystal-gh >
[crystal] technorama opened pull request #1442: Logger: Flush log messages. (master...f/logger_flush)
http://git.io/vZ0Ga
23:05
waj has joined #crystal-lang
23:05
tomchapi_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
23:06
NeverDie has joined #crystal-lang
23:09
elia_ has joined #crystal-lang
23:10
blue_deref has quit [Remote host closed the connection]
23:13
elia has quit [Ping timeout: 240 seconds]
23:34
waj has quit [Read error: Connection reset by peer]
23:34
waj_ has joined #crystal-lang
23:40
kyrylo has quit [Ping timeout: 240 seconds]
23:46
elia has joined #crystal-lang
23:50
elia_ has quit [Ping timeout: 264 seconds]