Ideas for useful/cute little GUI programs?

2022-08-23 Thread elcritch
Thanks! I’d like to get it supporting the rest like switching versions and showing the current. Yah Fidgetty just builds on Fidget and doesn’t have any support for icons. Though I wanted to pull in one of the existing icons libraries if possible song with native file dialogs. > btw please don'

Recursively replace pair of bytes with one byte, within given byte array

2022-08-23 Thread shirleyquirk
please tell me if my assumptions are off, but your functions aren't quite working the way you say they should. type ByteArray = seq[byte] OpChar = byte Byte = byte let input = "ABCDEFGBF".mapIt(it.byte) output = input.substitute2to1r('A'.byte,'B

NimForum 2.2.0 - Fixes a big CVE!

2022-08-23 Thread nya
I read many topics and often meet render error instead of first post (not always, sometimes it happens with single posts). Can you fix it? JSON request reply doesn't contains source rst post for read it as workaround (maybe there are other requests exists like edit, I don't look forum source co

Why is nimscript interpreted and why the limitations?

2022-08-23 Thread Demos
So theoretically nimscript could be a JIT, which would be pretty cool tbh, I think there's some work in the llvm backend to do that using LLVM's JIT infrastructure. Compiling to a separate program and executing, or a dll then loading the dll is possible, it's what rust does. This has some probl

Recursively replace pair of bytes with one byte, within given byte array

2022-08-23 Thread xigoi
Memoization helped with the AoC problem because it was applying the same transformation several times to the same string. It doesn't look like that's the case here.

Recursively replace pair of bytes with one byte, within given byte array

2022-08-23 Thread auxym
This reminds of an AOC problem for last year: IIRC the trick for that one might have been memoization/dynamic programming. You could try that? You can find a bunch of hints and discussion on reddit: [https://www.reddit.com/r/adventofcode/search/?q=2021%20d

Recursively replace pair of bytes with one byte, within given byte array

2022-08-23 Thread drkameleon
So... what I'm trying to do is pretty much this: we have a `seq[byte]` and given two consecutive byte values, we have to replace them with one. Like: A B C D E F G A B F (replace A B with W) W C D E F G W F Run I've been experimenting with different algorithm

Nim cross-compiled in OpenEmbedded

2022-08-23 Thread pp
Cool man!

Nim cross-compiled in OpenEmbedded

2022-08-23 Thread PMunch
Ooh, this would be very nice for cross-compiling Nim for my Raspberry Pi!

Nim cross-compiled in OpenEmbedded

2022-08-23 Thread BarryK
I am posting about cross-compiling the nim source package, not nim applications. There is a build recipe on github, but it is a couple of years old, and didn't work for me. Also, it was incomplete: I fixed the recipe, and now have cross-compiled nim, koch,

precompiled header in Nim

2022-08-23 Thread chaemon
I want to import big library which is compiled beforehand and enable to import short time. For example, I want to compile the following code many times and want the compile time as short as possible. import chaemon_header # this is very large but not change for each compilication,

Issues when creating static library on macOS

2022-08-23 Thread enthus1ast
Then it would be interesting to see what changed between the versions, but I do not really code on macos others might know

Ideas for useful/cute little GUI programs?

2022-08-23 Thread dom96
Wow, nice! I was actually thinking of something much simpler. Just a classic Windows setup wizard which: * Downloads choosenim * Runs `choosenim.exe stable --firstInstall` * Adds ~/.nimble/bin to PATH (Which to be fair, is probably best implemented using native Windows widgets) But your

Issues when creating static library on macOS

2022-08-23 Thread vitaliy
Thanks for reply @enthus1ast! I've got the most recent one (Xcode 13.2.1) for my OS version (Big Sur). Cannot upgrade further, as my hardware is not supported on macOS 12+.

Ideas for useful/cute little GUI programs?

2022-08-23 Thread Vindaar
Well, the pixie PR has been merged by now. I still have to go in and fix a few things to actually make it work. :/

Ideas for useful/cute little GUI programs?

2022-08-23 Thread elcritch
@dom96 How about something like this? It's a first hack and just calls choosenim. It'd actually be easier to use the choosenim libs directly. The entire app is only 1.3MB! Doing the color theme actually brought out a few things in the theming that needs fixing up. You can see the source here [

Tuple unpacking for an array rvalue?

2022-08-23 Thread Hlaaftana
There are multiple unpacking/pattern matching libraries now with more functionality. See and and unlisted ones like

Issues when creating static library on macOS

2022-08-23 Thread enthus1ast
I would first try to update xcode's toolchain

First program does not compile and is hard to debug

2022-08-23 Thread Clonk
> const g_var: g_Func = g_wrapper(h_var) This line is the problem most likely. You need to use `let` instead of `const` (const is for compile time variable; let is for run time immutable variable). So it become : `let g_var: g_Func = g_wrapper(h_var)` The error you encounter is a codegen error

First program does not compile and is hard to debug

2022-08-23 Thread sotolf
You have done one single small program and already decided it's hard to debug? I've been using it for over a year now, and I don't find it any harder to debug than other programming languages, what kind of problems especially did you encounter, what kind of error messages can be made better, the