<FromGitter>
<naqvis> @j8r yeah, for usage purposes, I reviewed the samples and api documentation of lzma. Used wonderful `crystal_lib` for generating the bindings, did some cleanup, wrapped API calls to crystal IO. Pretty stratight-forward due to presence of `crystal_lib` as that does all of the heavy-lifting of generating C to Crystal bindings, we just need to tweak things afterwards.
<FromGitter>
<xqyww123> Does anyone find version `0.31.0` breaks some C binding caused by `invalid memory access` at runtime, while the same code works nicely in `0.30.0` (Maybe later I submit an issue if I find out the reason
<FromGitter>
<naqvis> @xqyww123 by any means are you using `GC.alloc` and/or `GC.free` in your binding code?
<FromGitter>
<naqvis> I had similar issues and got that removed and had lib used C `malloc` and/or `free`
<FromGitter>
<xqyww123> yeah, some buffer allocated from Crystal is sent to C code. I will try it later
<FromGitter>
<naqvis> that's something different. I'm talking about some libraries allowed passing `allocator` and/or `deallocator` which are used by library for allocating/freeing mem
<FromGitter>
<xqyww123> Ummm, it sounds too advanced. No, I haven't used such cool things.
<FromGitter>
<naqvis> then that might be different issue you are encountering.
<FromGitter>
<xqyww123> Actually I haven't begun to dive into the bug (I simply downgraded crystal version temporarily :-)
<FromGitter>
<naqvis> i would suggest to pin-point the code which is causing that error
<FromGitter>
<naqvis> might be something hidden which got figured out by higher version of language
<FromGitter>
<xqyww123> Yeah, I will, after my current work
<FromGitter>
<naqvis> great
<FromGitter>
<naqvis> do share your findings in this channel
<FromGitter>
<xqyww123> (while every Chinese programmer is exploited by their boss :D , Of course, I will share :D
<FromGitter>
<naqvis> hahaha ð
<FromGitter>
<naqvis> in OSS world you are your own boss ð
<FromGitter>
<xqyww123> (after today the DDL for me to submit the weekly report :D
DTZUZO has quit [Ping timeout: 265 seconds]
<FromGitter>
<naqvis> apologies for any offense if any caused. All I meant was to request your sharing after you find the issue and root-cause, as that is definitely going to help all others in this community ð
<FromGitter>
<xqyww123> take it easy and I know. I'm enthusiastic to contribute to the community :-)
<FromGitter>
<naqvis> ð
<FromGitter>
<xqyww123> (If my language skill was better I'll even better :D
<FromGitter>
<naqvis> practice makes perfect, we all learn from each other, that's the beauty of OSS and sharing
<FromGitter>
<xqyww123> (āļ âĒĖ_âĒĖ)āļ
<FromGitter>
<xqyww123> (Actually, my current project will be open-sourced after it finished with already acquired permission from company :)
<FromGitter>
<naqvis> great work
DTZUZO has joined #crystal-lang
<FromGitter>
<kingsleyh> Hi - does anyone know if it's possible to get crystal to emit LLVM IR bitcode that would work when passed to the `lli` tool to run it JIT style
<FromGitter>
<kingsleyh> I did this: `crystal build b.cr --emit llvm-ir`
<FromGitter>
<kingsleyh> but the `lli b.ll` complained:
<FromGitter>
<kingsleyh> it doesn't mention that the ll code can be executed by lli though - or if any dependent shared objects would be required to run it
<FromGitter>
<kingsleyh> the ll code on that github does seem to run though
<FromGitter>
<kingsleyh> I guess it does not include the prelude tho
<FromGitter>
<kingsleyh> I guess it can't print to stout for some reason - I don't know enough about it to understand why though
<FromGitter>
<kingsleyh> the C file example does print out to the console though
<FromGitter>
<asterite> it's probable that lli's version is from a different LLVM version. The version must match the one in the compiler. LLVM introduces breaking changes by the minute
<FromGitter>
<asterite> (well, we are not so different)
<FromGitter>
<j8r> @naqvis but snappy is a pure Crystal implementation?
<FromGitter>
<j8r> I hope the bindings will work on aarch64 musl, I will check it in the following weeks
alex`` has quit [Ping timeout: 268 seconds]
alex`` has joined #crystal-lang
<FromGitter>
<naqvis> yeah Snappy is pure Crystal. XZ is bindings, as long as you have xz installed, it should work
<FromGitter>
<naqvis> xz-utils comes with installation of lzma
<FromGitter>
<j8r> In alpine it will be `xz-dev`, yes it should work :)
<FromGitter>
<j8r> I like this format, very efficient for archives and quite widepread
<FromGitter>
<j8r> I see no point nowadays using `bz2`
<FromGitter>
<kaukas_gitlab> Hi! I need support of `before :all` (specific to a particular `describe`) kind of spec setup. In Crystal 0.28 (?) I achieved that by doing this: â â ```code paste, see link``` â â However, on the current release (0.31) all of my setup (`do_setup` and `do_other_setup`) runs before all specs, and then the specs run. So something seems to have changed at some point. How can I achieve `before
<oprypin>
kaukas_gitlab, so might be worth ignoring 0.31.0 and going for 0.31.1 when it's out
<FromGitter>
<Blacksmoke16> That won't really help since that pr just adds methods that run before or after all specs run
<FromGitter>
<Blacksmoke16> Not just that specific describe block
<FromGitter>
<naqvis> @j8r you shouldn't be required to have `xz-dev` installed, as dev packages are only required when you are building something, like looking into header files or generating bindings.
<FromGitter>
<naqvis> that part is done, so you will require to have `lzma` library installed which is required during linking and runtime
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 240 seconds]
<FromGitter>
<Val> Is it possible to try Crystal program with arguments (ARGV) in carc.in ?
<FromGitter>
<tenebrousedge> why?
<FromGitter>
<Val> why not asking?
<FromGitter>
<tenebrousedge> answer the question, please
<FromGitter>
<Val> to test a program with arguments in carc.in
<FromGitter>
<tenebrousedge> why?
<FromGitter>
<Val> ...
<FromGitter>
<tenebrousedge> what are you trying to test?
<FromGitter>
<tenebrousedge> because it clearly does not support that, and because you shouldn't need to test option handling
<FromGitter>
<tenebrousedge> and if you do need to test option handling, there are likely better ways
<FromGitter>
<Val> Ok thx
<FromGitter>
<tenebrousedge> @Val so what are you trying to test?
<FromGitter>
<tenebrousedge> ð
chachasmooth_ has quit [Ping timeout: 240 seconds]
chachasmooth has joined #crystal-lang
<oprypin>
Val, just overwrite ARGV at first :D `ARGV.replace(["a", "b"])`
<FromGitter>
<Val> :-D
<FromGitter>
<Val> Is it normal that `at_exit` is called before the end of the process when running specs since Crystal 0.31.0 ? See https://carc.in/#/r/7nx1 (Crystal 0.30.1) versus https://carc.in/#/r/7nwz (Crystal 0.31.0)
<FromGitter>
<Blacksmoke16> im not super up to date on the PR, but afaik its so that you can gather all the specs, filter them, then executes the ones that match
<FromGitter>
<Blacksmoke16> for the implementation of `focus: true`
<FromGitter>
<Blacksmoke16> is what i landed on for now, need to add in the context tho
<FromGitter>
<Blacksmoke16> some of the logic is still tied to the format, namely how to read the value from the deserialized data, rest is handled in another method
<FromGitter>
<Blacksmoke16> like the exclusion strategies, and callbacks
rohitpaulk has joined #crystal-lang
ht_ has quit [Quit: ht_]
ht_ has joined #crystal-lang
alex`` has quit [Ping timeout: 245 seconds]
alex`` has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]