static checking of strings

2024-02-24 Thread termer
Create a distinct string named IPv4 or whatever you want. Next, create a proc that takes in `static string` and outputs `IPv4`. func toIpv4(str: static string): Ipv4 {.inline.} = # Do your check here. # As long as you use `static` types and `const`, you can do everyth

What is `-d:nimNetLite`?

2024-02-24 Thread termer
I was reading the source for the stdlib's `net` module when I came across [a line](https://github.com/nim-lang/Nim/blob/805b4e2dc2afddf7be27e32fe0543e4227b31f74/lib/pure/nativesockets.nim#L26) that checked for for a const called `nimNetLite`. It's not documented and Googling it turned up nothing

nimble.directory has been down for a few days now

2024-02-24 Thread PMunch
Talked to the maintainer who simply wasn't aware that it had gone down. It should be back up again now!

How does one deal with void pointers between Nim and C?

2024-02-24 Thread elcritch
Nim's untyped pointer is `pointer`. As in `setSomething(val: pointer)`.

How does one deal with void pointers between Nim and C?

2024-02-24 Thread ggb-sw1
The following does not work, but how should I be able to get it to work? #!/usr/bin/env -S nim r # # File: test1.nim import strutils proc getSomething() : ptr {.importc.} proc setSomething(pvalue: ptr) {.importc.} {. emit: """ static void

ACTIVE KETO GUMMIES

2024-02-24 Thread kkmnt
Active KETO Gummies Trustpilot /AU/NZ

pointer repr

2024-02-24 Thread Araq
This has been changed to produce more readable output. If you want to output the pointer value you can use something like `$cast[uint](addr s[0])` for `s` being a `string` or a `seq`.

How to use nimble develop with a fork?

2024-02-24 Thread Araq
Good question. Maybe you can use a lockfile to get a reproducible build for others.

How to use nimble develop with a fork?

2024-02-24 Thread ninovanhooff
As a dependency for my game, I want to list my own fork of a nimble dependency. Subsequently, I want my game to use the local copy of that fork for easy development The nimble dependency I forked is `chipmunk7` My fork is at Note that my

nimble.directory has been down for a few days now

2024-02-24 Thread Yardanico
As far as I know it's semi-official, but thanks for reporting. As for alternatives, a good one is . And for a honourable mention there's also .

pointer repr

2024-02-24 Thread enaaab460
In the official systems manual, and other tutorials online, pointer.repr prints the memory address of the pointer and the value it points to. This is a direct copy from var buf: seq[char] = @['a','b','c'] p = buf[1].addr

nimble.directory has been down for a few days now

2024-02-24 Thread nimbool
The nimble.directory domain is returning 502, Bad gateway since a few days. At first, I thought it was transitory and didn't bother reporting it, but now it appears to be a long standing issue. If this is an "official" resource (I'd think so since it is linked prominently under the documentatio

Would Nim modules or available Nim web frameworks suffice for an e-commerce back-end?

2024-02-24 Thread jasonfi
If you're using Next.js on the front-end, then you can write a thin back-end layer which calls Nim code compiled to Node.js add-ons. Denim provides the means to to do this: