Nim On AVR

2021-11-26 Thread galaxyDragon
I've uploaded [Nim On AVR](https://github.com/dinau/nimOnAVR) on Github page. **Nim On AVR** has some examples to use Arduino Uno/Nano board with Nim language.

Macros: why and/or when to use them?

2021-11-26 Thread xigoi
The conventional rule is: use the least powerful tool that does the job. * If a function works, use a function. * Elif a procedure works, use a procedure. * Elif a template works, use a template. * Elif a macro works, use a macro. * Else, make a problem-specific solution.

Macros: why and/or when to use them?

2021-11-26 Thread mashingan
I remember answering this kind of exact question about a year ago on Nim subreddit [https://www.reddit.com/r/nim/comments/jg83c9/macros_vs_functions/g9pi2v3/?utm_source=reddit&utm_medium=web2x&context=3](https://www.reddit.com/r/nim/comments/jg83c9/macros_vs_functions/g9pi2v3/?utm_source=reddit&u

Macros: why and/or when to use them?

2021-11-26 Thread PMunch
I tend to use meta-programming quite a bit when I write code. The benefit of a macro over a simple procedure is that you can re-write code during compile time. This can be used to create a nicer interface for yourself, reducing errors and increasing readability. I wrote an article about that her

Macros: why and/or when to use them?

2021-11-26 Thread ElegantBeef
Macros and procs are two vastly different tools. A procedure is for writing code that runs(at runtime or compile time). A macro is for writing code that expands code at compile time. Macros enable introspection and automation of writing code. Due to this you can do many magical things with macro

Macros: why and/or when to use them?

2021-11-26 Thread Recruit_main707
I use macros to generate nim code from a .flatbuffers file, protobuffers do a similar thing too.

Macros: why and/or when to use them?

2021-11-26 Thread Yardanico
To add to @rb3's answer and resolve your confusion a bit: > I understand the "rewriting code at runtime" Nim macros operate on compile-time - they rewrite the code by the logic you've written. The resulting program binary doesn't have anything related to macros.

Macros: why and/or when to use them?

2021-11-26 Thread rb3
In Nim, macros aren't really meant to replace functions. They operate on Nim's basic constructs (procedures, types, variables) so programmers can make things less (or more) complicated, depending on the usage. Nim is designed to be a minimal language that can be extended with macros. A good exa

Macros: why and/or when to use them?

2021-11-26 Thread Bonesinger
I've been reading about macros, mainly how they're used in LISP (such as , / and Andy Gavin's explanation of GOOL), but the thing that I can't seem to find on any discussion is

Nim forum statistics

2021-11-26 Thread dom96
Different colours are Monthly Active Users, Weekly Active Users, Daily Active Users (MAU being highest). May spike was due to making front page

Nim forum statistics

2021-11-26 Thread Pumpus
Thanx man. For sake of clarity: What's on y axis? What are different colours?

Nim forum statistics

2021-11-26 Thread Hlaaftana
What happened in May/June?

Nim forum statistics

2021-11-26 Thread PMunch
Probably [NimConf](https://conf.nim-lang.org/)

Nim forum statistics

2021-11-26 Thread dom96
Sure, here you go. January 2020 until November 26 2021 :)

Limit number of running threads

2021-11-26 Thread Jocker
already tried ARC and ORC

Limit number of running threads

2021-11-26 Thread tsojtsoj
In my experience using threads is least buggy with ARC (don't know about ORC), so maybe that might fix your segfault. Though that was always when using threadpool, not sure how this translates to system/threads.

Advent of Nim 2021

2021-11-26 Thread miran
## Advent of Code 2021 Wednesday December 1st at 5 a.m. UTC will mark the start of the seventh incarnation of [Advent of Code](https://adventofcode.com/), popular programming contest started back in 2015. The author describes Advent of Code (AoC) as " _a series of small programming puzzles for

Advent of Nim 2021

2021-11-26 Thread miran
Previous Advent of Nim threads: * [AoC 2018](https://forum.nim-lang.org/t/4416) * [AoC 2019](https://forum.nim-lang.org/t/5588) * [Aoc 2020](https://forum.nim-lang.org/t/7162)

Limit number of running threads

2021-11-26 Thread PMunch
Sounds like a job for `threadpool`

Limit number of running threads

2021-11-26 Thread Jocker
is there any way to limit how many threads can be created and let new threads wait until the running ones are finished? I tried this code: but I got a Segmentation fault

Nim forum statistics

2021-11-26 Thread juancarlospaco
Forum stats should be made always public, it would benefit Nim, and Nim lib maintainers.

implicit surfaces polygonizer

2021-11-26 Thread rforcen
just port a java implementation, available @: requires vec3: includes typical surfaces func's: NordstarndWeird, DecoCube, Cassini, Orth, Orth3, Pretzel, Tooth, Pilz, B

Malloc issue after upgrading from 1.4.6 to 1.6.0

2021-11-26 Thread JPLRouge
i am using linux and i upgraded 1.6 and with usemalloc and i have no problem I even recompiled everything apart from modifying the nil string with "C" I only had to put cstring (var_string), well that's not very bad

Malloc issue after upgrading from 1.4.6 to 1.6.0

2021-11-26 Thread Araq
Does this also run on Linux? If so, ask `valgrind` what it thinks.