Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
ynfle
@ynfle
Does that even make sense?
From IRC (bridge bot)
@FromIRC
<PMunch> Not really :⁠P
<PMunch> Do you have an example of what you want to achieve
ynfle
@ynfle
:thumbsup: I'm gonna back away now
I'm gonna use an array
From IRC (bridge bot)
@FromIRC
<PMunch> Or a seq
<PMunch> Or a linked list I guess
ynfle
@ynfle
array is easiest
wanted to make a type with a constrained size
offbeat-stuff
@offbeat-stuff
how to check a value in a proc at compile time
From IRC (bridge bot)
@FromIRC
<FromDiscord> <lqdev> wdym?
offbeat-stuff
@offbeat-stuff
like at compile time run a check on the values passed to proc
to throw and error if not okay values
ynfle
@ynfle
static? If the proc wont run at compile time, it can't really be checked. You can try concepts
From IRC (bridge bot)
@FromIRC
<supakeen> Ahhh finally an idea to use Zevv's npeg for \o
<PMunch> @offbeat-stuff, what specifically are you trying to do?
<PMunch> supakeen, what?
offbeat-stuff
@offbeat-stuff
run this
proc []* (a:mat3,i:int,j:int) : float64 {.inline.} =
assert(i<3 and j<3 and i>=0 and j>=0)
From IRC (bridge bot)
@FromIRC
<supakeen> Command line parser based on PEG grammar.
<supakeen> Don't ruin my enthusiasm by telling me someone made one!
<PMunch> Haven't found one
<PMunch> Damn it..
offbeat-stuff
@offbeat-stuff
proc []* (a:mat3,i:int,j:int) : float64 {.inline.} = assert(i<3 and j<3 and i>=0 and j>=0) a[i*3+j]
From IRC (bridge bot)
@FromIRC
<supakeen> Hehe, all the better.
ynfle
@ynfle
range type
<PMunch> tor+second+-x+200+--monitor+third+-x+300+-y+30
<PMunch> Oh wow, that link was broken
<supakeen> nice link yea
<FromDiscord> <Vindaar> very pretty indeed
<PMunch> That's going to be a massive PITA..
<FromDiscord> <sealmove> Figured it out: https://play.nim-lang.org/#ix=2AU7
<FromDiscord> <Vindaar> what are you trying to do PMunch?
<PMunch> I'm trying to have a format where I can specify either a position, or a position per monitor
<PMunch> But both x and y are required for each monitor
<PMunch> Which is fine
<PMunch> Hmm, I should probably read these as a configuration file format as well..
<PMunch> supakeen, if you want some idea for command line parsing I have some :⁠P
<supakeen> uh oh
<FromDiscord> <Rika> .
<PMunch> Haha, don't worry, it's not anything way too crazy :⁠P
<FromDiscord> <Vindaar> Hmm. So you're mainly not sure how to tell docopt in the best way how to do it. Or you don't know in general what a good CLI interface for that is supposed to look like?
From IRC (bridge bot)
@FromIRC
<supakeen> I'll finish up the LFSRs and the twister in my PRNG library first before I start thinking about the cli parser :⁠)
<PMunch> @Vindaar, I'm not sure if this is possible with docopt because of the poor output format..
<FromDiscord> <Vindaar> what do you mean by output format?