Malebogia

2023-05-17 Thread alexeypetrushin
The ChatGPT not using its full potential, as it's won't learn on the new data. Part of conversation :) > Can you learn new data? No > So you are like Terminator 2 with the "learn" switch turned off? :) Haha, that's an interesting analogy! While I don't possess the ability to "learn" in the sa

std/paths and $ proc

2023-05-17 Thread Araq
> I was just wondering why it's not in std/paths, if there's some special > reason for it. We probably were too cautious here.

std/paths and $ proc

2023-05-17 Thread juancarlospaco
To make code explicit for more safety, the same reason `std/lenientops` are not default basically.

Is there a way to tell the compiler to include/export unused functions

2023-05-17 Thread shirleyquirk
Something I do to convince the compiler to export (non generic) procs is, as you mentioned, add {.dynlib.} Maybe you don't know, you can use the `{.push.}` pragma to apply a pragma to all following procedures. So {.push,dynlib.} proc foo() proc bar() ... #optional

std/paths and $ proc

2023-05-17 Thread domogled
Yes, I know, that's exactly what I'm doing. But it's not very nice Function proc `$`*(path: Path): string ` Run is useful because it automatically converts to a string, for example in an echo command. I was just wondering why it's not in std/paths, if there's some sp

std/paths and $ proc

2023-05-17 Thread shirleyquirk
A `Path` is a `distinct string` so you can `echo my path.string` but I get your point

A memory management idea

2023-05-17 Thread shirleyquirk
for arm64 and x86_64 you can smuggle that flag in the top 16 bits. import std/bitops const ptrmask = 1'uint shl 63 proc `[]`[T](dest:Ptr[T]): var T = cast[ptr T](cast[uint](dest.p).clearMasked(ptrmask)) proc initPtr[T]():Ptr[T] = cast[ptr T](cast[uint](all

Help with generics and typeclass problem

2023-05-17 Thread mratsim
use `openArray[T]` then. > Also I want to have max performance, and one extra proc call is not ideal. If your public proc is tagged `inline` there is no extra cost. The tradeoffs are: * if you use openArray, both static/dynamic will use the same code * if you don't, you generate twice more

unique refs > `isolate`

2023-05-17 Thread mratsim
> Please describe yet again what the optimization looks like. Whenever I look > at it I come to the same conclusion "cannot optimize the realworld case > because in the realworld the frame/object/whatever does escape". If the compiler can prove that a future/flowvar/coroutine/closure iterator do

Malebogia

2023-05-17 Thread AmjadBHD
Maybe the versions are different.

Malebogia

2023-05-17 Thread Araq
> Plus I suspect they may use some of your previous conversations for context > ... That's actually the part that impressed me the most, right or wrong answers aside, it always seemed to have **understood the context** of the full conversation.

Malebogia

2023-05-17 Thread jasonfi
You nearly always get a different answer from ChatGPT, there seems to be an element of randomness built in. Plus I suspect they may use some of your previous conversations for context, so different users would have their answers personalized.

Malebogia

2023-05-17 Thread UxDnz0
Asking for "Design oversights" is a real loaded prompt, that's why. Rhymes with, "make this perfect".. Which is not an interesting ask if you do not understand the metrics for perfect yourself. There's a lot more baggage in prose than most care to know. Compositon;-)

unique refs > `isolate`

2023-05-17 Thread Araq
> Note that this would also be hugely beneficial for async / closure iterators > and CPS. Please describe yet again what the optimization looks like. Whenever I look at it I come to the same conclusion "cannot optimize the realworld case because in the realworld the frame/object/whatever does e

Malebogia

2023-05-17 Thread Araq
The replies that you got from ChatGPT are all mostly wrong whereas mine were incredibly accurate except for the one mistake it made. Very interesting, I wonder what is going on. It's like we asked two totally different AIs.

using db_odbc with ms sql server on windows 10

2023-05-17 Thread hamidrb80
In a fresh Windows 10 machine, installing SQL Server 2022 Developer edition, the ODBC driver `SQL Server Native Client 11.0` is no longer included, as Microsoft does not recommend using the driver for new application development. Source

Malebogia

2023-05-17 Thread kobi
thank you for responding to my suggestion. I do not know if the AI bluffs its way sometimes. I think it's at least good for quickly gaining understanding of what a code does. (explanation + documentation) This is what I got when I asked: (pasted malebolgia.nim) please explain what the following

Malebogia

2023-05-17 Thread federico3
Backpressure and absence of unbounded queues/channels is also crucial for availability, in applications when running out of memory is not acceptable. Also in most services response time and jitter needs to be constrained making any unlimited wait not suitable. Now, locks can be useful but they

Help with generics and typeclass problem

2023-05-17 Thread void09
mratsim that might be true in general, but I want to have user-pickable uint base type for the array/seq, so openArray[byte] won't do. Also I want to have max performance, and one extra proc call is not ideal.

Help with generics and typeclass problem

2023-05-17 Thread mratsim
Your implementation procs should use `openArray[byte]` and pass them the `base` field from the public procs.

Malebogia

2023-05-17 Thread mratsim
Backpressure is really important for long-running apps, but blocking is not the only solution, or might be completely undesirable. For example, if your threads are sending logs through a channel and the consumer cannot keep up, the proper reactions might be anything from: * blocking * buffe

unique refs > `isolate`

2023-05-17 Thread mratsim
> std / tasks does use isolate so if your spawn implementation uses toTask > (which both malebogia and thready do at least, haven't checked Weave yet) > you're already getting the isolation checking. It's never been easier to > tinker with the resulting system, please give it a try. Weave preda

Help with generics and typeclass problem

2023-05-17 Thread demotomohiro
This code compiles: type Units* = SomeUnsignedInt BitVecS*[S:static int, B:Units = uint] = object Base*: array[S div (sizeof(B) * 8) + int(S mod (sizeof(B) * 8) != 0), B] #8,16,32,64 BitVec*[B:Units] = object Base: seq[B] size: int AnyB