LSP in Emacs and VSCode not working properly

2024-08-03 Thread foxoman
Did you tried Offical Nim Langserver ?

how to loop over a Type's field names

2024-07-22 Thread foxoman
` import typetraits type Person = object name: string age: int city: string var p: Person # Using fieldPairs echo "Using fieldPairs:" for name, value in p.fieldPairs: echo "Field name: ", name echo "Field type: ", value.typeof echo "---" ` Run

Nim zed extension creation help

2024-07-13 Thread foxoman
You can install zed-nim extension manually till being added in the store from here: <https://github.com/foxoman/zed-nim>

Error: cannot open file: x11

2024-06-25 Thread foxoman
in this x11 package, there is no x11.nim file, only x11 as a folder, so you can not call import x11, you will have to import the files inside that folder like: import x11/xlib, x11/xutil, x11/x, x11/xft, x11/xrender

Which IDE to use in 2024?

2024-05-23 Thread foxoman
Nim VSCode Extension has been updated recently and it is working great. Nim in vim/nvim: As mentioned above the nim-langserver is great to work with nay decent IDE support lsp.

Windows command injection CVE - Nim affected too

2024-04-11 Thread foxoman
If I know any nim app being installed in any Windows server or desktop which run internal shell by accepting a user input like `875" &whoami` or severe like `%CMDCMDLINE:~-1%&calc.exe` then I can run any command in that device. >From Haskell could be a better explanation and how they fix it:

Windows command injection CVE - Nim affected too

2024-04-11 Thread foxoman
It is okay I do not mind it, my editor is a paid one who automatically writes and suggests live I did not care to stop it.

Windows command injection CVE - Nim affected too

2024-04-11 Thread foxoman
s://github.com/foxoman/CVE-2024-24576-PoC---Nim/tree/main> * <https://nvd.nist.gov/vuln/detail/CVE-2024-24576>

Challenge: Weak linking on Windows

2024-03-16 Thread foxoman
Not sure of any update about gcc but weak symbols were not supported in mingw in windows: * *

Challenge: Weak linking on Windows

2024-03-16 Thread foxoman
> 1- __declspec(selectany), which directs the linker to select just one (any > one) of multiple definitions for the symbol and discard the rest. MS > explicitly state this as a quasi-answer for not exposing weak references to > the programmer, but as a commenter notes this is not satisfying – on

Page allocation for a custom OS

2024-02-04 Thread foxoman
As Araq said it should be "stdlib" This was for me a learning point on how to use patchFile :

GUI app with nim

2023-07-03 Thread foxoman
`Nobody told about ImGui experience. Does it work in practice with Nim?` * This Dev created a very good templates and demos on using imgui with nim * *

neovim lsp setup: no autocompletion and suggestion

2023-06-16 Thread foxoman
What your are looking for is the tab completion, try any nvim plugin to connect the lsp with it an example of using nim is here:

question

2023-05-04 Thread foxoman
This worked for me import os, unicode proc crossOut(text: string): string = var crossedOut = newStringOfCap(text.len * 2) for rune in text.runes: crossedOut.add(rune) crossedOut.add("\u0336") return crossedOut let inputText = "

Nim v2.0.0 RC2 is out

2023-04-04 Thread foxoman
* `nimble install db_connector` nimble install db_connector Downloading https://github.com/nim-lang/db_connector using git Warning: The package has no tagged releases, downloading HEAD instead. Verifying dependencies for

How to get exe name from pid under Windows

2023-03-22 Thread foxoman
Uncle chatGPT answered me with this: import os, strutils, sequtils import winim # This procedure gets the executable name from a process ID (PID) on a Windows system. proc getExeNameFromPid(pid: DWORD): string = # Define the required access rights for the OpenP

Slicing a string of characters from a starting point until all is selected.

2023-03-16 Thread foxoman
To Translate your python code to nim using the string slice: import os let myString = "filesizec:\\users\\nate\\desktop\\thepark.jpg" let newString = myString[8..^1] echo newString let fileSize = getFileSize(newString) echo "The file's size is:

Compile error “no socket”

2023-03-07 Thread foxoman
* *

what's with deepCopy?

2023-02-05 Thread foxoman
>From Nim 1.4 release blog post: Known incompatibilities and gotchas Deepcopy If you use system.deepCopy in your code, you need to enable it via --deepCopy:on on the command line. This is a band-aid and a better solution for this will arrive in the future. The reason for this opt-in switch is t

What Nim version introduces "except CatchableError" ?

2023-01-01 Thread foxoman
It was added to nim version 2 >From the changelog fo v2: * If no exception or any exception deriving from Exception but not Defect or CatchableError given in except, a `warnBareExcept` warning will be triggered. So: when NimVersi

problems with gcc.exe and gcc.linkexe

2022-11-15 Thread foxoman
looks like one lib your app depend on is linked with glibc dynamic and it was not built with musl statically as you wanted. (Maybe libnss ) as suggested in different occasion with same error. Not sure which linux you are using but i will suggest using a fully musl built linux distro like alpine

How do I run Nim procedures on iOS?

2022-10-16 Thread foxoman
here is a demo on running nim as ios app

Fidget and its alternatives

2022-08-21 Thread foxoman
For fidget third-party update

Fidget and its alternatives

2022-08-21 Thread foxoman
Try this for imGui

Mastering Nim: A complete guide to the programming language

2022-07-18 Thread foxoman
Received with love

Mastering Nim: A complete guide to the programming language

2022-06-28 Thread foxoman
I order the book and will be waiting for delivery :) thank you Araq and all conftrib. for creating and maintaining nim

Fidgets!

2022-05-04 Thread foxoman
Great effort, I would suggest the nim maintainers to take this as official UI lib and support eh developers and the original dev also who set the the core libs to make this happen. make it a true cross platform UI library for nim. For theming either you create a new set of theme style that could

Error: execution of an external program failed When using nim c -r --threads:on

2022-05-04 Thread foxoman
Yes had same issue, can not run with threads:on SIGSEGV: Illegal storage access. (Attempt to read from nil?) Error: execution of an external program failed: 'c:\Develp\nimapp\src\nimapp.exe ' undeclared identifier: 'fence' candidates (edit distance, scope distan

Anyone working on a new Nim book or second edition of Nim in Action?

2022-03-02 Thread foxoman
Nim Basics

A better looking Nimble (web, design, feedback, ideas)

2022-02-15 Thread foxoman
wow looks so good, Good job and thank you for making this effort

Experiment with creating a "ImKivy" GUI api

2022-02-13 Thread foxoman
Thank you very much Html5 like ui was my last choice But your project will back me to go imgui again Thank you very much Gkeep the good work

Experiment with creating a "ImKivy" GUI api

2022-02-13 Thread foxoman
This is looks so cool, as i have been experimenting with Nim recently and making a static, easy to use, multiplatform ui looks not yet stable enough with all the port i tried. I liked how fidget api but i did not work well for me due to missing controls. imGui looks good but support they api is