@Araq Hahaha you haven't forgotten, eh. I'm using microasynchttpserver in some
limited projects to see how it does. Time is lacking these days, but I've also
played around with disruptek's CPS project and webserver implemented in it,
which performs extremely well. I wouldn't mind building stream
Don't worry, I do believe you. Now where is this Nim server of yours that
supports streaming?
New-style concepts are super broken right now, and concepts in general are
unusable when you're trying to use generics. Believe me, I've tried. I'd be
really happy if there was an overhaul of concepts in v2, but I don't expect it.
My misunderstanding! I fixed this now. It should indeed be 'Die' as the sample
parameter.
You need use Die to make Die Distribution. You not define sample on Die , you
define sample for Distribution , which infinite recursive ( define sample for
type with sample defined )
Yes, it is defining a distribution as something that can be sampled.
In the old form of 'concepts', this would be an infinite recursion as has been
explained to me already in some other thread but my understanding is that in
this new, unfinished form of 'concepts', `procs` with a `Self` paramete
Then, there is no need for the concept if I use 'Die'. See my reply to sls1005.
`` Die[float] = object `` mean what ?? Float is not generic parameter !
func sample(d: Distribution): float =
rand(1..d.sides)
This infinite recursive definition ! Distribution not concrete type ! Need use
Die !
It's like saying "`sample` takes a `Distribution`, which could be anything that
can be given to `sample`."
Is 'concepts' is being polished/refurbished as a major feature in v2 - I hope
it is.
I am assuming the code below is a known problem; compilation is slow and
nothing is produced as output. This is on devel 1.9.5.
type
Distribution = concept
proc sample(d: Self): float
10 matches
Mail list logo