nim2_ide: Notepad++ plug-in (IDE for Nim lang)

2024-04-08 Thread rockcavera
I used Notepad++ a lot for a long time to program in Perl. Will you make the dll open source?

os:windows but nim puts 'lpthread'

2024-03-28 Thread rockcavera
I use the Zig compiler as if it were clang and not gcc. But I did it on Windows and compiled it for Linux.

Tooling update: new version of the nimlangserver and the vscode extension

2024-02-06 Thread rockcavera
Congrats on the release. Now I can abandon Konstantin Zaitsev's vscode extension, because after this round of improvements to the official extension, it works perfectly even when opening a random .nim file, without the need to open a folder.

Enhancing Nim vtable implementation vs subtype checking

2023-12-22 Thread rockcavera
I meant the following: transitioning a project using current methods to using methods with vtables may not be an easy thing to do, as there is the limitation of having to declare the methods in the same type module. In my case, a project where I have a lot of method calls, I wanted to test the

Enhancing Nim vtable implementation vs subtype checking

2023-12-21 Thread rockcavera
I wanted to test vtable in a project, but I ended up giving up, due to the limitation of cyclic imports and the fact that the methods need to be in the same module in which the type was declared.

Workaround to use multiples asynchronous sockets on Windows (to bypass OSError 10038 and 10055).

2023-10-11 Thread rockcavera
Look at this [here](http://smallvoid.com/article/winnt-tcpip-max-limit.html). Sounds a lot like the limitation you're describing.

Learning Nim: Write an Interpreter [Episode 01]

2023-10-09 Thread rockcavera
It's definitely a good project. I did the same a little over 1 month ago ([see here](https://github.com/rockcavera/nim-nlox)).

Nim2.0 how to build dll without dependency of libgcc_s_seh-1.dll

2023-08-23 Thread rockcavera
I believe you are compiling something that needs libstdc++ (some c++ files?), which consequently needs libgcc. Currently libpthread is statically linked.

GUI app with nim

2023-06-26 Thread rockcavera
Linking statically or dynamically, unfortunately uses C++ and its stdlib (even "commenting" will continue using C++, because the files are .cpp and use C++'s stdlib). Either you send the .dll or you send a bloated .exe just to call the WinAPI, either way I don't like it, but it's my opinion.

GUI app with nim

2023-06-25 Thread rockcavera
Nobody has yet cited [NiGui](https://github.com/simonkrauter/NiGui), which, for me, is the easiest interface and supports both Windows and Linux. I don't know how support for macOS is going. However, it leaves something to be desired in some respects. [UIng](https://github.com/neroist/uing) I c

Building 1.6 on RHEL 7 on POWER (pp64le)?

2023-06-21 Thread rockcavera
5. Copied over entire ./c_code subdir to target server Run I believe that here is your mistake. You are copying the c_code folder, which is already precompiled from the downloaded source code. The C source code created with `koch csource -d:danger -d:nimEmulateOverflowChecks`

Building 1.6 on RHEL 7 on POWER (pp64le)?

2023-06-21 Thread rockcavera
Here I managed to successfully compile on Windows 10, amd64 and gcc 4.8.1. Yes, I did the steps I gave you. Something that can be checked is the .c files, from csource, if they have `#define NIM_EmulateOverflowChecks`, because `__builtin_saddll_overflow` is passed by nimbase.h.

Building 1.6 on RHEL 7 on POWER (pp64le)?

2023-06-20 Thread rockcavera
Do the following since you have 1.6.12 on RHEL 8 server x86_64. Go to the Nim folder where the .nim compiler source code is and edit the `installer.ini` file, removing the platforms you don't want. In your case, it should just be `linux: powerpc64el`, if I'm not wrong. ; This confi

Atomic ARC

2023-05-08 Thread rockcavera
Intel i7-4810MQ (clock locked at 2.80 GHz for turbo boost not to make an unfair comparison.) * arc: 12.899s; 489.98MiB * atomicArc: 14.603s; 489.898MiB

Is ORC considered production-ready? What is the consensus on its use?

2023-05-05 Thread rockcavera
I could be wrong, I haven't looked at your code or anything, but I've had worse performance with orc than with refc, the problem seems to be that orc uses goto exceptions by default. While refc uses setjmp.

Speeding up compile times

2023-04-12 Thread rockcavera
Here the difference is quite noticeable according to the C compiler used. See the Nim devel compiler build time: * **LLVM/CLANG 16.0.1** : 111.20s * **GCC/niXman mingw-builds 12.2.0** : 157.35s * **GCC/winlibs 12.2.0** : 416.66s All cache is deleted before each test run and compilation

Speeding up compile times

2023-04-12 Thread rockcavera
>From your post, I believe you are using Nim on Windows. If not, disregard. Well, if you're using gcc, especially the winlibs.com distribution, your poor compilation time could be down to that gcc/mingw64 distribution. I currently use the gcc/mingw64 distribution of [niXman mingw-builds-binarie

nint128 - 128-bit integers

2023-01-18 Thread rockcavera
e standard library, I believe I already answered you once inside [github](https://github.com/rockcavera/nim-nint128/issues/1).

nint128 - 128-bit integers

2023-01-14 Thread rockcavera
Thank you for the link. Well, I didn't use libdivide's 128÷64-bit division as a basis. For the 256÷128-bit division I used stint's div2n1n, with subtle modifications. I believe that the implementation of stint does not have the same problems.

nint128 - 128-bit integers

2023-01-13 Thread rockcavera
Some updates: * Added optimized `div` and `mod`, when divisor is static, for `UInt128`. Based on [libdivide](https://github.com/ridiculousfish/libdivide). * Added `mul128by128ToTwo128` to `UInt128`. Includes a version that detects overflow. * Added facilities to work with subtraction when

Assigning array to itself with different order

2023-01-02 Thread rockcavera
That should settle your case. var bytes = [0x1F.uint8, 0xC2] swap(bytes[1], bytes[0]) echo bytes Run

Domain Name System (DNS) protocol and client for Nim

2022-12-30 Thread rockcavera
I performed some minor updates to [ndns](https://github.com/rockcavera/nim-ndns), but the interesting addition is [initSystemDnsClient()](https://rockcavera.github.io/nim-ndns/ndns.html#using-system-dns-server) This procedure starts a DNS client with the IP used by the operating system to

How to further speed up the build of your Nim's projects (using ccache)

2022-12-25 Thread rockcavera
This tip was really good! I did the test here on Windows 10, with gcc 12.2.0, Built by MinGW-W64 project. `koch boot -d:release` on the first build took 00:01:38.10 (98.10s total). On the second build it only took 00:00:28.67 (28.67s total). The initial nim.exe is from csources_v2 for both and

Advent of Nim 2022

2022-12-07 Thread rockcavera
I never participated in Advent of Code, but this year I decided to do it and see how it works. I hope it's productive. My solutions will be [here](https://github.com/rockcavera/nim-adventofcode).

Nim 1.6.10 release candidate

2022-11-03 Thread rockcavera
I come to reinforce what I said in the [last release candidate 1.6.8](https://forum.nim-lang.org/t/9451#62069), and with this candidate it is no different, with vcc and clang(cl) broken for windows.

Troubles with autocompletion with VSC and third party packages

2022-09-29 Thread rockcavera
unfortunately the nimsaem plugin has some problems. This issue is already known for [autocompletion](https://github.com/saem/vscode-nim/issues/84). In my case, I found that the plugin's autocompletion problem is due to the fact that it only works when you are working in a VSC project "Folder". I

Nim 1.6.8 release candidate

2022-09-09 Thread rockcavera
@miran, it is necessary to include this [PR](https://github.com/nim-lang/Nim/pull/19959). Without it version 1.6.8 will be broken for vcc and clangcl on Windows.

libpe & peni - Portable Executable parsing lib & tool released

2022-09-09 Thread rockcavera
Very cool. Congratulations. I was writing a Nim package for PE. The project was at a standstill due to my lack of time to continue and other problems that had arisen in the last few months. As soon as I have some time I will look at your work.

Cannot run nimble on windows

2022-09-08 Thread rockcavera
I would do the following. 1. temporarily disable all antivirus and test nimble; 2. if it doesn't solve it and as you say that it doesn't print anything on stdout, record a video of what is done so we have an idea of what appears or doesn't appear. Something in cmd or powershell should happen

Getting compile command in compile time.

2022-08-09 Thread rockcavera
I believe you are wanting this: [std/compilesettings](https://nim-lang.org/docs/compilesettings.html)

If imported name conflicts with Nim keyword, what would you call it?

2022-06-27 Thread rockcavera
If it's a field exposed to the end user, better a misspelling than forcing them to use backticks.

Deploy DLLs

2022-06-21 Thread rockcavera
On Windows, you can use [Dependency Walker](https://www.dependencywalker.com/). It's a software that shows your .exe dependencies (dlls).

Trojan:Win32/Wacatac.B!ml

2022-05-27 Thread rockcavera
Open the nim.cfg file, in the ./config folder. Edit the line that contains "cc = gcc" to "cc = vcc".

Trojan:Win32/Wacatac.B!ml

2022-05-09 Thread rockcavera
See this:

nint128 - 128-bit integers

2022-03-04 Thread rockcavera
A small update to the package: * added endians module for nint128, to work with endianness.

Using Nim for system libraries?

2022-02-15 Thread rockcavera
> Is there any downside to using -d:useMalloc? See this here [#18612](https://github.com/nim-lang/Nim/issues/18612), should answer your questions. My tests match those presented by xflywind.

Questions about creating dll with Nim

2022-02-14 Thread rockcavera
Truth. I started accessing IRC in 1999 with mIRC. And thanks to mIRC, around 2003/2004 I started programming, first in mIRC Scripting and then in Perl, PHP... Today I'm here with Nim. Good times.

Questions about creating dll with Nim

2022-02-11 Thread rockcavera
A long time ago I created a mIRC dll with C and I forgot to free a memory allocated with malloc and there was a leak. So, I believe that mIRC only controls the memory it allocates and the dll should be responsible for the memory it allocates itself. Thanks for the reply and advice.

Questions about creating dll with Nim

2022-02-10 Thread rockcavera
I have a small package for creating dlls for use in mIRC - [mdlldk](https://github.com/rockcavera/nim-mdlldk). Faced with this situation, some questions arose about Nim and dlls, especially with regard to memory management. I'll explain first how the mIRC dlls work (or I believe they work

Nim 1.6.4 release candidate

2022-01-31 Thread rockcavera
Thank you for the answer.

Nim 1.6.4 release candidate

2022-01-26 Thread rockcavera
@miran, I was looking at the changes and I believe these commits should be added in 1.6 (1.6.4): * [Fix #19038 - making the Nim compiler work again on Windows XP](https://github.com/nim-lang/Nim/commit/c7d5b8c83ddf204c6e0cd7b6937d33318320ed91) * [Update manual.rst](https://github.com/nim-la

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread rockcavera
Unfortunately, it is a problem that exists and can affect the arrival of new users to Nim, especially those who use Windows. I'm a Windows user and I don't use any antivirus, besides disabling any protection, as I've had serious problems with losing files. However, I understand users who use an

Made in Nim 2021 - your favorites?

2022-01-06 Thread rockcavera
* [Nanim](https://github.com/EriKWDev/nanim) is really cool. Congratulations to the author of the package and images. * [Nim0](https://pmetras.gitlab.io/nim0/) is a very interesting project. I learned a few things from him. * [Goodboy Galaxy](https://www.goodboygalaxy.com/) is a really cool

Original source of Mingw64

2021-12-27 Thread rockcavera
I'm not sure, but I believe they're from here:

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)?

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

2021-12-06 Thread rockcavera
I submitted a solution to this issue involving TCC and Windows on amd64 architecture.

nint128 - 128-bit integers

2021-12-01 Thread rockcavera
I've made some changes in nint128 to allow, when possible, to use the C extension of the GCC and CLANG compilers for 128-bit integers (`__int128` and `unsigned __int128`) or to use VCC compiler intrinsics. This adds the possibility of optimizations that compilers have for 128-bit operations. Fo

Question: How to limit concurrent async futures?

2021-11-29 Thread rockcavera
I once made some pretty naive code to limit the amount of open TCP connections using async. The code was very similar to the code below: import std/[asyncdispatch, random, strformat] const limit = 10 var counter = 0 proc testProc(n: int) {.async.} =

Survey Question: flow research

2021-11-04 Thread rockcavera
I met Nim in late 2017 when I was researching an IRC Bot, for Icecast, for an IRC colleague. At the time I thought it was interesting, but I couldn't do much. I only got back to actively working with Nim at the end of 2018 and beginning of 2019, when I wrote a first program. Since then, I abando

Nimsuggest issue with the VS Code extension and nim 1.6.0

2021-10-29 Thread rockcavera
I noticed this yesterday when trying to use the vscode extension written in Nim. It opened a bunch of nimsuggest.exe processes. With the typescript extension this problem does not occur. I believe there may be some problem in the extension. I didn't have a lot of time to check it out.

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

2021-09-20 Thread rockcavera
Yes, your code compiles with `--gc:orc|arc` in version 1.4.8.

Windows : how to get active window title

2021-06-24 Thread rockcavera
Try it with `GetForegroundWindow()`

NiGui - thread issue - what am I doing wrong ?

2021-06-14 Thread rockcavera
I've written a small Windows application using NiGui which uses thread for heavy processing and which makes the GUI usable. I don't know if it was the best solution, but here's a small example of how I did it: [example](https://github.com/trustable-code/NiGui/issues/91) Maybe a timer would be a

high(Natural) == high(int)

2021-06-01 Thread rockcavera
@Araq, could you explain better your statement about unsigned numbers? Should they only be avoided in this loop situation or in other situations as well?

nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B

2021-04-28 Thread rockcavera
It is difficult to get an executable that does not give a false positive. An example of this is a simple C code that generates false positives here: // hello.c #include int main() { printf("Hello, World!"); return 0; } Run `gcc -s -O3 -o

nint128 - 128-bit integers

2021-04-26 Thread rockcavera
I came to announce my package [nint128](https://github.com/rockcavera/nim-nint128), 128-bit integers. It is not yet 100% (the basics are done), but it is already quite usable. The intention of the package is to always try to achieve the best possible performance. I am currently testing on

nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B

2021-04-20 Thread rockcavera
They are certainly false positives. I use Windows 10 64 bits and disable Windows Defender and I also don't use any anti-virus, because even unfortunate source code sometimes accuses them as viruses. I sent all my .exe (64 bits), devel version 1.5.1, compiled on my own machine with gcc 10.3.0 t

lost thread? (Fastest method for writing and loading cached binary object data to file)

2021-04-15 Thread rockcavera
I was searching for something on the forum these days and a thread also appeared in the search, but this thread was inaccessible (possibly deleted?). Unfortunately, this option to delete threads ends up removing possible aids. The option to delete a thread had to be restricted to administrators,

Testing/Feedback for Neel 0.4.0 development

2021-04-09 Thread rockcavera
Tested on Windows 10 64 bits, Nim devel 1.5.1 64 bits, backend c gcc 10.2.0. I proceeded to the following steps: 1. `git clone https://github.com/Niminem/Neel.git` 2. `cd neel` 3. `git checkout devel2` 4. nimble install 5. `nim c -d:danger --threads:on -d:webview examplesfilePicker.nim`

Performance comparison of various compilers

2021-03-16 Thread rockcavera
Congratulations. This shows that Nim can be as fast as C. Your current code, here, runs, on average, 86ms, against 71ms of C.

SSL/TLS certifictae issues with Nim 1.4.4?

2021-02-24 Thread rockcavera
When installing Nim on Windows, I am in favor of making cacert.pem available in /bin. It would be a way to avoid these mistakes. Also, add some message when compiled with `-d:ssl` and `-d:release` or `-d:danger` to distribute the executable with cacert.pem. Just a suggestion.

SSL/TLS certifictae issues with Nim 1.4.4?

2021-02-23 Thread rockcavera
Here on Windows 10, I decided like this: 1. I downloaded the file 2. I put it in a folder that is in %PATH or else in the same location as .exe

Nim 1.2.10 RC and 1.4.4 RC

2021-02-10 Thread rockcavera
Here I use Windows 10 and after this [commit](https://github.com/nim-lang/Nim/commit/74d6a4d7f4fb9fb00632150f666e4de1cc5f7c63), I need to keep a cacert.pem in some folder that is part of Windows %PATH for nimble to work correctly or any other program that uses ssl.

Executing command in hidden console

2021-01-01 Thread rockcavera
On Windows you can use the [winim](https://github.com/khchen/winim) package, specifically `winim/com`, for this purpose. Exemple: import winim/com const cmd = "cmd.exe /c ping 127.0.0.1" comScript: var a = CreateObject("WScript.Shell") echo "Exe

DumpIncludes - See where your exe size comes from.

2020-12-31 Thread rockcavera
I didn't know that flag. Is it documented somewhere?

DumpIncludes - See where your exe size comes from.

2020-12-31 Thread rockcavera
If using gcc, include it when compiling --passL:-s. Example: `nim c -d:danger --passL:-s example.nim`

Domain Name System (DNS) protocol and client for Nim

2020-12-18 Thread rockcavera
I've been working on these two packages for some time and finally managed to finish them in a satisfactory and well-documented way. [dnsprotocol](https://github.com/rockcavera/nim-dnsprotocol) \- dns protocol [ndns](https://github.com/rockcavera/nim-ndns) \- dns client The need for thes

Cross compile on WIndows 64bits for Windows 32 bits

2020-11-16 Thread rockcavera
I do so here on my Windows 10 64 bit to get 64 and 32 bit executables: 1. I have 64-bit Nim; 2. I installed Mingw32 and Mingw64 (C:mingw32 and C:mingw64); 3. I configured C:Nimconfignim.cfg like this (I placed it at the end of the file): @if windows: @if i386:

To slice or to stream?

2020-11-10 Thread rockcavera
Congratulations on the flatty. Do you have a benchmark showing the difference in performance between flatty and StringStream?

What Nim projects are you working on?

2020-10-29 Thread rockcavera
I was working on some improvements to my [iputils](https://github.com/rockcavera/nim-iputils) package. I still intend to implement some more things in the library. I have a DNS protocol package and a simple DNS client finalized, but I'm still documenting and making some changes b

call-by-value Y combinator

2020-08-10 Thread rockcavera
It would be great to be able to use recursive iterators in Nim. I look forward to possible "hackings" or implementation.