sql db_postgres update where in (…………)

2022-12-16 Thread jasonfi
I would say you should join() the ids into a string using join (from strutils). If the ids are int64s, then first convert them to either an array of string and then join them, or immediately to a string using a loop. Also, take a look at [Nexus](https://github.com/jfilby/nexus) which includes an

BigNum and BigInt timings on the Pollard Rho algorithm

2022-12-16 Thread fsh
Heya, I don't really have anything to contribute but I recently uploaded which are intended to be ergonomic integers (wrapping GMP) and seems kind of maybe-possibly-peut-être adjacent to what you're looking for. No guarantees re polish or bugs or

sql db_postgres update where in (…………)

2022-12-16 Thread jiep
hello, i looked around but didn't find clues how do i create a query with an IN ( ?, ? , ………) , @[element x, element x+1………, element x + n] db.exec(sql"update table set = ? where IN (?,)", el, @[]) i will work on a table with 200 000 lines, if i have to update them one by one i gonna lose ho

JS compiler produces a large file (with -d:release) ?

2022-12-16 Thread juancarlospaco
> Like template literals and ${expressions} in js. Literally this

JS compiler produces a large file (with -d:release) ?

2022-12-16 Thread Hlaaftana
Yeah I don't see how strutils could be better than strformat here, from what I know strformat handles the interpolation at compile time while strutils would have to handle it at runtime.

Closure dual use for objects?

2022-12-16 Thread abdulhaq
The wise man from the east who gives two contradictory opinions and then hits you with a stick, it's Araq right??? ;-) just kidding folks

Closure dual use for objects?

2022-12-16 Thread shirleyquirk

JS compiler produces a large file (with -d:release) ?

2022-12-16 Thread rel
`echo` is only debuging and can be replaced with `std/jsconsole`. I am not sure if I can use `std/strutils` instead of `std/strformat`. What I try to do is to use the declarativ way of html and need interpolation in the multiline string to include a page or component. Like template literals and

Closure dual use for objects?

2022-12-16 Thread RodSteward
Right now a closure is a function pointer and another pointer to store any possible captures. This implies that the closure must be used within another function context. Let's say you have a function that operates on a type in an object oriented manner. proc MyMethod(this: var MyO

JS compiler produces a large file (with -d:release) ?

2022-12-16 Thread juancarlospaco
Replace the `std/strformat` with `std/strutils` or just `add`. Replace the `echo` with `std/jsconsole` and use `console.log`. Compile with `-d:danger`. > A compiled typescript code is almost the same as js code. Nim is not the same as Typescript, Nim has run-time safety in the generated JS by d

Odd timings for threads

2022-12-16 Thread litlighilit
about the `SIGSEGV: Illegal storage access.` when use spawn with orc: It's not a occision, I'd met it several times. (So in fact I'm connected about if it'll be fixed and how) For this code (as shown above), I had spent much time to `gdb` its output C code. The SIGSEGV is indeed directly fr

JS compiler produces a large file (with -d:release) ?

2022-12-16 Thread rel
Thank you the base information. My code: File: renlite_core.nim import dom type ListenerFunc = proc (e: Event) {.closure.} proc createEventBus*(eventName: cstring) {.exportc.} = document.appendChild(document.createComment(eventName)) proc eve

JS compiler produces a large file (with -d:release) ?

2022-12-16 Thread Hlaaftana
This has been talked about to death so it would be better if you gave concrete code Yes there are runtime checks because JS barely has them (as with C), JS hides errors behind `undefined` and `NaN` and Nim checks for overflows and Nim has types like