profile
viewpoint
Tim Caswell creationix @magic-script Leander, TX, USA http://creationix.com/ Making the world better and more free, one technology at a time.

creationix/brozula 163

VM that runs in the browser and interprets luajit bytecode.

creationix/adventure 42

Adventure is the start of a real-time RPG world using node.js and Websockets.

creationix/boxcode 23

A tiling code editor

creationix/basic-games 20

An archive of the best games I wrote for Q-Basic over a 10 year span.

creationix/bench-suite 14

A benchmark skeleton for something better than static hello world http servers.

creationix/bodec 8

Binary ops using typed arrays

creationix/ama 6

Ask me anything!

bmeck/node-protocols 4

Place for the gathering of protocol implementations

creationix/ar-joy 3

sample app controlling ar-drone with joystick

creationix/b36 3

Simple utility for converting between base36 strings and buffers

startedmikeal/zdag

started time in a month

created tagmagic-script/magic-script-webgl-prism-controller

tag2.3.1

Landscape app class containing a webgl enabled quad.

created time in a month

push eventmagic-script/magic-script-webgl-prism-controller

Tim Caswell

commit sha 91a6414fc078b421bac1b0b03beef7a52d38ccf2

Don't try to mutate module namespace for gl

view details

push time in a month

created tagmagic-script/magic-script-webgl-prism-controller

tag2.3.0

Landscape app class containing a webgl enabled quad.

created time in a month

push eventmagic-script/magic-script-webgl-prism-controller

Tim Caswell

commit sha 884d6b8405d8f2112279d4dbb5b6525715ff5457

Use proper imports for native modules

view details

push time in a month

startedaseprite/aseprite

started time in 2 months

startedLavaMoat/lavamoat

started time in 2 months

push eventcreationix/polluv

Tim Caswell

commit sha 2fc1d551b7affaad68ce99b8c1762fc932efe81a

Luaify the ffi a bit

view details

push time in 2 months

push eventcreationix/polluv

Tim Caswell

commit sha 08ed6e09bbb1654da0b09448769b39a29f5bef9b

Get test working in both C and luajit ffi

view details

push time in 2 months

push eventcreationix/polluv

Tim Caswell

commit sha 02bcd575afa6bca1b5e893f52f1d0d7c034ceb6d

Get test working in both C and luajit ffi

view details

push time in 2 months

push eventcreationix/polluv

Tim Caswell

commit sha ba48625a96e5e2a62d63c4b1df6834d27c33ae53

Get test working in both C and luajit ffi

view details

push time in 2 months

push eventcreationix/polluv

Tim Caswell

commit sha 4cc1340dd8e30e606399e400625eab6090ac84bf

Restructure for better sharing between ffi and C

view details

push time in 2 months

push eventcreationix/polluv

Tim Caswell

commit sha 2c32479062580b4b0bd9ab70559c7cb9ef9a0583

start to import lib

view details

push time in 2 months

push eventcreationix/polluv

Tim Caswell

commit sha 2b5427b290e1668e9ee509f55a8887bb6e9bfa15

Starting to make ffi friendly

view details

push time in 2 months

push eventcreationix/polluv

Tim Caswell

commit sha e302b764114e352ffb7382d7eba7e87cda5b23d0

Fix memory leaks

view details

push time in 2 months

issue commentziglang/zig

Problem building libuv with zig cc on linux.

https://github.com/creationix/polluv/blob/9ccc3c952ffb18b09148f22e8346acc9667b1097/Makefile#L2-L29

creationix

comment created time in 2 months

create barnchcreationix/polluv

branch : master

created branch time in 2 months

created repositorycreationix/polluv

created time in 2 months

issue commentziglang/zig

Problem building libuv with zig cc on linux.

@squeek502 yep, you're right that I missed your comment in the luvi repo. This is the exact same issue! I guess it's something in libuv that's causing the problem since I don't have luajit at all in this project.

I tried -target native-native-musl and I get the same error though. Let me push my code and see if I'm doing it right...

creationix

comment created time in 2 months

issue commentziglang/zig

Problem building libuv with zig cc on linux.

In particular, I'm confused by lld: error: undefined symbol: fcntl64 and then did you mean: fcntl64

creationix

comment created time in 2 months

issue openedziglang/zig

Problem building libuv with zig cc on linux.

I'm trying to build a small test application with libuv embedded. I want to use zig cc because the caching system makes it much faster. The following command works for clang and gcc, but not zig cc.

zig cc -o main main.c libuv/src/fs-poll.c libuv/src/idna.c libuv/src/inet.c libuv/src/random.c libuv/src/strscpy.c libuv/src/threadpool.c libuv/src/timer.c libuv/src/uv-common.c libuv/src/uv-data-getter-setters.c libuv/src/version.c libuv/src/unix/async.c libuv/src/unix/core.c libuv/src/unix/dl.c libuv/src/unix/fs.c libuv/src/unix/getaddrinfo.c libuv/src/unix/getnameinfo.c libuv/src/unix/loop-watcher.c libuv/src/unix/loop.c libuv/src/unix/pipe.c libuv/src/unix/poll.c libuv/src/unix/process.c libuv/src/unix/random-devurandom.c libuv/src/unix/signal.c libuv/src/unix/stream.c libuv/src/unix/tcp.c libuv/src/unix/thread.c libuv/src/unix/tty.c libuv/src/unix/udp.c libuv/src/unix/proctitle.c libuv/src/unix/linux-core.c libuv/src/unix/linux-inotify.c libuv/src/unix/linux-syscalls.c libuv/src/unix/procfs-exepath.c libuv/src/unix/random-getrandom.c libuv/src/unix/random-sysctl-linux.c -pthread -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112 -Os -ldl -lrt  -Ilibuv/include -Ilibuv/src
Compile C Objects [36/36] random-sysctl-linux.c...lld: error: undefined symbol: fcntl64
>>> referenced by core.c
>>>               zig-cache/o/a98yrC-16nzaiLvm0YSsj7Kr64jgWlKyw30Ca_aTuY8lBx8HcWfjUWLmNzWOQ59K/core.o:(uv__nonblock_fcntl)
>>> referenced by core.c
>>>               zig-cache/o/a98yrC-16nzaiLvm0YSsj7Kr64jgWlKyw30Ca_aTuY8lBx8HcWfjUWLmNzWOQ59K/core.o:(uv__nonblock_fcntl)
>>> referenced by core.c
>>>               zig-cache/o/a98yrC-16nzaiLvm0YSsj7Kr64jgWlKyw30Ca_aTuY8lBx8HcWfjUWLmNzWOQ59K/core.o:(uv__cloexec_fcntl)
>>> referenced by core.c
>>>               zig-cache/o/a98yrC-16nzaiLvm0YSsj7Kr64jgWlKyw30Ca_aTuY8lBx8HcWfjUWLmNzWOQ59K/core.o:(uv__cloexec_fcntl)
>>> referenced by pipe.c
>>>               zig-cache/o/Gp2nxP14BgUu9fMnuMMJ4gryoTCPAocIoqmgTAVdptPg5_FP1QjIdJRHfMpqm3ls/pipe.o:(uv_pipe_open)
>>> referenced by process.c
>>>               zig-cache/o/Z2n-GR8LD-1fXu4uIs37LmdvcK0K1mfCZ4iNwE1idOtrGfUhw6eXoJ8i5oMbsgSg/process.o:(uv__process_child_init)
>>> did you mean: fcntl64
>>> defined in: /home/tim/.cache/zig/stage1/h/pVSItZEIxIXx_ZQQwt9SLNNbPH8xxZp1plbirUK6SOmyZ4FTf2EOP08onozfGP03/libc.so.6.0.0

Is there something special I need to pass in for this to build?

created time in 2 months

startedfloooh/sokol

started time in 2 months

issue openedjedisct1/libhydrogen

Support for wasm32-freestanding

I see there appears to be some support for wasm in the codebase. I believe it was tested with emscripten. I would love to use libhydrogen in a wasm based project, but I'm having a very hard time compiling it for the freestanding target using vanilla clang or zig cc. Most the issues revolve around usage of libc headers and the random sources.

Looking at the supported platforms, I believe it should be possible to support wasm without emscripten's supporting libraries or even needing the wasi runtime.

Am I correct in this assumption?

created time in 2 months

issue commentluvit/lit

coro libraries naively assert coroutine resumes, original stack trace is lost.

I'll admit I didn't properly understand lua coroutine stack traces when I was building the coro-* libraries years ago. It would be nice to find a good solution and cleanup the error reporting.

truemedian

comment created time in 2 months

issue commentluvit/lit

coro libraries naively assert coroutine resumes, original stack trace is lost.

How do you convince it to use the other stack? Does the call need to be wrapped in xpcall or something?

truemedian

comment created time in 2 months

create barnchcreationix/zig-wasm-dom

branch : master

created branch time in 3 months

created repositorycreationix/zig-wasm-dom

created time in 3 months

startedshritesh/zig-wasm-dom

started time in 3 months

issue commentzigtools/zls

Immediate crash on startup

This happens immediately at startup as soon as I trigger the first autocomplete. I type std. and it blows up.

noxabellus

comment created time in 3 months

issue commentzigtools/zls

Immediate crash on startup

[debug-main] Found zig in PATH: /home/tim/zig-linux-x86_64-0.6.0+626b5ecca/zig

[debug-main] Using zig executable /home/tim/zig-linux-x86_64-0.6.0+626b5ecca/zig

[debug-main] Got workspace folders in initialization.

[debug-main] Loaded folder file:///home/tim/test-zig

[debug-main] ClientCapabilities{ .supports_snippets = true, .supports_semantic_tokens = true, .hover_supports_md = true, .completion_doc_supports_md = true, .supports_workspace_folders = true }

[debug-main] Took 0ms to process method initialize

[debug-main] Took 0ms to process method initialized

[debug-doc_store] Opened document: file:///home/tim/test-zig/src/main.zig

[debug-doc_store] Opened document: file:///home/tim/test-zig/build.zig

[debug-doc_store] Document is a build file, extracting packages...

[debug-doc_store] Finished zig run for build file file:///home/tim/test-zig/build.zig

[debug-main] Took 15ms to process method textDocument/didOpen

incorrect alignment
[debug-main] Took 0ms to process method textDocument/documentSymbol

[debug-main] Took 0ms to process method textDocument/completion

/home/tim/zig-linux-x86_64-0.6.0+626b5ecca/lib/zig/std/heap.zig:146:51: 0x24880f in std.heap.PageAllocator.shrink (zls)
        const old_mem = @alignCast(mem.page_size, old_mem_unaligned);
                                                  ^
/home/tim/zig-linux-x86_64-0.6.0+626b5ecca/lib/zig/std/mem.zig:279:44: 0x26f771 in std.mem.Allocator.free (zls)
        const shrink_result = self.shrinkFn(self, non_const_ptr[0..bytes_len], Slice.alignment, 0, 1);
                                           ^
/home/tim/zig-linux-x86_64-0.6.0+626b5ecca/lib/zig/std/json.zig:1638:35: 0x2f41f1 in std.json.parseFree (zls)
                    allocator.free(value);
                                  ^
/home/tim/zig-linux-x86_64-0.6.0+626b5ecca/lib/zig/std/json.zig:1602:33: 0x2841a9 in std.json.parseFree (zls)
                return parseFree(@TypeOf(v), v, options);
                                ^
/home/tim/zig-linux-x86_64-0.6.0+626b5ecca/lib/zig/std/json.zig:1619:26: 0x27606d in std.json.parseFree (zls)
                parseFree(field.field_type, @field(value, field.name), options);
                         ^
/home/tim/zls/src/main.zig:1453:29: 0x2712de in main (zls)
    defer std.json.parseFree(Config, config, config_parse_options);
                            ^
/home/tim/zig-linux-x86_64-0.6.0+626b5ecca/lib/zig/std/start.zig:252:37: 0x24984d in std.start.posixCallMainAndExit (zls)
            const result = root.main() catch |err| {
                                    ^
/home/tim/zig-linux-x86_64-0.6.0+626b5ecca/lib/zig/std/start.zig:123:5: 0x24958f in std.start._start (zls)
    @call(.{ .modifier = .never_inline }, posixCallMainAndExit, .{});
    ^
noxabellus

comment created time in 3 months

issue commentzigtools/zls

Immediate crash on startup

FWIW, I'm seeing the exact same issue.

  • Ubuntu 20.04
  • Zig 0.6.0+626b5ecca
  • Zls 108a2dbd64f764d414940870c6193642506e1e44
  • VSCode 1.45.1

I've got both the zig extension and the zls extension installed.

image

noxabellus

comment created time in 3 months

more