FWIW I still think `typed` macros are Nim's future and `untyped` was a mistake.
:-)
No. Thank you very much! Now works fine.
Do you have `std/nativesockets` imported?
When I try to run the code
client.getFd.setBlocking(false)
I get this error:
Error: attempting to call undeclared routine: 'setBlocking'
For what it's worth, changing the Makefile nim invocation to
nim --app:lib --dynlibOverride:libsqlite3 --passC:'-I$(HEADERS)'
--passL:'-L$(LIB) -lsqlite3' c blah.nim
Run
now does seem to look at the correct headers, but generates a series of clang
errors, including
This is true for `untyped` macros, but a macro (like the one below) does have
the `include` statement expanded to the ast of the included file.
import macros
macro t(x: typed) =
echo repr x
t:
include tables
Run
Not sure if you're asking for an explanation or praising him for his concise
example. But these are completely different things. `mixin` allows a symbol to
not point to anything when it's defined, to be "bound" when the procedure or
template is used:
template useLocal(): int =
How amazing if it's given comment and explanation succinctly yet crystal clear..
As I understand it, the main differences between DateTime and Time are support
for timezones and relative efficiencies in addition/subtraction compared to
extracting date and time components. If you need to support multiple time zones
or expect to issue more calls to extract components than
template useLocal(): int =
mixin local
local + 1
assert not compiles(useLocal()) # `local` not declared, so template will
not compile
block:
let local = 2
assert useLocal() == 3
template insertLocal() =
let local {.inject.} = 2
What's actually the difference functionality between mixin and {.inject.} (in
clear comparative code explanation) ?
What leads you to that conclusion?
Hello
I want to create a "wrapper" application in Nim, which will launch another
process, and if this process exits, it needs to relaunch it. But of course I
want to be able to terminate this procedure.
In my mind I thought this would be easy:
* add a `setControlCHook` which will add a
Naylib v1.2.0 stable update was released, synced with upstream. It contains
quite a few bug fixes and extra wrapped functions. New: `loadFontFromData`,
`loadShader`. Helps is still wanted for porting it into other platforms.
At 99designs, we cherish relationships and are proud to have a platform that
connects designers and clients, even past a contest win. We regularly hear from
designers who have built their business’ foundation solely from the clients
they’ve met through our site, and these stories are what we
Wait, so this isn’t an April fools joke?
Hi,
I'm trying to understand the correct use of the `std/times` library.
Specifically I'd like to know the intended use of the `DateTime` vs `Time`.
A `DateTime` has all extractors and can be converted to a `Time`, while a
`Time` has no extractors, but the arithmetic and comparison operations
There is no preprocessor. `include` is just like any other statement and thus
gets evaluated in the same order as any other statement, and is represented in
the AST as its own statement. What is given to the macro is literally the AST
of `include test2`, and the macro can't do any processing on
18 matches
Mail list logo