profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/lithdew/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.
Kenta Iwasaki lithdew Japan Theorist at heart; engineer at scale.

lithdew/flatend 622

Quickly build microservices using p2p networking in NodeJS/Go.

lithdew/quickjs 107

Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter.

lithdew/monte 93

The bare minimum for high performance, fully-encrypted bidirectional RPC over TCP in Go with zero memory allocations.

lithdew/pike 63

Async I/O for Zig

lithdew/casso 55

A Go implementation of the Cassowary constraint solving algorithm.

lithdew/hello 21

Multi-threaded cross-platform HTTP/1.1 web server example in Zig.

lithdew/cuckoo 15

A fast, vectorized Cuckoo filter implementation in Go. Zero allocations in hot paths with zero-copy binary representation.

lithdew/lmdb-zig 15

Lightweight, fully-featured, idiomatic cross-platform Zig bindings to Lightning Memory-Mapped Database (LMDB).

lithdew/flatlang 8

An embeddable human-friendly configuration language with zero keywords in Go. Heavily inspired by Google Starlark and CUE.

startedmalcolmstill/foxwren

started time in a day

issue commentemscripten-core/emscripten

Modules with EXPORT_ES6=1 do not work in NodeJS

Does node not define both require and process the mode you are using?

Ran into the same issue as well. In cases where NodeJS is running in ES Module mode (as opposed to CommonJS mode), require is undefined as modules may only be imported via. the import statement.

I'm not sure what command-line flag may be used to force Node to run in ES Module mode, though including "type": "module", in a package.json forces any NodeJS scripts that are run under npm/yarn to operate in ES Module mode.

To take into account NodeJS running in ES Module mode, it may be better to have the check be:

if (!(typeof process === "object" && (!require || typeof require === "function")))
ibdafna

comment created time in 5 days

push eventlithdew/zig

Kenta Iwasaki

commit sha def10250179a9a60ff75caaecd888375978d7840

os: usingnamespace fixes for std.x.os.Socket and std.os.TCP Extract existing constants to do with TCP socket options into a 'TCP' namespace. Export 'MSG' and 'TCP' from std.os.{linux, windows} into std.c. Fix compile errors to do with std.x.os.Socket methods related to setting TCP socket options. Handle errors in the case that an interface could not be resolved in an IPv6 address on Windows. Tested using Wine with the loopback interface disabled. Have all instantiations of std.x.os.Socket on Windows instantiate an overlapped socket descriptor. Fixes the '1ms read timeout' test in std.x.net.tcp.Client. The test would previously deadlock, as read timeouts only apply to overlapped sockets. Windows documentation by default recommends that most instantiations of sockets on Windows be overlapped sockets (s.t. they may operate in both blocking or nonblocking mode when operated with WSA* syscalls). Refer to the documentation for WSASocketA for more info.

view details

push time in 7 days

push eventlithdew/zig

Kenta Iwasaki

commit sha e946da287376bd02096c0ac83a887da394f87a40

os: usingnamespace fixes for std.x.os.Socket and std.os.TCP Extract existing constants to do with TCP socket options into a 'TCP' namespace. Export 'MSG' and 'TCP' from std.os.{linux, windows} into std.c. Fix compile errors to do with std.x.os.Socket methods related to setting TCP socket options. Handle errors in the case that an interface could not be resolved in an IPv6 address on Windows. Tested using Wine with the loopback interface disabled. Have all instantiations of std.x.os.Socket on Windows instantiate an overlapped socket descriptor. Fixes the '1ms read timeout' test in std.x.net.tcp.Client. The test would previously deadlock, as read timeouts only apply to overlapped sockets. Windows documentation by default recommends that most instantiations of sockets on Windows be overlapped sockets (s.t. they may operate in both blocking or nonblocking mode when operated with WSA* syscalls). Refer to the documentation for WSASocketA for more info.

view details

push time in 7 days

push eventlithdew/zig

Kenta Iwasaki

commit sha 07f6bee348e0f21172a5ce50e63c74f2e906ce31

os: usingnamespace fixes for std.x.os.Socket and std.os.TCP Extract existing constants to do with TCP socket options into a 'TCP' namespace. Export 'MSG' and 'TCP' from std.os.{linux, windows} into std.c. Fix compile errors to do with std.x.os.Socket methods related to setting TCP socket options. Handle errors in the case that an interface could not be resolved in an IPv6 address on Windows. Tested using Wine with the loopback interface disabled. Have all instantiations of std.x.os.Socket on Windows instantiate an overlapped socket descriptor. Fixes the '1ms read timeout' test in std.x.net.tcp.Client. The test would previously deadlock, as read timeouts only apply to overlapped sockets. Windows documentation by default recommends that most instantiations of sockets on Windows be overlapped sockets (s.t. they may operate in both blocking or nonblocking mode when operated with WSA* syscalls). Refer to the documentation for WSASocketA for more info.

view details

push time in 7 days

push eventlithdew/lmdb-zig

LeRoyce Pearson

commit sha 0c4f4ea1a46723b94bae92ef32542229cadc0cb6

Update to 0.9.0-dev.950+93c6e31cf

view details

LeRoyce Pearson

commit sha f8f97d3569a5ee2f6bb6453072f6c13f88cfc5ed

Make parameter names snake case Co-authored-by: Kenta Iwasaki <63115601+lithdew@users.noreply.github.com>

view details

Kenta Iwasaki

commit sha 4f0c762b0725d0773817b0900afed1c27914f2f3

Merge pull request #3 from leroycep/update-0.9.0-dev.950+93c6e31cf Update to 0.9.0-dev.950+93c6e31cf

view details

push time in 7 days

pull request commentlithdew/lmdb-zig

Update to 0.9.0-dev.950+93c6e31cf

LGTM!

leroycep

comment created time in 7 days

push eventlithdew/rheia

Kenta Iwasaki

commit sha f2b86eb2177606d744c3d7454fdae7befd25d8fd

implement usingnamespace fixes on zig master, update zig-sqlite

view details

push time in 7 days

PR opened ziglang/zig

os: usingnamespace fixes for std.x.os.Socket and std.os.TCP

Extract existing constants to do with TCP socket options into a 'TCP' namespace.

Export 'MSG' and 'TCP' from std.os.{linux, windows} into std.c.

Fix compile errors to do with std.x.os.Socket methods related to setting TCP socket options.

Handle errors in the case that an interface could not be resolved in an IPv6 address on Windows. Tested using Wine with the loopback interface disabled.

Have all instantiations of std.x.os.Socket on Windows instantiate an overlapped socket descriptor. Fixes the '1ms read timeout' test in std.x.net.tcp.Client. The test would previously deadlock, as read timeouts only apply to overlapped sockets.

Windows documentation by default recommends that most instantiations of sockets on Windows be overlapped sockets (s.t. they may operate in both blocking or nonblocking mode when operated with WSA* syscalls). Refer to the documentation for WSASocketA for more info.

+130 -107

0 comment

8 changed files

pr created time in 7 days

push eventlithdew/zig

Kenta Iwasaki

commit sha 60ab659ff1b96361bd274e2a63550ee444a7b710

os: usingnamespace fixes for std.x.os.Socket and std.os.TCP Extract existing constants to do with TCP socket options into a 'TCP' namespace. Export 'MSG' and 'TCP' from std.os.{linux, windows} into std.c. Fix compile errors to do with std.x.os.Socket methods related to setting TCP socket options. Handle errors in the case that an interface could not be resolved in an IPv6 address on Windows. Tested using Wine with the loopback interface disabled. Have all instantiations of std.x.os.Socket on Windows instantiate an overlapped socket descriptor. Fixes the '1ms read timeout' test in std.x.net.tcp.Client. The test would previously deadlock, as read timeouts only apply to overlapped sockets. Windows documentation by default recommends that most instantiations of sockets on Windows be overlapped sockets (s.t. they may operate in both blocking or nonblocking mode when operated with WSA* syscalls). Refer to the documentation for WSASocketA for more info.

view details

push time in 7 days

push eventlithdew/zig

Andrew Kelley

commit sha f8bc5294f247f2fcc8e0dce1e03cbef3e0d02bf7

cmake: LLVM needs to link against zlib For more details on why this dependency is needed, see https://github.com/ziglang/zig-bootstrap/issues/57

view details

Andrew Kelley

commit sha e46c55edbd788974071ec37758bfa74f8a83d5cf

ci: update x86_64-linux, aarch64-linux, and windows tarballs to llvm 12.0.1-rc1, and -DLLVM_ENABLE_ZLIB=FORCE_ON

view details

Jakub Konka

commit sha 0ad534b392a7496a3ecf97c6456560055a521fe6

ci: update x86_64-macos and aarch64-macos tarballs to llvm 12.0.1-rc1, and -DLLVM_ENABLE_ZLIB=FORCE_ON

view details

Isaac Freund

commit sha 608bc1cbd5910ee796cc292b43db77547858bf98

stage2: disallow `1.e9` and `0x1.p9` as float literals Instead require `1e9` and `0x1p9`, disallowing the trailing dot. This change to the grammar is consistent with forbidding `1.` and `0x1.` as float literals and ensures there is only one way to do things here.

view details

Isaac Freund

commit sha abd1c75c4aa70a83884e0509820dff8a6e51430c

stage1: disallow 1.e9 and 0x1.p9 as float literals

view details

Andrew Kelley

commit sha f6932472950e7dbb451d4cfef8e5f4a1cc506ac0

Merge pull request #8917 from ifreund/fix-float-tokenize2 stage1, stage2: disallow 1.e9 and 0x1.p9 as float literals

view details

Jonathan Marler

commit sha 99b6305aa89c6363b1220a780485803a66880cce

handle LimitToBig error on setrlimit

view details

Veikka Tuominen

commit sha c6a0a4e7282d746ebf2b54df16161c5993ea5aa8

translate-c: support designated initializers in macros

view details

Evan Haas

commit sha a9dd8d75431357a59238da3fd949aa1f11eead84

translate-c: Fix performance hazard in transPreprocessorEntities Fixes O(N^2) behavior of `transPreprocessorEntities` due to repeated calls to `mem.len` Closes #8959

view details

Andrew Kelley

commit sha 16c5cbab0c414852bf8b911ed6efdf4ceeac9600

ci: update x86_64-freebsd tarball to llvm 12.0.1-rc1, and -DLLVM_ENABLE_ZLIB=FORCE_ON

view details

Jakub Konka

commit sha d1f60a63bdd7bd838c210a888dfe23c9ea9f2669

zld: fix the linker for 32bit comp targets

view details

Andrew Kelley

commit sha 05cd8936c885d2b538091eb814724472c73ec8b8

ci: drone: use zig-bootstrap tarball instead of system toolchain

view details

Andrew Kelley

commit sha 87dae0ce98fde1957a9290c22866b3101ce419d8

Merge pull request #8932 from ziglang/llvm-needs-zlib cmake: LLVM needs to link against zlib

view details

Martin Wickham

commit sha fc9430f56798a53f9393a697f4ccd6bf9981b970

Breaking hash map changes for 0.8.0 - hash/eql functions moved into a Context object - *Context functions pass an explicit context - *Adapted functions pass specialized keys and contexts - new getPtr() function returns a pointer to value - remove functions renamed to fetchRemove - new remove functions return bool - removeAssertDiscard deleted, use assert(remove(...)) instead - Keys and values are stored in separate arrays - Entry is now {*K, *V}, the new KV is {K, V} - BufSet/BufMap functions renamed to match other set/map types - fixed iterating-while-modifying bug in src/link/C.zig

view details

Martin Wickham

commit sha 6953c8544b68c788dca4ed065e4a15eccbd4446b

Fix return type of HashMap.getAdapted

view details

Andrew Kelley

commit sha 7d15a3ac71c5d8dc8c08dfd8ea8ad43d4eae188a

Merge pull request #8975 from SpexGuy/hash-map-updates Breaking hash map changes for 0.8.0

view details

viri

commit sha ce072894a16469aea24fd2060013037ba7411b17

docs: minor spelling fix

view details

Isaac Freund

commit sha 05b677f0c484181bcbd7eb86b41a70b8e508644b

langref: sync grammar with zig-spec repo

view details

Andrew Kelley

commit sha 9c08a33b2226239b8e0cf08ebcef17d710a54d8a

Merge pull request #8750 from lithdew/master x/io, x/os: async i/o reactor, cross-platform socket syscalls and bits

view details

Min-Yih Hsu

commit sha 83e0a49ba4938fb90b27c01ce9adc3dbe2984164

llvm: Add support for collecting time trace (#8546) LLVM time profiler can collect time traces and present them in a hierarchical view. Which breakdowns the time spent in each Pass or even IR unit. The result is also exported into a format that can be easily visualized by the Chrome browser. Currently this features is controlled by the following environment variables: - `ZIG_LLVM_TIME_TRACE_FILE` toggles this feature and specifies the output time trace file. - `ZIG_LLVM_TIME_TRACE_GRANULARITY` controls the time granularity in ms (default to 500).

view details

push time in 7 days

push eventlithdew/zig-sqlite

Vincent Rischmann

commit sha 6176de4bbf388f8cdba842762e4f92f94ba151ab

Merge pull request #43 from lithdew/master sqlite: expose c import, add 'shared_cache' to init flags

view details

Vincent Rischmann

commit sha c97e26c020b15f474f48c20350f46b409b0d1410

Merge pull request #44 from lithdew/master sqlite: interpret database path in init flags as uri

view details

Vincent Rischmann

commit sha 9561f63604748ee76052edaf9bbda9c89e98d8b6

fix documentation

view details

Vincent Rischmann

commit sha 04eb910d7662e7cd5b3351f10d07322e25e0ae18

implement reading an integer column into an enum value directly one/next can't alloc so they are limited to integer values.

view details

Vincent Rischmann

commit sha b7cdcce9b5946fd469591124da4b9d4712708a39

implement reading a text column into an enum value directly oneAlloc/nextAlloc can allocate memory so are allowed to use text backed enums.

view details

Vincent Rischmann

commit sha 6cde31aa8f66a74c6ae8fc3f6370002785534253

Merge branch 'read-direct-enum'

view details

Vincent Rischmann

commit sha c4f6ba2295d32e3544b7235b251eaa9f4b2167cb

fix build script for latest zig

view details

Vincent Rischmann

commit sha b09d605d799b93a27b7f9755daf79a2b4af49c76

Merge branch 'fix-latest-zig'

view details

Vincent Rischmann

commit sha 0b702832c2a1eb47976a7b02b1ef4c05f2df6f6d

fix the compile error from readArray

view details

Vincent Rischmann

commit sha 3de99fb2c0fccbba736a5007ef62b0b27581cd08

Merge branch 'fix-read-array'

view details

Vincent Rischmann

commit sha 40ce251e61fc760a200b8404aaf06587acc4d591

fix for ziglang/zig#9618

view details

Vincent Rischmann

commit sha 6d56f62ba81c64e6c875cbc3ef4e21136a72293e

Merge pull request #47 from vrischmann/fix-usingnamespace fix for ziglang/zig#9618

view details

Vincent Rischmann

commit sha 8afc01f52a3aa32931fedd680efefcae59e3c390

Stop using anytype in the public API. The need for using `options: anytype` in readXYZ functions is so that they can be used both when called by `one`/`next` or `oneAlloc`/`nextAlloc`. In the first case there won't be an allocator member in the tuple, in the latter there will be. But, since the public API takes an explicit allocator argument in `oneAlloc`/`nextAlloc` there's no need to take a `anytype` options in the public API. This commit changes the public API to always use `QueryOptions`. This commit also adds a bunch of explicit comptime checks to validate the options type passed to the readXYZ functions. Especially important is checking the presence of the `allocator` field if the function requires an allocator. Finally, cleanup some stuff and reorder arguments in `readPointer`.

view details

Vincent Rischmann

commit sha 21e8477b206c84f939f4b3dea8288a97474cce20

more minor cleanups

view details

Vincent Rischmann

commit sha 658f9fab1f61ee207d1951f93c5ab3e242828e08

Merge pull request #48 from vrischmann/clarify-options stop using anytype for options

view details

Kenta Iwasaki

commit sha 1abd9233cb23620c3beeff120c016f8a893f8c75

Merge branch 'master' of https://github.com/vrischmann/zig-sqlite

view details

push time in 7 days

Pull request review commentlithdew/lmdb-zig

Update to 0.9.0-dev.950+93c6e31cf

 pub const Environment = packed struct {             try call(c.mdb_env_copy2, .{ self.inner, backup_path.ptr, flags.into() });         }     }-    pub inline fn pipeTo(self: Self, fd: os.fd_t, flags: CopyFlags) !void {-        try call(c.mdb_env_copyfd2, .{ self.inner, fd, flags.into() });+    pub inline fn pipeTo(self: Self, fdHandle: os.fd_t, flags: CopyFlags) !void {

Keep all variable names except for struct and function names snake-cased. Also, does a compile error happen if the parameter name is unchanged?

    pub inline fn pipeTo(self: Self, fd_handle: os.fd_t, flags: CopyFlags) !void {
leroycep

comment created time in 8 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentlithdew/lmdb-zig

Update to 0.9.0-dev.950+93c6e31cf

 pub const Environment = packed struct {             try call(c.mdb_env_copy2, .{ self.inner, backup_path.ptr, flags.into() });         }     }-    pub inline fn pipeTo(self: Self, fd: os.fd_t, flags: CopyFlags) !void {-        try call(c.mdb_env_copyfd2, .{ self.inner, fd, flags.into() });+    pub inline fn pipeTo(self: Self, fdHandle: os.fd_t, flags: CopyFlags) !void {+        try call(c.mdb_env_copyfd2, .{ self.inner, fdHandle, flags.into() });
        try call(c.mdb_env_copyfd2, .{ self.inner, fd_handle, flags.into() });
leroycep

comment created time in 8 days

issue openedproject-serum/anchor

lang/syn: use rustdoc to search for IDL type definitions

A limitation right now is that IDL type definitions are only generated for structs that live in the top-level of a Solana program.

It is possible to circumvent this limitation by having the Anchor CLI 1) run 'cargo doc' on a Solana program, and 2) recursively walk through the generated HTML documentation to generate IDL type definitions off of structs that are referenced in the program's fields/declarations/instructions which derive BorshSerialize/BorshDeserialize.

The only workaround right now for this is to duplicate the definitions of structs from imported crates.

There is an option for 'cargo doc' as well to output JSON, though it requires Rust nightly which would not be ideal.

created time in 15 days

issue commentproject-serum/anchor

anchor_client: allow custom websocket url for Cluster

That looks great too :+1:.

lithdew

comment created time in 15 days

issue openedproject-serum/anchor

anchor_client: allow custom websocket url for Cluster

A small proposal for allowing both a custom HTTP JSON-RPC URL and a Websocket URL to be specified in Anchor.toml.

An example of how it may be specified:

[provider]
cluster = { custom = ["https://api.devnet.solana.com", "ws://api.devnet.solana.com"] }
wallet = "~/.config/solana/id.json"

created time in 15 days

push eventlithdew/rheia

Kenta Iwasaki

commit sha ae7339b7cf643d4348c7f03b3e063efd7a16ae5b

include http api and usage info in readme

view details

push time in 17 days

push eventlithdew/rheia

Kenta Iwasaki

commit sha 1028c5e76d8d44dc5620b9b34ce9dba6b4d6c008

include http api and usage info in readme

view details

push time in 17 days

push eventlithdew/rheia

Kenta Iwasaki

commit sha 6b17f82615758ab429fa33cf4efb73e847ccbe73

include http api and usage info in readme

view details

push time in 17 days

push eventlithdew/rheia

Kenta Iwasaki

commit sha 3272bbdd55e5c6f9c54a87daf8d942568f2b0e7b

include http api and usage info in readme

view details

push time in 17 days

push eventlithdew/rheia

Kenta Iwasaki

commit sha 47b791eafc822fde158bca440f27a3d1639bb63b

include http api and usage info in readme

view details

push time in 17 days

push eventlithdew/rheia

Kenta Iwasaki

commit sha 02319531ac09597990d50f27bf740c9f76435812

include http api and usage info in readme

view details

push time in 17 days

issue commentlithdew/rheia

Revise memory management for cancellation callbacks in runtime.Context.

Fixed in staging branch. Will close once the branch is merged.

The solution that was picked is to explicitly disallow async cancellation callbacks.

lithdew

comment created time in 17 days

issue commentlithdew/rheia

Add timeouts to runtime.Context.

Fixed in staging branch. Will close once the branch is merged.

lithdew

comment created time in 17 days

push eventlithdew/rheia

Kenta Iwasaki

commit sha 1d486125851f5a79a3ec304e951f7eb0628b3d36

add timeouts, make cancellation synchronous

view details

push time in 17 days