I think it was statically linked before, try passing '-static' to linker or
something.
Is nimlsp kinda new thing? I've been using this extension and had no troubles
doing as of yet:
[https://marketplace.visualstudio.com/items?itemName=kosz78.nim](https://marketplace.visualstudio.com/items?itemName=kosz78.nim)
Well, yes it is easier. I tried using times module for that, but sadly it
failed to compile. I think it is a bug, as I can see no real reason why times
module can't be used at compile time. On the other hand using random at compile
time that I made for the article seems easier than modifying the
[https://forum.nim-lang.org/t/1305](https://forum.nim-lang.org/t/1305) \- here
you go.
Actually I gave him an idea to use term rewriting macro for that if you dig up
his forum post here before the library was released.
Hey! I've just wrote an article about how to use Nim's powerful metaprogramming
features for simple code obfuscation. The text is in Russian language, but the
code is pretty self explanatory. Here is the link:
[https://wasm.in/blogs/meta-programmirovanie-nim-i-obfuskacija.706](https://wasm.in/bl
I think we should pick up quite a few stable c libraries (MIT or Apache
licenced), make ideomatic Nim wrappers, make it a part of Nim's standard
library and distribute it with Nim's compiler. Zlib, MbedTLD are good
candidates and compression, encryption, https and etc is good to have in a base
That's great, thank you!
Talking about SSL, do we still depend on OpenSSL for HTTPS clients? Is there a
somewhat easy way to swap it out for something like Mbedtls?
I think that it should be more easily done from NimScript, it seems that macros
module is supported in NimScript. I think I can write a script that processes
modules to a temp folder and then compile them from NimScript. What do you
think?
I don't quite get it. For example I have a few modules that I want to process.
I will need to use staticRead for each file, use parseStmt to get the AST,
transform it and what do I do next? Do I need to save this modules to a temp
folder using astGenRepr and add them to the compilation pipeline?
Is there a way to get the AST for all procs of a module and apply some
transformation on it at compile time. I've been looking at this
[https://github.com/Yardanico/nim-strenc/blob/master/src/strenc.nim](https://github.com/Yardanico/nim-strenc/blob/master/src/strenc.nim)
\- here the code uses te
As far as I know it doesn't really cross compile to Mac OSX, but yes, Linux and
Windows targets seems to be well supported. One could also try musl.cc cross
compilers, if cross compilation to different Windows and Linux targets needed.
Yeah, sure, but you need to build one yourself on Windows for example, Zig does
it out of the box. There is no GCC built and ready to cross compile from
Windows to Linux or Mac. There is musl.cc, but it is buggy as hell.
Zig can crosscompile C code and even let you choice if you want to link against
glibc or musl on any linux based targets.
So is there any tutorials on how to add a custom pass to the compiler? Do we
need to rebuild the compiler when the pass is implemented and registered in the
compiler's passes chain? Or maybe passes can be implemented as external dll/so
and added to the compiler via command line (like GCC plugins
I wonder if it is possible to apply the encryption code to a module
automatically, so that it won't be needed to mark all strings with "xs". I was
trying something like that few years ago, I even created a topic about it on
the forum I believe, but I don't remember how it all ended.
I found it: [https://forum.nim-lang.org/t/338](https://forum.nim-lang.org/t/338)
> Note that we already ship Nim with GCC on Windows. Mac OS already mostly
> comes with clang and Linux also will have GCC/clang installed via a package
> manager. Not sure there is much benefit in shipping this dependency on
> Linux/Mac.
Yes, but installing C/C++ cross compilers and cross link
Hello! Bare with me here. Recently I've been watching Zig programming language
development streams. One of the thing that was very surprising to me is that
Zig compiler embeds libclang and also minified versions of glibc, musl and
mingw. That way Zig compiler can automatically import C code head
I need to write HTTPS client application, but I'd like to use MbedTSL
(statically linked) for SSL/TLS support instead of OpenSSL. How can I hook it
up so that Nim's HTTP protocol implementation would use MbedTLS? Thanks!
Discussion on the Dlang forums:
[https://forum.dlang.org/thread/hsvbknmmwgspnkfvf...@forum.dlang.org](https://forum.dlang.org/thread/hsvbknmmwgspnkfvf...@forum.dlang.org)
I'm sorry, I've read the thread you've posted link to, but how this thing
eventually ended? Was the wrapwith statement introduced? Or is there any
alternative that will be useful for me?
I was wondering if using the WCHARs instead of CHARs may fix the issue? On
Windows it always better to go Unicode way, instead of ANSI way, as the kernel
itself in Unicode based. For example you could directly use _putws to output
unicode strings.
I don't quite get it, there is an attribute macro for example, it can transform
the AST for functions that the attribute is assigned to. Is there a way to
assign the attribute to the whole module? And to all modules that is being
compiled with my project, including the Nim's stdlib?
Hello! Sorry if my question is too obvious, I'm still new to Nim. I know Nim is
great at metaprogramming stuff. Is it possible to get and transform the AST of
all compiled modules at compile time? Basically I want to inject some custom
code to the begining and to the end of all functions (includ
That's great news! Thanks to all the people involved!
In the meanwhile the V language was released to github. Which is quite funny. A
lot of people gets upset not seeing bold claims actually being well implemented.
[https://github.com/vlang/v/issues/35](https://github.com/vlang/v/issues/35)
I believe right now Red isn't self-hosted, it uses old Rebol interpreter (which
has no JIT or any other tech to make it run fast) to run the compiler, so 4
minutes to compile 35k lines of code is pretty understandable. The other thing
about Red is that it is a pretty naive compiler, it only gene
I remember there was some trouble when doing windows DLLs in Nim. Some issue
with GC not being properly initialized or something. I couldn't find any info
about this in Google. Could you please clarify if the issue still exists, what
is it all about if it does or did exist. Thanks!
Eventually I've installed the old 0.5.29 version of extension, 0.6+ versions
aren't working fro me.
I've tried installing extension for VSCode from VSIX. I'm in offline
environment, so I download VSIX and install it from file. However Nim extension
failed to install with quite cryptic log messages:
[2019-05-14 15:56:43.211] [sharedprocess] [info] main {"machineId":""}
[2019-0
So I finally managed to make it work.
test.nim:
echo "Hello World!"
Run
test.nim.cfg:
gcc.path = r"C:\COMPILERS\x86_64-w64-mingw32-native\bin"
gcc.exe= "x86_64-w64-mingw32-gcc.exe"
gcc.cpp.exe= "x86_64-w64-mingw32-g
What are you too talking about? I'm on Windows and I have all C toolchains
working as expected. I can't make Nim compiler use the right toolchain for each
of four targets, it uses gcc.exe for some reason. Please read the post before
answering.
So okey, I'm on windows, I have 4 toolchains in PATH:
* i686-w64-mingw32-gcc.exe - targeting native Windows i686
* x86_64-w64-mingw32-gcc.exe - targeting native Windows x64
* i686-linux-musl-gcc.exe - targeting Linux i686 from Windows
* x86_64-linux-musl-gcc.exe - targeting Linux x64 from
Yes, but the DMD's fronend version in GCC 9.1 is like 8 versions behind the
current one, this is kinda bad. On the other hand there were Java and Python
frontends on the GCC, and where are they now? I think only Ada and Fortran
frontends are really good GCC citizens along side with C/C++/ObjC.
People in the D community is actively discussing if D has failed:
[https://forum.dlang.org/thread/ylwktmssgntvoddub...@forum.dlang.org](https://forum.dlang.org/thread/ylwktmssgntvoddub...@forum.dlang.org)
It is kinda interesting and frustrating to see how big and old living project
being pushed
CP866 is usually used for console programs on Russian version of windows (which
is OEMCP), and CP1251 is usually used for gui programs on Russian version of
Windows (which is ACP). Technically I don't really see any reason why this
shouldn't be working with char types. However I would rather be
Being a much simpler language FreeBasic may be fast (having no GC for example),
but I bet it won't be reasonably faster than Nim. I don't really see why now
anyone would choice FreeBasic over Nim, D, Rust or any other modern alternative.
There is nothing to talk about until the reference compiler is released.
"Talking is cheap, show me the code" (c)
So I have a COM-dll written in Nim, it implements some interface. The host
application is written in C++ and loads my plugin written in Nim via COM.
Eventually the host app calls my on_connection method passing me the IDispatch
interface pointer so I could communicate with the host app. So in on
I'd like to cross-compile Nim code on Windows machine to some generic Linux
distribution and Mac OSX machines both i386 and x86_64. Well Nim seems quite
good in cross-compiling in terms of C source code generation. But to generate
target executables I need a C cross-compiler toolchain.
Has anyo
@bpr, oh, it is in the manual now, I somehow missed it... sorry for that!
@LeuGim, I found old documentation, made an example and I see it working now,
but I don't see any documentation about it... I thought maybe it is going to be
deprecated or even removed completely at some point near 1.0 release or
something... but to be fare it is a very neat feature, that I'm go
try out miniz:
[https://github.com/richgel999/miniz](https://github.com/richgel999/miniz) \-
it is single file C-library, which can read/write zip files... I'm not sure if
there is a ready to use Nim bindings, but it should be easy to make one
yourself...
It seems that there is no documentation about it, but I remember that it was
years ago. Was it removed from Nim compiler at some point?
Hello! I want to make a video tutorial series about Nim and post it to my
youtube channel and I want to do it for two main reasons:
1. in my opinion Nim doesn't get as much attention as it should
2. it seems that we still don't have any video tutorials about the language
But before doing i
47 matches
Mail list logo