Course on Nim programming language

2021-11-20 Thread plgupa
Hi All, I am excited to announce that I have launched a course on Nim programming language on Udemy. When I started learning Nim, I was impressed by the easiness of the language and its amazing features. I decided to create a course on Nim, so that the language features can reach to everybody.

strformat with user-defined width?

2021-11-20 Thread ElegantBeef
`fmt` works using compile time logic, so the way to do it would be to use `strutils.align` as such import std/strutils var width = 2 assert align($9, width) = " 9" Run

strformat with user-defined width?

2021-11-20 Thread oyster
it is easy to output `9` which is aligned by the right with a space of 2 characters import strformat echo fmt"{9:>2d}" Run but what if the width is a var, how can we do the string format? What I mean var width = 2 echo fmt"{9:>{width}d}"

The Cylons have a Plan

2021-11-20 Thread pietroppeter
> Any sufficiently advanced technical roadmap is indistinguishable from science > fiction. 😂

Evolving the moderation of the Nim communities

2021-11-20 Thread pietroppeter
> We wanted to take this opportunity to announce a few changes to the > moderation of the Nim communities. > > Firstly we are announcing the appointment of new moderators. The current list > includes @Vindaar, @mratsim, @Yardanico, @ftsf, @PMunch, @federico3 as well > as @Araq and myself. I gu

Unclear error message or bug?

2021-11-20 Thread Araq
The compiler cannot know where the last read will happen as the indirection via `ref` introduces aliasing and makes it practically impossible to reason about -- for the compiler in this case, for the human being in more complex cases.

Unclear error message or bug?

2021-11-20 Thread templatedperson
Where does the last read happen if not in the `e = r[]` line? That's the line triggering the error. Changing it to `e = move(r[])` fixes the problem though.

Evolving the moderation of the Nim communities

2021-11-20 Thread PMunch
Since you don't seem satisfied with an answer from a fellow community member, here is the same answer from one of the moderators on the list. This change doesn't bring about a new level of moderation. This change doesn't change the way Nim discussions are moderated. this change doesn't mean more

The Cylons have a Plan

2021-11-20 Thread didlybom
Thanks for the answers @Araq. About this comment: We could name it "--mm" for "memory management", but I doubt it makes much of a difference. Run I actually thing it would make a (little) difference for those who care about these things. It would make it clear than nim h

The Cylons have a Plan

2021-11-20 Thread Araq
We have two different concept implementations, one "imperative" (describe what you want to do with the type), one "declarative" (type T must have these operations of these signatures). I don't know how to bring the declarative one on feature-parity with the old one and I also didn't spend too mu

The Cylons have a Plan

2021-11-20 Thread Sixte
> Well I suppose the major problem is coming up with a syntax for it. :-) Concepts are in the language for - at least - 6 years. And now, a keyword is missing? I don't believe it.

Preview of coming attractions?

2021-11-20 Thread Sixte
The original calculus goes back to Michel Parigot in 1992. It was intended to be used with Natural Deduction, ND extended with quantification over predicates, therefore 2nd order. You can translate the calculus into CPS, if you want the lambda calculus back. If you don't need that, you should by

The Cylons have a Plan

2021-11-20 Thread 12398890
After read some of your wrotes, I highly suspect that you are Yinwang? the most famous "Keyboard Programming Language Expert" in China? you two have very similar style, haha /

The Cylons have a Plan

2021-11-20 Thread Araq
> you'll tell (me) why you could not infer a static value (if decidable in > prinicple, of course...) Well I suppose the major problem is coming up with a syntax for it. :-)

Preview of coming attractions?

2021-11-20 Thread Araq
And what does that have to do with 2nd order logic? And why is that doing "way cheaper than CPS itself"? I mean, you basically described CPS as far as I can tell.

The Cylons have a Plan

2021-11-20 Thread Sixte
Let's make a deal. You wrote > you'll tell me why you could not infer a static value (if decidable in > prinicple, of course...) and now the other part: > I don't know what that means. Same for your remark about 2nd order logic and > CPS. Please link to the relevant books/papers. How many pape

The Cylons have a Plan

2021-11-20 Thread Araq
> 1\. Do you have a (tentative) timeline, particularly for IC support? BTW I > really like the idea of porting back IC to 1.6 to let people benefit from it > without the potential issues of migrating to 2.0. No timeline that would be more precise than "in 2022". > 2\. Will editor plugin authors

Preview of coming attractions?

2021-11-20 Thread Sixte
What do you want? Do you want it "Soft" or "Aggressive"? Soft means - there is not much to see there. The compiler can derive more than now, and e.g. macros can be passed as arguments. Aggressive: Labels can be passed as arguments. A new keyword `fm` , "functional macro", will "macroize" a func

The Cylons have a Plan

2021-11-20 Thread Araq
> Does this mean "less batteries included". Will these external packages be > "Nim Approved" in some form? Yes, but right now there is no plan to "ship" a "distribution" with the "approved" packages anymore. Instead we'll simply link to them in our official docs.

How to profiling GC in Nim like golang's gctrace=1

2021-11-20 Thread 12398890
How to debug output GC stats, similar to golang's GODEBUG="gctrace=1"

Links of websites built with Karax?

2021-11-20 Thread xbello
I don't think this would be of anyone interest, but recently we published a website which I built with Jester + Karax for server side templating. It's up at . It has a bit of JS that is also compiled from Nim code. The site is deployed in a tiny VPS behind Nginx (shared wit

Links of websites built with Karax?

2021-11-20 Thread sdmcallister
Yes, and it has many optimizations specifically for that type of workload. The two databases are very different.

Links of websites built with Karax?

2021-11-20 Thread jasonfi
It looks like DuckDB is in-process, so that would explain most of the speed-up, I would think.

Links of websites built with Karax?

2021-11-20 Thread sdmcallister
The site I mentioned above is live (but still only internal). I used Jester as well. It has been a pleasure working on this project and I really appreciate the Nim community. So far the feedback from the users has been positive. I had one person ask me how the charts load so fast :). And this i

Evolving the moderation of the Nim communities

2021-11-20 Thread Zoom
> A more millennial sentence than this is impossible to imagine. > > If Nim has degenerated from open source technology to community for the > likeminded ignoramus then... Ok, so since you were answering my post I take it as a stab at me. I tried to give you a hint, it's pretty easy to spot in

The Cylons have a Plan

2021-11-20 Thread Clonk
Thank you for writing this and clarifying your thoughts. Few question regarding the Evolution of Threads : Will the Thread API evolve to move out of the generic / forced tuple object? Same question with thread pool : will it move towards Future or are FlowVar here to stay? Can Nim support an '

Evolving the moderation of the Nim communities

2021-11-20 Thread Clonk
> I was driven away from Python and Swift for exactly this reason. Do I have to > find another language to invest my time in? As the saying goes : If everywhere you go it smells like shit, maybe you should check your own shoes. > There has never been a dictatorial tyranny in history that was un

The Cylons have a Plan

2021-11-20 Thread Yardanico
About your last point regarding GCs - it has already been thoroughly discussed, see

The Cylons have a Plan

2021-11-20 Thread didlybom
A few of questions and comments for the Cylons :-) 1\. Do you have a (tentative) timeline, particularly for IC support? BTW I really like the idea of porting back IC to 1.6 to let people benefit from it without the potential issues of migrating to 2.0. 2\. Will editor plugin authors need to do

Evolving the moderation of the Nim communities

2021-11-20 Thread jorjun_arch
> The manner in which you've expressed your concerns will certainly be seen at > the very least as not 100% appropriate for this particular place by some. A more millennial sentence than this is impossible to imagine. If Nim has degenerated from open source technology to community for the likem