Infering base type in macro

2024-02-29 Thread ratchet
Thanks I've missed it, seems to do exactly what I wanted.

Slow image processing with pixie

2024-02-29 Thread MisterDrgn
Thanks for the suggestions. I will play around with this over the weekend. I had considered initializing the data structure at the desired final size, but then didn't do it. I guess what happened was that the nim profiler told me this part of the code was taking up a pretty small percentage of t

Wishlist: Ideal UI library for Nim

2024-02-29 Thread elcritch
> Their approach is to use a native GPU-rendered context, using either wgpu or > tiny-skia (based on the widely-used Google 2D canvas project called Skia), > and provide a set of controls which can be themed and adapted for various use > cases. Fidget runs this way. It runs into performance iss

Slow image processing with pixie

2024-02-29 Thread guzba
This is a much better explanation of what I was trying to say. One other tip is if you need to write raw pixels to a file, you can use the pointer + len version of writeFile along with the image.data[0].addr pointer + image.data.len * 4 byte len.

Slow image processing with pixie

2024-02-29 Thread thecryptogeek
As pointed out by guzba, using a a sequence the way you are using it here will be slow. It's a very common way to go about things if you are coming from a language like Python. A very naive way of implementing a dynamically sized array would do something like this under the hood: When you init

Infering base type in macro

2024-02-29 Thread Vindaar
You'll want to use `getType`, `getImpl` and friends. Depends a bit on your exact use case, but creating a working example (that is a bit useless), for example: import macros type MyInt = int proc test(a: MyInt): void = discard macro foo(fn: typed): untyped = let fn

Infering base type in macro

2024-02-29 Thread ratchet
Hey, I'm trying to do some interop with another language during compile time and I'm wondering if there's a way to infer the base type of an object by somehow climbing the AST either forwards from root or backwards from a leaf (preferably backwards). Say I have this case impost st

[arnetheduck] `nph` opinionated formatter v0.5

2024-02-29 Thread arnetheduck
[v0.5.1](https://github.com/arnetheduck/nph/releases/tag/v0.5.1) fixes some small annoyances found in fluffy - [nlvm](https://github.com/arnetheduck/nlvm/pull/65) had its rite of `nph` passage as well - fluffly and nph both show strategies for checking formatting in CI.

Dr Oz Diabetes CBD Gummies Blood Sugar Blood Sugar Does It Work Or Not?

2024-02-29 Thread AguilarRbert
╰┈➤Official Website:- ╰┈➤Facebook Pages:- Dr Oz Diabetes CBD Gummies Blood Sugar:The regime permits remedy all p

Using NiGUI, open a second window from main window

2024-02-29 Thread MauroG
Thanks to all. I tried using 2 files (one per window) but to no avail. The problem is given to me by app.init() which there must only be one and in any case it must be present when the window is created. Thanks again for the examples.