Correct way have for-loop iteration up to number of only initialized array elements

2022-02-20 Thread mardiyah
How to limit `for loop` iteration up to number of only initialized or filled array elements var d = newSeq[ array[2,string]](70) d[0] = ["foo", "bar"] d[1] = ["moo", "dar"] for u in d : # ... so on # will loop 70

import from url

2022-02-20 Thread miran
> The way you dismissed the idea sounded rude. No it didn't. It sounded just fine (at least on my machine), it was a normal answer to the question.

import from url

2022-02-20 Thread reversem3
Depending on what culture the person is from. I deal with people around the world and I can say none of them are trying to be rude its just their culture.

porting c++ [string]view demo to nim: a puzzle

2022-02-20 Thread exelotl
I'm not focusing on performance, but out of curiosity I've adapted your code to use Nim's own views. Sadly they're still not ready for prime-time yet, as we can see: * The stdlib is missing functions to work with them (we had to reimplement `find`) * The lifetime rules aren't up to scratch

NimForum 2.2.0 - Fixes a big CVE!

2022-02-20 Thread PMunch
> why cant we delete our messages still? This should've been fixed by , but I'm not sure if it's deployed yet. And the forum is obviously not perfect, and as @jyapayne pointed out the review and deploy processes could certainly be improved. But the

porting c++ [string]view demo to nim: a puzzle

2022-02-20 Thread ggibson
A friend was very excited about c++ `string_view`, which is now available since c++17, and they shared this demo with me where compiling without `string_view` will yield a runtime of several seconds, and with `string_view` the runtime is 30-60ms. We often chat about nim so I offered to code up t

Nim 1.6.4 released

2022-02-20 Thread dom96
Doesn't include . Can we make sure to include it in the next patch?

Forum crashes when search term includes "(" or ")"

2022-02-20 Thread dom96
Reposting what I just wrote on the GitHub issue: > Wow, this is really interesting. I was wondering how the forum was crashing > here, turns out it doesn't. I'm not quite sure why CloudFlare returns a 502 > after the search with a "(" but it seems to be browser-local. You can test > this yourse