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
waj has quit [Ping timeout: 272 seconds]
<nakilon> so it was about splatting
<nakilon> Ruby: real0m2.553s
<nakilon> Crystal: real0m25.301s
<nakilon> ..(
<nakilon> because of shitty prime numbers generator, have to invent own wheel
<dyulax93> Is there any Crystal equivalent to "DBL_MIN" C++ constant?
<jhass> nakilon: tried with --release ?
<jhass> dyulax93: what does it do?
<dyulax93> “DBL_MIN is the minimum value of a double.”
<dyulax93> there is a lib where I need to use it.. but I can't find an equivalent
<nakilon> crystal build temp.cr --release && time ./temp => real0m19.036s
<dyulax93> thank you jhass
<nakilon> hm, my code, that you saw above, prints that it is wasting the more and more time on each i = 0..9
<nakilon> some leak or idk, seems like it can be 0.5sec instead of 25sec
<nakilon> ok, I'll just throw out that habrahar.ru fibers-demo code and write smth adequate
<jhass> yeah, it's meant as showing off fibers, not being fast ;)
DeBot has quit [Quit: Crystal IRC]
asterite has quit [Quit: Bye]
jhass has quit [Quit: Bye]
fowlduck has joined #crystal-lang
<nakilon> got 2.6sec with just sending all even numbers instead of prime ones to 'prime?' method
n0xff has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #1386: Class-level macros (master...class-level-macros) http://git.io/vZei0
fowlduck has quit [Ping timeout: 244 seconds]
<crystal-gh> [crystal] asterite fast-forwarded master from 98621b8 to 31861b8: http://git.io/vZei7
<travis-ci> manastech/crystal#31861b8 (master - Missing change in last commit): The build passed. https://travis-ci.org/manastech/crystal/builds/78951928
waj has joined #crystal-lang
waj has quit [Ping timeout: 264 seconds]
kyrylo has quit [Ping timeout: 272 seconds]
datanoise has joined #crystal-lang
datanoise has quit [Client Quit]
datanoise has joined #crystal-lang
<nakilon> nice, nested lambdas work fine in Crystal
<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
<nakilon> seems yet too slow
<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
<nakilon> *that
<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 _--
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vZeyI
<crystal-gh> crystal/master bb2a785 Ary Borenszweig: Fixed #1379: fix empty types of macro expansions
<travis-ci> manastech/crystal#bb2a785 (master - Fixed #1379: fix empty types of macro expansions): The build passed. https://travis-ci.org/manastech/crystal/builds/78954758
<nakilon> are not loops with post-condition implemented in Crystal?
<nakilon> it sucks because because of that I have to have this: https://gist.github.com/Nakilon/164360d5c8f952869f1d#file-prime-cr-L20
<nakilon> what about profilers for Crystal?
waj_ has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
waj_ has quit [Ping timeout: 244 seconds]
havenwood has joined #crystal-lang
<nakilon> looks like Crystal becomes slower if you spawn lots of Channels, even if they "should" be garbage-collected
<nakilon> or maybe the issue is somewhere else (
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 244 seconds]
ledestin has joined #crystal-lang
<dzv> profiler needed
waj_ has joined #crystal-lang
datanoise has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
waj_ has quit [Ping timeout: 272 seconds]
datanoise has quit [Quit: Textual IRC Client: www.textualapp.com]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
ylluminate has joined #crystal-lang
waj_ has joined #crystal-lang
havenwood has quit [Ping timeout: 244 seconds]
waj_ has quit [Ping timeout: 246 seconds]
elia has joined #crystal-lang
elia has quit [Client Quit]
elia has joined #crystal-lang
Guest31 has joined #crystal-lang
DeBot has joined #crystal-lang
asterite has joined #crystal-lang
jhass has joined #crystal-lang
Guest31 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
watsy_ has joined #crystal-lang
<jokke> hi
<jokke> how would you do something like Rspec's `let` in crystal?
BlaXpirit has joined #crystal-lang
<jokke> BlaXpirit: do you have an idea? (howo to do sth similar to `let` from Rspec in crystal)
<jokke> *how
waj_ has joined #crystal-lang
waj_ has quit [Ping timeout: 246 seconds]
kyrylo has joined #crystal-lang
<jhass> maybe minitest.cr has something too
<jokke> why hasn't he tried to bring this into standard lib?
<jokke> or she
<Netfeed> libpcl-dev and libpcl1-dev seems to be two entierly different things in debian
<Netfeed> which version is needed to build crystal? i'm getting this error: undefined reference to `co_get_data'
<jhass> the latter
<Netfeed> yeah, i know that :)
<Netfeed> but which version of libpcl1-dev
<BlaXpirit> Netfeed, as usual, you may benefit from just using libs bundled with crystal
<BlaXpirit> (as usual, this is jhass's idea)
<Netfeed> right, how did i do that? i've reinstalled this computer since i did it last time
<Netfeed> thanks
<BlaXpirit> then again, it's a pain because u have to specify lib path all the time
<Netfeed> Bug: trying to downcast HTTP::ChunkedContent <- HTTP::UnknownLengthContent
<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.
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
BlaXpirit has quit [Quit: Konversation]
Ven has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
<crystal-gh> [crystal] technorama opened pull request #1390: Add File#flock_* advisory locking methods to File. (master...f/flock) http://git.io/vZvXO
kyrylo has quit [Ping timeout: 240 seconds]
waj_ has joined #crystal-lang
waj_ has quit [Ping timeout: 256 seconds]
Ven has quit [Ping timeout: 264 seconds]
waterlink has joined #crystal-lang
kirpen has joined #crystal-lang
<kirpen> somebody know about framework for crystal??
<jhass> kirpen: what kind of framework?
<kirpen> like rails for ruby)
<kirpen> cool!
<kirpen> ok, and what about ORMs for SQL-DB ?
<kirpen> it is working? You using AR?
<jhass> no I'm not
<jhass> so no idea
<kirpen> It is you write this wrapper methods?
<kirpen> I see method save and find_by_id
<jhass> sorry?
<jhass> I wrote the code I linked, yes
<kirpen> So whow call this? like abc = ModelClass.new(attributes(a: 'a', b: 'b'))
<jhass> this?
<kirpen> and then I can call method .save fo object?
<kirpen> and then I can call method .save for object?
<kirpen> yes, yes I see your code and try get point for this code)
<jhass> it's a plain class
<jhass> there's nothing more to it than what you see there
<jhass> that's all the callsides
<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
<jhass> a plain class was good enough for my needs for now
<kirpen> yeap, I see
<kirpen> whery nice service you build!
<jhass> thanks :)
<kirpen> I'm playin now in demo site))
watsy_ has quit [Ping timeout: 255 seconds]
<kirpen> How long you using Crystal? jhass
<jhass> mmh, good question, let me think
<kirpen> )
<jhass> so I guess it's 1 1/2 half years by now, sigh
<jhass> I'm getting old
<kirpen> cool, and I find Crystal today, from conference RubyOnRailsClub by Russiya))
<jhass> nice!
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 272 seconds]
waj has joined #crystal-lang
waj has quit [Ping timeout: 264 seconds]
kirpen has quit [Quit: Page closed]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ComputationalZom has joined #crystal-lang
ComputationalZom has quit [Remote host closed the connection]
trapped has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Ping timeout: 250 seconds]
<crystal-gh> [crystal] jhass closed pull request #1381: Log compiler errors to STDERR (master...stderr) http://git.io/vGjob
<travis-ci> manastech/crystal#37a2115 (master - Merge pull request #1381 from sferik/stderr): The build passed. https://travis-ci.org/manastech/crystal/builds/78996418
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vZfu9
<crystal-gh> crystal/master f8a3b8a Ary Borenszweig: Simplified channel primes sample. Fixes #1383
<travis-ci> manastech/crystal#f8a3b8a (master - Simplified channel primes sample. Fixes #1383): The build passed. https://travis-ci.org/manastech/crystal/builds/78997344
ssvb has quit [Ping timeout: 264 seconds]
NeverDie has joined #crystal-lang
waj has joined #crystal-lang
kyrylo has joined #crystal-lang
ssvb has joined #crystal-lang
waj has quit [Ping timeout: 244 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vZfbZ
<crystal-gh> crystal/master 54782b9 Ary Borenszweig: YAML: handle anchors in mappings
<crystal-gh> crystal/master 4dae902 Ary Borenszweig: Added `Object.from_yaml(String)` and started `yaml_mapping`
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<travis-ci> manastech/crystal#4dae902 (master - Added `Object.from_yaml(String)` and started `yaml_mapping`): The build passed. https://travis-ci.org/manastech/crystal/builds/79005592
havenwood has joined #crystal-lang
blue_deref has joined #crystal-lang
<trapped> what's an IO object that i can cast to TCPSocket to test IO in spec?
<jhass> don't think there's any
<jhass> you could subclass TCPSocket and override the methods you call
waj has joined #crystal-lang
waj has quit [Remote host closed the connection]
waj has joined #crystal-lang
waj has quit [Ping timeout: 250 seconds]
leafybasil has joined #crystal-lang
<crystal-gh> [crystal] devdazed opened pull request #1394: add select, select!, reject, and reject! to Hash (master...master) http://git.io/vZJBe
daveshah has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 244 seconds]
havenwood has joined #crystal-lang
Dreamer3 has quit [Quit: Leaving...]
lmarburger has left #crystal-lang [#crystal-lang]
Dreamer3 has joined #crystal-lang
daveshah has quit [Remote host closed the connection]
kyrylo has quit [Ping timeout: 264 seconds]
waterlink has quit [Ping timeout: 246 seconds]
daveshah has joined #crystal-lang
daveshah has quit [Remote host closed the connection]
waj has joined #crystal-lang
waj has quit [Ping timeout: 272 seconds]
<dzv> or use UNIXSocket.pair
<vegai> 0.7.7 seemed to have removed require support inside classes, right?
<jhass> right
<vegai> I wonder if there's any sensible alternative to that, or should people just change their habits
<vegai> breaks amethyst quite totally
<jhass> they should change their habits
<vegai> right
<vegai> I suppose the amethyst developers will fix it a bit easier than I can
<nakilon> what does --with-llvm brew flag give?
<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?
<jhass> llvm is statically linked
<nakilon> would I have some profit with installing it?
<nakilon> oh
<jhass> so the compiler has no runtime dependency on it, only compile time
<nakilon> ok
<willl> --with-llvm is to get one of the things needed to build from source
<willl> it'd maybe be nicer if there was like --dev that got all of the dependencies for that
kyrylo has joined #crystal-lang
blue_deref has quit [Quit: Taking myself out of hear.]
waterlink has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Ping timeout: 252 seconds]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 264 seconds]
<dzv> or automatically downloaded/compiled dependencies it was missing or if the versions were incompatible
adam| is now known as adam12
<nakilon> there is a "# p {{action}}" line inside my macro
<nakilon> it says error: "unterminated macro"
<nakilon> when I remove this line, it goes ok
<nakilon> idk why
<jhass> got a reproducer?
<nakilon> is there smth special abount '#' char in macro definitions?
<nakilon> maing it
<nakilon> *making
<jhass> nope, but it won't stop {{foo}} expansion
<nakilon> macro my_macro(action)
<nakilon> # p {{action}}
<nakilon> {% action %}
<nakilon> end
<jhass> mmh, {% action %} might be invalid, I'm not sure. I surely see no sense in it
<jhass> {% ... %} is for control flow stuff or assigning new macro vars
<jhass> {{action}} to interpolate
<nakilon> oh
<jhass> but actually that alone does not reproduce http://carc.in/#/r/dyy
<nakilon> my it fails even if i make {{ actoin }}
<jhass> ah, invoking a macro is just my_macro(...), macro my_macro is defining it
<nakilon> yes, I define it
<nakilon> why do I get "unterminated macro"
<nakilon> and not, if remove the # string
<nakilon> *line
<jhass> mmh
<jhass> interesting, if you add a call afterwards it works?
<jhass> but yeah, seems like a bug, open an issue please ;)
<nakilon> cool, I've found a bug )
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
<crystal-gh> [crystal] technorama opened pull request #1397: Enumerable.min & max accept a default value. (master...f/enumerable_max) http://git.io/vZUs2
waj has joined #crystal-lang
tatey_ has quit []
waj has quit [Ping timeout: 265 seconds]
<crystal-gh> [crystal] kirbyfan64 opened pull request #1398: Implement JSON error messages (sort of...) (master...json_err) http://git.io/vZUWt
<crystal-gh> [crystal] technorama opened pull request #1399: Add Singleton Module. (master...f/singleton) http://git.io/vZUlJ
waj has joined #crystal-lang
<crystal-gh> [crystal] 8398a7 opened pull request #1400: Fix a typo in the docs (master...patch-1) http://git.io/vZU4V
leafybasil has joined #crystal-lang
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vZUBv
<crystal-gh> crystal/master 51d6499 839: fix typo
<crystal-gh> crystal/master 8773772 Jonne Haß: Merge pull request #1400 from 8398a7/patch-1...
tatey_ has joined #crystal-lang
havenwood has quit [Ping timeout: 265 seconds]
<travis-ci> manastech/crystal#8773772 (master - Merge pull request #1400 from 8398a7/patch-1): The build passed. https://travis-ci.org/manastech/crystal/builds/79047911
dyulax93 has quit [Ping timeout: 252 seconds]
havenwood has joined #crystal-lang
waj has quit [Read error: Connection reset by peer]
waj_ has joined #crystal-lang
thor77 has quit [Ping timeout: 250 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vZUz5
<crystal-gh> crystal/master fbcd17e Ary Borenszweig: Removed all macro instance variables except `@type`.
<travis-ci> manastech/crystal#fbcd17e (master - Removed all macro instance variables except `@type`.): The build passed. https://travis-ci.org/manastech/crystal/builds/79051858
kyrylo has quit [Quit: Konversation terminated!]
kyrylo has joined #crystal-lang
<nakilon> why 'skip' if it's 'drop' in Ruby?
<nakilon> same about drop_whlie
thor77 has joined #crystal-lang