jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.17.4 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
vikaton has joined #crystal-lang
A124 has quit [Remote host closed the connection]
A124 has joined #crystal-lang
Philpax has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #2761: Inherit class vars (only their type, not their value) (master...feature/class_vars) https://git.io/voJKe
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/voJKU
<crystal-gh> crystal/master ebd4f3e Celso Fernandes: Fix problem of XML parsing empty html string. Fixes #2752...
<crystal-gh> crystal/master cb9a293 Ary Borenszweig: Merge pull request #2759 from fernandes/fix/xml_parse_empty_string...
<bjhaid> If I wanted to construct a binary protocol that will be shipped over tcp, what should I use, are there pointers that I can learn how to get it done from?
<travis-ci> crystal-lang/crystal#cb9a293 (master - Merge pull request #2759 from fernandes/fix/xml_parse_empty_string): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/135490648
fridgerator has joined #crystal-lang
matp has quit [Ping timeout: 252 seconds]
matp has joined #crystal-lang
vikaton has quit [Quit: Connection closed for inactivity]
fridgerator has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
mark_66 has joined #crystal-lang
snsei has joined #crystal-lang
icezimm has quit [Quit: Leaving.]
sdogruyol has joined #crystal-lang
zodiak has quit [Ping timeout: 260 seconds]
<sdogruyol> have a nice week everyone!
zodiak has joined #crystal-lang
snsei has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
vikaton has joined #crystal-lang
<vikaton> How's Crystal doing? :P
bjz has joined #crystal-lang
Raimondii has joined #crystal-lang
bjz has quit [Client Quit]
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
bjz has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
<jhass> bjhaid: by now quite some docs already do have usage examples, feel free to contribute though! Regarding a binary protocol you should look into `IO#read_bytes` and `IO#write_bytes`
<jhass> vikaton: very well
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 244 seconds]
<sdogruyol> vikaton: going strong
trapped has joined #crystal-lang
steenuil has quit [Ping timeout: 272 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Raimondii has joined #crystal-lang
pawnbox_ has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 258 seconds]
vikaton has joined #crystal-lang
Raimondii is now known as Raimondi
<bjhaid> jhass: thanks!
pawnbox_ has quit [Remote host closed the connection]
bjhaid has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
icezimm has joined #crystal-lang
paulcsmith_ has joined #crystal-lang
bjhaid has joined #crystal-lang
bjhaid has quit [Ping timeout: 250 seconds]
trapped_ has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
trapped_ has quit [Read error: Connection reset by peer]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/voUHx
<crystal-gh> crystal/master 5bf717e Ary Borenszweig: Make the `T` in a Proc accessible as a tuple
<crystal-gh> crystal/master 96efa7d Ary Borenszweig: Added `Proc#partial` (partial application)
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
paulcsmith_ has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<travis-ci> crystal-lang/crystal#96efa7d (master - Added `Proc#partial` (partial application)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/135618569
snsei has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 252 seconds]
snsei has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/voUpW
<crystal-gh> crystal/master e4a15be Ary Borenszweig: Compiler: refactor, use "proc" instead of "fun" where applicable
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
<travis-ci> crystal-lang/crystal#e4a15be (master - Compiler: refactor, use "proc" instead of "fun" where applicable): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/135631319
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/voTIk
<crystal-gh> crystal/master 2a023e1 Ary Borenszweig: Compiler: give error on triple single quote, was parsing well
<crystal-gh> crystal/master ff006ff Ary Borenszweig: Compiler: give error on `Pointer.allocate`
sdogruyol has quit [Quit: Connection closed for inactivity]
paulcsmith_ has joined #crystal-lang
Raimondii has joined #crystal-lang
<travis-ci> crystal-lang/crystal#ff006ff (master - Compiler: give error on `Pointer.allocate`): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/135644723
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
Raimondii has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 4 new commits to master: https://git.io/voTOD
<crystal-gh> crystal/master 2e43c5c Ary Borenszweig: Forward double splat in a few methods
<crystal-gh> crystal/master 5e8aaac Ary Borenszweig: Fixed #2764: Method with splat and optional named argument doesn't match zero args call
<crystal-gh> crystal/master d9b7825 Ary Borenszweig: Fixed #2765: Default value is allowed for a splat argument or double splat argument
Raimondi has quit [Ping timeout: 240 seconds]
P_raimondii has joined #crystal-lang
Raimondii has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/voT3r
<crystal-gh> crystal/master 251694d Ary Borenszweig: Add convenience JSON.mapping and YAML.mapping macros that accept named arguments. Fixes #2756
P_raimondii is now known as Raimondi
Raimondi is now known as Raimondii
zodiak has quit [Read error: Connection reset by peer]
zodiak_ has joined #crystal-lang
Raimondii is now known as Raimondi
<travis-ci> crystal-lang/crystal#251694d (master - Add convenience JSON.mapping and YAML.mapping macros that accept named arguments. Fixes #2756): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/135655388
TheLemonMan has joined #crystal-lang
maxpowa has quit [Ping timeout: 260 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
ryanw-se has joined #crystal-lang
maxpowa has joined #crystal-lang
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Raimondii has joined #crystal-lang
Raimondi has quit [Read error: Connection reset by peer]
paulcsmith_ has joined #crystal-lang
Raimondii is now known as Raimondi
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/voTrH
<crystal-gh> crystal/master 1749358 Ary Borenszweig: Experimental support for splat in generic type arguments. Fixes #2754
<jhass> <3
srabuini has quit [Read error: Connection reset by peer]
sebasr has joined #crystal-lang
vikaton has quit [Quit: Connection closed for inactivity]
kulelu88 has joined #crystal-lang
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
paulcsmith_ has joined #crystal-lang
<asterite> jhass: don't you hate it when a language uses tricks that you can't express with syntax? :-P
<jhass> totally <3
<asterite> I think that's what makes Ruby so nice. Like, yes, some things are implemented in C, but you could reimplement almost everything in Ruby
<jhass> indeed
<jhass> I guess we indeed should have the same stuff for double splat/named tuple, but I can't come up with a valid usecase to motivate it
<asterite> Yes... in fact, I originally though it wasn't useful for single splat, until you mentioned Enumerable
<asterite> and then we could also have CurriedProc if we wanted
<jhass> it only clicked for me that day too actually
<jhass> that it would solve the Enumerable problem eventually
paulcsmith_ has quit [Client Quit]
<asterite> It was always a conflict in my mind... because I imagined we would need splat in yield and splat in block args to do it, but I couldn't express the T in Enumerable
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<asterite> I also didn't know how to express the ugly `include Enumerable(...)` in Tuple in another way, until Brian mentioned splats
<asterite> well, and it happened that we added Union recently, so then it clicked
<jhass> :)
<BlaXpirit> uhm the excitement sounds nice but I can't quite grasp what you're talking about
<asterite> :-D
<asterite> We'll be able to make Hash be an Enumerable
<jhass> BlaXpirit: simply put, a generic can now take a variable number of type arguments
paulcsmith_ has joined #crystal-lang
TheLemonMan has joined #crystal-lang
<BlaXpirit> thanks
<asterite> It was already possible, you can do Proc(Int32, Float64), Tuple(A, B, C), etc... but you couldn't use it in your own types
<jhass> mh, is Foo(*T, U) and Foo(T, *U) okay already?
<jhass> now that you mention Proc
<jhass> which is actually Proc(*T, R) now that I look at it
<jhass> with *T being 0 or more, not one or more
TheLemonMan has quit [Client Quit]
TheLemonMan has joined #crystal-lang
<jhass> ah I see he answer is no
TheLemonMan has quit [Client Quit]
<jhass> might be something for the todo list :)
paulcsmith_ has quit [Client Quit]
<asterite> Yes, I think we can make it work, should be relatively simple... mmm... in fact, instead of having a "variadic" flag it should be a "splat index" and then it will more or less work
<asterite> I'll try that too, one of these days
<asterite> representing Proc like that is better
<jhass> yay this feels like an important step in the language :)
<asterite> yeah, it de-hardcodes some things... or at least it feels like that
<jhass> exactly
TheLemonMan has joined #crystal-lang
<jhass> is variadic generics even something other languages have at all?
<jhass> I see a rust RFC
<asterite> I don't know if other statically typed languages have something similar
<asterite> Rust doesn't have regular variadic arguments, nor overloads, nor named arguments
<asterite> they are pretty conservative about this stuff
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
paulcsmith_ has joined #crystal-lang
<jhass> they mostly compare it to C++ template stuff in the RFC discussion
TheLemonMan has joined #crystal-lang
<asterite> Seems so. D has something similar: https://dlang.org/variadic-function-templates.html
ozra_ has joined #crystal-lang
<jhass> I also see several people trying to find workarounds for C#
<asterite> I think the difference in Crystal is that the type argument are carried with the type. In D and C++ they are only available in the template.
<jhass> yeah
<jhass> Nim has an RFC too
kulelu88 has left #crystal-lang ["Leaving"]
<asterite> Most languages end up with this: https://doc.rust-lang.org/std/primitive.tuple.html
<jhass> found a thread where Swift users wish for it
<jhass> could become a selling point even :)
<asterite> Well, for a more functional or theoretical audience it will be awesome, I think
<asterite> Gotta go, talk to you tomorrow :-)
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/voTD4
<crystal-gh> crystal/master 3d20332 Ary Borenszweig: Fix incorrect type generated for `Union(...)`
vikaton has joined #crystal-lang
<jhass> hf and thanks
Raimondi has quit [Remote host closed the connection]
Raimondii has joined #crystal-lang
Raimondii is now known as Raimondi
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<icezimm> if you use ctags, and would like to see support on crystal, please give your thoughts on this issue: https://github.com/crystal-lang/crystal/issues/2768
<travis-ci> crystal-lang/crystal#3d20332 (master - Fix incorrect type generated for `Union(...)`): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/135698999
paulcsmith_ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
ruslux has joined #crystal-lang
<ruslux> Hello!
<wmoxam> hi!
pawnbox has joined #crystal-lang
<ruslux> Where I can read more about TCPSocket and examples?
<ruslux> I try learn Api, but understand
<jhass> ^ and http://crystal-lang.org/api/TCPSocket.html that's all, perhaps we can answer your question?
<ruslux> Oh, thanks!
<ruslux> Api is empty. Only link to sources
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> well nobody wrote extensive docs for it yet, but it's fairly obvious if you've seen a socket API before IMO :)
<jhass> note that most useful functionality comes via the IO include
<jhass> and again, if you have a specific question, just ask
<ruslux> Ssory, I am django-monkey, first try network. How i can read N-bytes from socket?
<ruslux> Must I read slice, and then convert to io?
<jhass> do the bytes represent anything specific?
<jhass> like a 64 bit signed integer?
<ruslux> *prehistory* I am try write mongodb driver over mongo-wire-protocol, and find elegant method to read data of different types successively
<ruslux> consistent*
<jhass> ah, rather than binding to libmongoc?
<jhass> http://crystal-lang.org/api/IO.html#read_bytes%28type%2Cformat%3AIO%3A%3AByteFormat%3D%3Cspanclass%3D%22t%22%3EIO%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EByteFormat%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3ESystemEndian%3C%2Fspan%3E%29-instance-method might come in handy
<jhass> socket.read_bytes(Int64).class #=> Int64
<ruslux> Oh, I am confused. I seen mongo.cr, but missed libmongoc
<jhass> mongo.cr does bind libmongoc :)
<jhass> ruslux: btw crystal-pg might have some inspiration for API design, especially since it implements postgres wire protocol too by now
<ruslux> I doubted. Maybe crystaceans not require yet another mongo-lib...
<jhass> mongo.cr looks a bit dead tbh
<ruslux> Anyway, the night brings counsel. Goodnight, crystaceans! (\/)o.O(\/)
ruslux has quit [Quit: Page closed]
snsei has joined #crystal-lang
pawnbox has quit [Ping timeout: 258 seconds]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
crystal-lang451 has joined #crystal-lang
soveran has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
paulcsmith_ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
paulcsmith_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ryanw-se has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has joined #crystal-lang
P_raimondii has joined #crystal-lang
Philpax has quit [Ping timeout: 252 seconds]
triangles3 has joined #crystal-lang
Raimondi has quit [Ping timeout: 250 seconds]
triangles2 has quit [Ping timeout: 244 seconds]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
bjz has joined #crystal-lang
P_raimondii is now known as Raimondi
Raimondi is now known as Raimondii
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Raimondii is now known as Raimondi
soveran has quit [Remote host closed the connection]
crystal-lang451 has quit [Ping timeout: 250 seconds]