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
mati_urunda has quit [Ping timeout: 256 seconds]
matp has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
_whitelogger has joined #crystal-lang
zacts has joined #crystal-lang
<zacts> how does crystal lang compare with mruby?
<tilpner> In what aspects?
<zacts> tilpner: aren't both ruby-like and they both compile to binaries?
<tilpner> zacts - AFAICT mruby can only compile to bytecode while Crystal compiles to native executables
<zacts> oh I see
<zacts> cool
<zacts> that answers my question, I'll investigate specifically though
<zacts> oh I see: "You can also compile Ruby programs into compiled byte code using the mruby compiler "mrbc". All those tools reside in the "bin" directory. "mrbc" is also able to generate compiled byte code in a C source file, see the "mrbtest" program under the "test" directory for an example."
<zacts> ^ from the github readme.md
<zacts> it looks like you can compile to a binary via C as an IR
<zacts> it will compile to C code
<zacts> I think Chicken Scheme does this as well (compiles to C)
<zacts> as a random side note, that is
<zacts> anyway, this crystal-lang sounds really promising
<tilpner> There's a difference here: Chicken and Crystal compile the source code to C, mruby compiles the source code to bytecode that happens to be represented as C.
<tilpner> The bytecode will still need interpretation
<zacts> ah ok
<zacts> tilpner: so Crystal does use C as an IR as well?
<tilpner> No, it uses LLVM to compile directly to native code (x86*, etc.). The crystal front-end compiles only to LLVM-IR, then LLVM takes care of the rest
<tilpner> Sorry, I didn't realise I included Crystal above. It does not compile to C.
<zacts> ah ok
<zacts> neat
<tilpner> I think I meant to say "Chicken and Crystal compile to the source to native code"
<tilpner> Though via different IRs
<zacts> oh cool, yeah
<zacts> :-)
<zacts> how does crystal handle concurrency?
<zacts> nice, thanks
mgarciaisaia has quit [Ping timeout: 260 seconds]
matp has joined #crystal-lang
_whitelogger has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
<zacts> hello
<zacts> so I'm thinking of using crystal-lang for a couple of simple utilies
<zacts> for this gnu/linux distro: http://dragora.org
<zacts> it's a slackwareesque distro
<zacts> and the tools will help manage packages on this system
<zacts> the problem with using plain ruby for it, is the need to install 3rd party gems. I'm assuming that I can statically link libraries into a crystal app?
<zacts> ruby apps are more difficult to package as well, it seems
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
byte512 has joined #crystal-lang
pawnbox has joined #crystal-lang
<BlaXpirit> zacts, statically linking is not widely used or well explained but it has been done
<BlaXpirit> worth noting that Crystal programs depend on multiple external libraries like PCRE, GC
<BlaXpirit> other than that, everything is great
<zacts> ah ok
<zacts> pcre and gc is fine
<zacts> I mean crystal implemented libraries / gems
<zacts> can those easily be statically linked?
<zacts> similar to how Go can statically link Go libraries into a single binary
<BlaXpirit> zacts, crystal does not link to crystal, it basically puts all source code together and compiles
<zacts> otherwise, if I can somehow not have to `gem install` each library to package it
<zacts> ah nice ok
<zacts> so it all becomes a single binary in the end
<zacts> I just want a single binary for my cli tool
<BlaXpirit> crystal can link to C FFI though. both use it and produce unmangled function names
<zacts> but I want to utilize several crystal libraries, for example
<BlaXpirit> yes it compiles to 1 executable
<zacts> cool cool
<zacts> thanks! :-)
<zacts> so, I think crystal will work perfect for my usecase
<zacts> nice
<zacts> I just compiled my first hello.cr program! :-)
<zacts> I like this
<zacts> crystal build hello.cr --release
<zacts> and I can just crystal run hello.cr
mgarciaisaia has quit [Quit: Leaving.]
<zacts> ok
<zacts> are there emacs / vim syntax files?
<zacts> so I can syntax highlight?
<BlaXpirit> i dunno, search for it. vim is present, pretty sure
<wmoxam> is there a script that packages releases?
<wmoxam> I noticed the latest crystal release didn't include BSD versions
<zacts> cool thanks
vikaton has quit [Quit: Connection closed for inactivity]
<wmoxam> zacts: that's probably the best list of crystal stuff in general
<zacts> thanks
Philpax has quit [Ping timeout: 268 seconds]
byte512 has quit [Quit: WeeChat 1.6]
tomchapin has joined #crystal-lang
tomchapin has quit [Client Quit]
zacts has quit [Ping timeout: 256 seconds]
ome has joined #crystal-lang
zacts has joined #crystal-lang
akwiatkowski has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
bjz has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 264 seconds]
soveran has quit [Remote host closed the connection]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
soveran has quit [Remote host closed the connection]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
Philpax has joined #crystal-lang
mark_66 has joined #crystal-lang
ome has quit [Quit: Connection closed for inactivity]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Nik736 has joined #crystal-lang
tankfeeder has joined #crystal-lang
<tankfeeder> morning
tankfeeder has quit [Quit: Leaving]
Ven has joined #crystal-lang
bjz has joined #crystal-lang
gloscombe has joined #crystal-lang
<Yxhuvud> there is an emacs package but there is noone has put it in a package repository since they don't think it is good enough
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
krsh_ has joined #crystal-lang
matp has quit [Quit: ZZzzzZz...]
matp has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
krsh_ has quit [Quit: krsh_]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Ven has joined #crystal-lang
akwiatkowski has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 256 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matp has quit [Remote host closed the connection]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
matp has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Client Quit]
Ven has joined #crystal-lang
<Papierkorb> I think I found two bugs related to enums with @[Flags] in the latest version, lemme see
<Papierkorb> Err, one bug - Or an intended change which in turn make .from_X methods akward: If you have a typed enum like `enum Foo : UInt8`, then its .new method will now expect an UInt8 too. This is a change to the previous behaviour, which did accept Int or similar, regardless of the internal type
<Papierkorb> Makes it akward as now from_X methods now have to cast to the correct integer type. If I'm not overlooking something.
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Remote host closed the connection]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 246 seconds]
mgarciaisaia has joined #crystal-lang
<FromGitter> <spalladino> @Papierkorb I'm not sure if that's an intended change, but IMHO it makes sense. Crystal (at least for now) does not automatically convert between numeric types, so this code fails: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ It makes sense that `from_X` methods behave the same way, if you ask me. [https://gitter.im/crystal-lang/crystal?at=583851438255fe6b76c9bf1a]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
<Papierkorb> spalladino, with from_X it makes the code really bad. I was hinting at things like from_json, which now have to add yet another hardly readable line of macro code to do the casting
mgarciaisaia has quit [Ping timeout: 250 seconds]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
<Papierkorb> I mean, what's the point in allowing duck typing, when parts of the stdlib which would benefit from it do not allow it?
mussela has joined #crystal-lang
<mussela> hello
<mussela> I couldn't find on the docs a way for an Array to hold values of a class or any of its descendants
<mussela> is it possible?
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<BlaXpirit> mussela, [] of BaseClass
<BlaXpirit> [subobj1, subobj2] of BaseClass
<mussela> I see, thanks!
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
<Papierkorb> Is it possible to catch GC warnings and then just raise or something to debug where they come from?
<BlaXpirit> if only...
<Papierkorb> If nothing's there yet, I may look at it later. I guess boehmgc already has a hook for that somewhere.
<Papierkorb> Else I'll resort to a malloc() hack or something
<BlaXpirit> Papierkorb, let me know if u figure something out for debugging GC
pawnbox has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
<Papierkorb> Shameless plugging again: The torrent shard now offers an experimental implementation of Bittorrent DHT, it is not yet used to find/announce peers though
<FromGitter> <splattael> @ysbaddaden Any news about "libs" vs "lib" issue since Crystal 0.20.0? Should I file an issue or even a PR to remove `libs` from search path?
<RX14> @splattael which issue?
<FromGitter> <splattael> > `libs` is taking precedence over `lib`, but upgrading dependencies will install them into `lib` but an older version is being picked.
<FromGitter> <spalladino> @Papierkorb maybe this helps? https://github.com/crystal-lang/crystal/issues/2104#issuecomment-180471871
<RX14> i thought libs was gone
<RX14> oh well
<FromGitter> <splattael> Right
<Papierkorb> spalladino, great, thanks
<FromGitter> <splattael> RX14, either replace it or put it before `libs` in search path.
<Papierkorb> BlaXpirit: @GC debugging, see what spalladino wrote above
mati_urunda has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 245 seconds]
<BlaXpirit> thanks
<Papierkorb> Currently testing it
<Papierkorb> And now it doesn't trigger. Nice.
gloscombe has quit [Quit: Lost terminal]
<Papierkorb> > Errno: Failed to convert IP address: No space left on device
<Papierkorb> "That never happened before"
<Papierkorb> https://github.com/ivmai/bdwgc/blob/master/doc/debugging.html#L53 this isn't that helpful either
<BlaXpirit> uhhhh wat
pawnbox_ has quit [Remote host closed the connection]
<Papierkorb> For some reason I'm interested in porting crystal to windows. I don't even like windows, nor do I want to maintain it longterm, I just think that it should be available there..
<BlaXpirit> yeah it's essential, what to say
pawnbox has joined #crystal-lang
<FromGitter> <sdogruyol> @papierkorb i agree with you
akwiatkowski has quit [Ping timeout: 264 seconds]
bjz has joined #crystal-lang
<FromGitter> <jwoertink> I second that
<FromGitter> <jwoertink> What exactly would that take? Maybe we can get a wiki on the repo together that would talk about what things crystal would need on windows in order to run?
<BlaXpirit> someone said llvm 3.8
<BlaXpirit> well we got that and more
<Papierkorb> LLVM isn't the issue, has been available for windows for ages
<Papierkorb> libevent is most likely available too, libunwind .. probably? PCRE could be annoying, but there's probably a port of it too
<FromGitter> <jwoertink> Yeah, see, a doc of these things would be awesome ^
<FromGitter> <spalladino> Well, it's not because of nothing that "Compiler for Windows" is the oldest open and most commented issue in the repo https://github.com/crystal-lang/crystal/issues/26
<BlaXpirit> i don't think GUI is doable with a posix emulation layer
<BlaXpirit> what do i know though
<Papierkorb> even if not, it's a start
<BlaXpirit> support with an emulation layer is not what people want
<Yxhuvud> well, define 'doable'. Is there any reason it shouldn't be a shim to a C lib? I'd assume the hard parts would be the differences in what the OS provide in terms of threads and other similar stuff that POSIX provides normally
<BlaXpirit> i wonder if porting to windows with emulation layer even helps with bootstrapping
<FromGitter> <drosehn> @maiha_twitter -- thanks for the pointer to the project which uses LMDB. I'll save that link and look at it when I get a chance. (which might be tomorrow, if I'm lucky)
<Papierkorb> BlaXpirit: Yes, there are various comments in the issue outlining why
<BlaXpirit> Yxhuvud, yeah, the event loop stuff is mindboggling
<Yxhuvud> while some variant of llvm has been available for windows for long, has it supported the windows abstractions properly?
<Papierkorb> It compiles natively on windows
<Yxhuvud> Papierkorb: compiles doesn't mean it is native in terms of using the stdlib as is given by the normal windows compiler.
<Papierkorb> There are also some things that work entirely different on Windows, like good old fork(), which are not easily substituted
<Papierkorb> Yxhuvud: A friend of mine compiled one of my projects I wrote with C++/Qt and Clang (-> LLVM flying around in there somewhere) using MinGW years ago
<Papierkorb> That only required the mingw std lib, which is native to windows though, no posix emulation
<Yxhuvud> sure, but mingw is a very very different beast to anything related to visual studio and MS compilers.
<Papierkorb> .. so?
<Papierkorb> It produces native code using the native API
<Papierkorb> I'm more interested in having a MinGW based port too, don't care about MSVC stuff
<Yxhuvud> a mingw port may be a feasible and good first step, but it would not be a first class citizen on the platform.
<BlaXpirit> Papierkorb, i'm quite sure there is a big difference here
<Papierkorb> I don't get it, why? Then it depends on mingw_x.dll instead of msvc12345.dll
<Papierkorb> What's the difference?
<BlaXpirit> you see, MinGW supplies a C++ compiler. using the compiler and relying on MinGW libraries may not be the same thing
<BlaXpirit> though it probably is, i remember now..
<Yxhuvud> The difference is that you won't be able to integrate properly to windows libraries. If that matters or not depends on what you build.
<Papierkorb> The C ABI should be compatible
<Papierkorb> C++ is a mess though
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
mussela has quit [Quit: Page closed]
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
bjz has joined #crystal-lang
<wmoxam> How are releases packaged?
Nik736 has quit [Quit: Textual IRC Client: www.textualapp.com]
<zacts> hi #crystal-lang
<zacts> I'm really thinking that this crystal-lang looks really promising
<zacts> I'm going to already start implementing some simple tools with it
<zacts> it's like the perfect language for utilities for the gnu/linux distro I love
<zacts> I like it better than Go for this usecase
<zacts> anyway, I'm looking for a git repo of user contributed crystal libraries?
<zacts> :-)
soveran has quit [Remote host closed the connection]
<wmoxam> zacts: that's the one
<zacts> thanks
<zacts> ah yeah
<RX14> zacts, this is a nice UI doing essentially a github search, but it's nicer http://crystalshards.xyz/
<Papierkorb> Yay, my torrent shard is on the list too
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A124 has quit [Quit: '']
A124 has joined #crystal-lang