Nimble download/install sequence improvement

2021-03-20 Thread haxscramper_
Yes, right now nimble installs all dependencies and resolves them at the same time. Main difference between cargo and nimble is that latter one uses script (nimscript) to define list of requirements, making it harder to statically (only using package manifest file) reason about (i.e. to get list

Testing that a macro throws an exception

2021-03-20 Thread zidsal2
Hi Hlaaftana, that does infact raise the error however testament still fails for `Failure: reFilesDiffer`

Nimble download/install sequence improvement

2021-03-20 Thread r3c
Compared to Rust's `cargo install` it looks like `nimble install` sequence is foreach package do: download() check() install() Run while cargo looks like foreach package: download() foreach package: check

Testing that a macro throws an exception

2021-03-20 Thread Hlaaftana
You can use the [error](https://nim-lang.org/docs/macros.html#error%2Cstring%2CNimNode) proc to have user defined errors in macros, and you can give it a node argument that helps with line and column information.

Found article on concurrency: "Go statement considered harmful"

2021-03-20 Thread mashingan
Nah, the article is just an ads for the lib which give nothing new, it's just: var op1 = await myFunc() var op2 = await anotherFunc() # don't start anotherFunc when myFunc not finished yet Run if we "structurize" our operations as synchronous tasks. or

Found article on concurrency: "Go statement considered harmful"

2021-03-20 Thread moigagoo
I love this article. Actually thought about it a lot in the context on Nim and how Nim’s any and all async constructs are similar to the ones proposed in the article and how they are different. I still believe the significance of this article is yet to be acknowledged. Raw threads and async pro

Norm & Functions

2021-03-20 Thread nealie
I'm using norm for a simple database with sqlite as the backend and I would like to use the avg function, but alas I can't see any ways of calling a function when I select. Is this possible using norm?

Criticism of Parallel Nim

2021-03-20 Thread r3c
"The Asynctread Wars started have..." * \-- Master Yoda *

Found article on concurrency: "Go statement considered harmful"

2021-03-20 Thread boia01
For those you don't want to read the entire article, I'll try to summarize this model of "structured concurrency". I won't try to describe what minimally constitutes structured concurrency, instead I'll try to describe an idealized realization based on fibers. I'll use the term _fiber_ to descr

Testing that a macro throws an exception

2021-03-20 Thread zidsal2
I'm currently trying to test that my macro throws an exception if you give it a malformed file I've gone down the route of using testament for this as its the only way I can see this working as I'm expecting my test to not compile! however when I run my testament test it returns a `reFilesDiffer

Can application access to orc interface?

2021-03-20 Thread Dabod
Thank you, now it compiles.

Can application access to orc interface?

2021-03-20 Thread Dabod
If I build my application with `--gc:orc`, the `GC_fullCollect`, `GC_enable`, `GC_disable` are gone. Then I found there are `GC_runOrc*`, `GC_enableOrc*` and `GC_disableOrc*` in `lib/system/orc.nim` as replacement, but nim told me they are undclared identifier, how can I call these procs?

Can application access to orc interface?

2021-03-20 Thread Yardanico
"nim told" \- was it the compiler itself or the editor? If you compile with `--gc:orc` in the terminal, then the editor doesn't know that you're using `--gc:orc`, to fix that you need to create a file like `yournimfile.nim.cfg` and put that switch inside: gc:orc Run

Nimview - a lightweight UI helper

2021-03-20 Thread marcomq
Webview can also use as url. I use relative file urls and webview callbacks instead of ajax calls. So - no magic :)

how do I get a reference to a object

2021-03-20 Thread demotomohiro
As far as I know, Nim's reference type always points to heap memory and cannot points to static or stack momery. If you declare an object type outside of procedures, it exists on static momery. If you declare an object type in a procedure, it exists on stack memory. As long as there is referenc

Found article on concurrency: "Go statement considered harmful"

2021-03-20 Thread icedquinn
Saw this come across my desk and thought it was interesting: / tl;dr explicit fork-join points where if any method inside the block tries to spin up background tasks they are somehow tracked by the block

Nimview - a lightweight UI helper

2021-03-20 Thread icedquinn
how are you avoiding opening ports? when i looked at webview it wants you to navigate to a URL and didn't seem to have an option to install your own file handler. data URLs?

'ord' cannot be passed to a procvar

2021-03-20 Thread lscrd
And you can do instead: echo ['A', 'B', 'C', 'D'].mapIt(ord(it)) Run

'ord' cannot be passed to a procvar

2021-03-20 Thread Stefan_Salewski
toLower() is an ordinary function, you should find it somewhere in the Nim source codes. ord() is not, it is more like a cast. 'A' is called a char in Nim, but what it really is is a 8bit int which can be used to make strings. So 'A'.ord tells: Let us regard the entity as an int. Ord is generall

'ord' cannot be passed to a procvar

2021-03-20 Thread oyster
import strutils import sequtils import sugar echo "A".toLower echo ["A", "B", "C", "D"].map(x => toLower(x)) echo ["A", "B", "C", "D"].map(toLower) Run works fine however, the last line of echo 'A'.ord echo ['A', 'B', 'C', 'D'].map(x

Gimp plugin?

2021-03-20 Thread HJarausch
Does anybody known if someone has tried/started writing plugins for the image manipulation application **Gimp**?

iNim is supercalifragilisticexpialidocious!

2021-03-20 Thread alexeypetrushin
Nim is **not yet** used in interactive style, because the tools are not there yet. For example, Nim could be used for Interactive Notebooks like Python. And as soon as Nim could be compiled to JS, even pure Browser Notebooks are possible, like [Observable](https://observablehq.com/@uwdata/intro