Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nyberg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
Demoing Our Displays
(simulavr.com)
82 points
by
nyberg
5y ago
|
22 comments
62.
▲
by
nyberg
5y ago
Sounds like WASI might be the ideal to get around this in the near future given that it's also capability based similar to how browsers guard specific functions.
63.
▲
by
nyberg
5y ago
Would expect the challenges in lisp with such a name
64.
▲
by
nyberg
5y ago
const Json = union(enum) { null, number: f64, bool: bool, string: []const u8, array: []const Json, object: HashMap([]const u8, Json), }; Usually it's a tagged union of the base JSON types
65.
▲
by
nyberg
5y ago
One of the issues with operator overloading itself in relation to bignums and similar is the need for an allocator (there's nowhere to pass one) along with the lack of error handling (suppose allocation fails) and when/how to clea
66.
▲
by
nyberg
5y ago
It's an open question [1] along with other safety checks both comptime and runtime [2]. The issue here is a balance of keeping language complexity low while providing safety at the same time and not depriving users of control when they
67.
▲
by
nyberg
5y ago
To some degree, part of the thing which places V in the spotlight for such drama is it being brought up in quite a few zig (and of course other) posts with a note on how the community is in some way treating V unfairly despite this being ar
68.
▲
by
nyberg
5y ago
It feels like most of the SPAs should really just be desktop applications and hopefully with wasm, wgpu, and wasi that can be reduced to a smaller runtime than the current v8 for everything solution. They're not really web pages anyway
69.
▲
by
nyberg
5y ago
Telegram notification sounds and maybe the ringtone would be "nice".
70.
▲
by
nyberg
5y ago
You can use union(enum) to avoid having to write a separate enum definition for tags and std.meta.FieldEnum() exists should you also want to derive an enum from the union later on.
71.
▲
by
nyberg
5y ago
Zig is general purpose and isn't really focused on embedded as much as it's focused on being flexible enough to also support embedded development. Configurable allocators are present in other languages (iirc rust allows it at the
72.
▲
by
nyberg
5y ago
This is possible with statically typed languages with Haskell being one of the examples where it's encouraged to use the REPL to work towards a solution and/or qucikly test ideas without having to write unit tests or full program
73.
▲
by
nyberg
5y ago
With that it would waste more resources on running a partial web browser for one small GUI application where soon any system with 8GiB RAM or less is considered an obsolete and unsupported user experience when starting more than a few insta
74.
▲
by
nyberg
5y ago
But the new class(es) needs to be documented regardless as the relation to the code has changed from the old. Keeping documentation in another document would see this going out of sync over time until the document doesn't at all reflec
75.
▲
by
nyberg
5y ago
Rather, the underlying OS requires an array of bytes terminated by 0 which can be hidden behind a decent API. The type being poor at expressing this is not a limitation of the OS but of the C type system. E.g in zig this would be `[*:0]u8`
76.
▲
by
nyberg
5y ago
And you run the risk or introducing new bugs as memory bugs aren't the only bugs there are plus rust doesn't catch all of them.
77.
▲
by
nyberg
5y ago
Use GNU GUIX to manage it. It's been packaged for quite a while now
78.
▲
by
nyberg
5y ago
This sounds a lot lke like minikanren ( https://github.com/webyrd/Barliman ) where you give test cases and Idris2 ( https://github.com/idris-lang/Idris2 ) where you give type constraints as a tool for
79.
▲
by
nyberg
5y ago
I find that calling it a `racist algorithm` doesn't really do it any good unless the behaviour was intentional. This is a case of poor training data the same as google image classification messing up with tags.
80.
▲
by
nyberg
5y ago
You can also use `@compileLog(@TypeOf(some_function))` or the same for the result. Type inference mostly makes it easier to change the types involved without having to update every single variable binding which would often be rather error p
81.
▲
by
nyberg
6y ago
Can the "safety is lower priority than rust" trend stop? Zig is not less concerned with safety and will catch illegal behaviour at runtime for that which isn't caught at compile-time. It's only ReleaseSmall and ReleaseFa
82.
▲
by
nyberg
6y ago
`comptime for (someslice) |capture| {};` is already a valid expression so it would conflict along with `inline while` being the other form. The majority of uses of it in unrolling duck-typing cases will most likely be replaced by [1] which
83.
▲
by
nyberg
6y ago
But how would you build the first GCC in that chain?
84.
▲
by
nyberg
6y ago
Names can mean multiple things to different groups and if one had to cater to every group which finds a name non fitting then you'd end up spending more time on name changes than actual development as in some context any name can be se
85.
▲
by
nyberg
6y ago
You're comparing a tool which you have source for and control over with a service which is out of your control. The comparison is of apples and oranges. Compare something like flow [1], reason [2], or prepack[3] as it's tools whic
86.
▲
by
nyberg
6y ago
Code is a medium for communication of concepts and solutions between humans first and for the machine second. Code generation input still requires a specification which is the code you feed into the inference engine even if it's of a h
87.
▲
by
nyberg
6y ago
Why it's a good filter. It deters a large portion of those that attack someone based of silly jokes the authors may have made in the past or present and would judge without speaking to the person before hand to get a better view of who
88.
▲
by
nyberg
6y ago
It's a great filter for those that care more about names than code.
89.
▲
by
nyberg
6y ago
If you look at [1] and [2] it's strikingly clear why not tabs, stage1 is for building one program that is the next state compiler so while it's possible to build other programs you're expected to wait for it's completion
90.
▲
by
nyberg
6y ago
This kind of thing is what I see all the time and it's just exhausting at this point. One is always apparently blind as quick as they present a view of things not always being so bad without a legal document to direct behaviour. It
More ›