Upcoming `Result` review - comments and thoughts welcome!

2023-04-05 Thread arnetheduck
After many iterations and bug-fixes, we (Status) are finally moving to Nim 1.6 (where previously 1.2 was used for stability reasons) - in light of this, I've started thinking about reviewing [`Result`](https://github.com/arnetheduck/nim-result/) from the point of view of efficiency, ergonomics

Calling Nim proc from C and handling the cstring (char array) returned

2023-04-05 Thread sls1005
cstrings are untraced pointers. They cannot hold the ownership of a Nim string. When you assign `"Hey there C code! " & $rand(100)` (a string as a temporary object) to `result` (a cstring), the `string`'s life ends because its reference count is reduced to zero and is not increased, and as a res

Nim in production #2: 100k+ WebSocket connections on one small VM, lots of CPU and RAM to spare

2023-04-05 Thread treeform
I want to **highlight** that this is based on the [mummy](https://github.com/guzba/mummy) webserver that does not use Nim's `asyncdispatch`, but instead uses OS threads, ORC memory management, and a custom HTTP parser. It's all forward-looking to Nim 2.0. It has a really cool model where all IO

Future of typing ?

2023-04-05 Thread alexeypetrushin
While I like optionality and infer for all types, it may be too hard to implement, it's unrealistic. But what's definitely possible and annoys most is lack of auto types when **specifying it explicitly don 't contribute to readability or correctness** so those types are just annoyance and usele

Anyone tried GPT-4 for Nim?

2023-04-05 Thread ReneSac
See the link on Stefan_Salewski.

Calling Nim proc from C and handling the cstring (char array) returned

2023-04-05 Thread Araq
proc gimme(): cstring {.exportc.} = result = "Hey there C code! " & $rand(100) Run is broken. Here is a sketch of a solution: proc gimme(): cstring {.exportc.} = let tmp = "Hey there C code! " & $rand(100) result = cast[cstring](malloc(tmp.le

Anyone tried GPT-4 for Nim?

2023-04-05 Thread grd
Sorry to be a bit off topic, but as a guy who is not familiar with GPT, what does it? And how does it work for Nim?

GlucoBerry ReviewsReviews - Get Real GlucoBerry Reviews Results Now!

2023-04-05 Thread GlucoBerryReviews
Buy Here=> GlucoBerry Reviews:-Insulin is one of the things that control blood sugar levels. This hormone removes excess sugar from the blood and delivers it to the kidneys. When insulin transport

Nim v2.0.0 RC2 is out

2023-04-05 Thread ringabout
`nimble install db_connector` import db_connector/sqlite3 Run

Future of typing ?

2023-04-05 Thread pietroppeter
> Overloading plus Hindley-Milner like type inference is NP-complete and Nim > focuses on overloading. I have never regretted this decision in my life. ;-) very interesting > Is there a paper/resource you can link where the relationship is explained in > more detail? >From a very quick google

Nim v2.0.0 RC2 is out

2023-04-05 Thread drkameleon
Is there something wrong with `sqlite3` and this release? I tried to compile with this last version and seemingly it's complain about the module not being found: Error: cannot open file: sqlite3 Run

Nim in production #2: 100k+ WebSocket connections on one small VM, lots of CPU and RAM to spare

2023-04-05 Thread federico3
> eventually the server will oom. This is totally the same as async though imo, > with caveats as always. Unmanaged queues are usually a pattern to be avoided due to the bad failure mode (oom) but also because clients can timeout and generate unnecessary load. Often it's better to apply (increm

Calling Nim proc from C and handling the cstring (char array) returned

2023-04-05 Thread olwa
I want to call a Nim proc from C which returns a cstring, the same as the "gimme" example at . I want to check that the way I am using the char array returned to C is sound. This is a minimal example of my current

Future of typing ?

2023-04-05 Thread nimnam
In TS i started to use pattern like tihs: const create_api = (options) => { const dosth = () => xy const domore = () => { dosth(); dosth(); } return { dosth, domore } } It allows to reuse things from scope easily minimizing passing arguments. And from my point of view its fine if the co

Future of typing ?

2023-04-05 Thread jmgomez
"Overloading plus Hindley-Milner like type inference is NP-complete and Nim focuses on overloading." Thanks for explaining it, I always wondered what was the reason of the inference "lacking". Is there a paper/resource you can link where the relationship is explained in more detail? On the oth

The Impact of Voice Search on Your Phone Number List Strategy

2023-04-05 Thread pranto4
In today's digital age, e-commerce has become a crucial part of the retail industry. One of the most effective ways to boost your e-commerce sales is by leveraging your phone number list. Here's how you can use your phone number list to boost your e-commerce sales. SMS Marketing: Use your phone

Future of typing ?

2023-04-05 Thread Araq
Overloading plus Hindley-Milner like type inference is NP-complete and Nim focuses on overloading. I have never regretted this decision in my life. ;-) More type inference is not necessarily good: "I have to type less" has to be weighted against "error messages are more mysterious than ever". >

Future of typing ?

2023-04-05 Thread nimnam
I wrote some simple code like this: var v = 100 proc build_fun(a: int): proc (): int = var b = 20 proc foo(): int = b = b + 1 result = a + b result = foo var f = build_fun(10) f2 = build_fun(

Nim in production #2: 100k+ WebSocket connections on one small VM, lots of CPU and RAM to spare

2023-04-05 Thread curioussav
This is super encouraging to hear. I was really tempted to see if I could get away with putting some nim into production at work recently but I’m holding off for the moment. One thing I didn’t see last time I searched were nim libraries for open telemetry. If I can find the time I might try to

Creazilla is looking for a node.js developer (Remote)

2023-04-05 Thread Creadev
Creazilla.com is looking for a node.js developer to write a backend for the Creazilla’s online graphic design editor. Key points: Knowledge of Node.js (+3 years of commercial development) You have experience with MongoDB and with one of relational databases. You have experience with Fastify fr