proc/func/method: syntax

2023-11-16 Thread moigagoo
This thread is surprisingly long. The idea is just bad on so many levels, it's really weird seeing such a vast discussion grow around it :-)

proc/func/method: syntax

2023-11-16 Thread Araq
Fwiw I sometimes think about this alternative syntax: while a != b do if x == y do echo "yes" else echo "no" mymacro a, b, c do echo "code block passed to macro" else echo "else block also passed to macro" Run But

proc/func/method: syntax

2023-11-16 Thread hyu1996
To be compatible with python, maybe we should change python. 😂

proc/func/method: syntax

2023-11-16 Thread xigoi
If anything, it's unfortunate that `do`-style procedures have to use the arrow syntax because a colon would create syntactic ambiguity.

No =destroy hook(s) in std/tables?

2023-11-16 Thread ElegantBeef
Yes Pmunch was incorrect, when defining a custom destructor you need to destroy all fields. The same issue arises in and my comment to work around the issue applies here as well.

browser automation recommendation?

2023-11-16 Thread juancarlospaco
I think the hard part is making the webdriver itself run properly, then its basically like an HTTP API, even a curl would do.

browser automation recommendation?

2023-11-16 Thread mszs
I'm still very new to Nim and currently have some tedious tasks on a web page (Moodle) that I'd like to automate. This would be an opportunity to learn some basic Nim. So, what is currently the most straightforward way to do browser automation? I've seen a few on GitHub including

browser automation recommendation?

2023-11-16 Thread Isofruit
It is what runs the test-suite of the nim-forum. I can confirm it works in the limited capacity that I contributed to the nim-forum when I ported it to 2.0

No =destroy hook(s) in std/tables?

2023-11-16 Thread lou15b
Thanks for your quick response. > The table, once it is no longer referenced by anything, will destroy itself > and call the destructors for all the elements in it. Unfortunately the example below disagrees: import tables type AObj = object name: string pr

https://www.facebook.com/GuardianBloodBalanceAus

2023-11-16 Thread Hollyojacobs
Official Website@:- Guardian Blood Balance Australia:- Several factors must be addressed in order to maintain health and well-being. The Guardian Blood Balance Australia supplement is one such product that is available on the market. Offici

No =destroy hook(s) in std/tables?

2023-11-16 Thread PMunch
You don't. The table, once it is no longer referenced by anything, will destroy itself and call the destructors for all the elements in it. So in this case you don't need to write a `=destroy` hook at all for `AObj`.

No =destroy hook(s) in std/tables?

2023-11-16 Thread lou15b
I haven't seen this mentioned in the github issues or in the googleverse, so I assume that it isn't some kind of deficiency. If I have a table that is a field of an object, how do I release the resources being held by that table in the object's destructor? import tables ty

proc/func/method: syntax

2023-11-16 Thread rel
See my post obove ... it's now clear.

proc/func/method: syntax

2023-11-16 Thread 4n0n4me
Nim is now 2.0.0. And communities have been loving 'opinionated' softwares for a long time: for example, Black the python formatter, and Rails. I think most people won't accept the possibility of this change, for it not only breaks the Nim way, but also breaks all written code.

proc/func/method: syntax

2023-11-16 Thread bvld
The debate between readable and non-readable code is subjective, but breaking existing code is not. Despite my 10 years of experience in writing Python code, I personally find Nim's procedure syntax more visually appealing than Python's use of type hints within function definitions. I believe th

proc/func/method: syntax

2023-11-16 Thread nrk
I'm so sorry. #[ """ # ]# import macros type None = void str = string macro def(d, b: untyped) = let n = d[1][0] var params: seq[NimNode] var defb: seq[NimNode] params.add(d[^1]) for x in d[1][1..^1]: if x

proc/func/method: syntax

2023-11-16 Thread alexeypetrushin
No, the arrow is inconsistent and looks ugly, the way it is now is better.

Printout all used functions in a module at built time

2023-11-16 Thread hunterbr
Thx Araq, how would the latter work ? Could you provide a pseudo code example which gives me a starting point?

proc/func/method: syntax

2023-11-16 Thread rel
Good explenation.