Malebolgia & Pixy problem: expression has no address

2023-06-17 Thread ingo
Based on your post I tried various versions. All failed, so I'm still not getting it. Here's the full scene: # nim c -d:ThreadPoolSize=8 -d:FixedChanSize=16 renderfunc.nim import std/[math, monotimes] import pixie import malebolgia const Width = 800

Malebolgia & Pixy problem: expression has no address

2023-06-17 Thread awr1
make sure there are no captures in the call - in your case `image` is implicitly captured. instead you would want to pass it as a `var Image`. also the return type should be void as you are not actually returning an `Image` from that procedure.

Malebolgia & Pixy problem: expression has no address

2023-06-17 Thread awr1
also from a cursory glance this may fail because `proc` is probably being considered as a typeclass here instead of as a concrete procedure type in the context of `assign()`

Embedded: svd2nim for read/write of ARM Cortex micros

2023-06-17 Thread dwhall256
**Progress!** I focused on the multi-line `modifyIt` proc and found that the `svd2nim` code generator passes a **variable** value to some `bitops`. I rewrote a proc by hand using **constant** values and the resulting assembly was much more compact. [Here's the writeup](https://github.com/dwhall

Malebolgia & Pixy problem: expression has no address

2023-06-17 Thread awr1
firstly, you probably want `for j in 0..https://github.com/Araq/malebolgia/blob/master/src/malebolgia.nim#L168). this works for `seq[T]` elements because `[]` returns a `var T` [in the stdlib](https://github.com/nim-lang/Nim/blob/version-1-6/lib/system.nim#L2644) whereas pixie defines a `[]=` (a

Discounted rates for "Nim in Action" and "Mastering Nim"?

2023-06-17 Thread basilajith
Any place where I can get discounted copies (or purchase parity) copies of _Nim in Action_ and _Mastering Nim_ paperbacks? I'm from India. Both books are quite expensive in India. _Mastering Nim_ is not available in Amazon India.

Malebolgia & Pixy problem: expression has no address

2023-06-17 Thread ingo
@planitis, thanks for mentioning. Never noticed it. @PMunch `var Image` results in the same error

neovim lsp setup: no autocompletion and suggestion

2023-06-17 Thread dlesnoff
I really like this blog's style! Thanks for sharing!

error: could not load:(libcrypto-1_1-x64|libeay64).dll

2023-06-17 Thread ploxotnuj1
Sorry, I am writing through a translator since I am from Ukraine. Is it possible to use your library to download files and show download progress in the terminal?

Nimble not installing Jester v0.6.0

2023-06-17 Thread PMunch
The [.nimble file in Jester](https://github.com/dom96/jester/blob/master/jester.nimble) is still at version 0.5.0, so Nimble sees the tag, downloads it, doesn't see the correct version number in the repo, and errors out.

Malebolgia & Pixy problem: expression has no address

2023-06-17 Thread PMunch
Try making `Image` into a `var Image` in your parameter list. The error is a bit vague, but essentially Nim doesn't allow you to get a pointer to non-mutable data.

volatile_store codegen error ?

2023-06-17 Thread mad_toothbrush
Thanks both! That fixed the problem. It would be good to have a fix. But if that's a low priority concern then perhaps a stop gap warning with relevant information to work around.

Nimble not installing Jester v0.6.0

2023-06-17 Thread jasonfi
I was really wanting to install the just-released v0.6.0 of Jester, but: * `nimble install` tries to reinstall v0.5.0 * `nimble install@0.6.0` acknowledges I want v0.6.0 but can only give me v0.5.0 Am I trying this too early? Thanks to those that worked on the new version of Jester.

Malebolgia & Pixy problem: expression has no address

2023-06-17 Thread planetis
I can't answer the original question but the last line `m.spawn rand(100) -> s3[x,y,z]` is not threadsafe, there should be a compile warning at least. And its documented in the random module.

Malebolgia & Pixy problem: expression has no address

2023-06-17 Thread ingo
In an attemt to speed up rendering of a function to image using Malebolgia and pixy I ran into a problem. It is my first attempt at doing anything multi threaded. The original proc that works fine: proc renderXYFunc1( image: Image, #from pixy function: proc, funcV