Nimpretty GitHub Action

2020-12-03 Thread Niminem
This is badass dude

Nimbus -> Ethereum 2 launch is imminent 12PM UTC.

2020-12-03 Thread elcritch
Is there somewhere to see/show server stats for the Nim nodes? I imagine there's security implications, but having a status page showing some sanitized stats would be awesome. Something like: "running XYZ GFLOPs/Packets/EthBlocks of Nim based Ethereum2 peers" would be an easy way to show off Nim

Nimpretty GitHub Action

2020-12-03 Thread juancarlospaco
Updated Nimpretty GitHub Action: * New option to prettify multiple folders. * More documentation and examples. * Fixes and better Logs.

Meta: Can't change category of a thread after creating it

2020-12-03 Thread dom96
Please report these things here: IIRC this was already fixed, just not deployed yet.

Advent of Nim 2020 megathread

2020-12-03 Thread digitalcraftsman
Here's my GitHub [repository](https://github.com/digitalcraftsman/advent-of-code-2020) for AoC 2020. Sometimes you find some small but useful utility function in the standard library that you've never used before. For those who don't know Nim's std lib in and out I often search [the index](htt

Meta: Can't change category of a thread after creating it

2020-12-03 Thread Araq
Maybe, I dunno, I can edit everything. :P What do you want me to change for you?

BinGod new framework for serializing binary files

2020-12-03 Thread b3liever
**Repo** : Well after making [eminim](https://github.com/planetis-m/eminim) JSON serializer, I just had to, it was so much easier with the experience gained :) ** Usage** import std/streams, bingod type Foo = ref object

Macros that compose (and work well with auto-completion tooling)

2020-12-03 Thread Araq
Some ideas how to evolve Nim's macro system further:

Package level scope

2020-12-03 Thread Araq
And even if it does cause a bug every second full moon, you have to weight that against the constant development friction -- "should I use package level visibility? protected? private?" added on top of the other choices you have to make -- "which type to use for this? how to name this field?" an

Package level scope

2020-12-03 Thread Araq
The Mac OS and Windows APIs are not written in Nim and offer an ABI, not just an API. And the undocumented APIs were used because there were no other better alternatives provided... There is no proof whatsoever that a comment like "for internal use only, use public API X instead" doesn't suffic

Help with Gui programming in for a beginner

2020-12-03 Thread juancarlospaco
Look at Krita, awesome app and uses Qt, not everything is garbage :|

Package level scope

2020-12-03 Thread snej
> Bugs don't arise from visibility violations. Bugs arise from package clients using internal APIs that were not intended to be public but had to be exported to get around this language limitation, because * The API only works in the limited way it's used inside the package and blows up for o

Help with Gui programming in for a beginner

2020-12-03 Thread snej
To help yourself decide, take a look at apps written with various frameworks (screenshots or preferably live) and judge their look and feel. I've done quite a bit of GUI-framework stuff in the past, and I've found that * It's not hard to write a crappy framework for one platform. * It's a lo

Unicode "sortkey" API?

2020-12-03 Thread zetashift
I won't be much use to you but for other readers that may wonder what ICU is: (atleast that was what google gave me)

Meta: Can't change category of a thread after creating it

2020-12-03 Thread snej
If I forget to set the category of a thread while writing the initial post, and then try to change it afterwards, I just get an error "You cannot edit this thread".

Unicode "sortkey" API?

2020-12-03 Thread snej
I'm looking for an implementation of Unicode "sortkeys" as found in ICU. > Sort key generation - used when a very large set of strings are > compared/sorted repeatedly: APIs return a zero-terminated array of bytes per > string known as a sort key. The keys can be compared directly using strcmp o

Need help for db_postgres usage

2020-12-03 Thread geohuz
Don't use "db.exec" upon select. use "db.getAllRows" instead

Help with Gui programming in for a beginner

2020-12-03 Thread enthus1ast
is in "production"

Need help for db_postgres usage

2020-12-03 Thread geohuz
I'm getting: 'could not receive data from client: Connection reset by peer' on server side. At nim side I get this: Exception message: Exception type: [DbError] The code tried to receive message from web_socket server and insert into postgresql: await ws.send($wslogin_data)

Package level scope

2020-12-03 Thread jlindsay
Okay, thank you for confirming my suspicions.

Package level scope

2020-12-03 Thread Araq
There is no fine grained visibility control in Nim. (Because I found it a constant distraction in Java and C#. Bugs don't arise from visibility violations.) Typically you export the fields other modules need.

Advent of Nim 2020 megathread

2020-12-03 Thread e
Thanks, @miran \-- it turns out I had two AoC accounts, one tied to github and one to reddit. I started this year with the "wrong one." So, I restarted with the other account and now see the private leaderboard. Thanks!

Writing a string into a source file compile time

2020-12-03 Thread mronetwo
and @pietroppeter exactly what I needed. Thank you so much.

Regex extracting string between two words not working

2020-12-03 Thread pietroppeter
bumping this in case you are still wondering after 1 year... the answer is that using seq does not work in `re.match` and you have to know beforehand the exact length of the matches array. This is an acknowledge bug (which `nre` does not have): (see

Writing a string into a source file compile time

2020-12-03 Thread pietroppeter
you can use [compile-time define pragmas](https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas) something like: const myFilename {.strdefine.} = "firmware.elf" # default value firmwareFile = staticRead(myFilename)

Writing a string into a source file compile time

2020-12-03 Thread doofenstein
you can use a [strdefine](https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas): const FirmwarePath {.strdefine.} = "defaultPath.elf" const FirmwareData = staticRead FirmwarePath Run then compile with nim c -d:Firmwa

Advent of Nim 2020 megathread

2020-12-03 Thread bunkford
Here is mine:

Writing a string into a source file compile time

2020-12-03 Thread mronetwo
Hello, I'd like to build a binary with a `staticRead` but I'd like to modify the path of the file to be read compile time. I have my config.nims task build_that_binary, "...": let sourceFile = paramStr(paramCount() -1 ) let firmwareFile = paramStr(paramCount()) #

Advent of Nim 2020 megathread

2020-12-03 Thread hyl
Right, everyone gets just one private leaderboard of their own, but you can join as many as you want (as far as I understand it). Here is mine: 681448-60235f8f Please only join if you are doing Advent of Code 2020 and the first language you use to solve each day is nim. Honor system because I d

Package level scope

2020-12-03 Thread jlindsay
I know that appending '*' to a proc or field name gives the proc/field a public level scope and not having it will make the scope module level (i.e. private). Is there a means to make something a package level scope, something like Java's protected? If not, how do people commonly work around the

Is there any nim based 2d collision detection lib?

2020-12-03 Thread geohuz
Thank you @treeform, I'm going to give it a try!

Advent of Nim 2020 megathread

2020-12-03 Thread jackhftang
Here is mine:

Advent of Nim 2020 megathread

2020-12-03 Thread pietroppeter
Thanks for volunteering! I’d say you could go ahead and create the 2020 specific leaderboard and post the code here. I will join it and hopefully the other people currently doing advent of code in Nim this year can join too (there is no limit to how many private leaderboards you are into as far

Advent of Nim 2020 megathread

2020-12-03 Thread lscrd
My solutions are here: Please note that I always publish them with some delay.

Advent of Nim 2020 megathread

2020-12-03 Thread reyqn
I made one too Not sure how good is my nim though but so for I'm loving the language!

Advent of Nim 2020 megathread

2020-12-03 Thread enthus1ast
Here is mine happy hacking