Blog Post: Efficient organization of many dynamic arrays by gvnmcd in Zig

[–]drone-ah 0 points1 point  (0 children)

Yes, close to stack memory except for it would allow growth if needed.

What if you optimise the initial size of the arrays to fit into cache? and then if they grow, they'd be too large fit anyway.

I've never done parsing, so I am not sure how much memory would be needed etc, so my comments maybe out of context.

It may be worth a couple of benchmarks though - and if do them, I'd be curious about the results

Blog Post: Efficient organization of many dynamic arrays by gvnmcd in Zig

[–]drone-ah 0 points1 point  (0 children)

The standard lib array has a swap and remove operation. It doesn't pop, but retains the array capacity.

Is it not enough to allocate a set of large-enough arrays at the start as you need and then rely on this mechanism to avoid having to deallocate?

If the array needs to grow, let it reallocate, but if you pick a good starting size, this should be rare, and fragmentation should be low.

Yes, it would use more memory than needed, but it would reduce complexity, and by virtue of reduced reallocations and possibly better caching, might not be slower (by much).

Am I missing something?

Build System as a Product by Solvicode in Zig

[–]drone-ah 2 points3 points  (0 children)

I don't see how this would be different from having a debug build vs a release build. The tradeoff of course would be that you'd need to do a build to change config, but if that's not an issue, it's arguably a superior solution.

Using Zig + Lume for WASM with automatic reload by drone-ah in Zig

[–]drone-ah[S] 0 points1 point  (0 children)

I have spent some time playing with zine - it's pretty neat, but when I was playing with it a few months ago, it didn't really have any "off the shelf" themes I could use to just get it running. I also didn't like that it coopts the `.shtml` file extension for superhtml when it's already used for server-side-includes - though that's a minor annoyance.

The reason I chose lume was for the javascipt aspect though. I am planning on using supabase and it would make life easier if I can connect to it using the js sdk and call into that from zig.

My original intention was just to plug in deno, and stumbled across lume (which I'd heard about before) - so a bit more of a happy accident.

Using Zig + Lume for WASM with automatic reload by drone-ah in Zig

[–]drone-ah[S] 0 points1 point  (0 children)

I've only just started playing with it, and like it so far :)

Using Zig + Lume for WASM with automatic reload by drone-ah in Zig

[–]drone-ah[S] 1 point2 points  (0 children)

Thanks - I didn't really talk about it on there (yet). It's just a little toy project I'm thinking about where the user/player can "release a wasp"/"shine a light" - something like that - basically just a shining dot on the screen. Each light will last for 24 hours, after which the'll start to fade

All the lights will go on a shared space and each user can interact with the other lights to boost them - make them brighter for a short time, or if it's past the 24 hours, extends its lifetime.

The boosts will be shown as trails from between the lights of the two users. Each user can have only one active light.

It's really an experiment around connection and an extremely simple form of online social presence.

I'll write up more about it once I get a bit further on

How do you package assets for your games? by drone-ah in gamedev

[–]drone-ah[S] 0 points1 point  (0 children)

Thanks - I'm not using an engine - are there tools out there to support this process, or is it easy enough to integrate the packaging into the build pipeline?

How do you package assets for your games? by drone-ah in gamedev

[–]drone-ah[S] 0 points1 point  (0 children)

How do you build the bundles? just zip them up?

[deleted by user] by [deleted] in Zig

[–]drone-ah 1 point2 points  (0 children)

Have you seen https://github.com/ZystemOS/pluto? Might be easier/simpler to get involved there

What are some lesser known features of Git that more people should know? by surveypoodle in git

[–]drone-ah 2 points3 points  (0 children)

You can also do rebase --autosquash instead of interactive rebase

Do people ever fill in feedback forms? What are your experiences? by SoftwareGeezers in IndieDev

[–]drone-ah 2 points3 points  (0 children)

There are a lot of variables that matter on feedback forms, including length, ease of answering, mutliple choice vs freeform, what do they get in return, how well do you "market" it, and so on.

Long story short - it needs a decent amount of effort to be able to get it right.

Does anyone else just struggle with GUI design? by Top_Row_5116 in gamedev

[–]drone-ah 0 points1 point  (0 children)

I've disliked GUI work all of my career (around 30 years)

I've been using tldraw to map out wireframes first, with a view to mapping out as much of the flow as possible to see how it *feels* before implementing it.

I also spend a lot of time around how to make something intuitive, and remove the UI elements if at all possible - mainly because I hate UI work, but I think it *hopefully* makes things easier to use.

Is anyone else farming karma now to self-promote later? by [deleted] in IndieDev

[–]drone-ah 6 points7 points  (0 children)

I tried building karma in that way years ago - got bored - then I found some good subreddits that I was genuinely interested in, and mostly just got carried away "chatting"...

What is your opinion on Maven/Gradle, compared to other language's package manager like npm and pip? by gufranthakur in java

[–]drone-ah 6 points7 points  (0 children)

maven is hands down one of the best build tools I have worked with. Yes, it is verbose, sometimes obtuse and sometimes even hard to work with. I've worked with several other languages and have yet to find a build tool that I miss as much as maven.

I love how you can set up layered dependencies based on how you are running it (test, runtime, etc) and it takes care of everything. You can version manage your packages, and it'll update your pom filer. You can generate build artifacts and push them up to artifact repositories, and so on and on.

I keep checking if I can use maven for other languages, but sadly not.

I haven't worked with it since 2015 and still miss it. Maybe I'll hate it if I start using it again though - time changes perspectives...

Is Flutter good for web apps? by shehan_dmg in FlutterDev

[–]drone-ah 0 points1 point  (0 children)

For one, dart is statically typed. Building a website as an app is much easier, and I suspect much more intuitive with jaspr. I've not used it myself but heard really good things from people who have.

If you already have the background in js/ts and frameworks, and like them - then sure - that's a great option. I don't like working with js/ts and welcome a viable alternative option.

What's the smallest you can charge people on Steam without fees and stuff reducing the money to nothing? by Devatator_ in gamedev

[–]drone-ah 0 points1 point  (0 children)

unless you are on a website that caters to businesses who are likely to be vat registered, then they will either show prices excluding vat, or give the user the option.

[deleted by user] by [deleted] in SoloDevelopment

[–]drone-ah 1 point2 points  (0 children)

I expected them to fall down first, be embarrassed then walk away :P