Convert Python codes to Nim codes

2022-08-16 Thread whospal
I want to convert this Word Search algo from Python to Nim. Hit several errors. Need help! I have commented those sections that hit error. **Python:** #--- # Name:WordSearch-2.py # Pu

nimiSlides 🛷 Create beautiful slideshows in Nim 👑

2022-08-16 Thread hugogranstrom
# nimiSlides 🛷 Create beautiful slideshows in Nim 👑 [nimiSlide](https://github.com/HugoGranstrom/nimiSlides) is a library for making presentations about Nim, in Nim. It's a [nimib](https://github.com/pietroppeter/nimib) theme which uses [Reveal.js](https://revealjs.com/) to make the slideshows.

Alternative to gravatar for the forums?

2022-08-16 Thread pietroppeter
Regarding analytics, one option could be to replace Google analytics with [Plausible Analytics](https://plausible.io/) making stats public to see for everyone (so that you can see the stats on the blogpost you contributed to, for example). Plausible can be self hosted (it is open source) or use

What's the use case for a "block" statement?

2022-08-16 Thread icedquinn
blocks are also useful for some horrible things. for example: var x = acquire_hounds() block: defer: release_hounds(x) .. stuff go here .. Run this seems less interesting at first until you realize they can go in to templates or macros. which means yo

downloading big files

2022-08-16 Thread stbalbach
I know curl is a standard but in my experience dealing with millions of random URLs from Wikipedia , curl will fail on websites where wget succeeded. You'd think something as basic as retrieving a web page would would work equally well but they have different internal assumptions and I find wget

Wave: illegal capture ' ' because 'weaveParallelForSection' has the calling convention:

2022-08-16 Thread mratsim
> The limit here is the connection/http latency. The other parts are super fast. I cover this in my blog post What is important is **how do you make progress**. If your program makes **progress by working** , yes Weave is a suit

Math library for renderers and GUIs

2022-08-16 Thread ro2
The Hadamard product is not geometrically meaningful! While it's great for data processing, it doesn't really make sense to compute the Hadamard product of two _spatial vectors_ (i.e. two relative positions in space) The geometric product makes sense as a product, and so do the inner product and

What's the use case for a "block" statement?

2022-08-16 Thread dlesnoff
A block act just like a lambda function (an anonymous proc ?) but with side effects ? One syntax caveat is the increase of the indentation level. With if, while, for statements and blocks in between, the code gets quickly too much indented. Your examples are great, but I am unsure about the sec

Math library for renderers and GUIs

2022-08-16 Thread dlesnoff
I am very interested to learn how you use algebraic geometry here, I'll look into the linked articles before looking at your code, in a week or so. From a math POV, we do not have many names for element-wise operator, I do not know if there is a name for absolute value applied to each element of

Math library for renderers and GUIs

2022-08-16 Thread icedquinn
> element-wise vector operations i'll replace those with the hadamard operator.

Alternative to gravatar for the forums?

2022-08-16 Thread xigoi
Hmm, I didn't know about those, probably because they're only mentioned in the wiki and not on the homepage.

Show Nim: CSS Grid layout engine!

2022-08-16 Thread treeform
This is really cool! Great progress.

Alternative to gravatar for the forums?

2022-08-16 Thread exelotl
+1 for removing Google Analytics and implementing open alternatives to gravatar, recaptcha and anything else that's within reach. I have to stick up for the Nim IRC bridge. I'm on a few Discords with IRC bridges, and Nim's is by far the best, having decent support for edits, replies and code pa

Math library for renderers and GUIs

2022-08-16 Thread ro2
There's another issue of mathematical correctness. The `*` and `/` operators operate elementwise, which does not seem a geometrically meaningful operation. These _do_ have meaningful definitions in geometric algebra, but... There's a fundamental tension between linear algebra and geometric algeb

Alternative to gravatar for the forums?

2022-08-16 Thread xigoi
Speaking of forum improvements, could we replace the icon font with SVGs?

Alternative to gravatar for the forums?

2022-08-16 Thread Yardanico
> The Matrix and IRC bridges are clearly second-class — only two channels are > bridged and they're dominated by Discord people. This is not true even for IRC - all channels in Main and Community sections in Discord are bridged to IRC, please don't get people mistaken :)

C function dependencies in os:any

2022-08-16 Thread pdietl
Hi there. How can one find out exactly what C function definitions are expected to be present when compiling for a bare-metal or RTOS environment? For instance, I know that one probably has to provide a definition of `malloc` and `string.h` functions, but is there a definitive list of required f

Wave: illegal capture ' ' because 'weaveParallelForSection' has the calling convention:

2022-08-16 Thread void09
Thank you for the comprehensive response ! I had wrongly assumed that the explicit capture is not needed because the code worked without it, if put outside proc. But since it didn't work with code in the proc, I should have thought something needs to be done different. The workflow here is simp

Why is db_postgres so slow?

2022-08-16 Thread anusree
PostgreSQL attempts to do a lot of its work in memory, and spread out writing to disk to minimize bottlenecks, but on an overloaded system with heavy writing, it's easily possible to see heavy reads and writes cause the whole system to slow as it catches up on the demands.

Why is db_postgres so slow?

2022-08-16 Thread juancarlospaco

Getting compile command in compile time.

2022-08-16 Thread chaemon
Thanks! std/compilesettings is exactly what I want!!

Why is db_postgres so slow?

2022-08-16 Thread rishavs
> The bottleneck here is likely that db_postgres blocks. I would give > @treeform's async library a try. I don't think it will help considering that > @treeform's lib wraps db_postgres itself, instead of libpq > So these benchmarks are largely meaningless when it comes to how fast a > language

Alternative to gravatar for the forums?

2022-08-16 Thread enthus1ast
This was literally a lunch project, no ambitions so far to turn this into a real project. But bugs? Where are bugs? :)

Why is db_postgres so slow?

2022-08-16 Thread dom96
The bottleneck here is likely that db_postgres blocks. I would give @treeform's async library a try. On the other hand, even though Nim stdlib is 0.6% of the top Rust framework that's still nearly 4k QPS. If you want to help market Nim then look into optimising this, but if you want to just get

Wave: illegal capture ' ' because 'weaveParallelForSection' has the calling convention:

2022-08-16 Thread mratsim
Your code needs to explicitly captures all variables you want available in the parallel for loop: # Original proc parallelCoverURL(db, dbc: DbConn) = init(Weave) var ids: seq[uint32] = db.getAllRows(sql"SELECT tconst FROM title_basics WHERE tconst NOT IN (SELECT

Alternative to gravatar for the forums?

2022-08-16 Thread Zoom
Speaking of avatars, I like this approach very much: Nimforum could have something like this, written in Nim, of course. Even though I generally am opposed to all kinds of JS use, this seems appropriate, as it's very light and generates avatars fo

Wave: illegal capture ' ' because 'weaveParallelForSection' has the calling convention:

2022-08-16 Thread void09
Title should be "Weave: ". Reposting for readibility: So I have this piece of code that errors with: : illegal capture 'idsBuf' because 'weaveParallelForSection' has the calling convention: The same code runs fine if not in a proc. Don't know much about weave, read only so much as to put this

Alternative to gravatar for the forums?

2022-08-16 Thread ElegantBeef
The Matrix space has all the english rooms but memes and discord only bridge. There are quite a few Matrix users, but not nearly as many as Discord of course.

Alternative to gravatar for the forums?

2022-08-16 Thread xigoi
The Matrix and IRC bridges are clearly second-class — only two channels are bridged and they're dominated by Discord people.

Why is db_postgres so slow?

2022-08-16 Thread rishavs
The benchmark numbers are here; [https://www.techempower.com/benchmarks/#section=test&runid=ecfbe3c9-f577-4836-9403-41f9120dfc6e&l=zdk8an-1kn](https://www.techempower.com/benchmarks/#section=test&runid=ecfbe3c9-f577-4836-9403-41f9120dfc6e&l=zdk8an-1kn) nim stdlib is showing 0.6% of the top framew