You can add your contribution to the wiki.
[https://github.com/nim-lang/Nim/wiki/BuildServices](https://github.com/nim-lang/Nim/wiki/BuildServices)
This reminds me that both Nim and Status are using Azure Pipelines extensively
and we could add it. Similarly, FreeBSD and OpenBSD CI via Sourcehut
Yes you can ignore those warnings when you don't have threads on. They may have
be put in place for future compat with the threadpool module.
Seems like there is a bug, if you comment out the first method you get
type
Token* = ref object of RootObj
position*: int
DigitToken* = ref object of Token
value*: uint
NumberToken* = ref object of Token
value*: int
# method joinToken
Huh? `nim check` shouldn't read from stdin. At all. Ever.
It doesn't work (see the open bugs about it), it's not a GC and we don't work
on it, see
[https://github.com/nim-lang/RFCs/issues/177](https://github.com/nim-lang/RFCs/issues/177)
You're better off understanding Nim's memory management, why you cannot
interface with Flex/Bison in the way you do
For one reason or the other, the only GC that works (and very efficiently in
terms of speed - aside from too much average memory consumption in some cases)
with my current project is "regions".
The thing is I decided to go with that only because it works.
However, I'm still not sure how it's wo
re: "why you cannot interface with Flex/Bison in the way you do and pick a
different, real GC"
I would be grateful if you could give me some... pointers to the right
direction. Even the integration of Flex/Bison was a hit'n'miss mission.
The weird thing is that - given that I've been running to
I was trying to implement something and ran into issues of combinatorial
arguments. I trying using concepts to automate this process, but it didn't
quite work out. Anyway here's some sample code to show what I mean.
type
Foo = concept f
proc bar(baz: Foo, qux: Fo
I am trying to send headers using the asynchttpserver module, this is what the
documentation gives me
sendHeaders(req: Request; headers: HttpHeaders)
Run
HttpHeaders documentation shows this:
HttpHeaders = ref object
table*: TableRef[string, se
Understood. Do not use stdin.
Should we also avoid specifying file paths like tmpfile?
Using tmpfile gave different results. Therefore, I thought that it should not
be used.
Understood. Do not use stdin.
Should we also avoid specifying file paths like tmpfile?
This should work:
proc bar(baz, qux: distinct Foo) =
Run
Perhaps like this?
sendHeaders(req, newHttpHeaders([("Content-Type","application/json")]))
Run
I've been doing several experiments on the matter and read a lot, but to make
sure II got it right, I would be grateful if I had your input.
So...
What is the difference between:
* a = b
* shallowCopy(a,b)
* deepCopy(a,b)
when:
* a/b are objects
* a/b are ref objects
* a/b are s
Yes, it worked! Thank you
I think for most of us it works exactly as we suppose.
Some years ago there was no exact documentation available, so indeed you
request writing documentation. But I think explaining this is not that easy, as
it should be understandable to newcomers, but at the same time not boring for
experts.
> So to get it running you have to write a layer in pascal which uses cdecl or
> stdcall and exposes the whole VCL - for everything you want to access from
> Nim.
How easy is this? Can it be automated?
> I prefer a nice DSL over a "RAD" any day.
>
> So I think DSL are the way to go on Nim.
Seems to be a broad generalization inference of the rule "if I think that A, so
B must be true for everybody"!:-)
Like @Usor said, RAD development tools like Oracle Forms or 4GL have some
advocates in comp
At first I was like, what a simple question... then I started to explain it I
was like wha
You can think of it as shallowCopy with some extra.
* a/b are objects - shallowCopy of the struct including packed objects (which
might appear like deepCopy).
* a/b are ref objects - shallowCopy o
> Apart from that I really don't like to pull the "actually what you are asking
> is not what you want" card, but this is not how you should write a lexer.
I'd like to, but it's for a class assignment, so I have to do it by hand. Also,
I want to learn how it can be done on lower level of abstrac
As proc name overloading is one of the ways to offer genericity in Nim code,
selecting the right name is important, particularly for data structures that
share similar behaviours. Some languages have symbol renaming or aliasing, like
Eiffel, to handle such cases of semantic similarity.
+1 for p
Great idea. Just added it.
`I != everybody` by definition. Still better than using Electron for
everything. :P
In tutorials that the Della-Vos group publish, there is a rule that no example
should go beyond one page. I tried to follow this rule in the tutorial about
the Nim language. However, I am not entirely satisfied with the small web
application described in chapter 7 of the tutorial, here:
[https:
I didn't actually say it, though I see what you're getting at ;)
Yes, and it's reasonable to think that, once these advocates smell Nim with
RAD, if it's been established, they would smell
* reduction in costs;
* quick development;
* great performance;
* more productivity;
* easier mai
When I started with Nim years ago I used arrays, as tuples are only necessary
when not all types are identical, and as we can iterate at runtime over array,
which may be rarely needed for a proc result. Then I saw examples using tuples,
and I think that time automatic tuple unpacking was working
I'd just use a tuple or object for that.
This curly bracket structure is called the "Table constructor":
[https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor](https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor).
You should be able use `varargs[(string, string)]` as the type
Cool, thanks for testing. I can't imagine what could cause this difference in
httpbeast, perhaps Nim's kqueue implementation is significantly worse than its
epoll implementation.
Maybe Amazon's EC2 has worse performance on FreeBSD? Have you tried comparing
other http servers?
If I write a macro as such:
macro `@@@`(x: typed): FancyType =
# stuff goes here
var a = @@@{"fromStruct": "blah", "sub": {"joe": 10}}
Run
All is good.
Or if I do:
macro `@@@`(x: Blork): FancyType =
# stuff goes here
let xyz
Does anyone have an example of a wNim TextCtrl with a scrollbar? I can make it
appear, but it doesn't do anything. Also, if I paste a large text into the
control then I can no longer type in it: it just sounds the bell.
There are 2 semantics in Nim and low-level programming languages like C, C++,
Rust.
1\. Value semantics.
2\. Reference semantics.
Value semantics means that the copy owns its memory and lives separately from
the copied.
Reference semantics means that the copy and the copied refer to the same
I've been looking for another approach. From what I've read, the python wheel
package can do what I want, but it is still a mystery to me how.
Has anyone done this and know of a project I can learn from? I haven't been
able to find an example in the python or nim public package lists.
Wait, isnt BSD Hardened by default?.
Hi, Kaushalmodi. I saw your answer only now. I will study the link you sent me
carefully. Thank you for the attention.
As for using lem instead of emacs, the problem is that we could not find an
emacs mode that works flawlessly for nim. The students tried nimrod-mode and
nim-mode:
1 -- nimrod-mode does not highlight multiline comments.
2 -- nim-mode often fail in performing indentation. For instance, in the
li
Students who are trying to learn Nim complain that Emacs modes for Nim do not
work flawlessly, and are huge. These students tried nimrod-mode and nim-mode.
Here are a small sample of the problems that they encountered:
1 -- nimrod-mode does not highlight multiline comments.
2 -- nim-mode often
By the way, I posted these comments about nimrod-mode and nim-mode because one
often asks why Marcus and Luciano are using lem with their students.
How do you track the scroll position of a TextCtrl? When I try
textctrl.getScrollPos() it won't compile, and attaching scroll events to the
ctrl never fire.
OK. nginx on FreeBSD has worse performance as well. It looks a performance
problem in FreeBSD on EC2.
nginx on FreeBSD
$ wrk --latency -t 16 -c 1024 http://172.31.40.197/
Running 10s test @ http://172.31.40.197/
16 threads and 1024 connections
Thread Stats Avg
Thanks this is just want I was looking for! The cache stuff is great and makes
the builds fast.
As much as I wanted that to work, it doesn't. Once I place type like that in
the macro parameter, the compiler re-encodes the Table Constructor as an array
(nnkTableConstructor disappears from the NimNode). And then it stops supporting
mixed structures like:
`{"a": "blah", "b": 4}`
Not a big d
You're right that there's a couple of examples where the indentation of
nim-mode is all over the place and this is one of them. I've been meaning to
take a look at this too, but lack of time and not being that experienced with
elisp means I haven't done so.
Something like this is another:
43 matches
Mail list logo