ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.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
sustained has quit [Quit: Leaving]
michael_campbell has quit [Quit: ZNC 1.6.1 - http://znc.in]
poikon has joined #crystal-lang
<FromGitter> <redcodefinal> I like that its circularly compiled. Crystal is written in Crystal. Too neat.
pawnbox has joined #crystal-lang
<FromGitter> <redcodefinal> I've always taken issue with Ruby's internals because I don't know C well enough to make things work at that level. It's nice that I can just look at the language work in the language it's written in.
pawnbox has quit [Remote host closed the connection]
Fichtenstein has quit [Quit: Fichtenstein]
hako has quit [Ping timeout: 260 seconds]
hako has joined #crystal-lang
Philpax__ has joined #crystal-lang
Philpax_ has quit [Ping timeout: 260 seconds]
shawn42 has joined #crystal-lang
ponga has joined #crystal-lang
matp_ has joined #crystal-lang
matp has quit [Ping timeout: 250 seconds]
Raimondi has quit [Ping timeout: 244 seconds]
lacour has quit [Quit: Leaving]
kulelu88 has joined #crystal-lang
mark_66 has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
bjz has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
<FromGitter> <mverzilli> I used to think annotating return types when you know what you wanted to return was always a good idea, but in time I realized it's not. For each explicit type annotation you add to your code you loose a bit of polymorphism, which means in the future it'll be more cumbersome to refactor your code. The only situation where I think it's certainly advantageous is when you're writing boundary code: the top level facade for your
<FromGitter> ... lib's API, for example. There's no risk of "someone changing something down the road and then their stuff no longer works" when there's no return annotations. The compiler has your back on that.
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
sooli has joined #crystal-lang
<FromGitter> <mverzilli> This is a very interesting related reading: http://degoes.net/articles/insufficiently-polymorphic
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 265 seconds]
gloscombe has joined #crystal-lang
kulelu88 has quit [Quit: Leaving]
FromGitter has quit [Remote host closed the connection]
BlaXpirit has quit [Quit: Bye]
FromGitter has joined #crystal-lang
BlaXpirit has joined #crystal-lang
Philpax__ has quit [Ping timeout: 260 seconds]
Philpax__ has joined #crystal-lang
ponga has quit [Quit: Connection closed for inactivity]
Philpax_ has joined #crystal-lang
Philpax__ has quit [Ping timeout: 244 seconds]
Philpax_ has quit [Ping timeout: 260 seconds]
<jokke> hey
<FromGitter> <sdogruyol> hey
Philpax_ has joined #crystal-lang
<jokke> any idea what's happening here? https://p.jreinert.com/m-Z4eWbH/
<BlaXpirit> no
<jokke> hm
hako_ has joined #crystal-lang
avdi has quit [Ping timeout: 260 seconds]
CompanionCube has quit [Ping timeout: 260 seconds]
DeBot has quit [Ping timeout: 260 seconds]
jwaldrip has quit [Ping timeout: 260 seconds]
[spoiler] has quit [Ping timeout: 260 seconds]
hako has quit [Ping timeout: 260 seconds]
buggs has quit [Ping timeout: 260 seconds]
Philpax_ has quit [Quit: Leaving]
avdi has joined #crystal-lang
jwaldrip has joined #crystal-lang
[spoiler] has joined #crystal-lang
CompanionCube has joined #crystal-lang
buggs has joined #crystal-lang
<FromGitter> <benoist> https://github.com/benoist/terminal_table.cr :smile:
daekano has quit [Ping timeout: 260 seconds]
daekano has joined #crystal-lang
<FromGitter> <sdogruyol> @benoist useful!
<FromGitter> <sdogruyol> like it
<BlaXpirit> so i'm trying to use macros to write a line like this `@{{name}} : {{type}} | typeof({{default}}) = {{default}}` which ends up as something like `@password : String | typeof(nil) = nil` but Crystal says `can't use 'typeof' here`. is there any alternative?
<crystal-gh> [crystal] ysbaddaden opened pull request #3498: Fix: AArch64 context switch (master...fix-aarch64-context-switch-alignment) https://git.io/vXWns
sustained has joined #crystal-lang
DeBot has joined #crystal-lang
<FromGitter> <sdogruyol> ugh
<FromGitter> <sdogruyol> seems like i can't build master on OS X
<FromGitter> <sdogruyol> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=581c7ab845c9e3eb43f8e578]
Philpax has joined #crystal-lang
<BlaXpirit> RX14, what do you think about this special case `":john!~jsmith@example.com PRIVMSG #test :\u{1}ACTION test\u{1}"`- should it perhaps be made more convenient than just `@params=["#test", "\u{1}ACTION test\u{1}"]` in your fast_irc library?
<crystal-gh> [crystal] ysbaddaden pushed 1 new commit to master: https://git.io/vXW8b
<crystal-gh> crystal/master 00a9a8a Julien Portalier: Fix: AArch64 context switch (#3498)...
<travis-ci> crystal-lang/crystal#00a9a8a (master - Fix: AArch64 context switch (#3498)): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/173231160
<DeBot> https://github.com/crystal-lang/crystal/pull/3498 (Fix: AArch64 context switch)
sooli has quit [Ping timeout: 256 seconds]
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 268 seconds]
_whitelogger has quit [Ping timeout: 260 seconds]
_whitelogger has joined #crystal-lang
<FromGitter> <choallin> Hi guys! After reading "The book" I have a question about concurrency/parallelism. It is mentioned that real parallelism isn't availible yet and in the roadmap it is also not marked. Is there a priority for this? If so, are there any plans when this will be released/done? ⏎ I am talking a look to crystal because I want to implement a messaging server for several hundred users. Maybe more. Is crystal yet an option for such a
<FromGitter> ... use case or should I ditch it for now and use something else?
<crystal-gh> [crystal] sdogruyol opened pull request #3499: Fix wrong macro generation when LLVM --built-targets returns only one on OS X (master...master) https://git.io/vXWar
<FromGitter> <sdogruyol> @choallin it's ok for that
<BlaXpirit> choallin, concurrency works, you don't need parallelism for I/O bound applications
<FromGitter> <choallin> That's great to hear! :smile: Are there any tutorials that you would recommend for writing a http server?
<FromGitter> <sdogruyol> Use Kemal https://github.com/sdogruyol/kemal
<Papierkorb> choallin, do you want to write a http server, use one or are you looking for a web framework?
<FromGitter> <choallin> If it is not too hard I would like to use the http/server direct from the stdlib with middleware and several business objects.
<crystal-gh> [crystal] ysbaddaden pushed 1 new commit to master: https://git.io/vXWPh
<crystal-gh> crystal/master 4040a9f Serdar Dogruyol: Fix wrong macro generation when LLVM --built-targets returns only one result (#3499)
<FromGitter> <sdogruyol> It's not that hard
<FromGitter> <sdogruyol> Kemal is also great for middleware oriented architecture
<travis-ci> crystal-lang/crystal#4040a9f (master - Fix wrong macro generation when LLVM --built-targets returns only one result (#3499)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/173268357
<DeBot> https://github.com/crystal-lang/crystal/pull/3499 (Fix wrong macro generation when LLVM --built-targets returns only one on OS X)
pawnbox has joined #crystal-lang
<FromGitter> <philnash> Hey Crystal chat!
<FromGitter> <philnash> Just poking around the HTTP Server and I was wondering something.
<FromGitter> <benoist> Hey Phil :)
<FromGitter> <philnash> Why do we have the HTTP::Server::Context rather than simply passing a request and response object to a HTTP::Server::RequestProcessor?
<FromGitter> <philnash> `HTTP::Server.new(port) do |request, response|`
<FromGitter> <benoist> If i’m not mistaken this got changed recently to distinguish client request and responses vs server requests and responses
<Papierkorb> Why even separate the request and response?
<FromGitter> <benoist> I suppose because there is a lot of overlap between requests and responses for instance headers
<FromGitter> <philnash> It makes sense to have the two separate to me, I was just considering other environments (Node.js primarily)
<FromGitter> <benoist> you would have to do request_headers and response_headers instead of request.headers and response.headers
<FromGitter> <philnash> (I love how readable the standard lib source is btw :) )
<FromGitter> <benoist> Yeah having a std lib written in the same language is very nice (compared to ruby’s for instance)
<FromGitter> <philnash> I think Ruby's std lib is written in Ruby, just the core is C
<Papierkorb> it's so and so. Not big of a deal though if you're using Pry
<FromGitter> <benoist> it’s mixed a lot
<FromGitter> <benoist> thats what makes it a bit messy
<FromGitter> <philnash> Well, I've enjoyed peering through Crystal's so far.
<FromGitter> <benoist> Well we can finally send sms messages so thats enjoyable too :)
<Papierkorb> was always just a HTTP request away, so..
<FromGitter> <philnash> 🎉
<FromGitter> <philnash> I'm writing up making phone calls too right now. That's why I'm looking at the server for a bit.
<FromGitter> <philnash> Though will probably move fairly swiftly to Kemal for now.
<Papierkorb> What do you mean "making phone calls" - Are you implementing SIP+RTP, or WebRTC, or something else?
<FromGitter> <benoist> oh yeah thats definitly a good idea
<FromGitter> <philnash> Eww no :D with the Twilio API
<FromGitter> <benoist> kemal just makes it easier to get started
<FromGitter> <philnash> I mean, maybe one day, but this is a simple blog post
<FromGitter> <philnash> I wanted to show the HTTP::Server just because it is quite understandable. Then introduce shards and then Kemal
<FromGitter> <phoffer> You’re doing another blog post? I just read the sms one in fact :) Any thoughts of writing a client?
<FromGitter> <philnash> Yeah, trying to follow up on that one quickly
<FromGitter> <philnash> thanks for reading!
<FromGitter> <philnash> I'll probably start to put together a simple client
<crystal-gh> [crystal] jhass closed pull request #3480: Fix wrong result in YAML docs (master...patch-4) https://git.io/vXIqX
<FromGitter> <philnash> thing is, we have a ridiculous number of APIs these days :D
mark_66 has quit [Remote host closed the connection]
<FromGitter> <philnash> The internal teams have got around to generating our official clients using a tool they wrote and our own internal dictionary of the API methods
<FromGitter> <philnash> So building a fully featured one is hard work these days!
<FromGitter> <philnash> If there's any feedback on my blog post, I'd love to hear it btw
Philpax has quit [Ping timeout: 260 seconds]
<FromGitter> <phoffer> Cool, excited to see that post. I really liked the first, it includes a lot of little every day type things, posting a request, using basic auth, json mapping, etc. Great for people both familiar and not familiar with Crystal. One note, the `--release` got turned into a `—`. Just in case someone gets lazy as they follow along
<FromGitter> <philnash> argh! I saw that with `--version` too
<FromGitter> <philnash> damn WordPress
<FromGitter> <philnash> Fixed, thanks!
<FromGitter> <phoffer> Great idea to make a repo out of that too
<Papierkorb> Could we add scheme question methods for popular ones, like HTTP(s), mailto, tcp, ...?
<Papierkorb> to URI *
<travis-ci> crystal-lang/crystal#956d212 (master - Merge pull request #3480 from hugoabonizio/patch-4): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/173292208
<DeBot> https://github.com/crystal-lang/crystal/pull/3480 (Fix wrong result in YAML docs)
matp_ is now known as matp
<crystal-gh> [crystal] tbrand opened pull request #3501: Implementation of Array.nitems (master...master) https://git.io/vXWj6
optikfluffel has joined #crystal-lang
<crystal-gh> [crystal] tbrand closed pull request #3501: Implementation of Array.nitems (master...master) https://git.io/vXWj6
<Papierkorb> How do I correctly wait for a UDP datagram to arrive on a #connect'ed UDPSocket with a timeout?
<Papierkorb> I can do the ol' spawn{ ch.send socket.read } with a timeout fiber, but if the timeout triggers the #read fiber keeps running forever :(
<Papierkorb> IO.select to the rescue
<FromGitter> <jwoertink> What would be an example of why you would want to use a `record`?
<FromGitter> <johnjansen> record?
<BlaXpirit> jwoertink, it's just to avoid boilerplate. it gives a lot out of the box
<BlaXpirit> struct with fields and types, all corresponding properties, initialize with optional defaults, equals+hash
optikfluffel has quit [Read error: Connection reset by peer]
<FromGitter> <jwoertink> So a record has to match up with some defined struct?
<Yxhuvud> it also was a tuple replacement before we had those
<BlaXpirit> jwoertink, `record` is literally a macro that writes out `struct` and the `initialize` and a bunch of `property`s
<FromGitter> <jwoertink> ah
<FromGitter> <jwoertink> Ok, that makes sense then
<FromGitter> <jwoertink> thanks
sustained has quit [Ping timeout: 265 seconds]
<FromGitter> <philnash> Is it better to use `shards install` or `crystal deps`?
<FromGitter> <philnash> Oh, `crystal deps` delegates to `shards install`
<FromGitter> <philnash> I'll stick with shards
<FromGitter> <benoist> well crystal deps is included when you install crystal
<FromGitter> <philnash> isn't shards included when you install crystal?
<FromGitter> <benoist> yeah thats what I meant :)
<FromGitter> <philnash> So we're all correct! Good stuff!
Fichtenstein has joined #crystal-lang
Raimondi has quit [Write error: Broken pipe]
Raimondi^1 has joined #crystal-lang
Raimondi^1 is now known as Raimondi
Raimondi has quit [Write error: Broken pipe]
Raimondi has joined #crystal-lang
gloscombe has quit [Remote host closed the connection]
_whitelogger has quit [K-Lined]
_whitelogger has joined #crystal-lang
<BlaXpirit> johnjansen, well what do you want to do with the file? is it really text with malformed utf-8 or just random bytes
<FromGitter> <johnjansen> @BlaXpirit i think its UTF16 actually
<BlaXpirit> ..
<FromGitter> <johnjansen> those are the first 2 bytes of the file
<BlaXpirit> johnjansen, yep seems like it
<FromGitter> <johnjansen> so im trying to find a parsing approach ...
<BlaXpirit> well everything in the File class has an encoding argument, so use it
<FromGitter> <johnjansen> bloody hell … always the obvious ;-)
<FromGitter> <johnjansen> thats the problem with looking but not seeing
emancu has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<FromGitter> <johnjansen> You know, this is an excellent community, everyone here is so helpful. Crystal is a beautiful language, but the community really makes the experience wonderful, so thanks to everyone !!
<FromGitter> <redcodefinal> @johnjansen Yeah it's nice, I wrote an alpha transparency paste for stumpy_png and wrote a pull request for it and the dude who wrote the shard wrote a big thing of fixes and refactoring changes I can do for it. Plus the people here are very nice. It is great since we don't have the kind of online resources that other languages have right now, so the community is the best information source.
[spoiler] has quit [Ping timeout: 244 seconds]
jeromegn__ has joined #crystal-lang
jeromegn_ has quit [Read error: Connection reset by peer]
jeromegn__ is now known as jeromegn_
greenbigfrog has quit [Remote host closed the connection]
greenbigfrog has joined #crystal-lang
greenbigfrog has joined #crystal-lang
greenbigfrog has quit [Changing host]
[spoiler] has joined #crystal-lang
lacour has joined #crystal-lang
<FromGitter> <redcodefinal> Hey quick question. I'm writing some new features into stumpy_png via stumpy_core (https://github.com/redcodefinal/stumpy_core) and I need to test it with stumpy_png. If I write this into my shard.yml, will it overwrite l3kn's stumpy_core with mine? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=581cf8fd6cb7207630389a1f]
<BlaXpirit> redcodefinal, hm i dont know. certainly a weird/interesting case. try and report results :p
<FromGitter> <redcodefinal> I did and unfortunately it doesnt work
bjz has joined #crystal-lang
<FromGitter> <redcodefinal> luckily you can just delete the stumpy_core it gets from l3kn and replace it with my own
A124 has quit [Quit: '']
A124 has joined #crystal-lang
emancu has quit []
momon has joined #crystal-lang
<Papierkorb> Is there a way (a shard?) to mock HTTP, TCP and UDP connections?
<Papierkorb> ah, webmock.cr
onethirtyfive has joined #crystal-lang
onethirtyfive has quit [Remote host closed the connection]
sustained has joined #crystal-lang
sustained has joined #crystal-lang
sustained has quit [Changing host]
onethirtyfive has joined #crystal-lang
sustained has quit [Max SendQ exceeded]
sustained has joined #crystal-lang
sustained has quit [Read error: Connection reset by peer]
sustained has joined #crystal-lang
onethirtyfive has quit [Ping timeout: 260 seconds]
momon has quit [Quit: Leaving]
sustained has quit [Quit: Leaving]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fichtenstein has quit [Quit: Fichtenstein]
shawn42 has quit [Quit: Connection closed for inactivity]