Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 30 23:49
    Tamnac synchronize #13026
  • Jan 30 23:43
    Tamnac synchronize #13026
  • Jan 30 22:36
    straight-shoota milestoned #13011
  • Jan 30 22:36
    straight-shoota milestoned #13011
  • Jan 30 22:30
    oprypin edited #13026
  • Jan 30 22:03
    HertzDevil labeled #13031
  • Jan 30 22:03
    HertzDevil labeled #13031
  • Jan 30 22:03
    HertzDevil opened #13031
  • Jan 30 20:20
    straight-shoota closed #13027
  • Jan 30 20:19
    straight-shoota closed #13028
  • Jan 30 20:19
    straight-shoota closed #13025
  • Jan 30 20:19
    straight-shoota closed #13023
  • Jan 30 20:19
    straight-shoota edited #13025
  • Jan 30 20:06
    straight-shoota assigned #13030
  • Jan 30 20:06
    straight-shoota opened #13030
  • Jan 30 20:06
    straight-shoota labeled #13030
  • Jan 30 20:06
    straight-shoota labeled #13030
  • Jan 30 15:56
    straight-shoota labeled #13026
  • Jan 30 15:53
    straight-shoota converted_to_draft #13024
  • Jan 30 15:23
    Blacksmoke16 labeled #13029
John Jansen
@johnjansen
i was sitting close
Jason Waldrip
@jwaldrip
Not sure where we landed on it...
John Jansen
@johnjansen
not creepy close
Jason Waldrip
@jwaldrip
you were pretty close ;-)
John Jansen
@johnjansen
haha
i think it was the standard “were thinking about it” line on the GC front, @sdogruyol may remember or @elorest, they have better memories than me
Chris Watson
@watzon
Wishing I was there :laughing:
Garance A Drosehn
@drosehn
@DougEverly thanks for the pointer to your daemonize.cr. I'm not currently looking to write any daemons in crystal, but that's something that I'm likely to do. My comments were in response to questions brought up earlier by @watzon . What you have is a good start, and I think having that function available as a shard is better than individual programmers trying to figure it out.
Chris Watson
@watzon
Anyone know how to take a C macro like this #define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) and Crystalize it?
Isaac Sloan
@elorest
@johnjansen My recollection was we’d like to develop some sort of full crystal replacement similar to what go ended up using. It’s not really at the top of the priority list right now though.
Matias Garcia Isaia
@mgarciaisaia
@watzon why not a regular function? That's just making a number from three different others, right?
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