RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.0 | 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
shawn42 has joined #crystal-lang
ssvb has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 264 seconds]
gewo has quit [Ping timeout: 244 seconds]
pduncan has joined #crystal-lang
kulelu88 has left #crystal-lang ["Leaving"]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 260 seconds]
Raimondii is now known as Raimondi
mgarciaisaia has joined #crystal-lang
gewo has joined #crystal-lang
pduncan has quit [Ping timeout: 245 seconds]
mgarciaisaia has quit [Read error: Connection reset by peer]
mgarciaisaia has joined #crystal-lang
<FromGitter> <maiha_twitter> @drosehn Need some library ?Pushed my image here. https://github.com/maiha/lmdb.cr
pawnbox has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 248 seconds]
ome has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
Philpax has quit [Ping timeout: 268 seconds]
bjz has joined #crystal-lang
poikon has quit [Ping timeout: 250 seconds]
poikon has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
pawnbox has quit [Remote host closed the connection]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 248 seconds]
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #3573: Avoid TODO in option_parser.cr (master...fix/optparse-todo) https://git.io/v1fcC
<crystal-gh> [crystal] MakeNowJust opened pull request #3574: Fix indentation of Makefile (master...fix/makefile-indent) https://git.io/v1fcw
akwiatkowski has joined #crystal-lang
mark_66 has joined #crystal-lang
coderobe has quit [Ping timeout: 250 seconds]
<FromGitter> <crisward> Been trying to create mocks for a test, but the type system seems to get in the way. Is it possible to patch a class method, then restore it after my test?
ome has quit [Quit: Connection closed for inactivity]
gloscombe has joined #crystal-lang
optikfluffel has joined #crystal-lang
<BlaXpirit> crisward, not possible
<FromGitter> <yxhuvud> Hmm, I'm parsing the contents of a ZLib::Inflator. Is there any way to see if the end of the stream has been reached?
<FromGitter> <crisward> @BlaXpirit I have one class, which instantiates another, then calls a method on it. I want the second classes method to be mocked and to intercept the calling arguments. I can pass an instance of class1 to class2 if it helps, but if I use a mocking library the mock is of the wrong type. Any suggestions?
<FromGitter> <yxhuvud> I mean, I can catch IO::EOFError, but using exceptions for handling regular operations seems wrong.
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
optikfluffel has joined #crystal-lang
<BlaXpirit> https://crystal-lang.org/api/0.20.0/IO.html#read%28slice%3ASlice%28UInt8%29%29-instance-method 0 -> EOF
<BlaXpirit> crisward, use a subclass
Nik736 has joined #crystal-lang
<FromGitter> <yxhuvud> blaxpirit: The problem is that I don't use read. I use Int64.from_io(io, IO::ByteFormat::BigEndian)
<BlaXpirit> yxhuvud, well if you use this, you dont really expect the end of file, so dont worry about using an exception
<BlaXpirit> or you could decode int64 from slice
<BlaXpirit> that was recently added
<FromGitter> <crisward> @BlaXpirit Thanks... that seems to be working
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
A124 has quit [Quit: '']
A124 has joined #crystal-lang
optikfluffel has joined #crystal-lang
Philpax has joined #crystal-lang
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
Philpax has joined #crystal-lang
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
soveran has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/v1fMT
<crystal-gh> crystal/master 446dffa TSUYUSATO Kitsune: Fix indentation
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/v1fMI
<crystal-gh> crystal/master c954969 TSUYUSATO Kitsune: Avoid TODO...
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/v1fMp
<crystal-gh> crystal/master d13e650 Ary Borenszweig: Spec: allow running single spec by specifying any line inside an `it` call, using __END_LINE__. Related to #3552
byte512 has joined #crystal-lang
gloscombe has quit [Ping timeout: 260 seconds]
gloscombe has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
byte512 has quit [Ping timeout: 268 seconds]
optikfluffel has joined #crystal-lang
emancu has joined #crystal-lang
gloscombe has quit [Remote host closed the connection]
byte512 has joined #crystal-lang
gloscombe has joined #crystal-lang
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
<travis-ci> crystal-lang/crystal#d13e650 (master - Spec: allow running single spec by specifying any line inside an `it` call, using __END_LINE__. Related to #3552): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/178573538
<DeBot> https://github.com/crystal-lang/crystal/issues/3552 (feature request: add __END_LINE__ magic constant)
Philpax has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Client Quit]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Client Quit]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Client Quit]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
akwiatkowski has quit [Ping timeout: 264 seconds]
Nik736 has quit [Quit: Textual IRC Client: www.textualapp.com]
<crystal-gh> [crystal] Sija opened pull request #3575: Uncomment atomic_spec.cr (master...atomic-spec-todo) https://git.io/v1fNT
<crystal-gh> [crystal] Sija opened pull request #3576: Ditch code scheduled for removal after 0.19 (master...misc-todo) https://git.io/v1fN4
gloscombe has quit [Read error: Connection reset by peer]
gloscombe has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #3577: Refactor interpret '==' and '!=' of MacroId (master...fix/macroid-eq-neq) https://git.io/v1fxL
optikfluffel has joined #crystal-lang
pawnbox has joined #crystal-lang
<Papierkorb> Looks like the line number decoder doesn't like an OOM condition: https://gist.github.com/Papierkorb/72db6f9ea7fd3b2147f7a82b959e780c#file-gistfile1-txt-L28
w400z has quit [Read error: Connection reset by peer]
Nik736 has joined #crystal-lang
emancu has quit []
<FromGitter> <luislavena> @Papierkorb did you compile with `--debug`?
shawn42 has quit [Quit: Connection closed for inactivity]
<Papierkorb> I simply ran it with no flags
<FromGitter> <yxhuvud> perhaps debug should be default if the release flag isn't given?
akwiatkowski has joined #crystal-lang
<FromGitter> <luislavena> @Papierkorb default build does not include debug symbols required to extract file/line numbers
<Papierkorb> That'd be fine, though the code for it still crashes (well, the crash was inevitable at this point, so not big issue in itself)
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Ping timeout: 248 seconds]
<Papierkorb> > Bug: called llvm_struct_type for (Torrent::Dht::Structure::Error | Torrent::Dht::Structure::Query | Torrent::Dht::Structure::Response)
<Papierkorb> Hah I broke it
mark_66 has quit [Remote host closed the connection]
<Papierkorb> And this time I can even reproduce it, nice
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 244 seconds]
<FromGitter> <iVAN2002> Hi there! I have very important question. Crystal is mangling function names?
<BlaXpirit> iVAN2002, I don't see why that is important. probably yes. now what's the actual question?
<Papierkorb> Without crystal wouldn't be able to offer overloading, the mechanism is similar to what C++ does, altough the mangled function names are easier to read
<FromGitter> <iVAN2002> I just want to start developing OS on Crystal (crazy idea, you know) and asm file cant find function cr_main.
<Papierkorb> Out of experience, I can say: Crystal is *not* useful to build an OS, although it's possible
<FromGitter> <iVAN2002> Sorry, linker can't find function cr_main.
<BlaXpirit> the function is called `main`
<Papierkorb> iVAN2002, you'll want to strip almost anything for the start anyway
<Papierkorb> "--prelude empty.cr" is your friend
<Papierkorb> get it to run, and then add classes one by one. Forget about `String` though, copy the class over and remove all mentions of `IO` and `Char::Reader`
<FromGitter> <iVAN2002> @FromIRC Hmm, i'll check it out.
<Papierkorb> Garbage collection isn't available either of course, except if you get the boehmgc compiled for that, in this case I'd be interested how you did it
<FromGitter> <iVAN2002> module Crystalx ⏎ VERSION = "0.1.0" ⏎ end
<FromGitter> <iVAN2002> oh ok
<RX14> @iVAN2002 have you ever built an OS before?
<FromGitter> <iVAN2002> yes
<RX14> cool
<RX14> to answer the actual question, you can generate unmangled functions
<RX14> you do it like `fun main = main(argc : Int32, argv : UInt8**)`
<RX14> weell actually
<RX14> no
<RX14> thats a terrible example
<FromGitter> <iVAN2002> thanks a lot
<RX14> essentially just use fun instead of def
<RX14> and you get unmangled
<FromGitter> <iVAN2002> ```module Crystalx ⏎ VERSION = "0.1.0" ⏎ end``` ⏎ ⏎ And this part can be removed? [https://gitter.im/crystal-lang/crystal?at=5837274f8d65e3830e9684b6]
<RX14> that "empty" prelude requires "primitives" which is pretty much the only bit of the stdlib you'll want to use when developing an OS
<RX14> the __crystal_main function is special and generated by the compiler
<RX14> it contains code for global and class variable initializers, and top-level code
<RX14> @iVAN2002 well I guess it can but why do you ask?
<FromGitter> <iVAN2002> I just recently learned the language. And as soon as I learned its basics I really liked it
<FromGitter> <iVAN2002> I learned about this language literally 2 days ago.
<RX14> and you want to write an OS in it after only 2 days? Sounds like tough going!
<FromGitter> <iVAN2002> I'm going to do Hello World.
<FromGitter> <iVAN2002> But on the scale of OS
<BlaXpirit> hard to find a worse way to get familiar with a language
<FromGitter> <sdogruyol> @iVAN2002 check this https://github.com/lbguilherme/os-crystal
<FromGitter> <iVAN2002> I was already acquainted with the language and even managed to write a bot for Discord.
<FromGitter> <iVAN2002> wow
hako_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox_ has joined #crystal-lang
gloscombe has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 248 seconds]
<FromGitter> <iVAN2002> ```Error: Invalid option: -m32```
<Papierkorb> Looks like I should publish my PoC kernel .. although it is abandoned and I won't work on it anymore
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
mati_urunda has joined #crystal-lang
pawnbox_ has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
byte512 has quit [Ping timeout: 248 seconds]
Ven has joined #crystal-lang
Ven is now known as ven
pawnbox has quit [Remote host closed the connection]
ven has quit [Read error: Connection reset by peer]
ven has joined #crystal-lang
Renich has quit [Quit: leaving]
ven has quit [Ping timeout: 256 seconds]
ven has joined #crystal-lang
Ven_ has joined #crystal-lang
ven has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
Ven_ has quit [Read error: Connection reset by peer]
ven has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
ven has quit [Read error: Connection reset by peer]
ven has joined #crystal-lang
ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mgarciaisaia has quit [Ping timeout: 244 seconds]
mgarciaisaia has joined #crystal-lang
Philpax has joined #crystal-lang
mgarciaisaia has quit [Read error: Connection reset by peer]
akwiatkowski has quit [Ping timeout: 264 seconds]
soveran has quit [Remote host closed the connection]
vikaton has joined #crystal-lang
Philpax has quit [Quit: Leaving]
mgarciaisaia has joined #crystal-lang
Nik736 has quit [Quit: Textual IRC Client: www.textualapp.com]