I'm not sure should I present these questions in Karax's issue tracker or here because it's unclear to me whether the error is in my code/thought process, karax lib or standard lib. Because of this I ended up asking it here. Please tell me if this is a wrong forum.
Contents of app.nim:
import oids
include karax/prelude
proc createDom(): VNode =
result = buildHtml(tdiv):
text("Hello world")
setRenderer createDom
So when I try to run my karun -r app.nim file, I get the following errors:
[censored]...\nim\current\lib\pure\endians.nim(59, 15) template/generic instantiation of swapOpImpl from here
[censored]...\nim\current\lib\pure\endians.nim(54, 5) Error: undeclared identifier: 'copyMem'
If I remove the "import oids" line, the hello world app will run as expected. So what is the problem oh wise lords and ladies of Nim? Why I can't use oids lib to generate id's for my dom elements?
Some specs: Windows 10 64-bit Nim is installed via Scoop.
nim --version Nim Compiler Version 1.2.0 [Windows: amd64] Compiled at 2020-04-03 Copyright (c) 2006-2020 by Andreas Rumpf git hash: 7e83adff84be5d0c401a213eccb61e321a3fb1ff
karax version is the latest clone from it's official git repo.
It's hard to tell whether you're sarcastic in your answer and I'm not entirely sure was the question idiotic or something for which I could've found the answer via googling. (I did this and also glanced the Nim tutorials through without success tho) I just started learning Nim and coming from the dynamic Python isn't helping much ;)
Regardless of everything thank you for your concise answer.
Hmm I'm not entirely sure what you mean. I can understand that I can write pure Nim version of the mongo oid algorithm using the times and random standard libs, but I have no idea about really porting anything from Nim to javascript atm. Maybe I should read the language documentation regarding the javascript parts better...
I just glanced the mongo objectid definition, is the bigendian32 purpose to swap the byteorder for th e time and random parts of the oid?
Nevertheless thank you for your answer!