jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<raz> ah yea meant keep-alive
<raz> would open up crystal for some nice new use-cases, proxy-servers etc.
<FromGitter> <jrei:matrix.org> but, that's mainly a server side issue, not the client?
<raz> both sides need to support it
<raz> i don't remember if either one does in crystal atm, but iirc neither does
<FromGitter> <Blacksmoke16> server does for sure
<raz> ahh ok
<raz> gtk
<FromGitter> <jrei:matrix.org> raz https://crystal-lang.org/api/master/HTTP/Client.html#new(io:IO,host=%22%22,port=80)-class-method
<FromGitter> <jrei:matrix.org> sounds like keep-alive is supported
<raz> doh!
<FromGitter> <Blacksmoke16> rip
<raz> did that land in 0.35.1?
* raz rejoices
<raz> when i looked it wasn't there yet, but maybe that was back in the 0.34 days
<raz> ah, or maybe it was just about "transparent re-use" (looks like you still have to keep a client-per-server around)
<oprypin> raz, i chose Halite
<raz> yup, i just switched to it, too. for a pretty mundane reason tho. it supports namedtuple as args, which is shorter to type than crest (which requires hash) :p
<FromGitter> <Blacksmoke16> :rolls_eyes:
<raz> hey with athena in the mix i gotta save on keystrokes elsewhere πŸ’β€β™€οΈ
<FromGitter> <watzon> As long as speed isn't a concern, Halite is wonderful
<raz> yup nothing too intense here
<raz> for high freq api calls i'd go with the stdlib http client
<FromGitter> <watzon> Yeah that's what I ended up having to switch to for my Telegram bot API library. It has to be able to handle hundreds or even thousands of concurrent requests, and I just wasn't able to get good response times out of Halite.
<raz> might be the lack of keepalive we just talked about :D
<FromGitter> <watzon> Possible, though I'm not using keepalive (intentionally anyway) and made my client before it existed in the standard library
<FromGitter> <watzon> Really wish we had nightly releases for Crystal
<FromGitter> <watzon> Or at least weekly
<oprypin> watzon, what do you want from those releases
<FromGitter> <Blacksmoke16> There is a nighly release, docker and snap
<oprypin> and like, if u dont have a local setup to just compile it for yourself, just what..
<FromGitter> <watzon> @oprypin just the ability to test changes on master without having to compile it myself locally. It's turning out to be kind of a pain in the ass building Crystal on my mac.
<oprypin> :o
<FromGitter> <Blacksmoke16> Oh?
<FromGitter> <watzon> Just would be a nice to have. Lots of languages do nightly releases.
<FromGitter> <Blacksmoke16> `make clean && make`
<oprypin> probably machine too weak?
<oprypin> cc @Daniel-Worrall
<FromGitter> <watzon> Pretty sure I actually know the problem I was having before. It was likely just do to a conflict between the xcode version of cmake and the llvm version.
<FromGitter> <Daniel-Worrall> ohai
<FromGitter> <watzon> My mac is plenty powerful though haha
<oprypin> Daniel-Worrall, did u find anything about nightly releases
<FromGitter> <Daniel-Worrall> I didn't even look yet
<oprypin> :s
<FromGitter> <Daniel-Worrall> I'm very easily distracted owo
<lunarkitty7> Hey, this is heresy to ask :p but how is crystal vs nim these days?
<oprypin> lunarkitty7, nim probably more serious and crystal probably more pleasant to use
<lunarkitty7> nim seems like a more ruby-esque compiled python, and crystal seems like ruby compiled, with less metaprogramming
<lunarkitty7> hmm
<oprypin> lunarkitty7, you're making way too many conclusions from syntax
<FromGitter> <watzon> I still prefer Crystal in most cases, but the occasional compiler bug still rears its ugly head and makes me hate life
<FromGitter> <watzon> Nim is great though
<oprypin> nim is absolutely nothing like python
<lunarkitty7> yeah I could see how it's totally different
<lunarkitty7> even just looking at the attitude about lambdas and functional
<oprypin> lunarkitty7, anyway if you're gonna be comparing, Crystal is much closer to both Ruby and Python than Nim is
<lunarkitty7> interesting
<lunarkitty7> Of the two I've really only used crystal and not nim, been thinking about messing with nim a bit too
<FromGitter> <watzon> This is what I end up getting when I try to compile Crystal on macOS Big Sur https://paste.gg/p/anonymous/e975155ca0db494b850bae260c1c5dfa
<FromGitter> <Daniel-Worrall> Testing it n ow opry
<FromGitter> <Blacksmoke16> @watzon downgrade to llvm10
<FromGitter> <Blacksmoke16> `brew uninstall llvm` `brew install llvm@10`
<FromGitter> <Blacksmoke16> llvm 11 support is in PR still
<FromGitter> <watzon> For some reason llvm 10 isn't available in homebrew. I can install 9 though.
<FromGitter> <Blacksmoke16> prob fine
<FromGitter> <Blacksmoke16> or could try merging in the llvm 11 support PR manually
deavmi has quit [Ping timeout: 260 seconds]
deavmi has joined #crystal-lang
<FromGitter> <watzon> 9 seems to have worked
<FromGitter> <Blacksmoke16> πŸ‘
<FromGitter> <Blacksmoke16> can also just build locally and setup an alias to like `ccrystal` points to the locally built compiler
<FromGitter> <watzon> That would be a good thing to add to asdf crystal
<oprypin> of course buildign locally is better if it works
<oprypin> also a galaxy brain option. run https://nightly.link/crystal-lang/crystal/workflows/win/master/crystal.zip under Wine
<FromGitter> <Daniel-Worrall> Damn, github dark mode doesn't work on gist
<oprypin> Daniel-Worrall, the reason im interested into upload-artifact is that we'd get a nifty link like that also for linux and mac ^
<FromGitter> <Daniel-Worrall> yeah, I've already used the windows crystal
<oprypin> what, actually the galaxy brain option?
<FromGitter> <Daniel-Worrall> na, just to run on windows
<FromGitter> <Daniel-Worrall> uh
<FromGitter> <Daniel-Worrall> The artifacts are already available outside of docker :^)
<oprypin> Daniel-Worrall, yes but nobody knows how to get to those
<oprypin> Daniel-Worrall, also btw this actual nightly, not available for pull requests. also oh yea i had mentioned this
<FromGitter> <Daniel-Worrall> yeah
<FromGitter> <Daniel-Worrall> I wanted it for PRs :<
<oprypin> so add that to github config
<FromGitter> <Daniel-Worrall> I was wondering why you linked me to the circle ci at the time
<FromGitter> <Daniel-Worrall> Alright, let's see this
<FromGitter> <Daniel-Worrall> Pls can we get a dark theme for playground
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 272 seconds]
chachasmooth has quit [Ping timeout: 268 seconds]
chachasmooth has joined #crystal-lang
avane has quit [Quit: ZNC - https://znc.in]
chachasmooth has quit [Ping timeout: 264 seconds]
avane has joined #crystal-lang
chachasmooth has joined #crystal-lang
Volk has quit [Quit: See you next time!]
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
_ht has joined #crystal-lang
<lunarkitty7> what's a good orm
<lunarkitty7> jennifer and granite both seem like the most active
<lunarkitty7> Are there any others I should look into too?
<FromGitter> <Daniel-Worrall> I've used and liked crecto recently
<FromGitter> <erdnaxeli:cervoi.se> I would like something that helps me to write SQLΒ queries (like the Jennifer query builder), but without the ORMΒ part
psydroid has quit [Quit: Bridge terminating on SIGTERM]
fifr[m] has quit [Quit: Bridge terminating on SIGTERM]
woodruffw has quit [Ping timeout: 246 seconds]
woodruffw has joined #crystal-lang
psydroid has joined #crystal-lang
<hightower3> Eh regarding my question from yesterday about having to do (x & 1) != 0 to test... I realized the ~ operator exists, so possibly easier to write: if ~(x & 1)
<hightower3> or rather, n/m, not applicable here
<hightower3> ehm, how do I force treating the ivar as Int in this case: https://carc.in/#/r/a85p
fifr[m] has joined #crystal-lang
deavmi has quit [Quit: No Ping reply in 180 seconds.]
<hightower3> so far used: x = x.as(Int) + 2 instead of +=
deavmi has joined #crystal-lang
<FromGitter> <HertzDevil> `x.x = x.x.as(Int) + 2`
deavmi has quit [Ping timeout: 246 seconds]
deavmi has joined #crystal-lang
<hightower3> right, thanks
<hightower3> Btw, was it in Crystal or Ruby that I read method arguments can have aliases?
<hightower3> ooh, crystal... pretty funky, was almost sure it wasn't
deavmi has quit [Quit: Eish! Load shedding.]
<raz> yup, that looks like a recipe for self-confusion
<raz> i'd prob constantly misread those aliases as extra args
<raz> the idea is neat tho
deavmi has joined #crystal-lang
deavmi has quit [Ping timeout: 256 seconds]
deavmi has joined #crystal-lang
Volk has joined #crystal-lang
Stephie has quit [Quit: Fuck this shit, I'm out!]
Stephie has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
<FromGitter> <HertzDevil> when a one-commit pr is merged does it automatically grab the message of the sole commit instead of the pr title
<FromGitter> <sam0x17> how's 1.0 coming? haven't checked in in a good while
<FromGitter> <HertzDevil> and does the change log choose the commit msg or the pr title in that case
<FromGitter> <Blacksmoke16> the changelog is a manual thing
<FromGitter> <weirdbricks> +1 on the question about 1.0 @sam0x17 . I would like to make a pitch to use it in projects and getting to 1.0 will help towards that
hmmm has joined #crystal-lang
<FromGitter> <watzon> Just realized Kemal isn't using the standard Log module. Sad.
<FromGitter> <Blacksmoke16> kemal hasn't really had any feature dev done in quite some time
<FromGitter> <jrei:matrix.org> Yes, people have to move on, and use something else now
<FromGitter> <jrei:matrix.org> Therea plenty of modern alternatives now
<straight-shoota> Kemal is still working very well
<straight-shoota> it doesn't need new features for the sake of it.
<straight-shoota> updating to new log module would be nice, of course
hightower2 has joined #crystal-lang
<FromGitter> <watzon> @jrei:matrix.org what lightweight alternatives do you know of?
<FromGitter> <watzon> The main thing I tend to use kemal for is really small, lightweight projects. I need something else Sinatra-esque
<FromGitter> <Blacksmoke16> coughathenacough πŸ˜„
<raz> :p
<raz> can confirm athena is reasonably lightweight (unless you get into fancy stuff)
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ff609a0fe007479e4f637a5]
<raz> that doesn't show the cool part tho, param validation!
<FromGitter> <Blacksmoke16> now you're getting into the fancy stuff πŸ˜†
<raz> heh
<FromGitter> <watzon> Lol Athena might actually work well. Is there any built in view support yet?
<FromGitter> <Blacksmoke16> like to return html?
<FromGitter> <watzon> Yessir. Specifically from .ecr files ideally.
<FromGitter> <watzon> Or any other template engine
<raz> hurm, not sure i'd recommend athena for html. if you want html you'll also want forms, cookies, CSRF and a billion other things soon :|
<raz> (imho there is no lightweight when html gets involved, unless you just want to serve static files, but then you don't need an appserver to begin with πŸ€·β€β™€οΈ)
<FromGitter> <Blacksmoke16> https://athena-framework.github.io/athena/Athena/Routing/Controller.html#render(template,layout)-macro is a thing
<FromGitter> <watzon> That's the thing, I need a lightweight framework that's got some focus on front end. I know Athena is great for API stuff.
<FromGitter> <Blacksmoke16> er sorry, the one before that
<FromGitter> <watzon> That should do it
<FromGitter> <Blacksmoke16> to raz's point, HTML is deff not a first class citizen yet
<raz> yeh, i've recently discarded the idea of HTML altogether and joined the cool kids with vue
<FromGitter> <Blacksmoke16> at least the like Lucky's level, but should suffice on a kemal level
<FromGitter> <watzon> That's fine for now. I just need something simple at the moment.
<FromGitter> <Blacksmoke16> πŸ‘
<FromGitter> <Blacksmoke16> the tools are there to be able to expand it (esp with some in progress work), just not a lot built in by default atm other than those two render macros
<FromGitter> <Blacksmoke16> happy to chat thru anything if you have any questions/issues
<FromGitter> <watzon> Wtf would cause this to suddenly start happening? ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5ff60c54e578cf1e95d050b4]
<FromGitter> <jrei:matrix.org> @Blacksmoke16: I won't call Athena lightweight and simple. More a full-featured framework
<FromGitter> <watzon> Everything was working fine one second, then I had to forcefully close a process that wasn't responding to a SIGINT and now it's telling me that libssl isn't installed.
<FromGitter> <jrei:matrix.org> Kemal is simple on the implementation and use, and don't have much concepts vs Athena
<FromGitter> <Blacksmoke16> cant be both? There are a lot of concepts but you dont need to know/use them all to get started
<FromGitter> <Blacksmoke16> but they're there when you do
<FromGitter> <jrei:matrix.org> @watzon: I know Grip and Gripen
<FromGitter> <jrei:matrix.org> @Blacksmoke16: I mean, just compare de code base. Kemal as less features but is smaller
<FromGitter> <Blacksmoke16> so?
<FromGitter> <Blacksmoke16> better to start off with something more robust than rewriting everything later when you outgrow it
<FromGitter> <jrei:matrix.org> So, @watzon seek a light library for a simple app, or I guess an app not needing loads of things from a router
<FromGitter> <Blacksmoke16> @watzon try clearing crystal cache
<FromGitter> <jrei:matrix.org> Depends of the app, really
<FromGitter> <Blacksmoke16> mhm
<FromGitter> <watzon> Cleared the cache and restarted
<FromGitter> <watzon> Still broken
<FromGitter> <Blacksmoke16> `rm -rf ~/.cache/crystal` yea?
<FromGitter> <watzon> Guess I'll try reinstalling openssl
<FromGitter> <watzon> Yep
<FromGitter> <Blacksmoke16> i blame 🍎
<FromGitter> <jrei:matrix.org> `pkg-config -lssl` (or something like that)
<FromGitter> <jrei:matrix.org> To know if the library is at least reachable
<FromGitter> <watzon> Well apparently one of the things I did worked. I think I might have screwed things up earlier when I edited my .zshrc file and just didn't notice till now because I hadn't closed that terminal window.
<FromGitter> <Blacksmoke16> that would do it
Volk has quit [Quit: See you next time!]
<FromGitter> <watzon> Unfortunately seems like Grip is fairly API focused as well
<FromGitter> <watzon> Meh I'm already using Granite, may as well use Amber as well
<FromGitter> <Blacksmoke16> boo
<FromGitter> <Blacksmoke16> missing out :p
<FromGitter> <watzon> Well I'd use Athena, but for some reason it's not exiting on SIGINT. Any idea why?
<FromGitter> <Blacksmoke16> https://github.com/athena-framework/athena/blob/master/src/athena.cr#L142 im deff capturing it
<FromGitter> <Blacksmoke16> so not sure why that wouldnt work
<FromGitter> <watzon> Hmm seems like it is actually my fault. I've got 2 futures that I'm waiting on, the one with Athena running and one with Tourmaline running. Athena definitely dies on SIGINT, but the Tourmaline one keeps running I guess. It's just weird that this didn't happen with Grip or Kemal.
<FromGitter> <Blacksmoke16> does Tourmaline also trap that signal?
hmmm has quit [Quit: WeeChat 3.0]
<FromGitter> <watzon> Nope, I should probably add that though
<FromGitter> <Blacksmoke16> πŸ‘ that would prob do it
<FromGitter> <watzon> Actually apparently I do trap the signal, but I'm not stopping the polling task
<FromGitter> <watzon> Let's see if this fixes it
<FromGitter> <Blacksmoke16> any luck?
<FromGitter> <watzon> It's working, but also not. For some reason Athena isn't actually stopping. I'll show you what I'm doing and what's happening.
<FromGitter> <Blacksmoke16> πŸ‘
_ht has quit [Remote host closed the connection]
<FromGitter> <watzon> So I'm running this ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ where LucyBot is my Tourmaline bot and I have a very basic Athena controller. When I press Ctrl+c I end up getting "bot done", but never "server done" which means that something is stopping Athena from actually exiting. [https://gitter.im/crystal-lang/crystal?at=5ff62aaf5562a61e9a8cd9b8]
aquijoule_ has quit [Remote host closed the connection]
<FromGitter> <watzon> The futures themselves are basically just spawns and the `Future.all` just uses a channel to make sure all the futures exit. This same code worked fine with Kemal and Grip though, which is why I think something may be keeping Athena from exiting fully.
richbridger has joined #crystal-lang
<FromGitter> <Blacksmoke16> interesting
<FromGitter> <Blacksmoke16> https://github.com/kemalcr/kemal/blob/master/src/kemal.cr#L92 is what kemal is doing
<FromGitter> <Blacksmoke16> maybe i need an `exit` like it has? But i would have thought just stopping the server would be enough as it would just stop/exit on its own
<FromGitter> <Blacksmoke16> could try adding that in `lib/athena/athena.cr` and see if that helps?
<raz> what if i have multiple athenas and want to stop only one of them?
<raz> not sure why someone would wanna do that but...
<FromGitter> <Blacksmoke16> fwiw, theres some nodoced stuff that would help with that
<raz> does athena ensure all ongoing requests complete before exiting btw?
<FromGitter> <watzon> Adding exit to athena didn't work. I'll let you know if I figure anything out though.
<FromGitter> <Blacksmoke16> it uses `HTTP::Server` so yes, https://crystal-lang.org/api/master/HTTP/Server.html#server-loop
<oprypin> i cant believe nobody has come up with a better stylink for the [View source] links :D https://crystal-lang.org/api/master/Array.html#==(other:Array)-instance-method
<oprypin> styling*
<raz> cool πŸ‘
<FromGitter> <watzon> For real though. The docs aren't terrible looking, but they're not great either.
<raz> what's wrong with the styling?
* raz likes the docs
<raz> just the search jumps around a bit funky sometimes
<oprypin> im talking about the [View source] link in particular, it's just too prominent and repetitive
<oprypin> also becase i cant come up with anything better myself
<FromGitter> <Blacksmoke16> > Adding exit to athena didn't work. I'll let you know if I figure anything out though. ⏎ ⏎ πŸ‘, ill play around with trying to ctrl+c and stuff as well
<raz> imho that link is fine. nice and big unambiguous click target
<raz> guess it could be made less prominent, but visually i think it actually helps to have it as a divider between the methods
<straight-shoota> +1 to that^
<raz> my fav api-docs used to be javadoc with the 3-pane frame layout. but at some point they screwed it up somehow, with tiny fonts and it feels just overcrowded now
<FromGitter> <Blacksmoke16> you see the beta athena api docs yet raz?
<raz> the one with the headings?
<FromGitter> <Blacksmoke16> http://beta.athenaframework.org/
<raz> hmm yea, not a big fan of that tbh
<raz> hierarchy not clear to me with the 3 navigations
<raz> and the typography is clean but lacks structure. like, the important stuff in the middle just blends together for me
<raz> maybe it grows on me over time, but so far i stick with the crystal docs
<FromGitter> <Blacksmoke16> give feedback to @oprypin :p
<FromGitter> <Blacksmoke16> but that what im moving towards
<raz> well, it is hereby given :P
<raz> some background color for the headlines in the middle section could already help (to have "divider bars" as visual anchors)
<oprypin> what are headlines in the middle section
<FromGitter> <watzon> Ahh that's the same style that Grip uses @Blacksmoke16
<FromGitter> <watzon> I like it
<FromGitter> <Blacksmoke16> yea, is generated from crystal source like normal api docs
<FromGitter> <Blacksmoke16> using @oprypin plugin
<FromGitter> <watzon> Ahh awesome
<lunarkitty7> the crystal docs are nicer than ruby yard docs at least :p
<FromGitter> <watzon> I'll have to set that up for Tourmaline
<FromGitter> <watzon> Fair
<FromGitter> <watzon> Though YARD is themable
<lunarkitty7> Maybe for view source, a little touch of js to fetch the source and put it inline?
<FromGitter> <Blacksmoke16> πŸ‘Ž
<FromGitter> <Blacksmoke16> well
<FromGitter> <Blacksmoke16> just some things may be quite large, so not sure how that would look
<lunarkitty7> yard has something like that, it more often than not doesn't work though from dead links too
<FromGitter> <watzon> Personally I'm a fan
<lunarkitty7> scrolling code box for long snips?
<FromGitter> <watzon> You can always omit stuff at a certain indentation level
<FromGitter> <watzon> Just add a comment `# Omitted for brevity` or something
<lunarkitty7> yeah
<raz> it looks nice, but is hard to navigate due to lack of visual cues (esp. if the page is long and you want to jump to a section)
<raz> a little eplash of color could make that easier, as one option
<lunarkitty7> are you guys actually going to change the docs or just talking about possible changes? I'd actually be pretty interested in taking a crack at it myself or helping
<FromGitter> <watzon> I'd love to have the option to choose a theme with the official doc generator
<FromGitter> <Blacksmoke16> @watzon my understanding is that's possible with what @oprypin is doing
<FromGitter> <Blacksmoke16> as its a plugin to https://www.mkdocs.org/
<oprypin> lunarkitty7, it's all real https://oprypin.github.io/crystal-chipmunk/index.html
<lunarkitty7> One doc gen I liked a lot I saw recently at least style wise (though it's a little spartan) is the custom docs for socketry projects
<oprypin> watzon, this is very themable
<oprypin> though im personally kinda lost on that front[end]
<lunarkitty7> https://socketry.github.io/async/ kind of a neat approach
<raz> hum
hmmm has joined #crystal-lang
Volk has joined #crystal-lang
<straight-shoota> lunarkitty7 how do you navigate this thing?
<raz> lol
<raz> exact same thought here
<lunarkitty7> lol
<FromGitter> <Blacksmoke16> theres prob just the one page
<raz> i mean, it *looks* neat
<lunarkitty7> idk breadcrumbs and in body links
<raz> but there doesn't seem to be any toc or nav at all?
<FromGitter> <Blacksmoke16> :S
* raz confused
<FromGitter> <watzon> Right, I mean built into the documentation generator though
<lunarkitty7> yeah I was thinking the css more so than anything else
<straight-shoota> https://socketry.github.io/async/source/ is kind of an index
<straight-shoota> but that's not very usable
<raz> oh yea, the font is nice, colors too
<raz> but i'd say that's the easy part :D
<straight-shoota> not sure I like the visuals either... =)
<straight-shoota> to little visual separation, all same font size
<lunarkitty7> a little hard on the eyes actually looking at it again yeah :p
<straight-shoota> but sure, there's good things to take for inspiration
<straight-shoota> integrated guides
<raz> layout-wise i still think java just nailed it https://docs.oracle.com/javase/7/docs/api/
<lunarkitty7> frames
<raz> but not sure how well that would transfer to crystal
<raz> yup, that's one of the cases where frames make a lot of sense. when you have hierarchy
<raz> left pane always shows you where you are and what's there to choose from
<straight-shoota> the layout doesn't need frames, though
<straight-shoota> it can work without
<raz> yeh, nowadays you'd do it with flexbox CSS 5.0 and react
<straight-shoota> crystal's API docs are pretty similar
<FromGitter> <Blacksmoke16> @watzon what happens if you were to do like
<FromGitter> <Blacksmoke16> ```@server.listen ⏎ ⏎ sleep 2.seconds``` [https://gitter.im/crystal-lang/crystal?at=5ff6350fcd31da3d9a974b59]
<raz> yup, i think crystal docs are quite good
<FromGitter> <Blacksmoke16> in `lib/athena/athena.cr`
<straight-shoota> both left sidebars are just combined because in Crystal there's no separation between namespaces and types
<raz> yea. it might be an interesting experiment to see how crystal docs would fare with a third pane on the left bottom to contain the method list etc.
<FromGitter> <Blacksmoke16> or what lib is that async thing so i can try with that code?
<raz> atm the only way to find e.g. "instance methods" is to scroll and search
<raz> an addtl pane could make that easier maybe
<straight-shoota> yeah, that toc on the right should do that
<raz> well, if you move that toc to the bottom left... :p
<straight-shoota> the location is better than squashing it on the left
<lunarkitty7> athena looks nice... might just change gears from kemal to that...
<straight-shoota> clear separation of contexts
<raz> hm hm
<straight-shoota> plus on typical widescreen monitors there's lots of horizontal space anyways
<oprypin> not on mine
<oprypin> but yea that's just me :o
<lunarkitty7> How is athena generating their docs?
<lunarkitty7> nvm
<raz> yea for me the hierarchy is off when it's on the right, but might be something i could get used to
<raz> like, when my eyes are all the way on the right, i no longer have in view where i am in the class hiarchy
<FromGitter> <Blacksmoke16> lunarkitty7: πŸ‘ feel free to message me if you have any questions/issues etc
<raz> so searching for stuff becomes a tennis match
<raz> (i often click through stuff and glance at the method list to see if it has what i'm looking for)
<FromGitter> <Blacksmoke16> as the new stuff is beta/wip atm
<oprypin> seems quite ready to me :p
<straight-shoota> > so searching for stuff becomes a tennis match
<FromGitter> <Blacksmoke16> getting there πŸ˜‰ still some more stuff i need to do before i can release it
<straight-shoota> yeah, that's true
<FromGitter> <Blacksmoke16> i.e. need to add a new component
<raz> btw actually, one thing the crystal docs could improve is how methods with many args are shown, like in the link blacksmoke just posted
<oprypin> Blacksmoke16, cant you replace the current docs now?
<straight-shoota> might be an idea to move the method sidebar between top nav sidebar and main body
<raz> line breaks between the args and lining them up would really help
<FromGitter> <Blacksmoke16> oh fair point, i suppose there isnt anything breaking as its a 1:1 port
<FromGitter> <Blacksmoke16> so i could do that then new component stuff
<oprypin> raz, it's an idea indeed. i think replacing every " : " with "&nbsp;:&nbsp;" would go a long way
<raz> yup
<raz> .new(name : String, external_name : String, annotation_configurations : ACF::AnnotationConfigurations, value : ValueType = nil, skip_when_empty : Bool = false, groups : Array(String) = ["default"], aliases : Array(String) = [] of String, since_version : SemanticVersion? = nil, until_version : SemanticVersion? = nil, type : IvarType.class = IvarType, class __arg0 : ClassType.class = ClassType)
<raz> just doesn't work so well as a single line :D
<straight-shoota> not sure if non-breaking spaces are much helpful
<FromGitter> <Blacksmoke16> to be fair i could/should `:nodoc:` some stuff...
<raz> ah right. i was more about adding line breaks between the args and lining them up (like we'd format them in the editor, too)
<straight-shoota> then the line breaks happen at some random white space inside an argument value
<oprypin> oh lol yea. not like that then
<straight-shoota> but some css layout could do the trick
<straight-shoota> wrapping flexbox with inline-block
<raz> perhaps we just need to run `crystal docs` through `crystal tool format` :P
<straight-shoota> alternatively: just make your signatures more concise :D
<oprypin> 😱
<raz> hmm. you mean even more concise than `navigator : ASR::Navigators::DeserializationNavigatorInterface`? πŸ˜›
<straight-shoota> nah, the formatter won't insert linebreaks on its own
<Andriamanitra> where is the source code for the thing that generates crystal docs
<FromGitter> <jrei:matrix.org> use some properties if possible raz
<FromGitter> <jrei:matrix.org> or a struct that embeds some of the properties
<Andriamanitra> straight-shoota: ty, i think i'll experiment with some improvements
<raz> jrei: well, my methods tend to have short signatures anyway. but sometimes long signatures are unavoidable, so the doc generator should display them nicely, too
<FromGitter> <jrei:matrix.org> raz agree 100%
<straight-shoota> of course
<straight-shoota> Andriamanitra, I'm seriously questioning if it's worth investing more time into the doc formatter
<Andriamanitra> why is that
<straight-shoota> it's a mess in a lot of places, and in some parts shamelessly broken
<straight-shoota> like Markdown rendering
<raz> what would be the alternative? rebuild or switch to something external like mkdocs?
<straight-shoota> I would remove the html generation part from the compiler and let it just extract the docs in a structured format
<raz> hmmm.
* raz scratches head
<raz> structured format = json?
<straight-shoota> yeah
<straight-shoota> that's how the mkdocs-plugin gets the data
<raz> nice. indeed. then someone could just build a cool view/react app as the viewer
<oprypin> that already exists though, it's what i use lol
<raz> vue*
<raz> ah... ok, i'm behind as usual :D
<Andriamanitra> hmm, maybe my efforts would be better spent creating my own viewer then
<raz> ohhh when that json becomes available i might try one too, that sounds like fun
<oprypin> o.o
<straight-shoota> the json is already working
<raz> hmpf, there goes my weekend, maybe :P
<straight-shoota> crystal docs --format json
<straight-shoota> even with --format html the JSON is generated as docs/index.json because the embedded search engine uses that
<raz> indeed! hm, i think i've never looked at crystal docs --help before lol
<oprypin> straight-shoota, wait what, docs/index.json is a dump of the exact same structure??
<straight-shoota> yes
<oprypin> well that's unfortunate. it's quite a big one!
<oprypin> also i wasnt aware that changing something in it could break search
<raz> should `crystal docs` work when i run it on a checkout of crystal itself, or do i need do get fancier to generate the main crystal api docs?
<raz> (it's giving me an error rn)
<oprypin> raz, `make docs`
<oprypin> (which prints out the command it uses)
<straight-shoota> raz, it should work in any shard folder (with shard.yml) but crystal repo doesn't have shard.yml
<oprypin> straight-shoota, it's not about shard.yml, no. (wait, is it??)
<straight-shoota> that's why you need to pass some config explicitly
<straight-shoota> which make docs handles for you
<raz> hmm make docs complains about llvm πŸ™ˆ
<oprypin> crystal docs without args is same as **/src/*.cr
<oprypin> straight-shoota, it's not about shard.yml, unless im horribly wrong
<raz> i'll grab the args from the Makefile and see if that works
<straight-shoota> orpyin run crystal docs in the repo =)
<oprypin> raz, dont do it manually, `make` prints that to the screen
<oprypin> straight-shoota, so what then?
<straight-shoota> The error message answers your question
<straight-shoota> > Couldn't determine name from shard.yml, please provide --project-name option
<oprypin> oh ok
<FromGitter> <watzon> @Blacksmoke16 it's https://github.com/protoncr/async
<FromGitter> <Blacksmoke16> thanks
<FromGitter> <watzon> I'll try in a bit though. Just working on mkdocs stuff for Tourmaline.
<oprypin> watzon, will you integrate api docs with my plugin?
<FromGitter> <Blacksmoke16> :p that was quick
<FromGitter> <watzon> @oprypin sure will! I was going to try the other day, but I was having trouble installing mkdocstrings because of some clang issues.
<FromGitter> <watzon> Got all that solved now though
<oprypin> wait how is clang involved in *that*
_whitelogger has joined #crystal-lang
<FromGitter> <jrei:matrix.org> straight-shoota: the project could be the directory name by default
<FromGitter> <watzon> Yep the C dependency caused an issue
<FromGitter> <Blacksmoke16> @watzon what is the poll thing doing?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ff63c735562a61e9a8d0731]
<FromGitter> <watzon> @oprypin what's the `deduplicate-toc` markdown extension?
<FromGitter> <watzon> Ahh hok
<FromGitter> <watzon> *ok
<FromGitter> <Blacksmoke16> @watzon what were you seeing again?
<FromGitter> <Blacksmoke16> wouldn't poll always block since its not fiberized or something?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ff63e0103529b296bd4171a]
<FromGitter> <Blacksmoke16> should work i think
<FromGitter> <Blacksmoke16> oh i didnt add it to the thing
<straight-shoota> jrei:matrix.org Oh, finding a name for the project really isn't an issue. It's not essential, so it wouldn't even matter if it was empty
<straight-shoota> the point is to error if the automatic recognition based on shard.yml fails
<straight-shoota> and most crystal projects should have a shard.yml, so in practice that should rarely fail
<straight-shoota> unless you're building stdlib docs
<oprypin> mkdocs.yml can take care of that :D :D :D
<FromGitter> <jrei:matrix.org> I really think it should work without this file
<straight-shoota> it does, you just need to tell the name =)
<FromGitter> <jrei:matrix.org> yes, but as you said, that's not even that important
<straight-shoota> but what's the point in having no name?
<straight-shoota> by default
<FromGitter> <jrei:matrix.org> usually the directory name is close to the actual library name
<FromGitter> <jrei:matrix.org> so that's a good enough default IMO
<FromGitter> <jrei:matrix.org> btw that's how `shards init` do
<FromGitter> <jrei:matrix.org> *what it does
<straight-shoota> and that's fine because shards init is usually run interactively
<FromGitter> <jrei:matrix.org> ha?
<straight-shoota> crystal docs runs a lot in automated environments
<FromGitter> <jrei:matrix.org> shards init --help does not print if/how to run interactively
<straight-shoota> if the repo is checked out in a randomly named directory, you wouldn't want that to show up as project name
<straight-shoota> I mean a human being runs the program in their teminal
<FromGitter> <Blacksmoke16> @watzon i think the loop isnt giving any time to switch to other fibers which the trap runs in
<straight-shoota> and the result is double checked when you commit to vcs
oddp has joined #crystal-lang
<FromGitter> <jrei:matrix.org> the name is really not a big deal for me - content matters a lot more
<FromGitter> <jrei:matrix.org> not sure I will notice if the name change on the API docs...
<straight-shoota> but exactly that's the point
<straight-shoota> if it doesn't fail, it can go unnoticed
<straight-shoota> very easily
<straight-shoota> So failing is good because it draws attention that something doesn't work as intended
<straight-shoota> if you have a project without shard.yml you can just setup a make recipe and call "make docs" instead of "crystal docs"
<FromGitter> <Blacksmoke16> @watzon i think you can only have one handler per signal
<FromGitter> <Blacksmoke16> so they might be overriding each other?
<FromGitter> <Blacksmoke16> because when i run one or the other its fine, running them both things dont fully exit
<FromGitter> <jrei:matrix.org> maybe. just feel strange to mention shard.yml. I still find that having a strong bind between a language and a package manager is not that great
<straight-shoota> so you would rather use the directory name than the shard name from shard.yml?
<FromGitter> <jrei:matrix.org> no, but just not mention it
<straight-shoota> but whether its mentioned in the error message or not doesn't change that crystal docs collects input from shard.yml
<FromGitter> <jrei:matrix.org> anyway, this will be moved out from the compiler.
<FromGitter> <jrei:matrix.org> the outside doc generator could have this logic
<FromGitter> <jrei:matrix.org> and the Crystal compiler focus on crystal files
<FromGitter> <jrei:matrix.org> Having logic related to Git, shards, Travis, etc in the compiler - I'm not fan πŸ˜…
<oprypin> interesting color experiment 😩 https://oprypin.github.io/crsfml/api/system.html
<Andriamanitra> i think it's better to have some of the most commonly used things bundled, otherwise everyone will waste their time creating countless (bad) competing implementations and no actual work gets done
<Andriamanitra> power users will find a way to create their own things anyway but for us casual programmers having git, shards etc well integrated with compiler is a life saver
<FromGitter> <jrei:matrix.org> that's not better to core member waste time on a tool
<FromGitter> <jrei:matrix.org> but it can still be bundled
<FromGitter> <jrei:matrix.org> like shards come with crystal, the doc generator can too
<straight-shoota> yes, it should definitely be bundled
<FromGitter> <jrei:matrix.org> Andriamanitra: do you know that `crystal deps` => `shards`
<FromGitter> <jrei:matrix.org> so at then, we will have `crystal docs` => `whatever-doc-gen`
<Andriamanitra> ah, that makes sense
<Andriamanitra> i didnt even realize shards are separate from the compiler
<FromGitter> <jrei:matrix.org> monorepo is cool, but we as easily have teams maintaining separate parts of the code
<FromGitter> <jrei:matrix.org> *can't have
<oprypin> jrei:matrix.org, monorepo has literally 0 downside for collaboration, if that's what you're saying
oddp has quit [Quit: quit]
<FromGitter> <jrei:matrix.org> oprypin: I don't agree, because you can't freely develop/deploy
<FromGitter> <jrei:matrix.org> not as easily at least
<oprypin> then that's a problem of something other than the actual repo
<FromGitter> <jrei:matrix.org> I don't say you *can't$ - everything's possible
<FromGitter> <jrei:matrix.org> I think that's why shards has been separated from crystal?
<FromGitter> <jrei:matrix.org> and why the doc generator could be too?
<FromGitter> <jrei:matrix.org> at least on GitHub, what I can see is to have less PRs depending of few members approvals...
<oprypin> jrei:matrix.org, again that's a human problem, not a repo problem
<FromGitter> <jrei:matrix.org> absolutely, all is about humans
<FromGitter> <jrei:matrix.org> how GItHub is done make several teams on a monorepo harder to manager, that's it
<FromGitter> <Blacksmoke16> How so?
<FromGitter> <jrei:matrix.org> there are CodeOwners that improve the situation a bit
<FromGitter> <Blacksmoke16> ^
<oprypin> > requires repo write rights to be a codeowner
<oprypin> so that sux
<FromGitter> <jrei:matrix.org> yeah, not ideal either. As you said oprypin, the goal is to have more people be able to handle more code. How to do it in GitHub usually is multiple repos
<FromGitter> <jrei:matrix.org> I mean, that's of course a people issue
<FromGitter> <jrei:matrix.org> GitLab is better with monorepos, AFAIK
<oprypin> u could do a fork and delegate some part of it to some other team, then arrange no-questions-asked merges into main repo
<oprypin> but yea github indeed could do more
<FromGitter> <jrei:matrix.org> maybe, but nothing stop the teams touching the code of others
<oprypin> that could have a technical solution
<FromGitter> <jrei:matrix.org> totally different subject: how many installation you got with nightly.link?
<FromGitter> <jrei:matrix.org> *GitHub App ones
<FromGitter> <watzon> @Blacksmoke16 that makes sense actually
<FromGitter> <watzon> Not ideal
<FromGitter> <Blacksmoke16> Indeed b:/
<FromGitter> <Blacksmoke16> whats the use case for wrapping those in that future thing?