Nim interact with Windows .NET Frameworks

2021-12-14 Thread oyster
really terse code!

Nim interact with Windows .NET Frameworks

2021-12-14 Thread Ward
With a minor modification of winim/clr (v3.7.2), to call methods with parameters that have default values will be easier. import winim/clr var Words = load("Xceed.Words.NET.dll") Document = load("Xceed.Document.NET.dll") DocX = Words.GetType("Xceed.Words.NE

HttpBeast 0.4.0 is here

2021-12-14 Thread ajusa
Made a PR for the-benchmarker: :)

HttpBeast 0.4.0 is here

2021-12-14 Thread dom96
Just released v0.4.0 of HttpBeast. Looking forward to the benchmarks, feedback welcome :) Major changes: * Big performance improvements: , , * Stability impr

Using C, C#, Java, Wasm, Ruby, Python NodeJS, TypeScript... libraries from Nim with MetaCall

2021-12-14 Thread Clonk
> Respect to the package itself, how can I publish it? I have been reading > this: ; but I am not > sure how to publish a package that has a C library dependency. You can tweak your .nimble file to perform operation on `nimble install` usi

Using C, C#, Java, Wasm, Ruby, Python NodeJS, TypeScript... libraries from Nim with MetaCall

2021-12-14 Thread parra
Hi everyone. I am writing a Polyglot Runtime ( ) and I just wrote a wrapper for the C API with Nim. This means that now you can use multiple libraries from other languages in Nim. The wrapper is very simple and it's far away to be completed (

Httpbeast failed to compile on Android arm device

2021-12-14 Thread ynfle
Is there a reason for this? Could you take a look in asyncdispath under `when ioselSupportedPlatform` on line 1375 for 1.6.0

Release candidates for Nim 1.6.2 and 1.2.16

2021-12-14 Thread Clonk
Congratulation on this milestone ! Is there a changelog for this version or just commit history ?

Release candidates for Nim 1.6.2 and 1.2.16

2021-12-14 Thread miran
The first release candidate of our next stable release, Nim 1.6.2, is available from our nightly builds: * [Nim 1.6.2 RC](https://github.com/nim-lang/nightlies/releases/tag/2021-12-14-version-1-6-48c62ca48bc1f0a0ff4bc891e720297b3e8e5c15) If you're using Choosenim, you should be able to get

Nim devel now supports Nimble 0.14

2021-12-14 Thread rockcavera
To test Nimble 0.14, should we install this [commit](https://github.com/nim-lang/nimble/commit/0a23c44cd8d6c7856d5da155a32298bb1a6ca8e9)?

Maze solver benchmark - How would you optimize?

2021-12-14 Thread Prestige
I tried the BoolSeq from that post but it actually made the map generation about twice as slow - I merged PMunch's solution. I am curious why a `main` function increases speed, I wouldn't think it'd make a difference

Maze solver benchmark - How would you optimize?

2021-12-14 Thread Araq
With ARC/ORC a `main` proc doesn't make that much of a difference anymore but the reason is: Module level variables are "global" variables that the optimizer refuses to reason about, when you move these to a main proc these become local variables -- the optimizer likes these.

Stop clang from generating ilk and pdb files

2021-12-14 Thread AmjadBHD
> I would simply delete these files after a build. What, that's even more annoying.

TinyCC/tcc vs zig cc compile-times/etc.

2021-12-14 Thread cblake
With this nim program generator: #!/bin/bash for i in {0..99}; do echo "proc foo$i(x=2)=discard"; done echo "when isMainModule:" echo " import cligen" echo -n " dispatchMulti" for i in {0..98}; do echo "[ foo$i ],"; done echo "[ foo99 ]"

How would this endianness check be translated to Nim?

2021-12-14 Thread Araq
The correct way to do is is to use: `system.cpuEndian == bigEndian`

Httpbeast failed to compile on Android arm device

2021-12-14 Thread dom96
probably just an oversight, should be an easy fix

How would this endianness check be translated to Nim?

2021-12-14 Thread PMunch
That check should be equivalent. The original goes through a pointer deref, but I don't think that should matter.

How would this endianness check be translated to Nim?

2021-12-14 Thread xigoi
I've been sent the following C code by a friend: #define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100) Run I'm wondering how the same would be written in Nim. Note that I know about `std/endians`, I'm just curious about the translation of this particular snippet. I tr

Why windows.h file is always included into compilation on Windows?

2021-12-14 Thread awr1
We already generally avoid `{.include.}` for Win32 API stuff, as `winlean` mirrors the API (basically a translation of `windows.h` w/ `WIN32_LEAN_AND_MEAN` def'd) in general but pulls the necessary functions in through `{.dynlib.}` instead of through the C header. There are a few places where w

TinyCC/tcc vs zig cc compile-times/etc.

2021-12-14 Thread cblake
Corrections: the "mob" branch, from [the tcc Wikipedia entry](https://en.wikipedia.org/wiki/Tiny_C_Compiler) has x64 support and is not abandonware but - simply "community maintained" which seems to be a workable open source model: git clone https://repo.or.cz/tinycc.git/

Maze solver benchmark - How would you optimize?

2021-12-14 Thread PMunch
Didn't look at the algorithm at all, just applied some typical optimisation strategies (better compile flags, adding a main, inlining things, avoiding ref objects). Times on my machine went from (range is min/max of three runs): Generation: 6.2 - 6.7 ms down to 3.4 - 3.5 ms Cold run: 9.9 - 10.4

Nim devel now supports Nimble 0.14

2021-12-14 Thread Araq
With we intend to support Nimble 0.14 which has support for lock files. Please give it a try and report problems here! Nim version 1.6.2 is just around the corner.

Stop clang from generating ilk and pdb files

2021-12-14 Thread Araq
I don't know, if annoying, I would simply delete these files after a build.