I considered that. But after reading about Godot keeping around support for
OpenGL, I decided it wasn’t an unreasonable investment. And the two aren’t
mutually exclusive.
That one is new to me — I’ll have to dig in. Looks like they dropped max
support, though, which is a non-starter for my needs
/easygl/blob/master/examples/getting_started/shaderstut.nim#L41)
That kind of stuff can be generated automatically by integrating with Nim’s
type system via macros:
[https://github.com/Nycto/safegl-nim/blob/master/src/safegl/vertex.nim#L39](https://github.com/Nycto/safegl-nim/blob/master/src/safegl
rogramming
-- which makes me a bad judge of whether this is actually headed in the right
direction. So I suppose I'm interested in getting some constructive feedback.
The code:
[https://github.com/Nycto/safegl-nim](https://github.com/Nycto/safegl-nim)
Docs:
[https://nycto.github.io/safe
I did some deep diving and I've managed to answer my own question. This code
gives me access to the type declaration:
echo "Type declartaion is: ", struct.getTypeImpl[1].getTypeImpl.repr
Run
Though I couldn't tell you
_[why](https://forum.nim-lang.org/postActivity.xml
I'm trying to do some compile time type introspection, however I'm not getting
the results I expect. Here is a minimal version of what I'm trying to do:
# ---
import macros
type StructShape[T] = object
fields: seq[tuple[key, typename: string]]
macro getFie
I've got an object where I would like the compiler to fail if I accidentally
try to copy an instance of it. Overloading proc = seems to be the way to do
this, but I'm struggling to get the exact incantation to also allow for
instantiation. Here is my starting point:
type Person = o
Yup, that works.
For anyone looking to spot the difference, here is original signature:
template defineIndex*(name, source: typedesc, extractIt, cmpAB: untyped)
{.immediate.} = ...
When you just remove the immediate, it breaks. Here is the working signature:
temp
Hey folks!
As the immediate pragma is deprecated, I'm updating my packages to remove
references to it. I've got one situation where I'm curious about the best
alternative. It's [this
template](https://github.com/Nycto/RBTreeNim/blob/a64b6a8ad230a8a8f34e7ce1f6564ebf423a5b1
For anyone facing a similar problem, I centralized my build configuration here:
[https://github.com/Nycto/ExtraNimble](https://github.com/Nycto/ExtraNimble)
It does (basically) everything I asked for in this thread above, though I had
to do a few hacky things to get it working.
Talking to myself, here. But what the heck.
> It doesn't look like I can read a file from nimscript? Is that correct?
This is not correct. readFile and writeFile both work. lines, however, did not,
which was the source of my confusion.
But it does leave me with one final problem: How do I abstr
I've answered a few of my own questions by digging through Nimble.
* Listing files in your nimble config doesn't use the os module, it uses the
functions from the [nimscript module
directly](https://nim-lang.org/0.17.0/nimscript.html#listFiles,string)
* Overriding the nimble build exit code
Does anyone have any examples of using nimble for more advanced build
configurations?
Things I would like to do:
* Centralize generic build functionality into a github repo. Then, add that
repo as a build tool dependency and import modules from it.
* It doesn't look like nimble has a conc
I'm starting to touch on creating more complex structures with macros, and I
have a few open questions. The first of which is:
How does the compiler deal with generating documentation for procs, enums and
objects that were themselves created by macros?
To be clear, by the way, I understand that I can rename my private directory to
perlin and resolve this problem. But I'm interested in following conventions
that suggest that these internal files should not themselves be directly
consumed.
rs = @["private"]` to the .nimble file.
Here is the build:
[https://travis-ci.org/Nycto/PerlinNim#L1672-L1673](https://travis-ci.org/Nycto/PerlinNim#L1672-L1673)
And here is the repo for reference:
[https://github.com/Nycto/PerlinNim](https://github.com/Nycto/PerlinNim)
Basically,
Hey again!
You can accomplish this using distinct types. The unit tests for AStar are a
bit convoluted, but that's how they work:
[https://github.com/Nycto/AStarNim/blob/master/test/astar_test.nim#L7-L12](https://github.com/Nycto/AStarNim/blob/master/test/astar_test.nim#L7-L12)
For
17 matches
Mail list logo