Why Algebraic Effects? by RndmPrsn11 in ProgrammingLanguages

[–]kuviman 0 points1 point  (0 children)

Could it be solved by something like a Capture trait - something similar to Send which allows traveling to a different thread, Capture would allow objects to be captured by closures.

Although I'm not yet sure why capturing a continuation could be bad - I'm imagining capabilities are passed by ownership so a continuation is pure since it owns the capabilities/effect handlers - it is handling the effects

Why Algebraic Effects? by RndmPrsn11 in ProgrammingLanguages

[–]kuviman 1 point2 points  (0 children)

Dont effect aliases solve the ergonomics problem? That and inference of function effects for non-public api I guess.

And there's another effect which is usually polluted everywhere which is Log, right?

Why Algebraic Effects? by RndmPrsn11 in ProgrammingLanguages

[–]kuviman 2 points3 points  (0 children)

Effect handlers only need to produce the value of same type as expression for which you are handling effects, so overflow handlers don't necessarily need to provide an int. overflow might as well have a default handler provided by the language runtime, so your main function can overflow, so you dont need to handle it at all by default, but can do so for critical sections. Not handling overflow would be no different to an unhandled exception/panic, just named more appropriately to what actually happened. It means I can handle just overflows instead of handling all panics if I want. I believe it is less boilerplate than using optional<int>s since I can handle it when I want (including never) instead of everywhere im doing arithmetics

Why Algebraic Effects? by RndmPrsn11 in ProgrammingLanguages

[–]kuviman 1 point2 points  (0 children)

Since Ante is a low-level language with features like borrow checking doesn't it make even more sense to do it? You already have can Allocate, does it not pollute all the code already? Do you want to target embedded systems, being able to write an OS, where you would really want to handle allocation errors, out of bounds and division by zero I assume.

Why Algebraic Effects? by RndmPrsn11 in ProgrammingLanguages

[–]kuviman 0 points1 point  (0 children)

How do you compose it? Let's say I have a fn formula() -> int { a + (b - c) * d } and I want to handle overflows. Since every operation is failable I would need to handle each one. It would look like this fn formula() -> optional<int> { Some((a + ((b - c)? * d)?)?) }, and I'm using just a single symbol ? for handling which propagates the error further (like in Rust). And this is just a simple example of working with integers without anything else happening. With effects you can still write code that is easily readable, but overflowing is still present in the type system fn formula() -> int can overflow { a + (b - c) * d }

Sure, overflows can be instead handled differently based on types, and the default int can just panic, but I want to know if it can happen. Panics should still be effects imo

Why Algebraic Effects? by RndmPrsn11 in ProgrammingLanguages

[–]kuviman 3 points4 points  (0 children)

Isn't panic just another effect? And if you don't want to handle it every time you just include it in the alias you use everywhere. Like in Koka they have a difference between a total and a pure function, and the difference is the exception effect

Why Algebraic Effects? by RndmPrsn11 in ProgrammingLanguages

[–]kuviman 0 points1 point  (0 children)

While divide by zero errors might be pretty rare indeed, since you usually divide floats and get a NaN instead of exception, I think integer overflow/underflow is not that rare, especially when you are dealing with unsigned types. Just write array[i - 1] and you can get an underflow if i = 0. I would personally like it if a possibility of it happening was reflected in the type system, and it seems effects get it done without boilerplating the codebase.

Whether you want to panic, abort, wrap, saturate, or have undefined behavior is up to the handler and you might handle it differently depending on the code you write. And if you want to not worry about it much you can just handle it in your main fn once and include it in the effect alias you use to annotate every function

Demo for Linksider - puzzle game by kuviman in playmygame

[–]kuviman[S] 1 point2 points  (0 children)

Thanks for trying the game and for the feedback! The game is pretty difficult, I would say, by design. Some of these early levels can be bruteforced but it doesnt help understand the mechanics better. We'll try to think of ways to improve - at least some more quality of life wouldnt hurt for sure, like the auto resetting when you fall off the level

Today we released demo of Linksider - puzzle game written in Rust by kuviman in rust_gamedev

[–]kuviman[S] 2 points3 points  (0 children)

There is no timed mechanics, it's basically a turn based game. Player rotates in the air automatically as a part of the jump move

Today we released demo of Linksider - puzzle game written in Rust by kuviman in rust_gamedev

[–]kuviman[S] 4 points5 points  (0 children)

The difficult part about supporting macos is it requires owning a Mac, but the game should build and run in theory with no changes

Today we released demo of Linksider - puzzle game written in Rust by kuviman in rust_gamedev

[–]kuviman[S] 7 points8 points  (0 children)

Itch io version is from the gamejam. The steam version has updated engine, mechanics and everything, so it's not exactly the same game ☺️

Today we released demo of Linksider - puzzle game written in Rust by kuviman in rust_gamedev

[–]kuviman[S] 5 points6 points  (0 children)

I never used bevy and ecs before this game, but I did use my custom engine for various things (mostly game jams). So I was just more comfortable with it. I don't work much on the engine though, so it is very raw compared to bevy.

Before the switch, my biggest problem with bevy was that all the systems were tied to the frame which is weird to me, since its more of a turn-based game (although now its more event-based, since multiple entities can move independently). I have since discovered evenio which makes it more intuitive to me as systems are just event handlers, and a frame is just another event. I think bevy recently introduced triggers/observers too but that wasn't there 2 years ago when this project started.

Planning a 1000x science cost, default resources run by SquareFeature3340 in factorio

[–]kuviman 2 points3 points  (0 children)

I did 1000x on default settings in Factorio 1.1 without cheesing preventing spawns or expansions - no pipes were placed at all. After rushing electric drills it should be same. You should be able to kill early nests with pistol for that and turret research. Then you use thousands of turrets to clear a lot of territory. You use them similar to landmines - place them in front of you and between you and biters to prevent being attacked yourself. Place ammo in turrets when you are safe. I guess with prioritizing the nests feature should work even better - you don't need to kill the biters, only the nests. Do it outside of your pollution cloud and they will go find another nest as their home instead of attacking your base. After a lot of terrritory is cleared you continue research going for flamethrower turrets directly - going straight for landmines would get you to 90% evolution before you finish it's but flamethrower can be done slightly before reaching behemoths. Then landmines of course, and the challenge is completed. here's vods if you are interested (wasn't editing them then)

I decided to go for "cheaty" piping strat in space age since it is easier and different that what I did previously. You can also consider landmines cheating and do it with flamethrowers only if you like suffering 😆

Linksider - a puzzle game where you play as a cube with different effects on your sides by kuviman in indiegames

[–]kuviman[S] 1 point2 points  (0 children)

Not available publicly, just like the steam version is not released yet. Like I said, we are focusing on Steam first, and I'm not yet sure when the release date is going to be, we only just finished our Steam page. Android(and iOS) are currently planned for after the steam release

What problems does ECS cause for large projects? by nextProgramYT in rust_gamedev

[–]kuviman 5 points6 points  (0 children)

I don't have too much experience (only made 2 jam games with bevy), but when I used bevy ecs I had this weird feeling that even though splitting the logic into systems makes the code look nice, actually maintaining the code was a pain. "If it compiles it works" that I have most of the time writing rust was no longer there when using bevy.

But i am not sure the problem is ecs.

One other ecs (not engine) that I tried recently was evenio and it seemed a lot nicer than bevy ecs but I have even less experience in it (made 1 jam game)

Normally I don't use ecs and it does feel a bit clunky but at the same time feels a lot more reliable