profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ztellman/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

clj-commons/aleph 2370

asynchronous communication for clojure

dakrone/cheshire 1335

Clojure JSON and JSON SMILE (binary json format) encoding/decoding

clj-commons/manifold 875

a compatibility layer for event-driven abstractions

ptaoussanis/nippy 862

High-performance serialization library for Clojure

ztellman/automat 573

better automata through combinators

clj-commons/potemkin 506

some ideas which are almost good

ztellman/gloss 429

speaks in bytes, so you don't have to

clj-commons/byte-streams 362

a rosetta stone for jvm byte representations

ptaoussanis/clojure-web-server-benchmarks 348

Clojure web server benchmarks

reiddraper/simple-check 285

QuickCheck for Clojure

push eventztellman/dirigiste

ztellman

commit sha 6449923b7865fcda1d4a0acadac7bc985ff5766d

update target JVM version

view details

push time in a month

created tagztellman/dirigiste

tag1.0.0

centrally-planned object and thread pools

created time in a month

push eventztellman/dirigiste

ztellman

commit sha 5f313d3d88e4091e3f60ba04ed5d5120cd4ca56a

mark 1.0.0

view details

push time in a month

pull request commentclj-commons/manifold

Force bindings inside `let-flow` to be unique

I'm sorry for the headache, but I think the correct thing to do here is to let variables be shadowed the way they would be in a normal let form, such that a in the body is whatever the last-bound a is. I'm assuming this is what you originally expected?

tanzoniteblack

comment created time in 2 months

issue commentlacuna/bifurcan

Possible accidental mutation

Hmm, that does look like a bug, especially the magic length of 32. Let me take a look.

On Mon, Jul 12, 2021 at 10:15 AM, GTRI-nathan ***@***.***> wrote:

Hi, first off, very cool library & benchmarks!

I'm not sure if I'm doing something wrong or making an incorrect assumption, but I think I've found a bug causing accidental mutation in List in 0.2.0-alpha6, see my minifed reproducer:

import io.lacuna.bifurcan.List;

public class Test {

    public static void main(String args[]) {

            int size = 32;

            List<Integer> a = new List<Integer>();

            List<Integer> b = new List<Integer>();

            for (int i = 0; i < size; i++) {

                    a = a.addLast(1);

                    b = b.addLast(1);

            }

            List<Integer> ap = a.set(15, 2);

            List<Integer> bp = b.set(15, 2);

            List<Integer> z = null;

            // Comment out, and the equals is true

            z = ap.set(15, 3);

            System.out.println("a: " + a);

            System.out.println("b: " + b);

            System.out.println("ap:" + ap);

            System.out.println("bp:" + bp);

            System.out.println("z: " + z);

            System.out.println("Should be true: " + ap.equals(bp));

    }

}

Will print:

~/test ➜ javac -cp "./bifurcan-0.2.0-alpha6.jar" Test.java http://test.java/ && java -cp ".:./bifurcan-0.2.0-alpha6.jar" Test

a: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

b: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

ap:[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

bp:[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

z: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

Should be true: false

Commenting out the z = ap.set(15,3); line, or changing the size to anything less than 32 will make the result true.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lacuna/bifurcan/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAHUP746AYEFUAQWYTN5S3TXMPLHANCNFSM5AHIKWNQ .

GTRI-nathan

comment created time in 2 months