<raz>
first we invented VMs to solve the problems with linux distros
<raz>
then we invented containers to solve the problems with VMs
<raz>
then we invented docker to solve the problems with containers
<raz>
then we invented kubernetes to solve the problems with docker
<raz>
and now the layered complexity is so insane that everyone just gives their money to aws/google to manage that nonsense for them :P
<FromGitter>
<tenebrousedge> the complexity prior to docker/lxc was also pretty intense
<FromGitter>
<tenebrousedge> vagrant, puppet, etc
<raz>
yeh, don't get me started on those. :D (i do this stuff for a living *sob*)
<FromGitter>
<tenebrousedge> and before that every install was a hand-tuned or hand-scripted garbage fire
<FromGitter>
<tenebrousedge> we used sysvinit and we LIKED IT
<raz>
don't get me started on systemd either! :p
<raz>
anyway, didn't mean to hate on docker. personally i actually find plain docker the sweet spot at the moment. with vagrant for dev env sanity.
<raz>
just wouldn't recommend k8s to anyone. unless you have a team for it
<FromGitter>
<tenebrousedge> what's your alternative for a docker workflow?
<FromGitter>
<Blacksmoke16> swarm is nice for simple personal stuff, but i didnt want to really recommend it since they're also saying go use K8s
<FromGitter>
<tenebrousedge> I should probably pick up a book on k8s <_<
<raz>
tene, very broad question, depends a lot on the use-case, e.g. what kind of discovery you need
<raz>
basically step 1: avoid zookeeper and anyone using it like the plague
<raz>
anything*
<raz>
and step 2: decide what parts of the persistence layer you really want to host yourself. life becomes infinitely easier if you're willing to let AWS/google have the db and disks
mps has left #crystal-lang [#crystal-lang]
<raz>
on a more practical note: s6-overlay is wonderful for pid0. treating docker more like VMs also makes life a lot easier.
* FromGitter
* tenebrousedge takes notes
<raz>
but in fairness ofc not all of that is possible in every situation. if you're a 500 people dev team then i guess having a "helm chart unit" can make sense. likewise if you're small and willing to go all in with ecs/fargate/google cloud.
<raz>
just pm me when you've taken the latter too far and google is now sending you these 5 figure invoices for that 500rpm webapp. :D
<FromGitter>
<Blacksmoke16> `CRYSTAL_WORKERS` should be set to the number of cores/thread that a CPU has correct?
<FromGitter>
<Blacksmoke16> er I know thats how it should normally work, but more so curious about what if the CPU has like 28 threads, should it really be set to 28?
<raz>
i would say yes (but don't know much about crystal's multithreading, it's still experimental innit?)
<FromGitter>
<Blacksmoke16> yea
<raz>
in general setting it to the number of physical cores is usually the safe bet
<raz>
hm, looking at these ranks i think crystal is doing pretty great already
<raz>
wonder if they ran it with MT or without
<FromGitter>
<Blacksmoke16> idt any do
<FromGitter>
<Blacksmoke16> most spawn multiple processes
<FromGitter>
<Blacksmoke16> trying out my athena rewrite on it locally at least for now
alex`` has quit [Ping timeout: 258 seconds]
<FromGitter>
<tenebrousedge> I'm not wild about those performance figures, personally, but I don't think I can do anything to improve them
<FromGitter>
<Blacksmoke16> im not expecting to be the highest (would be surprised if it was)
<raz>
yeh, crystal is way deep in the "good enough" ballpark. i mean, when was the last time you needed to push >200k reqs/sec from a single box ;)
<FromGitter>
<Blacksmoke16> some are just a bit outdated/might not be using optimal setups
<FromGitter>
<tenebrousedge> 🎶 I want the world / I want the whole world 🎶
<FromGitter>
<straight-shoota> > `CRYSTAL_WORKERS` should be set to the number of cores/thread that a CPU has correct? ⏎ ⏎ Using the number of (logical) cores is typically not a bad idea as default. But obviously, it's not always the best thing. It depends on many factors, the kind of application, environment configuration, machine specs, workload etc.
<FromGitter>
<Blacksmoke16> 👍
return0e has joined #crystal-lang
return0__ has quit [Ping timeout: 258 seconds]
Nicolab has quit [Quit: Leaving.]
<FromGitter>
<Blacksmoke16> yea rip, this is saying kemal is 2x faster
<FromGitter>
<Blacksmoke16> which is probably an accurate statement
duane has quit [Read error: Connection reset by peer]
<FromGitter>
<girng> @Blacksmoke16 "the former has to compile the binary then run it, the latter just runs it" ⏎ yeah, but the compiler uses around 450mb even after compiling is over, that can't be normal can it?
<FromGitter>
<Daniel-Worrall> It's probably releasable memory. If you had another program request ram, it might release it
<FromGitter>
<Daniel-Worrall> Not like I know about memory though
<FromGitter>
<stnluu_twitter> @girng What ^ said + could be the difference between debug build vs release build
ur5us has quit [Ping timeout: 260 seconds]
tankf33der has left #crystal-lang [#crystal-lang]
_whitelogger has joined #crystal-lang
ht_ has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
Yxhuvud has joined #crystal-lang
vitallium has joined #crystal-lang
Nicolab has joined #crystal-lang
ur5us has joined #crystal-lang
<FromGitter>
<Nicolab> do you know if we can open several connections with Jennifer (2 postgres servers)?
<FromGitter>
<Nicolab> I have an crazy (or not) thought that crosses my mind. Use Diesel (Rust) in FFI from Crystal. It's challenging but not sure it's safe 😈 ⏎ ⏎ What do you think?
ur5us has quit [Ping timeout: 260 seconds]
<FromGitter>
<straight-shoota> @Nicolab Probably not a good idea. An ORM's purpose is to map a database interface to an idiomatic interface in a programming language. In order to that, you would need to customize the API for Crystal in such a way that you're better of skipping Rust/Diesel as an intermediary entirely. Instead, you could simply port it to Crystal.
<FromGitter>
<straight-shoota> There are already a number of ORMs for Crystal, maybe there's already a similar one?
vitallium has joined #crystal-lang
alex`` has joined #crystal-lang
return0__ has joined #crystal-lang
return0e has quit [Ping timeout: 268 seconds]
Nicolab has quit [Quit: Leaving.]
<FromGitter>
<Blacksmoke16> Granite allows setting up multiple connections and you define which one a model should use
alex`` has quit [Ping timeout: 268 seconds]
alex`` has joined #crystal-lang
<FromGitter>
<vlazar> @Nicolab If you are looking for type-safety check out Avram from Lucky.
sorcus has quit [Ping timeout: 245 seconds]
<repo>
avram is awesome but still very incomplete feature wise imho
<FromGitter>
<andrewc910> @Nicolab Jennifer only supports 1 db right now.
<FromGitter>
<andrewc910> The creator is working on multi db support currently. Should be out next release. There is a roadmap in the issues section
duane has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
Nicolab has joined #crystal-lang
vitallium has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
uu91 has joined #crystal-lang
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
sorcus has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
Nicolab has quit [Quit: Leaving.]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
HumanG33k has joined #crystal-lang
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
ht_ has joined #crystal-lang
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
Nicolab has joined #crystal-lang
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<grkek> Hello
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Nicolab> Indeed it seems a bad idea (Diesel and FFI for the DB results). ⏎ ⏎ Thank you for your opinions and good to know that Jennifer is working on Multi DB
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Nicolab> Crecto looks good but less maintained. Someone use Crecto?
vitallium has quit [Client Quit]
<FromGitter>
<Nicolab> Hello @grkek
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<grkek> how are you ?
<FromGitter>
<grkek> @Nicolab
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Nicolab> @grkek Well thank you, in mode 50 tabs open to try to equip me for my Crystal trip :) And you?
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Nicolab> Of course, my IDE also open to test all of this
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<grkek> I am mastering neovim rn
vitallium has quit [Client Quit]
<FromGitter>
<grkek> tired of all the mouse/keyboard switching
<FromGitter>
<tenebrousedge> check out spacevim too
<FromGitter>
<grkek> also seems like I am loosing hearing in my left ear
<FromGitter>
<grkek> that's what you get for listening to noise music
<FromGitter>
<tenebrousedge> oh dear
<FromGitter>
<grkek> it looks beautiful
<FromGitter>
<grkek> @tenebrousedge
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Nicolab> @grkek shit for your hearing :/ ⏎ ⏎ Neovim is very good, I start quietly too.
<FromGitter>
<tenebrousedge> It's quite nice. I quite like it for writing backend code. I'm probably going to switch to VSCode (with vim bindings) for writing React/TS, though
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Nicolab> motivated !
vitallium has quit [Client Quit]
<FromGitter>
<grkek> its comfy af
<FromGitter>
<grkek> i dont like the slack knock brush sound
<FromGitter>
<grkek> if I replace the Json::any::type
<FromGitter>
<grkek> with string
<FromGitter>
<grkek> it works
<FromGitter>
<grkek> ???
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> yea i dunno, you're in the world of dealing with unions
<FromGitter>
<Blacksmoke16> not an fun place to be :p
vitallium has joined #crystal-lang
<FromGitter>
<grkek> unions are pain
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> indeed
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> what are you trying to do? support json responses in your framework?
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<grkek> yes oh my god
<FromGitter>
<grkek> I want the first element of the tuple to be
<FromGitter>
<grkek> something like a symbol
<FromGitter>
<grkek> for example
<FromGitter>
<grkek> :ok
<FromGitter>
<grkek> :not_found
vitallium has joined #crystal-lang
ur5us has joined #crystal-lang
<FromGitter>
<grkek> or an int
<FromGitter>
<grkek> like 204
<FromGitter>
<Blacksmoke16> prob better off using a struct like `Response`
<FromGitter>
<grkek> and the other part to be whatever jsonable the fuck i want
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> is probably how im going to implement custom view layers in mine
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> if the return type is `Response` then just return it, copying stuff to actual response
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> other wise, try to render the response value
<FromGitter>
<Blacksmoke16> maybe with a `Template` type as well, TBD :P
vitallium has joined #crystal-lang
<FromGitter>
<grkek> interesting
<FromGitter>
<grkek> unions are fucking dumb
<FromGitter>
<grkek> but great
<FromGitter>
<grkek> at the same time
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> but in your case it could be like `Response.new 200` or `Response.new :ok` where each is a diff overload, one for Int other for an enum
<FromGitter>
<Blacksmoke16> where the former could just be like `new Status.from_value number`
<FromGitter>
<Blacksmoke16> id argue `Response.new 200, {body: "Hello, GET!"}.to_json` is more readable than that
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<grkek> true
<FromGitter>
<grkek> just realized that
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> granted crystal is a bit different to what im used to in how the response is automatically created for you within the context
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> idk people's thoughts on like `ctx.response = my_response_obj`
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> to allow like overriding the response with your own obj, versus having to pass and mutate the same obj throughout the request lifecycle
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> might just monkey patch that in...
<FromGitter>
<Blacksmoke16> that defines a method on the top level, using a global instance of the router
vitallium has joined #crystal-lang
<FromGitter>
<grkek> that doesn't exist anymore
<FromGitter>
<grkek> but yeah i use the same
<FromGitter>
<grkek> method to define
<FromGitter>
<grkek> things
vitallium has quit [Client Quit]
<FromGitter>
<grkek> also i hit a 91k
<FromGitter>
<grkek> mark
<FromGitter>
<grkek> on a single instance
<FromGitter>
<grkek> insane
<FromGitter>
<Blacksmoke16> i suppose you could add those methods into a module or something to help namespace things
vitallium has joined #crystal-lang
<FromGitter>
<grkek> Maybe just define a sub module
<FromGitter>
<grkek> I might do that tomorrow
<FromGitter>
<grkek> its like 1 in the night here
<FromGitter>
<grkek> rip
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> dunno, depends on how you want things to work
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<grkek> thank you for the help
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<grkek> 93657
vitallium has quit [Client Quit]
<FromGitter>
<grkek> reached another
<FromGitter>
<grkek> love it
<FromGitter>
<grkek> so basically the static file handler was
<FromGitter>
<grkek> suffocating it
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> is a balance between having a framework that is super fast but doesn't really do anything, and one that does a lot but is still fast
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> but is slower*
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> the key being *fast enough*
vitallium has quit [Client Quit]
<FromGitter>
<grkek> is my framework really that horrible :D ?
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> i was talking generally
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> but at this point (after you removed all the kemal features :p) its essentially just a wrapped router with a better dsl
vitallium has quit [Client Quit]
<FromGitter>
<grkek> not all of them
<FromGitter>
<Blacksmoke16> most* :p
<FromGitter>
<grkek> yeah it is a wrapped router
<FromGitter>
<grkek> but still
<FromGitter>
<grkek> no one needs file serving via rest
vitallium has joined #crystal-lang
<FromGitter>
<grkek> normal people use cdn
<FromGitter>
<grkek> :D
<FromGitter>
<Blacksmoke16> for sure, but now you need to think about what features you want to add on top of routing
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> which is where things get more complicated
vitallium has joined #crystal-lang
<FromGitter>
<grkek> id love a scaffolding
<FromGitter>
<grkek> and db stuff
<FromGitter>
<grkek> bundled with it
vitallium has quit [Client Quit]
<FromGitter>
<grkek> im going to do something tremendously stupid
<FromGitter>
<grkek> and integrate leveldb
<FromGitter>
<grkek> with it
vitallium has joined #crystal-lang
<FromGitter>
<grkek> ill be just like god was to me
<FromGitter>
<grkek> lets mess this boy up
<FromGitter>
<grkek> w8 lemme link somehting
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> that would be one option, most frameworks usually come bundled with their own orm
<FromGitter>
<Blacksmoke16> like rails has activerecord, symfony has doctrine etc
vitallium has quit [Client Quit]
<FromGitter>
<grkek> I want to make automatic migrations like django has
<FromGitter>
<grkek> its such a comfy feature
<FromGitter>
<grkek> not to write your own migrations
<FromGitter>
<grkek> in pure
<FromGitter>
<grkek> fucking
<FromGitter>
<grkek> SQL
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> can be helpful to give extra features, but gotta make sure its feature complete (or enough) to be useable
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> sounds like a plan
vitallium has joined #crystal-lang
<FromGitter>
<grkek> steal couple of ideas from that then from this
<FromGitter>
<grkek> stitch it together
<FromGitter>
<grkek> and done
<FromGitter>
<grkek> tadam
vitallium has quit [Client Quit]
<FromGitter>
<grkek> call it yours and be proud of it :D
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> indeed
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<grkek> the more comfy you wrap around something the slower it gets
vitallium has joined #crystal-lang
<FromGitter>
<grkek> take python for example
<FromGitter>
<grkek> interesting hm
<FromGitter>
<Blacksmoke16> python is slow because its python
<FromGitter>
<grkek> but crystal kinda beat that
vitallium has quit [Client Quit]
<FromGitter>
<grkek> the statement
<FromGitter>
<grkek> that if you want something fast
<FromGitter>
<grkek> you have to write it in cave language
<FromGitter>
<grkek> ooga booga(){ ⏎ return0; ⏎ }
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> no, i meant that when writing a framework (no matter the language) you can make something be super fast (in relation to other frameworks of that language) but not have many features, or be slower than the average framework, but it does a lot of work for you
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> the key is the balance between speed and available features
<FromGitter>
<grkek> agreed
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> i sacrificed speed in athena for some fancy features, but its still *fast enough*
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> ~2x slower than kemal but still plenty fast
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<grkek> i really love the
<FromGitter>
<grkek> annotation declarations
<FromGitter>
<grkek> something I have my eye on
<FromGitter>
<grkek> since i've met your framework
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> can do some fancy stuff with them :p
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> also made a dsl so you can do like
<FromGitter>
<grkek> i was browsing it in my editor
<FromGitter>
<grkek> in a switch statement
<FromGitter>
<grkek> painful to watch
<FromGitter>
<grkek> lmao
vitallium has joined #crystal-lang
<FromGitter>
<grkek> so basically kemal is obsolete at this point
vitallium has quit [Client Quit]
<FromGitter>
<grkek> but you still don't support websockets
<FromGitter>
<grkek> ???
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> kemal is deff not obsolete
<FromGitter>
<Blacksmoke16> a bit outdated maybe tho?
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> idt annotations even existed when it was first created
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<grkek> it is a bit outdated true
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
early has quit [Quit: Leaving]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
ht_ has quit [Quit: ht_]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<grkek> an IO bound operation such as logging is pretty slow :<
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> yes, normally in prod you would only log like warnings or higher
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> severity wise
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<grkek> lovely
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<kinxer> @Blacksmoke16 Would it be possible, in theory, to build a logging framework that uses macros to bundle your logging messages at compile time into a constant hash or array or something and then have a more lightweight access method during runtime, like communicating the hash to the string or an integer index or something to a separate fiber which then accesses the constant hash and does the logging
<FromGitter>
... asynchronously? Maybe not exactly that, but basically a way to lower logging runtime cost by increasing compile time and executable size?
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> the slow part of logging is the IO operations no?
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> if anything having the writing of the logged message be its own fiber could help
<FromGitter>
<kinxer> Sure, which is why you're offloading it to an asynchronous fiber.
vitallium has joined #crystal-lang
early has joined #crystal-lang
<FromGitter>
<kinxer> But you don't even have to communicate the string data to the other fiber; the "logging fiber" just gets the "address" of the actual string that it needs to write.
vitallium has quit [Client Quit]
<FromGitter>
<kinxer> Maybe the addressing wouldn't save much time in practice, though.
<FromGitter>
<Blacksmoke16> im not familiar enough with how that would play out in a like web framework context. I'd imagine it would be fine as we're not waiting on the fiber to finish so the request would be finished and the logged message would be written at some point, maybe not exactly at the time it was logged tho?
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> how would that handle runtime values tho?
<FromGitter>
<Blacksmoke16> like the current user's id etc?
<FromGitter>
<kinxer> Oh... Poorly, I imagine.
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<kinxer> There might be a way to finagle it to save a format string and then send any extra data to the logging fiber, a la `printf`.
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> probably
<FromGitter>
<kinxer> Though of course we'd want to use Crystal string formatting in the API.
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<kinxer> All this said, I don't have the time or interest to actually write this thing. I do think it's interesting that it *could* exist (though I'm not convinced of its usefulness...).
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> one question i have with logging each message in a fiber is how that would work in a MT env
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> since it would be possible that they get written out of order
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> one work around would to maybe use a channel and delay the actual logging till after the response has been returned
vitallium has quit [Client Quit]
<FromGitter>
<kinxer> Yeah. I think that's an issue you'll have with logging in a MT environment regardless of how you're doing it.
vitallium has joined #crystal-lang
vitallium has quit [Client Quit]
<FromGitter>
<Blacksmoke16> like collect the messages, but dont actually log them until later
<FromGitter>
<Blacksmoke16> might be a good optimization
<FromGitter>
<kinxer> You could separate log files/outputs by thread or you could mark them with thread and use some heuristic for ordering when the timestamp orders aren't clear.
vitallium has joined #crystal-lang
<FromGitter>
<Blacksmoke16> for sure, not sure if you can do anything about it without a good amount of effort :p
<FromGitter>
<kinxer> Yeah, I think that's a way that logging is done.
vitallium has quit [Client Quit]
<FromGitter>
<kinxer> Most of my experience with is in Java with `log4j`.