nimqml's abstractitemmodel example is unclear to me

2020-10-08 Thread Stefan_Salewski
Funny, so nimqml has some similar tiny issues as gintro has when widgets are subclassed with ARC:

How to statically link libraries?

2020-10-08 Thread treeform
There are pros and cons to static linking. Its great for small libraries but can be cumbersome for larger ones. Its cool when your .exe file has no .dll next to it, but for most part users do not care. Statically linking is best when you can just `nimble install foo` and not have to worry about

How to statically link libraries?

2020-10-08 Thread Niminem
What's up guys, How do I go about statically linking libraries, like SDL2, so I can have them alongside my binary for distribution?

App crashes on Rpi4 works normal on desktop

2020-10-08 Thread moerm
I suggest to present code with line numbers unless it's just a couple of lines. Line 63 of _what you presented_ is 'echo "starting"' and I strongly doubt that is the problem.

Nim - plugin for IntelliJ IDEs | JetBrains

2020-10-08 Thread moerm
> Millions of developers use Jetbrains products. They now have some support for > Nim. Note that I started by saying "Thanks". _First_. > ... endless IDE vs editor debate. That wasn't my point. My point was that we lack reasonably sized editor support. In fact, I'm _not_ against IDEs. Ich thin

Multiline conditions

2020-10-08 Thread matthias
FWIW [here is Python's discussion on the topic](https://github.com/python/peps/commit/c59c4376ad233a62ca4b3a6060c81368bd21e85b). Although I understand allowing the line break before the operator poses a compilation problem.

nimqml's abstractitemmodel example is unclear to me

2020-10-08 Thread filcuc
I answered in the GitHub issue. That said setup and delete function are basically constructor and destructors. Nim doesnt have the classic OOP features and automatic calls to base class constructors. Thus when subclassing you must make a direct call to the base class constructor (setup in nimqml

Dual behavior

2020-10-08 Thread xigoi
I like the irony in using the `dup` macro to prevent duplicate code. _He could save others from duplication, but not himself._

Multiline conditions

2020-10-08 Thread timothee
see "parser should accept parenthesized (unambiguous) multiline expression #8258"

where are fusion docs?

2020-10-08 Thread timothee
despite and (merged PR's /cc @alaviss) I'm not seeing fusion docs; Ideally I'd expect them to be published in 2 places: * in right below "Compiler docs" * in th

Dual behavior

2020-10-08 Thread Stefan_Salewski
> I hadn't hard about that You may consider reading some of the tutorials maybe? dup() macro was explained in my book with example in section Procedure Parameters of Var Type

Dual behavior

2020-10-08 Thread archnim
Thank you. I hadn't hard about that macro. Very useful !

Dual behavior

2020-10-08 Thread doofenstein
usually one would name the inplace variant with a verb in infinitive (e.g. sort or draw) and the copying variant with the past participle (e.g. sorted or drawn). Though to minimise duplicated code there's the [dup macro in sugar](https://nim-lang.org/docs/sugar.html#dup.m%2CT%2Cvarargs%5Buntyped

Dual behavior

2020-10-08 Thread archnim
Maybe by changing the case: func toDouble(num: SomeNumber) = x * 2 proc ToDouble(num: var SomeNumber) x *= 2 Run

Dual behavior

2020-10-08 Thread archnim
Why wouldn't we imagine a conventional manner to differenciate the var version of a proc from its let one ?

Dual behavior

2020-10-08 Thread archnim
Ok. Thanks to all of you.

App crashes on Rpi4 works normal on desktop

2020-10-08 Thread kodkuce
**UPDATE 2** Running on plane http did not help still get this file descriptor error

Dual behavior

2020-10-08 Thread Araq
Even if there is a way to make this work in the way you want it to work, it's completely unidiomatic Nim code and thus bad design. In Nim a dot call doesn't indicate mutation.

Dual behavior

2020-10-08 Thread shirleyquirk
Can you share a code snippet showing where this happens?

Multiline conditions

2020-10-08 Thread michy
Or even if a == "A" and b == "B" : echo "aaaHuzzah!" Run

App crashes on Rpi4 works normal on desktop

2020-10-08 Thread kodkuce
**UPDATE** When run whiteout Nginx to proxy pass to app it does not crash, so hmm now need to figure out if it crashes cuz Nginx or SSL next run with nginx but no SSL on

Dual behavior

2020-10-08 Thread kodkuce
form what i know and i am uber newb, calling proc something.call() is same as call( something ) , i dont think you can do that whiteout some marcro magic or something similar, ofc its possible i am wrong :)

App crashes on Rpi4 works normal on desktop

2020-10-08 Thread kodkuce
Ok i am fighting for 2 days with this, first i tough i broken some code but from what i see i did not, i tested created relatively minimal example, so when i run it on my pc it works no problem but when run on arm64 raspbery pi4 thats proxypassed to by nginx it crashes, posting code and error

Help me to configure (neo)vim, please

2020-10-08 Thread jseb
So, as i was writing before, if there is a nims (nim script) with the same name of a source file (for building it), Ale stops working. I can edit and lint sources with other names. So what can i do, except editing only files with different names ? Using Makefiles maybe ? At startup of nvim, i h

Dual behavior

2020-10-08 Thread archnim
Hello world. I have a proc, called `todouble`. I want that: When I call it like this: `todouble mynumber` or `todouble(mynumber)`, it behaves like: `func todouble(num: SomeNumber) = num * 2`. When I call it like this: `mynumber.todouble`, it behaves like: `proc todouble(num: var SomeNumber) = nu

Help me to configure (neo)vim, please

2020-10-08 Thread jseb
Great, i've done that too. That avoids me to launch my shortcut for «open all folders».

Nim - plugin for IntelliJ IDEs | JetBrains

2020-10-08 Thread cantanima
> I assume you're talking about Jetbrains IDEs here? I've used or seen a few IDEs, and IntelliJ's Idea feels perfectly competent on every machine I've used, including a rather old Gateway where Android Studio runs slow as molasses, when it runs at all. I've often wondered how Google could take

Help me to configure (neo)vim, please

2020-10-08 Thread Clonk
> alaviss/nim colorizes and indents ok, searching of definitions (with gd > shortcut) works too. And all my proc are folded by default at startup (i > think its alaviss default behaviour ?) Personnaly, I added `setlocal foldlevel 99` to $HOME/.config/nvim/plugged/nim.nvim/ftplugin/nim.vim right

Nim - plugin for IntelliJ IDEs | JetBrains

2020-10-08 Thread matthias
> Yuck, yet another bloated fat monstrosity. There's a joke to be had here... :D I assume you're talking about Jetbrains IDEs here? It's not really clear. Regardless, not the place for the endless IDE vs editor debate. Millions of developers use Jetbrains products. They now have some support fo

Differentiate between system and user modules

2020-10-08 Thread cblake
Also worth mentioning is that you can import dirA/strutils as myStrut, std/strutils as stdStrut Run and then use symbols from either in the same client module. (You could naturally not use "as" on one of them and let it default to "strutils"..I did both for symmetry.

Help me to configure (neo)vim, please

2020-10-08 Thread jseb
Thank you, i have followed the tutorial, and i have now a working Ale ! The only thing left not working is asyncomplete, i leave it for later, that's not annoying (C-p is still working, so…)

Any attempts at implementing filestream and std lib friends on NodeJs?

2020-10-08 Thread Araq
Please read for the pros and cons. Unfortunately this is not yet an RFC. And I think we all agree that supporting a new target should be justified in an RFC.

Differentiate between system and user modules

2020-10-08 Thread mratsim
stdlib modules are namespaced with `std/strutils` but it's not enforced (yet?) For user modules though, I guess you have to look at issues related to nim-random

Differentiate between system and user modules

2020-10-08 Thread ElAfalw
Let's say that I'm desperate to have a user module called `strutils` for example. Am I allowed to do that? And if so, how do I differentiate between the two modules when importing them for example?

Any attempts at implementing filestream and std lib friends on NodeJs?

2020-10-08 Thread saem
Just wondering if anyone made any headway in this area or has stumbled upon some work that I might be able to reuse? I've been searching for any work that provides equivalent APIs for IO and all that fun stuff, so far no luck. I've found a few github issues and rejected pull requests that are s