<FromGitter>
<Blacksmoke16> i mean cant you just click at the start, scroll, scroll, shift + click at end, then ctrl + / (or whatever the shortcut is)
<FromGitter>
<djberg96> Andriamanitra, hah, thanks, that works
<Andriamanitra>
probably wouldn't leave anything like that in the final product, but it may be handy when you want to leave out some lines while testing things
<FromGitter>
<djberg96> which all i ever use multiline comments for in practice
<FromGitter>
<djberg96> i'm not sure i've ever seen ruby code with it, except for some inlined `if $0 == __FILE` code that the author was using to putter around with
<FromGitter>
<HertzDevil> ruby has `=begin` and `=end` too
<FromGitter>
<djberg96> @HertzDevil yes, i know, i'm saying i only use it during editing
<FromGitter>
<djberg96> that, or it's the "this code is broke right now, do not look", so the readability isn't relevant
<FromGitter>
<djberg96> anyway...i'll use heredocs :)
<FromGitter>
<Blacksmoke16> `handle_error `used to essentially do like `abort "some string"`
<FromGitter>
<Blacksmoke16> but it could also be used in a library context, im updating the method you call to return an `Int32` as the exit code of the job
<FromGitter>
<Blacksmoke16> but how would you return from a method from a `rescue` block in a `spawn`?
<FromGitter>
<Blacksmoke16> or maybe i should send the channel the exit code, that sounds like a better idea
<FromGitter>
<Blacksmoke16> or maybe `Bool | Exception`
<FromGitter>
<djberg96> tried that in just a basic boilerplate project, it fails
<FromGitter>
<djberg96> take out the version and it fails with `Failed git ls-tree -r --full-tree --name-only 2ee152aa19287770b9f7e0b7ee743843b7ce33ca -- shard.yml (). Maybe a commit, branch or file doesn't exist?`
<FromGitter>
<Blacksmoke16> your tag needs to be like `v0.2.0` in GH
<FromGitter>
<djberg96> ok, thanks
* FromGitter
* djberg96 retags everything
_ht has quit [Remote host closed the connection]
postmodern has joined #crystal-lang
<postmodern>
so why does `crystal init` include both "## Development" with "TODO: Write development instructions here" and a "## Contributing" section? What should the Development instructions be?
<postmodern>
guessing something like `shards install` and `crystal spec`. Curious why it's left blank with a TODO.
<postmodern>
do crystal Pointers have a way of attaching a finalizer? so if they get GCed, I could call some C library function to properly deallocate the thing the pointer points to
<FromGitter>
<Blacksmoke16> dev instructions are like "heres how to develop the application locally. E.g. db setup, or external stuff"
<FromGitter>
<oprypin:matrix.org> postmodern, no, instead u should tell the C lib to use GC.malloc or allocate memory yourself
<postmodern>
hmm that may be a problem for hunspell bindings, if you don't explicitly close the dictionary object, but let GC deallocate it which leaves behind the allocated C pointer
<FromGitter>
<oprypin:matrix.org> postmodern, show me the allocation functio n in C
<FromGitter>
<oprypin:matrix.org> dont have autopointer. use a class which calls the needed function in its finalizer
<postmodern>
and does the Class#finalize method have access to the instance variables still when it's called?
<FromGitter>
<oprypin:matrix.org> sure
<FromGitter>
<Blacksmoke16> given its an instance method i would assume so yes
<postmodern>
i also assume i'd have to set some sort of @freed flag to indicate when the pointer was explicitly deallocated (such as when explicitly calling #close).
<FromGitter>
<oprypin:matrix.org> oof that shouldn't be done by a C API if it's a good citizen
<FromGitter>
<oprypin:matrix.org> never encountered such a need
<postmodern>
well that's what FFI::AutoPointer handles for you. You can explicitly call #free, or if GC sweeps the auto-pointer it will check if it's been previously freed to prevent double freeing an old pointer.