I've been looking for a more free editor with c++ and nim support. It's hard to
find, and I don't like that emacs is totally impossible to make user friendly
(for example it won't scroll less than one whole line at a time). I'll try
Kakoune!
Also some versions of windows are actually somewhat posix compliant, although
not in very useful ways
Hi there, I would like to permanently store some data in environment variables.
I'm running the code with nim-0.17.2 on windows, and I'm fine storing data as
user environment variables.
The data is not visible outside of the nim application, and it's not available
when I run the program for the
Nim offers similar functionality via the `to` macro, but indeed it doesn't
support fields that begin with a number. I created an issue for this:
[https://github.com/nim-lang/Nim/issues/7139](https://github.com/nim-lang/Nim/issues/7139).
Depending on your JSON you may be able to use a combination
There is no need for this procedure to be exported. You should use the `post`
procedure which uses this `format` proc:
[https://github.com/nim-lang/Nim/blob/master/lib/pure/httpclient.nim#L1197](https://github.com/nim-lang/Nim/blob/master/lib/pure/httpclient.nim#L1197)
Thanks yglukhov for the reply. It just an observation as I have just started
with nim-lang. So may be I was looking at things which I could do really fast
in go to be in nim. I will take some time to get used to nim
@frogEye. That is true because nim ideology differs a lot from go. Instead of
providing some high level feature the nim compiler will tend to provide you
with rich metaprogramming capabilities, and with those you can implement high
level features that look and feel like native nim constructs. E.
Thanks, dom96 . But still, the ease with which we can unmarshal and marshal
json into a data structure in Go-lang is uncomparable.
This would work if format in httpclient was exported. For now copy and paste
[this
proc](https://github.com/nim-lang/Nim/blob/master/lib/pure/httpclient.nim#L438-L457)
(and import random)
import httpclient
let data = newMultipartData({
"data1": "value1",
"data2
> There is an easy solution to this problem: case insensitive and style
> insensitive search (which is supported by nimgrep)
Most people edit their code in an editor or IDE, not with an external program.
And they don't like it when a language pushes another tool on them that, from
their perspec
Thanks for the explanation @yglukhov !
Did the **pragma** pragma maybe work differently two years ago when the wrapper
was made? Why else would _{.pragma: stdcall.}_ be used there?
**{.push stdcall.}** seems to be invalid, so I used:
when defined(windows):
...
{
> b is a bad name for a proc/template anyway.
well, kinda, but it should only work on specified type, so i dont think its a
problem. and why would changing type of `img` parameter change the behavior if
its not even used in proc's body?
The standalone {.pragma: stdcall.} doesn't do anything, so you end up with
default nim calling convention, which is fastcall on windows iirc. The pragma
should be either pushed {.push stdcall.} or appended to every proc. Now
regarding why both cdecl and stdconv. They really should not, but maybe
I have also been trying to implement the HandmadeHero series using Nim. The
reason why WNDCLASS was failing to initialize, is because it is required that
it is gcsafe.
However, WNDCLASS needs to call MainWindowCallBack, and MainWindowCallBack
accesses the Win32OffScreenBuffer type. The problem
The issue isn't with the assert specifically, but rather because you are
comparing your function pointer to nil (see here:
[https://github.com/nim-lang/Nim/issues/6955)](https://github.com/nim-lang/Nim/issues/6955\)).
If you want, you can disable the warning by using the {.gcsafe.} pragma:
My bad, I thought from multipart data it was obvious. What I wanted to do was
like this
import httpclient
var data = newMultipartData({
"data1": "value1",
"data2": "value2",
"data3": "value3"
})
var customHeaders = newHttpHeaders({
"Conte
@yglukhov, THANK YOU for nudging me into trying something!
If you look at the
[pdcurses](https://github.com/lcrees/pdcurses/blob/master/pdcurses.nim), it has
this code:
when defined(windows):
...
const PDCURSED = "pdcurses.dll"
{.pragma: stdcall.}
else
17 matches
Mail list logo