profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/g-w1/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.

g-w1/ezc 8

compiler for ez

g-w1/9goapi 1

Run code on plan9

g-w1/aoc2020 0

advent of code 2020

g-w1/apple_pie 0

Basic HTTP server implementation in Zig

g-w1/blog 0

my blog

g-w1/CafeBot 0

A simple discord bot with a couple of nice features for the purpose of learning the serenity rust discord api crate.

g-w1/discord-irc 0

Connects Discord and IRC channels by sending messages back and forth.

g-w1/doom-emacs 0

An Emacs framework for the stubborn martian hacker

g-w1/dotfiles 0

A place for my dotfiles to go.

push eventg-w1/zig

Jacob G-W

commit sha 45d02cd34deea12d7ada1bd660bfaab1be9b0e9f

print_zir: print array_init

view details

Jacob G-W

commit sha 1987018a81e4afe7523da3ad662dda78f3d014a3

stage2: implement Sema for array_init

view details

push time in 3 hours

push eventg-w1/zig

Andrew Kelley

commit sha 1f2f9f05c254374044d8c30cce6f299d7a18da72

stage2: implement zirCoerceResultPtr and remove Module.simplePtrType and Module.ptrType in favor of `Type.ptr`.

view details

Jacob G-W

commit sha 7fcb19590537d2af61583de8970354cf0b3aaa4b

stage2: array mul support more types of operands

view details

Jacob G-W

commit sha 4b28962882e34c70c682ac77b914f85257f4349f

stage2: array cat support more types of operands

view details

Jacob G-W

commit sha c203d9366c499b29927443585f076261170a66b8

print_zir: print array_init

view details

Jacob G-W

commit sha 4d25fcfba83f4a7f44dc8464e9b22e25f6ae7dc9

stage2: implement Sema for array_init

view details

push time in 13 hours

push eventg-w1/zig

Jacob G-W

commit sha a0dfd3f6e15c93893852dec12ac8ca31ae7bdb14

stage2: array cat support more types of operands

view details

Jacob G-W

commit sha 0bfafde117955c61f6f99fee961ed6f560c5a3c8

print_zir: print array_init

view details

Jacob G-W

commit sha bb7dc008315167616b7bd74f4b0ed23f4b614ae6

stage2: implement Sema for array_init

view details

push time in 21 hours

Pull request review commentziglang/zig

stage2: array stuff

 fn zirArrayInit(sema: *Sema, block: *Scope.Block, inst: Zir.Inst.Index, is_ref:     const inst_data = sema.code.instructions.items(.data)[inst].pl_node;     const src = inst_data.src(); -    _ = is_ref;-    return sema.mod.fail(&block.base, src, "TODO: Sema.zirArrayInit", .{});+    const extra = sema.code.extraData(Zir.Inst.MultiOp, inst_data.payload_index);+    const args = sema.code.refSlice(extra.end, extra.data.operands_len);++    var resolved_args = try sema.mod.gpa.alloc(Air.Inst.Ref, args.len);+    for (args) |arg, i| resolved_args[i] = sema.resolveInst(arg);++    var all_args_comptime = for (resolved_args) |arg| {+        if ((try sema.resolveMaybeUndefVal(block, src, arg)) == null) break false;+    } else true;++    if (all_args_comptime) {+        var anon_decl = try block.startAnonDecl();+        defer anon_decl.deinit();+        // TODO what to do if resolved_args.len == 0, where is the type info communicated?

What should I do for this, and also below.

g-w1

comment created time in 21 hours

PullRequestReviewEvent

PR opened ziglang/zig

stage2: array stuff

No tests because apparently

const a = [_]u64{a, b};

does not actually use array_init.

image Works!!! Could I use this as a test for now?

+85 -24

0 comment

2 changed files

pr created time in 21 hours

push eventg-w1/zig

xackus

commit sha 15f55b2805541276f491d255f60f501c8cbd1191

os.flock: FreeBSD can return EOPNOTSUPP

view details

Andrew Kelley

commit sha 04366576ea4be4959b596ebff7041d17e18d08d8

stage2: implement `@sizeOf` for non-packed structs

view details

Jacob G-W

commit sha 48af69ebf41b5b71c521e8a1f3db056ce3817696

stage2: array mul support more types of operands

view details

Jacob G-W

commit sha 68eeaeceb54cb3545e62d02f437e877a4bf87c0b

print_zir: print array_init

view details

Jacob G-W

commit sha c230f27b1ba20e4d6ee8798642196a3c2fe61810

stage2: implement Sema for array_init

view details

push time in 21 hours

push eventg-w1/zig

Jacob G-W

commit sha 7deb4fe97c3514b406ca14dd7d3fc9a8b47398ad

stage2: array mul support more types of operands

view details

Jacob G-W

commit sha 2a9d6b460f23b5cd9c048fa94bcfdf8f53fa942d

print_zir: print array_init

view details

Jacob G-W

commit sha 690ef0e0a8c44a30e3ae8d83a9e1abb584eee4a8

stage2: implement Sema for array_init

view details

push time in 21 hours

create barnchg-w1/zig

branch : arrinit

created branch time in a day

PullRequestReviewEvent

Pull request review commentgithub/gitignore

[WIP] Create Zig.gitignore

+# This file is for zig-specific build artifacts.+# If you have OS-specific or editor-specific files to ignore,+# such as *.swp or .DS_Store, put those in your global+# ~/.gitignore and put this in your ~/.gitconfig:+#+# [core]+#     excludesfile = ~/.gitignore+#+# Cheers!+# -andrewrk++zig-cache/+zig-out/+/release/+/debug/+/build/+/build-*/+/docgen_tmp/

only zig-cache and zig-out are needed. The rest are specific to the zig repository, and not every zig project.

el10savio

comment created time in a day

Pull request review commentgithub/gitignore

[WIP] Create Zig.gitignore

+# This file is for zig-specific build artifacts.+# If you have OS-specific or editor-specific files to ignore,+# such as *.swp or .DS_Store, put those in your global+# ~/.gitignore and put this in your ~/.gitconfig:+#+# [core]+#     excludesfile = ~/.gitignore+#+# Cheers!+# -andrewrk

Not needed.

el10savio

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

issue commentziglang/zig

zig ar: a drop-in llvm-ar replacement

You might want to look at https://github.com/SuperAuguste/zarc . It can parse ars, but it cannot create them. So maybe just using that and then adding features to create tars would be good?

kubkon

comment created time in a day

push eventg-w1/blog

Jacob G-W

commit sha 2d499b58723895901060d0fa89384e1469460ee3

tags: use them instead of categories in the future

view details

push time in a day

issue commentziglang/zig

Proposal: blocklocal variables

Why use this over a regular variable? Please give some more info.

binarygcd

comment created time in 2 days

Pull request review commentziglang/zig

stage2: enhance `zig init-lib` and `zig init-exe`

 pub fn cmdInit(         error.FileNotFound => {},         else => fatal("unable to test existence of build.zig: {s}\n", .{@errorName(err)}),     }+    if (fs.cwd().access("src" ++ s ++ "main.zig", .{})) |_| {+        fatal("existing src" ++ s ++ "main.zig file would be overwritten", .{});+    } else |err| switch (err) {+        error.FileNotFound => {},+        else => fatal("unable to test existence of src" ++ s ++ "main.zig: {s}\n", .{@errorName(err)}),

IMO, the better thing to do here would just be to overwrite. This should not be a hard error.

hdorio

comment created time in 4 days

PullRequestReviewEvent

pull request commentziglang/zig

plan9: emit debug info

Ok, replaced it with a call to cwd, should fix, and me mergable now.

g-w1

comment created time in 6 days

push eventg-w1/zig

Jacob G-W

commit sha f697e0a326b06b7dcf641fbd61110be756407dcf

plan9 linker: link lineinfo and filenames

view details

push time in 6 days

issue openedziglang/zig

stage2: undefined value generated from enum value

This code generates an undefined (0xaaaaa) value:

pub fn main() void {
    syscall0(SYS.EXITS);
}

fn syscall0(arg: SYS) void {
    _ = arg;
}

const SYS = enum(u32) {
    BAD = 1,
    EXITS = 8,
};
/home/jacob/dev/zig/src/value.zig:899:21: 0xa64c66 in value.Value.toUnsignedInt (zig1)
            else => unreachable,
                    ^
/home/jacob/dev/zig/src/codegen.zig:4921:79: 0x118c5cd in codegen.Function(std.target.Arch.x86_64).genTypedValue (zig1)
                    return MCValue{ .immediate = typed_value.val.toUnsignedInt() };
                                                                              ^
/home/jacob/dev/zig/src/codegen.zig:4953:62: 0x118d15d in codegen.Function(std.target.Arch.x86_64).genTypedValue (zig1)
                                    return self.genTypedValue(.{ .ty = enum_full.tag_ty, .val = tag_val });
                                                             ^
/home/jacob/dev/zig/src/codegen.zig:4823:65: 0x1189cb1 in codegen.Function(std.target.Arch.x86_64).resolveInst (zig1)
                        gop.value_ptr.* = try self.genTypedValue(.{
                                                                ^
/home/jacob/dev/zig/src/codegen.zig:2583:65: 0xfb2c17 in codegen.Function(std.target.Arch.x86_64).airCall (zig1)
                            const arg_mcv = try self.resolveInst(args[arg_i]);
                                                                ^
/home/jacob/dev/zig/src/codegen.zig:837:57: 0xfaa086 in codegen.Function(std.target.Arch.x86_64).genBody (zig1)
                    .call            => try self.airCall(inst),
                                                        ^

created time in 7 days

pull request commentziglang/zig

stage2: implement cImport

Oh, sorry I was mistaken, I read the code wrong :(

Vexu

comment created time in 7 days

pull request commentziglang/zig

stage2: implement cImport

cDefine("THING") does not work as it has 2 params here https://github.com/ziglang/zig/blob/2a0c44fff3506cdc072d67374e7ffca495cebdc7/src/BuiltinFn.zig#L260-L264 It may need to be special cased in astgen

Vexu

comment created time in 7 days

PullRequestReviewEvent

Pull request review commentziglang/zig

stage2: implement cImport

 fn zirCDefine( ) CompileError!Air.Inst.Ref {     const extra = sema.code.extraData(Zir.Inst.BinNode, extended.operand).data;     const src: LazySrcLoc = .{ .node_offset = extra.node };-    return sema.mod.fail(&block.base, src, "TODO: implement Sema.zirCDefine", .{});++    const name = try sema.resolveConstString(block, src, extra.lhs);+    if (sema.typeOf(extra.rhs).zigTypeTag() != .Void) {+        const value = try sema.resolveConstString(block, src, extra.lhs);
        const value = try sema.resolveConstString(block, src, extra.rhs);
Vexu

comment created time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventg-w1/zig

Jakub Konka

commit sha 819ef521042e7e21db4ab5dd7a0dbe180bd31c57

macho: merge linkWithZld with flush

view details

Jakub Konka

commit sha b20b6d7da9b63783a4f481fd0a4b48a47843abc8

macho: move bit adding rpaths to common codepath

view details

Jakub Konka

commit sha 4c90c1ff63883c2bb8d2baa40e952674daba6814

Merge remote-tracking branch 'origin/master' into zld-incr

view details

Jakub Konka

commit sha a51edc978f90fa3b96e4b1d4886030848f97a7b0

macho: converge populateMetadata with populateMissingMetadata

view details

Jakub Konka

commit sha 52f9b283a77e79f64d3a3b9faf31a07fe350fd8a

macho: fix writeSymbolTable() function After merging `populateMetadata` with `populateMissingMetadata`, it is imperative we clear the number of symbols in `writeSymbolTable`. However, this is hopefully just a temp measure until the convergence of incremental with traditional is complete.

view details

Jakub Konka

commit sha c6ea181e75cc6822edbaceccb11bc3a39484d116

macho: dedup setting entry point logic

view details

Jakub Konka

commit sha 69f42817745a13fc3cc69896cb628a7028696a88

macho: memorize if dyld_stub_binder was already resolved

view details

Jakub Konka

commit sha 8b795fe2ac17466d0bc9de7b494f0cf076d7c46d

macho: parse input files and libs in incremental This converges parsing of linker line in incremental; however, still doesn't save the parsing state between updates.

view details

Jakub Konka

commit sha 790633a2a09164db5985d1c8302a60d3809e5002

macho: use common codepath for resolving dyld_stub_binder

view details

Jakub Konka

commit sha 8167456c58270fe9586ac93dbd6a6ee1a8ae7915

macho: resolve undefs in incremental properly Instead of assuming that every undef extern symbol comes from libSystem, actually perform the check!

view details

Jakub Konka

commit sha 30247fbb6a46231154f051119228829c6a0dfd90

macho: remove redundant writeStubHelperCommon codepath

view details

Jakub Konka

commit sha 153e2317748cff7d59d2709f72fe8b22c14f2a7b

macho: track unresolved externs globally this way we share state between incremental and traditional paths.

view details

Jakub Konka

commit sha 792fd9c4a362f44f900007562504bfaceffbcc82

macho: extract logic for creating and tracking atoms into fn

view details

Jakub Konka

commit sha 2d10c52b3cfac9516f5548b04528bb7c31a0a6e7

macho: create an explicit symbol and atom for dyld entry in __data This way, we will be able to refer to that atom dynamically via relocations rather than requiring hardcoded addressing upfront.

view details

Jakub Konka

commit sha d63d8ae1c00c240ac20836f1b54bff0093edcb61

macho: create __stub_helper preamble atom with relocations to `dyld_private` and `__dyld_stub_binder` symbols making the routine properly dynamic (i.e., making it possible to call the routine before VM allocation takes place).

view details

Jakub Konka

commit sha d61d85abd2b998fea438e7317568537f927fa6a1

macho: implement aarch64 prong of createStubHelperAtom

view details

Jakub Konka

commit sha ea499203fe22dd3cd40753c020794790f32b91be

macho: incrementally write dyld_private and stub_helper atoms By incrementally I mean using the incremental linker machinery and concepts. Currently, lots of repetition but already highlighted a potential problem with resolving relocations for symbols that weren't seen yet but wanting to write the atom to file (before seeing the relevant atoms).

view details

Jakub Konka

commit sha 799c5bb9551dafd76f9d1fce7d3f5a01ac55da83

macho: add routine for creating a dynamic stub_helper atom With this routine, we are now able to freely shift stub_helper section in memory and in file since the VM addressing is now dynamically dependent on the positioning of `__stub_helper` preamble and other sections generated by the linker.

view details

Jakub Konka

commit sha 9e7b2fb894cf4021ec188fbb64b11d750f4354fa

macho: add routine for creating lazy pointer for stub

view details

Jakub Konka

commit sha 876071b50b1d23a59b3d3e5acedf4161029f5f2b

macho: fix writing stubs (on x86_64 only) and lazy ptrs

view details

push time in 8 days

issue commentziglang/zig

Warn re unreferenced private globals

Duplicate of https://github.com/ziglang/zig/issues/335

donaldcallen

comment created time in 8 days