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
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #crystal-lang
<FromGitter> <Dan-Do> @Guest12 you can try Mint
maria_elis has quit [Ping timeout: 246 seconds]
maria_elis has joined #crystal-lang
ur5us_ has joined #crystal-lang
ur5us has quit [Ping timeout: 250 seconds]
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 268 seconds]
f1reflyylmao is now known as f1refly
<FromGitter> <HertzDevil> libpcre reached end-of-life
deavmi has quit [Quit: No Ping reply in 180 seconds.]
sagax has joined #crystal-lang
deavmi has joined #crystal-lang
ur5us__ has joined #crystal-lang
ur5us_ has quit [Ping timeout: 250 seconds]
ur5us__ has quit [Remote host closed the connection]
ur5us__ has joined #crystal-lang
<FromGitter> <naqvis> log back ago, I commented to migrate to pcre2, but ... ⏎ https://github.com/crystal-lang/crystal/issues/8199#issuecomment-533171075
ur5us__ has quit [Ping timeout: 250 seconds]
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 265 seconds]
notzmv has joined #crystal-lang
ur5us__ has joined #crystal-lang
ur5us__ has quit [Ping timeout: 250 seconds]
maria_elis has quit [Ping timeout: 250 seconds]
maria_elis has joined #crystal-lang
deavmi has quit [Ping timeout: 246 seconds]
deavmi has joined #crystal-lang
f1refly has quit [Read error: Connection reset by peer]
f1refly has joined #crystal-lang
f1refly has quit [Read error: Connection reset by peer]
f1refly has joined #crystal-lang
f1refly has quit [Read error: Connection reset by peer]
f1refly has joined #crystal-lang
<FromGitter> <alex-kampa> ```(Hash(String, Hash(String, String) | String) | Nil)``` ⏎ ⏎ which measn that h.keys throws an error. How can I force h to be a hash? [https://gitter.im/crystal-lang/crystal?at=60d48559b60c3137c38d1bc0]
<FromGitter> <alex-kampa> ie never Nil
<FromGitter> <alex-kampa> Is using is_a? the only way?
<FromGitter> <Blacksmoke16> where is the `nil` coming from?
deavmi has quit [Ping timeout: 246 seconds]
deavmi has joined #crystal-lang
<FromGitter> <alex-kampa> So I simply added this to convince the compiler: ⏎ ⏎ ```h = h.nil? ? Hash(String, String | Hash(String, String)).new : h``` ⏎ ⏎ I would guess the nil is because the assignment is inside a begin rescue end [https://gitter.im/crystal-lang/crystal?at=60d494e165513b4d912c9448]
<FromGitter> <Daniel-Worrall> Yes, you need to compile time check nil. ⏎ You can do `h ? not_nil_here : nil_here`
<FromGitter> <Daniel-Worrall> which is shorthand for `if h` etc.
<FromGitter> <Daniel-Worrall> This works since it is truthy when not nil
<FromGitter> <Daniel-Worrall> I'm unsure how this works with compile type of `Bool | Nil`, but I guess it would be true only in the first branch and false | nil in the second
<FromGitter> <Blacksmoke16> what do you have in the `rescue` portion tho?
<FromGitter> <Blacksmoke16> sounds like you're just not handling the case where an exception is raised
<FromGitter> <naqvis> @alex-kampa For your specified use-case, i would suggest to go with `JSON::Serializable` and create a general class, which consumes any json string and returns Hash representation. ⏎ https://play.crystal-lang.org/#/r/bf2a
<FromGitter> <Daniel-Worrall> While recommendations are appreciated, the nilable hash and original has nothing to do with that. fyi
maria_elis has quit [Ping timeout: 250 seconds]
maria_elis has joined #crystal-lang
_whitelogger has joined #crystal-lang
[RMS] has quit [Client Quit]
repo is now known as Guest1975
snowdrop has joined #crystal-lang
[R] has joined #crystal-lang
f1refly has quit [Ping timeout: 265 seconds]
Guest1975 has quit [Ping timeout: 250 seconds]
f1refly has joined #crystal-lang
Guest1975 has joined #crystal-lang
hightower2 has joined #crystal-lang
<FromGitter> <watzon> You know how in Crystal you can use a generic like `T` and then use `T.class` to say that you want the class rather than an instance of that class? Any idea how to accomplish the same in Typescript?
DeBot has joined #crystal-lang
hightower2 has quit [Ping timeout: 256 seconds]
<FromGitter> <szabgab> I have been lurking here for a while, but I guess I should say hi, before I start asking questions. I have been learning Crystal in the last couple of weeks. I started to create a web site collecting data about shards, but then straight-shoota pointed at his shardbox an already existing (and much better looking) system. We then had a live coding session in which he explained about the shardbox and then we even
<FromGitter> ... created a small change. Anyway, I keep learning Crystal and I guess I'll ask some questions here. I hope it is ok even though they will be probably very basic.
<FromGitter> <Blacksmoke16> o/
maria_elis has quit [Ping timeout: 246 seconds]
maria_elis has joined #crystal-lang
<FromGitter> <watzon> Welcome @szabgab
<FromGitter> <ondreian> is everyone just using `minimal` Travis image these days since the `language: crystal` doesn't work?
<FromGitter> <Blacksmoke16> pretty no one is using travis anymore and just switched to GH Actions
<jhass> or whatever else, just stopped using travis. They got bought out and basically none of the original open source folks is there anymore
<FromGitter> <ondreian> I see. `crystal init` still generates a `.travis.yml` file
<FromGitter> <Blacksmoke16> it wont starting next release
<FromGitter> <ondreian> cool deal, it had been awhile since I needed to `init` a new project but was kind of 🌽 fused about what was going on. Thanks.
<FromGitter> <szabgab> @ondreian , there is this nice form that helps generating a minimal config file for GitHub Actions: https://crystal-lang.github.io/install-crystal/configurator.html
HumanG33k has joined #crystal-lang
HumanG33k has quit [Client Quit]
<straight-shoota> Great to have you here, szabgab =)
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 256 seconds]
Elouin has quit [Quit: Ping timeout (120 seconds)]
Elouin has joined #crystal-lang
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 258 seconds]
edegaru has joined #crystal-lang
ur5us__ has joined #crystal-lang
ur5us__ has quit [Quit: Leaving]
ur5us has joined #crystal-lang
maria_elis has quit [Ping timeout: 246 seconds]
maria_elis has joined #crystal-lang
ur5us has quit [*.net *.split]
maria_elis has quit [*.net *.split]
Elouin has quit [*.net *.split]
Guest1975 has quit [*.net *.split]
DeBot has quit [*.net *.split]
edegaru has quit [*.net *.split]
f1refly has quit [*.net *.split]
snowdrop has quit [*.net *.split]
notzmv has quit [*.net *.split]
avane has quit [*.net *.split]
Liothen has quit [*.net *.split]
mattt has quit [*.net *.split]
[R] has quit [*.net *.split]
fifr has quit [*.net *.split]
Welog has quit [*.net *.split]
jhass has quit [*.net *.split]
dannyAAM has quit [*.net *.split]
jrayhawk has quit [*.net *.split]
wmoxam has quit [*.net *.split]
frojnd has quit [*.net *.split]
markmarkmark has quit [*.net *.split]
fifr[m] has quit [*.net *.split]
jhass[m] has quit [*.net *.split]
dostoyevsky2 has quit [*.net *.split]
raz has quit [*.net *.split]
Stephie has quit [*.net *.split]
Vexatos has quit [*.net *.split]
lanodan has quit [*.net *.split]
mikko has quit [*.net *.split]
foxxx0 has quit [*.net *.split]
FromGitter has quit [*.net *.split]
hexology has quit [*.net *.split]
r0bby has quit [*.net *.split]
willamin has quit [*.net *.split]
ulyssa has quit [*.net *.split]
krobin has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
dom96 has quit [*.net *.split]
Flipez has quit [*.net *.split]
riza has quit [*.net *.split]
oprypin has quit [*.net *.split]
adam12 has quit [*.net *.split]
oz has quit [*.net *.split]
[R] has joined #crystal-lang
Welog has joined #crystal-lang
fifr has joined #crystal-lang
avane has joined #crystal-lang
notzmv has joined #crystal-lang
snowdrop has joined #crystal-lang
f1refly has joined #crystal-lang
dom96 has joined #crystal-lang
yxhuvud has joined #crystal-lang
wmoxam has joined #crystal-lang
mattt has joined #crystal-lang
jrayhawk has joined #crystal-lang
dannyAAM has joined #crystal-lang
oz has joined #crystal-lang
jhass has joined #crystal-lang
adam12 has joined #crystal-lang
oprypin has joined #crystal-lang
riza has joined #crystal-lang
Flipez has joined #crystal-lang
edegaru has joined #crystal-lang
foxxx0 has joined #crystal-lang
mikko has joined #crystal-lang
DeBot has joined #crystal-lang
Liothen has joined #crystal-lang
Stephie has joined #crystal-lang
fifr[m] has joined #crystal-lang
dostoyevsky2 has joined #crystal-lang
jhass[m] has joined #crystal-lang
raz has joined #crystal-lang
Vexatos has joined #crystal-lang
lanodan has joined #crystal-lang
ulyssa has joined #crystal-lang
krobin has joined #crystal-lang
hexology has joined #crystal-lang
r0bby has joined #crystal-lang
willamin has joined #crystal-lang
FromGitter has joined #crystal-lang
dostoyevsky2 has quit [Max SendQ exceeded]
dostoyev1ky2 has joined #crystal-lang
dostoyev1ky2 has quit [Client Quit]
markmarkmark has joined #crystal-lang
frojnd has joined #crystal-lang
ur5us has joined #crystal-lang
maria_elis has joined #crystal-lang
Guest1975 has joined #crystal-lang
Elouin has joined #crystal-lang
dostoyevsky2 has joined #crystal-lang
dostoyevsky2 has quit [Client Quit]
dostoyevsky2 has joined #crystal-lang
fifr[m] has quit [Ping timeout: 272 seconds]
jhass[m] has quit [Ping timeout: 272 seconds]
dostoyevsky2 has quit [Client Quit]
dostoyevsky2 has joined #crystal-lang
dostoyevsky2 has quit [Client Quit]
dostoyevsky2 has joined #crystal-lang
edegaru has quit [Quit: Leaving]