A strange behavior in seq

2024-04-12 Thread Araq
Use `os.walkDir` and an idea like: import std / [os, sets, sequtils] proc fileExt(dir: string; res: var Hashset[string]) = for k, f in walkDir(dir): if k == pcFile: res.incl splitFile(f).ext elif k == pcDir: fileExt(f, res) proc fileExt(dir: str

How to migrate from Discourse to Nim Forum?

2024-04-12 Thread Araq
There is no support for it. You need to write a program that does the import, sorry.

A strange behavior in seq

2024-04-12 Thread Tina
I created a mini-program to retrieve file extensions within the current directory. However, when I intended to chain-call the apply function in a sequence, I discovered that constructing a var T from a given T was not possible. Consequently, I wrote a conversion function, as shown below:

Is it possible to encode constraints directly into a type, and enforce them at runtime?

2024-04-12 Thread planetis
Hey @Araq would you please share your implementation? I want to have some form of validation implemented with my library but I am not sure if it should be schema or JSON type definitions.

iup gui: Load jpeg

2024-04-12 Thread namisboss
Random shot in the dark, is this an endianness issue? I know that Windows and Linux disagree.

iup gui: Load jpeg

2024-04-12 Thread beckx
Hey folks, i want to show a jpg image on a button in my gui. I use "IUP Gui" with these bindings: If i load the jpeg on windows - everythings fine and works. Under my 3 Archlinux System i get these error and the jpeg is not shown: 123.jpg: Not a

How to migrate from Discourse to Nim Forum?

2024-04-12 Thread impras
Hi. I was previously managing a discourse server as a discussion forum for one of the non-profit organization. Discourse was heavy and resource intensive. Hence, I was looking for a light weight alternative. Since the day I discovered Nim lang and Nim forum, I wanted to try it out as a replaceme

FFI - memory management issues

2024-04-12 Thread Araq
> Don't forget to set your handle to nil after freeing it to avoid double frees! That is not the best practice anymore and cannot even be done in a non-var-T destructor. ;-) The compiler does the set-to-nil for you, or rather the system was designed for it to not be necessary as the destructor d

Sublime Text user experience

2024-04-12 Thread dxb
"pre_debug_task" was hanging because "shell_cmd" expects a string and I was passing an array of strings instead. It was easy to find out what was wrong with this task once I figured 'Debugger->Run Task' does report errors on the console. Running the same task as part of starting a debug session

FFI - memory management issues

2024-04-12 Thread vanyle
You can use `move(obj)` to force a move.

FFI - memory management issues

2024-04-12 Thread mantielero
I did: proc `+`*(clip1:sink VSMapObj, clip2:sink VSMapObj):VSMapObj = Run without success: /home/jose/src/nimlang/vs.nim/tests/ex06_adding.nim(6, 11) Error: '=dup' is not available for type , which is inferred from unavailable '=copy'; requires a copy be

Sum types, 2024 variant

2024-04-12 Thread TKD
Hi Araq I know you must have but would you consider borrowing the design of F#'s discriminated unions. I think it has the most comforting and user-friendly design and Nim syntax should be able to reproduce it with its own particular finish.

FFI - memory management issues

2024-04-12 Thread vanyle
Don't forget to set your `handle` to `nil` after freeing it to avoid double frees!

How To Earn $1,000,000 Using Guardian Blood Balance Australia

2024-04-12 Thread WilburWeisser
➲Item Name — Guardian Blood Balance Australia ➲ Primary Advantages — Further develop Well being And Help In Relief from discomfort ➲Benefits:Regulates blood sugar stages, Enhances metabolic rate, Provides herbal weight reduction, Supports heart and mind fitness ➲ Sythesis — Regular Natural Compo

Help with macro/template extrapolating of parameters

2024-04-12 Thread DMisener
Thanks @Vindaar and @jyapayne... I can't keep up! 🙂 I was still mapping @Vindaars suggestion into a more general **Lazy** template and @jyapayne anticipated my desire to reduce the redundant boilerplate even further! I will try to add his latest refinements to what I currently have.

The Organic Difference: Why Earth Essence CBD GummiesStand Out in the Market

2024-04-12 Thread PatrickANagel
╰┈➤ OFFICAL WEBSITE:- Earth Essence CBD Gummies:- There are no bad wellbeing influences from consuming Nursery Unadulterated Earth Essence Earth Essence

Sublime Text user experience

2024-04-12 Thread dxb
Adding `"console": "internalConsole"` fixes debugging: { "folders": [ ], "debugger_configurations": [ { "type": "lldb", "request": "launch",