And after the v1 life, the worst that will happen is that you need to add `nre`
as a Nimble package dependency.
Yup. But I guess I want to use the compiler api instead... I'll use it to
compile the file provided prior creating a server. Then, I'll store the
exported proc in a global variable. And use it. Will that work?
Is it possible to create a table with a generic type used as keys? I want to do
something like this:
import tables, hashes
type
Node[T] = ref object
parent: Node[T]
children: seq[Node[T]]
data: T
Data = ref
What's the status of this?
A few weeks ago I made a video talking about Nim the basics they should know
just as there is a Latin group that is willing to help as I have seen this
forum very active for help, it is something that I like.
We hope that this great language can continue advancing and growing the
community.
you may want to search in forum for similar questions before opening a new
thread (which fragments discussion) => duplicate of [interest in a decimal
library - Nim forum : interest in a decimal library - Nim
forum]([https://forum.nim-lang.org/t/5687](https://forum.nim-lang.org/t/5687))
also
* for use in stdlib, IMO nre is the better design
* for use outside stdlib, IMO pkg/regex has a better design, eg works at CT,
and is pure nim code without pcre dependency; I'm curious about performance,
haven't seen benchmarks on this
Perfect. Thank you @kidandcat, @hiteshjasani and @jyapayne.
I think I fixed that bug in my branch (to be merged soon...).
Nimpy master now compiles with `--gc:arc` but crashes because `len` of a seq is
1, but `p` is NULL. So yeah, no `--gc:arc` yet ¯\\_(ツ)_/¯
We also have a working port that passes all the test here:
[https://github.com/clyybber/nimryu](https://github.com/clyybber/nimryu)
Since both `re` and `nre` made it to version 1 of Nim, you can be certain that
they will be around for as long as there are interest in maintaining the 1.x
series :) That's the stability commitment of Nim v1.
Hello community! I want to clarify for myself and future programmers, what
standard regex library should we use now?
I found two discussions about future of both
[re](https://github.com/nim-lang/Nim/issues/2511) and
[nre](https://github.com/nim-lang/RFCs/issues/31) .
I'm a bit scared that nre
@iwcoetzer Whoops that will teach me to not add a test case for new
functionality (my internal checks passed because my connection is called con!)
I added a fix for dbq and a test for the latest version.
Your first version can't work because statement is a string so can't take the
extra
ok, being compiled or dynamic, it might be a bad idea to let users run
arbitrary code on your machine.
Better define some procedures users can call.
What kind of code the users will provide?
(If your goale is to build something like a nim playground have a look how nim
playground solves this
You can write a macro that produces import statements from seq of strings, but
seq of strings should be known at compile time.
For example I have a macro that imports all modules in a folder recursively.
This is used to run tests in individual modules.
Here's the code:
import asynchttpserver, asyncdispatch
var givenByUser = "test.nim"
var server = newAsyncHttpServer()
proc cb(req: Request) {.async.} =
# import user.nim
# use it's main proc
await req.respond(Http200, procInFile())
This is a venerable paper. There is a new algorithm, [Ryū: fast float-to-string
conversion](https://dl.acm.org/doi/10.1145/3296979.3192369) that is much
faster. Here's some code:
[https://github.com/ulfjack/ryu](https://github.com/ulfjack/ryu)
lent/sink is no longer a valid type for variables under the revised destructors
scheme. And no, it won't help you with multi-threading either.
The simplest way to go is `--gc:boehm` and a global `TableRef`, assuming that
read-only access is the only thing you want. The reason behind using
`var refT: ref T refT[] = t `
Run
You have to start with a `ref T`. Usually if this problem comes up it indicates
an API design problem.
Hello, Nim community!
I'm happy to announce that Status.im is resuming the bounty program for the
development of [Nimbus](https://nimbus.team), our Ethereum
[1.0](https://github.com/status-im/nimbus/) and
[2.0](https://github.com/status-im/nim-beacon-chain) client for
resource-restricted
?
That still doesn't support lent.
Sure, I've reported it here:
[https://github.com/nim-lang/Nim/issues/13531](https://github.com/nim-lang/Nim/issues/13531)
But why?
Try `--gc:bohem`.
I know that I can "just" use ptr-s and allocShared0 but that's no good. Is the
sink/lent runtime usable with 1.0.6? sink doesn't seem to work and the compiler
doesn't accept lent.
Coming from other runtime environments with async support such as Python, one
thing I have seen is that in order to take full advantage of async web servers,
you need async database support. It doesn't seem in nim that the DB clients
support async connections, which would lead me to believe
Confutils is another package that makes the creation of git-style CLI tools
particularly easy:
[https://github.com/status-im/nim-confutils](https://github.com/status-im/nim-confutils)
> That's way too negative, the binary will contain the required parts of the
> Nim compiler and its VM and all you need to do is to provide lib/system/,
> system.nim (and maybe strutils, etc) with your app and patch the line let std
> = findNimStdLibCompileTime() to something appropriate.
Was
I do not know your use case, but i think embedding a compiler is a little
overkill. Why can't you just include every required module? What are you'r
concerns?
Can you elaborate what your use case for the REST api is?
Oh well, that "shouldn't" be hard? lol
Oh ok! Is it fast enough? I'll be using it for a REST api
yes, it can. You "just" need to get it into gedit's source code, send them a
patch.
Please report bugs on github.
> and save your users the headaches from needing to have a usable compile
> environment.
That's way too negative, the binary will contain the required parts of the Nim
compiler and its VM and all you need to do is to provide `lib/system/`,
`system.nim` (and maybe strutils, etc) with your app
> it's a serious question,
Maybe. I hoped he would come back so that we would know for sure, but he did
not.
Well sometimes my answers may be wrong or bad, so it may be better to do not
answer at all and leave answers to the paid Nim devs, or at least native
english speakers. In am none of
38 matches
Mail list logo