ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.32.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<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> <Blacksmoke16> gotcha
<FromGitter> <Blacksmoke16> fwiw would be cool to have a version of https://github.com/plasma-umass/coz/blob/master/rust/src/lib.rs in crystal
<FromGitter> <Blacksmoke16> but is a bit beyond what i know about rust, or C for that matter
<FromGitter> <Blacksmoke16> https://github.com/RX14/coz.cr nvm
<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> <Blacksmoke16> they should be yes
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 240 seconds]
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Client Quit]
martinium has joined #crystal-lang
martinium has quit [Quit: Textual IRC Client: www.textualapp.com]
martinium has joined #crystal-lang
<FromGitter> <grkek> @straight-shoota I mean I cant find my shard even if it is merged in the catalog
alexherbo27 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 245 seconds]
alexherbo27 is now known as alexherbo2
alex has quit [Ping timeout: 265 seconds]
alex has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
ht_ has joined #crystal-lang
martinium has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ht_ has quit [Remote host closed the connection]
yukai has quit [Ping timeout: 240 seconds]
zorp_ has joined #crystal-lang
zorp has quit [Ping timeout: 265 seconds]
baweaver has joined #crystal-lang
repo has left #crystal-lang ["WeeChat 2.7"]
repo has joined #crystal-lang
chachasmooth has quit [Quit: Quit]
chachasmooth has joined #crystal-lang
Nicolab has joined #crystal-lang
<FromGitter> <straight-shoota> @grek: It's there : https://www.shardbox.org/shards/grip
Nicolab has quit [Ping timeout: 246 seconds]
HumanG33k has joined #crystal-lang
HumanG33k has quit [Read error: Connection timed out]
HumanG33k has joined #crystal-lang
HumanG33k has quit [Client Quit]
HumanG33k has joined #crystal-lang
fifr has quit [Quit: ZNC 1.7.3 - https://znc.in]
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 258 seconds]
Nicolab has joined #crystal-lang
<FromGitter> <Blacksmoke16> Error: can't + with [] :S
<FromGitter> <grkek> Weird, it wasn't when I checked last time
<FromGitter> <grkek> I am probably blind :D
<FromGitter> <grkek> Hello, everyone
<FromGitter> <Blacksmoke16> o/
<FromGitter> <grkek> @Blacksmoke16 Is the dev of criter (the lang playground) in this chat ?
<FromGitter> <Blacksmoke16> hm?
<FromGitter> <grkek> the crystal lang playground is called criter right ?
<FromGitter> <Blacksmoke16> oh, you mean https://carc.in/?
<FromGitter> <grkek> Oh where did I bring that up from
<FromGitter> <grkek> its carcin yeah
<FromGitter> <grkek> it has a bug
<FromGitter> <grkek> with /0
<FromGitter> <Blacksmoke16> https://github.com/jhass/carc.in make an issue there?
<FromGitter> <grkek> There was an issue and yay it got fixed
<FromGitter> <grkek> �
<FromGitter> <grkek> it compiles and prints this
<FromGitter> <grkek> �
<FromGitter> <Blacksmoke16> 👍
duane has joined #crystal-lang
<FromGitter> <Blacksmoke16> @grkek you should add your thing to https://github.com/the-benchmarker/web-frameworks
<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> <grkek> probably doesn't matter
<FromGitter> <vlazar> @straight-shoota Image with relative path from GitHub is missing https://www.shardbox.org/shards/diff
<FromGitter> <vlazar> under the Usage section
alexherbo28 has joined #crystal-lang
alex has quit [Ping timeout: 268 seconds]
alexherbo2 has quit [Ping timeout: 268 seconds]
alexherbo28 is now known as alexherbo2
alex has joined #crystal-lang
<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> <tenebrousedge> I think there's crenv (https://github.com/pine/crenv), an asdf plugin, and docker
<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> <tenebrousedge> it looks like it doesn't handle dependencies https://github.com/marciogm/asdf-crystal/blob/master/bin/install
<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?
ur5us has joined #crystal-lang
<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> <drum445> Does the mysql driver not have the ability to get a result set from a stored proc? ⏎ ⏎ ```PROCEDURE test.get can't return a result set in the given context``` [https://gitter.im/crystal-lang/crystal?at=5e1cd383a859c14fa1dda0b3]
<FromGitter> <grkek> it is new year in georgia
<FromGitter> <grkek> again
<FromGitter> <grkek> 😎
<FromGitter> <grkek> 2x New year
<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
<FromGitter> <mistergibson> ok
ur5us has quit [Quit: Leaving]
ur5us has joined #crystal-lang
ht_ has joined #crystal-lang
yukai has joined #crystal-lang
commavir has quit [Remote host closed the connection]
commavir has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
duane has joined #crystal-lang
ht_ has quit [Quit: ht_]