Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 08 18:26
    beta-ziliani milestoned #13043
  • Feb 08 18:26
    beta-ziliani milestoned #13043
  • Feb 08 18:00
    Blacksmoke16 labeled #13053
  • Feb 08 17:59
    straight-shoota labeled #13053
  • Feb 08 17:59
    straight-shoota labeled #13053
  • Feb 08 17:59
    straight-shoota assigned #13053
  • Feb 08 17:59
    straight-shoota opened #13053
  • Feb 08 12:19
    straight-shoota closed #13010
  • Feb 08 12:19
    straight-shoota closed #13050
  • Feb 08 12:18
    straight-shoota closed #13048
  • Feb 07 18:12
    HertzDevil labeled #13052
  • Feb 07 18:12
    HertzDevil labeled #13052
  • Feb 07 18:12
    HertzDevil labeled #13052
  • Feb 07 18:12
    HertzDevil opened #13052
  • Feb 07 17:49
    straight-shoota closed #13051
  • Feb 07 17:46
    beta-ziliani milestoned #13051
  • Feb 07 17:46
    beta-ziliani milestoned #13051
  • Feb 07 14:03
    beta-ziliani review_requested #13050
  • Feb 07 13:59
    straight-shoota labeled #13051
  • Feb 07 13:59
    straight-shoota assigned #13051
Chris Watson
@watzon
Yeah I just thought of that
I'm tired and overthinking things lol
Jason Waldrip
@jwaldrip
@watzon would you prefer that as part of the build though?
You can do that with macro syntax pretty easily, i typically have a runner that evals the shard.yml and inserts the version
Chris Watson
@watzon
@jwaldrip yeah I just added it as a method. That works fine :)
Just got my second shard up on GitHub! Still have a bit of work ahead of me, but I have the bindings to procps-ng https://github.com/watzon/crystal-procps
John Jansen
@johnjansen
@elorest that was my vague recollection too …
Jason Waldrip
@jwaldrip
@elorest @johnjansen GC's are not easy... well, not true, gc's are trivial, mallocs are the real pain.
Isaac Sloan
@elorest
yep.
Jason Waldrip
@jwaldrip
Could just comb though bohem and convert it to crystal
Chris Watson
@watzon
Better yet, let's just write a C->Crystal transpiler to do the heavy lifting
Then make all the things Crystal libs
:grin:
Jason Waldrip
@jwaldrip
:-)
sevk
@sevk
:smile:
sevk
@sevk
C->Crystal transpiler +1 , keep all things simple :+1:
Ghost
@ghost~55586c4815522ed4b3e08557
Good luck with that :smile:
Andrea Peruffo
@andreaTP
One question, in a spec I wanna check the output sent to STDOUT but it looks like I cannot mock it, how to do it?
chuanshuo
@lilijreey
@faustinoaq yes Crstal just a front-end, can by run anywehere. like Kotiln
@huacnlee 居然看见了一个熟悉的头像
From IRC (bridge bot)
@FromIRC
<w-p> is it not possible to initialize a class property with setter function from inside the initialize call?
Ghost
@ghost~55586c4815522ed4b3e08557
w-p no you need to explicitly initialize each instance variables in the initializer, not in other functions.
note that when you do @bar = something the setter is not called
From IRC (bridge bot)
@FromIRC
<w-p> so, I can't force the setter to be called during initialization?
<RX14> w-p, i think you misunderstand what a setter is
<RX14> @bar = bar isn't calling bar= and never will
<RX14> because you're setting the instance variable directory
<RX14> not calling the setter
<RX14> directly*
<RX14> indeed
<w-p> self.bar works but still, only if it the associated variables are initialized
<RX14> yes
<w-p> so, defaults can't be calculated.
<RX14> they can be calculated in the initialize function or in "top-level defaults"
<w-p> but not via setters
<RX14> no, it doesn't analyse called functions for whether ivars are set
From IRC (bridge bot)
@FromIRC
<RX14> you must initialise all instance variables before you call the first function in your constructor
Ghost
@ghost~55586c4815522ed4b3e08557
RX14 wut it works, I thought one couldn't init variables in other methods from the initializer Oo
From IRC (bridge bot)
@FromIRC
<RX14> you can't
<w-p> alright. that's fine. now I know. thanks.
Ghost
@ghost~55586c4815522ed4b3e08557
oh no i miss-read the example
From IRC (bridge bot)
@FromIRC
<RX14> w-p, the problem is that i think there are certain conditions where if you allow what you want to do, you can break the type system
<RX14> either that or performance
<w-p> in this instance I was trying to use a configuration object with some mappings such that i could associate one value with another without knowning some things
<w-p> eg: lookup the value of the instance var in a hash where the initialize value is the key - look up that key - set an internal value - etc.
<w-p> without repeating the setter function body
From IRC (bridge bot)
@FromIRC
<RX14> w-p, yeah i guess it's a pain but iirc there's good reasons behind it
<RX14> i can't remember exactly what they are however