Redirect stdout for invoke assembly using winim/clr

2022-01-21 Thread Araq
I have no experience with rundll32.exe but it looks like you redirect the Nim program's stdout but not the stdout of its child process? No idea, sorry.

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread xigoi
Well, then make a plugin for an editor that you like.

Matrix/vector operations in Nim

2022-01-21 Thread sls1005
A 2-dim sequence of int is represented as @[@[1]] . Its type is seq[seq[int]] . I'm not sure if this is what you call "matrix." The answer for the next question is yes, it can. To access A[i][j] with A[i, j], you may define: proc `[]`[T](A: seq[seq[T]], i, j: int): T = A[i][j]

Matrix/vector operations in Nim

2022-01-21 Thread Yardanico
Nim supports A[i, j] syntax by itself without any metaprogramming, see for example

Matrix/vector operations in Nim

2022-01-21 Thread keks84
Looks very good for point 1, thx! Re element access A[i,j] instead of A[i][j] any chance to overload setters and getters in Nim?

usage of OpenMP parallel loop iterator for lazybones?

2022-01-21 Thread oyster
I have serached this forum, and checked the [doc](https://nim-lang.org/docs/system.html#%7C%7C.i%2CS%2CT%2Cstaticstring) however, when I try to compile the following code by `nim c -d:release -d:speed --stackTrace:off --opt:speed --passL:-s --passc:-flto --passc:-fopenmp --passL:-fopenmp -d:ope

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread oyster
laugh, I released a program. One user gets frightened by `Trojan:Script/Wacatac.B!ml` from his crappy Anti-virus application.

Update on compiling to asmjs or wasm through emscripten...

2022-01-21 Thread sekao
Don't use i386 as your cpu target, use wasm32. This isn't documented anywhere unfortunately...i found out the hard way. Also i wouldn't use nim.cfg. Definitely take a look at treeform's tutorial. I'm building the web client for [ansiwave](https://ansiwave.net/) the same way, with only slight mod

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread cantanima
My editor will fold, too. I want to _navigate_. Folding can help, but then I have to unfold all that material.

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread coffeepot
VSCode lets you fold/unfold regions with keys: * Fold All: CTRL+K, CTRL+0 (zero) * Fold Level [n]: CTRL+K, CTRL+[n] * Unfold All: CTRL+K, CTRL+J * **Fold Region: CTRL+K, CTRL+[** * Unfold Region: CTRL+K, CTRL+] So, within the case statement _CTRL+K, CTRL+[_ is hopefully close enough t

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread cantanima
It would seem so, I agree. In principle it should be easier than searching for braces. I'm not a fan of vim-like editors (sorry @xigoi), so kakoune is out, but I do appreciate the suggestion.

Matrix/vector operations in Nim

2022-01-21 Thread keks84
Hi, how can I implement a matrix (2-dim vector) A in Nim? Guess it should be vector of vectors, but could not find an example. * Could overloading be used to implement matrix-vector multiplication A * b? * Could metaprogramming be used to implement element access A[i,j] instead of A[i][j]?

Matrix/vector operations in Nim

2022-01-21 Thread Clonk
Check out Arraymancer

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread rockcavera
Unfortunately, it is a problem that exists and can affect the arrival of new users to Nim, especially those who use Windows. I'm a Windows user and I don't use any antivirus, besides disabling any protection, as I've had serious problems with losing files. However, I understand users who use an

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread xigoi
For Vim and Neovim:

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread SolitudeSF
im sure that could be easily scripted in any decent editor if anyone would actually be bothered to implement that. in kakoune, for example, `Alt+] i` will jump to the end of indetation block.

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread cantanima
(This will be a little OT, sorry.) I like your points, but have one question based on recent experience. Tooling for curly-brace languages (at least) makes it easy to navigate to the beginning or end of a block when you're at the other end. For instance, in one of my favorite text editors I jus

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread dfprint
> if you go to the Windows security window, then virus and threat protection, > you can allow it from there. I saw that, thank you. > The download page of the Nim's website provide you with SHA256 signature so > it's easy to verify the binary. That is true, but would a new user even bother? Th

Novice Question: Implement the Step functionality in VBA

2022-01-21 Thread freeflow
That worked fine. I also used a version of it in C# to resolve a similar nastinees. Cheers.

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread coffeepot
These points are easily counterable, but unfortunately we do have to have pithy counters to nip them in the bud. If we keep countering them with logic, sooner or later the responses gain their own momentum (I hope). They're usually based on folk lore of bad experiences with languages like Pytho

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread coffeepot
> It's only an issue because anti-virus don't care that their algorithm is bad > and finds more false positive than actual malware. It's not a technical issue for Nim. It's an issue for new users, many of which will have the same thoughts as @dbl007 "this file is infected by a virus". Why would

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread reversem3
Why not just use WSL and compile to windows ? Thats what I have been doing for three years now. Works great.

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread Hlaaftana
GCC is not in Nim, mingw binaries are just provided on the Nim website. You can use MSVC or some other compiler through the configuration. The only real antivirus problem I had with Nim is when one of my friends couldn't start a win64 binary I built. However when I gave them the win32 version i

Bug of newSeqWith with Slice

2022-01-21 Thread chaemon
Thank you very much! Then, should the original newSeqWith proc be fixed?

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread ingo
> Why would changing the directory it downloads / install Nim change anything > ?And if it did, would you really trust an anti-virus that can be by-passed by > changing folder ? You misunderstood, or I was not clear. Set the windows anti virus to exclude the directories Nim uses from scanning f

Redirect stdout for invoke assembly using winim/clr

2022-01-21 Thread plshelpmeguys
Hello guys, so I've just started playing around with nim and my lack of programming background really is becoming a problem so I need some help. I want a dll that uses winim/clr to load an assembly from desk then call the main function and redirect all output to a file. Now I've got everything

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread Clonk
> It is a big issue and extremely annoying and it turns people off of the > product. The fact Nim gets flagged makes no sense to begin with. And the criteria on which it gets flagged are absurd as well (see how absurd it all really is). So not onl

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread jasonfi
The devs need to file a false positive report.

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread mratsim
> It'd be fun to show stuff like "here's a complete multi-threaded queue > implementation" vs the equivalent C code. Especially for real C code and all > the scaffolding it ends up with. There won't be any difference because you need to use manual memory management in both. Well, with Nim you c

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread ingo
It is a big issue and extremely annoying and it turns people off of the product. Maybe some additional docs for windows installation may help. Before installing, or even downloading exclude the various directories from scanning. These would be the download directory (reset after install), the U

Trojan:Win32/Wacatac.B!ml

2022-01-21 Thread Clonk
> I hope that this can be addressed. The download page of the Nim's website provide you with SHA256 signature so it's easy to verify the binary. > Just tried this and got a similar result, in my case it was flagged as > "Win32/Uwamson.A!ml". This is turning into a bit of an issue. It's only an