<FromGitter>
<Daniel-Worrall> A late night thought. Can macros be benchmarked?
<FromGitter>
<Blacksmoke16> in regards to what?
<FromGitter>
<Blacksmoke16> how long they take to compile?
<FromGitter>
<Daniel-Worrall> Yeah
<FromGitter>
<Daniel-Worrall> I guess
<FromGitter>
<Blacksmoke16> `--stats --progress` could add those flags and see what the diff is
<FromGitter>
<Blacksmoke16> but otherwise its just code that happens at compile time so isnt much to benchmark like there is at runtime speed
<FromGitter>
<watzon> JSON::Serializable doesn't create an initializer for the properties right?
<FromGitter>
<watzon> Just one that takes a JSON::PullParser
<FromGitter>
<Blacksmoke16> correct
<FromGitter>
<watzon> Unfortunate
<FromGitter>
<Blacksmoke16> could use a record π
<FromGitter>
<watzon> Yeah but that doesn't work for cases where I need it to be a class
<FromGitter>
<Blacksmoke16> Just add it yourself to the module?
<FromGitter>
<Blacksmoke16> Can't be too hard
<FromGitter>
<watzon> Yeah that's what I've resigned myself to
hightower3 has quit [Ping timeout: 246 seconds]
gangstacat has quit [Ping timeout: 276 seconds]
gangstacat has joined #crystal-lang
chemist69 has quit [Ping timeout: 250 seconds]
chemist69 has joined #crystal-lang
DTZUZU has quit [Quit: WeeChat 2.2]
early has quit [Quit: Leaving]
early has joined #crystal-lang
ht_ has joined #crystal-lang
DTZUZU has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
<FromGitter>
<bararchy> @asterite seems like latest release of the GC lib doesn't have brian changes, so need to build from master?
alex`` has quit [Ping timeout: 246 seconds]
<FromGitter>
<bararchy> Did anyone on Arch has a tar.xz for a master of the GC repo?
fyber has quit [Quit: Ping timeout (120 seconds)]
fyber has joined #crystal-lang
<FromGitter>
<bararchy> @bcardiff did you tested on Linux or only on OSx
<FromGitter>
<bararchy> Ok, so after digging around I saw that you need a patched bdwgc, and how to patch is avilable in distrebution scripts
fyber has quit [Ping timeout: 246 seconds]
<FromGitter>
<absolutejam_gitlab> Is there a parallel to how you can pass pointers to objects or objects by value?
<FromGitter>
<absolutejam_gitlab> Just musing earlier on the train
<FromGitter>
<absolutejam_gitlab> It's very distinctly a class or a struct right?
<FromGitter>
<absolutejam_gitlab> And that's essential pass by ref or pass by value
<FromGitter>
<absolutejam_gitlab> Essentially
fyber has joined #crystal-lang
DTZUZO has quit [Ping timeout: 245 seconds]
absolutejam1 has joined #crystal-lang
commavir has quit [Remote host closed the connection]
commavir has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 268 seconds]
<FromGitter>
<bararchy> @bcardiff @asterite managed to get it to work, manually patched the GC , life is great again
gangstacat has quit [Quit: Δis!]
absolutejam1 has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 244 seconds]
<FromGitter>
<watzon> @absolutejam_gitlab pretty much
hightower3 has joined #crystal-lang
hightower3 has quit [Ping timeout: 258 seconds]
absolutejam1 has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 268 seconds]
hightower3 has joined #crystal-lang
gangstacat has joined #crystal-lang
alex`` has joined #crystal-lang
absolutejam1 has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 245 seconds]
erdnaxeli has joined #crystal-lang
HumanGeek has quit [Quit: Leaving]
<FromGitter>
<bcardiff> @bararchy I'm glad you handle it. FYI in the near future that patch will probably change once or twice in order to be replaced with the final version of the upstream patch so we can use a tagged release directly of bdw-gc
<FromGitter>
<bararchy> @bcardiff I saw they already changed in master the `get_stack_bottom` with `get_my_stack_bottom`
<FromGitter>
<bararchy> which is why just cloning master didn't help even though your patch is merged
<FromGitter>
<bcardiff> Yeah, we release in the middle and they tweak things a bit after.
<FromGitter>
<bararchy> yeha, the `get_my...` causes a invalid mem access crash
<FromGitter>
<bararchy> so in the end I just cloned the way you do it in distribution scripts
<FromGitter>
<bararchy> specific tag, patch, build
<FromGitter>
<bararchy> I hope we can make sense of this all so that different distros can package this whole thing
<FromGitter>
<bararchy> anyway, tried our engine with the new MT preview
<FromGitter>
<bcardiff> How did it go?
<FromGitter>
<bararchy> Still gathering data, but β β 1) Stable β 2) The reactiveness of the engine is amazing, we built in with Fibers, Channels and overall MT in mind, so we really getting a kick out of it. β ... [https://gitter.im/crystal-lang/crystal?at=5d724a8111f374371a0d6d0a]
<FromGitter>
<bararchy> I think we currently have one of the largest production projects in Crystal land, so I guess it's a good thing that we see stability. β We really use most things Crystal and the STD has to offer + lot's of common shards
<FromGitter>
<bcardiff> Great! β β Also, since yesterday nightlies are up to date with master, so the GC and MT is usuable from there. Since monday nightlies were failing but it got a fix.
duane has joined #crystal-lang
DTZUZO has joined #crystal-lang
<FromGitter>
<bararchy> @bcardiff via the docker image you mean? Or nightly packages ?
HumanG33k has joined #crystal-lang
<FromGitter>
<bararchy> Also, any chance we can have an Arch Linux package? Its frustrating seeing all this .deb and waiting on Arch to add it to the test repo
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
<FromGitter>
<bcardiff> I mean nightlies at all: packages and docker images.
<FromGitter>
<bcardiff> shipping need to imply automating the release and increasing the coverage of the CI to make it a first class citizen. But also we would need to be more involved/aware of the distro. It's not something we see us focusing before 1.0 I would say. It could change of course, but is not right now in the short list.
<FromGitter>
<dscottboggs_gitlab> yeah i guess that was a stupid question. I guess I'm more asking why that doesn't lead to an error or actually overflow and instead just outputs 0
<FromGitter>
<dscottboggs_gitlab> and if there's any way to create a...I guess BigInt at compile time?
<FromGitter>
<tenebrousedge> that looks like it works
<FromGitter>
<dscottboggs_gitlab> only at runtime. so like I have a solution for the actual code, but I wanted to have the macros expand in the documentation :/
<FromGitter>
<Blacksmoke16> i think you have to build with `-D preview_overflow`
<FromGitter>
<kingsleyh> hi - if I have a crystal file with a class that is a sub type of a parent - how can I parse the file and know if it's a sub_class of the specific type?
<FromGitter>
<dscottboggs_gitlab> still getting the same results using BigInt at runtime and `-D preview_overflow`
<FromGitter>
<Blacksmoke16> can also loop like `{% for sub in ParentClass.all_subclasses %}`
<FromGitter>
<kingsleyh> how can I include a subclass in the list - when the file containing the subclass is being supplied as a flag in option parser?
<FromGitter>
<Blacksmoke16> what?
<FromGitter>
<kingsleyh> e.g. myapp.cr --file="./some_file.cr"
<FromGitter>
<kingsleyh> and some_file.cr is a subclass of MyClass
<FromGitter>
<kingsleyh> so I have to require the file first?
<FromGitter>
<kingsleyh> with some kind of dynamic require?
<FromGitter>
<Blacksmoke16> not sure how you would do that
<FromGitter>
<kingsleyh> I want to locate a set of files in a directory and run them and generate a report - except the files are not tests - but they do some stuff
<FromGitter>
<kingsleyh> I can't see how the files in the minitest test directory get included in the scope when the all_subclasses is executed?
<FromGitter>
<kingsleyh> hello again - if I have a method in a variable is there any way to call it at runtime?
<FromGitter>
<kingsleyh> e.g. my_method = "my_method()"
<FromGitter>
<kingsleyh> some kind of macro?
<FromGitter>
<Blacksmoke16> kinda, would have to make a case statement that is built from all the methods on that type, then when given the string name execute the corresponding method
<FromGitter>
<kingsleyh> ah ok
<FromGitter>
<kingsleyh> might work
<FromGitter>
<kingsleyh> another approach is - I could generate a new file - and then use the run macro
ua_ has joined #crystal-lang
ua has quit [Ping timeout: 244 seconds]
<FromGitter>
<Blacksmoke16> π¬ i guess?
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 245 seconds]
ternarysolo has quit [Remote host closed the connection]
beepdog has quit [Remote host closed the connection]
erdnaxeli has quit [Remote host closed the connection]
olbat[m] has quit [Remote host closed the connection]
beepdog has joined #crystal-lang
<FromGitter>
<bararchy> Where does the Crystal nightlies sit?
<FromGitter>
<Blacksmoke16> docker image and/or on snap
<FromGitter>
<Blacksmoke16> and*
<FromGitter>
<Blacksmoke16> are the easiest two
<FromGitter>
<bararchy> hmm how do I use snap to install nightly crystal?
<FromGitter>
<Blacksmoke16> stable/beta channels are stable release
ternarysolo has joined #crystal-lang
olbat[m] has joined #crystal-lang
<FromGitter>
<Blacksmoke16> edge has the latest nightly version
<FromGitter>
<Blacksmoke16> np
<FromGitter>
<jwoertink> I have this bug that I mentioned yesterday. I'm having trouble re-creating it outside of my app. Maybe someone here has an idea of what I can look for?
<FromGitter>
<kingsleyh> I think it would be nice not to have to type the `end` in the case when an `initialize` has no body - like the way Dart language does it
<FromGitter>
<Blacksmoke16> `crystallang/crystal:nightly` my bad
<FromGitter>
<bararchy> I want to, but the image is based on old ubuntu (or debian?) and I need from things in the `builder` part, as in, 3 different build stages as I need `ubunut:latest` for parts of the build
<FromGitter>
<Blacksmoke16> hmm
<FromGitter>
<bararchy> I'll try and see if I can combine it in a way that works
<FromGitter>
<Blacksmoke16> could always build from source as well? :shrug:
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter>
<bararchy> source won't work with new mt_preview
<FromGitter>
<bararchy> XD
<FromGitter>
<Blacksmoke16> why wouldnt it?
<FromGitter>
<bararchy> because it doesn't have the hacking around of the GC lib
<FromGitter>
<Blacksmoke16> hmm no idea :p
<FromGitter>
<bararchy> and the GC lib hasn't provided a release with the new changes
<FromGitter>
<bararchy> yeha XD full day and a half on this thing
<FromGitter>
<bararchy> I managed to build our solution locally with it, but I need to work on testing in the docker
<FromGitter>
<asterite> @jwoertink is Array inherited in your app?
<FromGitter>
<Blacksmoke16> where all but nightly is required for PR merge
<FromGitter>
<Blacksmoke16> then maybe a like `deploy` job that requires all but nightly to deploy the api docs when merged into master
<FromGitter>
<Blacksmoke16> but that seems like it would be best for a totally diff workflow
<FromGitter>
<Blacksmoke16> vs a "job" within this one
<FromGitter>
<Blacksmoke16> which i could have only run on pr merged into master
<FromGitter>
<tenebrousedge> does it have an "approval" step?
<FromGitter>
<tenebrousedge> it's very similar to CircleCI, which allows you to have workflows with a "click OK to proceed" step
<FromGitter>
<Blacksmoke16> hmm
<FromGitter>
<tenebrousedge> I found that useful for deploys
<FromGitter>
<Blacksmoke16> there is a trigger for when a release is published
<FromGitter>
<Blacksmoke16> which would be good for like actual deployment of binaries and stuff
<FromGitter>
<Blacksmoke16> but id imagine you would want the api docs up to date with master
<FromGitter>
<tenebrousedge> probably. I also don't want a new version of whatever hitting production at 5pm on a Friday, whether or not it passed all the automated tests
<FromGitter>
<Blacksmoke16> yea even being able to have a workflow defined that can only be triggered manually would be good
<FromGitter>
<Blacksmoke16> then can just kick it off whenever you want and be good
<FromGitter>
<tenebrousedge> if that can be combined with an admin list I'd be down
<FromGitter>
<Blacksmoke16> might have to see if that has been feature requested yet
<FromGitter>
<Blacksmoke16> looks like they support that via an API request
<FromGitter>
<kingsleyh> if I have a method: hello(name : String) - how can I make it accept an array without specifying an Array type: e.g. d = ["kings"] ; hello(d)
<FromGitter>
<Blacksmoke16> `hello(name : Array)`
<FromGitter>
<kingsleyh> no I don't want an Array
<FromGitter>
<kingsleyh> I want to keep hello(name : String, color : String)
<FromGitter>
<kingsleyh> but pass the arguments to it from an array
<FromGitter>
<kingsleyh> or I could use any other enumeration
<FromGitter>
<Blacksmoke16> wait what?
<FromGitter>
<kingsleyh> I'm sure there is a notation for it in Crystal
<FromGitter>
<tenebrousedge> I think a destructuring splat might work
<FromGitter>
<Blacksmoke16> `how can I make it accept an array without specifying an Array type` `no I don't want an Array`
<FromGitter>
<kingsleyh> yes - I think that a splat is the answer
<FromGitter>
<tenebrousedge> hello(*array)
<FromGitter>
<kingsleyh> thanks
<FromGitter>
<Blacksmoke16> you cant splat an array tho
<FromGitter>
<tenebrousedge> I thought that was recently added
<FromGitter>
<Blacksmoke16> this would take three overloads
<FromGitter>
<Blacksmoke16> one to handle a single string, one to handle an array of strings, and one to handle a variadic amount of names
<FromGitter>
<kingsleyh> hmm maybe a tuple would be easier
<FromGitter>
<Blacksmoke16> what are you trying to do?
<FromGitter>
<kingsleyh> I've parsed a method from some text - and so now I have the base name of the method as a string, and I have each of the arguments as strings
<FromGitter>
<kingsleyh> now I want to call the method with the argumentws
<FromGitter>
<Blacksmoke16> all of this happens at runtime?
<FromGitter>
<kingsleyh> the method is actually a proc
<FromGitter>
<kingsleyh> yes at runtime
<FromGitter>
<kingsleyh> I have it working with no arguments
<FromGitter>
<kingsleyh> but now I'm trying to get arguments to work
<FromGitter>
<Blacksmoke16> you could do like `*Tuple(String).from(["foo"])`
<FromGitter>
<Blacksmoke16> looks like you can reference steps from other places, i.e. could have a common crystal actions repo for doing common things
<FromGitter>
<Blacksmoke16> or ameba etc could set it up for their specific stuff etc
go|dfish has joined #crystal-lang
<FromGitter>
<Blacksmoke16> would be nice if you could share workflows, as im pretty much going to use the same one between all my repos
<FromGitter>
<Blacksmoke16> might play with that next