import from url

2022-02-24 Thread r3c
> i just answered the question :))) It's ok, I chuckled how you answered it > strait, although i admit my question was little bit<> grammatically > incorrect <>

Calling nim-server-code from javascript

2022-02-24 Thread r3c
> I know you can compile to javascript but it seems simpler to pipe > procedure-calls thru the cookie-system from the client-side to the server-side That's odd... Just use fetch to call the endpoint in Nim, you'll need basic routing to target your endpoints

Having a Problem w WinRegistry while try to Read subkeys of HKEY_LOCAL_MACHINE

2022-02-24 Thread enthus1ast
please format your code correctly.

Having a Problem w WinRegistry while try to Read subkeys of HKEY_LOCAL_MACHINE

2022-02-24 Thread blabla
I believe Registry Redirection causes this error. When i try to Read subkey of HKEY_LOCAL_MACHINE h1 = open(HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", samRead) #it will actually opens HKEY_LOCAL_MACHINESOFTWAREMicrosoft\WOW6432Node\Windows\CurrentVersion\Uninstal

Having problem with WinRegistry while reading Subkey of HKEY_LOCAL_MACHINE

2022-02-24 Thread blabla
Hi my friends im trying to build an exe which echo installed applications on computer. This is my code: const HKEY_CLASSES_ROOT*: RegHandle = 0x8000.RegHandle HKEY_CURRENT_USER*: RegHandle = 0x8001.RegHandle HKEY_LOCAL_MACHINE*: RegHandle = 0x8002.RegHandle HKEY_USERS*: RegHand

Having a Problem w WinRegistry while try to Read subkeys of HKEY_LOCAL_MACHINE

2022-02-24 Thread blabla
Hi my friends im trying to build an exe which echo installed applications on computer. This is my code: The part 1 is works fine but, when i add Part 2 im getting an error like "the system cannot find the path specified" [Registryerror] Note:In part 2 I can

Problem with winregistry while read Subkeys

2022-02-24 Thread blabla
Hi my friends im trying to build an exe which echo installed applications on computer. This is my code: import winregistry const HKEY_CLASSES_ROOT*: RegHandle = 0x8000.RegHandle HKEY_CURRENT_USER*: RegHandle = 0x8001.RegHandle HKEY_LOCAL_MACHINE*: RegHandle = 0x8002.RegHandle

Knowledge on the failure in overloaded operator of two operands infix ?

2022-02-24 Thread Araq
Use `std/with`.

Knowledge on the failure in overloaded operator of two operands infix ?

2022-02-24 Thread sls1005
But it's ``.=`(a, b, c)`. Is ``.=`(a, b)` also special?

Knowledge on the failure in overloaded operator of two operands infix ?

2022-02-24 Thread PMunch
Yes, but the `.=` operator has a different meaning than just a normal operator. When you enable that experimental it will match [https://nim-lang.org/docs/manual_experimental.html#special-operators-operator-nimdoteq](https://forum.nim-lang.org/assignment to missing fields).

Knowledge on the failure in overloaded operator of two operands infix ?

2022-02-24 Thread sls1005
Dot operators are available via `{.experimental.}`. {.experimental: "dotOperators".} macro `.=`(s: string, call: untyped): untyped = discard Run

Knowledge on the failure in overloaded operator of two operands infix ?

2022-02-24 Thread PMunch
The fact that it crashes seems to be a compiler bug. But you're not going to be able to do it this way for a couple of reasons: 1. `.=` is a dot-operator which has a special meaning in Nim 2. That template won't match what you're doing, `replace(re"\w+", "masked")` isn't a proc with two argu

Knowledge on the failure in overloaded operator of two operands infix ?

2022-02-24 Thread mardiyah
How to have Nim overloaded operator i.e. two operands infix operator ? e.g ` s .= function()` to mean `s = s.function()` on: std/nre template `.=`( a :string; b :proc( m :untyped, n:untyped) ) = var a :string = a.b var s="hello world !" s .= r

Must check to decide whether this current iteration in a loop is the last

2022-02-24 Thread adrianv
if you really need the last item of an iteration, you could do something like this: template lastItem(last: untyped, iteration: untyped, body: untyped): bool = var hasLast = false var `last` {.inject.}: typeof(iteration()) for it in iteration(): hasLast = tr

NImScript task and using a shebang line

2022-02-24 Thread sls1005
How about asking Nim to rearrange the arguments and restart itself? #!/usr/bin/nim import std/strutils task mytask, "": echo "Hello, world!" --hints:off if paramCount() > 1: if paramStr(1).endsWith("nims"): exec "nim $1 $2" % [paramStr(2),