jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | 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
deavmi has quit [Ping timeout: 256 seconds]
deavmi has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
_whitelogger has joined #crystal-lang
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 272 seconds]
<FromGitter> <Blacksmoke16> wow, code is super ugly but this works now
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f28cbed6334d26a7e722cd0]
<FromGitter> <Blacksmoke16> but probably very brittle
<FromGitter> <Blacksmoke16> `SELECT t0."id" AS c1, t0."name" AS c2, t0."alive" AS c3, t5."id" AS c4, t5."color" AS c6, t5."user_id" AS c7 FROM "users" t0 LEFT JOIN "settings" t5 ON t5."user_id" = t0."id" WHERE t0."id" = $1` if you were wondering, yes you can have one obj consume a result set, then pass that on to another, assuming columns are selected in correct order
zorp has quit [Ping timeout: 264 seconds]
alexherbo2 has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <guglielmocg_gitlab> Hello everyone, first post on the crystal board. ⏎ In Ruby I can use YAML.load to interpret a correctly formatted string as a hash. I would like to know if Crystal has such a functionality where it can turn a string like "{key: value}" into an object {"key": "value"}
<FromGitter> <naqvis> @guglielmocg_gitlab Welcome. Are you asking to load YAML to `Hash`?
<FromGitter> <naqvis> so if you are asking of transforming yaml string to Hash then you can try sth like ⏎ ⏎ ```require "yaml" ⏎ YAML.parse("{key: value}" ).as_h? # => {"key" => "value"}``` [https://gitter.im/crystal-lang/crystal?at=5f29127e14c413356f559f3f]
<FromGitter> <guglielmocg_gitlab> ah ok that's perfect!
<FromGitter> <guglielmocg_gitlab> that's exactly what I need
<FromGitter> <naqvis> 👍
yxhuvud has quit [Ping timeout: 240 seconds]
yxhuvud has joined #crystal-lang
postmodern has quit [Quit: Leaving]
lunarkitty has quit [Ping timeout: 272 seconds]
lunarkitty has joined #crystal-lang
<FromGitter> <scriptmaster> Hi, I am trying to do some querying on a postgres db via crystal, and I see this: In examples/shoddy_psql.cr:2:1 ⏎ ⏎ 2 | require "readline" ⏎ ⏎ ``` ^``` ... [https://gitter.im/crystal-lang/crystal?at=5f293eb447738110233e9cd4]
<FromGitter> <scriptmaster> name: pg ⏎ version: 0.21.1 ⏎ ⏎ dependencies: ⏎ db: ... [https://gitter.im/crystal-lang/crystal?at=5f293ec436563560f2c140a8]
<FromGitter> <scriptmaster> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f293f050ff358499bd35911]
<FromGitter> <scriptmaster> im trying this: https://github.com/crystal-community/icr/issues/114
<FromGitter> <scriptmaster> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f2940c80ff358499bd35d47]
<FromGitter> <scriptmaster> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f29415303d73b60ee66758c]
zorp has joined #crystal-lang
<FromGitter> <scriptmaster> I had to do `brew reinstall openssl` and then `export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"`
<FromGitter> <asterite> postmodern: there's only one type of enum in Crystal, there's no such thing as a "C enum" and "Crystal enum" (there used to be a difference but not anymore). For LLVM we use enums, and these are declared outside of the "lib" namespace because they are user-facing too