RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.4 | 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
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 245 seconds]
bjz has joined #crystal-lang
<splitty_> Is there a tool for generating docs for a Crystal library?
<FromGitter> <Sija> @splitty_: yup, there’s `crystal doc`
<splitty_> Ah okay, I was looking for "crystal tool doc" or something like that :D
<splitty_> Thank you
<splitty_> Oh wow.. I can't use `crystal doc`
<splitty_> Apparently, Crystal doc tries to use the default prelude
<splitty_> I have a module called LibC in my kernel and `crystal doc` included the LibC lib first
<splitty_> So there's a conflict that I can't resolve
soveran has joined #crystal-lang
<FromGitter> <bcardiff> @splitty_ you can check how crystal use `make doc` to use the doc tool in other configuration
soveran has quit [Ping timeout: 240 seconds]
<FromGitter> <bcardiff> not guaranteed buy it might help to overcome that limitation
<splitty_> Well they just do "$(BUILD_PATH) ./bin/crystal doc src/docs_main.cr"
<splitty_> docs_main requires some stuff, it doesn't require the prelude
<splitty_> But neither does my kernel
<wmoxam> @david50407 I don't think it does at least (from looking at the code)
<wmoxam> but it'sLLVM v3.8
<wmoxam> RX14: true 😅
<wmoxam> anyway, I'll poke around some more to try and find the cause
<wmoxam> Is CI testing against older version of LLVM?
<FromGitter> <Sija> @wmoxam 3.8.0 IIRC
<wmoxam> 👍🏻
<wmoxam> thanks!
<FromGitter> <Sija> np!
<wmoxam> okay, found the problem. It was with my previous install
<wmoxam> If anyone else is interested in running on OpenBSD I have some instructions here: http://wmoxam.com/crystal-openbsd.html
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 258 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] Sija opened pull request #3860: Implement Char#* operator (master...char-times-operator) https://git.io/vMCyE
A124 has quit [Ping timeout: 255 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
unshadow has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 248 seconds]
pawnbox has joined #crystal-lang
unshadow has joined #crystal-lang
unshadow has quit [Ping timeout: 255 seconds]
unshadow has joined #crystal-lang
soveran has joined #crystal-lang
<manveru> is there some way to make the docs work offline as well? right now it tries to fetch each page using ajax...
<manveru> got a long flight and i'd like to learn it a bit during that time :)
<manveru> in the worst case i can open each doc page from the directory, it's just a bit annoying
Yxhuvud has quit [Read error: Connection reset by peer]
Yxhuvud has joined #crystal-lang
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
<unshadow> jhass: When will you update the arch package ? (do you want me to push a new package file?)
A124 has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 258 seconds]
<Yxhuvud> manveru: if nothing else, the API docs is generated from the main crystal repo. Dunno where the gitbook is generated, but it should be possible to find from github.com/crystal-lang
<RX14> manveru, https://devdocs.io/ is offline and has crystal stuff in
<Yxhuvud> api, book or both?
<RX14> both
<manveru> RX14: thanks! That's pretty cool
<RX14> yeah it is
<RX14> the crystal documentation isn't arranged particularly well
<RX14> but oh well
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bjz_ has quit [Ping timeout: 240 seconds]
bjz has joined #crystal-lang
akwiatkowski has joined #crystal-lang
<FromGitter> <Sija> @manevru for mac users there’s excellent Dash.app
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <mjago> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=587238017a3f79ef5dee88dc]
<FromGitter> <mjago> Any ideas why?
pawnbox has quit [Quit: gotta go guys.]
DeBot has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 245 seconds]
DeBot has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
cyjimmy264 has joined #crystal-lang
<BlaXpirit> mjago, you must give the pointer to the memory region, not a pointer to the pointer
<BlaXpirit> use `max.to_unsafe` to get a pointer to the memory region
<BlaXpirit> the 0 is just reading some random memory location
akwiatkowski has quit [Ping timeout: 264 seconds]
<FromGitter> <mjago> @BlaXpirit Thanks for that. I’m still getting comfortable with Slice and forget its a pointer! max without to_unsafe worked also so I guess it is getting called anyway? (argument is a Void*)
<RX14> yes
<RX14> to_unsafe is automatically called when sending items to lib bindings
<RX14> i'm not all to happy about that myself but it's a thing
<FromGitter> <mjago> Ok thanks!
cyjimmy264 has quit [Ping timeout: 240 seconds]
cyjimmy264 has joined #crystal-lang
unshadow has quit [Quit: leaving]
akwiatkowski has joined #crystal-lang
akwiatkowski has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
_whitelogger has joined #crystal-lang
<FromGitter> <exts> how do i dynamically call a def of class using a string var?
<Papierkorb> You don't
<Papierkorb> Or rather, you can't
akwiatkowski has joined #crystal-lang
<Papierkorb> use a case statement or a Hash(String, Proc) instead depending on your needs
unshadow has joined #crystal-lang
<FromGitter> <exts> can't do that with what I'm trying to accomplish, is there a way to do it with macros ?
<Papierkorb> No.
<Yxhuvud> so what ARE you trying to accoplish?
<Yxhuvud> perhaps there is a better way
akwiatkowski has quit [Read error: Connection reset by peer]
<FromGitter> <exts> https://gist.github.com/exts/9bb6cf1aa2ab289fe159fdf7b704c212 you can see where i got stumped around line 35
<RX14> @exta this is my simple HTTP router https://gist.github.com/RX14/a733ba778343492e345ac63dc1a2a9d4
<RX14> @exts
<RX14> it uses a very simple macro just for calling the controller
<FromGitter> <exts> interesting, thanks this may help me accomplish what I'm trying :)
<RX14> radix is a shard btw
soveran has joined #crystal-lang
<unshadow> Does crystal have pattern matching ?
<Papierkorb> Sadly not
<Yxhuvud> what it do have is support for multiple method signatures with the same method name.
<unshadow> Using the types for overloads right ?
<Yxhuvud> yes
<unshadow> Just mking sure for someone who asked, I didn't knew what pattren matching is until I looked it up in Wikipedia haha
renovo has joined #crystal-lang
<Papierkorb> Yxhuvud: While that's not pattern matching, it does suffice for some cases..
steenuil has joined #crystal-lang
<steenuil> hi, I wanna get Crystal working on FreeBSD but I noticed there's no BSD binaries in the releases page for the last few versions
<renovo> Listening on http://localhost:8080
<renovo> ld: library not found for -lssl
<renovo> clang: error: linker command failed with exit code 1 (use -v to see invocation)
<renovo> sorry, did not mean the above
<renovo> Even so! Just came across crystal-lang and installed 0.20.4 on a mac 10.12.1 and getting the error above - openssl is installed on my system. Thanks.
<unshadow> renovo: Don't know how it is in Mac , but in Linux I know you need the -dev packages to be avilable for you to compile programs against the libs, so see if you have openssl-dev or libssl-dev , or something like that
<steenuil> nope, OS X ships with the binary but not with the headers for openssl, so if you want to compile something that links openssl you have to pass some special flags
<steenuil> since the headers you install from homebrew are not linked by default due to possible problems
<steenuil> so you need to specify the location of the openssl headers yourself
<renovo> And when I run $> crystal play ? Is there a flag I must pass?
<steenuil> I have no idea
<FromGitter> <exts> anywhere i can read more on macros?
<RX14> @exts have you read the docs?
hako has quit [Ping timeout: 240 seconds]
DeBot has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<FromGitter> <exts> I have
cyjimmy264 has quit [Ping timeout: 240 seconds]
hako has joined #crystal-lang
cyjimmy264 has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
bjz has joined #crystal-lang
<manveru> i think in found a bug in StringScanner
<manveru> require "string_scanner"; s = StringScanner.new("hi"); s.scan(/./); s.inspect
<manveru> that fails with `Index out of bounds (IndexError)`
soveran has quit [Remote host closed the connection]
<Yxhuvud> io << " \"" << @str[start, 5] << "\" >"
<Yxhuvud> yeah, seems to fail on too short strings.
<manveru> yeah, also when you're close to the end in long strings
<manveru> should i make a PR for that?
<manveru> been only trying crystal for 1-2h but it seems quite nice so far
<Yxhuvud> I can't see why a fix for that wouldn't be accepted.
<manveru> just have to manage cloning the repo on this slow-ass connection :)
<Yxhuvud> heh.
renovo has quit [Remote host closed the connection]
<Yxhuvud> So far, Crystal has only been growing on me. Sure, there are some parts that are immature, but the overall direction of it is awesome.
LastWhisper____ has joined #crystal-lang
renovo has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dom96 has quit [Changing host]
dom96 has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
Kug3lis has joined #crystal-lang
cyjimmy264 has quit [Ping timeout: 245 seconds]
<crystal-gh> [crystal] manveru opened pull request #3861: StringScanner should work with small strings (master...fix-stringscanner-inspect) https://git.io/vMWRU
<DeBot> https://github.com/crystal-lang/crystal/pull/3861 (StringScanner should work with small strings)
bjz has joined #crystal-lang
cyjimmy264 has joined #crystal-lang
Ven has joined #crystal-lang
<manveru> hmm, i was expecting a type error when i do Char == String
<manveru> but it's just always false
<Yxhuvud> well, you can have arrays with type Array(Char|String). It is nice being able to compare the entries..
bjz has quit [Ping timeout: 245 seconds]
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
<manveru> but the docs only list Char#==(Char) and Char#==(Int)
<manveru> maybe it's something in a superclass of Char
<manveru> ah, yeah, Value#== always returns false
cyjimmy264 has quit [Ping timeout: 255 seconds]
<manveru> i'll have to read more on the type system... i wasn't expecting that crystal just allows `def ==(other)` to allow any type, shouldn't that be inferred instead?
<Yxhuvud> well, it will check if you try to invoke any method that doesn't exist. Otherwise, it will happily ducktype for you
renovo has quit []
bjz has joined #crystal-lang
bjz has quit [Client Quit]
Ven has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
<unshadow> Added multi-threading to my fiber_pool shard: https://github.com/bararchy/fiber_pool
<manveru> hmm, can't create symbols :(
<unshadow> if anyone is interested to check it out :)
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
steenuil has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]