Compile error “no socket”

2023-03-07 Thread foxoman
* *

Compile error “no socket”

2023-03-07 Thread Naterlarsen
Created a simple code with sockets but when compiling I get an error that socket not found. Tried to use nimble install but the links for the socket module are dead(404). This is on a windows system. Later I’ll setup Linux which is better for nim but for the present, I need to use windows os. Pl

Nim in production: 350+ HTTP requests per second on a very modest VM

2023-03-07 Thread mildred
That's great, I might contribute to code that lets the server listen over multiple sockets at the same time, and use socket file descriptor inherited from the environment. I'm struggling with HTTP servers in Nim because of that. Ideally I'd want to do systemd socket activation, and I also have

Nim in production: 350+ HTTP requests per second on a very modest VM

2023-03-07 Thread mildred
For static files, I would have thought of something like X-Sendfile or X-Accel-Redirect:

Cannot get library demos running due to linker errors

2023-03-07 Thread neroist
Or the static library and compile with `-d:useLibUiStaticLib`

UE4 wrapper for nimlang?

2023-03-07 Thread jmgomez
Sorry for the necro but this posts appears quite high in google. There is a third approach, which is what NUE does: to reimplement a lean version of UHT at Nim's compile time and to take adv of the reflection system for making the bindings automatically. But @gmpreussner was right, it didnt hap

Why does this code using 'concepts' fail?

2023-03-07 Thread TKD
Many thanks for this @pietroppeter. This clarfies things.

Why does this code using 'concepts' fail?

2023-03-07 Thread pietroppeter
here is a variation on the theme: import std/[random] randomize() type SomeDie = concept d d.num_sides is int Die = object num_sides: int ColoredDie = object blue_sides: int red_sides: int proc

Why does this code using 'concepts' fail?

2023-03-07 Thread pietroppeter
this works: import std/[random] randomize() type Distribution = concept dist dist.num_sides is int Die = object num_sides: int proc sample_dist( dist: Distribution ) : int = rand(1..(dist.num_sides)) proc rol

Why does this code using 'concepts' fail?

2023-03-07 Thread TKD
This fails with `dist.sample_dist() is int too nested for type matching`. Is there a fix? {.experimental.} Run import std/[random] randomize() type Distribution = concept dist dist.sample_dist() is int Die = obj

NimForUE

2023-03-07 Thread jmgomez
I initially thought on just replacing the vtable pointer but seems like the user needs to know the fn index upfront which it isn’t very ergonomic so I end up just generating a class and importing it (I was already generating a class because the struct vs class conflict, i.e. ue forward declares

Cannot get library demos running due to linker errors

2023-03-07 Thread enthus1ast
You can download the dll put it next to the executable, and compile uing with its dynamic defines.