<daurnimator>
pixelherodev: the windows kernel is perfectly capable of an openat operation
<pixelherodev>
I didn't say they weren't
<pixelherodev>
Microcontrollers do, because they don't have a preexisting brainwashed rabid fanbase that'll keep buying for no good reason, or the tremendous market power of MS
<daurnimator>
infact I'd argue the win nt syscall for that is much better designed
<pixelherodev>
So yet another reason for them not to support openat
<pixelherodev>
daurnimator, that PR should be disregarded for now; the logic is wrong.
<pixelherodev>
Going to fix it later
<daurnimator>
I should follow up with cyphar about fixing the linux syscall...
metaleap has quit [Quit: Leaving]
<Snektron>
interested in how the comptime fmt looks
<fengb>
It’s just converting the output argument to comptime
<fengb>
No real API changes, but it unblocks async os.write
<fengb>
Which I probably should have attempted before my spirit journey :P
SyrupThinker has quit [Quit: ZNC 1.7.5 - https://znc.in]
SyrupThinker has joined #zig
<daurnimator>
howso?
* daurnimator
still liked stream mixins which gave us async write
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 260 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 240 seconds]
zfoo has joined #zig
seoushi has quit [Quit: WeeChat 2.7]
<pixelherodev>
daurnimator, whatever ended up happening to mixins?
<daurnimator>
pixelherodev: andrew didn't like that mixins weren't namespaced within an object which could result in different mixins being incompatible with each other if they both implemented the same method
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
<pixelherodev>
:(
<pixelherodev>
What if there was e.g. a `pub usingnamespace T as T1`?
<pixelherodev>
That would be a simple tweak that should allow for mixins to be blended completely
<fengb>
The method names collide
* daurnimator
likes that
<pixelherodev>
fengb, no, because it wouldn't be part of R
<pixelherodev>
Where R is the struct containing that line
<pixelherodev>
If you have `var r: R`, where R has `pub usingnamespace T as T1`, it'd be r.T1.method and not r.method
<fengb>
Ah I see. So T1 would be a pointer to r still? But with new methods
<daurnimator>
pixelherodev: you could already do that as `pub const T1 = T`. the issue is what gets passed as `self` when you do: `r.T1.method()`
<pixelherodev>
Hmm, there might actually be a way to achieve something similar with just comptime logic...
<daurnimator>
pixelherodev: there's also the issue of people taking T1 out of `r`... which would be solved with e.g. the `fixed` proposal
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
lunamn has joined #zig
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 240 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 260 seconds]
<Snektron>
You could pass in a struct literal with references to the functions
<Snektron>
Instead of implicitly using functions of the implementer
<Snektron>
But that doesnt fix using namespace collisions
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 260 seconds]
_Vi has quit [Ping timeout: 272 seconds]
seoushi has joined #zig
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 268 seconds]
Aransentin has quit [Ping timeout: 260 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 260 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 260 seconds]
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen1 has joined #zig
dingenskirchen1 is now known as dingenskirchen
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 268 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 268 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 268 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 268 seconds]
lunamn_ has joined #zig
seoushi has quit [Ping timeout: 265 seconds]
lunamn has quit [Ping timeout: 265 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
dddddd has quit [Quit: Hasta otra..]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 240 seconds]
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 260 seconds]
lunamn_ has quit [Quit: leaving]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 268 seconds]
mahmudov has quit [Ping timeout: 240 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 268 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 260 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 268 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
leeward has quit [Remote host closed the connection]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
_whitelogger has joined #zig
marijnfs_ has quit [Ping timeout: 268 seconds]
ntgg has joined #zig
<ntgg>
is there something like `switch(<u32 or whatever>) { 1 => .A, 2 => .B, else |val| => something }`?
NotNite has joined #zig
NotNite has quit [Quit: NotNite]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
NotNite has joined #zig
NotNite has quit [Client Quit]
ntgg has quit [Ping timeout: 260 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
metaleap has joined #zig
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
Snetry has quit [Ping timeout: 268 seconds]
Snetry has joined #zig
Snetry has quit [Ping timeout: 260 seconds]
<metaleap>
ntgg: there is but it looks like this ;) switch(val) { 1 => .A, 2 => .B, else => something(val) }
Snetry has joined #zig
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
_whitelogger has joined #zig
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 260 seconds]
Snetry has quit [Ping timeout: 268 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
Snetry has joined #zig
Snetry has quit [Ping timeout: 265 seconds]
<metaleap>
i want to use a hashmap at comptime but on `.put()` FixedBufferAllocator we come to "lib/zig/std/heap.zig:620:9: error: cannot store runtime value in compile time variable"
<metaleap>
so whats the preferred alloc for comptime guys?
Snetry has joined #zig
<metaleap>
if using `std.heap.page_allocator` then "lib/zig/std/mem.zig:125:36: error: unable to evaluate constant expression"
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 260 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 268 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 265 seconds]
mahmudov has joined #zig
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 268 seconds]
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 268 seconds]
knebulae has quit [Quit: Leaving]
marijnfs_ has quit [Ping timeout: 240 seconds]
marijnfs has joined #zig
_Vi has joined #zig
Snetry has quit [Ping timeout: 260 seconds]
Snetry has joined #zig
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
marijnfs has joined #zig
mahmudov has quit [Ping timeout: 268 seconds]
marijnfs_ has quit [Ping timeout: 268 seconds]
metaleap has quit [Quit: Leaving]
metaleap has joined #zig
knebulae has joined #zig
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 265 seconds]
marijnfs_ has quit [Remote host closed the connection]
dddddd has joined #zig
forgot_password has joined #zig
jzelinskie has quit []
jzelinskie has joined #zig
<forgot_password>
Hey andrewrk, regarding the issue with Core Audio headers and `translate-c`: I removed the `-x c` flag in `codegen.cpp`, but the issue still persists. Do you have any idea why that is? I don't have a clue to be honest...
<mikdusan>
forgot_password: is it failing via `zig translate-c` or @cImport ?
dingenskirchen has quit [Quit: dingenskirchen]
jessermeyer has joined #zig
<jessermeyer>
Should taking the address of a temporary variable be disallowed? e.g. &@ptrCast(type_dst, identifier);
<jessermeyer>
Is there any value allowing taking the address of a temporary?
<metaleap>
totally
<metaleap>
because while it goes dead when returning..
<metaleap>
beforehand you can pass it around much
<jessermeyer>
How is that valuable?
<metaleap>
aah sorry, i thought
<jessermeyer>
I can show how it's a footgun waiting to happen.
<metaleap>
i read "a temporary" and thought "a local". my bad
<jessermeyer>
Ah, got cha.
<jessermeyer>
I submitted a proposal to consider this an error.
jessermeyer has quit [Remote host closed the connection]
chrisb has joined #zig
eddyb[legacy] has quit []
eddyb[legacy] has joined #zig
dingenskirchen has joined #zig
zfoo has quit [Remote host closed the connection]
<betawaffle>
what is builtin.Target.Abi.code16 ?
mahmudov has joined #zig
bsrd has quit [Quit: WeeChat 2.7]
<pixelherodev>
Anyone have good resources on recursive descent parsers?
chrisb has quit [Quit: leaving]
<forgot_password>
mikdusan, hey, sorry for answering so late. I haven't tried `@cImport`, because I don't know the location of the headers. However, clang, by default, can resolve the files. So what I did was to first run the pre-processor via `clang -E` and then `zig translate-c` the output.
<forgot_password>
When I run `clang -x c` on the output it works fine, but translate-c fails
<pixelherodev>
e.g. `else => something(val)` is perfectly valid
ntgg has quit [Ping timeout: 240 seconds]
<pixelherodev>
What's the build.zig equivalent of --pkg-begin --pkg-end?
<pixelherodev>
Never mind, found it
<pixelherodev>
Scrolling through build.zig is fun :P
<pixelherodev>
Well, this is useful: `%s/std.debug.warn(".*"/\=submatch(0).", .{}"`
<pixelherodev>
Though it probably would've been faster to type it manually than to figure out how to do that :P
<pixelherodev>
Other neat Vim/Zig integration: if an error is returned all the way through main (e.g. `try a()` in main), it'll automatically jump to the *source* of the error if you run `:make run` (a build.zig run step)
<pixelherodev>
This is *awesome*, and huge thanks to whoever set this up
decentpenguin has joined #zig
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen has joined #zig
decentpenguin has quit [Quit: decentpenguin]
<pixelherodev>
There a way to add arbitrary args to the Zig invocation of a exe in `build.zig`?
<BaroqueLarouche>
for outputting raw file in the build system, does installRaw("kernel.bin") function to LibExeObjStep make sense ?
* pixelherodev
shrugs
<pixelherodev>
Read build.zig directly is my suggestion
<pixelherodev>
It's what I'm doing
<BaroqueLarouche>
I'm going to implement it, asking feedback for the function name and parameter
<pixelherodev>
Ohh
<pixelherodev>
Whoops
<pixelherodev>
If you ask me, yeah
Akuli has quit [Quit: Leaving]
<mikdusan>
pixelherodev: `zig build run -- myarg0 myarg1 ...` and add those args to your run command: