Great idea! Thanks.
Thank you for your answers. I appreciate that very much. Its a bit funny but i
don't use c in this context.
The problem I have is that it didn't work with the flag -d: release. I have now
tried something out and found out the following:
When I create the stream from the previously opened file,
Sometimes you really want an interactive debugger though
> How about to use counter based random number generater like philox?
> [https://www.thesalmons.org/john/random123](https://www.thesalmons.org/john/random123)/
This paper is mentioned in JAX (another Google Deep Learning framework), which
was mentioned to me here
[https://github.com/mratsim/wea
This issue is now fixed on devel, but there's another regression with `nim doc`
\+ `runnableExamples`:
[https://github.com/nim-lang/Nim/issues/14485](https://github.com/nim-lang/Nim/issues/14485)
.
Hi,
I shared this on IRC a month ago, but wanted to share it here too after it has
been running non-stop for a month.
**What is it?**
This is mostly a cron job that clones all the Git and Mercurial repositories
and offers them through a modified package registry. What I'm trying to
accomplish
How about to use counter based random number generater like philox?
[https://www.thesalmons.org/john/random123](https://www.thesalmons.org/john/random123)/
It works like a hash function. When you generate a random number, you make a
unique number and pass it the function. You can create unique n
> But Go's slices are memory-safe and zero-copy and can be stored, for example.
They are technically memory-safe but prone to aliasing bugs anyway.
It's supposed to work, yes and should be documented in the manual.
> Only Rust has memory safe zero-copy collection that can be stored in a type
> (their slice type).
Not exactly. Only Rust has this
_[plus](https://forum.nim-lang.org/postActivity.xml#plus) compile-time safety
checks and zero runtime overhead. But Go's slices are memory-safe and zero-copy
and
Just to make sure you're answering the exact question I asked :) — if I declare
a C proc that takes an `openarray`, when Nim calls that function does it pass
that parameter as a pointer followed by an int? For example:
proc set_bytes(bytes: openarray[byte]) {.importc: "set_bytes".}
make it depends on libzip optional sounds nice, user may not need full features.
That was the idea, use it as template for more cheatsheets or other stuff. :)
Nice! I made a copy that's black-and-white, better suited for laser-printing:
[https://www.overleaf.com/read/gytjmgdzmcdt](https://www.overleaf.com/read/gytjmgdzmcdt)
Iteration order that depends on runtime values is a design bug.
After
[https://github.com/enthus1ast/nimAsyncHttpTools/pull/2](https://github.com/enthus1ast/nimAsyncHttpTools/pull/2),
`simplehttpserver` compiles and runs well on my machine (RHEL 6.8).
@bung You do not have an Issues section on your fork. I wanted to ask you if
the dependency on libzip can be made optional? (See [my message
above](https://forum.nim-lang.org/t/6386#39399) ). The original `nimhttpd`
builds and runs fine on my machine (RHEL 6.8), but trying to run your fork
fail
Fixed.
Maybe we need that overload (???) ;P
`assercho` is `assert` and `echo` combined, with extra Debug, it shows the Nim
code line and the C code line, works with bool and string.
[https://github.com/juancarlospaco/nim-contra](https://github.com/juancarlospaco/nim-contra)
Awesome! That is the winner!
@Araq It would be now cool to bake that into nim :)
OK, it builds find after uninstalling `zip` and doing `nimble install
zip@#head`.
So the correct fix is:
1. Cut a new release of the `zip` nimble package
2. Cut a new release of your `finder` package with updated zip version in its
dependency
3. Finally update your `static_server` package
ok. .now it compiles, but doesn't run:
> could not load: libzip(|2).so(|.4|.2|.1|.0)
I'll have to figure this out later. I am using an admin managed OS, a very old
OS: RHEL 6.8 (Linux).
I tried your repo as well. I cloned it and did `nimble build`, but it failed
with this: [http://ix.io/2nAa/text](http://ix.io/2nAa/text)
It looks like the `psutil` dependency needs to be updated for a backward
incompatible change that happened in nim 1.0.0. Now we have `isDigit` taking
only `ch
In case you just need the original nimhttpd like `python3 -m http.server`, run
`nimble install nimhttpd` to install the binary and then run `nimhttpd` every
time you want to serve static files.
The aim of my post was if there's a way that Just Works for kicking off an
adhoc server, like `python3 -m http.server` does, **and** then have that baked
into nim as well.
Hello, I cloned your repo and did `nimble build`. It failed with this error:
[http://ix.io/2nA6/text](http://ix.io/2nA6/text)
I am using the latest nim devel.
yellow is difficult to read on a white background
I have tried it, in many ways, with no luck :(
Thanks for trying.
++
> Is this a bug, or intentional? If the latter, is there a cleaner workaround
> like a pragma?
It's intentional but it's not part of the spec and we could change it.
The workaround is to add an enum field that is mapped to 0.
Oh, bummer. LLDB supports a Python API for pretty printing as well, but I don't
think anyone has made a script for Nim yet.
`try` / `except` or `try`/`finally`
[https://nim-lang.org/docs/tut2.html#exceptions-try-statement](https://nim-lang.org/docs/tut2.html#exceptions-try-statement)
from strutils import parseInt
# read the first two lines of a text file that should contain numbers
# and trie
@Araq, how do you know it's a callback?
When you create a proc to be used in C (callback):
* Don't use exceptions
* Don't use string or sequences
* Deactivate stacktraces
* Use `int32` or `cint` for `int` use `uint` or `csize_t` for `size_t`
* tag `{.cdecl, gcsafe.}` your proc to detect
It's likely that your code is buggy. Use `setupForeignThreadGC()` in callbacks
that are called from C and run in a different thread.
Fwiw orange is my favorite color.
Hello,
I am trying to build a list of mirrors and append the date when the mirror has
been refreshed. (For doing that I take the last-modified header of a file)
The program built without errors. The program begin to parse and print but, it
ends if it meet an error during the parse.
Is there a
Unfortunately this won't work - GDB doesn't work on Mac since 10.14 Mojave
thats not correct
for i in 9..4: echo i # 9, 8, 7, 6, 5, 4
Run
37 matches
Mail list logo