Some help with javascript - OpenCascade.js

2022-10-20 Thread mantielero
After many tries I think I am closer now, but not done. I am getting the following error message in the console: Uncaught (in promise) TypeError: opencascade_469762091.makePolygon is not a function at HEX3Aanonymous_469762090 (index.js:107:72) Run It is referr

template untyped and typed as parameters and return type

2022-10-20 Thread Araq
It's laziness and comes from a time where templates only supported `untyped`.

Some help with javascript - OpenCascade.js

2022-10-20 Thread mantielero
oh wow. I missed that. I will try to fix it.

template untyped and typed as parameters and return type

2022-10-20 Thread EnteryName
I was looking into karax src just for fun and I saw this piece of code template `&`(x: untyped): untyped = $x Run Why in this case do they use untyped instead of typed? If you need the result provided by the `$` template using an undefined identifier is not going to w

Compile time safety for case object fields

2022-10-20 Thread Araq
And yeah, this should have become the default for Nim v2 but v2 is already late and overwhelming.

Compile time safety for case object fields

2022-10-20 Thread Araq
Use `--warning[ProveField]:on`.

Pegs?

2022-10-20 Thread ingo
It works. It needs more refinement, that will come with time. import std/[streams] import npeg let stream = newStringStream(""" 0-0:96.13.0() 1-3:0.2.8(50) 0-0:1.0.0(221019115846S) 1-0:32.32.0(0) 0-0:96.1.1(4530303737307730373236383936353232) 1

Compile time safety for case object fields

2022-10-20 Thread axyz
Given a simple "kinded" object like: type NodeKind = enum nkParent, nkChild Node = ref NodeObj NodeObj {.acyclic.} = object case kind: NodeKind of nkParent: children: seq[Node] of nkChild: name: strin

Pegs?

2022-10-20 Thread ingo
Because I was not aware of it. I'll have a look

Pegs?

2022-10-20 Thread Stefan_Salewski
Is there a good reason why you are not using npeg: That one has documentation and was working fine for me some years ago.

Some help with javascript - OpenCascade.js

2022-10-20 Thread geotre
Perhaps I am misunderstanding how you are running this, but you do not load your compiled `index.js` file inside your `index.html`. Once you add that you'll see a bunch of errors about things being undefined, because you removed the imports in `library.js`. You can fix some of these by changing

Pegs?

2022-10-20 Thread ingo
How should I bind? I's completely unclear to me. import std/[streams, pegs] let stream = newStringStream(""" 0-0:96.13.0() 1-3:0.2.8(50) 0-0:1.0.0(221019115846S) 1-0:32.32.0(0) 0-0:96.1.1(4530303737307730373236383936353232) 1-0:1.8.1(000865.964*kWh