nimja; compiled and statically typed template engine (like twig or jinja2)

2021-09-22 Thread enthus1ast
Nimja actually can run in the browser, there is a (playground) demo: I don't know yet where to go from there, it may be interesting for smaller parts of a website that needs to be dynamic.

Typescript as compilation target

2021-09-22 Thread xigoi
> `...` Wouldn't this require Nim to be compiled in the browser?

Wrapperless interop with C/C++

2021-09-22 Thread rb3
For libraries with lots of functions that don't hang off of classes, this could also be useful. Here is what I did for GLFW: # glfw3.nim csource &"{GLFW}/glfw3.h": # header file type CGLFW* {.cgen:"(GLFW_$1)".} = object of CEnum type cglfw* {.cgen:"(glfw$1

Futhark: Automatic C imports in Nim using libclang

2021-09-22 Thread Clonk
Sounds really cool ! What pre-processing feature are supported, if any ? Often, it's the C macros that makes wrapper complicated

Futhark: Automatic C imports in Nim using libclang

2021-09-22 Thread giaco
Great! I've just spent a month trying to use a very complex machine-generated lib with nim (multiple-pass C macros and stringify were the main issues I had to tackle). I tried with c2nim first, then i moved to nimterop, then I tried manual import + nim macro, and finally I managed to get it done

Futhark: Automatic C imports in Nim using libclang

2021-09-22 Thread PMunch
Have your eyes set on the perfect C library for your project? Can't find a wrapper for it in Nim? Look no further! Futhark aims to allow you to simply import C header files directly into Nim, and allow you to use them like you would from C without any manual intervention. It's still in an alpha

Wrapperless interop with C/C++

2021-09-22 Thread mantielero
I am playing with it, and it feels really good. Thanks a lot.

Integration with C for statistics and data processing?

2021-09-22 Thread spip
Or have a look at [https://github.com/nim-lang/Nim/wiki/Curated-Packages#science](https://forum.nim-lang.org/postActivity.xml#httpscolonslashslashgithubdotcomslashnimminuslangslashnimslashwikislashcuratedminuspackages-science)

Integration with C for statistics and data processing?

2021-09-22 Thread alexeypetrushin
> If you are ok with GPL licensing you have a Nim wrapper for GSL Nice, I didn't knew that.

Typescript as compilation target

2021-09-22 Thread alexeypetrushin
Yes, I was wrong, Nim indeed integrates with JS. I should have said that I haven't found a good way to integrate it in my project.

Typescript as compilation target

2021-09-22 Thread xigoi
What trouble do you have using Nim in a project that's primarily JS? I'm doing that and it works flawlessly.

Integration with C for statistics and data processing?

2021-09-22 Thread pietroppeter
You have a list of other options with various licenses here:

Typescript as compilation target

2021-09-22 Thread Araq
Interfacing with the JS world is possible and frequently done... > But the way Nim currently works, it replaces JS/TS, instead of integrating > with it. Yeah well, what does that even mean...

Integration with C for statistics and data processing?

2021-09-22 Thread pietroppeter
If you are ok with GPL licensing you have a Nim wrapper for GSL which is very complete, see:

Typescript as compilation target

2021-09-22 Thread alexeypetrushin
I think it would be more correct to say **integrate** Nim with JS/TS (and Angular / React / Svelte etc.). So it would be possible to convert **some part of project** to Nim and make it work well with the rest of the project done in JS/TS. I also would like to be able to do that and would use Ni

Integration with C for statistics and data processing?

2021-09-22 Thread alexeypetrushin
I'm using Nim for data processing, and missing some statistical and math functions. Wondering if there are some well known and widely used C libraries doing these things? That would be possible to integrate and use from Nim? I think integration with C would be much better option than re-creatin

Accessing object properties where objects are in a sequence

2021-09-22 Thread Stefan_Salewski
Your assumption is generally right, but only when you use only clean Nim code. Not when you use C libs, casts, addr() and pointers. With the later you can do very dirty things, you can un-intentionally overwrite references for example. And then, when the the GC tries to free memory pointed to by

Accessing object properties where objects are in a sequence

2021-09-22 Thread Neil_H
Well i would have thought that the end result of all garbage collectors is the same... to free up memory that is no longer being used? So how can a garbage collector that stomps all over memory that is obviously still being used be correct? The most annoying thing is the fact that my code seeme

Accessing object properties where objects are in a sequence

2021-09-22 Thread Stefan_Salewski
Yes, we saw your update. But your main conclusion is wrong with a large probability, it is not a bug of the GC. When our C code crashes when we call dealloc() or free(), then generally the bug is not in these two functions, but in our own code. Nim's various garbage collectors has been already

undeclared NtAllocateVirtualMemory SysCalls

2021-09-22 Thread enthus1ast
as far as i can see it should be enough to import have you done this?

Accessing object properties where objects are in a sequence

2021-09-22 Thread Neil_H
Updated above

nimja; compiled and statically typed template engine (like twig or jinja2)

2021-09-22 Thread enthus1ast
Yes true a lot of SPA these days, but for most "normal" sites, server side rendering is good enough. Not every web page is an "application".

Typescript as compilation target

2021-09-22 Thread juancarlospaco
I think would be nice to patch the JavaScript codegen to add types, ...but using Facebooks FlowType, because is literally plain vanilla JavaScript with comments, types go inline tiny comments, kinda `/*: int */`, that way it can still run directly in anything that has a JavaScript interpreter, a

Typescript as compilation target

2021-09-22 Thread juancarlospaco
For NodeJS, feel free to request and contribute features:

Typescript as compilation target

2021-09-22 Thread Araq
I don't know enough about TypeScript to answer this question well, but... Patching the JS codegen so that it doesn't throw away the type information that we have easily available is not a hard project and would be a welcome improvement.

Typescript as compilation target

2021-09-22 Thread jorjun_arch
If I could use Nim to replace my Angular & node dev, currently done with typescript, I would be so happy... desperately missing operator overloading. Wouldn't this be much more straightforward than targeting vanilla JS, anyway? But I understand there will be some language impedance... anyway, wo

Wrapperless interop with C/C++

2021-09-22 Thread rb3
Hey guys, I've just finished refactoring my C/C++ interop module: . I started writing it a couple of years ago after stumbling upon [nimline](https://github.com/sinkingsugar/nimline), which was its primary inspiration. I haven't got a chance to upload it a

undeclared NtAllocateVirtualMemory SysCalls

2021-09-22 Thread jyapayne
You probably need to give a code example. Try to make it as minimal as possible.

Accessing object properties where objects are in a sequence

2021-09-22 Thread Neil_H
The problem is the garbage collector! If i switch it off then my app runs without crashing (reason for crashes given above)... its using 3GB of ram though which is obviously no good any suggestions on how to procede?

--gc:orc when is it usable (huge compile times)

2021-09-22 Thread HJarausch
Thanks Yardanico. Unfortunately I need some more help. After git pull git bisect start git bisect good v1.4.8 git bisect bad devel nim c koch.nim ./koch temp Run gives /home/jarausch/Nim/Compiler/Nim/compiler/commands.nim(39, 11) tem

undeclared NtAllocateVirtualMemory SysCalls

2021-09-22 Thread Noob
Hello Everyone Please can anyone help me. I am trying to use the NtAllocateVirtualMemory syscall in my code but every time I run the code I got this error message (Error: undeclared identifier: 'NtAllocateVirtualMemory') although I define the NtAllocateVirtualMemory proc using (NimlineWhispers)

undeclared NtAllocateVirtualMemory SysCalls

2021-09-22 Thread Noob
Hello Everyone Please can anyone help me. I am trying to use the NtAllocateVirtualMemory syscall in my code but every time I run the code I got this error message (Error: undeclared identifier: 'NtAllocateVirtualMemory') although I define the NtAllocateVirtualMemory proc using (NimlineWhispers)