jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.5 | Fund Crystals development: http://to.ly/TtGw | 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
ponga has quit [Remote host closed the connection]
<asterite> ozra: I changed it and there was no change :(
<ozra> asterite: Aha, too bad, I had hopes for that one. It did get used in practise (stupid question)?
<asterite> Now the difference between rust and cyrstal is the GC, and how rust allocates memory. I think they were using jemalloc, maybe it's better than boehm.
<strcmp1> there's not manual memory management in rust?
shama has quit [Remote host closed the connection]
<asterite> In any case, this program isn't very typical, it keeps allocating memory for ever, creating an array of 91_964_701 positions... I don't think many programs out there need to do that
<asterite> strcmp1: rust memory management is kind of manual
<asterite> well, you don't need to worry about it, rust takes care about that, but you have to deal with lifetimes, ownership and the borrow checker
blue_deref has joined #crystal-lang
ssvb has quit [Ping timeout: 240 seconds]
ozra has quit [Ping timeout: 246 seconds]
shama has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
<jamie_ca> strcmp1: biggest choice I'm aware of in rust is that you can force allocations to be heap/stack, which might save a few copies depending on who grabs ownership of the data
ssvb has joined #crystal-lang
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 264 seconds]
havenwood has joined #crystal-lang
ozra has joined #crystal-lang
<ozra> No, ofc it's atypical, but it's at least indicative of number crunching allocation heavy sw. I'm frankly surprised it didn't speed up. But silly me didn't check bench source and made assumptions. Will have a peek.
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
kulelu88 has joined #crystal-lang
kulelu88 has left #crystal-lang [#crystal-lang]
zamith has quit [Quit: Be back later ...]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 260 seconds]
blue_deref has quit [Quit: bbn]
havenwood has quit [Ping timeout: 260 seconds]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 250 seconds]
waj has joined #crystal-lang
waj has quit [Client Quit]
zamith has joined #crystal-lang
havenwood has joined #crystal-lang
strcmp1 has quit [Quit: Leaving]
zamith has quit [Ping timeout: 250 seconds]
thor77 has quit [Ping timeout: 256 seconds]
strcmp1 has joined #crystal-lang
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 256 seconds]
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 260 seconds]
sdogruyol has joined #crystal-lang
sdogruyo_ has joined #crystal-lang
sdogruyol has quit [Read error: Connection reset by peer]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 272 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
sdogruyo_ has quit [Remote host closed the connection]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 250 seconds]
havenwood has quit [Ping timeout: 250 seconds]
strcmp1 has quit [Ping timeout: 244 seconds]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 240 seconds]
ozra has quit [Quit: Page closed]
ozra has joined #crystal-lang
zamith has joined #crystal-lang
zamith has quit [Client Quit]
elia has joined #crystal-lang
BlaXpirit has joined #crystal-lang
zamith has joined #crystal-lang
zamith_ has joined #crystal-lang
zamith has quit [Ping timeout: 250 seconds]
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 272 seconds]
thor77 has joined #crystal-lang
rossjones has joined #crystal-lang
zamith_ has quit [Quit: Be back later ...]
leafybasil has quit [Remote host closed the connection]
Mo0O has quit [Ping timeout: 244 seconds]
zamith_ has joined #crystal-lang
lokulin has quit [Ping timeout: 244 seconds]
zamith_ has quit [Client Quit]
zamith_ has joined #crystal-lang
zamith__ has joined #crystal-lang
leafybasil has joined #crystal-lang
zamith_ has quit [Ping timeout: 246 seconds]
dbackeus has joined #crystal-lang
ssvb_ has joined #crystal-lang
ssvb has quit [Ping timeout: 244 seconds]
<dbackeus> what difference is there to build in "release" mode vs non release mode?
lokulin has joined #crystal-lang
<BlaXpirit> dbackeus, release has optimizations
<BlaXpirit> in some languages debug mode prevents some crashes and gives more info about them, more runtime checks, while release sacrifices safety for performance
<BlaXpirit> dbackeus, i dont know details about release mode in crystal, but the gist is it's supposed to be faster, but you're not supposed to use it during development
<dbackeus> right
<dbackeus> guess I'll have to try using it and see if the benchmarks show any difference
oal has quit [*.net *.split]
jhass has quit [*.net *.split]
ryanf has quit [*.net *.split]
adam12 is now known as adam
adam is now known as Guest63985
Mo0O has joined #crystal-lang
oal has joined #crystal-lang
jhass has joined #crystal-lang
ryanf has joined #crystal-lang
jbye has quit [Ping timeout: 272 seconds]
jbye has joined #crystal-lang
ssvb_ has quit [Ping timeout: 256 seconds]
dbackeus has quit [Remote host closed the connection]
zamith__ has quit [Quit: Be back later ...]
jwaldrip has joined #crystal-lang
jwaldrip has quit [Ping timeout: 246 seconds]
blassin has joined #crystal-lang
<blassin> hey!
<blassin> is there any code coverage tool for Crystal?
<blassin> the only mention I see in the code is in the .gitignore :D
<BlaXpirit> hm i dont thnk so
<blassin> ok, thanks!
NeverDie has joined #crystal-lang
blassin has quit [Quit: Page closed]
dbackeus has joined #crystal-lang
<dbackeus> is there anything similar to .freeze in Crystal to make objects immutable?
<BlaXpirit> dbackeus, what is immutable?
<BlaXpirit> u can always just not define setters
<dbackeus> say you have an array and you want to make sure it doesn't get it's contents changed
<dbackeus> in ruby you would freeze it
<BlaXpirit> never heard of this
<BlaXpirit> u can make a wrapper that only defines []
<BlaXpirit> probably best make it a struct, not a class
<dbackeus> yeah that probably makes sense
<dbackeus> mama mia, I almost just ate a wasp sitting inside my can of Fanta
<dbackeus> luckily he appeared more dazed than pissed off after I spat him out ;)
<BlaXpirit> D:
<crystal-gh> [crystal] asterite closed pull request #927: Implement Enumerable#sort (master...feature/enumerable_sort) http://git.io/vqtMF
havenwood has joined #crystal-lang
luislavena has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #1074: Adds a working version of the format (%) method on strings (master...string_format) http://git.io/vO3Dp
<travis-ci> manastech/crystal#7dc3f62 (master - Merge pull request #1074 from zamith/string_format): The build passed. https://travis-ci.org/manastech/crystal/builds/74571130
<travis-ci> manastech/crystal#898e84c (master - Some fixes to String#% with hash arguments. Related to #1074): The build passed. https://travis-ci.org/manastech/crystal/builds/74571899
<crystal-gh> [crystal] waj pushed 1 new commit to master: http://git.io/vOAob
<crystal-gh> crystal/master 74b031b Juan Wajnerman: Signal numbers are different in Darwin and Linux (fixes #1114)
dbackeus has quit [Remote host closed the connection]
dbackeus has joined #crystal-lang
strcmp1 has joined #crystal-lang
ssvb has joined #crystal-lang
<travis-ci> manastech/crystal#74b031b (master - Signal numbers are different in Darwin and Linux (fixes #1114)): The build passed. https://travis-ci.org/manastech/crystal/builds/74576316
blue_deref has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vOxee
<crystal-gh> crystal/master ec34ac6 Ary Borenszweig: Fixed #1121: dont't skip assignment when used in combination with `is_a?`
<crystal-gh> crystal/master 7b0db03 Ary Borenszweig: Added `%<...>` to String#%, which allows to specify formatting options
blue_deref has quit [Quit: bbn]
luislavena has quit [Remote host closed the connection]
luislavena has joined #crystal-lang
ozra has quit [Ping timeout: 246 seconds]
luislavena has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
shama has joined #crystal-lang
NeverDie has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
luislavena has joined #crystal-lang
jwaldrip has joined #crystal-lang
luislavena has quit [Ping timeout: 260 seconds]
elia has joined #crystal-lang
jwaldrip has quit [Ping timeout: 250 seconds]
jwaldrip has joined #crystal-lang
luislavena has joined #crystal-lang
dbackeus has quit [Remote host closed the connection]
jwaldrip has quit [Ping timeout: 256 seconds]
jwaldrip has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
jwaldrip has quit [Ping timeout: 256 seconds]
jwaldrip has joined #crystal-lang
jwaldrip has quit [Ping timeout: 256 seconds]
jwaldrip has joined #crystal-lang
jwaldrip has quit [Ping timeout: 244 seconds]
elia has quit [Quit: Computer has gone to sleep.]
jwaldrip has joined #crystal-lang
jwaldrip has quit [Ping timeout: 240 seconds]
jwaldrip has joined #crystal-lang
jwaldrip has quit [Ping timeout: 260 seconds]
jwaldrip has joined #crystal-lang
elia has joined #crystal-lang
jwaldrip has quit [Ping timeout: 264 seconds]
jwaldrip has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vOpCe
<crystal-gh> crystal/master 8ef990a Ary Borenszweig: Improved error message of `expect_raises`
<crystal-gh> crystal/master 8da376b Ary Borenszweig: Fixed #1120: check that Proc and Tuple arguments are types, give error when not
<crystal-gh> crystal/master 6e4b673 Ary Borenszweig: Added `Int#unsafe_shl` and `Int#unsafe_shr` so we can implement safe versions of `<<` and `>>` on top. Related to #305
blue_deref has joined #crystal-lang
<travis-ci> manastech/crystal#6e4b673 (master - Added `Int#unsafe_shl` and `Int#unsafe_shr` so we can implement safe versions of `<<` and `>>` on top. Related to #305): The build was broken. https://travis-ci.org/manastech/crystal/builds/74611039
jwaldrip has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vOplV
<crystal-gh> crystal/master 30e2748 Ary Borenszweig: Missing commented code from the previous commit
dbackeus has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
dbackeus has quit [Ping timeout: 272 seconds]
elia has quit [Quit: Computer has gone to sleep.]
luislavena has quit []
just_this_guy has joined #crystal-lang
<just_this_guy> hi, is there a Crystal equivalent to RUBY_PLATFORM?
<jhass> no
<jhass> though you can do something like
<just_this_guy> or a list of all predefined CONSTANTS in Crystal?
<jhass> >> `uname -m`
<DeBot> jhass: # => "i686\n" - http://carc.in/#/r/aeh
<jhass> mmh, not that I'm aware of
<just_this_guy> ok, thanks!
<jhass> >> {{`uname -m`}}
<DeBot> jhass: Error in macro 'macro_181094512' eval:4, line 1: undefined local variable or method 'i686' - http://carc.in/#/r/aei
<jhass> >> {{`uname -m`.stringify}}
<DeBot> jhass: # => "i686\n" - http://carc.in/#/r/aej
<jhass> to get it at compile time
<BlaXpirit> hmm if i were trying this, it would definitely not occur to me to use .stringify
leafybasil has joined #crystal-lang
<BlaXpirit> why not .to_s
<BlaXpirit> this leads me to a question
<BlaXpirit> how to list methods of an object?
<jhass> >> class Object; macro def methods : Array(String) {{@type.methods.map &.name.stringify}} of String; end; end; "".methods
<DeBot> jhass: Syntax error in expanded macro: macro_194140576:1: expecting token 'EOF', not '}' - http://carc.in/#/r/aem
<jhass> mmh
<jhass> >> class Object; macro def methods : Array(String); {{@type.methods.map &.name.stringify}} of String; end; end; "".methods
<DeBot> jhass: # => ["bytesize", "to_i", "to_i", "to_i?", "to_i8", "to_i8", "to_i8?", "to_u8", "to_u8", "to_u8?", "to_i16", "to_i16", "to_i16?", "to_u16", "to_u16", "to_u16?", "to_i32", "to_i32", "to_i32?", "to_u32", "to_u32", "to_u32?", "to_i64", "to_i64", "to_i64?", "to_u64", "to_u64", "to_u64?", "to_u64_info", "to_f", "to_f32", "to_f64", "[]", "[]", "[]", "[]" ... - http://carc.in/#/r/aen
<BlaXpirit> jhass, thanks, that makes sense, but shouldn't it be in standard library?
<jhass> I think ary doesn't want people to try to do runtime metaprogramming with it or somesuch
<jhass> and I mean we just should integrate crystal doc with what crystal deps will become and have a local doc browser for all your project
<BlaXpirit> jhass, there is also this thing, in macros i was getting some weird node type that isn't in the docs
<BlaXpirit> and i had no idea what to do with it
<BlaXpirit> so how to list all methods of a node in macros?
<jhass> I don't think there's a way to list macro methods
<BlaXpirit> peculiar code
dbackeus has joined #crystal-lang
jwaldrip has joined #crystal-lang
<jwaldrip> is there documentation on the Porjectfile?
<jwaldrip> Projectfile...
<jhass> it's going to be replaced, so no
<jhass> but it's just deps do github "foo/bar" end
<jhass> and then run crystal deps
Raimondi has quit [Ping timeout: 265 seconds]
<jwaldrip> when is the replacement coming. What is the spec for it?
<crystal-gh> [crystal] technorama opened pull request #1123: Move LibC::TimeSpec and LibC::TimeVal to libc.cr. (master...f/libc) http://git.io/vOpAM
<nopc0de> Why does the HTTP server example in /docs/ crash when querying with curl?
Raimondi has joined #crystal-lang
<jhass> it does?
<jhass> seems to work here
<dzv> is there a way to throw a fatal exception that is not normally caught by rescue?
<jhass> just exit?
<jhass> >> STDERR.puts "fatal!"; exit(1)
<DeBot> jhass: fatal! - http://carc.in/#/r/aeq
<jhass> could be nice to add Ruby's Kernel#abort
Raimondi has quit [Ping timeout: 264 seconds]
<asterite> >> abort "oh no!"
<DeBot> asterite: Failed to run your code, sorry! - http://carc.in/#/r/aet
<asterite> http://crystal-lang.org/api/index.html#http%3A//crystal-lang.org/api/toplevel.html%23abort%2528message%252C%2520status%2520%253D%25201%2529-class-method
<jhass> mmh
<jhass> didn't see warn so I didn't think :D
Raimondi has joined #crystal-lang
<asterite> Oh, I didn't know about warn
<jhass> also abort should print to stderr
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vOhJg
<crystal-gh> crystal/master bb3ad68 Technorama Ltd: Move LibC::TimeSpec and LibC::TimeVal to libc.cr.
<crystal-gh> crystal/master d0ea348 Ary Borenszweig: Merge pull request #1123 from technorama/f/libc...
<asterite> Didn't know that either
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 245 seconds]
Raimondii is now known as Raimondi
<crystal-gh> [crystal] will opened pull request #1125: print abort message to stderr (master...stderrabort) http://git.io/vOhLd
<jhass> willl: ty :D
<travis-ci> manastech/crystal#d0ea348 (master - Merge pull request #1123 from technorama/f/libc): The build passed. https://travis-ci.org/manastech/crystal/builds/74625692
elia has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
<nopc0de> It's probably my own stupidity
<jhass> you're on crystal 0.7.5?
jwaldrip has quit [Quit: Be back later ...]
<just_this_guy> @nopc0de it worked for me
Raimondi has joined #crystal-lang
<just_this_guy> I posted curl’s response on your gist
<nopc0de> Yes
<jhass> yeah, try HEAD
<jhass> though I'm curios, what curl version?
<jhass> since it does seem to work for some
<just_this_guy> asterite: is there a way to get the PID of the current Crystal process? Or the parent PID? Or both?
<nopc0de> curl 7.37.1
<jhass> >> Process.pid
<DeBot> jhass: # => 71 - http://carc.in/#/r/af2
<jhass> >> Process.ppid
<DeBot> jhass: # => 1 - http://carc.in/#/r/af3
<BlaXpirit> :o
<just_this_guy> jhass: thanks!
<nopc0de> Should I use/build crystal from master branch on github?
<just_this_guy> asterite: thanks!
<jhass> nopc0de: yeah
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vOh3x
<crystal-gh> crystal/master cafe10f Will Leinweber: print abort message to stderr
<crystal-gh> crystal/master a919228 Ary Borenszweig: Merge pull request #1125 from will/stderrabort...
Raimondi has quit [Ping timeout: 255 seconds]
<just_this_guy> re: curl, I’m on a lower version than nopc0de, with no problem (7.30.0)
<jhass> I'm on 7.43 with no problem
<just_this_guy> maybe it’s not just the curl version, but features or protocols
<nopc0de> Okai trying that now
<nopc0de> i think im using osx default
<just_this_guy> nopc0de: /usr/bin/curl?
<just_this_guy> nopc0de: I listed my `curl —version` with protocols and features on your gist
Raimondi has joined #crystal-lang
<travis-ci> manastech/crystal#a919228 (master - Merge pull request #1125 from will/stderrabort): The build passed. https://travis-ci.org/manastech/crystal/builds/74629582
shama has quit [Remote host closed the connection]
jwaldrip has joined #crystal-lang
shama has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
Raimondi has joined #crystal-lang
elbow has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
Raimondi has quit [Ping timeout: 246 seconds]
Raimondi has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
just_this_guy has left #crystal-lang [#crystal-lang]
<nopc0de> Does anyone have instructions to get crystal head on osx?
<nopc0de> It's probably the llvm then
<nopc0de> I didn't do it because of the "all kinds of problems" in brew
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vOhDD
<crystal-gh> crystal/master 4288b21 Ary Borenszweig: Removed support for trailing `while`/`until`. Use `loop { ... break if <cond> }` instead. Fixes #549. Fixes #1118.
<BlaXpirit> woo
<jhass> :/
<BlaXpirit> what, jhass
<BlaXpirit> dont like removing expr while expr ?
<jhass> yeah
<BlaXpirit> well, the points against removing it were also expressed
<jhass> happy that ... end while ... is gone but I like ... while ...
<BlaXpirit> i remember one, anyway
<BlaXpirit> i mean, loop is too big of a control flow change to express it in one line
<BlaXpirit> i would never use expr while expr
<travis-ci> manastech/crystal#4288b21 (master - Removed support for trailing `while`/`until`. Use `loop { ... break if <cond> }` instead. Fixes #549. Fixes #1118.): The build passed. https://travis-ci.org/manastech/crystal/builds/74638389
dbackeus has quit [Remote host closed the connection]
elia has joined #crystal-lang
Mo0O has quit [Ping timeout: 245 seconds]
Mo0O has joined #crystal-lang
sdogruyol has joined #crystal-lang
sdogruyol has quit []
elia has quit [Quit: Computer has gone to sleep.]
Raimondii has joined #crystal-lang
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Killed (hobana.freenode.net (Nickname regained by services))]
Raimondi has quit [*.net *.split]
Raimondii is now known as Raimondi
blue_deref has quit [Quit: bbn]
elia has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
elia has quit [Client Quit]
elia has joined #crystal-lang
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 240 seconds]
dbackeus has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
jwaldrip has quit [Quit: Be back later ...]