xmlparser: read XML-File changes Attribute-Value

2024-02-06 Thread Araq
Good point.

xmlparser: read XML-File changes Attribute-Value

2024-02-06 Thread Kemifl
I don't think it does. According to the spec an attribute value is CDATA by default, which means all internal white space should be normalized to a single space character, not removed. `xmllint` preserves both spaces: $ echo 'my inner text' >test.xml $ xmllint test.xml

ANSI Escape Sequences

2024-02-06 Thread PMunch
You might be interested in my library termstyle. It was created to make colouring super easy.

Tooling update: new version of the nimlangserver and the vscode extension

2024-02-06 Thread giaco
upgraded but same problem as before. For example I have project with 2 targets: JS frontend (karax) and C backend, using this `.vscode/settings.json` { "nim.project": [ "src/back/back.nim", "src/front/front.nim" ], } Run When

How do I get the process ID of the current program?

2024-02-06 Thread ggibson
That looks involved. Just dropping this here because the thread got revived without mentioning this.

Tooling update: new version of the nimlangserver and the vscode extension

2024-02-06 Thread giaco
Thanks to all the devs and sponsors behind this effort I've been a pro on triggering this so far `fixed issues with remaining nimsuggest and nimlangserver processes after improper shutdown from the LSP client` Hope this release will stop my process killing spree

Unreachable code is reached

2024-02-06 Thread Yardanico
It's probably a bug in the debugger or the mapping from Nim lines to C, can you try adding an echo after a return and see if it prints anything? I don't think the code after the return would execute.

Unreachable code is reached

2024-02-06 Thread xigoi
You said that the value of `gid` is `{val:0, has:false}`, but in your code, `gid` is already unwrapped. Does that mean `obj.gid` is an `Option` containing another `Option`?

LLdb: Is there an .lldbinit file available for Nim's own types?

2024-02-06 Thread ninovanhooff
Great, thanks for thinking outside the box and providing a solution to problem rather than my original question. Perhaps the official extension needs to be promoted more, it seems suspicious, with only 700 downloads. I was using another extension for that reason. I gave it 5 stars, hope it help

LLdb: Is there an .lldbinit file available for Nim's own types?

2024-02-06 Thread jmgomez
I mean the nim-lang.org extension

Unreachable code is reached

2024-02-06 Thread ninovanhooff
I feel I fundamentally don't understand something about Nim, or that the code in my editor is not actually the code that is executed. What I'm trying to achieve is an "early return pattern", where a proc exits if some precondition is not met. In this case the Option value `gid` should be presen

ANSI Escape Sequences

2024-02-06 Thread xioren
Yes I use the terminal library a lot but as far as I know it doesn't provide fine grained control for just (efficiently) colorizing a portion of a string.

ANSI Escape Sequences

2024-02-06 Thread Araq
Well it says "octal escape sequences", it doesn't say anything about ANSI escape sequences. Also, `terminal.nim` is part of the stdlib, you don't need to mess with them yourself and as a bonus your program will work on Windows too.

LLdb: Is there an .lldbinit file available for Nim's own types?

2024-02-06 Thread ninovanhooff
Hmm nimlldb.py does not seem to work for me in 1.6.16. It has a bool IS_NIM_V2. I tried both False and True for it. It would either format a string as an empty string or an array of chars. I do use the CodeLLDB extension, not sure if you meant that one @jmgomez. I hadn't noticed any effect of a

ANSI Escape Sequences

2024-02-06 Thread jtv
Agreed, it's a confusing message.

ANSI Escape Sequences

2024-02-06 Thread xioren
Gotcha. For what it's worth a message stating they are unsupported might be preferable over one stating they don't exist.

ANSI Escape Sequences

2024-02-06 Thread jtv
The longer answer is that Nim is just passing through bytes; the terminal driver deals w/ Ansi escape codes. `\e` and `\x1b` are valid ways to get the control byte in Nim, but it doesn't accept escape sequences in octal, per the error message.

ANSI Escape Sequences

2024-02-06 Thread xioren
Note: if I use hexadecimal "x1B" it does work.

ANSI Escape Sequences

2024-02-06 Thread xioren
Is there something special I need to do do use ANSI codes in Nim? This works in Python "\033[32mtesting\033[00m" but in Nim "![32mtesting![00m" gets written to stdout instead. I assume it has to do with the compiler warning "Warning: octal escape sequences do not exist; leading zero is ignored [

ANSI Escape Sequences

2024-02-06 Thread jtv
Use `\e` instead of `\033`

Tooling update: new version of the nimlangserver and the vscode extension

2024-02-06 Thread rockcavera
Congrats on the release. Now I can abandon Konstantin Zaitsev's vscode extension, because after this round of improvements to the official extension, it works perfectly even when opening a random .nim file, without the need to open a folder.

Tooling update: new version of the nimlangserver and the vscode extension

2024-02-06 Thread jmgomez
CodeLLDB is the recommended one. Probably we will end up making it a dependency of our extension. Notice there is an option to define the default target (`lldb`) called `nim.debug.type` so you can use another extension if you want. type of debugger to use when using Nim: Debug sele

Tooling update: new version of the nimlangserver and the vscode extension

2024-02-06 Thread didlybom
When I try to use the debug the current nim file command it tells me that I need to install an LLDB extension first. Is there one that is recommended? I see one called "LLDB VScode" and another called "CodeLLDB"...

LLdb: Is there an .lldbinit file available for Nim's own types?

2024-02-06 Thread jmgomez
If you use the vscode extension, it now ships with one that automatically gets hooked only for strings so far but we plan to use the `nimlldb.py` in following versions

Tooling update: new version of the nimlangserver and the vscode extension

2024-02-06 Thread jmgomez
We are pleased to share that a new version of the nimlangserver and the nim-lang.org vscode extension have been released. The focus of the releases have been bug fixing and making a foundation to build upon. We are quite excited about resuming the work on the vscode-extension and there are a f

Essential Keto Gummies Australia

2024-02-06 Thread BenjamSwartz
> ✔️ Where to Get Bottle Online : > Essential Keto Gummies Australia: Magnesium plays a function in over 300 metabolic procedures within our body. The blessings of magnesium supplementation include proper neuron and muscle function, a he

LLdb: Is there an .lldbinit file available for Nim's own types?

2024-02-06 Thread ninovanhooff
Thank you! I'm using Nim 1.6.16 and I see that script is only available since Nim 2. But I'll try to see if it works anyway. If there is a specific version for Nim 1.6 I haven't found yet, please let me know

How do I get the process ID of the current program?

2024-02-06 Thread Schelz
This is how I managed to get current process id: import winim proc vGetCurrentProcID*(): int32 = var hwnd: HWND = GetForegroundWindow() pid: int32 GetWindowThreadProcessId(hwnd, pid.addr) return pid Run

`nph` opinionated formatter v0.4

2024-02-06 Thread xigoi
Thank you! The syntax is getting close to porfection.

LLdb: Is there an .lldbinit file available for Nim's own types?

2024-02-06 Thread amadan
There is this python script that is included which iirc sets up pretty printers for most types Sadly I've never used lldb so don't know how to use it

Template default parameters question

2024-02-06 Thread PMunch
You could of course write a macro like this which simply makes the last argument explicitly be the actions argument: let Chrome = "Chrome" template webSessionImpl*( sessionInfo: untyped, baseURL: string, browser = Chrome, headless = true, action