ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.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
Human_G33k has quit [Ping timeout: 240 seconds]
dwdv has quit [Ping timeout: 276 seconds]
netbastard has quit [Ping timeout: 252 seconds]
teardown has joined #crystal-lang
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 268 seconds]
ht_ has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 250 seconds]
<FromGitter> <ndbroadbent> hello! I was just wondering what's going on with the Crystal VS Code extension? It's completely broken for me when I use "format on save", and this PR hasn't received any attention: https://github.com/crystal-lang-tools/vscode-crystal-lang/pull/99
<FromGitter> <ndbroadbent> I've love using Rubocop in my Ruby projects, even though it's incredibly slow (even with the rubocop-daemon wrapper.) So I was really excited to try out Crystal and get really fast auto-formatting (since it's compiled.)
<FromGitter> <ndbroadbent> do most Crystal developers not use the format option in VS code?
<FromGitter> <ndbroadbent> would it be possible for all of the crystal-lang-tools repos to be officially supported and maintained by a team? It seems like vscode-crystal-lang is currently a project by a solo developer who doesn't have any time to work on it anymore
dwdv has joined #crystal-lang
alexherbo2 has joined #crystal-lang
kevinsjoberg has joined #crystal-lang
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
<kevinsjoberg> How do I pass command line arguments to my program when running "crystal spec <file>"? I tried doing "crystal spec <file> -- MYARG=1" but that does not seem to do it.
<repo> kevinsjoberg: how do you use them in your code?
<repo> oh to crystal spec...
<repo> not sure that works
<repo> you'd probably have more luck using env vars
<FromGitter> <ndbroadbent> I hope this will help! https://twitter.com/getdocspring/status/1201456721832505345
<FromGitter> <husam212> Hi, I'm trying a simple app using `kemal`, I want to render a template dynamically using one of the URL params, like the following: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5de4f29ad64a052fb69f7bd8]
dwdv has quit [Ping timeout: 250 seconds]
<FromGitter> <priit> Hi, I'm figuring out same goal, to render template dynamically. I looked into slang at the moment at https://github.com/jeromegn/slang
alexherbo2 has joined #crystal-lang
<kevinsjoberg> repo: Sure, I could try env vars but are you saying I can't pass a command line flag to my program when running it via "crystal spec"?
<kevinsjoberg> Do I have to build the binary for it to work then?
<FromGitter> <priit> @husam212: more reading at https://github.com/crystal-lang/crystal/issues/1942 @husam212
dwdv has joined #crystal-lang
<repo> kevinsjoberg: well, spec has it's own arg parsing
<repo> so that will probably clash with yours
<FromGitter> <a8vbtb7p> Hello. I want to run a own Invidio instance. I must route it through socks5 proxy, how is it possible? Invidio otherwise wont work.
<FromGitter> <j8r> Invidio? Invidious you mean?
<repo> invidio.usa
<repo> -a
<FromGitter> <ndbroadbent> Hi everyone! Are there any other Crystal sponsors in here? Please let me know if you might be interested in pooling our resources and sponsoring incremental compilation for the Crystal compiler: https://forum.crystal-lang.org/t/sponsorship-for-incremental-compilation/1428
<FromGitter> <j8r> Unfortunately incremental compilation is not for the near future, because it requires quite big breaking changes in the language design
<FromGitter> <j8r> It's not only technical
<FromGitter> <j8r> for now the best bet is to split a huge application in smaller ones, that's why Crystal is perfectly fitted for micro-services - despite having static linking broken :(
alexherbo28 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 265 seconds]
HumanG33k has quit [Remote host closed the connection]
duane has joined #crystal-lang
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
duane has quit [Ping timeout: 265 seconds]
alexherbo28 has quit [Ping timeout: 246 seconds]
alexherbo287 has joined #crystal-lang
alexherbo2877 has joined #crystal-lang
alexherbo287 has quit [Ping timeout: 250 seconds]
alexherbo28771 has joined #crystal-lang
alexherbo2877 has quit [Ping timeout: 252 seconds]
DTZUZO has quit [Quit: WeeChat 2.0]
DTZUZO has joined #crystal-lang
<FromGitter> <asterite> I was going to reply something like that, but I didn't because we think incremental compilation might not be possible without language changes, but it's just a thought. We need to investigate it to draw good conclusions. So I think having an opportunity to do that would be fantastic.
<FromGitter> <asterite> That is, let's not close the doors before they are open
<FromGitter> <ndbroadbent> I would love to hear more about the reasons why incremental compilation will be difficult! I've been spending some time thinking about it, and I can't really see why it's too difficult
<FromGitter> <ndbroadbent> even if it's not perfect, I'm sure there are tons of things that can be cached in a simple way
<FromGitter> <ndbroadbent> just based on file mtimes and AST nodes
<FromGitter> <ndbroadbent> whoops I'm just reading this post from almost 4 years ago: https://crystal-lang.org/2015/12/24/the-future-of-crystal.html
<FromGitter> <ndbroadbent> haha sorry, I'm sure a lot of thought has gone into this
<FromGitter> <ndbroadbent> are there any more recent posts and articles I should read?
<FromGitter> <j8r> @ndbroadbent I would like to know, any good reason not to go to API <=> Front design?
<FromGitter> <j8r> because you will rewrite your application
<FromGitter> <ndbroadbent> oh yeah, that could be an option, if I move all my front-end into a React SPA with TypeScript
<FromGitter> <ndbroadbent> but the static type-checking for Lucky views also sounds really nice: https://luckyframework.org/guides/frontend/rendering-html
<FromGitter> <j8r> I you want perf, and less compilation time overall, i think it's a good option
<FromGitter> <ndbroadbent> but I do still have a lot of models and backend code for my API, and background job workers, etc.
<FromGitter> <ndbroadbent> i've been talking to the creator of the hexapdf library, who might be interested in working on a Crystal port: https://github.com/gettalong/hexapdf
<FromGitter> <j8r> Ok, but you have to rewrite everything :/
<FromGitter> <ndbroadbent> so one of the main reasons I'm super interested in Crystal is because I'm working on some PDF generation software, which is originally written in Ruby. I've been using the Prawn PDF library, which is basically unmaintained and full of bugs and unhandled edge cases. I've been working with some contractors on some of these PDF bugs and crashes, and I realized that I've probably spend over $10k just fixing
<FromGitter> ... mostly type errors that would have been instantly caught by Crystal
<FromGitter> <ndbroadbent> so porting my PDF generation engine to Crystal (and running the job with sidekiq.cr) will be a huge win
<FromGitter> <ndbroadbent> so I think that will be a great start, and can be done independently
<FromGitter> <ndbroadbent> then later on it would be great to also rewrite my API endpoints in Crystal. So there are some ways that I can keep things separate
<FromGitter> <Blacksmoke16> JSON API?
<FromGitter> <ndbroadbent> i'm using OpenAPI / Swagger
<FromGitter> <ndbroadbent> also very interested in porting the rswag gem to Crystal, because that's been really nice to work with (https://github.com/rswag/rswag)
<repo> ndbroadbent you can try out my shard :) https://github.com/repomaa/open_api.cr
<FromGitter> <ndbroadbent> awesome!
<hightower4> ndbroadbent interesting, do you think openapi will continue to prosper when there is now graphql?
<repo> i think so
<FromGitter> <ndbroadbent> I think they can both be useful for different cases. graphql is great for data-centric APIs where people need to read and query a lot of data, but I really prefer REST / OpenAPI when I'm building an API-as-a-service
<repo> currently our architecture is multiple micro services with rest api providing index actions that allow filtering with ids (amongst other things), and then we have a thin graphql layer on top of that which uses the pretty awesome dataloader js lib to optimize the requests to the api
<repo> the tooling for graphql is pretty great on js altough i really don't like writing it
<repo> namely apollo server
<repo> but dataloader is really a great solution for connecting graphql to rest apis
<repo> something that would translate into hundreds of requests suddenly translate into 12 or so
<repo> and it keeps the rest api's very straight forward
<repo> no magic needed
<repo> no relation fetching
<repo> but it's crucial to provide index method which take an array of ids as a filter query
<repo> *an
<repo> otherwise dataloader can't utilize caching
<FromGitter> <Blacksmoke16> normally id say "check out Athena" if you're making a JSON API, however it's going thru some heavy refactoring ATM; so probably not the best idea...unless you want to be *bleeding* edge ha
duane has joined #crystal-lang
DTZUZO has quit [Ping timeout: 268 seconds]
alexherbo28771 has quit [Ping timeout: 252 seconds]
alexherbo287713 has joined #crystal-lang
<FromGitter> <yxhuvud> I rails I found the json api implementations to be too opinionated to work well with our use case so we rolled our own.
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
<FromGitter> <j8r> @ndbroadbent you can also find a C library, and generate bindings
<FromGitter> <yxhuvud> but then we use the standard more to shortcut format and data layout discussions rather than as way to automate integration.
DTZUZO has joined #crystal-lang
alexherbo2877135 has joined #crystal-lang
alexherbo287713 has quit [Ping timeout: 276 seconds]
<FromGitter> <kinxer> @Blacksmoke16 Surely there are older releases of Athena that would still work well?
<FromGitter> <Blacksmoke16> the current one would yea
<FromGitter> <kinxer> Is your major refactor going to break a lot of the API?
<FromGitter> <Blacksmoke16> yes
<FromGitter> <Blacksmoke16> like almost all of it :p
<FromGitter> <kinxer> Ah... Gotcha. So probably it's not a good idea to use an older release.
<FromGitter> <Blacksmoke16> yea, switching controllers from classes to structs, and breaking DI changes, and changing how i handle events (moving away from `HTTP::Handler` in favor of https://github.com/athena-framework/event-dispatcher style
<FromGitter> <Blacksmoke16> granted a lot of the changes are internal, mostly minor breaking changes for the end user. But still prob not worth setting something up just to have to redo some of it again later
<FromGitter> <Blacksmoke16> id be happy to go over the current plans/status if you/anyone else has any feedback. Is hard designing everything on your own ha
<FromGitter> <tenebrousedge> Kai recommends breaking all the things without prior notice
<FromGitter> <tenebrousedge> that's how you get the most feedback
<FromGitter> <Blacksmoke16> hehe, granted i wonder how many people actually read the changelog before updating
<FromGitter> <Blacksmoke16> *guess we'll find out*
<FromGitter> <kinxer> I mean, you'll increment the minor revision number, right? That should at least prevent anyone with ` ~0.X.*` versions from getting the newest changes accidentally.
<FromGitter> <Blacksmoke16> yea ofc
<FromGitter> <Blacksmoke16> `0.7.0` to `0.8.0`
<repo> i'll put Athena on my list
<repo> last time i checked nothing was quite fitting my requirements so i went and wrote mostly from scratch using crecto, router.cr and paramnoia
<FromGitter> <Blacksmoke16> what were your requirements?
<repo> i needed crecto and i wanted type safe params
<repo> so far crecto is the most advanced orm imo
<FromGitter> <Blacksmoke16> is independent of any particular ORM, however some features would require the ORM to implement some specific methods if it doesnt have them already
<repo> i had a lot of really complex joins and queries that none of the big ones managed
<FromGitter> <Blacksmoke16> i.e. like `Model.find id`
<repo> (without resulting to raw sql)
<FromGitter> <Blacksmoke16> is it back? last i heard it was abandoned
<repo> yeah it's back
<FromGitter> <Blacksmoke16> ah nice one
<repo> but that was tough when fridgerator announced it's abandoned :D
<repo> i had just built a multi-thousand-line codebase on it :D
<FromGitter> <Blacksmoke16> xD that would do it
<repo> but now i'm happily running it on 0.31.1
<repo> i really really like avram
<repo> but it doesn't even support OR
alexherbo2877135 has quit [Ping timeout: 245 seconds]
<FromGitter> <Blacksmoke16> i mainly been going with Granite, fits into the annotation approach similar to what Athena does, afaik its the only one that allows you do apply annotations to the underlying ivars
<repo> afair granite wan't typesafe
<FromGitter> <Blacksmoke16> typesafe queries?
<repo> yeah
<FromGitter> <Blacksmoke16> yea dont think that part is
<repo> oh CrSerializer looks really nice!
<repo> good job!
<FromGitter> <Blacksmoke16> thanks :)
<FromGitter> <Blacksmoke16> serialization side of it is mostly done, still some things to iron would with the other direction
<repo> cool
<FromGitter> <Blacksmoke16> er no i think that was finished too
<FromGitter> <Blacksmoke16> really just need to start migrating these shards to the org now
DTZUZU has quit [Quit: WeeChat 2.2]
DTZUZU has joined #crystal-lang
ht_ has joined #crystal-lang
<Xeago> Hiya, I'm looking to spend some hobby time with crystal this holiday period. I saw references to use vscode and native-debug. I've installed `faustinoaq.crystal-lang` into vscode but get nowhere near the developer experience shown in the readme for the extension.
<Xeago> I created appropriate task and launch config files, which do build but then don't actually launch a debugger.
<Xeago> I can run code using the play button in vscode, but debugging is futile. I've checked, and llvm is installed.
<FromGitter> <tenebrousedge> you're working off of this guide (https://github.com/amberframework/docs/blob/master/examples/crystal-debug.md)?
dostoyevsky has quit [Ping timeout: 276 seconds]
dostoyevsky has joined #crystal-lang
_whitelogger has quit [*.net *.split]
FromGitter has quit [*.net *.split]