Possible workarounds for subclassing a c++ class and overriding a virtual method

2022-04-08 Thread sls1005
Let's assume that there's a class called `MyClass`. {.emit: """ class MyClass { public: int a; int MyMethod(); } """.} type MyClass {.importcpp, nodecl.} = object a: cint Run To implement one of its methods, we can use t

Creation of Variant Types with Table Members

2022-04-08 Thread jwatson-CO-edu
I have two Type definitions that seem similar to me, but the compiler limits how I can create them: ### Example 1: type Env* = ref object parent:Env # --- Smart pointer to the environment that contains this one freeVars: seq[Atom] #

Defining C++ Macros from Nim

2022-04-08 Thread jmgomez
With initialize I mean a way to define the preprocessor variables from nim (not cpp) before the first include is triggered.

Defining C++ Macros from Nim

2022-04-08 Thread shirleyquirk
what do you mean by 'initialize'? the nim compiler produces c/c++ code, `{.header:myheader}` just adds `#import ` to the top of the source file, any c macros in that header file get expanded when the c/c++ preprocessor runs

Regular expressions in Nimscript?

2022-04-08 Thread shirleyquirk
i was composing a long diatribe about how it's an abomination but it turns out it's the officially recommended regex:

How to render html after a refresh on a specific url

2022-04-08 Thread masahiro
I am implementing routing with karax and refreshing a page outside of the root path returns a 404 response. I am assuming that this is probably a problem because index.html is the starting point and there is no other root html. I have implemented the routing based on the routing on the nim forum

Defining C++ Macros from Nim

2022-04-08 Thread jmgomez
When importing headers via the headers pragma, the compiler seems to be evaluating C++ macros. Is there a way to initialize those macros from Nim? Thanks,

Impure libraries ???

2022-04-08 Thread Araq
Well it's a different API so you need to change everything you used from `re.nim`.

C++ interop via Dynamic Library

2022-04-08 Thread jmgomez
I saw it, the problem is that it doesnt link the symbols without the extern. Im using the same compiler but I just figured that I could pass class pointers through FFI anyways so I guess Im fine with it now. Thanks

Impure libraries ???

2022-04-08 Thread xigoi
How is nre different from re? That is, if you replace `import std/re` with `import std/nre`, what other changes do you have to make?

Status of the incremental compilation feature

2022-04-08 Thread didlybom
Going through the current nim 2.0 RFC I see that incremental compilation is the top priority but that it might be ported back to 1.6.x. I wonder what is the state of its development and whether the plan is still to port it to 1.6. I am really looking forward to it, specially because I hope it wi

My history on Nim forum

2022-04-08 Thread Yardanico
Nim forum is written in Nim - , and yes, it's related to the forum software - Nimforum simply doesn't have a feature to show all posts/threads of a user.

My history on Nim forum

2022-04-08 Thread noxnivi
Good day, Is this something related to the software the forum is running on? From what I know, "discourse" based ones have this feature, as well as other interesting features too. I have no idea on which software this forum runs though. Just thinking aloud. Regards, noxnivi

Possible workarounds for subclassing a c++ class and overriding a virtual method

2022-04-08 Thread krakengore
Hi there, which options do i have for allowing an inheritable object imported from cpp that has virtual methods to override those methods in nim and still having them dispatched correctly (by c++) ? I've investigated adding some cdecl function pointers to the c++ objects, that are then invoked

System.sink & System.lent

2022-04-08 Thread cblake
"It all depends", as usual, in this case on the C compiler and often options passed to it. E.g.: `gcc --help=params|grep inline`. :-)

Issues with proxy authentication

2022-04-08 Thread emiliasingle
I ran into a similar problem month ago. My proxy server didn’t work together with the Microsoft store. Moreover, the applications indicated that there was no Internet connection. Therefore, I decided to switch to a [url= proxy[/color][/url]. I

Issues with proxy authentication

2022-04-08 Thread emiliasingle
I ran into a similar problem month ago.

System.sink & System.lent

2022-04-08 Thread mratsim
In my experience, a proc tagged with `{.inline.}` is always inlined. Nim doesn't tag it with C `inline` it also tags it with `static` which convey to the C compiler that only this specific compilation unit will ever call that proc. In that case, even large procs are inlined if they are called on