A seasoned programmer's take on Nim's docs

2023-01-02 Thread Hlaaftana
I don't know how much documentation and library support it would ever take for Nim to be worth the hassle to some people. Not to be defeatist but outside factors are always going to be a huge contributor to how little languages are used despite how much people like them. That's why it's not goo

-d:useMalloc fixes memory leak, but I don't know why

2023-01-02 Thread planetis
That's bad but unless you share some more information with the rest or even try yourself to diagnose the problem, you cant expect for people to guess your issue. Its impractical and a waste of time. I am saying it in good faith. Regards.

A seasoned programmer's take on Nim's docs

2023-01-02 Thread grd
> I don't think the doc for getAppFileName is confusing per se, it just doesn't > have sufficient detail on semantics to be sure what the output is going to be > before trying it out. So it leads to surprises. Not a big one, but if there > are a lot of little things like that, you end up with pe

-d:useMalloc fixes memory leak, but I don't know why

2023-01-02 Thread jasonfi
My progress goes into GBs of memory use until the OOM kills it. So I don't think it's that issue which is only a few MB in difference.

Trying to setup SDL2 on Ubuntu for pixels

2023-01-02 Thread Boots
I bought the book Mastering Nim and am trying to work through the examples. I'm new to Nim but have a general understanding of python... though programming is not my career. I am using a virtual machine and an installation of Ubuntu 22.04. I finally made some progress tonight installing SDL with

A seasoned programmer's take on Nim's docs

2023-01-02 Thread elcritch
> I suspect the thread I saw got locked because people might not want to > discuss the docs. Clearly a lot of work has been put into them, and I do > think they're pretty broad. The documentation feels sufficient in most areas > for grey beards coming from C like myself; I picked up the language

Nim book in Japanese

2023-01-02 Thread sls1005
It seems that it was written by a Japanese high-school student who's engaged in a community named Nim in Japan. He's very likely also be here. It's strange for a programmer not to know English, even for a Chinese/Japanese.

A seasoned programmer's take on Nim's docs

2023-01-02 Thread jtv
I'm not suggesting anyone improve anything. I'm just trying to point out that, if there are doc complainers, it is because there is an actual barrier, and that barrier is almost certainly keeping people out of the tent that you want in the tent. I don't think the doc for getAppFileName is _conf

A seasoned programmer's take on Nim's docs

2023-01-02 Thread SolitudeSF
doc complainers dont understand that until someone who wants to "improve" them comes and actually does the thing the docs will stay as they are. certainly you wouldnt expect araq to improve the docs for new users. you need someone who understands what the hell new users want in every concrete si

A seasoned programmer's take on Nim's docs

2023-01-02 Thread jtv
I suspect the thread I saw got locked because people might not want to discuss the docs. Clearly a lot of work has been put into them, and I do think they're pretty broad. The documentation feels sufficient in most areas for grey beards coming from C like myself; I picked up the language less th

Roadmap 2023

2023-01-02 Thread 0x0000ffguy
Maybe @yeabsira's feeling is related to the facts that pragmas in Nim seem to apply to many different contexts: runtime/compiler behaviour, calling conventions, FFI... IMHO this, somewhat, lack of homogeneity does not look currently like an issue: for instance Rust's `#[attributes]` work in a si

-d:useMalloc fixes memory leak, but I don't know why

2023-01-02 Thread treeform
You might be running into this: Nim has its own free pool that OS does not know about. OS might think memory is increasing but its just the internal free pool getting bigger.

Roadmap 2023

2023-01-02 Thread xigoi
Let's remove variables while we're at it. They make the code too hard to reason about.

nimqt - bindings to Qt

2023-01-02 Thread elcritch
This looks fantastic! A define flag would probably work alright with some `when` 's: # version const QtVersion {.intdefine.} = 6 # or maybe bools: const HasQt6 {.booldefine.} = true Run Does the `-` sign in the makeLayout mess up autocomplete? I haven't had

Assigning array to itself with different order

2023-01-02 Thread matkuki
@rockcavera Never knew that! Excellent, thanks 🎉

Assigning array to itself with different order

2023-01-02 Thread rockcavera
That should settle your case. var bytes = [0x1F.uint8, 0xC2] swap(bytes[1], bytes[0]) echo bytes Run

How does the `nimsuggest` LSP work with respect to UFCS support in Nim?

2023-01-02 Thread GavinRay
Thank you both. @Araq: > "nimsuggest determines the type of obj. and suggests the routines in scope > that take typeof(obj) as the first parameter." You make this sound, ehh, trivial. 😅 I will have to think about how this pattern could be applied.

Assigning array to itself with different order

2023-01-02 Thread matkuki
I found this when trying to reverse engineer some code from DOS x86 16-bit assembly, when I got to a line with `xchg ah,al`, it naturally converted (at least in my eyes) to `bytes = [bytes[1], bytes[0]]`. Is there a way to make this an error when used?

Nim book in Japanese

2023-01-02 Thread ringabout
Not necessarily popular, it is a self-public book like the Amazon one. shows some insights regarding where the visitors are from.

Nim book in Japanese

2023-01-02 Thread Hlaaftana
Languages like Japanese and Chinese are more different from English (the language most Nim resources are in) than other languages Nim users tend to speak, so they warrant their own resources more. Otherwise relative to population I don't think there's an exceptional amount of users from anywhere

nimqt - bindings to Qt

2023-01-02 Thread grd
This `nimble install nimqt -qt=5` would be good if you want to maintain Qt5, but I think that everyone is switching to Qt6. But I meant that you can install Qt[5|6] with different methods. You can even choose a different Qt version and not install it. And I think that we need to document this.

Nim book in Japanese

2023-01-02 Thread PMunch
Translated the listing to English using Google Translate, the chapters at least look interesting :)

Nim book in Japanese

2023-01-02 Thread sls1005
Just found a Nim book written in Japanese, [プログラミングNim](https://nextpublishing.jp/book/13584.html) ( _Programming Nim_ ). Maybe the programming language is very popular in Japan?

Nim book in Japanese

2023-01-02 Thread moigagoo
Oh, it looks so cute! Nya (◕‿◕✿)

Nim book in Japanese

2023-01-02 Thread moigagoo
I've seen several interesting projects in Nim from Japan. So it's definitely known there.

nimqt - bindings to Qt

2023-01-02 Thread jerous
> Maybe we could have a separate Qt install option? You mean nimqt6 and nimqt5 > packages that are identical, except for the compiler flags? It would be nice if we could pass switches to nimble install (e.g. like `nimble install nimqt -qt=5`. Or maybe use different git branches?). I don't want t

nimqt - bindings to Qt

2023-01-02 Thread Martinix75
wow!!! fantastic thanks!!!

nimqt - bindings to Qt

2023-01-02 Thread grd
> Good luck with implementing .ui support! Don't know how straightforward it > will be :) I saw the Go version and want to implement that. > One serious concern is that the cpp backend is required. Hence, if you use a > library that does not work with the cpp backend, it'll be suddenly very >

How does the `nimsuggest` LSP work with respect to UFCS support in Nim?

2023-01-02 Thread PMunch
The NimLSP client that I've written compiles directly with nimsuggest, the langserver implementation calls `nimsuggest` as a binary, but the system is the same. Nimsuggest is essentially using the same code as the compiler, but instead of generating code it generates information about the code.

How does the `nimsuggest` LSP work with respect to UFCS support in Nim?

2023-01-02 Thread Araq
There is no problem. `nimsuggest` determines the type of `obj.` and suggests the routines in scope that take `typeof(obj)` as the first parameter.