<FromGitter>
<straight-shoota> > shardbox says im the only one that has it installed (thats public at least) so meh ⏎ ⏎ @Blacksmoke16 That only means no shards that shardbox knows about have it as a dependency.
<FromGitter>
<Blacksmoke16> fair, decided to go with new in org and archive the old. prob the safer option
<FromGitter>
<ImAHopelessDev_gitlab> i just found a bug (https://i.gyazo.com/e3b4fe200de8c272ddd2e5bc9f94694e.png), but not sure if it's an actual bug or i'm doing it wrong. i'll try to re-create an example code on the playground
DTZUZO_ has quit [Read error: Connection reset by peer]
DTZUZO_ has joined #crystal-lang
DTZUZO_ has quit [Ping timeout: 240 seconds]
HumanG33k has quit [Ping timeout: 268 seconds]
HumanG33k has joined #crystal-lang
DTZUZO_ has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
DTZUZO_ has quit [Read error: Connection reset by peer]
DTZUZO_ has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Client Quit]
<FromGitter>
<Blacksmoke16> how do `#define` macros in C work if doing c bindings?
<woodruffw>
i think the answer is that they don't -- it's been a while, but i don't believe crystal's C FFI knows anything about header parsing or CPP macros
<woodruffw>
anything that's #defined is elided and needs to be re-exposed explicitly, probably
<FromGitter>
<rvprasad> Does anyone know how to change the LLVM flags used by crystal compiler to generate binaries? Or is this done one-time while building the compiler? For context, I'd like to experiment with different LLVM flags in the context of this issue (https://github.com/crystal-lang/crystal/issues/7978).
<FromGitter>
<Blacksmoke16> maybe look at the makefile
<FromGitter>
<rvprasad> @Blacksmoke16 If you mean the makefile for crystal compiler, then do you mean these flags are set one-time while building the compiler?
<FromGitter>
<Blacksmoke16> uhhh no idea
<FromGitter>
<Blacksmoke16> that would be a question for a core dev
<FromGitter>
<rvprasad> @Blacksmoke16 I am guessing the core-devs are active on this channel. Am I wrong?
<FromGitter>
<grkek> Excuse you, it is not a thing
<FromGitter>
<grkek> it is a Grip framework named after the interesting band of Death Grips
<FromGitter>
<Blacksmoke16> haha fair enough
<FromGitter>
<grkek> How do I benchmark it ?
<FromGitter>
<grkek> I mean my laptop is slow as hell and clearly kemal got score which I thrashed easily
<FromGitter>
<Blacksmoke16> essentially you just have to add your project under `crystal/`
<FromGitter>
<Blacksmoke16> and can use kemal/others as an example
<FromGitter>
<grkek> that's it ?
<FromGitter>
<Blacksmoke16> yea
<FromGitter>
<grkek> have you done it ?
<FromGitter>
<grkek> oh nice you have
<FromGitter>
<grkek> that's so cute
<FromGitter>
<Blacksmoke16> yea, results are pretty shit atm tho
<FromGitter>
<Blacksmoke16> at some point the build process got changed and the new container doesnt have the right ENV var, so its writing logs to files and stuff
<FromGitter>
<grkek> Make a pr ?
<FromGitter>
<grkek> ask for a fix I guess
<FromGitter>
<Blacksmoke16> also i cant update to new rewritten version until alpine gets updated to support `0.32.x`, so kidna sol atm ha
<FromGitter>
<grkek> This project seems interesting hm
<FromGitter>
<grkek> let me try
<FromGitter>
<Blacksmoke16> need three endpoints `GET /` which can return nothing, `POST /user` which also can return nothing, and `GET /user/:id` which should return the ID, also must not match if you do `GET /user/foo`
<FromGitter>
<grkek> Yeah I see the kemals implementation I'll just copy that over
<FromGitter>
<grkek> also Django is at 119
<FromGitter>
<grkek> that is so sad
<FromGitter>
<grkek> I write in python as well
<FromGitter>
<grkek> in django to be specific
<FromGitter>
<Blacksmoke16> :p
<FromGitter>
<grkek> have you ever written python
<FromGitter>
<Blacksmoke16> a bit, im not a fan at all
<FromGitter>
<tenebrousedge> Python seems like Ruby with 1.5x the syntax
<FromGitter>
<grkek> It is still comfy
<FromGitter>
<grkek> something random comes to your mind
<FromGitter>
<grkek> like `owinefoieqn` for example
<FromGitter>
<grkek> you run pip install owinefoieqn
<FromGitter>
<grkek> it just werks
<FromGitter>
<grkek> too many libraries
<FromGitter>
<grkek> too many choices
<FromGitter>
<grkek> divides communities
<FromGitter>
<grkek> @Blacksmoke16 does it matter if the returned number will be in a json format or not
<FromGitter>
<grkek> like 1 or "1"
<FromGitter>
<grkek> ?
<FromGitter>
<Blacksmoke16> probably json?
<FromGitter>
<grkek> I mean the kemal version is returning 1 as non json and mine is returning 1 as "1"
<FromGitter>
<straight-shoota> @vlazar I'm aware of that and the fix is already finished, just waiting for https://github.com/icyleaf/markd/pull/28 to be merged
ht_ has joined #crystal-lang
DTZUZO_ has quit [Read error: Connection reset by peer]
<FromGitter>
<vlazar> 😍
Nicolab has quit [Quit: Leaving.]
<FromGitter>
<kinxer> Has anyone given any thought to sandboxing in Crystal? I suspect it would require compiler changes to even allow it, but I want to know if anyone with more language/macro/compiler knowledge has thought about it.
<FromGitter>
<kinxer> I'm not even looking for a system where `require`s have to register what resources they have access to or anything, just a way to prevent (perhaps with a compile-time exception) any shards I'm `require`ing from, e.g., reading my system files.
<FromGitter>
<tenebrousedge> that seems tough, but you could use a container for that. Not necessarily a docker container
<FromGitter>
<kinxer> Yeah. I was hoping for an option baked into the language, though. For example, maybe I do want filesystem access in my application; I just want to make sure that the math library I'm using never tries to access the filesystem.
<FromGitter>
<Blacksmoke16> run program as a specific user?
<FromGitter>
<kinxer> "baked into the language" including shards that solve the problem.
<FromGitter>
<sudomaxime> Hey guys, still learning Crystal, having a lot of fun ATM, I was wondering, what's the best way to maintain/change your system/project crystal version ? Is there a version manager of some sort ? Thanks !
<FromGitter>
<Blacksmoke16> any reason you wouldnt want to always use the latest?
<FromGitter>
<Blacksmoke16> either way, there are some out there. Really can just grab the version you want off the github release and put it somewhere and symlink it to `crystal`
<FromGitter>
<sudomaxime> @Blacksmoke16 , because there is no LTS version yet, sometimes it's easier for us to keep legacy code for a few more days if a lot of patches are needed
<FromGitter>
<Blacksmoke16> fair enough
DTZUZO_ has joined #crystal-lang
<FromGitter>
<sudomaxime> crev is exactly what I was looking for ! Thanks @tenebrousedge !
<FromGitter>
<tenebrousedge> I'd check out asdf too. It's convenient managing all the things with one program
<FromGitter>
<Blacksmoke16> did asdf update llvm version?
<FromGitter>
<Blacksmoke16> i remember people having issues with it due to a real old version
<FromGitter>
<tenebrousedge> the asdf crystal plugin? I don't know
<FromGitter>
<lebogan> What version of shards 'ships' with Crystal 0.32.1 for the Ubuntu distro?
<FromGitter>
<Blacksmoke16> prob `0.8.1`
<FromGitter>
<Blacksmoke16> `0.9.0` has some issues, could build from source if you really wanted
<FromGitter>
<lebogan> Thanks
<FromGitter>
<lebogan> As I am continually learning, I see examples for shards.yml which use versions and others which don't. What is the community accepted standard usage and can it be enforced through the shards utility?
<FromGitter>
<Blacksmoke16> is the spec you should follow
<FromGitter>
<watzon> Any chance someone here is using emacs with crystal-mode and flycheck-crystal?
<FromGitter>
<lebogan> From the spec file, it seems like versions are not 'required' for dependencies. Am I missing something. I mention this because I ran into some problems using crystal-db and amberframework/granite - shards complaining about db versions. I fixed it by explicit versions in my shard.yml.
<FromGitter>
<watzon> Looks like @RX14 might be?
<FromGitter>
<straight-shoota> @lebogan Depends on your intention. If your code is supposed to work with any release of a dependency, you don't need to specify a version. Shards will just pick the latest (or HEAD if no versions are tagged).
<FromGitter>
<straight-shoota> But you probably can't know what changes a future release might bring. And you probably won't be testing against older versions as well. So in general, it's probably better to specify versions, at least versions ranges that are supported.
<FromGitter>
<lebogan> Thanks @Blacksmoke16 and @straight-shoota . Makes sense.
duane has quit [Remote host closed the connection]
<FromGitter>
<grkek> also @Blacksmoke16 what am I supposed to do with the .dependabot/config.yml file ?
<FromGitter>
<grkek> in the the benchmarker repo
<FromGitter>
<Blacksmoke16> idt crystal has support for that
<FromGitter>
<grkek> I mean there are no entries for crystal
<FromGitter>
<grkek> which means I don't need to add anything in there
<FromGitter>
<Blacksmoke16> see what his reply is
<FromGitter>
<Blacksmoke16> im not familiar with dependabot
<FromGitter>
<grkek> literally 0 entries of crystal in the dependabot
<FromGitter>
<grkek> config file
<FromGitter>
<grkek> Also I found this > Mr Krabs on his way to court for multiple counts of tax evasion and child labor
<FromGitter>
<grkek> its funny
<FromGitter>
<grkek> it was on a sea shanties video
Nicolab has joined #crystal-lang
alex has quit [Read error: Connection reset by peer]
alex`` has joined #crystal-lang
ht_ has quit [Quit: ht_]
ht_ has joined #crystal-lang
ht_ has quit [Client Quit]
erdnaxeli has quit [Ping timeout: 260 seconds]
<FromGitter>
<jwoertink> @watzon what's the question? The other dev I sit next to is using emacs with the flycheck
<FromGitter>
<jwoertink> @sudomaxime I use `asdf` with crystal to keep different versions.
ht_ has joined #crystal-lang
Nicolab has quit [Quit: Leaving.]
<FromGitter>
<drum445> When using the example here: https://github.com/crystal-lang/crystal-mysql ⏎ I get this ```Unhandled exception: MySql::Type does not support Array(Bool | Float32 | Float64 | Int32 | Int64 | Slice(UInt8) | String | Time | Nil) values (Exception)``` ⏎ On this line: ```db.exec "insert into contacts values (?, ?)", args```
<FromGitter>
<drum445> Could someone point me in the right direction please
<FromGitter>
<Blacksmoke16> `, args: args`
<FromGitter>
<Blacksmoke16> try that
<FromGitter>
<drum445> That got it, 🙏
<FromGitter>
<drum445> Thanks @Blacksmoke16, I'll update the readme
<FromGitter>
<Blacksmoke16> 👍
ht_ has quit [Quit: ht_]
livcd has quit [Ping timeout: 258 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
<FromGitter>
<mistergibson> Is there an ODBC shard?
Nicolab has joined #crystal-lang
<FromGitter>
<watzon> @jwoertink I just can't seem to get flycheck working with it for some reason. I have `flycheck-crystal` installed, but the checker isn't showing up.
<FromGitter>
<watzon> @mistergibson doesn't look like it, although it seems as though crystal-mssql uses ODBC