profile
viewpoint
WaDelma I am a programmer interested in game programming, procedural content creation, algorithm visualization and programming languages.

WaDelma/galgebra 5

Highly WIP library for geometric algebra

VoxWave/dot-dodger 1

a dot dodging game for mature dot dodgers such as myself.

TheSoftwareFactory/DLearnHelsinki-backend 0

Back end for survey app measuring global competencies

VoxWave/CYFighter-Zesty-Green-Falacious-Refuse 0

A Fighting game engine developed with an architecture oriented approach.

VoxWave/CYFME 0

This is a repository for a map editor that is compatible with the private project CYFighter

VoxWave/dungenon-drawer 0

a drawing program for dungenon-rs

VoxWave/dungenon-rs 0

Dungeon generation on rust.

WaDelma/100-files 0

Simple script for finding all directories that have over 100 files

pull request commentamethyst/specs

Allow reentrant laziness

bors r+

Previous bors timed out

WaDelma

comment created time in 14 days

push eventWaDelma/plfa

Delma

commit sha fc8817c9a41350cb2b6e9e9e6e65a99b7174aba7

Start of quantifiers

view details

Delma

commit sha 78f76c652418bfeaf915f4810812ab85ab06005d

Merge branch 'master' of github.com:WaDelma/plfa

view details

push time in a month

Pull request review commentamethyst/specs

Allow reentrant laziness

 impl LazyUpdate {         LazyBuilder { entity, lazy: self }     } -    /// Allows to temporarily take the inner queue.-    pub(super) fn take(&mut self) -> Self {+    pub(super) fn clone(&self) -> Self {

We could probably just derive Clone instead of doing this. Does that have any down sides? Well at least we cannot remove that later without breaking change.

WaDelma

comment created time in a month

pull request commentamethyst/specs

Allow reentrant laziness

Now the alternative of applying reentrant lazy updates on the same maintain call is implemented.

WaDelma

comment created time in a month

push eventWaDelma/specs

Delma

commit sha 3450e6a3671cb14e8bcaf4bda2d854a3fc9220ab

Change semantics to immediately apply reentrant LazyUpdates

view details

push time in a month

pull request commentamethyst/specs

Allow reentrant laziness

I think that the semantics of applying reentrant LazyUpdate calls immediately is probably the better way to go. The purpose of LazyUpdate is not to delay actions, but allow more flexibility and executing it's modifications as early as possible is most likely better. I'll look at how that could be implemented later.

WaDelma

comment created time in a month

push eventWaDelma/plfa

Delma

commit sha 2dfe910bfaeabdfa988ccf45ad05b071eac9d1b3

Stuff

view details

Delma

commit sha 2dd11693eade1337ba57f5deb509e88b16879e53

Merge branch 'master' of github.com:WaDelma/plfa

view details

push time in a month

push eventWaDelma/plfa

Delma

commit sha 6d1aa6146ff0dc941aea6f1e1f7f88656a327870

Doing stuff

view details

push time in a month

PR opened amethyst/specs

Allow reentrant laziness

<!-- Before creating a PR, please make sure you read the contribution guidelines. --> <!-- Feel free to delete points if they don't make sense for this PR. --> <!-- You can tick boxes by putting an "x" inside the braces, or by clicking them once the comment is published. -->

<!-- Please use "Fixes #nr" and "Related #nr", respectively. -->

Checklist

  • [x] I've added tests for all code changes and additions (where applicable)
  • [ ] I've added a demonstration of the new feature to one or more examples
  • [ ] I've updated the book to reflect my changes
  • [ ] Usage of new public items is shown in the API docs

API changes

None <!-- Please make it clear if your change is breaking. -->

Description

Before this change if one tried to do World::system_data<Read<LazyUpdate>>() within LazyUpdate::exec on would get the following error:

thread 'main' panicked at 'Already borrowed mutably: InvalidBorrow', /home/delma/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.7.2/src/cell.rs:103:9
stack backtrace:                                                                                                                                              
   0: backtrace::backtrace::libunwind::trace                                                             
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized                                                         
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66 
   2: std::sys_common::backtrace::_print_fmt                                                             
             at src/libstd/sys_common/backtrace.rs:78                                                    
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt                  
             at src/libstd/sys_common/backtrace.rs:59                                                    
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1504
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:511
  11: rust_begin_unwind
             at src/libstd/panicking.rs:419
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:111
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1268
  14: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  15: specs::world::World::maintain

This problem arrise in our project when I refactored code such that piece of code so that previously wasn't used inside LazyUpdate::exec was now used there. The piece of code is also used from outside of LazyUpdate so just removing LazyUpdate usage in it is non-trivial.

This PR changes the behavior to allow reentrant LazyUpdate usage. After the change reentrant LazyUpdate::exec:s will be applied on the next World::maintain. This was the easiest to implement, but it might be better to apply them on the same maintain call. Not sure which semantics are better, but I think allowing this kind of re-entrancy makes using LazyUpdate more robust.

+34 -13

0 comment

2 changed files

pr created time in a month

create barnchWaDelma/specs

branch : laziest-update

created branch time in a month

push eventWaDelma/specs

Jan Jedelský

commit sha 9c1f54f5e9829d6acd28a6568d3c20defc298784

Add Join-able entries API to Storage

view details

WaDelma

commit sha a651ec559488d1b4e2097e59c1a2af1b26a2336d

Updates docs Co-Authored-By: jjedelsky <8687359+jjedelsky@users.noreply.github.com>

view details

Jan Jedelský

commit sha c647f8f2cf85f794924aa4662fd092f29e9e3b59

Docs updates

view details

Jan Jedelský

commit sha be70a33f56a9950577b41d49366bbb42efba6c68

Add test

view details

Jan Jedelský

commit sha ee4e0999a872b96d4019b8403c968a81f98effc5

Add example

view details

bors[bot]

commit sha 182171a6e78e146611d932ae7f45f8e4098bef0d

Merge #518 518: Add Join-able entries API to Storage r=torkleyy a=jjedelsky This makes it possible to read and insert component at same time inside join iteration. `Storage::entries` would likely need more docs, however I can not find any really minimal example. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/518) <!-- Reviewable:end --> Co-authored-by: Jan Jedelský <xjedelsk@fi.muni.cz> Co-authored-by: WaDelma <wadelma@users.noreply.github.com>

view details

Thomas Schaller

commit sha 20372dcc1ed430bf58744c5bf5c3ea5b828f3945

Register Velocity in hello world chapter

view details

bors[bot]

commit sha 79bf6212b4d7df6ee755678cbeaa55db65b93bb5

Merge #526 526: Register Velocity in hello world chapter r=torkleyy a=torkleyy Fixes #445 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/526) <!-- Reviewable:end --> Co-authored-by: Thomas Schaller <torkleyy@gmail.com>

view details

Thomas Schaller

commit sha 331de297e7a1e558e6a0a623ef5d1c7baf1fe5cf

Clarify dense property of DenseVecStorage

view details

Thomas Schaller

commit sha 8e564fa98f8a88d570804fc99ff4a0e85843905b

Fix grammar of RestrictedStorage docs

view details

bors[bot]

commit sha ddd7fd6a29f9ecb261f2a19571b7b2f770493a28

Merge #527 #528 527: Clarify dense property of DenseVecStorage r=torkleyy a=torkleyy Fixes #484 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/527) <!-- Reviewable:end --> 528: Fix grammar of RestrictedStorage docs r=torkleyy a=torkleyy Fixes #491 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/528) <!-- Reviewable:end --> Co-authored-by: Thomas Schaller <torkleyy@gmail.com>

view details

Michael Howell

commit sha 7492d2f5710b95dd9a2b7f262b2447b0fd385fa1

Remove Reviewable garbage from merge commits

view details

bors[bot]

commit sha 1d5d803985ba0753544a7841a012bf05b911f837

Merge #530 530: Remove Reviewable garbage from merge commits r=torkleyy a=notriddle Co-authored-by: Michael Howell <michael@notriddle.com>

view details

Aleksi Juvani

commit sha 5b0885598fc81a44f2c45254205ddb01d0cf107a

Fix `FlaggedStorage` docs

view details

Thomas Schaller

commit sha dcfe7d46f6ab503dbbe98540a4eafe34502c0685

Clarify use of `Removed` in `FlaggedStorage` docs Co-Authored-By: aleksijuvani <3168386+aleksijuvani@users.noreply.github.com>

view details

bors[bot]

commit sha eb8510c97576eda91bcef5713355d601de511e41

Merge #531 531: Fix `FlaggedStorage` docs r=torkleyy a=aleksijuvani The documentation for `FlaggedStorage` became out of date with #489. I'm not entirely familiar with this API, so please review to see if my understanding of the changes is correct. I have however made sure that the code sample compiles. The bit about handling `ComponentEvent::Removed` first is no longer necessary because the events are in the same "channel" and in chronological order, right? Co-authored-by: Aleksi Juvani <aleksi@aleksijuvani.com> Co-authored-by: Thomas Schaller <torkleyy@gmail.com>

view details

Thomas Schaller

commit sha f12546dda8acf8da02770395fe70130d35ddba4c

Fix bug when re-killing Entity after atomic killing followed by alloc

view details

Thomas Schaller

commit sha 65b64f21446771442520c29cf745db375b9f7539

Add Storage::count and Storage::is_empty

view details

bors[bot]

commit sha a1c564ffd2fb479badfcbdba0e04520dbc11ad56

Merge #534 534: Add Storage::count and Storage::is_empty r=Xaeroxe a=torkleyy Fixes #517 Co-authored-by: Thomas Schaller <torkleyy@gmail.com>

view details

bors[bot]

commit sha b05aaf6a72958adc1ea43c0607a88f87c477a60c

Merge #533 533: Fix bug when re-killing Entity after atomic killing followed by alloc r=torkleyy a=torkleyy Fixes #514 Co-authored-by: Thomas Schaller <torkleyy@gmail.com>

view details

push time in a month

pull request commentamethyst/hibitset

Added optional serde support, including an example in the README

I seem to still be on list of people bors responds to. Is it dead or what has happened?

cisaacson

comment created time in a month

issue commentamethyst/specs

Question: Is it possible to do nested for loops?

Note that you can use Storage::get_mut to mutably get certain component for an entity.

dmitsuki

comment created time in a month

pull request commentamethyst/hibitset

Added optional serde support, including an example in the README

bors r+

lets try again :D

cisaacson

comment created time in a month

pull request commentamethyst/hibitset

Added optional serde support, including an example in the README

bors r+

Sorry for leaving this hanging.

cisaacson

comment created time in a month

issue commentamethyst/specs

Unclear relationship Entity Id and World::fetch_by_id

Also by World::fetch_mut_by_id you mean World::try_fetch_mut_by_id? That is for fetching resources which are basically some values stored in world which can be used to share some resource between systems.

Archina

comment created time in a month

issue commentamethyst/specs

Unclear relationship Entity Id and World::fetch_by_id

I think you have misunderstanding what entity is in ECS. That id returned by create_entity is the entity and nothing else. You can fetch components associated with it by that id, but there is no such thing as fetching entity.

Archina

comment created time in a month

push eventWaDelma/plfa

Delma

commit sha 4a458249c05eb135c1d6573eac62204d1e4d2949

isomorphisms and connectives

view details

Delma

commit sha c212800650398b1b42764a3e9553cba441f5a46b

Merge branch 'master' of github.com:WaDelma/plfa

view details

push time in 2 months

push eventWaDelma/plfa

Delma

commit sha 08802af7055da46b673b030796b5e6fb0bbf9bf0

Tweaks

view details

push time in 3 months

push eventWaDelma/plfa

Delma

commit sha bcaa9e531e34df659d4caa2848128a63689fa5af

Induction done

view details

push time in 3 months

push eventWaDelma/plfa

Delma

commit sha 4d6e0fd298c4e92e754ab7ae54d857eb453608dc

Redoing naturals and induction

view details

push time in 3 months

Pull request review commentamethyst/hibitset

Added optional serde support, including an example in the README

 Just add this to your `Cargo.toml`: hibitset = "0.6" ``` +## Using the `serde` feature++There is an optional feature to use `serde` for serialization/deserializtion. To enable this feature add the following to your `Cargo.toml`:++```+[dependencies]+hibitset = { version = "0.6.3", features = ["serde"]}
hibitset = { version = "0.6.3", features = ["serde"] }
cisaacson

comment created time in 3 months

Pull request review commentamethyst/hibitset

Added optional serde support, including an example in the README

 use util::*; /// Note, a `BitSet` is limited by design to only `usize**4` indices. /// Adding beyond this limit will cause the `BitSet` to panic. #[derive(Clone, Debug, Default)]+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]

Yeah, its maybe better to start with serde generated implementation and then maybe optimize it later if necessary.

cisaacson

comment created time in 3 months

PublicEvent

issue commentamethyst/specs

Add index key for entities to improve use case performance

The approach would be to modify the trait so that you can return a wrapper type Wrapper<T> instead of &mut T. This maybe requires HKT which I think can be emulated in some form already without GAT. The wrapper type would then update the index data structure upon drop to reflect any changes.

My first idea was to have some global data structure and the wrapper type would contain index to it, but after thinking a while I think the wrapper type can just contain reference to the index data structure.

damody

comment created time in 3 months

issue commentamethyst/specs

Add index key for entities to improve use case performance

I am still going to keep this open: I have an idea that might just work, but I have to experiment more. And there could be some other approaches too.

damody

comment created time in 3 months

more