open() does not return

2021-02-21 Thread KnorrFG
Sadly, this didn't change anything

open() does not return

2021-02-20 Thread KnorrFG
I wrote a program which works well under Linux, but does not in Windows. It will not return from the following line: let file = "./antenna.jpg".open() Run It does not crash, it just does not return. On Windows, I tested msvc and mingw, the problem occurs in both cases

Problem with sugar.capture and the js backend

2021-02-08 Thread KnorrFG
Thanks a lot, I will open an issue.

Problem with sugar.capture and the js backend

2021-02-08 Thread KnorrFG
Hey, I have this html:

Passing iterators as arguments

2020-11-17 Thread KnorrFG
But this misses the point a little. I wanted to avoid passing around containers that would then get copied, and pass around iterators instead. In your examples ivec, fvec and dict would get copied, wouldn't they? With the help of the Discord chat, I now ended up defining `toFirstClassIter` like

Passing iterators as arguments

2020-11-17 Thread KnorrFG
> However, structural expansion of the template "in place" might still be an > interesting alternative. And how would I do that?

Passing iterators as arguments

2020-11-16 Thread KnorrFG
I should've posted a minimal example. So in the following example I hope everything becomes clear. Auto not working would be no problem, I could use generics, but I cant get it to work either way, so here is the code: import tables, sugar type Iterable[T] = iterator: T

Passing iterators as arguments

2020-11-15 Thread KnorrFG
Originally I used araqs code, that produced the `Error: redefinition of 'it'; previous declaration here: ...` error, when I called it 2 times in the same function. Then I tried to fix that by making the iterator anonymous, so there would be no symbol that could collide with itself. This then pro

Passing iterators as arguments

2020-11-15 Thread KnorrFG
It might be strange to ask this now, after the thread derailed a little, BUT: Araqs solution to my question worked until now. I tried to call that template a 2nd time2 lines later, which yields to the error: ` Error: redefinition of 'iter'; previous declaration here: ...`

Passing iterators as arguments

2020-11-15 Thread KnorrFG
It might be strange to ask this now, after the thread derailed a little, BUT: Araqs solution to my question worked until now. I tried to call that template a 2nd time2 lines later, which yields to the error: ` Error: redefinition of 'iter'; previous declaration here: ...` I tried to return it as

Passing iterators as arguments

2020-10-31 Thread KnorrFG
Wow, that looks awesome 👍

Passing iterators as arguments

2020-10-31 Thread KnorrFG
I guess that makes sense. Thx

Passing iterators as arguments

2020-10-31 Thread KnorrFG
I see, thank you. I don't want to criticize nim, this is pure curiosity: coming from python it seems very strange to me to not be able to pass raw iterators around. Why was it designed like this?

Passing iterators as arguments

2020-10-31 Thread KnorrFG
Hey, I want to use an iterator as argument for a function. I know, that iterators cant be passed around, and they need to be wrapped in functions. However, I cant get it to work. I something like this: import tables, sugar type Iterable[T] = proc: iterator: T proc

Mysterious crashed with SIGSEGV

2020-10-30 Thread KnorrFG
Alright, will do 👍

Mysterious crashed with SIGSEGV

2020-10-29 Thread KnorrFG
Interestingly, under Windows, the problem was the same. However, once I added --gc:arc the problem was gone. On both OSes.

Mysterious crashed with SIGSEGV

2020-10-29 Thread KnorrFG
Thanks for the tipps, Ill look into valgrind and try to run it under windows

Mysterious crashed with SIGSEGV

2020-10-29 Thread KnorrFG
I tried to find out whether the problems are in the parser, or in nigui. I wrote a small program (nigui_test, also in the repo), that renders the same graph (just much larger) based on random, and I added some tests for the parser (in the bottom of parser.nim). The Gui works without problems, an

Mysterious crashed with SIGSEGV

2020-10-27 Thread KnorrFG
Sure, I created a repo at: <https://github.com/KnorrFG/session_planner>

Mysterious crashed with SIGSEGV

2020-10-27 Thread KnorrFG
So you think those crashed relate to errors in nigui?

Mysterious crashed with SIGSEGV

2020-10-27 Thread KnorrFG
Hey, I just started out with Nim, and I'm currently working on my 2nd practice project. It renders a few points and lines between them based on a text that is parsed. After a short while of playing around with the Program it will crash. The crashes are not deterministically reproducible. A text