I found that my C code is missing a line...
typedef struct {
Parent base;
int y;
} Child;
Run
Good solutions. Thanks.
Well, listen to me please! fix the ram
In static site generator lingo, it's a better convention to generate
`index.html` so that we have "pretty URLs".
* Ugly URL: `example.com/foo.html`. The ".html" is needed to be added in the
URL.
* Pretty URL: `example.com/foo/index.html`. Now that URL can be accessed
using `example.com/foo/
I see, thank you for the clarify.
You're not wrong, but as the doc say: "Note how the set turns enum values into
powers of 2." It means that I could write something like this:
type
Config {.size: sizeof(int32).} = enum
Dummy
FullscreenMode
WindowResizable
WindowUndecorated
You can't, because that's how inheritance works in Nim. The C code you have
there is not actually a parent child relationship, there is no connection
between the Parent and Child structs.
It totally depends on the site though. Maybe you want `index.html` to be a
"Welcome to this project, check out this video, or maybe the "
with that last bit being a link to the actual documentation. In this case it
would be super annoying if Nim generated an `index.html` file for you. Naming
th
Ah, I see. Thanks for the explanation.
Well, IMHO, it is really not about number of keystrokes but default behaviour.
One usually expects `index.html` to be present in a website by default, and
most web-browsers expects index.html to be the starting point (not sure if this
is standard). So, it
{.emit: """
#include
typedef struct {
int x;
} Parent;
typedef struct {
int y;
} Child;
Child *child_new() { return malloc(sizeof(Child)); }
""".}
type
Parent {.importc, nodecl, pure, inheritable.} = object
x: cint
No, I was saying that it would be a poor design by the compiler to output a
`index.html` file. Of course if the user specifies that they want to rename a
specific module to `index.html` then that could work, but then why not just
throw `mv mymodule.html index.html` into your script, surely that'
I misspoke. Even after moving the `data` folder out of the source tree, the
main html file remains to be `bmo.html` and not `index.html`. I got confused
because `bmo.html` was changed to `index.html` by `nimble` task. I'have updated
the previous post.
Thanks @PMuch. You are right.
I have the following structure.
src/
├── bmo.nim
├── bmopkg/
│ ├── cli.nim
│ ├── command.nim
│ ├── common.nim
│ ├── install.nim
│ └── subcom.nim
└── data/
└── install_choco.ps1
Run
If I mov
Doesn't `import sdl except Thread` work for you?
I believe this is because if you had two modules in your project it's nice that
they're named after the module they come from and not one simply being called
`index.html`. Manually moving it (or just moving it from the same script that
runs nim), or even just having a symlink from `index.html` t
Isn't the issue here that `parts` isn't exported?
I am generating docs of my module `foo` using the following command:
nim doc --out:html --project src/foo.nim
Run
It generates html docs in the directory `out` with `out/foo.html` as the main
html file. When I deploy `foo` on github pages, nothing shows up there becaus
I am generating docs of my module `foo` using the following command:
nim doc --out:html --project src/foo.nim
Run
It generates html docs in the directory `out` with `out/foo.html` as the main
html file. When I deploy `foo` on github pages, nothing shows up there becaus
18 matches
Mail list logo