Nim packages dependencies visualizations

2022-07-23 Thread hugosenario
I've been collecting data from Nim packages and created a list of links to PlantUML with packages dependencies visualizations. [Notebook with >600 links](https://www.kaggle.com/hugosenari/nim-packages-mindmap-links) Some examples: [amysql](http://www.plantuml.com/plantuml/uml/POz13iCW40Fll88pn

How to determine why shared lib is linked

2022-07-23 Thread sls1005
Try `--os:linux`

How to determine why shared lib is linked

2022-07-23 Thread curioussav
So in termux my program is compiling and linking to libandroid-glob.so which is providing the glob function. But my purpose was to use the result shared lib in an apk. I’m doing this because I’ve been unable to get cross compiling to work on my m1 Mac. I used a tool to inspect the symbols in my

How to write a proc to get verilog HDL style bitslicer?

2022-07-23 Thread elcritch
Nice! Maybe you could try `..` instead? I used `..` for HDL/hardware register style descriptions [BitFields](https://elcritch.github.io/cdecl/cdecl/bitfields.html). Not sure but I think `..` would work in a setter. Oh and I like the set slice syntax too! Mind if I steal it and add it to the bi

How to write a proc to get verilog HDL style bitslicer?

2022-07-23 Thread leeooox
Thanks a lot! This solved my problem. Only thing not so "perfect" is : could not be used as slice operator.

Ctrie in Nim for concurrent iterators?

2022-07-23 Thread elcritch
I ran into [Ctries](https://en.wikipedia.org/wiki/Ctrie) they other day and found them intriguing. It extends HAMT (trie hash maps) to be concurrent and provide non-blocking snapshots. Anyone tried implementing one in Nim? A quick search didn't yield anything. What particularly seemed interesti

Ctrie in Nim for concurrent iterators?

2022-07-23 Thread elcritch
Here's an example: and here's one of the original papers:

problème db_sqlite 1.6.6 ??

2022-07-23 Thread JPLRouge
source : import db_sqlite compile : `/home/soleil/.choosenim/toolchains/nim-1.6.6/lib/impure/db_sqlite.nim(731, 61) template/generic instantiation of `since` from here` `/home/soleil/.choosenim/toolchains/nim-1.6.6/lib/impure/db_sqlite.nim(732, 7) Error: type mismatch: got `

Implement api rate limiting with jester

2022-07-23 Thread Cnerd
Thanks I think I will switch my project's server to prologue

Implement api rate limiting with jester

2022-07-23 Thread exelotl
iirc what you're after is what many web frameworks call "middleware", which is not something that Jester has. However, there's [a fork](https://github.com/JohnAD/jesterwithplugins) from a couple of years ago which adds it. It was [covered in NimConf 2020](https://www.youtube.com/watch?v=BYv1QfJ

Implement api rate limiting with jester

2022-07-23 Thread Cnerd
Hello i am attempting to implement rate limiting on my jester server application and to do that i created a variable of type `OrderedTable` which would keep track of the ip address of all computers requesting from the server and would stop serving to theses computers if they exceed a certain lim

Carbon lang

2022-07-23 Thread oyster
> It was anounced just this week and already has as many github stars as Nim. Does anyone remember what vlang has claimed before its release, and how many stars it gains via the exaggerated introduction and roadmap? As a result, vlang is a joke. As for me, carbon langauge is far from practice,

Carbon lang

2022-07-23 Thread sls1005
It reminded me of the D lang. I mean the description.

How to compute a set[enum] with all possible values?

2022-07-23 Thread planetis
Nice, thank you!

How to compute a set[enum] with all possible values?

2022-07-23 Thread exelotl
Yep, there's [fullSet](https://nim-lang.org/docs/setutils.html#fullSet%2Ctypedesc%5BT%5D) which beef added in `std/setutils`, which works with holey enums.

How to compute a set[enum] with all possible values?

2022-07-23 Thread planetis
I am trying to check the validity of a enum set from an untrusted source. Basically I want to either mask the input with the high(set[enum]) or check their intersection. What is the best way to obtain that value with all bits set, given that enums can be holey? I was considering a macro that inc

Carbon lang

2022-07-23 Thread marcomq
Carbon + Nim interoperability is probably already easy. As Carbon is expected to be compatible with c++, it is expected that you probably can simply use the header files and include a (Carbon/C++) lib file in Nim and it will probably just work. In the other direction, you probably can simply use

Nim v1.6.6 support for Codewars

2022-07-23 Thread shirleyquirk
update: they've switch from gcc to clang and it's dramatically improved compile times. it's a bit of a bureaucratic nightmare to get trivial updates approved, however. I'm not sure my interest can hold out very long if the powers that be just deny simple updates with no discussion.

Carbon lang

2022-07-23 Thread r3c
"Carbon is a new early-stage programming language from Google" ugh... Thanks, but no.

How to write a proc to get verilog HDL style bitslicer?

2022-07-23 Thread Hlaaftana
`a:b` is hard to overload because `:` is not a normal operator. This is how [Slice](https://nim-lang.org/docs/system.html#..%2CsinkT%2CsinkU) does it (without using HSlice): type Slice[T] = object a, b: T template `..`[T](x, y: T): Slice[T] = Slice[T](a: x, b: y