With what parameters does echo call fwrite? Trying to implement fwrite in Nim.

2023-11-01 Thread Charles
Hello, I'm writing a kernel in Nim for fun and I'd like to be able to print things with echo. I added stubs for flockfile, funlockfile and fflush, as well as a full function for fwrite that adds characters to the framebuffer. I don't understand the parameters I'm receiving though. My fwrite pr

Cosmo3 multi-os fat binaries with threads

2023-11-01 Thread elcritch
Wow, the Cosmopolitan folks have been busy: The interesting part to me is:

Labelled exceptions for smoother error handling

2023-11-01 Thread PMunch
Whoops, fixed it now!

Malebogia Locker is not re-entrant?

2023-11-01 Thread Araq
You can easily use Malebolgia with any lock type of your choice.

trying to parallelize zippy file extraction on Windows

2023-11-01 Thread tcheran
I've moved to my old "faster" Windows PC. Despite being an older model: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz 2.70 GHz with just 8 GB RAM (older and I assume slower SSD, maybe not), it's not plagued by the same CPU-hungry Anti-Virus Anti-Malware software running in background. The situation i

Malebogia Locker is not re-entrant?

2023-11-01 Thread lou15b
> I don't believe in re-entrant locks, they mostly hide sloppy thinking. I can't disagree :P. > In your example, distinguish between p2 and lockedP2 that calls p2 and you'll > be fine. That works in the toy example above, but unfortunately not so much in the code base I'm dealing with. The sit

Labelled exceptions for smoother error handling

2023-11-01 Thread ElegantBeef
Could be cause it should be 'coarse error handling'.

trying to parallelize zippy file extraction on Windows

2023-11-01 Thread Araq
Also, for parallelization try Weave and Maleboglia.

trying to parallelize zippy file extraction on Windows

2023-11-01 Thread tcheran
Ok... I will try to my other older but "free-of-contraints" Windows laptop at home (there I had 1.6 amd I've just upgraded to Nim 2.0). Regarding the false AV positives you're right... but I'm particularly cautious because I'm pleased to use Nim for doing occassionaly some useful stuff at work..

Labelled exceptions for smoother error handling

2023-11-01 Thread ingo
> Or did you mean something else? Just that most of the time I see them as three different things, that can "flow together" at times. In that case one does not want to see a whole line of symbols. > `superlog` Bookmarked.

trying to parallelize zippy file extraction on Windows

2023-11-01 Thread tcheran
Hi to all, I was trying to speed-up zip archives decompression by running more threads in parallel. I have a Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz 2.21 GHz laptop with 16 GB RAM and SSD, so not exactly a power horse, but it still have 4 Cores, 8 Threads. I've a folder containing 4x .zip file

trying to parallelize zippy file extraction on Windows

2023-11-01 Thread Yardanico
> old Nim 1.4.4 for some practical reasons related to avoid false malware > detection It's a bit offtopic, but have you tried Nim 2.0 or the latest Nim > 1.6.x? I think the situation with false AV positives improved a bit in the > recent releases.

Error: type mismatch: got

2023-11-01 Thread janAkali
The specific error at line 144 is because you need to convert integer to enum: return float(pieceValue[dest.piece_type.to(int).piece] - pieceValue[src.piece_type.to(int).piece]) Run But, there's a lot more: 1. some 'else's miss ':' 2. positionChange at l

Labelled exceptions for smoother error handling

2023-11-01 Thread PMunch
Thanks @Araq! The course is in opposition to fine grained. Basically the difference between a try/except every statement to make sure you know what caused the exception, and having one big try/except around everything. @cblake, this was careful wording on my part. I had initially written _[wher

Malebogia Locker is not re-entrant?

2023-11-01 Thread Araq
I don't believe in re-entrant locks, they mostly hide bad design. In your example, distinguish between `p2` and `lockedP2` that calls `p2` and you'll be fine.

Labelled exceptions for smoother error handling

2023-11-01 Thread ingo
Nice. Could logging or debug messages be done in a similar way? € for try except, Đ for debug, ₺ for logging ;)

Malebogia Locker is not re-entrant?

2023-11-01 Thread lou15b
Or perhaps more accurately, TicketLocker? I had been hoping to use malebogia for accessing the assorted globals in the code I'm working on, but this is a showstopeer for me in that regard. Or am I missing something (again)? import malebolgia/lockers type AObj = object

Error: type mismatch: got

2023-11-01 Thread GyatsoYT
/home/runner/Engine/evaluate.nim: 144:28 Error: t ype mismatch: got but expected one of: proc `[]`(s: string; i: BackwardsIndex): char first type mismatch at position: 0 proc `[]`(s: var string; i: BackwardsIndex): var char first type mismatch at position: 0 proc `[]`[A

Labelled exceptions for smoother error handling

2023-11-01 Thread cblake
If you just want to get a "raise location" into various messages for the purposes of better logs then you could do something like the Linux glibc `backtrace_symbols` (3) at the point of the `raise` (`gcc` itself provides mostly what is needed via `__builtin_return_address`). On the one hand that

Labelled exceptions for smoother error handling

2023-11-01 Thread Araq
Turns out I don't understand the phrase "course error handling", but anyway. Really nice article, I like it very much!

Labelled exceptions for smoother error handling

2023-11-01 Thread Araq
Typo here, I think: > we instead use course error handling it looks better To Be Continued...

Error: type mismatch: got

2023-11-01 Thread GyatsoYT
So I am making a chess engine in nim and I am using python-chess module through nimpy and I get the following error in my code please help me if you can... import nimpy import std/algorithm import options import sequtils, strutils import std/tables let chess = pyI

Labelled exceptions for smoother error handling

2023-11-01 Thread PMunch
Had some fun playing around with a novel (as far as I'm aware) concept for dealing with exceptions. Wrote a small package and wrote a short article on it for those interested:

https://www.facebook.com/ReviveCBDGummiesUS/

2023-11-01 Thread rubencfisher
Revive CBD Gummies:- But with this strong fitness supplement, you are not handiest going to defend yourself from the sizzling warmness effects however having first-rate mental and physical relief. Official Website@:- Official Facebook@:-