Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:24
    straight-shoota closed #13014
  • 02:34
    Blacksmoke16 labeled #13023
  • 02:19
    cyangle labeled #13023
  • 02:19
    cyangle opened #13023
  • 00:41
    devnote-dev labeled #13022
  • 00:41
    devnote-dev opened #13022
  • Jan 27 23:05
    straight-shoota labeled #13021
  • Jan 27 23:05
    straight-shoota labeled #13021
  • Jan 27 23:05
    straight-shoota labeled #13021
  • Jan 27 23:05
    straight-shoota labeled #13021
  • Jan 27 23:05
    straight-shoota opened #13021
  • Jan 27 22:40
    straight-shoota labeled #13020
  • Jan 27 22:40
    straight-shoota labeled #13020
  • Jan 27 22:40
    straight-shoota labeled #13020
  • Jan 27 22:40
    straight-shoota opened #13020
  • Jan 27 21:18
    stefandd edited #13018
  • Jan 27 20:46
    etra0 review_requested #13006
  • Jan 27 18:30
    Blacksmoke16 closed #13007
  • Jan 27 18:30
    Blacksmoke16 closed #13019
  • Jan 27 18:21
    wyhaines closed #13019
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
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