ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
raz has joined #crystal-lang
raz has joined #crystal-lang
raz has quit [Changing host]
<FromGitter> <Blacksmoke16> setup the route to redirect to the other
brw has quit [Quit: The Lounge - https://thelounge.chat]
brw has joined #crystal-lang
brw has quit [Client Quit]
brw has joined #crystal-lang
hightower3 has quit [Ping timeout: 260 seconds]
<FromGitter> <shomodj> Anyone has an idea why this does not work? Thanks ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=6187545e9d20982e4f05f6b9]
ua_ has quit [Excess Flood]
ua_ has joined #crystal-lang
<FromGitter> <bistcuite> When does the crystal support Windows?
hightower3 has joined #crystal-lang
<straight-shoota> @shomodj `File.chown` receives a user id as second paramter. What you provide doesn't look like a user id. Maybe confused it with `chmod` ?
<straight-shoota> bistcuite Technically, Windows is already supported. We don't have full support yet, though.
Guest83 has joined #crystal-lang
Guest83 has quit [Client Quit]
hightower3 has quit [Ping timeout: 256 seconds]
postmodern has joined #crystal-lang
<postmodern> got this error `Error: read before assignment to local variable 'block'` with `yield word.as(String)`. block is `&block : (String) ->`. Not sure what the error means though?
<FromGitter> <Blacksmoke16> got a playground link that reproduces it?
<postmodern> not yet
<postmodern> changing yield to block.call seemed to work, but now some other code is giving an inaccurate error `Error: read before assignment to local variable ''`
<FromGitter> <Blacksmoke16> its prob because `yield` would invoke the block before it's fully assigned or something
<FromGitter> <Blacksmoke16> hard to say w/o an example
<postmodern> an can't repro in a standalone file
<postmodern> assigning the argument to an ivar, then calling @ivar.each { ... } seemed to fix the issue. go figure
<postmodern> was doing arg.each { ... } since the argument does not actually need to be stored and i only need to call #each on it once to populate my UniqueFilter object
<postmodern> also is it just me or does the compiler not understand `if value != Iterator::Stop::INSTANCE` means that `value` cannot be a type of `Iterator::Stop::INSTANCE` inside the if block. I keep having to to `value.as(String)` to make the compiler happy.
<postmodern> also is there something like Iterator::Chain, but that combines multiple iterators together and returns an array of values from each iterator per index? Something that would return `[1,1,1], [1,1,2], ..., [1,2,1], [1,2,2], ..., [2,1,1], [2,1,2], ...`?
postmodern has quit [Quit: Leaving]
<FromGitter> <shomodj> @straight-shoota sorry you are right, stupid me, I meant to use chmod :( one of those days
sorcus has quit [Quit: WeeChat 3.3]
<FromGitter> <Val> ```code paste, see link``` ⏎ ⏎ Should I post an issue? [https://gitter.im/crystal-lang/crystal?at=61880f8dfb8ca0572b0afac7]
<FromGitter> <Blacksmoke16> it's more similar to https://github.com/crystal-lang/crystal/issues/11318, but apparently related to some IO type
ur5us has joined #crystal-lang
hightower3 has joined #crystal-lang
ur5us has quit [Ping timeout: 244 seconds]
<FromGitter> <ryanprior:matrix.org> would that result in an extra round-trip for the client and their URL pointing to `/index.html`? I want this to be transparent to the user, like it would be with nginx, apache, express, etc
<FromGitter> <Blacksmoke16> yea it would result in a like 301
<FromGitter> <Blacksmoke16> guess you could just check if the request path is for a directory, and if so just return the contents of `index.html`
<FromGitter> <Blacksmoke16> idt the built in static file handler supports automatically showing `index` files
sorcus has joined #crystal-lang
ua_ has quit [Ping timeout: 256 seconds]
ur5us has joined #crystal-lang
ua_ has joined #crystal-lang
<FromGitter> <drum445> Hello, is there an easy way to turn a mysql result set into a hash?
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=618841e129ddcd02936c10d1]
<FromGitter> <Blacksmoke16> i think that would work?
<FromGitter> <Blacksmoke16> if you know what the rs represents, might be better to use like `DB::Serializable` with a struct
<FromGitter> <ryanprior:matrix.org> this is too bad. any suggestions if I want to switch from Kemal to a server that supports this kind of conventional stuff?
<FromGitter> <Blacksmoke16> if you're using kemal to serve static files, just use nginx or something?
<FromGitter> <ryanprior:matrix.org> I'm mostly using it to serve an API, but there are a few static files (index.html, index.css, index.js, and a few images)
<FromGitter> <Blacksmoke16> are they all required via the index.html file or one by one?
<FromGitter> <ryanprior:matrix.org> They're all required by index.html, I could bundle them all together in theory (but prefer not to for better resource cacheing)
<FromGitter> <Blacksmoke16> could you just add a get request on `"/"` that returns `index.html`
<FromGitter> <Blacksmoke16> would be the simplest solution
<FromGitter> <christopherzimmerman> https://forum.crystal-lang.org/t/num-cr-v1-0-0-released/4036 Finally finished the overhaul, if you're interested in data science/numerical computing and haven't checked out the library yet, you might have fun with it!
hightower3 has quit [Ping timeout: 244 seconds]
hightower3 has joined #crystal-lang
hightower3 has quit [Ping timeout: 244 seconds]
Stephie has quit [Quit: Fuck this shit, I'm out!]
Vexatos has quit [Quit: Client Quit]
Stephie has joined #crystal-lang
Vexatos has joined #crystal-lang