Oh right, that constraint was "unique per Nimble package" and it was lifted
more than [a year
ago](https://github.com/nim-lang/Nim/pull/11064/commits/85bb68c8d0d8eeb9f370b78ff54e27736e7f9ea6).
`-d:openblas -d:blas=libopenblas` works for arraymancer too thanks
> * implementing cross-platform TLS support for a P2P protocol, and it's such
> a giant pain in the butt.
>
Sorry but that's not the relevant point from a security perspective. From the
practical point of view it of course can be a killer. What, however, _is_ an
important point is that comp
Well but not every func has a `var T` parameter.
But even with strictFuncs you can modify arguments with explicit "var T"
argument, e.g. "var int"
Ok. I realize I also didn't tell @Serge who never replied about needing to do
`wordFrequencies.sort`. So, as penance I did this series of **_six_**
successively faster versions. First would be @gemath's, then the no-deps
variant. Then using the heapqueue I mentioned. Then `Table[string,int]` ins
Thanks a lot.
in order to get rid of the deprecation warning place the pragma after the
object name
Car {.requiresInit.} = object
Run
and that should resolve it.
as for the documentation I found that pragma in the nim manual
[https://nim-lang.org/docs/manual.html](https://nim-lang.or
It sounds as if the C back-end could then annotate translated funcs with
`__attribute((pure))`, at least with Clang and GCC, since the semantics seem
identical. I've used this attribute in some of my C++ code and it does seem to
improve Clang's code generation.
Here is an example:
[https://nim-lang.org/docs/system.html#%7C%7C.i%2CS%2CT%2Cstring](https://nim-lang.org/docs/system.html#%7C%7C.i%2CS%2CT%2Cstring)
Hello @invetormatt,
thank you for your response. The {.requiresInit.} pragma looks very promising.
But when executing your modified example code I get the following warning:
> Warning: type pragmas follow the type name; this form of writing pragmas is
> deprecated [Deprecated]
Is there an alte
> No, not really. OpenSSL is a cancerous abomination and a catastrophy
> generator.
I tend to agree; I was trying to be polite earlier :)
> Second point: try to avoid SSL if any possible for quite a few reasons.
I didn't use to agree with this; I figured it's best to use a battle-tested
longti
Hello, I believe the {.requiresInit.} pragma may be what you are looking for.
it will throw an error if the object is initialized with a missing value.
type
Car = object {.requiresInit.}
numOfWheels: Natural
numOfDoors: Natural
color: string
hadA
Hello everyone,
in the example below the initCar proc creates a new car and defines sensible
default values. Now I decide to extend the car with a new attribute maxSpeed:
Natural. By default the compiler will set the value of maxSpeed to 0 which
doesn't make sense for cars. As module author I'm
Cheers, I'll give that a go and see what happens - wouldn't have thought of
that!
Try `--tlsEmulation:off`
Thank you!
Where do you see this || operator? I have never seen such an operator in Nim...
This is an operator to parallelize a loop with OpenMP.
Do not use `inc` on a global variable with it as there would be no
synchronization and what you will get in `x` will be random.
Is there a corresponding operator for iterables ?
>From the snippet hereunder, I'm assuming that this operator is for dealing
>with vectors (since it appears in a range expression):
import strutils
var x=0
for i in 1||1000:
inc x
echo "[$1]=$2" % [$i,$x]
I've now ran the core dumps through gdb to get backtraces for them all in case
somebody else has any insight into the causes:
**cyclecollector.core**
> gdb ./tests/gc/cyclecollector cyclecollector.core
Reading symbols from ./tests/gc/cyclecollector...
(No debugging symbols f
>From the research I've done, JWT looks like a good solution. I found a library
>for Nim:
>[https://github.com/treeform/quickjwt](https://github.com/treeform/quickjwt)
I guess you have to build it yourself. I've done something like this for a
websocket chat system, build on top of plain asynchttpserver. For http i
basically created a (session) cookie in the browser and stored it in the
servers datastore. i've done it a little different, since the websocket
co
I see.
Thank you!
I actually like that alternative (or "complement") rather. I don't trust
copy/paste operations when I don't have visible delimiters.
For Python, I use "pindent.py" to add visible "# end for", "# end def", etc.
delimiters
you example works as long as your end parenthesis on line 4 is shifted over two
spaces
It actually works!
nim c -d:blas=libopenblas nim_neo_linear_algebra.nim
Run
it compiles and runs and uses the openblas lib installed by "pacman" under
Mingw64 on Widows.
That's really cool!
How comes, then, that this works:
for i in 1..10:
echo "hello"
echo i
Run
and this doesn't:
for i in 1..10: (
echo "hello";
echo i;
)
Run
Over the last few months I've been working to improve Nim's support for various
BSD systems, including adding CI. We currently have CI for both FreeBSD and
OpenBSD. I'm now turning my eyes towards NetBSD, though we don't yet have a CI
platform available for it.
I've set up a NetBSD virtual mach
In case anybody else wishes to run the tests on NetBSD, there are a few steps
to go through (these steps assume you are logged in as root):
pkgin install git \
sqlite3 \
sfml \
mozilla-rootcerts \
boehm-gc \
gmake \
nodejs \
pcr
With zero_functional, one would add
wordFrequencies.pairs() --> take(10).foreach(echo it[0] & " " & $it[1])
Run
after the `sort`.
I was a bit too hasty writing the post. In the end I was able to circumvent the
problem altogether. Sorry for the noise. Also I'm still convinced that a
special functions lib like python's scipy.special would be beneficial not as a
std lib but some 3rd party implementation.
Are there any libraries to help authenticate a webservice built with Jester?
How is everyone else doing this?
Yes I communicated it badly in my post. I know of the existence of the math.h
gamma function. Problem is that it's the complete gamma function eg. usually
called just gamma function. I need the INCOMPLETE and actually more
specifically the lower incomplete version of it. This is actually the fun
BLAS on windows is a huge pain, and for Arraymancer as well.
By the way, I think on loading a DLL, Windows doesn't automatically prefix them
with "lib" so you might need to `--define:blas=openblas`.
Welcome to the (second) wonderful world of `distinct`
proc `-`(x, y: distinct seq[float | float32 | int]): seq[float32] =
discard
Run
Those are called the bind-many vs bind-once semantics
should work though I really really really do not like this:
[https://githu
I don't know the gammafunction but maybe in math.h?
[https://nim-lang.org/docs/math.html#gamma%2Cfloat64](https://nim-lang.org/docs/math.html#gamma%2Cfloat64)
Hello everyone! I need the incomplete gamma function in my code, but I cannot
find it neither from standard libraries nor 3rd party packages. Does anyone
have any idea if it's implemented in some nim package? I know there's the
complete gamma function in standard math.
How about wrapping some e
> Wait, was lscrd responding to a comment that has been deleted, rather than
> the top comment?
Yes exactly.
Wait, module names don't have to be unique anymore?
They never had to be, wdym?
There's no specific "rule" for that, but yes, this code still works just fine
on latest Nim.
41 matches
Mail list logo