Nim on Raspberry Pi Pico

2021-04-13 Thread ElegantBeef
Hey, I have the solution, checkout [picotemplate](https://github.com/beef331/picotemplate) my easy to use nim project template, and [picostdlib](https://github.com/beef331/picostdlib) my Nim wrapper for the pico-sdk!

Nim on Raspberry Pi Pico

2021-04-13 Thread btol
I'm looking for some help getting Nim running on the Raspberry Pi Pico using the C/C++ SDK [1] The SDK uses CMake, which I don't have a lot of familiarity with, and I'm looking for some pointers on how to get a simple blinky-style Nim program running on the Pico, wrapping some of the the Pico C

Error: invalid token: trailing underscore

2021-04-13 Thread shirleyquirk
The supported solution is to wrap the ffi class using valid Nim identifiers. Something like `proc SpawnInstance(obj:SWbemObject) {.importc:"SpawnInstance_".}` But I have no clue about winim or windows, even less what that comScript macro does, and this looks like something to file with the main

Error: invalid token: trailing underscore

2021-04-13 Thread timothee
you can't, until we reconsider

Nim in Meson?

2021-04-13 Thread Demos
That's my PR, I haven't had time to work on it but it would be cool if someone picked it up

cs2nim progresses.

2021-04-13 Thread kobi
Thank you. good examples!

Arduino with Nim

2021-04-13 Thread mantielero
I spotted that yesterday. So the lack of success still applies.

Release candidates for 1.4.6 and 1.2.12

2021-04-13 Thread miran
In Nim 1.4.4 Windows users had problems with `cacert.pem` and SSL/TLS (see . This should be fixed in these RCs. If somebody using Windows could test the RC and confirm, that would be great :)

Error: invalid token: trailing underscore

2021-04-13 Thread VickiCNolan
I am using the following code test.nim: import winim/com comScript: const HIDDEN_WINDOW = 12 var strComputer = "." var objWMIService = GetObject(r"winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & r"\root\cimv2") var objStartup =

Error: invalid token: trailing underscore

2021-04-13 Thread Yardanico
I'm not on Windows and don't know what does this code do, but trailing underscores are invalid for identifiers. You can try using stropping: import winim/com comScript: const HIDDEN_WINDOW = 12 var strComputer = "." var objWMIService = GetObject(r"wi

cs2nim progresses.

2021-04-13 Thread GamzWithJamz
I have a small ECS game engine implemented in C# with .NET Core 3.1 [here](https://github.com/ExoKomodo/Komodo). Much of it depends on the Monogame SDK. The repo has an SLN that collates the csproj files for each project. The [Server project](https://github.com/ExoKomodo/Komodo/tree/master/Serve

cs2nim progresses.

2021-04-13 Thread ynfle
Check out

The NaN story, short version

2021-04-13 Thread shirleyquirk
depending on what you're doing, INF might be better than DBL_MAX INF is still comparable, `(DBL_MAX < INF)` is true but e.g.`1.0 / DBL_MAX` is a subnormal number whereas `1.0 / INF` is 0

Multi-threaded features needed for Server

2021-04-13 Thread hankas
Got it. Thanks

The NaN story, short version

2021-04-13 Thread Stefan_Salewski
float.high is system.inf. Had worked better I guess. DBL_MAX is a finite value, which is available from the fenv module linked above. I had seen that module years ago, but was not able to find again...

The NaN story, short version

2021-04-13 Thread PMunch
Could you not have used `float.high`?

How to create generic type without C++ Template

2021-04-13 Thread PMunch
What is the end goal? Like what is your generic type supposed to hold and how it is supposed to interact with C++?

How to create generic type without C++ Template

2021-04-13 Thread Clonk
Hello, Is it possible to define such a type that : type RawA {.importcpp: "A".} = object A[T] = distinct RawA Run The issue with this is that the type A will generate C++ templated code :`A::A` and that will not compile since A (in C++) is not templated.

Arduino with Nim

2021-04-13 Thread PMunch
Hmm, Arduino stuff is C++, but you're compiling Nim to C, which might be causing issues. Try `nim cpp -d:danger --opt:size --os:any hearbeat`

How to create generic type without C++ Template

2021-04-13 Thread Clonk
For context, this happens during wrapping Tensor type of Torch library. `torch::tensor` type is not templated but the Tensor holds scalars of a given type. Therefore there is a non generic type `RawTensor {.importcpp: "Tensor".}` that map directly. The goal is to create a more idiomatic Nim AP

The NaN story, short version

2021-04-13 Thread b3liever
module std/fenv exists.