<FromGitter>
<void-witch> i'm trying to compile something with a crystal 0.35.1 build i downloaded from the crystal site, and i get a fun error from the gc ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ this doesn't happen with the 0.36.1 snap i have installed, and it didn't happen with the 0.35.1 snap i used to have. what causes it? [https://gitter.im/crystal-lang/crystal?at=60458c6222a5ce4a913e3ebb]
<FromGitter>
<naqvis> are you using any shard?
<FromGitter>
<naqvis> also follow the directions in output use `--error-trace` to get full trace
<FromGitter>
<js:nil.im> that LLVM looks a little old?
<FromGitter>
<naqvis> that will reveal what part of code is causing that
fifr` has quit [Ping timeout: 258 seconds]
<FromGitter>
<void-witch> @js:nil.im it doesn't build with anything newer i don't think
<FromGitter>
<js:nil.im> I think my crystal is built against LLVM 11
<FromGitter>
<void-witch> @naqvis same output
<FromGitter>
<void-witch> lemme check if it happens with no shards
<FromGitter>
<void-witch> scratch that, different output
<FromGitter>
<naqvis> you can clone the repo, switch to 0.35.1, change that line, do `make libcrystal` and then use `bin/crystal run XXXXX` to validate that
<FromGitter>
<naqvis> should be something related to LLVM version (I guess)
<FromGitter>
<naqvis> and fyi, crystal 0.35.1 won't compile with LLVM 11
<FromGitter>
<void-witch> @naqvis same issue
_ht has joined #crystal-lang
fifr` has joined #crystal-lang
_ht has quit [Read error: Connection reset by peer]
_ht has joined #crystal-lang
_ht has quit [Remote host closed the connection]
_ht has joined #crystal-lang
hendursa1 has joined #crystal-lang
hendursaga has quit [Ping timeout: 268 seconds]
postmodern has joined #crystal-lang
_ht has quit [Ping timeout: 256 seconds]
_ht has joined #crystal-lang
<frojnd>
I have around 1k json files in one dir and am wondering how can I most elegantly save that json file into sqlite3? Read file one by one and then save as text to db?
<frojnd>
Or does sqlite3 adapter for crystal supports saving jsons to db?
<FromGitter>
<jrei:matrix.org> But it is used to manage content *inside* the db
<FromGitter>
<jrei:matrix.org> I'd just put the JSON as a string blob in the db
<FromGitter>
<jrei:matrix.org> Depends if you just want to store, or also perform queries
postmodern has quit [Quit: Leaving]
<frojnd>
Eventually I will perform queries... These json files will be matched against date and then I will serve these json files as GET responses...
<frojnd>
Hm.. another question. I'm inside array and inside array I'm calling a function that deletes some chars from the string. I keep getting: Error: no overload matches 'cleaned_verse' with type (String | Nil)
<frojnd>
I'
<FromGitter>
<Blacksmoke16> why not just serve them from the file system?
<frojnd>
I'm passing the value inside array.each {|v| my_function v}
<FromGitter>
<Blacksmoke16> is `array` of type `Array(String?)`?
<frojnd>
@BlackSomke16 yes
<frojnd>
@BlackSmoke16 yes
<FromGitter>
<Blacksmoke16> then you'll need to make sure that the value isn't `nil` before passing it to your method
<Andriamanitra>
that's assuming the array elements are nilable on purpose, otherwise you should find the thing that inserts / could insert nils into your array in the first place
<frojnd>
No they are not
<frojnd>
They should always include String
<FromGitter>
<Blacksmoke16> then why does the array allow `nil` values?
<Andriamanitra>
quick and dirty fix is to do Array#compact wherever you're making the array, smart thing to do would be to find why nils are happening and handle that case properly
<frojnd>
It does not
<frojnd>
Array(Verse).from_json(%(#{data}))
<FromGitter>
<Blacksmoke16> i mean apparently it does, otherwise you wouldn't be gettering that error