00:02
weskinner_mac has joined #crystal-lang
00:03
weskinner_mac has quit [Client Quit]
00:05
weskinner_mac has joined #crystal-lang
00:33
waj has quit [Quit: Leaving.]
00:41
weskinner_mac has quit [Quit: weskinner_mac]
01:29
weskinner_mac has joined #crystal-lang
01:34
weskinner_mac has quit [Quit: weskinner_mac]
01:52
bcardiff has joined #crystal-lang
02:01
r20 has joined #crystal-lang
02:34
bcardiff has quit [Quit: Leaving.]
02:43
r20 has quit [Quit: Leaving]
02:59
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
04:41
shama has joined #crystal-lang
05:59
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
11:17
havenwood has joined #crystal-lang
13:20
weskinner_mac has joined #crystal-lang
13:58
<
crystal-gh >
[crystal] ysbaddaden opened pull request #454: Added: ArrayLiteral#shuffle to macros (master...macros-array-literal-shuffle)
http://git.io/xs8e
14:17
weskinner_mac has quit [Quit: weskinner_mac]
15:03
waj has joined #crystal-lang
15:13
weskinner_mac has joined #crystal-lang
16:56
havenn has joined #crystal-lang
16:57
havenwood has quit [Ping timeout: 245 seconds]
17:45
weskinner_mac has quit [Quit: weskinner_mac]
18:29
havenwood has joined #crystal-lang
18:30
havenn has quit [Ping timeout: 246 seconds]
18:50
weskinner_mac has joined #crystal-lang
19:21
waj has quit [Quit: Leaving.]
19:27
weskinner_mac has quit [Quit: weskinner_mac]
20:34
weskinner_mac has joined #crystal-lang
20:36
weskinner_work has joined #crystal-lang
20:43
waj has joined #crystal-lang
21:16
waj has quit [Quit: Leaving.]
21:17
weskinner_work has quit [Ping timeout: 264 seconds]
21:34
ponga has joined #crystal-lang
21:34
<
ponga >
can i ask what file extension is used as convention
21:34
<
ponga >
one that sublime-crystal can detect will be good
21:41
<
jhass >
I just use Ruby syntax highlighting though, works pretty well :P
21:45
<
ponga >
omg it does X.times do end too
21:47
<
ponga >
did i do it wrong or is it really what its saying
21:48
<
jhass >
this is always a bug yes, please open an issue with your code. Even if you did it wrong, it should throw a corresponding compiler error instead
21:48
<
ponga >
jhass: so i was OK typing in 'crystal build test.cr' then 'crystal run test' ?
21:49
<
ponga >
i thought i typed wrongly
21:49
<
ponga >
i think i did something just stupid and crystal thinks its a bug when its not
21:49
<
jhass >
you crystal run compiles and then executes the resulting binary
21:50
<
ponga >
oh fyi i never tried compiling language.. so you know
21:50
<
jhass >
so you tried to let the compiler read a binary as crystal program
21:50
<
ponga >
i might be doing it all wrong
21:50
<
ponga >
so 'crystal run test' is ok?
21:50
<
jhass >
to run your program after crystal build, just run the resulting binary, ./test in your case
21:50
<
jhass >
only if test is a file containing crystal source code, which it isn't in this case
21:51
<
ponga >
the bug was me
21:52
<
ponga >
run (default) compile and run program file <-
21:52
<
jhass >
well, it probably still should say something like "this doesn't look like a crystal program" ;)
21:52
<
ponga >
so i just ./file
21:52
<
ponga >
never knew this style of ./ thingi
21:52
<
ponga >
its like convention?
21:52
<
jhass >
it's the same as doing /usr/bin/ruby
21:52
<
ponga >
jhass: oh ok if it were to say 'this doesn't look like a valid crystal program'
21:52
<
ponga >
i still would open an issue?
21:53
<
jhass >
it's an executable, you could move it to a system that has never seen crystal
21:53
<
jhass >
I'll do it for you :)
21:53
<
ponga >
should i still open an issue in github
21:53
<
ponga >
no , i can do it! (i can try
21:53
<
ponga >
and jhass you would want my code too?
21:53
<
ponga >
its just one line 10.times do puts "greet" end tho
21:54
<
jhass >
no, it's rather unrelated to the code, I didn't notice what you did at first :)
21:54
<
ponga >
yeah i see this now, not many 'skilled' devs would do this stupid mistake and find this bug
21:54
<
ponga >
i kinda found this by playing dumb
21:55
<
jhass >
it's fine, those are the things that make a program stable :)
21:57
<
ponga >
i subscribed it ;)
22:10
weskinner_mac has quit [Quit: weskinner_mac]
22:23
<
ponga >
jhass: what is it, code samples?
22:24
<
jhass >
yeah, example programs
22:24
<
ponga >
jhass: how can i measure benchmark in crystal, what ways
22:24
<
ponga >
in ruby i used require 'benchmark'
22:24
<
ponga >
do i need external thing
22:24
<
jhass >
uh, I never tried
22:25
<
jhass >
>> Benchmark
22:25
<
DeBot >
jhass: Error in line 3: undefined constant Benchmark
22:25
<
jhass >
>> require "benchmark"; Benchmark
22:25
<
DeBot >
jhass: Benchmark
22:34
orliesaurus has quit [Excess Flood]
22:34
a- has joined #crystal-lang
22:37
<
jhass >
ponga: mandelbrot takes an argument, you didn't pass it one
22:38
<
ponga >
jhass: what do i need to pass ?...
22:39
<
ponga >
what 'would' i pass
22:40
<
ponga >
oh ok, numbers
22:40
<
jhass >
complex ones it seems
22:40
<
ponga >
jhass: i just passed int 1
22:40
<
ponga >
mandelbrot(1)
22:40
<
ponga >
and it prints some text image
22:41
<
jhass >
yeah, well it does that unconditionally
22:41
<
jhass >
the mandelbrot function ends on line 6
22:41
<
jhass >
it's just a helper for the code below
22:47
<
ponga >
jhass: Array.new(100, a).inject(a) { |z, c| z*z + c } is '100' the size for benchmark
22:48
<
jhass >
huh? no, it's the same as in Ruby
22:48
<
jhass >
>> Array.new(10, 5)
22:48
<
DeBot >
jhass: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
22:48
<
ponga >
jhass: no i mean if i changed 100 into like 500 , 5000 would it take longer time to process
22:49
<
ponga >
i guess so cos its larger array?
22:49
<
ponga >
uh..not really?
22:49
<
ponga >
uh yeah it is
22:49
<
jhass >
well, yes, it would take longer
22:49
<
jhass >
whether that's the main/expensive part of the mandelbrot function I don't know because, uh, maths :P
22:50
<
jhass >
looks like it though
22:58
<
ponga >
what the hell..
22:59
<
ponga >
and as far as i can comprehend it seems they are using size 50
22:59
<
ponga >
and the result is too fast to believe
23:00
<
ponga >
there must be something wrong with my code
23:01
<
jhass >
yeah, not sure it's the same parameters used really
23:01
<
ponga >
jhass: i doubt it too
23:02
<
jhass >
"Each program should plot the Mandelbrot set [-1.5-i,0.5+i] on an N-by-N bitmap. Write output byte-by-byte in portable bitmap format."
23:03
<
jhass >
so it should generate an image for starters, not just an ASCII representation ;)
23:03
<
jhass >
the 16000 is not the amount of iterations, it's the size of the bitmap
23:04
<
ponga >
jhass: are you familiar with binary_trees?
23:04
<
jhass >
not too much
23:04
<
ponga >
there are two methods in the code 'bottom_up_trees' and 'item_check'
23:04
<
ponga >
should i call bottom_up_trees
23:05
<
jhass >
well, those are again merely helper functions for the actual code below
23:05
<
ponga >
yeah i thought that
23:05
<
ponga >
im thinking what should i call for benchmark
23:06
<
ponga >
the whole thing maybe
23:11
<
ponga >
jhass: just by putting -s it actually shows the statistics
23:11
<
ponga >
crystal run file -s
23:13
<
jhass >
those are statistics about the compiler performance when compiling the program, not the run time of the program itself
23:24
ytti has joined #crystal-lang
23:35
havenwood has quit [Remote host closed the connection]