sagax has quit [Read error: Connection reset by peer]
sagax has joined #crystal-lang
krthr has joined #crystal-lang
krthr has quit [Ping timeout: 260 seconds]
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 252 seconds]
duane has quit [Ping timeout: 240 seconds]
ur5us_ has quit [Ping timeout: 248 seconds]
alexherbo2 has joined #crystal-lang
_whitelogger has joined #crystal-lang
lvmbdv has quit [Quit: OH GOD THE CLINTONS CAME FOR ME]
_whitelogger has joined #crystal-lang
hightower4 has joined #crystal-lang
lvmbdv has joined #crystal-lang
ht_ has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
<FromGitter>
<dscottboggs_gitlab> > he biggest one is the nesting limitation: only 2 levels ⏎ ⏎ TOML has unlimited nesting but it's kinda awkward. Personally I think it depends on the use case. There are a lot of cases where you could just use `some_str.split(delim).map &.split(other_delim)` but there are also cases where config files get really complicated and I don't think anything beats YAML for that.
<FromGitter>
<dscottboggs_gitlab> JSON and MediaPack are great for transport but not great for config files
ur5us_ has joined #crystal-lang
lvmbdv has quit [Quit: Leaving]
lvmbdv has joined #crystal-lang
lvmbdv has quit [Remote host closed the connection]
lvmbdv has joined #crystal-lang
ur5us_ has quit [Ping timeout: 245 seconds]
<FromGitter>
<absolutejam_gitlab> I find TOML really hard to grok
<FromGitter>
<absolutejam_gitlab> I'm not a fan of deeply nested yaml, I feel like JSON may have the advantage there
<FromGitter>
<absolutejam_gitlab> maybe I need a better indent highlighter for vscode
watzon has quit [Ping timeout: 248 seconds]
watzon has joined #crystal-lang
<FromGitter>
<j8r> JSON for config is good, if not changed often
<FromGitter>
<j8r> YAML configuration can become very complicated, it's hard to track the nesting
<FromGitter>
<randiaz95> Guys, is there normally a rule of thumb when it comes to IO over 2 programming languages? ⏎ ⏎ For example: Should I run an executable from my api gateway with some sort of child process crystal executable or should I send a post request over localhost on a server that is listening in crystal?
<FromGitter>
<tenebrousedge> probably the former is better for small projects and the latter for large ones
<FromGitter>
<randiaz95> Is it because the benefits of large programs are that it can be run over 2 different computers or servers?
<FromGitter>
<randiaz95> I was thinking performance could be faster for http server because the overhead of booting up a language is still a little there in terms of an executable.
<FromGitter>
<randiaz95> also, I can keep long term variables and datastructs
<FromGitter>
<tenebrousedge> as a compiled language Crystal has minimal run-time initialization
<FromGitter>
<tenebrousedge> it's not Ruby :)
<FromGitter>
<tenebrousedge> even PHP boots in a few dozen milliseconds or so
<FromGitter>
<tenebrousedge> but yes, on the large scale, you may end up with different machines for the different processes, and for that you'd want an API
<FromGitter>
<tenebrousedge> you could split the difference and use some sort of job queue that would invoke a Crystal binary
<FromGitter>
<tenebrousedge> something like beanstalkd
Nazral has quit [*.net *.split]
<FromGitter>
<randiaz95> Dang, I am going to look for a beanstalkd equivalent in Python
<FromGitter>
<randiaz95> I can make a web server with auth in postgres in 5 minutes, so I think I should use it for a gateway.
<FromGitter>
<randiaz95> make my requests and response with requests library.
<FromGitter>
<randiaz95> If there was a django in crystal, I would hit it up, but I don't think its too productive to relearn another framework just yet.
<FromGitter>
<absolutejam_gitlab> Get some serious UX envy
<FromGitter>
<tenebrousedge> a client here is something that interacts with the job queue service
<FromGitter>
<tenebrousedge> you'll usually have one service creating jobs, the job queue managing them, and a pool of workers executing the jobs
<FromGitter>
<absolutejam_gitlab> You ever get stuck up on what backend language/framework to use?
<FromGitter>
<absolutejam_gitlab> I know I shouldn't but the grass is always greener
<FromGitter>
<Blacksmoke16> we adopted a pattern using rabbitmq with dockerized workers consuming from a specific queue
<FromGitter>
<Blacksmoke16> uses some go lib under the hood
<FromGitter>
<absolutejam_gitlab> we're a Laravel shop and we use RabbitMQ and dedicated workers per queue
<FromGitter>
<absolutejam_gitlab> In k8s
<FromGitter>
<absolutejam_gitlab> Custom RabbitMQ driver that uses the C extension so it's nice and fast
<FromGitter>
<absolutejam_gitlab> with a 3 node RabbitMQ statefulset
<FromGitter>
<absolutejam_gitlab> It's nice because it's amqp so there's generally a lib for it in any language
<FromGitter>
<wontruefree> @randiaz95 I have not tried this yet but I plan on implementing an SQS queue for my next project https://github.com/sdogruyol/aws