Who cares how many files it creates? Only what you use (import) gets compiled.
C++ and D bindings have to generate the same number of classes.
"The settings need so much steps" \- not sure what this refers to. If you have
Nim and Godot you basically only have to install nake and set GODOT_BIN
e
Great work! It would be nice if pieces of this tool are turned into libraries
(hopefully, copyfree). Right now there are no Nim libraries that allow to get
network interface information in a structured way. For example, a procedure
that returns a seq of interfaces with their info (what ifconfig
The "Edit" button idea is actually **very** nice. I often see issues in
documentation, but am too lazy to go to terminal, cd Nim, create branch, make
change, push branch, create PR (or do the same from GitHub UI) for a small
change. If there is a button on each page that goes straight to editing
Use zeroMem,`copyMem`, moveMem, equalMem to operate on raw memory. In your
case:
const myString = "I change this"
copyMem(cs, cstring(myString), myString.len + 1) # +1 because null byte has
to be copied, too
vega,
Alright, it seems I overstated about the burden. As long as async macro it
used, users are fine, because addr result points to heap (to iterator's closure
environment). But great caution should be taken if async is not being used.
Even if it's not networking lib, it should clearly define
Yeah, I've been using this font since VSCode Nim plugin was created. The best
font I've seen so far for Nim and as a programming font in general.
vega,
Could you show a safe non-GC version of readInt proc (btw, it shouldn't exist
in a networking lib because of undefined size and endianness of int)? As I see
it, by introducing raw pointer **async** send/recv procs, stdlib would just
move burden to the user. To safely implement readInt you
Last I heard there was a plan to make asyncdispatch provide low-level unsafe
methods that accept raw pointers, while higher-level modules (like asyncnet)
would provide methods that work with GC-safe stuff.
In your case it seems the problem is that you pass pointer to GC data to an
async proc wi
andrea,
You could try to setup server sockets from multiple threads with
SO_REUSEPORT|SO_REUSEADDR flags, instead of having single server socket in the
main thread. That way, different threds may accept connections on the same
address/port pair, while OS tries to evenly distribute load between
This is a similar issue:
[https://github.com/nim-lang/Nim/issues/4441](https://github.com/nim-lang/Nim/issues/4441)
There is a workaround offered in comments that is to import the constant as a
procedure instead of a variable:
proc foo(): cint {.importcpp: "FOO@".}
didlyborn, did you restart VSCode after installing the plugin? The plugin
supports autocompletion, go to definition, error/warning highlight and few
other things. If it doesn't even highlight errors for you, it most likely is
not enabled or cannot find Nim. Error highlight relies on nim check co
I don't know if such constant is already defined (seems not), but you could use
something like this:
type Backend {.pure.} = enum
C, CPP, OBJC, JS, PHP
const backend = when defined(cpp): Backend.CPP
elif defined(objc): Backend.OBJC
12 matches
Mail list logo