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
<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?
<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.
<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
<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
<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)