jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.8.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
* CompanionCube silently wishes we could clone npm
NeverDie has quit [Quit: http://radiux.io/]
fowlduck has quit [Remote host closed the connection]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
sfcgeorg_ has quit [Quit: Textual IRC Client: www.textualapp.com]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dzv> what do you want in npm that shards doesn't provide?
<CompanionCube> actually, nvm
<CompanionCube> it's just that the error messages leave much to be desired
<CompanionCube> brb
tomchapin has joined #crystal-lang
havenwood has joined #crystal-lang
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #crystal-lang
<crystal-gh> [crystal] rmosolgo opened pull request #1631: docs(String) add some documentation for String (master...string-docs) http://git.io/vcmTf
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] rmosolgo opened pull request #1632: refactor(String#split) use the string implementation, even for Chars (master...refactor-string-split) http://git.io/vcmLR
Philpax has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
qard has joined #crystal-lang
rmosolgo has joined #crystal-lang
qard has quit [Client Quit]
rmosolgo has quit [Remote host closed the connection]
willl has quit [Quit: Connection closed for inactivity]
rmosolgo has joined #crystal-lang
havenwood has joined #crystal-lang
Earnestly has joined #crystal-lang
<Earnestly> Hi, where might I report issues against the documentation?
<Earnestly> Would it be acceptable to create them against the main language repo?
<Earnestly> This appears to be what others have done
rmosolgo has quit [Remote host closed the connection]
<asterite> Earnestly: sure, they'll be very welcome
<Earnestly> Thanks
rmosolgo has joined #crystal-lang
<Earnestly> asterite: I'm afraid not so glamorous, https://github.com/manastech/crystal/issues/1633
<crystal-gh> [crystal] Philpax opened pull request #1634: Move LL dump to post-optimisation for cross compilation (master...move-ll-dump) http://git.io/vcmWM
<crystal-gh> [crystal] Spaceghost opened pull request #1635: fix small error in generics.md (gh-pages...patch-1) http://git.io/vcmW9
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
<crystal-gh> [crystal] vyp opened pull request #1636: docs(on_arch_linux): remove update section (gh-pages...docs-no-arch-upd) http://git.io/vcmV3
NeverDie has quit [Quit: http://radiux.io/]
pawnbox has joined #crystal-lang
sooli has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
pawnbox has joined #crystal-lang
trapped has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
sooli has quit [Quit: sooli]
trapped has quit [Read error: Connection reset by peer]
sooli has joined #crystal-lang
willl has joined #crystal-lang
sooli has quit [Quit: sooli]
sooli has joined #crystal-lang
Ven has joined #crystal-lang
havenwood has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
BlaXpirit has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden closed pull request #1635: fix small error in generics.md (gh-pages...patch-1) http://git.io/vcmW9
<crystal-gh> [crystal] ysbaddaden closed pull request #1636: docs(on_arch_linux): remove update section (gh-pages...docs-no-arch-upd) http://git.io/vcmV3
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
tomchapin has joined #crystal-lang
tomchapin has quit [Read error: Connection reset by peer]
rmosolgo has quit [Remote host closed the connection]
tomchapin has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Earnestly has quit [Ping timeout: 246 seconds]
Ven has joined #crystal-lang
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sooli> Hi all, I think you should modify installation process to include shards
<jhass> sooli: we will eventually but for now having separate projects allows faster iteration
<sooli> or maybe just add the link to binaries download page in the doc ?
miah has quit [Quit: DevOps? DerpOps maybe!]
rappo has left #crystal-lang ["Leaving"]
BlaXpirit_ has joined #crystal-lang
BlaXpirit is now known as Guest63454
BlaXpirit has quit [Client Quit]
BlaXpirit has joined #crystal-lang
Guest63454 has quit [Ping timeout: 255 seconds]
<jhass> well, crystal deps links to the project already
unshadow has joined #crystal-lang
<unshadow> Hi guys, did .to_i changed for Nil class in latest version ?
<unshadow> Becuase i get this issue: undefined method 'to_i' for Nil (compile-time type is String?) (did you mean 'to_s'?)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
<BlaXpirit> unshadow, yes
<jokke> unshadow: see the commit
<jokke> hehe Earnestly was here last night :)
<unshadow> Oh... f**k
<unshadow> hahah
<unshadow> Re-factor it is
<jokke> nice to see familiar nicks from #ruby or #RubyOnRails here :) yet not surprising
<jokke> unshadow: refucktor ^^
<unshadow> jokke: XD LOL
sfcgeorge has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 268 seconds]
ponga has joined #crystal-lang
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Killed (sendak.freenode.net (Nickname regained by services))]
leafybasil has joined #crystal-lang
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
<benner> how to deal with C lib function argument like "char * buf" or "const char * buf"?
<benner> or, more generic - void *
<BlaXpirit> benner, well.... easily
<BlaXpirit> it's in the docs
<BlaXpirit> LibC::Char*
<BlaXpirit> String#to_unsafe (called automatically) returns data of this type
<jhass> benner: void * is just Void* as type
BlaXpirit has quit [Quit: Konversation]
<Philpax> is there a way to specify a typed global variable?
<jhass> to restrict its type? mmh, not sure
<jhass> what do you need a global for though?
<Philpax> doing some low-level hackery and need to store a callback to be called by a free function
<jhass> just keeps the references while they're outside GC managed memory
<Philpax> hmm, will need to think about the problem
<jhass> if you elaborate we might be able to suggest something specific that's better than a global for your situation ;)
<Philpax> my particular situation's a little complicated and extremely hacky, so going into details is a little tough :p
<Philpax> hopefully I can get a decent prototype running soon
<jhass> anyway, 98% of global state is better or equivalently well represented via a class var, constant or singleton
<jhass> *state I've seen
<Philpax> this is true
<jhass> >> $foo :: String; $foo = "bar"; $foo = 1
<DeBot> jhass: Syntax error in eval:20: unexpected token: :: - http://carc.in/#/r/hd4
<jhass> and that was my guess as to type restrict a global, so no
<Philpax> yeah, I've already tested a few things
<Philpax> I'm trying to implement a function that ends with a NoReturn callback
<Philpax> i.e. once this function gets called, there's no going back
<Philpax> the problem I'm running into is that the callback gets typed as Nil | String -> NoReturn
<jhass> I think we got a @[Raises] flag, though that might only apply to C functions, never checked
<jhass> mmh, actually why is it being typed as NoReturn an issue?
<jhass> it doesn't fit -> Void or something?
<jhass> it actually should fit any return type I think
<Philpax> it gets typed as Nil, which propagates above and results in things like `def fn() if some_cond panic() else 5 end end` being typed as `Nil | Int32`
<Philpax> might just have to write a shim in C
<jhass> huh
<jhass> raise should propagate, sounds like a bug
<Philpax> it does propagate, but I'm not using raise
<Philpax> I'm trying to reimplement raise's functionality without using raise (because it relies on things I can't use)
<jhass> maybe @[Raises] is indeed what you need then
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Philpax> hmm, looks like that's for the opposite way
<Philpax> (potentially raising callback being called from the C side)
<jhass> note raise is not a primitive or special cased in the compiler
<jhass> (as far as I can tell)
<Philpax> yeah, I've already looked through it
<Philpax> it works because __crystal_raise is typed as NoReturn, which is possible because the last function it calls is a C function typed as NoReturn
<Philpax> so I think I've solved my particular issue by doing the same thing
<Philpax> i.e. calling a C function that's guaranteed to not return
<jokke> Papierkorb: sup. have you thought it over?
pawnbox has joined #crystal-lang
<Philpax> jhass: also came up with a solution for my typed global callback issue, I just came up with an initializer that calls the NoReturn C function
<Philpax> still an unwieldy solution, I might add an issue regarding typed global variables
<jhass> they're typed :P
<Philpax> type-specified, not type-deducted :P
<Philpax> sue me
<jhass> I'd call them type restricted or somesuch
<jokke> jhass: can you add a bot method for checking the time in buenos aires? ;)
<jhass> :D
<jokke> hehe
<jhass> well, if Crystal had timezone support...
<jokke> haha :D
<jokke> i was about to poke asterite about something but noticed that it's 7:20 AM there
<jhass> you can check his away status to see whether he's connected or not
<jokke> yeah
<jokke> jhass: you didn't care about websocket, right? :/
<jhass> right :P
<jokke> :P
pawnbox has quit [Remote host closed the connection]
<crystal-gh> [crystal] jreinert opened pull request #1638: add reject method for ArrayLiterals in macros (master...reject-in-macro) http://git.io/vcYjU
<jokke> jhass: is this ^ something you can merge if travis passes?
BlaXpirit has joined #crystal-lang
<jhass> yeah
<jokke> jhass: wait a second
<jhass> (this is why I love weirichs rule btw)
<jokke> weirichs rule?
<jokke> mmh
<jokke> jhass: i don't quite agree with that rule
Tuxified has joined #crystal-lang
<jokke> but i guess it's just my preference
<jhass> it has the sideeffect of {} being attracted to methods where you care about their return value and do/end being attracted to methods where you don't
<jhass> and chaining on end or wrapping do/end into () looks just silly ;P
<jokke> _that_ is true
<jokke> list.each do |item| puts item end looks silly too though
<jokke> for me at least
<jhass> yes, I stretch it for single line stuff
<jhass> but most of the time I just give the side effect stuff its 3 lines then
<jhass> tap is probably the major exception
<jhass> which I then reason with caring about the methods return value
<jhass> but either way, following a rule dogmatically is wrong anyway IMO
<jokke> yeah
<jokke> if you agree with the changes, feel free to merge :)
<jokke> ah
<jokke> no
<jokke> no i know what you mean
<jokke> in ArrayLiteral.new
<jokke> i should use {}
<jhass> mmh, could you also add docs in docs/macros.cr?
<jokke> ah sure
<jhass> well, the surrounding code doesn't, I wouldn't require it at all
<jhass> it's just my preference after all
trapped has joined #crystal-lang
<jhass> mmh, that line in filter feels too smart
<jhass> keep = true, keep if interpreter.accept(block.body).truthy? ?
<jokke> you think?
<jokke> yeah
Ven has joined #crystal-lang
<jhass> interpreter.accept(block.body).truthy? ? keep : !keep
<jokke> that's prettyer
<jokke> that's prettier
<jhass> first one wouldn't work I think
<jokke> why not?
<jokke> sure would
<jokke> but it's not very readable
<jokke> idk
pawnbox has joined #crystal-lang
<jhass> I mean my first, it'd would be an empty collection for thereject case always
<jokke> yeah
<jokke> hmm
<jhass> maybe it's that I don't have the truthiness table for xor internalized
<jokke> :)
<jhass> but I'd prefer the explicit version
<jhass> so, are you going to change it for me? :P
<jokke> yeah
<jokke> was afk
<jokke> jhass: what about https://p.jreinert.com/FX5yuP/ruby
<jhass> it feels like double negation
<jokke> i think it's more clear than interpreter.accept(block.body).truthy? ? keep : !keep
<jokke> but i don't really care tbh :D
<jhass> why? keep being true is the default case, so having it in the first branch seems more straightforward to me
<jokke> yeah, sure
<jokke> but to me !keep is somehow weird
<jhass> well, compromise keep ? block_result : !block_result
<jokke> yeah
pawnbox has quit [Read error: Connection reset by peer]
<jhass> jokke: cool, squash? ;)
<jokke> jhass: yeah :D
Philpax has quit [Ping timeout: 268 seconds]
pawnbox has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Philpax has joined #crystal-lang
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vcOBl
<crystal-gh> crystal/master d64e637 Joakim Reinert: add reject method for ArrayLiterals in macros
<crystal-gh> crystal/master e8609de Jonne Haß: Merge pull request #1638 from jreinert/reject-in-macro...
<jokke> jhass: thanks
<jokke> jhass: what would you think of a write overload for io which takes an optional buffer size and writes the other io into the target io?
pawnbox has quit [Ping timeout: 265 seconds]
<jokke> maybe i'm just not seeing it but i think there's no convenient way to do this
<jokke> maybe even a `|` method. for doing `foo | bar` :P
<jhass> copy_stream or something?
<jokke> copy_stream?
<jhass> mmh that was Ruby I guess
<jokke> yeah
<jhass> There's IO.copy but it isn't limited
<jokke> what do you mean with not limited?
<jhass> it copies until the src is EOF
<jhass> but adding one would be easy I guess
<jokke> ah
<jokke> yeah
<jokke> and i'd make the buffer size adjustable aswell
<travis-ci> manastech/crystal#e8609de (master - Merge pull request #1638 from jreinert/reject-in-macro): The build passed. https://travis-ci.org/manastech/crystal/builds/82729115
<DeBot> https://github.com/manastech/crystal/pull/1638 (add reject method for ArrayLiterals in macros)
alanwillms has joined #crystal-lang
<benner> BlaXpirit, jhass: sure, but what object to create if I want to write into it? i.e. read(df, buff, size). "buffer :: UInt8[32]"?
<jhass> Slice(UInt8).new(32) most of the time
ingsoc has joined #crystal-lang
<unshadow> quit
unshadow has quit [Quit: leaving]
jhass is now known as not_jhass
<crystal-gh> [crystal] jreinert opened pull request #1639: add copy overload to IO to copy at most *limit* bytes (master...copy-with-limit) http://git.io/vcO6e
not_jhass is now known as jhass
ingsoc has quit [Quit: Leaving.]
Ven has joined #crystal-lang
<Papierkorb> jokke: can I query?
<jokke> Papierkorb: sure!
greenarrow has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
greenarrow has quit [Quit: Textual IRC Client: www.textualapp.com]
NeverDie has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
BlaXpirit has quit [Quit: Konversation]
trapped has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
havenwood has joined #crystal-lang
glenab has joined #crystal-lang
rmosolgo has joined #crystal-lang
<crystal-gh> [crystal] rmosolgo closed pull request #1632: refactor(String#split) use the string implementation, even for Chars (master...refactor-string-split) http://git.io/vcmLR
<jokke> oh! i found a bug in IO.copy
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vc3RG
<crystal-gh> crystal/master 16baf5d Ary Borenszweig: Link to "documenting code" in Contributing.md
<crystal-gh> [crystal] asterite closed pull request #1634: Move LL dump to post-optimisation for cross compilation (master...move-ll-dump) http://git.io/vcmWM
shama has joined #crystal-lang
<travis-ci> manastech/crystal#16baf5d (master - Link to "documenting code" in Contributing.md): The build passed. https://travis-ci.org/manastech/crystal/builds/82759920
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vc3zG
<crystal-gh> crystal/master 2794727 Ary Borenszweig: Warn to use `--release` flag when incluing `benchmark` without that flag. Fixes #1596
BlaXpirit has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #1569: Add HTTP::Params class - convenient wrapper over raw http params (master...http/params/make-it-a-convenient-hash-wrapper) http://git.io/vnKZY
<asterite> jhass: oops, I always forget to ask for squashes commits before merging a PR :-(
<asterite> jhass: do you think you can add how to do this to Contributing.md? I think it's a good idea
<jhass> happens, I consider it a "very nice to have" but not a "I ultimately need this"
<jhass> and yeah, I guess we can
<jhass> asterite: https://wiki.diasporafoundation.org/Git_workflow got a quite extensive guide over at diaspora
<asterite> Oh, cool. I think waj would like that. However, we aren't that sure about master/develop, at least at work we use master as develop and then we have tags for each release
<jhass> yeah, that's fine for crystal, develop isn't really needed here
<jhass> we do it at diaspora since we install from the git repo
<jhass> I'm rather pointing to the workflow stuff, explaining rebasing etc.
<travis-ci> manastech/crystal#2794727 (master - Warn to use `--release` flag when incluing `benchmark` without that flag. Fixes #1596): The build passed. https://travis-ci.org/manastech/crystal/builds/82761742
<DeBot> https://github.com/manastech/crystal/pull/1596 (Suggest using the release flag when building)
<jhass> but I guess some simple "please try to keep a clean commit history, here's how you do an interactive rebase" should be fine for now
<crystal-gh> [crystal] jreinert opened pull request #1641: fix bug IO.copy returning wrong count if dst didn't write everything (master...copy-bug-fixing) http://git.io/vc3rk
<travis-ci> manastech/crystal#d645073 (master - Merge pull request #1569 from waterlink/http/params/make-it-a-convenient-hash-wrapper): The build passed. https://travis-ci.org/manastech/crystal/builds/82762484
<DeBot> https://github.com/manastech/crystal/pull/1569 (Add HTTP::Params class - convenient wrapper over raw http params)
<asterite> jhass: btw, if you think there's a better phrase for suggesting to use the `--release` flag when including benchmark, please do so
<jhass> it's fine I think
<jhass> why the .id btw?
greengriminal has joined #crystal-lang
<jokke> how would you call an error if trying to write on a io which is closed? also EOFError?
<jokke> or for some other reason not willing to write any byte
<jokke> or ENOSPCError ^^
<jokke> i'm thinking of adding write_fully to IO
<jokke> that's why i ask
<jokke> also i think write_byte should return a bool
<jokke> if (write_byte...
<jokke> it can only return 0 or 1
<jokke> and they are both truthy
<jokke> so i'd add a == 1 to the write call
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
NeverDie has quit [Quit: http://radiux.io/]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vc3dd
<crystal-gh> crystal/master 0fae29b Ary Borenszweig: Added `!~` method syntax. Fixes #1637
sooli has quit [Quit: sooli]
<jokke> asterite: is #1644 hard to fix?
<DeBot> https://github.com/manastech/crystal/issues/1644 (abstract method implementation isn't enforced in non-abstract subclasses)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<asterite> jhass: I don't know, I have to think of a way to traverse the type hierarchy and check for implemented abstract defs in an efficient way, but it shouldn't be that hard. I still don't know how restrictions are considered
<jhass> jokke: ^
<asterite> For example, imagine you have `abstract def foo(x : Number)` and then you provide implementations for all number types
<asterite> In any case, it's a duplicate
<asterite> so we have to think about it a bit more
<jokke> asterite: yeah
<jokke> imho you shouldn't be able to reduce the types
<jokke> the arg types
<jokke> only the return types
<crystal-gh> [crystal] adlerhsieh opened pull request #1645: Organize README for documenting_code (gh-pages...gh-pages) http://git.io/vc3pO
<asterite> so the arg types must match exactly, right?
<jokke> well
<asterite> For example ByteFormat will have to change to list all overloads. I wouldn't mind doing that. Or maybe we can just remove the abstract def in those cases
Ven has joined #crystal-lang
<jokke> i think it should be able to satisfy `abstract def foo(x : Int)` with `def foo(x : Number)` for example but not with `def foo(x : Int32)`
<jokke> s/it/one/
<jokke> and the other way around with return types
Philpax_ has joined #crystal-lang
<jokke> so for `abstract def foo : Int` it should be okay to implement `def foo : Int32` but not `def foo : Number`
<jokke> i have to pause for a minute to think about what i just said
glenab has quit [Remote host closed the connection]
<jokke> if that makes sense
Philpax has quit [Ping timeout: 268 seconds]
NeverDie has joined #crystal-lang
czaks has quit [Ping timeout: 244 seconds]
fowlduck_ has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jokke> ah no
<jokke> the arg types must be exactly the same
<jokke> but no-one will prevent you from casting the arg type to it's super type
<jokke> which is exactly as it should be
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] jhass closed pull request #1631: docs(String) add some documentation for String (master...string-docs) http://git.io/vcmTf
<jokke> asterite: at least this is how java does it
<jhass> asterite: can you end this mess in #1064 and just make regular required args be callable with keywords? :P
<DeBot> https://github.com/manastech/crystal/issues/1064 (Unlink default arguments from keyword arguments?)
<jhass> please?
ponga has quit [Quit: Connection closed for inactivity]
<travis-ci> manastech/crystal#758cc6d (master - Merge pull request #1631 from rmosolgo/string-docs): The build passed. https://travis-ci.org/manastech/crystal/builds/82780009
<DeBot> https://github.com/manastech/crystal/pull/1631 (docs(String) add some documentation for String)
<asterite> I can, but it's far from trivial
<asterite> Right now there's a bit of juggling to implement named arguments and splats, and I believe adding full support for it will require more juggling
<asterite> I'll also have to check with waj
<asterite> It becomes harder if you consider dispatch. Imagine you have foo.bar(x: 1, y: 2) and then two `bar` methods with `def bar(x, y)` and `def bar(y, x)`. It should work, but the order is different in every dispatch
<asterite> Right now there's obviously the same issue, but I'll need to update the code to consider all possibilities. And also to give error if all required arguments are not specified, etc.
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vcsmq
<crystal-gh> crystal/master 8738ecc Ary Borenszweig: Use `rm -rf` instead of `Dir.rmdir` in `init_spec`
<crystal-gh> crystal/master ef023e0 Ary Borenszweig: Require space before argument name and type restriction. Fixes #1640
<crystal-gh> crystal/master 6501a54 Ary Borenszweig: Moved the benchmark warning to the `bm` and `ips` methods, so it's not printed when specs are run. Related to #1596
havenwood has joined #crystal-lang
<travis-ci> manastech/crystal#6501a54 (master - Moved the benchmark warning to the `bm` and `ips` methods, so it's not printed when specs are run. Related to #1596): The build passed. https://travis-ci.org/manastech/crystal/builds/82783689
<DeBot> https://github.com/manastech/crystal/pull/1596 (Suggest using the release flag when building)
Tuxified has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tuxified has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
glenab has joined #crystal-lang
fowlduck_ has quit [Remote host closed the connection]
<asterite> (Right now it works OK, we do a trick that is to create intermediate defs that reorder the args. We can do the same tricks, but it's a bit trickier, I think)
Philpax_ has quit [Read error: Connection reset by peer]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vcsl4
<crystal-gh> crystal/master 09cc6f4 Ary Borenszweig: Added `String#compare(other : self, case_insensitive = false)`. Fixes #1604
<rmosolgo>
<rmosolgo> > Class variables are always associated to a single type and are not inherited.
<rmosolgo>
<jhass> asterite: mmh, you can't just rewrite the call and reparse it?
<jhass> I always pictured it as a syntax level rewrite
Tuxified has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<asterite> jhass: how do you rewrite the test call here? http://play.crystal-lang.org/#/r/hdw
<travis-ci> manastech/crystal#09cc6f4 (master - Added `String#compare(other : self, case_insensitive = false)`. Fixes #1604): The build passed. https://travis-ci.org/manastech/crystal/builds/82788856
<DeBot> https://github.com/manastech/crystal/issues/1604 (Case-insensitive comparison function for strings)
<jhass> asterite: the second test call would overload the first one, since they have the same signature of test(Int32, Int32)
pawnbox has quit [Remote host closed the connection]
<jhass> oh, nvm misread the example
<jhass> mmh, meh
<asterite> :-D
<jhass> asterite: http://carc.in/#/r/h31 and how do we solve this one? :P
<asterite> When I wanted to implement it, I realized it was not trivial at all, but only because of dispatch
NeverDie has quit [Quit: http://radiux.io/]
<asterite> A compiler flag that skips those checks? ;-)
<jhass> :/
Ven has joined #crystal-lang
<jhass> just brainstorming, what if we define a function that has the argument list sorted alphabetically and calls the original?
<jhass> then rewrite the call to go to that overload and sort alphabetically too
<jhass> though that will never allow def foo(a, b=nil, c) I guess
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vcsuK
<crystal-gh> crystal/master b9c8abf Ary Borenszweig: Fixed mistake in String#compare
NeverDie has joined #crystal-lang
Tuxified has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybasil has quit [Ping timeout: 246 seconds]
apt-get has joined #crystal-lang
<asterite> Right now we define an intermediate def. If you check the llvm IR for the above sample you'll find it. It works well :-)
<asterite> I think we can do the same for the general case if you can use named arguments for required arguments
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vcsoT
<crystal-gh> crystal/master 9e4f88f Ary Borenszweig: Fixed `IO::Buffered#write` incorrectly returning `nil`. Fixes #1642
greengriminal has quit [Quit: Leaving]
Tuxified has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
greengriminal has joined #crystal-lang
rmosolgo has left #crystal-lang [#crystal-lang]
<travis-ci> manastech/crystal#9e4f88f (master - Fixed `IO::Buffered#write` incorrectly returning `nil`. Fixes #1642): The build passed. https://travis-ci.org/manastech/crystal/builds/82795463
<DeBot> https://github.com/manastech/crystal/issues/1642 (buffered io violates return type of IO.write(slice : Slice(UInt8)))
fowlduck has joined #crystal-lang
sooli has joined #crystal-lang
fowlduck has quit [Ping timeout: 265 seconds]
DJ has joined #crystal-lang
greengriminal has quit [Ping timeout: 264 seconds]
fowlduck has joined #crystal-lang
sooli has quit []
sooli has joined #crystal-lang
<crystal-gh> [crystal] davydovanton opened pull request #1650: Fix typo in Tuple class (master...doc-fix-typo) http://git.io/vcsQ3
sooli_ has joined #crystal-lang
kgadek has joined #crystal-lang
sooli has quit [Ping timeout: 244 seconds]
sooli_ has quit [Ping timeout: 250 seconds]
<crystal-gh> [crystal] ysbaddaden pushed 2 new commits to master: http://git.io/vcsdL
<crystal-gh> crystal/master c6ab2f1 Anton Davydov: Fix typo in Tuple class [skip ci]
<crystal-gh> crystal/master c3026d1 Julien Portalier: Merge pull request #1650 from davydovanton/doc-fix-typo...
<travis-ci> manastech/crystal#c3026d1 (master - Merge pull request #1650 from davydovanton/doc-fix-typo): The build passed. https://travis-ci.org/manastech/crystal/builds/82804068
<DeBot> https://github.com/manastech/crystal/pull/1650 (Fix typo in Tuple class)
glenab has quit []
havenwood has quit [Ping timeout: 264 seconds]
<crystal-gh> [crystal] waterlink opened pull request #1651: [HTTP::Params] Add #to_h returning internal hash (master...http/params/add-to-h) http://git.io/vcsxs
Ven has quit [Quit: Textual IRC Client: www.textualapp.com]
Ven has joined #crystal-lang
nakilon has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
kulelu88 has joined #crystal-lang
NeverDie has joined #crystal-lang
gamemanj has joined #crystal-lang
kgadek has quit [Quit: gone sleep]
kgadek has joined #crystal-lang
<crystal-gh> [crystal] waterlink closed pull request #1651: [HTTP::Params] Add #to_h returning internal hash (master...http/params/add-to-h) http://git.io/vcsxs
Ven has quit [Ping timeout: 240 seconds]
kgadek has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
gamemanj has quit [Ping timeout: 250 seconds]
havenwood has joined #crystal-lang
jsaak has quit [Ping timeout: 246 seconds]
RX14 has quit [Ping timeout: 240 seconds]
jsaak has joined #crystal-lang
Tuxified has joined #crystal-lang
RX14 has joined #crystal-lang
Ven has quit [Disconnected by services]
Ven has joined #crystal-lang
leafybas_ has joined #crystal-lang
havenn has joined #crystal-lang
leafybasil has quit [Ping timeout: 244 seconds]
havenwood has quit [Ping timeout: 264 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
trapped has quit [Read error: Connection reset by peer]
<jokke> jhass: :)
<jokke> asterite: do you need anything for #1629 ?
<DeBot> https://github.com/manastech/crystal/pull/1629 (move byte_format to std/ for getting bytes of numbers without io)
alanwillms has quit [Ping timeout: 272 seconds]
Ven has quit [Read error: Connection reset by peer]
NeverDie has quit [Quit: http://radiux.io/]
NeverDie has joined #crystal-lang
Tuxified has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tuxified has joined #crystal-lang
havenwood has joined #crystal-lang
havenn has quit [Ping timeout: 264 seconds]
<jokke> asterite: i also updated #1618
<DeBot> https://github.com/manastech/crystal/pull/1618 (add type_vars method for type nodes in macros)
BlaXpirit has quit [Quit: Konversation]
NeverDie has quit [Quit: http://radiux.io/]
havenn has joined #crystal-lang
NeverDie has joined #crystal-lang
nakilon has quit [Ping timeout: 264 seconds]
havenwood has quit [Ping timeout: 255 seconds]
nakilon has joined #crystal-lang
<jokke> and #1641 :)
<DeBot> https://github.com/manastech/crystal/pull/1641 (fix bug IO.copy returning wrong count if dst didn't write everything)
<dzv> #-1
<dzv> #4294967297
apt-get has quit [Remote host closed the connection]
kgadek has joined #crystal-lang
<jokke> also any help with #1608 would be very appreciated
<DeBot> https://github.com/manastech/crystal/pull/1608 (add SliceIO Implementation with specs)
havenn has quit [Ping timeout: 260 seconds]
Tuxified has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DJ has quit [Quit: Leaving]
havenwood has joined #crystal-lang
<jokke> waj: i assume you're listening since you're commenting on github: i need your approval for #1602 and #1519
<DeBot> https://github.com/manastech/crystal/pull/1602 (add NetworkEndian alias to IO::ByteFormat) | https://github.com/manastech/crystal/pull/1519 (add real_path class method for File)
ql6wlld has joined #crystal-lang
vikaton has joined #crystal-lang
<ql6wlld> hey guys, has the RPM repo not been set to public? Browsing to http://dist.crystal-lang.org/rpm/ gives a 403 forbidden error
leafybas_ has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vcG7d
<crystal-gh> crystal/master 34ff8f0 Ary Borenszweig: Fixed `HTTP::Params.parse("")`
<rmosolgo> Can you expand a hash to named arguments?
ql6wlld has quit [Ping timeout: 244 seconds]
<jokke> rmosolgo: do you mean something like ruby's open struct?
<jokke> if so, you can do that with the method_missing macro
<rmosolgo> not quite
<rmosolgo> although method missing might do the job
<rmosolgo> the method signature might be
<rmosolgo> def do_something(name="", age=0)
<rmosolgo> and i have {name: "Gandalf", age: 100}
<rmosolgo> I want to call `do_something(name: "Gandalf", age: 100)`
<travis-ci> manastech/crystal#34ff8f0 (master - Fixed `HTTP::Params.parse("")`): The build passed. https://travis-ci.org/manastech/crystal/builds/82835370
<rmosolgo> in ruby you can just pass the hash `do_something(my_hash)` and it will treat the hash keys like kwargs
<rmosolgo> or python `do_something(**my_dict)`
havenwood has quit [Ping timeout: 256 seconds]
leafybasil has joined #crystal-lang
kulelu88 has quit [Quit: Leaving]
fowlduck has quit [Remote host closed the connection]
vifino has quit [Ping timeout: 246 seconds]
Mo0O has quit [Ping timeout: 246 seconds]
caryanne has quit [Ping timeout: 246 seconds]
caryanne has joined #crystal-lang
vifino has joined #crystal-lang
Mo0O has joined #crystal-lang
fowlduck has joined #crystal-lang
kgadek has quit [Quit: gone sleep]
nakilon has quit [Ping timeout: 264 seconds]
kgadek has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
<crystal-gh> [crystal] waj closed pull request #1602: add NetworkEndian alias to IO::ByteFormat (master...network-endian) http://git.io/vnxZM
<waj> jokke: I wasn't... I replied from my phone :)