paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
paulcsmith_ has joined #crystal-lang
dannluciano has joined #crystal-lang
tomchapin has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
dannluciano has quit [Ping timeout: 244 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #crystal-lang
<FromGitter>
<jwoertink> Hey, is there anyone around with a local kemal app that can check something for me real quick?
<FromGitter>
<jwoertink> just boot a kemal app locally, and then `ps aux | grep crystal`. I want to see if you get 2 processes
<FromGitter>
<jwoertink> one of them should look something like `~/.cache/crystal/crystal-run-app.tmp`
<FromGitter>
<jwoertink> The other one will just be your `crystal whatever.cr` process
<BlaXpirit>
i don't understand the point of the quiz... and it's about ruby, not crystal?
<BlaXpirit>
well it's a bit wonky
<BlaXpirit>
scratch that, it's crazy
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<BlaXpirit>
hm i've always wanted methods and macros to be interchangable. why can't I call a macro from outside if it's defined in a class?
overnet has joined #crystal-lang
Oliphaunte has joined #crystal-lang
<overnet>
where am I ?
matp has quit [Remote host closed the connection]
<overnet>
1995
<FromGitter>
<jwoertink> because you're using IRC?
Oliphaunte has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
overnet has quit [Quit: Page closed]
matp has joined #crystal-lang
dannluciano has joined #crystal-lang
dannluciano has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
pawnbox has joined #crystal-lang
<FromGitter>
<jwoertink> @sdogruyol https://github.com/jwoertink/guard-kemal it's working! Will auto-reload your kemal app when you make changes to the watched files
<FromGitter>
<sdogruyol> wow
<FromGitter>
<sdogruyol> how did you make it work?
<FromGitter>
<jwoertink> guard will run the `start` method, which just does `crystal app.cr`
<FromGitter>
<jwoertink> when you make a change to your watched file, guard will run the `stop` method.
<FromGitter>
<sdogruyol> oh that line
<FromGitter>
<jwoertink> Here's where it gets tricky. Since 2 processes are created, I have to kill the parent process, and to find that, I run this command
<FromGitter>
<jwoertink> if you have multiple kemal apps running locally, it kills them all since their parent processes are all named the same
<FromGitter>
<sdogruyol> hmm yeah
<FromGitter>
<jwoertink> provided that the files used to boot all of them are named the same
<FromGitter>
<sdogruyol> maybe you can use foreman for that?
<FromGitter>
<jwoertink> Yeah, using foreman for booting multiple apps already
<FromGitter>
<sdogruyol> cool
<FromGitter>
<jwoertink> if the server files are named different for each app, then it doesn't matter
<FromGitter>
<jwoertink> i.e. `app1/server1.cr` `app2/server2.cr`, etc...
<FromGitter>
<sdogruyol> it should be
<FromGitter>
<jwoertink> doing `app1/server.cr` and `app2/server.cr` is where the issue comes up
<FromGitter>
<jwoertink> because both files are called `server.cr`
<FromGitter>
<sdogruyol> ugh, yeah that's tough
<FromGitter>
<jmoriau> @jwoertink your app runs/stop and rerun the app each time a change is made to the file ?
<FromGitter>
<jwoertink> It will reload kemal any time you make a change to the file. So that way you don't have to `ctrl C` and then reboot the app each time
<FromGitter>
<jmoriau> ok so why not just store the PID of the newly started process alongside the filename
<FromGitter>
<jmoriau> that way when filename change you just kill the PID
<FromGitter>
<jmoriau> and you don't need to worry about other app's name