jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.10.2 | 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
trapped has quit [Read error: Connection reset by peer]
shama has joined #crystal-lang
trapped has joined #crystal-lang
trapped has quit [Client Quit]
shama has quit [Remote host closed the connection]
shama has joined #crystal-lang
shama has quit [Remote host closed the connection]
shama has joined #crystal-lang
shama has quit [Remote host closed the connection]
shama has joined #crystal-lang
shama has quit [Remote host closed the connection]
fowlduck has quit [Remote host closed the connection]
greengriminal has quit [Quit: This computer has gone to sleep]
shama has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vzoLa
<crystal-gh> crystal/master 5c93802 Ary Borenszweig: More syntax updates
<crystal-gh> crystal/master cf019e2 Ary Borenszweig: Fixed #2050: Regression with closures
greyblake has joined #crystal-lang
<greyblake> Hi, there is implementation of JWT (JSON Web Tokens) for Crystal: https://github.com/greyblake/crystal-jwt
<travis-ci> manastech/crystal#cf019e2 (master - Fixed #2050: Regression with closures): The build is still failing. https://travis-ci.org/manastech/crystal/builds/104374092
<DeBot> https://github.com/manastech/crystal/issues/2050 (Regression with closures)
fowlduck has joined #crystal-lang
greyblake has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Philpax has quit [Ping timeout: 256 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
greengriminal has joined #crystal-lang
buggs has quit [Quit: WeeChat 0.4.2]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 260 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 256 seconds]
Raimondi has quit [Ping timeout: 248 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 260 seconds]
fowlduck has joined #crystal-lang
buggs has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
trapped has joined #crystal-lang
Davy_CC has quit [Ping timeout: 240 seconds]
Davy_CC has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
<ytti> if repos.class == Hash
<ytti> puts repos.keys
<ytti> end
<ytti> why does this not know compile time, that it's hash?
<ytti> it seems bit awkward to traverse YAML document
<ytti> as i'll need stuff like
<ytti> if x.class == Hash
<ytti> puts (x.class as Hash).keys
<ytti> end
<ytti> seems redundanat
mondok has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ytti> do i really need to re-iterate the hash structure every time? https://gist.github.com/anonymous/6079ba1a94dfb0fac629
<ytti> lines #4 and #6 seem redundant
<ytti> definition seems redundant, i should be just able to intansiate it, based on previous def
Philpax has joined #crystal-lang
<ytti> http://crystal-lang.org/api/YAML.html what would YAML.mapping look like, if type is Hash and you need to define mapping under that Hash?
mondok has quit [Ping timeout: 245 seconds]
fowlduck has quit [Remote host closed the connection]
trapped has joined #crystal-lang
fowlduck has joined #crystal-lang
Raimondi has joined #crystal-lang
matp has quit [Quit: Textual IRC Client: www.textualapp.com]
matp has joined #crystal-lang
tomchapin has joined #crystal-lang
matp has quit [Remote host closed the connection]
<crystal-gh> [crystal] f opened pull request #2053: Assignment with if doesn't need assignment. (master...master) https://git.io/vzoQ9
matp has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 5 new commits to master: https://git.io/vzo7K
<crystal-gh> crystal/master 385900d Ary Borenszweig: Simplified GC.add_finalizer
<crystal-gh> crystal/master 862ccfc Ary Borenszweig: Use free var in Enumerable#in_groups_of
<crystal-gh> crystal/master 2367653 Ary Borenszweig: Removed the `::` syntax for type declarations and uninitialized variables
<travis-ci> manastech/crystal#938a083 (master - The `record` macro can now accept type declarations): The build is still failing. https://travis-ci.org/manastech/crystal/builds/104449644
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unshadow has joined #crystal-lang
<unshadow> So, just wanted to make sure I'm geting the changes to Socket.read, lets say I want a blocking read, and want to read(1024), how do I do it ? I see that read only accepts Uint8
trapped has joined #crystal-lang
<jhass> unshadow: iirc you can just pass it a slice of that size
jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.11.0 | 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
<unshadow> jhass: Like Slice(UInt8).new(1024) ?
<unshadow> read(Slice(UInt8).new(1024))
<jhass> not sure it returns it, but yeah
<unshadow> >> a = Slice(UInt8).new(1024)
<DeBot> unshadow: # => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... - https://carc.in/#/r/qdr
<unshadow> how would I convert the data back to String afterwords ?
<unshadow> Slice supports to_s ?
<ytti> there is no File.readline, is it possible to figure out where symlink links to?
<unshadow> I see it does
<jhass> unshadow: pass it to String.new
<unshadow> jhass: I'll work on it, thanks for the heading :)
unshadow has quit [Quit: leaving]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
Ox0dea has joined #crystal-lang
<Ox0dea> asterite: Do you mind my asking the source of your avatar?
smarr has joined #crystal-lang
<smarr> hi, brief question, Crystal uses the Boehm GC, as per http://crystal-lang.org/2013/12/05/garbage-collector.html?
<BlaXpirit> smarr, i think so
<BlaXpirit> smarr, yes
<BlaXpirit> i'm saying this based on this list of dependencies (first in the list) https://www.archlinux.org/packages/community/x86_64/crystal/
<smarr> BlaXpirit: ok, great, thanks
fowlduck has quit [Remote host closed the connection]
tomchapin has quit [Ping timeout: 276 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 240 seconds]
fowlduck has joined #crystal-lang
jeromegn has joined #crystal-lang
mondok has joined #crystal-lang
krtv` has quit [Ping timeout: 240 seconds]
krtv` has joined #crystal-lang
<jeromegn> what’s the best practice for hash key types? symbols or strings?
<jeromegn> *hash keys type
<BlaXpirit> jeromegn, this isn't about practice, this is about what's viable and what isn't
<BlaXpirit> if it is possible to use symbols in some case, then sure, use them
<BlaXpirit> jeromegn, but that also indicates that you probably shouldn't be using a hash in this case at all
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vzKqc
<crystal-gh> crystal/master a3f262a Ary Borenszweig: Fixed: missing virtual type check in union type declaration
<crystal-gh> crystal/master 93d5d7e Ary Borenszweig: Fixed #2057: regression with block vars and macros
<jeromegn> it’s an options Hash on initialization
<jeromegn> enlighten me :)
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vzKqw
<crystal-gh> crystal/master 010ce1f Ary Borenszweig: Merge pull request #2053 from f/master...
<crystal-gh> crystal/master f1cfe88 Fatih Kadir Akın: Assignment if doesn't need assignment
Ox0dea has left #crystal-lang ["WeeChat 1.5-dev"]
<ytti> poo
<ytti> [1 ytti@lintukoto ~/tmp/koti]% crystal build --link-flags -static bin/koti.cr
<ytti> ld: library not found for -lcrt0.o
Raimondii is now known as Raimondi
<travis-ci> manastech/crystal#93d5d7e (master - Fixed #2057: regression with block vars and macros): The build was fixed. https://travis-ci.org/manastech/crystal/builds/104484233
<DeBot> https://github.com/manastech/crystal/issues/2057 (`__str__ method not found` Error with `ecr_embed` on `String::Builder.build` on 0.11.0)
<travis-ci> manastech/crystal#010ce1f (master - Merge pull request #2053 from f/master): The build was fixed. https://travis-ci.org/manastech/crystal/builds/104484858
<DeBot> https://github.com/manastech/crystal/pull/2053 (Ternary-like if doesn't need inner assignment.)
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vzKYv
<crystal-gh> crystal/master 1e6f385 Ary Borenszweig: Fixed #2054: can't format heredoc in some cases
<ytti> grumble, why is compiling static binaries so hard
<travis-ci> manastech/crystal#1e6f385 (master - Fixed #2054: can't format heredoc in some cases): The build passed. https://travis-ci.org/manastech/crystal/builds/104486848
<DeBot> https://github.com/manastech/crystal/issues/2054 (Crystal Tool Format can't format Heredoc)
<ytti> sigh can't compile crystal on osx
<ytti> other than from brew
<asterite> jeromegn: if it was an options hash on initiailzation, and that came from Ruby, you probably want named arguments: http://crystal-lang.org/docs/syntax_and_semantics/default_and_named_arguments.html
<jeromegn> oh
<jeromegn> nice
<jeromegn> that could be a long list though :)
<jeromegn> playing around making a native (not dependent on external libs) MongoDB driver in crystal
<jeromegn> just trying to send a first correct message at the moment
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
<ytti> tried to add readlink to file.cr, but can't compile to test if it works
<ytti> hopefully will get leehnox box back up next week
<ytti> so frustrading to work on osx :(
<ytti> there should be like community sanctioned support for money page, i'd pay for someone to figure out how to compile this statically
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vzKZO
<crystal-gh> crystal/master eee3eff Ary Borenszweig: Fixed #2059: regression with class variables not being correctly typed
<travis-ci> manastech/crystal#eee3eff (master - Fixed #2059: regression with class variables not being correctly typed): The build passed. https://travis-ci.org/manastech/crystal/builds/104495765
<DeBot> https://github.com/manastech/crystal/issues/2059 (Segfault for default class variable in crystal 0.11.0)
<BlaXpirit> hm I'm so lucky that my project in crystal didnt break
<BlaXpirit> one of the last changes I made just happened to replace the :: thing with something else
<BlaXpirit> waaaait a second, no I didn't replace it
<yxhuvud> urgh. It would be convenient sometimes if it was allowed to pass self before instantiating all non-nilables if the receiver never called any methods on it.
<ytti> i think we need more community/collaborate approach to docs
<ytti> what if API doc would include expandable section for code examples, with arrow up/down voting, to see which order they appear
<ytti> i think over time, examples would cover issues which confuse users
<ytti> also, maybe doc bounties? I'd pay 50eur on the spot, if someone can tell me how to compile (reasonably) static binary on osx
<asterite> ytti: did you check this? https://github.com/manastech/crystal/issues/2003
<ytti> i did, but that was after I had given up and already given up, and already half way through consolation rosé, so my take away from it was only 'bugger, it's not gonna be easy'
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
<mondok> i have array of objects
<mondok> and try to find one element
<mondok> but seems "find" doesnot work
<mondok> and "select{}.first" works good
<mondok> where is problem?
pragmatism has quit [Ping timeout: 264 seconds]
pragmatism has joined #crystal-lang
tomchapin has joined #crystal-lang