profile
viewpoint

Nycto/PicoModal 218

A small, self-contained JavaScript modal library. Plain, vanilla JS.

Nycto/Hasher 185

A small Scala library for easily generating hashes (md5, sha1, sha256, sha512, crc32, bcrypt, hmacs, pbkdf2)

Nycto/AStarNim 24

A* path finding algorithm in Nim

Nycto/RBTreeNim 16

Nim Red/Black Trees

Nycto/DelaunayNim 12

Delaunay Triangulations in Nim

Nycto/PerlinNim 8

Perlin and Simplex noise generation for Nim

Nycto/QuadtreeNim 8

A Quadtree library for Nim

Nycto/DelaunayHx 7

Haxe library to calculate the Delaunay Triangulation for a set of points

Nycto/mailgun-scala 7

A Scala wrapper around the Mailgun API

Nycto/Round-Eights 3

Round Eights is an OO framework for PHP 5.3

pull request commentnim-lang/Nim

fix #14475; unittest.require now works with `nim c`; require and check now works with -d:nodejs

I believe https://github.com/Nycto/DelaunayNim/issues/3 has been fixed -- please give it a test to confirm

timotheecour

comment created time in 3 days

push eventNycto/Nim

narimiran

commit sha 5e9ebe9ec1d1df62e3b1347bb7b8c9c8a08a3cc5

move entries from the wrong changelog file [ci skip]

view details

Andy Davidoff

commit sha 56fb9096761ad401675a2367ae3681c50b7ce485

fix crash due to errant symbols in nim.cfg (#13073) [backport]

view details

Teashrock

commit sha 27fee4d8b4b47635e7d96a7a857906e6ecb98565

Deleted misplaced separator (#13085) [backport] Misplaced separator, which was constantly breaking compilation on Haiku OS, was deleted.

view details

Andreas Rumpf

commit sha 852170cc786b09e17b6bfd09bdb2ac9184b359d1

take the one good idea from --os:standalone and enable it via -d:StandaloneHeapSize (#13077)

view details

Timothee Cour

commit sha 3f78873898a2ca6346ac7b4ca48b5625b431d981

remove all remaining warnings when build nim (with -d:nimHasLibFFI) (#13084) * cleanup deprecations in evalffi + elsewhere * remove dead code getOrdValue64

view details

Ico Doornekamp

commit sha bb7273bc471da56a17b9fc10dafda71923a473ff

Use '__noinline' instead of 'noinline' for N_NOINLINE gcc attribute, this prevents clashes with systems where 'noinline' might be already defined (#13089)

view details

Tomohiro

commit sha a33b72af4960073b0dca95af3b430baade745b0b

Fix error check code in osproc (#13090) [backport]

view details

Araq

commit sha 033da35de164e4ea86e36c8c4bb366f3fc4ac01a

fixes #13072; no test case because it will be added later with more exception handling related bugfixes

view details

Araq

commit sha fcd2f305ad5ad2af37284caf7b33907afb8ad834

fixes #13070

view details

Timothee Cour

commit sha 4cd86c08427205d2e26510a07a3c6980c14e1608

typetraits: fixes #6454; genericParams; added lenTuple; added tuple type get (#13064)

view details

narimiran

commit sha e9e114058c1c8e65f0b70f7af17ff37586b56908

[backport] system/io.nim fix wrong documentation comment [ci skip]

view details

Andreas Rumpf

commit sha 3a39ab83acb5de72205f64a27ca331b470d13cf6

fixes an asyncftpclient bug; refs #13096 [backport]

view details

Miran

commit sha f7ce4e8705283235d84e171faaaf63f71ef232b8

System cleanup, part 1 (#13069) * system.nim: mark what every .pop does * system.nim: un-nest when statements

view details

Miran

commit sha c0973d1b471644569d3ef459115afc675eb64544

[backport] fix #12813, fix #13079 (#13099) Correctly remove a key from CountTable when it is set to zero.

view details

Andreas Rumpf

commit sha 767592a3c350fca6fc6f01f519a814c0498167f9

more arc features (#13098) * config update * ARC now supports 'repr' and 'new' with finalizers is supported

view details

treeform

commit sha 01a89cc473c7b98a92c6c6f9c17d294829d3858d

Remove some unused/disabled OpenSSL functions (#13106)

view details

Federico Ceratto

commit sha 1c001fe583d05ef88a8626dec958bf07d5f23ca4

Add link to posix_utils.html in posix.nim (#13111)

view details

Timothee Cour

commit sha ee1563ef33795b5ccac37921e3e4771c47c5d3fa

VM FFI: write(stderr, msg) and fprintf(cstderr, msg) now work at CT (#13083)

view details

perter lee

commit sha 1f27a2f8ab696bbbfcf4d8f0bf2748dfc1cc86ad

fix the ftp store function read the local file bug (#13108) [backport] * Update asyncftpclient.nim When use newStringOfCap function not have assign memory for the string data,so if use this address the fault is rasise. * complelete the bugfix

view details

Jasper Jenkins

commit sha bf2e052e6d97c1117603480547804dd98d1ada71

fix rtti sizeof for varargs in global scope (#13125) [backport]

view details

push time in 3 days

created tagNycto/DelaunayNim

tag0.3.1

Delaunay Triangulations in Nim

created time in 3 days

issue commentNycto/DelaunayNim

nimble test fails

Looks like this was just caused by a bad test. Should now be resolved.

timotheecour

comment created time in 3 days

push eventNycto/DelaunayNim

Nycto

commit sha a88185f1aca7673709495c14a142af90bbdda0e0

Require nim 1.2

view details

Nycto

commit sha 6087fc5df22ca7bd148eeaeb0f62fd10032fe9f7

Fix broken unit test Fixes #3

view details

push time in 3 days

issue closedNycto/DelaunayNim

nimble test fails

after fixing unittest in https://github.com/nim-lang/Nim/pull/14676, nimble test fails

before that PR, a require failure would show an error but not result in a nonzero exit code:

 [OK] Allow edges to be removed
    /Users/timothee/git_clone/nim/temp/DelaunayNim/tests/t_edge.nim(80, 29): Check failed: connections == @[p(4, 5), p(2, 2)]
    connections was @[(x: 2.0, y: 2.0), (x: 4.0, y: 5.0)]
    @[p(4, 5), p(2, 2)] was @[(x: 4.0, y: 5.0), (x: 2.0, y: 2.0)]
   Success: Execution finished

closed time in 3 days

timotheecour

push eventNycto/DelaunayNim

Nycto

commit sha 04a8ec7373fc6d6a7ce559e16da87788daf519a6

Remove checked in binary files

view details

push time in 3 days

issue closedNycto/PerlinNim

value out of range error?

Hi when compiling on certain systems the randomseed() proc is raising a value out of range error. I've changed: uint32(rand(high(int))) to uint32(rand(high(int16))) It seems to have fixed the issue, but I'm not sure why it was happening in the first place. Are you able to shed any light on this?

closed time in 3 days

FlashChaser

issue commentNycto/PerlinNim

value out of range error?

Thanks for resolving this, and apologies for the delay. Needed to find some time to confirm the exact cause of the build failures.

I've published version 0.7.0, which includes this fix.

FlashChaser

comment created time in 3 days

created tagNycto/PerlinNim

tag0.7.0

Perlin and Simplex noise generation for Nim

created time in 3 days

push eventNycto/PerlinNim

FlashChaser

commit sha 332b107a6316b94544bd6bcd344b91f44ab8042b

Fix overflow in randomSeed() int isn't guaranteed to be 32 bits unless explicitly called as int32

view details

push time in 3 days

PR merged Nycto/PerlinNim

Fix overflow in randomSeed()

int isn't guaranteed to be 32 bits unless explicitly called as int32

+1 -1

1 comment

1 changed file

FlashChaser

pr closed time in 3 days

push eventNycto/PerlinNim

Nycto

commit sha fd8c80da75dfd9d1356a9f6ca0c0584eec1c287d

Require nim 1.2

view details

Nycto

commit sha 2731202394f7edc3a96fc8bf7df00a57d7ffd557

Fix cli parsing build failures

view details

push time in 3 days

issue commentNycto/AStarNim

Exception in nim 1.2.2

Looks like version 0.6.0 was never published. I've done this now. Try updating your dependency and see if that fixes the problem.

rishavs

comment created time in 4 days

created tagNycto/AStarNim

tag0.6.0

A* path finding algorithm in Nim

created time in 4 days

push eventNycto/AStarNim

Nycto

commit sha 377c2d5d46bc98d33deba18a7935198283c4a8b0

Fix tests for Nim 1.2.*

view details

push time in 4 days

issue closedgoogle/gson

TypeAdapters don't apply to map keys

When converting a Map to Json, TypeAdapters are not being used to generate the keys. Here is a minimal repro:

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

class Main {

    /** An example class that just wraps a String. */
    static class Thinger {
        public final String key;

        Thinger(String key) {
            this.key = key;
        }

        @Override
        public String toString() {
            return "Thinger(" + key + ")";
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Thinger that = (Thinger) o;
            return Objects.equals(key, that.key);
        }

        @Override
        public int hashCode() {
            return Objects.hash(key);
        }
    }

    /** A TypeAdapter that can encode and decode a Thinger */
    static class ThingerAdapter extends TypeAdapter<Thinger> {

        @Override
        public void write(JsonWriter out, Thinger value) throws IOException {
            out.value(value.key);
        }

        @Override
        public Thinger read(JsonReader in) throws IOException {
            return new Thinger(in.nextString());
        }
    }

    public static void main(String[] args) {

        // Sample data with custom keys and values
        final Map<Thinger, Thinger> map = new HashMap<>();
        map.put(new Thinger("Foo"), new Thinger("Bar"));
        map.put(new Thinger("Baz"), new Thinger( "Qux"));

        // Register the adapter we defined above
        final Gson gson = new GsonBuilder().registerTypeAdapter(Thinger.class, new ThingerAdapter()).create();

        // Print the encoded JSON
        System.out.println(gson.toJson(map));
    }
}

I expect this to print:

{"Foo":"Bar","Baz":"Qux"}

But it actually calls the toString method and prints:

{"Thinger(Foo)":"Bar","Thinger(Baz)":"Qux"}

I'm not familiar with your code base, but it looks like the problem is related to this line of code

closed time in 17 days

Nycto

issue commentgoogle/gson

TypeAdapters don't apply to map keys

Thanks for your help with this! I'm going to go ahead and resolve this issue. Seems like, at a philosophical level, it's believed this should be the responsibility of the library consumers and not the library itself.

Cheers!

Nycto

comment created time in 17 days

issue commentgoogle/gson

TypeAdapters don't apply to map keys

Looks like this is my miss. Picking through the code more, this functionality is hidden behind a feature flag, enableComplexMapKeySerialization:

final Gson gson = new GsonBuilder()
    .enableComplexMapKeySerialization()
    .registerTypeAdapter(Thinger.class, new ThingerAdapter())
    .create();

Based on the implementation, I understand why this is hidden behind a flag -- it has to instantiate JsonElement instances for every key, which is slow. Would you be amenable to adding functionality to TypeAdapter? I'm thinking a function like this would solve the problem without changing the performance much:

public abstract class TypeAdapter<T> {
  // ... SNIP ...
  public String toKey(T value) throws IOException {
    return String.valueOf(value);
  }
  // ... SNIP ...
}

This would allow the default behaviour to continue, shouldn't break any existing consumers, would allow custom key serialization, maintains type safety, and should have reasonable performance.

Thoughts? Again, I'm new to your code base so I assume I'm missing some nuances here.

Nycto

comment created time in a month

issue commentgoogle/gson

TypeAdapters don't apply to map keys

Actually, it looks like there is already a built-in mechanism for handling complex JsonElements as keys in that file:

https://github.com/google/gson/blob/ceae88bd6667f4263bbe02e6b3710b8a683906a2/gson/src/main/java/com/google/gson/internal/bind/MapTypeAdapterFactory.java#L245-L262

Nycto

comment created time in a month

issue commentgoogle/gson

TypeAdapters don't apply to map keys

Yup, I definitely agree that it’s problematic. But I think the spirit of this request is that some mechanism should exist for encoding keys. For example, a new function could be added to TypeAdapter that is just responsible for encoding a key name.

Nycto

comment created time in a month

issue openedgoogle/gson

TypeAdapters don't apply to map keys

When converting a Map to Json, TypeAdapters are not being used to generate the keys. Here is a minimal repro:

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

class Main {

    /** An example class that just wraps a String. */
    static class Thinger {
        public final String key;

        Thinger(String key) {
            this.key = key;
        }

        @Override
        public String toString() {
            return "Thinger(" + key + ")";
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Thinger that = (Thinger) o;
            return Objects.equals(key, that.key);
        }

        @Override
        public int hashCode() {
            return Objects.hash(key);
        }
    }

    /** A TypeAdapter that can encode and decode a Thinger */
    static class ThingerAdapter extends TypeAdapter<Thinger> {

        @Override
        public void write(JsonWriter out, Thinger value) throws IOException {
            out.value(value.key);
        }

        @Override
        public Thinger read(JsonReader in) throws IOException {
            return new Thinger(in.nextString());
        }
    }

    public static void main(String[] args) {

        // Sample data with custom keys and values
        final Map<Thinger, Thinger> map = new HashMap<>();
        map.put(new Thinger("Foo"), new Thinger("Bar"));
        map.put(new Thinger("Baz"), new Thinger( "Qux"));

        // Register the adapter we defined above
        final Gson gson = new GsonBuilder().registerTypeAdapter(Thinger.class, new ThingerAdapter()).create();

        // Print the encoded JSON
        System.out.println(gson.toJson(map));
    }
}

I expect this to print:

{"Foo":"Bar","Baz":"Qux"}

But it actually calls the toString method and prints:

{"Thinger(Foo)":"Bar","Thinger(Baz)":"Qux"}

I'm not familiar with your code base, but it looks like the problem is related to this line of code

created time in a month

pull request commentNycto/PerlinNim

Fix overflow in randomSeed()

Build failures look unrelated

FlashChaser

comment created time in a month

issue commentNycto/PerlinNim

value out of range error?

Can you submit a PR with the change you need?

FlashChaser

comment created time in 2 months

startedcnlohr/rawdrawandroid

started time in 2 months

pull request commentNycto/DelaunayNim

fix deprecated stuff

Thanks for the contribution!

narimiran

comment created time in 2 months

push eventNycto/DelaunayNim

narimiran

commit sha 2fec2c828a2a4cfbe3f675230ad308f4ac7f368d

fix deprecated stuff

view details

push time in 2 months

PR merged Nycto/DelaunayNim

fix deprecated stuff
+5 -5

0 comment

3 changed files

narimiran

pr closed time in 2 months

more