00:01
waj has quit [Ping timeout: 272 seconds]
00:05
<
nakilon >
so it was about splatting
00:05
<
nakilon >
Ruby: real0m2.553s
00:05
<
nakilon >
Crystal: real0m25.301s
00:06
<
nakilon >
because of shitty prime numbers generator, have to invent own wheel
00:07
<
dyulax93 >
Is there any Crystal equivalent to "DBL_MIN" C++ constant?
00:07
<
jhass >
nakilon: tried with --release ?
00:07
<
jhass >
dyulax93: what does it do?
00:07
<
dyulax93 >
“DBL_MIN is the minimum value of a double.”
00:08
<
dyulax93 >
there is a lib where I need to use it.. but I can't find an equivalent
00:09
<
nakilon >
crystal build temp.cr --release && time ./temp => real0m19.036s
00:09
<
dyulax93 >
thank you jhass
00:20
<
nakilon >
hm, my code, that you saw above, prints that it is wasting the more and more time on each i = 0..9
00:21
<
nakilon >
some leak or idk, seems like it can be 0.5sec instead of 25sec
00:22
<
nakilon >
ok, I'll just throw out that habrahar.ru fibers-demo code and write smth adequate
00:23
<
jhass >
yeah, it's meant as showing off fibers, not being fast ;)
00:23
DeBot has quit [Quit: Crystal IRC]
00:23
asterite has quit [Quit: Bye]
00:23
jhass has quit [Quit: Bye]
00:24
fowlduck has joined #crystal-lang
00:25
<
nakilon >
got 2.6sec with just sending all even numbers instead of prime ones to 'prime?' method
00:26
n0xff has joined #crystal-lang
00:27
<
crystal-gh >
[crystal] asterite opened pull request #1386: Class-level macros (master...class-level-macros)
http://git.io/vZei0
00:29
fowlduck has quit [Ping timeout: 244 seconds]
00:52
waj has joined #crystal-lang
00:57
waj has quit [Ping timeout: 264 seconds]
01:03
kyrylo has quit [Ping timeout: 272 seconds]
01:05
datanoise has joined #crystal-lang
01:05
datanoise has quit [Client Quit]
01:05
datanoise has joined #crystal-lang
01:13
<
nakilon >
nice, nested lambdas work fine in Crystal
01:15
<
nakilon >
according to that time wasted on each i= 0..9 is now equal, it probably works exactly how Ruby does -- 0.9s vs 2.5s
01:15
<
nakilon >
seems yet too slow
01:25
<
nakilon >
'primes' aren't actually prime, so I've renamed the variable -- there should be the way to add the real primes channel to it tat would add more abilities
01:29
<
nakilon >
and actually this function i've implemented has not much sense, because it doesn't really produce prime numbers channel and there is a way to check primarity faster _--
01:31
<
crystal-gh >
crystal/master bb2a785 Ary Borenszweig: Fixed #1379: fix empty types of macro expansions
01:58
<
nakilon >
are not loops with post-condition implemented in Crystal?
02:21
<
nakilon >
what about profilers for Crystal?
02:40
waj_ has joined #crystal-lang
02:45
waj_ has quit [Ping timeout: 244 seconds]
03:01
havenwood has joined #crystal-lang
03:07
<
nakilon >
looks like Crystal becomes slower if you spawn lots of Channels, even if they "should" be garbage-collected
03:08
<
nakilon >
or maybe the issue is somewhere else (
03:10
fowlduck has joined #crystal-lang
03:14
fowlduck has quit [Ping timeout: 244 seconds]
03:14
ledestin has joined #crystal-lang
03:37
<
dzv >
profiler needed
04:29
waj_ has joined #crystal-lang
04:30
datanoise has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
04:32
datanoise has joined #crystal-lang
04:33
waj_ has quit [Ping timeout: 272 seconds]
05:28
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
06:00
ylluminate has joined #crystal-lang
06:17
waj_ has joined #crystal-lang
06:19
havenwood has quit [Ping timeout: 244 seconds]
06:21
waj_ has quit [Ping timeout: 246 seconds]
07:04
elia has joined #crystal-lang
07:05
elia has quit [Client Quit]
07:06
elia has joined #crystal-lang
07:07
Guest31 has joined #crystal-lang
07:19
DeBot has joined #crystal-lang
07:19
asterite has joined #crystal-lang
07:21
jhass has joined #crystal-lang
07:27
Guest31 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
07:27
watsy_ has joined #crystal-lang
07:35
<
jokke >
how would you do something like Rspec's `let` in crystal?
07:35
BlaXpirit has joined #crystal-lang
07:38
<
jokke >
BlaXpirit: do you have an idea? (howo to do sth similar to `let` from Rspec in crystal)
07:46
waj_ has joined #crystal-lang
07:50
waj_ has quit [Ping timeout: 246 seconds]
07:51
kyrylo has joined #crystal-lang
07:54
<
jhass >
maybe minitest.cr has something too
07:55
<
jokke >
why hasn't he tried to bring this into standard lib?
07:56
<
Netfeed >
libpcl-dev and libpcl1-dev seems to be two entierly different things in debian
08:00
<
Netfeed >
which version is needed to build crystal? i'm getting this error: undefined reference to `co_get_data'
08:00
<
Netfeed >
yeah, i know that :)
08:00
<
Netfeed >
but which version of libpcl1-dev
08:01
<
BlaXpirit >
Netfeed, as usual, you may benefit from just using libs bundled with crystal
08:01
<
BlaXpirit >
(as usual, this is jhass's idea)
08:02
<
Netfeed >
right, how did i do that? i've reinstalled this computer since i did it last time
08:04
<
BlaXpirit >
then again, it's a pain because u have to specify lib path all the time
08:04
<
Netfeed >
Bug: trying to downcast HTTP::ChunkedContent <- HTTP::UnknownLengthContent
08:05
<
dzv >
waj: were there performance gains by switching from libpcl to asm? libpcl looks like it is similar. a few assignments then swapcontext which on linux is asm.
08:08
elia has quit [Quit: Computer has gone to sleep.]
08:15
elia has joined #crystal-lang
08:39
elia has quit [Quit: Computer has gone to sleep.]
09:03
BlaXpirit has quit [Quit: Konversation]
09:09
Ven has joined #crystal-lang
09:15
leafybas_ has quit [Remote host closed the connection]
09:29
<
crystal-gh >
[crystal] technorama opened pull request #1390: Add File#flock_* advisory locking methods to File. (master...f/flock)
http://git.io/vZvXO
09:33
kyrylo has quit [Ping timeout: 240 seconds]
09:35
waj_ has joined #crystal-lang
09:39
waj_ has quit [Ping timeout: 256 seconds]
09:44
Ven has quit [Ping timeout: 264 seconds]
09:52
waterlink has joined #crystal-lang
09:55
kirpen has joined #crystal-lang
09:57
<
kirpen >
somebody know about framework for crystal??
09:57
<
jhass >
kirpen: what kind of framework?
09:58
<
kirpen >
like rails for ruby)
10:06
<
kirpen >
ok, and what about ORMs for SQL-DB ?
10:08
<
kirpen >
it is working? You using AR?
10:10
<
kirpen >
It is you write this wrapper methods?
10:11
<
kirpen >
I see method save and find_by_id
10:11
<
jhass >
I wrote the code I linked, yes
10:13
<
kirpen >
So whow call this? like abc = ModelClass.new(attributes(a: 'a', b: 'b'))
10:14
<
kirpen >
and then I can call method .save fo object?
10:14
<
kirpen >
and then I can call method .save for object?
10:15
<
kirpen >
yes, yes I see your code and try get point for this code)
10:16
<
jhass >
it's a plain class
10:16
<
jhass >
there's nothing more to it than what you see there
10:17
<
jhass >
that's all the callsides
10:18
<
jhass >
anyway, my point was just that I didn't had a need for an ORM yet, in reply to whether I used active_record.cr
10:18
<
jhass >
a plain class was good enough for my needs for now
10:19
<
kirpen >
yeap, I see
10:19
<
kirpen >
whery nice service you build!
10:19
<
kirpen >
I'm playin now in demo site))
10:20
watsy_ has quit [Ping timeout: 255 seconds]
10:21
<
kirpen >
How long you using Crystal? jhass
10:21
<
jhass >
mmh, good question, let me think
10:21
<
jhass >
so I guess it's 1 1/2 half years by now, sigh
10:22
<
jhass >
I'm getting old
10:24
<
kirpen >
cool, and I find Crystal today, from conference RubyOnRailsClub by Russiya))
10:53
leafybasil has joined #crystal-lang
11:17
leafybasil has quit [Ping timeout: 272 seconds]
11:20
waj has joined #crystal-lang
11:25
waj has quit [Ping timeout: 264 seconds]
11:27
kirpen has quit [Quit: Page closed]
11:33
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:45
ComputationalZom has joined #crystal-lang
11:47
ComputationalZom has quit [Remote host closed the connection]
12:17
trapped has joined #crystal-lang
12:21
waj has joined #crystal-lang
12:25
waj has quit [Ping timeout: 250 seconds]
13:19
<
crystal-gh >
[crystal] jhass closed pull request #1381: Log compiler errors to STDERR (master...stderr)
http://git.io/vGjob
13:28
<
crystal-gh >
crystal/master f8a3b8a Ary Borenszweig: Simplified channel primes sample. Fixes #1383
13:56
ssvb has quit [Ping timeout: 264 seconds]
14:52
NeverDie has joined #crystal-lang
14:52
waj has joined #crystal-lang
14:55
kyrylo has joined #crystal-lang
14:56
ssvb has joined #crystal-lang
14:57
waj has quit [Ping timeout: 244 seconds]
15:02
<
crystal-gh >
crystal/master 54782b9 Ary Borenszweig: YAML: handle anchors in mappings
15:02
<
crystal-gh >
crystal/master 4dae902 Ary Borenszweig: Added `Object.from_yaml(String)` and started `yaml_mapping`
15:07
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
15:22
havenwood has joined #crystal-lang
15:41
blue_deref has joined #crystal-lang
15:45
<
trapped >
what's an IO object that i can cast to TCPSocket to test IO in spec?
15:48
<
jhass >
don't think there's any
15:48
<
jhass >
you could subclass TCPSocket and override the methods you call
15:48
waj has joined #crystal-lang
15:55
waj has quit [Remote host closed the connection]
15:56
waj has joined #crystal-lang
16:00
waj has quit [Ping timeout: 250 seconds]
17:00
leafybasil has joined #crystal-lang
17:04
<
crystal-gh >
[crystal] devdazed opened pull request #1394: add select, select!, reject, and reject! to Hash (master...master)
http://git.io/vZJBe
17:06
daveshah has joined #crystal-lang
17:11
leafybasil has quit [Remote host closed the connection]
17:13
havenwood has quit [Ping timeout: 244 seconds]
17:17
havenwood has joined #crystal-lang
17:28
Dreamer3 has quit [Quit: Leaving...]
17:28
lmarburger has left #crystal-lang [#crystal-lang]
17:29
Dreamer3 has joined #crystal-lang
17:48
daveshah has quit [Remote host closed the connection]
18:25
kyrylo has quit [Ping timeout: 264 seconds]
18:30
waterlink has quit [Ping timeout: 246 seconds]
18:31
daveshah has joined #crystal-lang
18:40
daveshah has quit [Remote host closed the connection]
18:42
waj has joined #crystal-lang
18:47
waj has quit [Ping timeout: 272 seconds]
18:52
<
dzv >
or use UNIXSocket.pair
18:59
<
vegai >
0.7.7 seemed to have removed require support inside classes, right?
18:59
<
vegai >
I wonder if there's any sensible alternative to that, or should people just change their habits
18:59
<
vegai >
breaks amethyst quite totally
18:59
<
jhass >
they should change their habits
19:00
<
vegai >
I suppose the amethyst developers will fix it a bit easier than I can
19:00
<
nakilon >
what does --with-llvm brew flag give?
19:03
<
nakilon >
I thought crystal works with llvm in any way, so does it mean it uses some llvm I already had or it tries to work without it?
19:03
<
jhass >
llvm is statically linked
19:03
<
nakilon >
would I have some profit with installing it?
19:03
<
jhass >
so the compiler has no runtime dependency on it, only compile time
19:04
<
willl >
--with-llvm is to get one of the things needed to build from source
19:05
<
willl >
it'd maybe be nicer if there was like --dev that got all of the dependencies for that
19:22
kyrylo has joined #crystal-lang
19:32
blue_deref has quit [Quit: Taking myself out of hear.]
19:36
waterlink has joined #crystal-lang
19:43
waj has joined #crystal-lang
19:47
waj has quit [Ping timeout: 252 seconds]
20:03
Ven has joined #crystal-lang
20:10
Ven has quit [Ping timeout: 264 seconds]
20:14
<
dzv >
or automatically downloaded/compiled dependencies it was missing or if the versions were incompatible
20:15
adam| is now known as adam12
20:41
<
nakilon >
there is a "# p {{action}}" line inside my macro
20:41
<
nakilon >
it says error: "unterminated macro"
20:42
<
nakilon >
when I remove this line, it goes ok
20:42
<
jhass >
got a reproducer?
20:42
<
nakilon >
is there smth special abount '#' char in macro definitions?
20:43
<
jhass >
nope, but it won't stop {{foo}} expansion
20:47
<
nakilon >
macro my_macro(action)
20:47
<
nakilon >
# p {{action}}
20:47
<
nakilon >
{% action %}
20:49
<
jhass >
mmh, {% action %} might be invalid, I'm not sure. I surely see no sense in it
20:49
<
jhass >
{% ... %} is for control flow stuff or assigning new macro vars
20:50
<
jhass >
{{action}} to interpolate
20:51
<
nakilon >
my it fails even if i make {{ actoin }}
20:53
<
jhass >
ah, invoking a macro is just my_macro(...), macro my_macro is defining it
20:54
<
nakilon >
yes, I define it
20:54
<
nakilon >
why do I get "unterminated macro"
20:54
<
nakilon >
and not, if remove the # string
20:56
<
jhass >
interesting, if you add a call afterwards it works?
20:57
<
jhass >
but yeah, seems like a bug, open an issue please ;)
20:58
<
nakilon >
cool, I've found a bug )
21:14
NeverDie has joined #crystal-lang
21:16
NeverDie has quit [Max SendQ exceeded]
21:17
NeverDie has joined #crystal-lang
21:24
Raimondi has quit [Read error: Connection reset by peer]
21:25
Raimondi has joined #crystal-lang
21:35
<
crystal-gh >
[crystal] technorama opened pull request #1397: Enumerable.min & max accept a default value. (master...f/enumerable_max)
http://git.io/vZUs2
21:44
waj has joined #crystal-lang
21:49
waj has quit [Ping timeout: 265 seconds]
22:20
<
crystal-gh >
[crystal] kirbyfan64 opened pull request #1398: Implement JSON error messages (sort of...) (master...json_err)
http://git.io/vZUWt
22:29
<
crystal-gh >
[crystal] technorama opened pull request #1399: Add Singleton Module. (master...f/singleton)
http://git.io/vZUlJ
22:38
waj has joined #crystal-lang
22:39
<
crystal-gh >
[crystal] 8398a7 opened pull request #1400: Fix a typo in the docs (master...patch-1)
http://git.io/vZU4V
22:40
leafybasil has joined #crystal-lang
22:40
<
crystal-gh >
crystal/master 51d6499 839: fix typo
22:40
<
crystal-gh >
crystal/master 8773772 Jonne Haß: Merge pull request #1400 from 8398a7/patch-1...
22:43
tatey_ has joined #crystal-lang
22:49
havenwood has quit [Ping timeout: 265 seconds]
22:54
dyulax93 has quit [Ping timeout: 252 seconds]
22:59
havenwood has joined #crystal-lang
23:06
waj has quit [Read error: Connection reset by peer]
23:07
waj_ has joined #crystal-lang
23:31
thor77 has quit [Ping timeout: 250 seconds]
23:38
<
crystal-gh >
crystal/master fbcd17e Ary Borenszweig: Removed all macro instance variables except `@type`.
23:52
kyrylo has quit [Quit: Konversation terminated!]
23:52
kyrylo has joined #crystal-lang
23:53
<
nakilon >
why 'skip' if it's 'drop' in Ruby?
23:54
<
nakilon >
same about drop_whlie
23:55
thor77 has joined #crystal-lang