RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.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> <Blacksmoke16> anyone notice sublime crystal plugin doesnt auto format anymoer?
<FromGitter> <drum445> I was just about to say
<FromGitter> <drum445> Quite sad
<FromGitter> <drum445> Switched my finance lib to use decimal %ages as it was a bit ropey before, would appreciate people's opinions on the lib. ⏎ https://github.com/drum445/financials
<FromGitter> <Blacksmoke16> %ages?
<FromGitter> <drum445> percentages
<FromGitter> <Blacksmoke16> ah
<FromGitter> <Blacksmoke16> man i miss that auto format
<FromGitter> <drum445> haha, same
<FromGitter> <Blacksmoke16> hopefully get patched soon
<FromGitter> <drum445> I wonder why it went
<FromGitter> <drum445> Never seen that issue during version changes before
<FromGitter> <drum445> Also, have you see the compiler spit out "You found a bug in the compiler...." for just normal syntax errors
<FromGitter> <Blacksmoke16> havent seen that one
<FromGitter> <Blacksmoke16> was a pr to refactor formatting, might have changed something that broke the formatter
<FromGitter> <Blacksmoke16> because under the hood it was just calling crystal tool format
<FromGitter> <drum445> ah cool
<FromGitter> <drum445> hope it gets fixed
<FromGitter> <Blacksmoke16> yea its using a command that got removed now
<FromGitter> <Blacksmoke16> can download the zip and extract it to ~/.config/sublime-text-3/Packages to get it back for now
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <girng> &. amazes me every single time...
<FromGitter> <Blacksmoke16> Is pretty slick
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <girng> https://play.crystal-lang.org/#/r/65no/edit how come that if statement isn't `true`?
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <girng> AHHAHAHA WOW
<FromGitter> <Blacksmoke16> figure it out?
<FromGitter> <girng> yep :D
<FromGitter> <girng> comparing a string to a char
<FromGitter> <Blacksmoke16> πŸ‘
<FromGitter> <girng> i'm dumb sometimes :/
<FromGitter> <girng> i'm doing player speech bubbles, need to detect `!message ` ⏎ actually, i think this is a remnant from coding ins javascript. i think "!" would have worked
<FromGitter> <Blacksmoke16> prob better to do
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/65p3
<FromGitter> <girng> oh `starts_with`, wow
<FromGitter> <Blacksmoke16> mhm
<FromGitter> <girng> yah prob better, cause empty string will not cause an indexError
<FromGitter> <girng> thanks
<FromGitter> <Blacksmoke16> np
<FromGitter> <dscottboggs_gitlab> Is there a recommended way to set up the appropriate state to run the specs Crystal itself. TBH that's the biggest thing keeping me from contributing to Crystal right now, I can't run the specs on the unmodified repo, let alone to check my changes. I've been trying `make clean && make spec` inside the `jrei/crystal-alpine` docker image at the 0.27.1 branch commit, but there's clearly some specs which
<FromGitter> ... rely on some sort of preconfigured state.
<FromGitter> <Blacksmoke16> really?
<FromGitter> <Blacksmoke16> i just do a make clean && make && make std_spec
<FromGitter> <Blacksmoke16> and works fine
<FromGitter> <dscottboggs_gitlab> std_spec...interesting
<FromGitter> <dscottboggs_gitlab> lets see how that works out
<FromGitter> <HarrisonB> Any ideas why this is generating this error https://play.crystal-lang.org/#/r/65ps
<FromGitter> <Blacksmoke16> yea there are two sets of specs you can run
<FromGitter> <Blacksmoke16> `make spec` runs both
<FromGitter> <Blacksmoke16> `make std_spec` runs just std lib stuff, while `make compiler_spec` does compiler specs
<FromGitter> <HarrisonB> Here's the source: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c567ac2f46373406a444577]
<FromGitter> <HarrisonB> And here's the error: `Error in line 5: instance variable '@server' of TestServer was not initialized directly in all of the 'initialize' methods, rendering it nilable. Indirect initialization is not supported.`
<FromGitter> <dscottboggs_gitlab> looks to me like it's initialized properly..
<FromGitter> <Blacksmoke16> well
<FromGitter> <dscottboggs_gitlab> maybe try it without the `self.`?
<FromGitter> <HarrisonB> If you remove the `self.`, it creates a local
<FromGitter> <dscottboggs_gitlab> oof, yeah, you're right
<FromGitter> <Blacksmoke16> ah i see the issue
<FromGitter> <dscottboggs_gitlab> what about if you do `@last_request`?
<FromGitter> <Blacksmoke16> `self` is `TestServer`
<FromGitter> <Blacksmoke16> yea gotta do that
<FromGitter> <Blacksmoke16> `self.last_request` calls the setter for that ivar
<FromGitter> <Blacksmoke16> which would make it not set in the initalizer
<FromGitter> <Blacksmoke16> `@` sets the ivar directly
<FromGitter> <dscottboggs_gitlab> but that property is nillable?
<FromGitter> <Blacksmoke16> :thinking:
<FromGitter> <dscottboggs_gitlab> just got a bunch of failures and errors on `make std_spec`.... I'm not sure why I'm using the alpine image, I'll try `FROM crystal-lang/crystal`
<FromGitter> <Blacksmoke16> oh you running it in docker?
<FromGitter> <dscottboggs_gitlab> yes
<FromGitter> <HarrisonB> ah so the initializer can't call any methods or the ivars might be have been mutated
<FromGitter> <Blacksmoke16> make sure you have the deps required
<FromGitter> <Blacksmoke16> like llvm and stuff
<FromGitter> <dscottboggs_gitlab> Don't really want to run it on my local system, I don't know what kind of things the specs are gonna do
<FromGitter> <Blacksmoke16> prob something like that, hence the error message `not initialized directly`
<FromGitter> <Blacksmoke16> yea cant say i tried running it via docker
<FromGitter> <Blacksmoke16> should be doable tho since it runs on CI
Vexatos has quit [Quit: ZNC Quit]
RX14 has quit [Quit: Fuck this shit, I'm out!]
<FromGitter> <dscottboggs_gitlab> ugh it's gonna have to wait til tomorrow I'm beat
<FromGitter> <dscottboggs_gitlab> ✌️ good night
<FromGitter> <Blacksmoke16> o/
RX14 has joined #crystal-lang
_whitelogger has joined #crystal-lang
Vexatos has joined #crystal-lang
<FromGitter> <girng> gn
marmotini_ has joined #crystal-lang
gangstacat has quit [Quit: Ĝis!]
_whitelogger has joined #crystal-lang
marmotini_ has quit [Ping timeout: 246 seconds]
gangstacat has joined #crystal-lang
marmotini_ has joined #crystal-lang
marmotini has joined #crystal-lang
marmotini_ has quit [Ping timeout: 240 seconds]
<FromGitter> <bew> @dscottboggs_gitlab I also can't build the specs (not enough ram), but you can usually run individual spec files, they should be self contained! And then I let the CI do the full tests
<FromGitter> <silmanduin66> hello
<FromGitter> <bew> Hi @silmanduin66
ashirase has quit [Ping timeout: 246 seconds]
ashirase has joined #crystal-lang
<oprypin> 0.27.1 broke crsfml
<oprypin> works locally tho
<FromGitter> <drum445> @Blacksmoke16 top suff, cheers
<FromGitter> <j8r> @dscottboggs_gitlab i use jrei/crystal-alpine to contribute
<FromGitter> <j8r> There are specs failing due to musl
<FromGitter> <j8r> Just run the spec you need with `.build/crystal spec spec/std/...cr`
<FromGitter> <j8r> Obviously I ran `make` before
<FromGitter> <bararchy> @j8r does alpine has a package for crystal `0.27.1` ?
marmotini has quit [Ping timeout: 245 seconds]
laaron has quit [Remote host closed the connection]
<mps> bararchy: not yet, fails on some tests
<mps> builds ok with llvm5 and llvm6 but tests fails on both on the same test/spec
<mps> j8r: looks like you need static crystal 0.27.0 to build 0.27.1
<mps> j8r: I mean build using Alpine build (abuild)
marmotini_ has joined #crystal-lang
jemc has joined #crystal-lang
ua has quit [Ping timeout: 250 seconds]
ua has joined #crystal-lang
<FromGitter> <r00ster91> module Mod ⏎ end ⏎ ⏎ module Mod1 ⏎ include Mod ... [https://gitter.im/crystal-lang/crystal?at=5c56fc428aa5ca5abf79ec06]
<FromGitter> <Blacksmoke16> neg
<FromGitter> <r00ster91> hmm it doesn't look like he created an issue on GitHub yet
marmotini_ has quit [Ping timeout: 250 seconds]
<FromGitter> <loloof64> Hi everybody ! As a Crystal beginner, I am facing what should be a basic difficulty for many ones.
<FromGitter> <loloof64> I am trying to use this library : https://github.com/hedron-crystal/hedron
<FromGitter> <loloof64> I've already built the libui whose needed and set it in /usr/lib
<FromGitter> <loloof64> But I don't know how should I require the "hedron" library
<FromGitter> <loloof64> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c5703db975714406b8a44eb]
<FromGitter> <loloof64> The previous code does not work as the require seems bad
<FromGitter> <loloof64> ```Error resolving hedron (0.1.0)```
<FromGitter> <loloof64> Dependencies section of my shard.yml
<FromGitter> <loloof64> ``` ⏎ dependencies: ⏎ hedron: ⏎ github: Qwerp-Derp/hedron ⏎ version: 0.1.0``` [https://gitter.im/crystal-lang/crystal?at=5c5704361b62f1265096f4cd]
<FromGitter> <loloof64> Thanks in advance for any help, even for a maybe stupid issue like this
<FromGitter> <r00ster91> do you get this error when you run `shards`?
<FromGitter> <loloof64> yes
<FromGitter> <loloof64> shards build
<FromGitter> <r00ster91> hmm try removing the `version`
<FromGitter> <loloof64> Yes, right now
<FromGitter> <r00ster91> also try only `shards`, not `shards build`
<FromGitter> <loloof64> shards build works without the version πŸ˜„ Thank you πŸ˜„
<FromGitter> <r00ster91> oh nice. So it looks like the README is a bit outdated
<FromGitter> <loloof64> Yes, indeed πŸ˜„
<FromGitter> <loloof64> Also one line during the fetch was strangely : `Installing hedron (0.1.0 at HEAD)`
<FromGitter> <loloof64> (HEAD !)
<FromGitter> <loloof64> Maybe I got the error because of recent modifications, even if the version is the same
<FromGitter> <Blacksmoke16> @loloof64 the issue is they dont have any releases
<FromGitter> <Blacksmoke16> so not using version works since it fetches from master
<FromGitter> <loloof64> Ok : I understand better πŸ˜„
<FromGitter> <loloof64> Not Crystal-specific question, but a generic C/C++/Crystal one : I have the GTK3 developpement files installed, but it seems I still have to link them (got many errors like `undefined reference to « gtk_container_set_border_width »`). As I built libUI as static and as a linux User, does that mean that I have to add an -ld section to my `shards build` command ?
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <Blacksmoke16> im not too familiar with the C bindings
<FromGitter> <loloof64> Indeed, I am targeting a bit high from the beginning, as libUI appears to me to be a great UI to start
<FromGitter> <loloof64> Unfortunately, its repository lacks a bit of documentation
<FromGitter> <r00ster91> I would also try the QT5 binding and Glass
<FromGitter> <loloof64> Yes, if I can't manage with LibUI, i'll go for Qt5. I did not want to because of commercial app restriction (it seems that you have to share your sources if you want to use the LGPL version), even if for now, that can't be a problem. Just in case I would have to do commercial app.
<FromGitter> <loloof64> Oh I forgot that with QT5, one can program commercial application if the qt5 lib is used as dynamic, and not static
<FromGitter> <loloof64> So maybe, I could use this last approch
<FromGitter> <loloof64> If I've well undestood from all sources I've been on so far ...
<FromGitter> <loloof64> Otherwise, as I am convinced that libUI worth the efforts, it seems, from my last `shards build` error, that the compiler has tried to compile the c code dynamically instead of statically
<FromGitter> <loloof64> ```code paste, see link```
<FromGitter> <loloof64> why the -rdynamic flag ?
<FromGitter> <r00ster91> try `--static`
<FromGitter> <loloof64> Thanks : I try it right now πŸ˜„
<FromGitter> <loloof64> Also, failed, but the flags differs :
<FromGitter> <loloof64> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c570d637b68f94102654d0b]
<FromGitter> <j8r> Try dynamic linking, then static
<FromGitter> <loloof64> Yes, so I'll rebuild libUI as a dynamic lib first πŸ˜„
<FromGitter> <j8r> Usually the OS has everything for dynamic linking, but sometimes `.a` archives required for static linking are missing
<FromGitter> <loloof64> I understand πŸ˜ƒ
<FromGitter> <loloof64> Indeed, I haven't any error, though I hadn't manage yet to show the window. But at least, no binding error this time. Thank you πŸ˜„
DTZUZO has joined #crystal-lang
<mps> j8r: you mentioned in your message "11:57 j8r| @dscottboggs_gitlab i use jrei/crystal-alpine to contribute". Would you mind to share that url
<FromGitter> <j8r> on my side their new web UI broke the markdown render
<FromGitter> <j8r> tried on Falkon and Firefox
<FromGitter> <j8r> that's annoying because there are mandatory steps for static linking in the README :/
<mps> right, their web ui is annoying, at least. Thanks for url
jemc has quit [Ping timeout: 245 seconds]
jemc has joined #crystal-lang
jemc has quit [Ping timeout: 245 seconds]
<FromGitter> <HarrisonB> I can't seem to find any info about this syntax: `HTTP::Headers { "Foo" => "bar" }`. It doesn't seem like it's passing in a Hash nor does it appear to be a block...
Groogy has joined #crystal-lang
<FromGitter> <HarrisonB> thank you!
<FromGitter> <HarrisonB> Can this be used with a predefined `Hash`?
<FromGitter> <Blacksmoke16> `This literal can be used with any type as long as it has an argless constructor and responds to []=.`
<FromGitter> <Blacksmoke16> which i dont think `Hash` has an argless constructor so prob not?
<FromGitter> <j8r> A bit magic, but much than the `{...} of String | Int32` syntax
<FromGitter> <j8r> I don't know what is `of` – looks like a keyword
<FromGitter> <j8r> *much better
Yxhuvud has quit [Ping timeout: 240 seconds]
jemc has joined #crystal-lang
Yxhuvud has joined #crystal-lang
moei has quit [Quit: Leaving...]
<FromGitter> <j8r> Still don't know why people love Python – nowadays there are more exiting
<FromGitter> <j8r> languages. Maybe they haven't tried them
<FromGitter> <j8r> Like Nim, Julia, Go
<oprypin> thanks for your opinion
<FromGitter> <j8r> just wondering :3
<FromGitter> <j8r> Strange he mention Crystal, not Nim?
<oprypin> why?
<FromGitter> <j8r> Because Nim is closer of Python than Crystal
<oprypin> that's definitely false
<FromGitter> <j8r> Community wise too
<FromGitter> <j8r> Crystal is closer of Python compared to Nim? I don't think so
<oprypin> ok
<oprypin> just trust me as someone with > 2 years of experience with all 3
<FromGitter> <j8r> Anyway thanks for pointing to the Tweeter messages, interesting discussion