Is it impossible to declare an _empty enum_ under quote in order to populate it later in a macro?

2024-02-18 Thread Araq
I think it is not possible and in general there is no design rule like "`quote do` must be able to do anything" as the declarative way to construct trees in inherently more inflexible than the imperative way.

Looking for a python-flask like nim web framework.

2024-02-18 Thread pattmayne
I see Haptyx is on version 3+. Do you know if it's considered production ready?

Is it impossible to declare an _empty enum_ under quote in order to populate it later in a macro?

2024-02-18 Thread xealits
I would like to generate an enum and a matching array of strings in a macro, as in [this example](https://peterme.net/metaprogramming-and-read-and-maintainability-in-nim.html) but with `quote` [instead of direct tree nodes](https://gist.github.com/xealits/2c7f1468cff736c129b251317aa2bbda) like

issues trying to install nim

2024-02-18 Thread freeflow
I had the same problem and response. In fact, Windows allows you to temporarily suspend defender for exactly this situation. See settings.WIndows Security.Virus & Threat protection settings.Realtime protection

type mismatch when static uint32 is given to the slice operator

2024-02-18 Thread dwhall256
Oh, here it is. I looked at the declaration of `toMask`: func toMask*[T: SomeInteger](slice: Slice[int]): T {.inline, since: (1, 3).} Run Previously, I speed-read the `SomeInteger` and thought I was safe to use unsigned. But now I see the Slice is constrained to use si

Totally lost when reading tutorial of "code-blocks-as-arguments"

2024-02-18 Thread Zoom
> It is possible to pass the last argument of a call expression in a separate > code block with indentation. For example, the following code example is a > valid (but not a recommended) way to call echo. `echo "Hello ":` is the same as `echo("Hello", foo)`, where foo is the result of the evalua

type mismatch when static uint32 is given to the slice operator

2024-02-18 Thread sls1005
According to its prototype, the proc can only take `Slice[int]` (`int`-only), plus one additional generic type parameter (`SomeInt`). So it should be invoked as `toMask[uint32](int(0) .. int(1) )`. It seems that this generic parameter has to be given explicitly, similar to that of `cast`.

Totally lost when reading tutorial of "code-blocks-as-arguments"

2024-02-18 Thread janAkali
In this code example there are 2 concepts combined together: 1\. indented code block after `:` is evaluated and passed as the last argument to the procedure: proc foo(a, b: int) = echo "first argument is " & $a echo "second argument is " & $b foo 144: # first a

type mismatch when static uint32 is given to the slice operator

2024-02-18 Thread dwhall256
I have this code [(playground)](https://play.nim-lang.org/#pasty=zMlQDzeCBifR) which I want to build compile-time consts. I've eliminated unrelated operations to hone in on my problem. The error is that toMask expects a Slice, but got an HSlice because the types of `foo` and `baz` differ; `foo`

JS debugger

2024-02-18 Thread juancarlospaco
You can also debug it from the "Nim side" of things, it is easy to debug compared to JS side. You can use macros to debug too, eg

Totally lost when reading tutorial of "code-blocks-as-arguments"

2024-02-18 Thread Bosinski
> > I really don't know how to understand this code and the text, how is a & b > > called? `&` concats two strings, here `a` and `b`. Same as `echo a,b` The code-block gets executed and should print "Hello World!"

Totally lost when reading tutorial of "code-blocks-as-arguments"

2024-02-18 Thread felixfxu
echo "Hello ": let a = "Wor" let b = "ld!" a & b Run > It is possible to pass the last argument of a call expression in a separate > code block with indentation. For example,

Looking for a python-flask like nim web framework.

2024-02-18 Thread Clonk
You have Haptyx : and prologue :

X Factor CBD Gummies Canada [EXPOSED]Don’t Buy!

2024-02-18 Thread holikopii
☘📣Our Facebook Page@☘📣Our Facebook Page>> X Factor CBD Gummies Canada: - Because X Factor CBD Gummies improve both execution and life in bed, they are a well-known method of treating sexual brokenness. The combin

Possible Side Effects That You Should Expect From Using Sugar Defender

2024-02-18 Thread perywalter
Official Website@Official Website>>> ➥ Official Website: Sugar Defender ➥ Product Name: Sugar Defender ➥ Benefits: Sugar Defender Helps you to get Sugar Level Control ➥ Category: Sugar Level Control Supplement ➥ Rating: ☆ (4.5/5.0) ➥ Side Eff

Looking for a python-flask like nim web framework.

2024-02-18 Thread devosalain2
I look for a python-flask like nim web framework. But all produce errors ...