jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.28.0 | 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
gangstacat has joined #crystal-lang
_whitelogger has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
lucasb has quit [Quit: Connection closed for inactivity]
DTZUZO has joined #crystal-lang
rohitpaulk has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 250 seconds]
rohitpaulk has quit [Remote host closed the connection]
<FromGitter> <alehander42> it's not hard to write an interpreter, i don't find this argument convincing
<FromGitter> <alehander42> the hard thing is to make it work with the whole language, including must-be-native-code parts/builtins
<FromGitter> <alehander42> also, code reloading has many more applications than repl
<FromGitter> <alehander42> repl is just a maybe-ok side effect
<FromGitter> <vladfaust> @straight-shoota the second line example in https://github.com/crystal-lang/crystal/pull/7716 is confusing... Where did `quux` even come from? :thinking:
<FromGitter> <vladfaust> Great PR otherwise, the amount of specs is overwhelming 🙀
ashirase has quit [Ping timeout: 245 seconds]
laaron has quit [Remote host closed the connection]
ashirase has joined #crystal-lang
laaron has joined #crystal-lang
hightower2 has joined #crystal-lang
tdc has joined #crystal-lang
waheedi has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
alexherbo2 has joined #crystal-lang
tdc has quit [Remote host closed the connection]
tdc has joined #crystal-lang
tdc has quit [Remote host closed the connection]
tdc has joined #crystal-lang
sz0 has joined #crystal-lang
<FromGitter> <j8r> @paulcsmith Do you still experience the issue? What docker container do you use?
<FromGitter> <j8r> *the issue about slow perf on Docker on Mac
<FromGitter> <j8r> can you try `export CRYSTAL_PATH=/usr/share/crystal/src:lib` then use `/usr/lib/crystal/bin/crystal`
<FromGitter> <paulcsmith> Hey @j8r here is the docker setup and the project https://github.com/paulcsmith/website-v2
<FromGitter> <paulcsmith> I'll give that a try
<FromGitter> <paulcsmith> Where would I put that. I'm not sure I understand. In the Dockerfile somewhere?
<FromGitter> <paulcsmith> Tried in `bash` for now and got `/usr/bin/ld: cannot find -lgc (this usually means you need to install the development package for libgc) ⏎ collect2: error: ld returned 1 exit status ⏎ Error: execution of command failed with code: 1: `cc "${@}" -o '/root/.cache/crystal/data-lib-teeplate-src-lib-file_tree-macros-directory.cr/macro_run' -rdynamic -lpcre -lgc -lpthread
<FromGitter> ... /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib` so I guess I need to install some more packages first :)
<FromGitter> <paulcsmith> Installed libgc-dev and tried it out. Same times. ~8s in Docker (on second and third build) and ~4s outside Docker
<FromGitter> <j8r> Thanks @paulcsmith , so this isn't linked to the script wrapper - this would be strange anyway
<FromGitter> <paulcsmith> Yeah I think there is nothing I can do but wait for Docker to improve. There are lots of known issues with Disk IO which I am guessing is causing the slowdown. I tried using the most performant type of mount (delegated) but it only made a minor improvement
<FromGitter> <paulcsmith> And using rsync and unison is a bit too complex to tackler for me right now. I'll just deal with the slowish compile times for now :P
<FromGitter> <paulcsmith> Though I'm not sure what Crystal is doing with the disk that may be causing this. Maybe cache lookup/writes?
<z64> @paulcsmith you could try not using host volumes, persist the container, and `docker cp` updated files into it instead
<z64> i think it should be better if you keep everything in the container that way and dont have to step outside to the host
<FromGitter> <paulcsmith> @z64 I'm not sure I understand. I need to have the hose files copied over for local development so when I make a change the watcher can recompile the app.
<FromGitter> <paulcsmith> But maybe I just don't understand. I've also tried to use volumes for shards, node_modules, but performance is roughly the same (though it did help `yarn install` a lot to make node-modules a volume)
<FromGitter> <paulcsmith> I wish I could figure out if the Crystal compile times are because of disk io, and if so, what folder(s) it is looking at that are causing the slowdown
<z64> yeah thats fine. you workflow would be to update your local files, and then `docker cp` all the files into the running container, which should functionally be the same as the volume, just not "automatic"
<FromGitter> <paulcsmith> Ohh I see. Hmm I'll have to try that. Though I'm not sure that will affect compile times. I'm not sure what is causing the slowdown. I'll try `docker cp` with no bind mounted volumes and see if it makes a difference
<z64> that way all the files are right on the virtual disk instead of having to pass through to the host
<FromGitter> <paulcsmith> Maybe the slowdown is just from requiring all the files in lib and src 🤷‍♂️ in which case what you're saying would definitely help
<z64> @paulcsmith oh, worth mentioning in case you didn't know, you could check out passing `--stats` to the compiler. it prints the compiler stages, time spent, and memory used
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <paulcsmith> Oh nice. Thank you!
<z64> yw:)
rohitpaulk has joined #crystal-lang
hightower2 has quit [Ping timeout: 250 seconds]
rohitpaulk has quit [Ping timeout: 250 seconds]
adrian_1908 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter> <jwoertink> What is this `--stats` command?
<FromGitter> <jwoertink> ```[09:58AM] server$ crystal --stats src/server.cr ⏎ Error: unknown command: --stats``` [https://gitter.im/crystal-lang/crystal?at=5cc1e7a1e416b84519dc328c]
<FromGitter> <Blacksmoke16> its for `crystal build`
<FromGitter> <Blacksmoke16> i.e. `crystal build --stats src/server.cr`
<FromGitter> <jwoertink> oh, apparently if you put the `--stats` after the file it works
<FromGitter> <jwoertink> `crystal src/server.cr --stats`
<FromGitter> <Blacksmoke16> :S
<FromGitter> <jwoertink> strange. I didn't know the position of the arguments mattered
<FromGitter> <Blacksmoke16> kinda makes sense since it has to build the temp file to run
<FromGitter> <jwoertink> yeah, I guess that does make sense
_whitelogger has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
adrian_1908 has quit [Quit: farewell]
sz0 has quit [Quit: Connection closed for inactivity]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
waheedi has quit [Quit: waheedi]
DTZUZO has quit [Ping timeout: 250 seconds]
DTZUZO has joined #crystal-lang