00:04
havenwood has joined #crystal-lang
00:31
greengriminal has joined #crystal-lang
00:48
nakilon has joined #crystal-lang
00:53
nakilon has quit [Ping timeout: 264 seconds]
00:54
jeromegn has quit [Quit: jeromegn]
00:57
thelonelyghost has joined #crystal-lang
01:00
<
thelonelyghost >
Trying to hack on some OS-specific code and preparing for crystal being cross-platform to non-unix systems. Is there an equivalent to RUBY_PLATFORM here?
01:01
havenwood has quit [Ping timeout: 252 seconds]
01:02
miah has joined #crystal-lang
01:04
waj has quit [Remote host closed the connection]
01:05
Philpax has joined #crystal-lang
01:13
waj has joined #crystal-lang
01:24
waj has quit [Remote host closed the connection]
01:28
waj_ has joined #crystal-lang
01:58
Philpax has quit [Ping timeout: 255 seconds]
02:00
havenwood has joined #crystal-lang
02:01
greengriminal has quit [Quit: Leaving]
02:08
Philpax has joined #crystal-lang
02:10
greengriminal has joined #crystal-lang
02:48
<
crystal-gh >
crystal/master 899b866 Juan Wajnerman: Debug metadata for char, float and bool types
02:48
<
crystal-gh >
crystal/master f110cc2 Juan Wajnerman: Debug metadata for enum types
02:49
nakilon has joined #crystal-lang
02:53
nakilon has quit [Ping timeout: 256 seconds]
02:56
greengriminal has quit [Quit: Leaving]
03:18
kulelu88 has quit [Quit: Leaving]
03:23
<
dzv >
jhass: does #1527 cause problems by itself? would it be possible to merge as i have other branches waiting on it
03:29
<
dzv >
problem with HEAD. in ./src/llvm/di_builder.cr:55: argument 'value' of 'LibLLVMExt#di_builder_create_enumerator' must be Int64, not Int32
03:35
waj_ has quit [Remote host closed the connection]
04:01
<
dzv >
nevermind. my crystal version was too old
04:29
Philpax has quit [Ping timeout: 250 seconds]
04:34
Philpax has joined #crystal-lang
05:34
trapped has joined #crystal-lang
05:35
Philpax has quit [Ping timeout: 240 seconds]
05:38
thelonelyghost has quit [Quit: Leaving]
06:06
Philpax has joined #crystal-lang
06:11
Philpax has quit [Read error: Connection reset by peer]
06:11
Philpax has joined #crystal-lang
07:15
Herbstein has joined #crystal-lang
07:16
<
Herbstein >
There's a problem with the dependencies on Ubuntu
07:16
<
Herbstein >
libssl-dev isn't included in the install but is needed in the simple HTTPServer example
08:02
<
jhass >
dzv: saw my link?
08:10
Philpax has quit [Ping timeout: 250 seconds]
08:24
trapped has quit [Read error: Connection reset by peer]
08:24
trapped has joined #crystal-lang
08:29
<
crystal-gh >
crystal/master 0e73fe8 pgkos: Reimplemented glob in Crystal
08:29
<
crystal-gh >
crystal/master 9664d24 Jonne Haß: Merge pull request #1487 from pgkos/recursive-glob...
08:30
leafybasil has quit [Remote host closed the connection]
08:35
<
crystal-gh >
crystal/master 2d2786c Technorama Ltd: Make Future lazier. Don't spawn an additional Fiber with lazy.
08:35
<
crystal-gh >
crystal/master 5669fb4 Jonne Haß: Merge pull request #1527 from technorama/f/retirement...
08:35
havenwood has quit [Ping timeout: 246 seconds]
08:46
chdorner has joined #crystal-lang
08:48
<
chdorner >
I wanted to add some things to the docs (the ones done with gitbook,
http://crystal-lang.org/docs/) but couldn't find where files live. Can anybody point me in the right direction?
08:52
leafybasil has joined #crystal-lang
08:53
leafybas_ has joined #crystal-lang
08:53
jtarchie has quit [Remote host closed the connection]
08:53
chdorner has quit [Remote host closed the connection]
08:53
AckZ has quit [Remote host closed the connection]
08:53
iamstef has quit [Remote host closed the connection]
08:53
emmanueloga has quit [Remote host closed the connection]
08:53
guilleiguaran__ has quit [Remote host closed the connection]
08:54
<
jhass >
I'd love to but you would have to stick around for more than 5 minutes
08:56
leafybasil has quit [Ping timeout: 268 seconds]
09:00
guilleiguaran__ has joined #crystal-lang
09:07
iamstef has joined #crystal-lang
09:10
AckZ has joined #crystal-lang
09:12
emmanueloga has joined #crystal-lang
09:17
<
jokke >
will crystal ever have the possibility to use compiled crystal libraries?
09:17
<
jokke >
as in shared libraries
09:17
<
jokke >
i imagine type checking to be a major problem then
09:19
<
crystal-gh >
[crystal] adlerhsieh opened pull request #1537: Add note to option_parser (master...master)
http://git.io/vnl9B
09:20
<
crystal-gh >
[crystal] chdorner opened pull request #1538: Add installation docs for Arch Linux (gh-pages...installation-docs-arch-linux)
http://git.io/vnl9K
09:22
<
jokke >
what is GC?
09:23
<
jokke >
garbage collection
09:24
<
crystal-gh >
[crystal] jhass closed pull request #1538: Add installation docs for Arch Linux (gh-pages...installation-docs-arch-linux)
http://git.io/vnl9K
09:52
<
crystal-gh >
[crystal] adlerhsieh closed pull request #1537: Add note to option_parser (master...master)
http://git.io/vnl9B
09:56
jtarchie has joined #crystal-lang
09:57
Philpax has joined #crystal-lang
09:58
chdorner has joined #crystal-lang
09:58
Philpax_ has joined #crystal-lang
09:59
chdorner__ has joined #crystal-lang
10:01
chdorner__ has quit [Client Quit]
10:01
Philpax has quit [Ping timeout: 255 seconds]
10:03
chdorner has quit []
10:08
Philpax_ has quit [Read error: Connection reset by peer]
10:09
Philpax has joined #crystal-lang
10:14
chdorner has joined #crystal-lang
10:15
<
trapped >
how do i use the yielded data as an argument in the one-liner block syntax? e.g. you can do `[".", "..", "style.css", "logo.png"].reject!(&.=~(/\.+/).== 0) # ["style.css", "logo.png"]` but not `.reject!([".", ".."].includes? &.itself)`
10:19
<
jhass >
I don't get the intention of the last one
10:19
<
jhass >
what would be its long form?
10:20
<
trapped >
.reject! do |elem| \ [".", ".."].includes? elem \ end
10:21
<
trapped >
basically remove elements from an array if they're included in another array
10:22
<
trapped >
i'd like to do it as an one-liner
10:22
<
trapped >
currently i'm working around thanks to the fact i know the element type is string
10:23
<
trapped >
i'd also like to prepend text to strings in an array using .map: `["a", "bcd"].map("/#{&.itself}") # ["/a", "/bcd"]`
10:26
<
jhass >
well, the point of the shortcut syntax is to not have to explicitly specify the parameter, so you can't explicitly refer to the parameter
10:26
<
jhass >
use the long form
10:27
<
jhass >
curly braces are much nicer when you chain ;)
10:29
<
jhass >
trapped: it's still a block
10:29
<
jhass >
you wouldn't do foo(do |x| ..; end) either, would you?
10:29
<
trapped >
right right, the newlines
10:29
<
jhass >
no, the parens
10:29
<
trapped >
Array#- seems the best way
10:30
<
trapped >
that'd work in ruby so i thought it'd work here too
10:30
<
jhass >
no it wouldn't
10:37
<
jokke >
are there any gtk bindings for crystal?
10:38
<
jokke >
i couldn't find anything on github at least.
10:43
<
chdorner >
I am getting two errors when trying to build crystal myself (or generate the docs with `make doc`). It used to work on Friday IIRC. Travis seems to be happily building, so there might something weird on my machine. I'm on the lastest commit 5669fb4.
10:46
<
trapped >
you missed a couple builds
10:46
<
trapped >
your compiler is too old to compile itself
10:47
<
chdorner >
the one on my system? That one should be 0.7.7
10:47
<
trapped >
you need at least 0.8.0
10:47
<
jhass >
jokke: jhass/crystal-gobject has some rough/early stuff
10:48
<
jhass >
jokke: contributions welcome, if you want to have explained how it works just ask
10:48
<
jhass >
chdorner: git checkout 0.8.0; make; git checkout master
10:51
<
chdorner >
Ah, that worked. Thanks!
10:52
<
jokke >
jhass: sure
10:53
<
jhass >
so, do you know about gobject-introspection?
10:59
<
jhass >
ah well, guess you found an issue in the yaml binding
10:59
<
trapped >
gonna look into it
11:04
<
trapped >
only had to update shards
11:10
Ven has joined #crystal-lang
11:15
ssvb has quit [Ping timeout: 256 seconds]
11:26
pawnbox_ has joined #crystal-lang
11:37
waj has joined #crystal-lang
12:02
Philpax_ has joined #crystal-lang
12:03
waj has quit [Remote host closed the connection]
12:06
Philpax has quit [Ping timeout: 265 seconds]
12:13
<
jokke >
jhass: have you updated?
12:14
<
jokke >
i can't build crystal because of ncurses
12:14
<
jhass >
jokke: rm -rf src
12:18
<
pawnbox_ >
pointer.cr seems to have incomplete implementation of hash_address.
12:18
<
pawnbox_ >
line 288
12:19
shadeslayer has quit [Remote host closed the connection]
12:19
<
pawnbox_ >
That's causing my crystal build to fail.
12:20
<
jhass >
pawnbox_: def_hash is a macro
12:20
<
jhass >
could you put the full error into a gist?
12:20
<
pawnbox_ >
Oh i raised a pull request
12:21
<
pawnbox_ >
sry issue
12:21
shadeslayer has joined #crystal-lang
12:21
<
chdorner >
pawnbox_: that's the exact issue I had this morning, you need crystal 0.8.0 to build it
12:21
<
chdorner >
meaning, the compiler is too old to build itself
12:22
<
pawnbox_ >
so i have brew install new crystal
12:23
<
jhass >
I commented on your issue
12:24
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:25
<
pawnbox_ >
thanks jhass
12:31
pawnbox_ has quit [Ping timeout: 265 seconds]
12:36
<
jokke >
jhass: how did you handle signals in you gobject lib?
12:36
<
jokke >
g_signal_connect_data
12:38
<
jokke >
or rather what type is Callba ck
12:39
Philpax_ has quit [Quit: Leaving]
12:40
<
jokke >
and Callback is a struct?
12:41
<
jokke >
i thought one must pass a function pointer
12:42
<
jokke >
and what if i need to return something from the proc?
12:42
<
jokke >
or rather get arguments
12:43
<
jokke >
crystal won't let me cast Foo -> Bar to -> Void
12:43
<
jhass >
I said it's early :P
12:43
<
jhass >
which signal for example?
12:44
<
jokke >
activate on g_application
12:44
jeromegn has joined #crystal-lang
12:48
jeromegn has quit [Ping timeout: 240 seconds]
12:48
jeromegn_ has joined #crystal-lang
12:49
<
jhass >
now doing overloads for each possible signal doesn't sound right either :/
12:50
<
jokke >
not really, no :)
12:57
<
jhass >
or rather something like def on_foo(&block : LibX::FooSignal) that uses Box to wrap the block and connect
13:13
Ven has joined #crystal-lang
13:20
pawnbox has joined #crystal-lang
13:21
havenwood has joined #crystal-lang
13:22
<
jhass >
I think most existing docs use
*foo* to refer to the arguments
13:24
<
jhass >
And our doc reference convention is slightly different, `Hash#fetch` still applies, but class methods are referred to like `Hash.new`
13:25
<
jhass >
puts calls to_s, puts "#{foo}" is an anti pattern in both Ruby & Crystal
13:25
greengriminal has joined #crystal-lang
13:26
<
jhass >
the quotes in puts x #=> "foo" could be confusing, since they wouldn't be printed and puts returns nil
13:26
<
jhass >
chdorner: that's all I have, looks good otherwise
13:28
<
jokke >
jhass: are there any examples for the curses module?
13:28
<
jokke >
there's 0 documentation
13:30
<
jokke >
jhass: nothing happens if i run that
13:31
Neverdie has joined #crystal-lang
13:31
<
chdorner >
jhass: thanks. Will change these things. how do you mean that most existing docs use
*foo* to refer to the arguments?
13:31
<
jhass >
literally
*foo* instead of `foo`
13:32
<
jhass >
keep in mind it's markdown, sort of :P
13:34
<
chdorner >
that's why I did it with backticks, to make it render in a <code> tag
13:34
<
chdorner >
but what you're saying is that
13:34
<
chdorner >
h.fetch("foo", nil) #=>
*nil*
13:34
<
chdorner >
is more commonly used than
13:34
<
chdorner >
h.fetch("foo", nil) #=> `nil`
13:35
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:35
<
chdorner >
okay, then I dont' understand what you mean, sorry
13:35
<
jhass >
That "Returns `true` if `key` exists in the hash" is commonly pictured as "Returns `true` if
*key* exists in the hash"
13:36
<
chdorner >
ah okay, now I got it. * for variable names (like arguments), ` for values
13:36
<
chdorner >
will change
13:42
Ven has joined #crystal-lang
13:46
<
chdorner >
jhass: and generally the goal is to have short documentation for each public method? (long term obviously)
13:49
<
Netfeed >
chdorner: just submit code and jhass will document it :P
13:50
<
chdorner >
haha, didn't happen to the code in the Hash class :P
13:50
<
jhass >
Netfeed: you mean and I will tell other people to document it :P
13:50
<
Netfeed >
worked for HTTP::Cookie at least
13:52
<
chdorner >
I mean it's mostly fine for people coming from Ruby, most methods do the same or at least a similar thing, but it's good to have the public API methods documented for non-Ruby people IMO
13:53
<
jhass >
sure, definitely wanted
13:59
pawnbox has quit [Ping timeout: 240 seconds]
14:04
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:09
pawnbox_ has joined #crystal-lang
14:10
<
jokke >
i tried defining an enum and using a macro for NCURSES_BITS but i got invalid constant value errors then
14:11
<
jhass >
enum sounds good, maybe you need to change its type or the output type of your macro?
14:13
<
jokke >
ah i see :/
14:16
Ven has joined #crystal-lang
14:25
<
pawnbox_ >
Well this might be a noob question, but i am not able to run test for shards
14:26
<
jhass >
pawnbox_: you need to install minitest using shards first :P run `shards` or `crystal deps`
14:28
<
pawnbox_ >
in short : to run a dependency manager use other dependency manager.
14:28
kostya has joined #crystal-lang
14:29
<
jhass >
well, rather "to run the test for the dependency manager run the same dependency manager first" :P
14:32
<
pawnbox_ >
finally i have some test running.
14:33
<
pawnbox_ >
jhass: I have this error : ld: warning: directory not found for option '-L/opt/homebrew/lib'
14:33
<
pawnbox_ >
Why is this directory linked?
14:34
<
pawnbox_ >
for libyaml?
14:36
<
jhass >
keep in mind that ysbaddaden has no OS X machine to test against
14:37
<
jokke >
i just get Error invalid constant value
14:37
<
jokke >
but no line number
14:37
kostya has quit [Ping timeout: 256 seconds]
14:38
<
pawnbox_ >
I have these libs inside /usr/local/Cellar
14:38
<
jokke >
jhass: anything obvious?
14:38
<
jhass >
open an issue for that one already :P
14:38
<
jhass >
pawnbox_: best edit the Makefile accordingly
14:38
<
jokke >
jhass: why? you already have
14:39
<
pawnbox_ >
yep that's what i'll have to do.
14:39
<
jhass >
jokke: "unhelpful error message" ?
14:39
<
jhass >
can't remember I did
14:40
<
jhass >
jokke: okay I guess the issue is that << is a method call, thus runtime
14:40
<
jhass >
and atm constant values need to be known at compile time
14:42
<
jhass >
mmh, dunno, I thought I did such things already
14:43
<
jhass >
jokke: looks like the ~ is not supported
14:43
<
jhass >
your next issue ;)
14:44
pawnbox_ has quit [Remote host closed the connection]
14:46
<
crystal-gh >
[crystal] pgkos opened pull request #1544: Fix some typos in toplevel.html (gh-pages...docs-toplevel-stdout)
http://git.io/vn46T
14:47
chino_ has joined #crystal-lang
14:47
<
dzv >
jhass: Process.waitpid used to call waitpid directly. now the signal handler for SIGCHLD must be invoked before waitpid will return anything
14:47
<
dzv >
in playpen the signals are never sent CHLD
14:48
<
dzv >
there is a zombie process waiting which is why waitpid called directly works
14:48
<
jhass >
is this something we can fix in crystal or would you say this is a bug in playpen?
14:49
<
jhass >
(or maybe both I guess)
14:49
<
dzv >
80% sure playpen but i need to construct a separate test to rule out crystal
14:49
<
jhass >
yeah, a small .c reproducing would be awesome in order to report it to playpen
14:50
kostya has joined #crystal-lang
14:50
jeromegn_ has quit [Read error: Connection reset by peer]
14:51
Neverdie has joined #crystal-lang
14:51
jeromegn has joined #crystal-lang
14:52
pawnbox has joined #crystal-lang
14:53
<
crystal-gh >
[crystal] jhass closed pull request #1544: Fix some typos in toplevel.html (gh-pages...docs-toplevel-stdout)
http://git.io/vn46T
14:53
<
kostya >
why you remove length for strings O_O
14:53
<
jhass >
because size is better™ :P
14:54
<
jhass >
we wanted to drop the alias and size had the bigger camp, sorry
14:54
Liothen has quit [Ping timeout: 260 seconds]
14:54
<
crystal-gh >
[crystal] pgkos opened pull request #1545: Fix typos in kernel.cr comments (master...kernel-comments-stdout)
http://git.io/vn4Xs
14:55
NeverDie_ has joined #crystal-lang
14:56
NeverDi__ has joined #crystal-lang
14:56
NeverDie_ has quit [Read error: Connection reset by peer]
14:56
Liothen has joined #crystal-lang
14:58
Neverdie has quit [Ping timeout: 256 seconds]
15:00
NeverDi__ is now known as NeverDie
15:01
gamemanj has joined #crystal-lang
15:05
waj has joined #crystal-lang
15:06
chino_ has quit [Ping timeout: 246 seconds]
15:08
waj has quit [Remote host closed the connection]
15:08
waj has joined #crystal-lang
15:09
chino_ has joined #crystal-lang
15:09
willl has quit [Quit: Connection closed for inactivity]
15:10
<
crystal-gh >
[crystal] chdorner opened pull request #1546: Add missing link to Arch Linux installation (gh-pages...add-missing-arch-installation-link)
http://git.io/vn49b
15:14
<
crystal-gh >
[crystal] jhass closed pull request #1546: Add missing link to Arch Linux installation (gh-pages...add-missing-arch-installation-link)
http://git.io/vn49b
15:15
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:15
<
crystal-gh >
[crystal] jhass closed pull request #1545: Fix typos in kernel.cr comments (master...kernel-comments-stdout)
http://git.io/vn4Xs
15:19
Liothen has joined #crystal-lang
15:19
Liothen has quit [Changing host]
15:41
pawnbox has quit [Remote host closed the connection]
15:44
waj has quit [Remote host closed the connection]
16:06
<
crystal-gh >
crystal/master 43346f1 Ary Borenszweig: Fixed #1542: missing location of "~" call
16:06
<
crystal-gh >
crystal/master a79c991 Ary Borenszweig: Fixed #1543: support `~` in enum constants
16:14
<
dzv >
is there a forwardable or delegated class somewhere?
16:15
waj has joined #crystal-lang
16:15
NeverDie has joined #crystal-lang
16:20
chino_ has quit [Ping timeout: 246 seconds]
16:23
<
crystal-gh >
[crystal] adlerhsieh opened pull request #1547: add ecr library usage (master...master)
http://git.io/vnBcq
16:23
<
chdorner >
is there a way to check if a class implements the abstract `<=>` method?
16:23
<
chdorner >
every class seems to have it because it's defined as an abstract method in Object
16:23
<
chdorner >
but `(-> {}) <=> (-> {})` raises an error saying that the `<=>` method needs to be implemented
16:23
<
chdorner >
as an example
16:24
<
dzv >
perhaps "abstract <=>" should be moved to Comparable
16:29
<
chdorner >
sounds reasonable to me
16:29
<
chdorner >
I'll draft something up
16:35
NeverDie has joined #crystal-lang
16:37
BlaXpirit has joined #crystal-lang
16:39
<
jokke >
how would i define instance methods on a class that expand the attributes in macro context?
16:39
<
jokke >
or isn't this possible?
16:40
<
jokke >
this won't work
16:40
havenwood has quit [Ping timeout: 246 seconds]
16:41
<
jhass >
.argify perhaps?
16:41
<
jokke >
argify?? :D
16:43
<
jokke >
i still don't understand at what point i should use that
16:44
<
jhass >
ah, thought your issue is in the call
16:44
<
jhass >
macro def's can only take runtime args
16:45
<
jhass >
make them regular macros perhaps?
16:45
<
jokke >
but then i wouldn't have access to self
16:46
<
jokke >
but if i use a normal macro, wouldn't that then be like a class method?
16:47
<
jokke >
is there some hook at which i could define the methods?
16:47
<
jhass >
this is why I want something like Julia's generator methods
16:48
<
jhass >
basically macro defs that take compile time args and overload on those
16:57
chino_ has joined #crystal-lang
17:03
willl has joined #crystal-lang
17:06
greengriminal has quit [Ping timeout: 246 seconds]
17:07
greengriminal has joined #crystal-lang
17:20
<
asterite >
if we have length, size, count, you can't do that generic algorithm. Well, you can, but you have to ask each collection implementor to please provide all aliases, which is boring and tedious
17:20
<
asterite >
Standarizing on a single name is simpler and better
17:21
apt-get has joined #crystal-lang
17:21
<
asterite >
jhass: wow
17:21
<
asterite >
I was going to suggest a flag to the compiler to not issue an error on nested definitions
17:23
<
jhass >
well, I think my example shows that the macro approach doesn't work
17:24
<
asterite >
Mmm... why do you need to wrap the code in the first place?
17:24
<
asterite >
Oh, because it doesn't `puts` it?
17:25
<
jhass >
has any output at all
17:25
<
asterite >
So maybe we can add an option to the compiler to print the output, so it'll do it for you?
17:26
<
asterite >
So any tool that wants to "eval" code can do it
17:26
<
jhass >
just had a thought, maybe I can just extract the last expression with that method
17:26
<
jhass >
and even check if I can wrap it to some degree
17:27
<
jhass >
>> record Foo, foo; # if this errors
17:27
<
jhass >
>> record Foo, foo; Foo.new(1) # while this works it's acceptable I guess
17:27
<
asterite >
Strange, that should error :-P
17:28
<
jhass >
I pinned the bot to 0.7.6 for now
17:29
qard has joined #crystal-lang
17:30
apt-get has quit [Read error: Connection reset by peer]
17:31
apt-get has joined #crystal-lang
17:35
havenwood has joined #crystal-lang
17:35
<
jhass >
oh, me, forgot to change the name :D
17:37
<
jhass >
no delete either? :(
17:37
<
jhass >
can I get the index?
17:41
<
jhass >
fucks up line numbers but oh well
17:43
<
asterite >
Oh, try to do {% exp
17:43
<
asterite >
with a space
17:43
<
asterite >
otherwise it thinks it's {% ... %}
17:44
<
asterite >
that's an issue with macro variables, maybe we should choose another character for them
17:44
<
BlaXpirit >
what a mess :(
17:47
greengriminal has quit [Quit: This computer has gone to sleep]
17:53
<
jhass >
Array#select will always return an array with same type
17:54
<
jhass >
the compiler would have to special case it if not
17:54
<
jhass >
BlaXpirit: close, it needs to go into a chained map
17:55
DeBot has quit [Quit: Crystal IRC]
17:55
<
BlaXpirit >
oh i didn't realize my addition made no sense
17:55
DeBot has joined #crystal-lang
17:55
<
BlaXpirit >
i made Bool as Int xD
17:56
async_prince has joined #crystal-lang
17:56
<
jhass >
malformed format string - %'}'
17:57
<
jhass >
now I have to think of another unique token that I can gsub...
17:58
<
jhass >
okay, maybe not unique
18:00
DeBot has quit [Quit: Crystal IRC]
18:00
DeBot has joined #crystal-lang
18:01
<
jhass >
okay, I'll use a test instance
18:02
<
RX14 >
these java programmers... type annotating everything...
18:02
<
gamemanj >
RX14 is complaining about me.
18:03
<
gamemanj >
Apparently I'm too java-y for his tastes.
18:03
<
gamemanj >
Should I convert into a mocha for him? Or maybe a mocha-latte?
18:03
<
RX14 >
you use crystal as if it's strongly typed
18:03
<
RX14 >
you know what i mean
18:03
<
jhass >
it's even statically typed :P
18:04
<
asterite >
jhass: I think the parser removes the expression from the Expressions, so there are less nodes around
18:04
<
jhass >
"as if there's no type inference" ;)
18:04
<
jhass >
asterite: :(
18:04
<
RX14 >
but you aren't meant to annotate every functions return AND every argument's type
18:04
<
gamemanj >
Maybe not, but why allow annotation if you don't expect me to use them.
18:04
<
jhass >
asterite: any bug around that I can abuse? :P
18:04
<
RX14 >
or make abstract classes for the sake of abstract classes like you do in java
18:05
<
gamemanj >
Hey, I would've used an interface if it was possible.
18:05
<
jhass >
Crystal is too smart!
18:05
<
RX14 >
that's the problem
18:05
<
RX14 >
this is duck typed
18:05
<
asterite >
I think it should just return an Expressions in that case, I though I removed that "feature", but apparently not
18:05
<
RX14 >
the intracface IS the usage
18:06
<
asterite >
jhass: You could do: if exprs.is_a?(Expressions)
18:06
<
jhass >
begin; nil is simpler for now :P
18:06
<
RX14 >
there's no problem with the code gamemanj, it's just you are creating boilerplate for yourself
18:06
<
gamemanj >
Maybe, but it's boilerplate that actually tells a user what the functions do
18:06
<
RX14 >
creating extra work for no gain
18:06
<
gamemanj >
and how to implement them
18:07
kostya has quit [Remote host closed the connection]
18:07
<
gamemanj >
Technically all code comments are extra work for no gain, by similar standards
18:07
<
gamemanj >
They don't do anything program-wise, are basically an annotation...
18:07
<
gamemanj >
I'm sure they can all be inferred by the code!
18:08
<
RX14 >
but nobody will ever use your thing
18:08
<
RX14 >
and once they do, addding docs like that is easy
18:20
n0xff has joined #crystal-lang
18:25
<
gamemanj >
I've thought of a good tool for Crystal to have...: remove_annotations
18:26
<
gamemanj >
meant for recovering Java programmers :)
18:34
DeBot has quit [Quit: Crystal IRC]
18:34
DeBot has joined #crystal-lang
18:37
pragmatism has joined #crystal-lang
18:42
vifino has quit [Ping timeout: 246 seconds]
18:43
vifino has joined #crystal-lang
18:43
async_prince has left #crystal-lang ["WeeChat 0.4.3"]
18:46
greengriminal has joined #crystal-lang
18:53
pragmatism has quit [Remote host closed the connection]
18:53
pragmatism has joined #crystal-lang
19:04
leafybas_ has quit [Ping timeout: 240 seconds]
19:09
chino_ has quit [Ping timeout: 246 seconds]
19:20
havenwood has quit [Ping timeout: 264 seconds]
19:24
leafybasil has joined #crystal-lang
19:35
<
crystal-gh >
[crystal] waterlink opened pull request #1548: Dismantle CGI module (master...kill-cgi)
http://git.io/vnRVF
19:38
pawnbox has joined #crystal-lang
19:42
<
chdorner >
I would like to implement a SortedSet class, looking at the Ruby example they have a version using the Red-Black Tree algorithm (when the rbtree gem is installed), and otherwise use a slower implementation which basically just sorts the `keys` Array of the internal Hash. Now I've seen that there is a Red-Black Tree example (samples/red_black_tree.cr) which
19:42
<
chdorner >
got ported over from rubinius, is it possible to just move that code over to standard lib (plus adding tests), or would that not be acceptable?
19:44
kulelu88 has joined #crystal-lang
19:45
vifino has quit [Ping timeout: 246 seconds]
19:46
<
BlaXpirit >
chdorner, contributing to crystal repository based on something from crystal repository?
19:46
<
BlaXpirit >
how can that be unacceptable?
19:47
<
BlaXpirit >
other question is whether it needs to be there
19:47
<
BlaXpirit >
(in my opinion, yes, but it means nothing)
19:47
<
BlaXpirit >
oooh that's more interesting then
19:48
<
BlaXpirit >
to me it looks like it's already license violation
19:49
vifino has joined #crystal-lang
19:52
<
crystal-gh >
crystal/master c55669f Ary Borenszweig: Fixed #1540: better error message when output file is directory
19:53
<
jhass >
BlaXpirit: nah we asked them on these matters, they're okay if we keep such a note
19:54
<
BlaXpirit >
pretty sure they can still sue xD
19:55
<
chdorner >
jhass: so it would be okay to move it into `src/` so it can be used?
19:55
<
jhass >
idk, I guess?
19:56
<
jhass >
no idea how general or optimized it is
19:56
havenwood has joined #crystal-lang
19:57
<
chdorner >
the other option would be to do what Ruby does, which doesn't seem very optimised, but the implementation would be much easier
19:58
<
chdorner >
(not using red-black tree, but just sorting the hash.keys array on access)
19:59
<
BlaXpirit >
then there is not much point to it
19:59
<
asterite >
I don't think it's optimized, I'd use Nil instead of a NilNode
20:01
trapped has quit [Read error: Connection reset by peer]
20:09
<
pawnbox >
how do i run compiler specs
20:10
<
pawnbox >
i tried crystal run spec/compiler/codegen/class_spec.cr, it failed.
20:10
<
jhass >
try without run
20:10
<
jhass >
crystal spec/compiler/codegen/class_spec.cr
20:11
<
jhass >
ah, meh, bin/crystal actually
20:14
<
pawnbox >
If Base.foo wasn't there it works fine.
20:19
[spoiler] has quit [Ping timeout: 246 seconds]
20:23
pawnbox has quit [Remote host closed the connection]
20:26
[spoiler] has joined #crystal-lang
20:29
willl has quit [Quit: Connection closed for inactivity]
20:41
<
kulelu88 >
Is there a dockerfile for crystal?
20:43
<
kulelu88 >
1 more question, does crystal have a package manager?
20:44
<
DeBot >
jhass: Set shards.
20:45
kulelu88 has quit [Changing host]
20:45
kulelu88 has joined #crystal-lang
20:45
<
jhass >
yes, idiot didn't want to change its name
20:46
<
jhass >
(crystal is at least two years older)
20:46
<
kulelu88 >
looks like an interesting project. would be weird to have a "crystal code generator" in crystal.sh :D
20:49
<
BlaXpirit >
UGH shards pulls a minitest dependency
20:49
<
BlaXpirit >
if minitest is included in stdlib i'll be so disgusted
20:50
<
jhass >
well, you've seen it has a spec DSL too?
20:52
shama has joined #crystal-lang
20:52
NeverDie has joined #crystal-lang
20:52
<
BlaXpirit >
yes, i hate that too but at least it's mild
20:53
<
BlaXpirit >
whenever i see class syntax used for tests, i cringe SO HARD
21:04
willl has joined #crystal-lang
21:16
<
RX14 >
i don't see the point of crystal.sh
21:18
gamemanj has quit [Ping timeout: 272 seconds]
21:25
<
asterite >
It's simple, instead of learning to program in a decent language, you program in yaml
21:26
<
asterite >
At least it's a step forward compared to when many wanted to program in xml
21:26
<
crystal-gh >
crystal/master 380eb80 Ary Borenszweig: Fixed #1522: Compiler error when when class method calls `super`
21:32
<
jhass >
ah I see you fixed the issue pawnbox wanted to look into? :P
21:35
<
crystal-gh >
crystal/master 72d72a2 Benoist Claassen: added connect time out to http client
21:35
<
crystal-gh >
crystal/master 9423b4c Jonne Haß: Merge pull request #1520 from benoist/master...
21:40
BlaXpirit has quit [Quit: Konversation]
21:42
apt-get has quit [Remote host closed the connection]
21:49
<
jokke >
jhass: how can i use something else as STDIN?
21:49
<
jokke >
i need to pipe stuff to my program and then get user input
21:50
<
jokke >
so i'd like to open /dev/tty and assign it to STDIN
21:51
<
crystal-gh >
[crystal] porras opened pull request #1549: File#truncate (master...File#truncate)
http://git.io/vn0Cm
21:52
<
jhass >
I don't think you can
21:52
<
jhass >
that's why Ruby uses globals I guess
21:53
<
crystal-gh >
[crystal] jhass closed pull request #1548: Dismantle CGI module (master...kill-cgi)
http://git.io/vnRVF
21:57
greengriminal has quit [Quit: Leaving]
22:07
<
jokke >
what's the primitive type for file descriptors?
22:07
<
jokke >
it's just an int
22:16
<
crystal-gh >
[crystal] ysbaddaden closed pull request #1523: zlib inflate and deflate IO (master...zlib)
http://git.io/vnYAS
22:24
<
dzv >
jokke: use something as as stdin in a subprocess or in the main process?
22:25
<
jokke >
i'm not quite following
22:25
<
crystal-gh >
[crystal] jhass closed pull request #1533: Add .fetch to ENV (master...env_fetch)
http://git.io/vnnW7
22:25
<
crystal-gh >
crystal/master 1ba260a Jonne Haß: Merge pull request #1533 from tristil/env_fetch...
22:25
<
crystal-gh >
crystal/master ed4d498 Joseph Method: Add .fetch to ENV...
22:27
<
dzv >
sorry, use something as stdin in the main program or a subprocess?
22:28
<
jhass >
jokke: could you use STDIN.reopen?
22:30
<
jokke >
jhass: awesome
22:31
<
jokke >
STDIN.reopen(File.open("/dev/tty"))
22:33
<
crystal-gh >
[crystal] tristil closed pull request #1532: Add Dockerfile.development for quick development (master...development_dockerfile)
http://git.io/vnnW1
22:42
NeverDie has joined #crystal-lang
22:52
qard has joined #crystal-lang
22:59
<
crystal-gh >
crystal/master 1d25da5 Ary Borenszweig: Spec: `it` now captures a block. This allow building specs in release mode in a much faster way. Fixes #768
23:24
waj has quit [Remote host closed the connection]
23:31
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
23:33
<
Kilo`byte >
i didn't even realize crystal made it into the official arch repos xD