ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Fund Crystal's development: | GH: | Docs: | Gitter:
<FromGitter> <> i don't get the hype either. i can see how the safety is mighty useful for certain apps. but for >90% of my apps i really don't want to manually manage my memory or think about "borrows".
<FromGitter> <> in the same way that i don't want every second line to read `if err`. it just makes it hard to see what the code actually does...
<FromGitter> <wwalker> crystal seems to be the best of all the worlds. Only if you need true parallelism does crystal seem to fall short. I've used it (`-Dpreview_mt`) with crystal, successfully, but most of the parallel CPU execution was being eaten by "system" so they must be making crazy amounts of context switching. I found it was actually better to just use 1 normal, single threaded process, than to use `mt`. That was back
<FromGitter> ... on 1.6.2, I've not retried it with 1.7.x yet.
<FromGitter> <Blacksmoke16> My understanding it's best suited to IO versus CPU bottlenecks
straight-shoota has quit [Ping timeout: 252 seconds]
straight-shoota has joined #crystal-lang
<FromGitter> <wwalker> yep, I use fibers for blocking IO stuff, and they work great. currently I have a few severely CPU bound processes, so I have a controller (lots of Fibers) spawning separate crystal processes to handle the CPU intensive stuff. the combination is working very close to 100% usage of all the CPUs with very little lost to "system"
alexherbo2 has joined #crystal-lang
_ht has joined #crystal-lang
jmdaemon has quit [Ping timeout: 255 seconds]
<FromGitter> <> yup, MT is hard when you don't bake it into the language from version 0
<FromGitter> <> but in most cases i'd still rather go multiprocess instead of moving an entire project to go or rust just for that. baby vs bathwater
alexherbo2 has quit [Remote host closed the connection]
<FromGitter> <ober> especially M:N
<FromGitter> <mjblack> It didnt work for me but I was able to get WinDbg to work
hightower2 has joined #crystal-lang
alexherbo2 has joined #crystal-lang
renich has joined #crystal-lang
<renich> Hey crystal wizards! 0/
<renich> I was wondering, is there a one-liner in crystal to serve files via HTTP? Something like this:
<renich> jokingly, I posted mine as a comment there.
<renich> If not, this should be the #1 priority for the next release.
<renich> :D
<renich> I mean, PHP is way ahead of us with their `php -S localhost:8080` line...
<FromGitter> <Blacksmoke16> would prob just want to use
<renich> ruby has a one-liner as well: `ruby -run -ehttpd . -p8000` (requires WEBrick)
<FromGitter> <Blacksmoke16> could prob make it a one liner, but :shrug:
<renich> Blacksmoke16: you mean remove the logger and error handler?
<FromGitter> <Blacksmoke16> hm? those arent used by default
<FromGitter> <Blacksmoke16> so just need to create an `HTTP::Server` with that static file handler and run it
<renich> Yep, I confirm it works Blacksomke16.
<renich> This works: `crystal eval 'require "http/server"; server = ["./")] ); server.bind_tcp "", 8081; server.listen'`
<FromGitter> <Blacksmoke16> 👍
<renich> The logger's cool, though.
taupiqueur1 has joined #crystal-lang
taupiqueur has quit [Ping timeout: 252 seconds]
jmdaemon has joined #crystal-lang
_ht has quit [Quit: _ht]
alexherbo2 has quit [Remote host closed the connection]
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp- has joined #crystal-lang
Sankalp- is now known as Sankalp
ur5us_ has joined #crystal-lang