RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.25.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
dannyAAM has quit [Ping timeout: 276 seconds]
Renich has quit [*.net *.split]
byteflame has quit [*.net *.split]
dannyAAM has joined #crystal-lang
chkilroy has quit [*.net *.split]
oprypin has quit [*.net *.split]
tilpner has quit [*.net *.split]
thews has quit [*.net *.split]
kosmonaut has quit [*.net *.split]
txdv has quit [*.net *.split]
edwardloveall[m] has quit [Ping timeout: 260 seconds]
cptaffe has quit [Ping timeout: 260 seconds]
akaiiro[m] has quit [Ping timeout: 260 seconds]
fifr[m] has quit [Ping timeout: 256 seconds]
kixune[m] has quit [Ping timeout: 245 seconds]
kp666[m] has quit [Ping timeout: 256 seconds]
braidn[m] has quit [Ping timeout: 256 seconds]
olbat[m] has quit [Ping timeout: 276 seconds]
chkilroy has joined #crystal-lang
txdv has joined #crystal-lang
kosmonaut has joined #crystal-lang
thews has joined #crystal-lang
tilpner has joined #crystal-lang
oprypin has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #6410: HTTP::Client: set `connection: close` header on one-shot requests (master...bug/6401-missing-connection-close-header) https://git.io/fNcSW
<FromGitter> <wontruefree> crystal master is not running specs on master on OSX for me
<FromGitter> <wontruefree> is anyone else seeing seeing and problems ?
<FromGitter> <wontruefree> file spec is failing
olbat[m] has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #6411: Compiler: give error if constant has NoReturn type (master...bug/6139-const-no-return) https://git.io/fNc9D
<crystal-gh> [crystal] asterite opened pull request #6413: Parser: fix parsing of named tuple inside generic type (master...bug/6014-parse-named-tuple-inside-paren) https://git.io/fNcQP
braidn[m] has joined #crystal-lang
Frank[m] has joined #crystal-lang
Renich[m] has joined #crystal-lang
Connor[m] has joined #crystal-lang
Connor[m]1 has joined #crystal-lang
kp666[m] has joined #crystal-lang
<FromGitter> <icyleaf> @wontruefree throws this? โŽ โŽ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b514486e06d7e74098df3fb]
<crystal-gh> [crystal] asterite opened pull request #6414: Compiler: evaluate instance var initializers at the metaclass level (master...bug/5876-instance-var-initializer) https://git.io/fNc5p
kixune[m] has joined #crystal-lang
akaiiro[m] has joined #crystal-lang
edwardloveall[m] has joined #crystal-lang
<FromGitter> <wontruefree> @icyleaf yep
<FromGitter> <icyleaf> Me, too, i guess it is problem in block code in flag? macro.
akaiiro has quit [Ping timeout: 244 seconds]
<renzhi> is there a specific reason that an 8MB stack is allocated for each fiber? Could a smaller stack do the work?
akaiiro has joined #crystal-lang
<FromGitter> <bew> Iirc it's 4KB for each fiber (1 page), and it can expand to 8MB
<renzhi> but the Fiber.allocate_stack method seems to call mmap with 8MB size though
<renzhi> I'm just trying to understand what it does internally :)
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
<FromGitter> <bew> I guess it's 8MB of virtual memory, then the kernel does its thing to really allocate as few pages as possible: only 1 page for a new fiber (a page is usually 4KB)
alex`` has joined #crystal-lang
<FromGitter> <codenoid> hi all
<FromGitter> <codenoid> i love you
<FromGitter> <codenoid> <3
<FromGitter> <codenoid> hi @icyleaf
<FromGitter> <codenoid> long time no see
Groogy has quit [Ping timeout: 256 seconds]
<FromGitter> <icyleaf> Hey @codenoid :)
<FromGitter> <codenoid> thankyou for halite โœจ
alex`` has quit [Ping timeout: 264 seconds]
akaiiro has quit [Quit: The Lounge - https://thelounge.chat]
<FromGitter> <aisrael> How should we handle when a shard that we use has a macro that reads from a file?
<FromGitter> <aisrael> In the dependent project, when I try to compile it complains that it can't read the file :(
<FromGitter> <aisrael> E.g. in my `cql` shard, I have a macro that reads a file (that contains irregular singular to plural inflections) `$CQL/etc/irregular.txt`.
<FromGitter> <aisrael> Now I want to use my `cql` shard, but in `project` the compiler complains that it can't find `$PROJECT/etc/irregular.txt`
<FromGitter> <straight-shoota> The macro should probably use a path relative to the file it is defined in.
<FromGitter> <aisrael> Thanks, will try
<FromGitter> <aisrael> (So, yeah, am thinking a way to package and distribute shards as a "binary" might be useful...)
<FromGitter> <aisrael> It didn't work :( I changed `File.open("etc/irregular.txt")` to `File.open("./etc/irregular.txt")`. While the `cql` specs still passed, the `project` still wouldn't compile
<FromGitter> <aisrael> In the mean time I'll just "hard code" the macro expansion (all 3000 lines) into my `.cr` file :(
<FromGitter> <straight-shoota> `etc/irregular.txt` and `./etc/irregular.txt` are actually identical paths and relative to the current working directory, so obviously that won't work when run from a different directory
<FromGitter> <straight-shoota> But `File.open` executes at runtime, so what does this have to do with a macro?
alex`` has joined #crystal-lang
<FromGitter> <aisrael> The macro uses `run('../etc/read_as_hash')`. `$CQL/etc/read_as_hash.cr` is what has the actual `File.open('./etc/irregular.txt')`
<hightower4> Is there a way to serialize and deserialize a tuple?
<FromGitter> <straight-shoota> Okay, so `File.open` is runtime executed in a macro.
<hightower4> I am using msgpack and if I serialize an object with a tuple, on deserialization it gives me: instance variable '@x' of MyClass must be Tuple(String, String), not MessagePack::Unpacker
<FromGitter> <straight-shoota> Then you just have to replace `"./etc/irregular.txt"` with `File.join(__DIR__, "irregular.txt")`. This will resolve the file name in the same directory as `read_as_hash.cr`.
<FromGitter> <aisrael> ๐Ÿ’ก!
<FromGitter> <straight-shoota> hightower4, MessagePack seems to be able to deserialize Tuple https://github.com/crystal-community/msgpack-crystal/blob/master/src/message_pack/from_msgpack.cr#L205
<FromGitter> <aisrael> @straight-shoota That worked like a charm, thanks!
<FromGitter> <aisrael> (Owe you a beer if ever you find yourself in my town. Cheers!)
<hightower4> straight-shoota: indeed. Though I don't understand the cause of the error then
<FromGitter> <straight-shoota> you're welcome @aisrael
<FromGitter> <straight-shoota> where do you live? :D
<FromGitter> <straight-shoota> hightower4, I don't know how the shard is implemented exactly
<hightower4> I'm gonna checks spec/ files for ideas
<FromGitter> <aisrael> @straight-shoota Manila, where beer can be had for $0.50 a bottle :D
<FromGitter> <straight-shoota> All right xD will give you a heads up when I'm around
<FromGitter> <aisrael> ๐Ÿ‘
<hightower4> straight-shoota: solved my msgpack issue. I had type defined as @x : Tuple(String,String) and later def initialize(@x). But it looks like msgpack uses macros and it needed an explicit def initialize( @x : Tuple(String,String))
<FromGitter> <drum445> how do i find out what types are in my array?
<hightower4> drum445: typeof(your_arr) ?
<FromGitter> <drum445> gives me: Array(Person):Class โŽ I want it to just give me Person if possible please
<FromGitter> <drum445> So what types my array contains
<FromGitter> <r00ster91> I think you can just do something like `puts typeof([1, ""]).to_s[6..-2] # => Int32 | String` then
<FromGitter> <drum445> That works @r00ster91 but I need the object as I want to do Person.new
<hightower4> drum445: you can't do that
<hightower4> (well, at least not without using macros)
<FromGitter> <drum445> using macros is fine
<FromGitter> <Timbus> I thought you can do something like: โŽ โŽ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b51aad39ddf5f4aadf89d87]
<FromGitter> <aisrael> @drum445 I'm trying to understand your use caseโ€”are you writing some sort of library where you're expecting an arbitrary `Array(T)` and want to get `T.class`?
<FromGitter> <drum445> yep exactly that, it's my micro-orm: https://github.com/drum445/objectify โŽ I want to be able to do Array(Person).from_rs(rs)
<hightower4> timbus: actually that works, nice one
<FromGitter> <drum445> it works great for โŽ Person.from_rs(rs) โŽ But i am falling into issues with arrays
<FromGitter> <aisrael> How about `Array.from_rs(Person, rs)`?
<FromGitter> <aisrael> (What I did instead is something like `CQL.connect.schema(Person, "persons", name: String).select.all # => Array(Person)`)
<FromGitter> <drum445> I had that first one already, some feedback suggested from_rs would be nice
<FromGitter> <drum445> got it working now though, thanks all
<FromGitter> <straight-shoota> @drum445 `typeof(array[0]).new`
<FromGitter> <drum445> @straight-shoota that's great thanks, simple is always best lol. Couldn't see that for some reason though. Cheers
<FromGitter> <aisrael> I'm confused... how would `.from_rs(rs)` work on an existing `Array(T)`? Esp. e.g. `empty = [] of User`. `empty.from_rs(rs)`?
kixune[m] has quit [Remote host closed the connection]
olbat[m] has quit [Remote host closed the connection]
braidn[m] has quit [Read error: Connection reset by peer]
akaiiro[m] has quit [Remote host closed the connection]
Renich[m] has quit [Remote host closed the connection]
kp666[m] has quit [Remote host closed the connection]
Connor[m]1 has quit [Read error: Connection reset by peer]
edwardloveall[m] has quit [Remote host closed the connection]
Connor[m] has quit [Read error: Connection reset by peer]
Frank[m] has quit [Read error: Connection reset by peer]
<FromGitter> <drum445> it doesn't you do โŽ people = Array(Person).from_rs(rs)
<FromGitter> <drum445> or do you think my original way of โŽ people = Objectify.to_many(rs, Person) โŽ โŽ is better? [https://gitter.im/crystal-lang/crystal?at=5b51af1405e1cc3553fbc1e9]
<FromGitter> <drum445> Before I had to_one and to_many methods. What you reckon is better?
<FromGitter> <aisrael> so.. `typeof(array[0]).new` will still work with `Array(Person)`? That's... amazing.
<FromGitter> <aisrael> I took the lazy route and just had `.one`, `.one?`, and `.all` (mirroring the `query_*` methods)
<FromGitter> <aisrael> E.g. `people.where(group_id: gid).all`
<FromGitter> <drum445> no from_rs firstly initalises the array
<FromGitter> <drum445> so array.new then it does the typeof
<FromGitter> <drum445> sneak peak for you ;)
olbat[m] has joined #crystal-lang
<FromGitter> <drum445> https://github.com/drum445/objectify โŽ See in alternative syntax, what you reckon?
<FromGitter> <straight-shoota> @drum445 If It is used in a static method in `Array`, you can just use `T`: โŽ โŽ ```def Array.from_rs(rs) : self โŽ new_array = new โŽ return Objectifity.to_many(rs, T)``` [https://gitter.im/crystal-lang/crystal?at=5b51b3a8b2411177a25cc431]
<FromGitter> <straight-shoota> No need for typeof or initializing an instance
<FromGitter> <drum445> That function doesn't know what T is
<FromGitter> <drum445> Will see if I can make your suggestion work though, as it is a little cleaner
<FromGitter> <straight-shoota> oh, maybe you have to use `def Array(T).from_rs ...`
<FromGitter> <straight-shoota> or wrap it in `class Array(T); def self.from_rs(rs) ...`
<FromGitter> <straight-shoota> No, actually this should work. See: โŽ โŽ ```def Array.print_my_type โŽ p! T => Int32 โŽ end โŽ โŽ Array(Int32).print_my_type``` [https://gitter.im/crystal-lang/crystal?at=5b51b5a9f9ffc4664beebcf5]
<FromGitter> <drum445> Oh yes, how odd. My from_rs doesn't know what T is
<FromGitter> <drum445> undefined constant T
rohitpaulk has joined #crystal-lang
Ven`` has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
braidn[m] has joined #crystal-lang
Connor[m] has joined #crystal-lang
Connor[m]1 has joined #crystal-lang
Frank[m] has joined #crystal-lang
Renich[m] has joined #crystal-lang
kp666[m] has joined #crystal-lang
edwardloveall[m] has joined #crystal-lang
kixune[m] has joined #crystal-lang
akaiiro[m] has joined #crystal-lang
<FromGitter> <damian-rzeszot> what is the difference between such definitions? โŽ โŽ ```def cache(&block : Void -> String) : String โŽ def cache(&block : -> String) : String``` [https://gitter.im/crystal-lang/crystal?at=5b51c09726bfd636be38c121]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzzโ€ฆ]
alex`` has quit [Ping timeout: 256 seconds]
<FromGitter> <rishavs> Do we have any way to insert new rows into a hash? I think I only saw merge in the docs.
rohitpaulk has joined #crystal-lang
<FromGitter> <straight-shoota> `hash[key] = value`?
<FromGitter> <rishavs> that works when that key already exists
<FromGitter> <rishavs> i meant a completely new key value pair? or am i completely wrong?
<FromGitter> <j8r> it also works as well
<FromGitter> <j8r> https://carc.in/#/r/4kgp
<FromGitter> <rishavs> oh dear. have i been such an idiot for so long???
<FromGitter> <j8r> but this this not really the case if you are dealing with `Any`
<FromGitter> <rishavs> I have been using merge for every row to be added. I am not worried about Any. i am using specific types -__-
<FromGitter> <rishavs> I need to go reevaluate life T_T
<FromGitter> <straight-shoota> :D
<FromGitter> <aisrael> ๐Ÿคฃ
rohitpaulk has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <damian-rzeszot> https://carc.in/#/r/4kgv
<FromGitter> <damian-rzeszot> how is this feature called?
<FromGitter> <damian-rzeszot> this curly bracket "initializer"
<FromGitter> <straight-shoota> it's a hash-like literal
early has quit [Quit: Leaving]
<FromGitter> <damian-rzeszot> it works only with no args initializers?
<FromGitter> <straight-shoota> yes
<FromGitter> <damian-rzeszot> thanks
early has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 256 seconds]
alex`` has joined #crystal-lang
<FromGitter> <Val> not cheap
<FromGitter> <Val> prefer scaleway
rohitpaulk has joined #crystal-lang
<FromGitter> <j8r> that's not the same service
<FromGitter> <j8r> here it's a CAAS/PAAS, scaleway is a IAAS
<FromGitter> <j8r> that's why its more expensive - no server management, just `scalingo create my-crystal-application` and the app is ready.
rohitpaulk has quit [Ping timeout: 244 seconds]
duane has joined #crystal-lang
<davic> please note, Scaleway does not have redundant harddrives
<davic> your data is hosted on ONE drive.
<FromGitter> <Val> ``````
<FromGitter> <Val> ``````
<FromGitter> <Val> ```Error in line 1: expected block to return Int32, not Nil``` โŽ โŽ Normal? [https://gitter.im/crystal-lang/crystal?at=5b520222f477e4664aaf812e]
<FromGitter> <j8r> and this is network drive :|
akaiiro has joined #crystal-lang
<FromGitter> <j8r> @Val because there is no ENV vars https://play.crystal-lang.org/#/r/4kj5
<FromGitter> <Val> @j8r in your example, error is line 2, not 1
<FromGitter> <j8r> That's why `ENV` nillable
<FromGitter> <j8r> this this the same lol
<FromGitter> <j8r> hum yes sorry the problem is puts
<FromGitter> <j8r> `puts` returns no value, it prints to stdout
<FromGitter> <j8r> it can be that
<crystal-gh> [crystal] asterite opened pull request #6418: Give proper error when doing sizeof uninstantiated generic type (master...bug/6415-sizeof-uninstantiated-generic) https://git.io/fNCPi
<FromGitter> <j8r> @Val https://play.crystal-lang.org/#/r/4kju ?
<FromGitter> <j8r> the sort block is used to a sort condition https://crystal-lang.org/api/master/Array.html#sort%28%26block%3AT%2CT-%3EInt32%29%3AArray%28T%29-instance-method
wontruefree has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.1]
<FromGitter> <Val> @j8r : https://play.crystal-lang.org/#/r/4kke
<FromGitter> <Val> bug or not ? =)
rohitpaulk has joined #crystal-lang
<FromGitter> <Val> Ok well my bad
<FromGitter> <Val> friday...
<FromGitter> <Val> time to beers
hightower4 has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] sdogruyol pushed 1 new commit to master: https://git.io/fNCyr
<crystal-gh> crystal/master 1b83706 Ary Borenszweig: HTTP::Client: set `connection: close` header on one-shot requests (#6410)
<crystal-gh> [crystal] sdogruyol pushed 1 new commit to master: https://git.io/fNCyy
<crystal-gh> crystal/master 02a78a8 Ary Borenszweig: Compiler: give error if constant has NoReturn type (#6411)
hightower4 has joined #crystal-lang
<RX14> I just managed to run all of file_spec.cr without segfaulting with exception handling
<RX14> this took way too much debugging lol
<FromGitter> <bew> Awesome! Gg RX14
<FromGitter> <fridgerator> ๐Ÿ’ฏ ๐ŸŽ‰
<FromGitter> <fridgerator> thats awesome
duane has quit [Remote host closed the connection]
<RX14> its still broken
<RX14> well I know one way that its broken
oz has quit [Quit: EOF]
<RX14> but it works enough
<RX14> (`return` in `rescue` will segfault)
oz has joined #crystal-lang
<travis-ci> crystal-lang/crystal#1b83706 (master - HTTP::Client: set `connection: close` header on one-shot requests (#6410)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/406333036
<DeBot> https://github.com/crystal-lang/crystal/pull/6410 (HTTP::Client: set `connection: close` header on one-shot requests)
<travis-ci> crystal-lang/crystal#02a78a8 (master - Compiler: give error if constant has NoReturn type (#6411)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/406333560
<DeBot> https://github.com/crystal-lang/crystal/pull/6411 (Compiler: give error if constant has NoReturn type)
duane has joined #crystal-lang
wontruefree has quit [Quit: bye]
rohitpaulk has quit [Ping timeout: 256 seconds]
rohitpaulk has joined #crystal-lang
wontruefree has joined #crystal-lang
<FromGitter> <bararchy> RX14 ๐ŸŽ‰ good work!
<RX14> and now they even pass :) http://owo.sh/c0a87b.png
<FromGitter> <Val> ๐Ÿ‘
<wontruefree> I am surprised circle CI is passing
<wontruefree> since specs are not passing on peoples macs
rohitpaulk has quit [Ping timeout: 244 seconds]
<FromGitter> <straight-shoota> cheers, RX14
<RX14> it was quite some work
<RX14> learned a lot about llvm
<FromGitter> <straight-shoota> I can imagine
<RX14> well i'm pretty glad I worked it out
<RX14> there was a while in the middle where I nearly gave up
<FromGitter> <straight-shoota> understandable^^
<RX14> I was missing one pointerof() call
alex`` has joined #crystal-lang
<RX14> lol
<FromGitter> <straight-shoota> ouch
DTZUZO has quit [Ping timeout: 240 seconds]
<wontruefree> I am curious what you learned I have been trying to get more into the llvm work on crystal but I really dont know where to get started
<FromGitter> <straight-shoota> it's always amazing how simple a solution can be after you have been wrapping your head around it for hours ^^
<FromGitter> <straight-shoota> but I suppose exceptions is probably the biggest obstacle before getting somewhat decent windows support, so hell yeah, that's awesome
<RX14> its insanely hard to debug whats going on on windows
<RX14> because debug symbols are flat-out broken
<RX14> you don't even get symbols
<RX14> all my stacktrace in visual studio was __crystal_main+0xlargenumber
<FromGitter> <j8r> ๐Ÿ˜ฎ
<RX14> @straight-shoota want to see if you can break my code?
<Yxhuvud> heh, that reminds me of a course (based on SICP) where I spent a full day trying to find a place where my collaborant had failed to place a `car`
<FromGitter> <straight-shoota> haha, is so, it's probably just by pure luck
wontruefree has quit [Quit: bye]
<FromGitter> <straight-shoota> I know near nothing about codegen and LLVM
<RX14> sure
<FromGitter> <straight-shoota> but I'll take a look ๐Ÿ‘
<RX14> I was more wondering if you had any large pieces of code to throw at it
<RX14> such as some windows PR I didnt know about
<FromGitter> <straight-shoota> yeah, registry ^^
<FromGitter> <straight-shoota> I've taken a look at sockets, but it needs fibers first. And I can't do fibers ๐Ÿ˜†
<RX14> fibers shouldnt be hard
<RX14> well actually
<RX14> the calling convention is different
<RX14> so yeah
<RX14> lol just annotate the fiber switch with the gnu calling convention
<RX14> problem solved
<FromGitter> <straight-shoota> :D
wontruefree has joined #crystal-lang
<RX14> no seriously
<RX14> i'm serious
<FromGitter> <straight-shoota> fine by me
<RX14> i had a look at stacktraces too
<RX14> in windows they seem... not that bad
<RX14> (famous last worlds)
akaiiro has quit [Ping timeout: 248 seconds]
<RX14> but without the debugging info actually working even in visual studio thats fairly useless
<crystal-gh> [crystal] RX14 opened pull request #6419: Support exception handling on windows (master...feature/windows-exceptions) https://git.io/fNCjQ
<FromGitter> <hugoabonizio> when will we have a Crystal Hero Awardโ„ข to give one to @RX14? ๐Ÿ˜„
akaiiro has joined #crystal-lang
<FromGitter> <sdogruyol> Soon :)
<FromGitter> <bararchy> RX14 what's your next quest in the Windows realm? :)
<FromGitter> <bararchy> Fibers ?
<RX14> getting all the stuff I have in my branch upstreamed
<RX14> lol
<FromGitter> <bararchy> hahaha
<FromGitter> <bararchy> makes sense
<RX14> next quest is getting a compiler working
<RX14> bootstrapping is key
<RX14> and the compiler doesn't *need* fibers
<FromGitter> <bararchy> yeha having a `crystal.exe` compiler can help many people start working with and testing the compiler on windows
<FromGitter> <bararchy> also taking care of the STDlib
<FromGitter> <straight-shoota> exceptions is already a huge win to work on stdlib
<FromGitter> <bararchy> it is
<FromGitter> <straight-shoota> with out it, you can't really spec many edge cases... :D
Groogy has joined #crystal-lang
<FromGitter> <Daniel-Worrall> so what's the coverage of the exceptions now? What will we be seeing?
kixune[m] has quit [Ping timeout: 240 seconds]
akaiiro[m] has quit [Ping timeout: 255 seconds]
Frank[m] has quit [Ping timeout: 260 seconds]
Renich[m] has quit [Ping timeout: 240 seconds]
Connor[m]1 has quit [Ping timeout: 255 seconds]
Connor[m] has quit [Ping timeout: 255 seconds]
braidn[m] has quit [Ping timeout: 240 seconds]
kp666[m] has quit [Ping timeout: 245 seconds]
olbat[m] has quit [Ping timeout: 256 seconds]
edwardloveall[m] has quit [Ping timeout: 276 seconds]
duane has quit [Ping timeout: 276 seconds]
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
akaiiro has quit [Ping timeout: 240 seconds]
olbat[m] has joined #crystal-lang
<FromGitter> <Daniel-Worrall> Some code snippets and results would be really great
wontruefree has quit [Quit: bye]
<FromGitter> <jspillers> hey guys, i am doing some web socket-y redis pub/sub-y stuff and getting a weird error that causes the process to die and print this: โŽ โŽ ```gmp: overflow in mpz type โŽ Program received and didn't handle signal IOT (6)``` โŽ โŽ anyone seen anything like this before? google yields very little in the way of clues... [https://gitter.im/crystal-lang/crystal?at=5b526055ee530e4aac89269c]
<FromGitter> <soanvig> Don't you think, that Crystal docs are really hard to use and search through?
<FromGitter> <soanvig> And I don't mean documentation itself, but the rendered page
<FromGitter> <Daniel-Worrall> What's difficult about it?
<FromGitter> <soanvig> @jspillers if (6) represents signal, it's http://man7.org/linux/man-pages/man7/signal.7.html from SIGABRT
<FromGitter> <soanvig> @Daniel-Worrall the worst thing - any click in long menu on left returns to the top, that awful. Search results are really weird sometimes
<FromGitter> <soanvig> And it's ugly imho. That purple!
<FromGitter> <soanvig> The main screen is nice though
<FromGitter> <soanvig> But it lacks Table of Contents
<FromGitter> <straight-shoota> @soanvig Yeah, there is much room for improvement. We need a proper concept for the API docs, and there are a lot of open design questions like extracting the HTML rendering from the compiler.
<FromGitter> <straight-shoota> But there are currently more important issues I think.
<FromGitter> <soanvig> @straight-shoota is there docs generator source code somewhere? I can take a look at it
<FromGitter> <straight-shoota> it's in `src/compiler/crystal/tools/doc`
Excureo has quit [Remote host closed the connection]
<FromGitter> <soanvig> ty
<FromGitter> <straight-shoota> the jumping viewport in the menu should probably be easy to fix
<FromGitter> <straight-shoota> it actually worked before the latest release, but it seems it got screwed up with #5229
<DeBot> https://github.com/crystal-lang/crystal/pull/5229 (Improved search feature for API docs)
<FromGitter> <soanvig> I'm actually making a fork. I have two tweak in mind: the first thing is jumping viewport, the second: match Crystal to https://crystal-lang.org/media/
<FromGitter> <straight-shoota> and yeah, the search results are a bit weird sometimes
<FromGitter> <soanvig> This is harder to debug I think :P
<FromGitter> <straight-shoota> but better than anything before, and it mostly works ๐Ÿ‘
<FromGitter> <straight-shoota> fixing the jumping viewport is a good thing
<FromGitter> <straight-shoota> But matching Crystal CI is a more complicated topic
<FromGitter> <straight-shoota> I'd hold off on that. There's a lot involved in this and needs proper discussion and planning. And most importantly, decisions. Decision making is probably the most difficult part.
<FromGitter> <straight-shoota> You can take a look at #4755
<DeBot> https://github.com/crystal-lang/crystal/pull/4755 (Visual and structural improvements to docs generator HTML)
<FromGitter> <soanvig> @straight-shoota how can I test if my fix for docs works? I'm not sure how to test that thing.
<FromGitter> <soanvig> Build crystal, ten try to doc some script with it?
braidn[m] has joined #crystal-lang
Connor[m]1 has joined #crystal-lang
kp666[m] has joined #crystal-lang
Renich[m] has joined #crystal-lang
Frank[m] has joined #crystal-lang
Connor[m] has joined #crystal-lang
edwardloveall[m] has joined #crystal-lang
kixune[m] has joined #crystal-lang
akaiiro[m] has joined #crystal-lang
<FromGitter> <straight-shoota> Exactly
<FromGitter> <straight-shoota> `make crystal docs`
<FromGitter> <straight-shoota> Or, if it's just JavaScript, you don't need to build the compiler
<FromGitter> <straight-shoota> Just generate docs and insert the new JS code at the appropriate location
<FromGitter> <soanvig> Second option makes sense!
<FromGitter> <straight-shoota> Actually, I mostly edit JS directly in the generated docs folder and when everything works, then backport it to the compiler templates
DTZUZO has joined #crystal-lang
<FromGitter> <soanvig> @straight-shoota
<crystal-gh> [crystal] soanvig opened pull request #6420: Fix docs navigator not scrolling into selected element on page load (master...fix/docs-jumping-viewport) https://git.io/fNWsg
<FromGitter> <Blacksmoke16> omg your're a saint
<FromGitter> <Blacksmoke16> wouldnt work on safari or IE tho :/
<FromGitter> <soanvig> This is the worst thing during learning Crystal x.x
<FromGitter> <soanvig> @straight-shoota what was your convention for that JS/CSS code? It doesn't follow best practices, and I would like know, if there was any reason for that?
<crystal-gh> [crystal] ysbaddaden pushed 2 new commits to master: https://git.io/fNWsd
<crystal-gh> crystal/master 1bedce6 Julien Portalier: Merge pull request #6413 from asterite/bug/6014-parse-named-tuple-inside-paren...
<crystal-gh> crystal/master c864338 Ary Borenszweig: Parser: fix parsing of named tuple inside generic type