f1refly has quit [Remote host closed the connection]
f1refly has joined #crystal-lang
<FromGitter>
<Val> Crystal interpreter is a wonderful feature, nice work!
notzmv has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
notzmv has joined #crystal-lang
mikko has quit [Quit: WeeChat 2.7.1]
mikko has joined #crystal-lang
<FromGitter>
<backward-crazy-mage-puppy-36> Thank you @opryin, any idea how to get the interpreter working with an amber project ?
ur5us has joined #crystal-lang
<FromGitter>
<oprypin:matrix.org> @backward-crazy-mage-puppy-36: there's a huge probability that it wouldn't work. the interpreter isn't in good shape yet, particularly it'd need to load OpenSSL which i think it can't load libraries yet
Guest5 has joined #crystal-lang
Guest5 has quit [Quit: Client closed]
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
Vexatos has joined #crystal-lang
Vexatos- has quit [Ping timeout: 256 seconds]
<FromGitter>
<mattrberry> Potentially an odd question. I have a Config class that includes YAML::Serializable. I have a number of properties on that class defined with the property macro. I'd like to make it such that whenever I call the setters for any of those fields, the yaml file is written back. I could write my own property macro that does effectively the same thing or I could just write the setters by hand, but is there a
<FromGitter>
... nicer way to do that?
<FromGitter>
<Blacksmoke16> How many properties?
<FromGitter>
<Blacksmoke16> An alternative easier way would be to add a save method. Then would write it just once
<FromGitter>
<mattrberry> At the moment it's 5, 2 of which are nested YAML::Serializable
<FromGitter>
<Blacksmoke16> Otherwise I'd probably just keep it simple and change them to getters and define custom setters
<FromGitter>
<mattrberry> Yeah I have a write method that I currently call after writing
<FromGitter>
<mattrberry> Just was wondering if there was a simple way to define something like an "after" block on a setter, but I didn't see anything in the api docs
<FromGitter>
<jrei:matrix.org> A custom setter is exactly what you need
<FromGitter>
<mattrberry> Cool I'll stick with whatever looks nicer between the custom setters and the explicit write method
<FromGitter>
<mattrberry> Ty
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<jrei:matrix.org> You can have both though
<FromGitter>
<vgramkris> anyone, why is it throwing error for require logger?? ⏎ ram@ram-XPS-13-9310:~/Code/logger_test$ crystal run mylogger.cr ⏎ Showing last frame. Use --error-trace for full trace. ⏎ ⏎ In mylogger.cr:1:1 ... [https://gitter.im/crystal-lang/crystal?at=61d8be769b470f38975621bc]
<FromGitter>
<Blacksmoke16> logger was removed in favor of the `Log` module
<FromGitter>
<vgramkris> oh, i did not know that, thanks will check it out
<FromGitter>
<Blacksmoke16> wonder how bad of an idea it would be to do the write call in like `at_exit` or `finalize`
<FromGitter>
<Blacksmoke16> prob very :S
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<mattrberry> That would be fine as long as the program exits gracefully, yeah?
<FromGitter>
<mattrberry> Or at least doesn't segfault?
<FromGitter>
<Blacksmoke16> not sure, never looked into it too much
notzmv has quit [Ping timeout: 268 seconds]
<FromGitter>
<jwaldrip:matrix.org> is there a way to get the file a macro is being called from?