This Month with Nim: January 2020

2021-02-03 Thread gemath
Since one has to wait until the month is over to compile what happened during that month, shouldn't it be "Last Month with Nim"?

Help needed: Deadlock during allocShared0

2021-02-03 Thread boia01
@leorize It's not my signal handler. It must be one of Nim's default.

Who can provide a IUP example, requires no DOS window to generate executable file to run after

2021-02-03 Thread oyster
yes, I know it is 2021 now as for "static library link", here ( ) is the answer: to use "\--dynlibOverride:iup" btw. it is strange why iup is not considered as an official gui lib for nim? I think iup has been time-proven since there are some applicati

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread halloleo
Thanks everybody for the details! It is very interesting to see how flexible Nim is!

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread halloleo
@zetashift: What's the difference between the `github.com/zevv/with` macro and the nim-lang.org/docs/with.html macro?

Help needed: Deadlock during allocShared0

2021-02-03 Thread leorize
Are you allocating any memory in the signal handler? If you do, that's the problem.

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread treeform
I do not use `self/this` I think its better to use a descriptive name. This seems to be the style of other nim code. proc setToStandard(question: Question) = question.what = "What's the answer?" question.answer = 42 Run

Help needed: Deadlock during allocShared0

2021-02-03 Thread boia01
Hi folks, I have a multi-threaded application that deadlocks during processing. The deadlock involves Nim's own allocator, through `allocShared0`. One weird thing is that it only seems to happens when a signal handler is called during allocation, see stack entry #6 below: [Switchi

Enu - 3d live programming and game dev in Nim

2021-02-03 Thread dsrw
Enu 0.1 has finally been released. Only 3 months late! has x64 binaries for Mac, Windows and Linux. The Linux build has only been tested on a single Ubuntu 20.4 system, and I expect there will be issues. Report them here or on github and I'll so

Nim style guide based on Nimbus experience

2021-02-03 Thread spip
Adding the link to the [Nim style guide](https://github.com/status-im/nimbus-eth2/blob/style-guide/docs/the_style_book/src/SUMMARY.md) because I did not found it in the first post. And dropping a few comments... * This is very good read as it is based on experience. A copy should be availabl

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread timothee
see PR [nep1: prefer `self` to `this` by timotheecour · Pull Request #16927 · nim-lang/Nim](https://github.com/nim-lang/Nim/pull/16927) which will settle this debatte

Out of bounds error when use seq with emscripten

2021-02-03 Thread timothee
please file a bug in and cross-reference both

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread timothee
> Another example that theindex is not discoverable and we need a better search > in Nim docs. cc @haxscramper doc search has its flaws (there are already open issues for it), and I'm all for better search features (eg using karax, better spell correcting, and more advanced query options), but

What are the latest developments in the Nim compiler?

2021-02-03 Thread alexeypetrushin
I wouldn't call it "old concepts", that's more like "standard concepts", the working horse :)

Out of bounds error when use seq with emscripten

2021-02-03 Thread sekao
I think I have a similar problem. I started messing with wasm using [treeform's tutorial](https://github.com/treeform/nim_emscripten_tutorial) but after heavy use of tables and other heap-allocated stuff I'm starting to see "alignment fault" in the chrome console: alignment fault

There's a Yankees fan writing the Nim tutorial... lol

2021-02-03 Thread ElegantBeef
Give them a break there are state capitals!

What are the latest developments in the Nim compiler?

2021-02-03 Thread bpr
So, new concepts are a Nim v2 thing then, and the old concepts will not be deprecated? IIRC you have a branch with the new concepts almost done, and you're waiting for someone else to pick it up and finish it. Is that right? If so, I think that's unrealistic; who else will do that work?

Exploring namespaces support in Nim

2021-02-03 Thread kcvinu
I think this will fix one of my haunting problems.

newAsyncHttpServer() & wrapSocket()

2021-02-03 Thread Steven
Is there a way to use wrapSocket() with newAsyncHttpServer() ? I can't figure out how to make an async server handle https. Thanks.

There's a Yankees fan writing the Nim tutorial... lol

2021-02-03 Thread shirleyquirk
Only for 23 days and only de facto as the meeting place of the stamp act congress in 1765, and preceeded by the Albany Congress in 1754.

Karax and inline svg elements, what's the recommended way?

2021-02-03 Thread b3liever
Damn you're right! I shouldn't make PRs after midnight.

Karax and inline svg elements, what's the recommended way?

2021-02-03 Thread juancarlospaco
Pull that PR on your local Karax?.

Karax and inline svg elements, what's the recommended way?

2021-02-03 Thread b3liever
So Karax, currently has poor support of inline svg elements. however there are PRs that try to improve this [karax#167](https://github.com/pragmagic/karax/pull/167) [karax#176](https://github.com/pragmagic/karax/pull/176) . Inline svg is essential if you need to apply styling to your buttons th

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread Prestige
I use `this` as a first param (I don't like using `using`). I think it's fine, why not?

There's a Yankees fan writing the Nim tutorial... lol

2021-02-03 Thread dude_the_builder
Hey, maybe it's just nostalgia! New York was actually the first US capital. The more you know. ;-) .

There's a Yankees fan writing the Nim tutorial... lol

2021-02-03 Thread juancarlospaco
Not so wrong, can be places of ;P

There's a Yankees fan writing the Nim tutorial... lol

2021-02-03 Thread carterza
Or just someone that is terrible with US geography...

There's a Yankees fan writing the Nim tutorial... lol

2021-02-03 Thread shirleyquirk
they must have meant "Albany"

There's a Yankees fan writing the Nim tutorial... lol

2021-02-03 Thread dude_the_builder
In the section on Open arrays: capitals = ["New York", "London", "Berlin"] Run New York? :-D

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread mratsim
Another example that `theindex` is not discoverable and we need a better search in Nim docs. cc @haxscramper

There's a Yankees fan writing the Nim tutorial... lol

2021-02-03 Thread zetashift
Which is ironic since I feel like most of the community is based in Europe.

Objects for "classes" with ref or without?

2021-02-03 Thread filcuc
i didn't read your guide (but i'll). I was just pointing out methods for easy reference for the original author

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread zetashift
An an alternative to using is haha. That being said I could have sworn there was a `with` in the Nim stdlib, but I can't find it. Searching for `with` brings up nothing useful.

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread b3liever
Well, an alternative is [using](https://nim-lang.github.io/Nim/manual.html#statements-and-expressions-using-statement), however it doesn't support generics. I don't know if this feature is going to be added or not.

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread ftsf
I use this quite a bit, there was/is a deprecated feature `{.this:self.}` which made this really nice to use. {.this:self.} type Question = ref object what: string answer: int proc setToStandard(self: Questions) = what = "What's the answe

Anybody using `self` or `this` for procedures operating on "class" style object types?

2021-02-03 Thread enthus1ast
Self or this is impractical since there could be more then one self or this. When you have a proc in a proc etc. I would ever go for a descriptive name. In case of "Questions" I would use "questions"

When should I use tuples over objects?

2021-02-03 Thread mratsim
> Well, not all people may have heard about problems of converters reported in > the last 5 years. I can remember some reports about increased compile times, > and strange, hard to find bugs. One of the reporters was mratsim, so I took > the reports serious and avoided converters for all my code

When should I use tuples over objects?

2021-02-03 Thread greenfork
> if you expose converters in a library, do so in an optional module called > lenient_something so that importing converters is always opt-in as it's hard > to opt out of them I like this approach, thanks!

This Month with Nim: January 2020

2021-02-03 Thread miran
New blog post: If you want to include your project for the next month (it doesn't have to be a new project), follow the instructions [here](https://github.com/beef331/website).

Objects for "classes" with ref or without?

2021-02-03 Thread Stefan_Salewski
Yes. Is there an error in my description or something not clear enough?

This Month with Nim: January 2020

2021-02-03 Thread miran
> Shouldn't it be January 2021? Wait, what happened to 2020? Is it already 2021?! Thanks, will fix now.

This Month with Nim: January 2020

2021-02-03 Thread andrea
Shouldn't it be January 2021?

Objects for "classes" with ref or without?

2021-02-03 Thread filcuc
If i'm not wrong you need to use ref if you use methods (aka runtime dispatching) istead of procs