ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.5 | Fund Crystal's 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
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
bjz has joined #crystal-lang
sz0 has joined #crystal-lang
snsei has joined #crystal-lang
Dreamer3 has quit [Ping timeout: 245 seconds]
Dreamer3 has joined #crystal-lang
pawnbox has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 268 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
snsei has quit [Remote host closed the connection]
crack08 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
<FromGitter> <jwoertink> Curious about a concept here. Would it be possible to include a C# library in Crystal?
<FromGitter> <jwoertink> I've been playing with Unity all week. I was just thinking how cool it would be if I was able to create a unity plugin in crystal
squeaky_pl has quit [Ping timeout: 260 seconds]
snsei has joined #crystal-lang
squeaky_pl has joined #crystal-lang
snsei has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
squeaky_pl has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<bmcginty_> jwoertink: I'm not familiar with c# or the mono? environment... I'm doing some research. Crystal can call anything with a c interface, and can export it's own functions to be called by c (or things at a low enough level to be seen as c, java native interface, for example).
<crystal-gh> [crystal] mverzilli closed pull request #3950: Makefile: allow overriding AR the same way CC/CXX can be overridden (master...master) https://git.io/vDJ1s
<travis-ci> crystal-lang/crystal#183fd6b (master - Makefile: allow overriding AR the same way CC/CXX can be overridden): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/202857228
snsei has joined #crystal-lang
<z64> hi all. i'm instancing a new IO::Memory from a String - does crystal prepend a BOM to the stream? i'm getting a single UInt8 value at the beginning of a piece of data I wasn't getting before in another lang
<z64> and i'm not sure what it is / where to find out
<FromGitter> <mverzilli> do you have some code to share?
<z64> sure, gimmie just a sec
<z64> no idea where that 194 value is supposed to be
<z64> \204 is 131 in base 10
snsei has quit [Remote host closed the connection]
<z64> *203
snsei has joined #crystal-lang
<FromGitter> <mverzilli> I think "\203" is octal
snsei has quit [Remote host closed the connection]
<z64> .. yes, it's octal
<z64> if you do this in ruby, if you read the *first* byte, you only get 131
<z64> (203 in base 10)
<z64> you can see i read *two* UInt8 values - the first being 194 - but that's not in my string
<FromGitter> <mverzilli> if you `puts "\203".chars` you get `['\u{83}']`
<z64> yes. which is 131 in base 10. that has nothing to do with my question.
<z64> you can even see there - you get a SINGLE Char in that array
<z64> but i'm *reading* TWO values
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <mverzilli> sorry, I'm just trying to figure out what's wrong as a sort of learning exercise
pawnbox has joined #crystal-lang
<FromGitter> <mverzilli> the equivalent for `\u{83}` is `194 131`
<z64> well that doesn't look like fun
<z64> sigh. well thanks for that link, i'll see what i have to do to resolve that.
<FromGitter> <mverzilli> Well it was fun for me! In case anyone struggles with encoding topics like me, here's what I learned today about how Strings work in Crystal: https://carc.in/#/r/1ne2. Everything is documented in the API reference, but sometimes going through in a single little snippet is easier.
Qchmqs has joined #crystal-lang
<FromGitter> <mverzilli> btw, in Ruby: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58a8004c00c00c3d4f5501d2]
<z64> heh
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
Qchmqs has quit [Quit: Konversation terminated!]
Qchmqs has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
Qchmqs has quit [Quit: Konversation terminated!]
Qchmqs has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
akwiatkowski has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crack08 has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
<FromGitter> <sdogruyol> I compiled Crystal with multicore support and run Kemal with success
<FromGitter> <sdogruyol> @ggiraldez i just reduced the scheduler threads to 4 (on a 2 core HT i5) and the throughput went from 10k to 40-50k
<FromGitter> <sdogruyol> This is on a simple Kemal app with no IO bounds
<FromGitter> <mverzilli> @sdogruyol cool!!
<FromGitter> <sdogruyol> it's pretty close to single-threaded performance as in master @mverzilli
<FromGitter> <mverzilli> yeah, and that is great at this stage :).
<FromGitter> <sdogruyol> yeah indeed
crack08 has quit [Quit: Textual IRC Client: www.textualapp.com]
bjz has joined #crystal-lang
bjz has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
squeaky_pl has joined #crystal-lang
<FromGitter> <sdogruyol> https://reviews.llvm.org/D29539
<FromGitter> <sdogruyol> lld is coming built-in with LLVM 4.0
bjz has quit [Ping timeout: 268 seconds]
bjz_ has joined #crystal-lang
<squeaky_pl> \o/
<Papierkorb> A recent issue on allowing `def foo(bar : A & B` to say "bar needs to include both A and B" made me think that maybe, we could also allow something like `def digest(data : .to_slice)` to say "data must respond to #to_slice". It would make it easier to read, not require modules for everything, and thus work with many things right away while providing useful user feedback instead of failing to compile some layers below where `data` is not
<Papierkorb> longer called that
<Papierkorb> Wondered if I should open a proposal Issue about it
<RX14> Papierkorb, but you can already do that simply by using .to_slice on the argument
<Papierkorb> In the methods body you mean?
<RX14> yep
<Papierkorb> That can be quite costly if it's not .to_slice but .do_something_expensive
<RX14> what?
<RX14> costly how?
<RX14> personally I think that only requiring 1 method on the argument is rare
<Papierkorb> I may not call the method right there, but in a different (private/internal) method
<RX14> and specifying ALL the methods you want to call on an object in a constructor is just too explicit
<Papierkorb> of course, it's not meant for cases where you need a ton of methods
<RX14> the benefits would be to have better error messages
<Papierkorb> the idea doesn't even restrict on method argument types either, it's for yes, better errors, and more self-descriptive prototypes
<RX14> bit I don't think crystal should become explicitly prototypical
<RX14> it's too far from ruby
<Papierkorb> As with most variable type declarations, it's entirely optional. I agree doing something like `foo(bar : Enumerable & .baz)` looks not only weird, but shouldn't be done
<RX14> it seems to me that adding this kind of stuff dilutes the language into a mess of features
<Papierkorb> it aims to avoid a mess of interface modules
<RX14> but we don't have a mess of interface modules
<RX14> go-style interfaces are another concept and another thing to learn that I think we just don't need
<Papierkorb> I'm basing it on the same argument the current `A & B` discussion issue does: We don't have a mess of interface modules, and we'd like to keep it that way
squeaky_pl has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] karlseguin opened pull request #4048: Add a explicit exception message when a nil regex capture group is accessed. (master...feature/nil_capture_message) https://git.io/vD72H
Qchmqs has quit [Ping timeout: 260 seconds]
snsei has joined #crystal-lang
<FromGitter> <sdogruyol> For anyone interested / using Kemal i've created a wiki page of current users https://github.com/kemalcr/kemal/wiki/Kemal-Users
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
<lhz> Are builds with crystal *nightly* on travis-ci supposed to be working? I am getting "crystal: command not found" for those builds.
snsei has quit [Remote host closed the connection]
<RX14> lhz, there isn't a crystal nightly
<RX14> (not yet at least)
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
snsei has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 260 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <chyzwar> yo, do you know who I can trace type signature during compile type
<FromGitter> <chyzwar> ?
<FromGitter> <chyzwar> I am looking to find why given instance variable type change
<FromGitter> <chyzwar> there is compiler out that I could try to parse
<RX14> you can use --nil-trace to find where nil came from
<lhz> RX14: Ok, then this info seems a bit premature: https://docs.travis-ci.com/user/languages/crystal/#Configuration-options
<RX14> yeha that doc is wrong
<BlaXpirit> RX14, why are you so sure about this? I think nightly worked, at least in the past
<RX14> because we don't have nightlies?
<crystal-gh> [crystal] asterite pushed 5 new commits to master: https://git.io/vD7Af
<crystal-gh> crystal/master 2c48394 Ary Borenszweig: String: make `to_slice` return a copy of the underlying bytes. Add `to_unsafe_slice` for an unsafe version....
<crystal-gh> crystal/master 50bc797 Ary Borenszweig: String: add hexbytes and hexbytes? (the opposite of Bytes#hexstring)
<crystal-gh> crystal/master b1f4a05 Ary Borenszweig: String: fix inconsistency introduced by lchomp. Fixes #3729...
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
<travis-ci> crystal-lang/crystal#e276338 (master - String: use replacement char when traversing an invalid UTF-8 byte sequence.): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/203036664
<FromGitter> <luislavena> RX14, BlaXpirit: we did have nightlies builds via jhass builds, but that has been broken for quite some time.
<RX14> oh...