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
Fuzai has joined #crystal-lang
<Fuzai> Hello, does anyone know of a library for Crystal that allows one to connect to a ScyllaDB cluster?
<FromGitter> <Blacksmoke16> hmm, not that i know of. Also dont see any in any of the shard aggregation sites either :/
taupiqueur has quit [Remote host closed the connection]
Sankalp- has joined #crystal-lang
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp- is now known as Sankalp
Fuzai has quit [Ping timeout: 252 seconds]
Fuzai has joined #crystal-lang
Fuzai has quit [Ping timeout: 246 seconds]
Fuzai has joined #crystal-lang
Fuzai has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
ur5us has quit [Ping timeout: 255 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 255 seconds]
walez has joined #crystal-lang
ur5us has joined #crystal-lang
walez has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 255 seconds]
ur5us has joined #crystal-lang
walez has joined #crystal-lang
ur5us has quit [Ping timeout: 255 seconds]
walez has quit [Read error: Connection reset by peer]
walez___ has joined #crystal-lang
walez___ has quit [Ping timeout: 252 seconds]
hellstabber has joined #crystal-lang
taupiqueur has joined #crystal-lang
walez___ has joined #crystal-lang
jmdaemon has quit [Ping timeout: 255 seconds]
yxhuvud has quit [Read error: Connection reset by peer]
walez___ has quit [Quit: Leaving]
yxhuvud has joined #crystal-lang
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #crystal-lang
<FromGitter> <noaheverett> Fuzai: could you use a Cassandra driver (https://github.com/kaukas/crystal-cassandra) since Scylla is (was?) based on Cassandra or do they require their own driver now?
hellstabber has quit [Quit: Connection closed for inactivity]
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Remote host closed the connection]
<yxhuvud> could also be worth the effort asking the scylladb company if they know of anything
<FromGitter> <sergiotapia> Hello, new to Crystal just did a crystal init app myapp and ran `crystal spec` and I get this error. What am I supposed to install locally on my dev machine for this to work?
<FromGitter> <sergiotapia> `/usr/bin/ld: cannot find -lpcre (this usually means you need to install the development package for libpcre): No such file or directory`
<FromGitter> <Blacksmoke16> how did you install crystal?
<FromGitter> <sergiotapia> I used asdf
<FromGitter> <Blacksmoke16> on `1.6.1` yea?
<FromGitter> <Blacksmoke16> basically you just need to make sure you have `libpcre` installed
<FromGitter> <sergiotapia> `sudo apt-get install libpcre` that package doesn't seem to exist. What do I need to install?
<FromGitter> <sergiotapia> thanks, that worked fine
<FromGitter> <Blacksmoke16> not sure why installing libevent fixes this given it clearly says pcre but who am i to argue 😅
<FromGitter> <sergiotapia> to be clear, I had to install `libpcre3-dev` per that github thread, and it fixed the issue
<FromGitter> <Blacksmoke16> ahh 👍 that makes more sense :)
<FromGitter> <Blacksmoke16> i never used asdf, but ideally that would be installed when you install crystal itself as its a dependency
<FromGitter> <sergiotapia> cool. I'm going to rewrite this little script from Nim to Crystal and see how Crystal feels. https://github.com/sergiotapia/ekeko/blob/master/src/tiktok.nim
<FromGitter> <Blacksmoke16> sounds like a plan
walez has joined #crystal-lang
ur5us has joined #crystal-lang
_ht has joined #crystal-lang
<FromGitter> <sergiotapia> I can't seem to find the docs for this system call: https://philstories.medium.com/crystal-lang-execute-shell-command-3afe38c0a293
<FromGitter> <sergiotapia> Trying to invoke `yt-dlp` from my Crystal app
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/toplevel.html#system%28command%3AString%2Cargs%3Dnil%29%3ABool-class-method
<FromGitter> <sergiotapia> thank you!
<FromGitter> <Blacksmoke16> tho if you need more control, can use https://crystal-lang.org/api/Process.html#run%28command%3AString%2Cargs%3Dnil%2Cenv%3AEnv%3Dnil%2Cclear_env%3ABool%3Dfalse%2Cshell%3ABool%3Dfalse%2Cinput%3AStdio%3DRedirect%3A%3AClose%2Coutput%3AStdio%3DRedirect%3A%3AClose%2Cerror%3AStdio%3DRedirect%3A%3AClose%2Cchdir%3APath%7CString%3F%3Dnil%29%3AProcess%3A%3AStatus-class-method
<FromGitter> <sergiotapia> hm... how would I capture the output of the system call. I need to capture the pretty json `yt-dlp` returns
<FromGitter> <Blacksmoke16> prob something like:
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=636038a0dcbf067fdcbe40b4]
<FromGitter> <sergiotapia> interesting, `Unhandled exception: Error executing process: './downloads/youtube': Permission denied (File::AccessDeniedError)` my code doesn't seem to have permission to write to the folder? yet my code with `system` works fine
<FromGitter> <Blacksmoke16> oh?
<FromGitter> <Blacksmoke16> can you share the code so far?
<FromGitter> <sergiotapia> @gewor
<FromGitter> <sergiotapia> @Blacksmoke16 https://pastebin.com/Mt6XBM0c
<FromGitter> <Blacksmoke16> oh, do you just want to putout the process output to your terminal?
<FromGitter> <Blacksmoke16> if so, you can just do like `output: :inherit`
<FromGitter> <Blacksmoke16> same with `error` and it'll use your tty
<FromGitter> <Blacksmoke16> `system` just returns a bool if it is successful or not, so it prob also failed, just not with an exception like that
<FromGitter> <sergiotapia> No i need to capture the pretty json response of yt-dlp
<FromGitter> <Blacksmoke16> to use at a later point in the code?
<FromGitter> <sergiotapia> Yes parse the json and grab two values
<FromGitter> <Blacksmoke16> okay, then yea `IO::Memory` is what you want
_ht has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> prob could optimize things a bit when its all said and done, but it'll be good enough :P
<FromGitter> <sergiotapia> Im stuck with this permission error thing lol
<FromGitter> <Blacksmoke16> i assume the user you're running the program with has access to run it?
<FromGitter> <Blacksmoke16> also make sure the file exists where you expect it to, and is executable
<FromGitter> <Blacksmoke16> e.g. https://crystal-lang.org/api/File.html#executable?(path:Path|String):Bool-class-method
jmdaemon has joined #crystal-lang
<FromGitter> <sergiotapia> I'm a dummy lol copy pasted the wrong thing works fine
<FromGitter> <Blacksmoke16> that would do it :P
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
<FromGitter> <sergiotapia> Done! https://pastebin.com/3pPsjJ1d ⏎ ⏎ Is this idiomatic? any changes you recommend as i'm new to crystal
<FromGitter> <sergiotapia> dead simple deploy with `crystal build --release --no-debug` care went into the dev ux love it!
<FromGitter> <Blacksmoke16> I have some ideas, but am currently afk so can look when I get back if no one else jumps in before that
lestopher has joined #crystal-lang
walez has quit [Ping timeout: 246 seconds]
lestopher has quit [Quit: WeeChat 3.6]
fifr_ has quit [Ping timeout: 276 seconds]
<FromGitter> <vgramkris> Does flock_exclusive with default blocking=true yield to another spawn when it is being blocked (seems it is not yielding but want to confirm)?
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
<FromGitter> <Blacksmoke16> @sergiotapia try this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=6360602e27f328266d658dd7]
<FromGitter> <Blacksmoke16> tho tbh, i'd prob just use bash for this :P