ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<gonz_> fengb: Hahah, that's actually pretty great :D
<fengb> I can see zpm has backend hookups to other services
<pixelherodev> ikskuh: because I needed to test out a backport
<pixelherodev> Needed to modify a patch, because it doesn't apply cleanly
<pixelherodev> Since it depends on other patches which I rejected as breaking behavior
<pixelherodev> and for the 0.6 cycle I don't plan on wasting time extracting only those parts of commits which don't break behavior
layneson has quit [Ping timeout: 252 seconds]
* ikskuh is confused
* ikskuh successfully added andrew-mode to zpm
<pixelherodev> Okay, so
<alexnask> nice :D
<alexnask> did you actually call the flag andrew? lol
<pixelherodev> Basically, I'm backporting features and bug fixes from master to 0.6
<ikskuh> it can now clone modules as flat-copies of the source repo instead of using submodules
<pixelherodev> Unofficially, of course
<pixelherodev> Anything that breaks
<ikskuh> pixelherodev: but why?
<pixelherodev> dammit
<gonz_> andrew-mode?
<pixelherodev> laggy network connection :(
<pixelherodev> ikskuh: a) to see if I can, and b) because it's useful to have a compiler that's feature-compatible with 0.6 but with bugfixes
<pixelherodev> Some things I flat out reject though
<pixelherodev> Stage2 for instance isn't being backported
<ikskuh> ah well
<pixelherodev> bug fixes and minor features only
r4pr0n has quit [Quit: r4pr0n]
<gonz_> ikskuh: Have you built `zpm` on Windows? I'm getting some error during build :/
_Vi has quit [Ping timeout: 260 seconds]
<gonz_> Getting `error.Unexpected` and some note about a filename being too long, but that doesn't make much sense.
satchmo has quit [Quit: WeeChat 2.8]
satchmo has joined #zig
satchmo has quit [Client Quit]
satchmo has joined #zig
<pixelherodev> Alrighty, unofficial 0.6.3 released
<pixelherodev> The latest backported patch is from about a week back, but I just advanced it by like a month
<pixelherodev> Might go the rest of the way tomorrow and call it 0.6.4 or something
<pixelherodev> I'm mostly tagging it to make it easier to keep track
<ikskuh> gonz_: that sounds like you should move the project into a lower folder
<ikskuh> aurame had the same problem, maybe also alexnask
<ikskuh> it works on windows as alex is using it :D
<gonz_> How deep do these dependencies or your own hierarchies go? :D
<pixelherodev> Did anyone see the XKCD on X yet? :P
<pixelherodev> "The only variable is X; to refer to different variables, you have to use different fonts"
<pixelherodev> Great language idea lol
<ikskuh> pixelherodev: i've already made a meme for andrew with that :D
<ikskuh> ah, repost: https://i.imgur.com/4tWlYbn.png
<pixelherodev> Ahh
<pixelherodev> Yeah, that one :)
<pixelherodev> ikskuh: Nice touch
<ikskuh> hehe :D
<ikskuh> subtile
<fengb> I didn’t realize it was photoshopped at first
<fengb> Better than the source imo
layneson has joined #zig
satchmo_ has joined #zig
satchmo has quit [Ping timeout: 260 seconds]
<ikskuh> okay, so i fixed up some issues with zpm :)
<ikskuh> zpm install --mode=copy zig-bearssl
<ikskuh> now works and just copies the zig-bearssl package with recursive checkout into the source directory :)
alexnask has quit [Quit: Leaving]
layneson has quit [Ping timeout: 272 seconds]
traviss_ has joined #zig
traviss_ has quit [Client Quit]
traviss has joined #zig
<gonz_> It's odd, actually, because even after enabling long file names zig won't build in that path depth.
<gonz_> Presumably there's something zig (or LLVM) isn't taking advantage of
nephele_ has joined #zig
nephele has quit [Ping timeout: 265 seconds]
nephele_ is now known as nephele
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 256 seconds]
[rg] has joined #zig
decentpenguin has joined #zig
decentpenguin has quit [Client Quit]
traviss has quit [Quit: Leaving]
traviss has joined #zig
layneson has joined #zig
traviss has quit [Quit: Leaving]
traviss has joined #zig
ky0ko_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
slowtyper has quit [Ping timeout: 264 seconds]
stripedpajamas has joined #zig
layneson has quit [Ping timeout: 260 seconds]
traviss has quit [Quit: Leaving]
traviss has joined #zig
jicksaw has quit [Quit: ZNC is kill]
xackus_ has joined #zig
jicksaw has joined #zig
xackus has quit [Ping timeout: 256 seconds]
xackus has joined #zig
[rg] has quit [Read error: Connection reset by peer]
[rg] has joined #zig
xackus_ has quit [Ping timeout: 264 seconds]
[rg] has quit [Ping timeout: 246 seconds]
joey152 has quit [Remote host closed the connection]
joey152 has joined #zig
joey152 has quit [Remote host closed the connection]
xackus has quit [Ping timeout: 265 seconds]
[rg] has joined #zig
wozeparrot__ has quit [Ping timeout: 256 seconds]
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
_whitelogger has joined #zig
_whitelogger has joined #zig
cole-h has quit [Quit: Goodbye]
bren077s has quit [Quit: -a- Connection Timed Out]
cole-h has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
bren077s has joined #zig
ur5us has joined #zig
slowtyper has joined #zig
bren077s has quit [Quit: -a- IRC for Android 2.1.55]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 272 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
homa_rano has quit [Ping timeout: 256 seconds]
aerona has quit [Quit: Leaving]
<pixelherodev> Alrighty, reimplementing compile_error tests for stage2 shortly...
dddddd has quit [Ping timeout: 272 seconds]
[rg] has quit [Ping timeout: 272 seconds]
[rg] has joined #zig
halbeno has quit [Remote host closed the connection]
_Vi has joined #zig
halbeno has joined #zig
<pixelherodev> andrewrk: you on?
_Vi has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 260 seconds]
[rg] has quit [Quit: Konversation terminated!]
<pixelherodev> :(
<pixelherodev> Whelp, just going to go with my immediate idea and let you review it once it's a PR
homa_rano has joined #zig
_whitelogger has joined #zig
<pixelherodev> Anyone know which executable is the ZIR compiler? :P
<pixelherodev> Never mind :P
<pixelherodev> Literally just watched the stream archive to find it lol
<pixelherodev> Not that it helps :(
<pixelherodev> There is, as far as I know, no executable that goes ZIR -> binary in a single pass
<pixelherodev> There's the incremental compiler, but that's interactive
<pixelherodev> There's ./zig-cache/bin/zig but that requires Zig input not ZIR IIUC
<pixelherodev> Need to double check that one actually
<pixelherodev> That might be exactly what I want
<pixelherodev> Oh wait, for this I *do* want Zig->bin, not ZIR->bin; I need *both*
<pixelherodev> An neat
<pixelherodev> It is ZIR :)
<pixelherodev> Oh neat, it also has the REPL mode
<pixelherodev> Neater? meh
cole-h has quit [Quit: Goodbye]
<pixelherodev> Is there a way to get the path of a std.fs.Dir?
<pixelherodev> Hmm, all it has is the FD; I should look elsewhere probably
RagingDave has joined #zig
stripedpajamas has quit [Quit: sleeping...]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 272 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 244 seconds]
neceve has joined #zig
tdc has joined #zig
satchmo_ has joined #zig
arandomandy has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 272 seconds]
mokafolio has quit [Quit: Bye Bye!]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 244 seconds]
mokafolio has joined #zig
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 244 seconds]
<pixelherodev> Okay, is there a way to get the path to a std.testing.TmpDir?
satchmo_ has joined #zig
<daurnimator> pixelherodev: yeah its returned...
<pixelherodev> No it's not, as far as I can tell
<daurnimator> js.join(.parent_dir, .sub_path)
<pixelherodev> It returns a std.fs.Dir
<daurnimator> *fs
<pixelherodev> ... you can do that?!
<daurnimator> pixelherodev: no. I was psuedocoding
<pixelherodev> I looked in std.fs.Path
<pixelherodev> not std.fs itself
<daurnimator> but it does return a .parent_dir and a .sub_path
<pixelherodev> Right, but, what I meant was
<pixelherodev> a std.fs.Dir only has a fd
<pixelherodev> not the path
<pixelherodev> There's a way to get the path from the fd?
<daurnimator> no. but testing.tmpDir gives you both the fd and the path
<daurnimator> (well yes there is a way; but it doesn't work on all platforms)
<pixelherodev> It only gives the fd and the subpath, I'm 99% sure
<pixelherodev> I looked it over, and the sub_path's len is explicitly the length of the random gibberish from std.crypto
<daurnimator> where do I redeem my winnings?
<pixelherodev> Isn't that also a std.fs.Dir?
<pixelherodev> Or is it just annoyingly named? :P
<pixelherodev> No it's a Dir
<pixelherodev> L#198
<daurnimator> oh sorry
<pixelherodev> Nah, it's all good
satchmo_ has quit [Ping timeout: 272 seconds]
<pixelherodev> If you can think of a way, it'd be appreciated though
<pixelherodev> Hmm, actually
<pixelherodev> I don't necessarily *need* the path
<pixelherodev> Wait never mind I take that back, I do
<pixelherodev> Dammit
<daurnimator> why?
<pixelherodev> Thought for a second, "well what if I just attach the FD to the new process"
<pixelherodev> I'm reimplementing compile error tests
<pixelherodev> They need to run the stage2 compiler in a child process
<daurnimator> the cheating way is fork; `fchdir` to it; and then use relative paths in the subprocess
<pixelherodev> They need to read the error message, which is printed to stderr...
<pixelherodev> Yeah, that might work
<pixelherodev> Actually, maybe it'd be better to write a thin compiler wrapper
<pixelherodev> The problem is, I don't think it exposes errors internally
<pixelherodev> IIUC, most errors are *printed*, but not enough info is passed up the callstack for that to be feasible
satchmo_ has joined #zig
<pixelherodev> daurnimator: I'd rather not cheat for this :P
riba has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
<pixelherodev> Oh wait
<pixelherodev> failed_{decls,files,exports} exist :)
<pixelherodev> Hmm
<pixelherodev> Is there a way to say, "if error union is error"?
<pixelherodev> I mean, catch exists ofc
<pixelherodev> But I want the *opposite*
<pixelherodev> If *not* catch
satchmo_ has joined #zig
<pixelherodev> Labelled block works, I guess
<pixelherodev> `const failed = f: { blah() catch break :f true; break :f false; }`
satchmo_ has quit [Ping timeout: 252 seconds]
satchmo_ has joined #zig
ur5us has joined #zig
satchmo_ has quit [Ping timeout: 244 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 244 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
knebulae has joined #zig
satchmo_ has quit [Ping timeout: 272 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
riba has quit [Remote host closed the connection]
<pixelherodev> Found first ZIR analysis bug :)
<pixelherodev> The tests aren't fully finished yet, but the framework is in place
slurpie has quit [Ping timeout: 240 seconds]
satchmo_ has quit [Ping timeout: 272 seconds]
satchmo_ has joined #zig
ifreund has joined #zig
<ikskuh> andrewrk: is packages.zig a reserved file name in the zig build process?
satchmo_ has quit [Ping timeout: 260 seconds]
<ikskuh> ah no
<ikskuh> the auto-typename-thingy is just borked :D
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 272 seconds]
xackus has joined #zig
dddddd has joined #zig
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 252 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
<ikskuh> okay, i have found a zig abomination
<ikskuh> foo().?..bar().?
<pixelherodev> Uh
<pixelherodev> Ohhhh I see
satchmo_ has quit [Ping timeout: 246 seconds]
<pixelherodev> Slicing?
<ikskuh> yeah :D
<ikskuh> with optionals
<pixelherodev> yeah, got that part :P
<pixelherodev> if you think that's bad...
<pixelherodev> I wrote a real abomination earlier
satchmo_ has joined #zig
RagingDave has quit [Remote host closed the connection]
satchmo_ has quit [Ping timeout: 260 seconds]
satchmo_ has joined #zig
satchmo_ has quit [Ping timeout: 272 seconds]
satchmo_ has joined #zig
<pixelherodev> error.no_errors
<pixelherodev> lol
<pixelherodev> error.did_not_fail is probably better
<pixelherodev> But it's amusing that that would actually fit
<pixelherodev> Just about done with the error checking framework :)
ur5us has quit [Ping timeout: 260 seconds]
<ikskuh> it may actually make sense
<ikskuh> so the test runner returns that a test did not fail which is the error condition :D
<pixelherodev> Exactly
<ikskuh> so you return error.NoError :D
<pixelherodev> error.did_not_fail is better though
<pixelherodev> Precisely because it avoids this
<ikskuh> DidNotFail! :D
<pixelherodev> :P
<pixelherodev> Wait, are errors suppo - yes, yes they are
<pixelherodev> good catch
<pixelherodev> pun intended
satchmo_ has quit [Ping timeout: 244 seconds]
<ikskuh> try harder()
<pixelherodev> :)
satchmo_ has joined #zig
<pixelherodev> Hmm
<pixelherodev> What's a good name for the error when more errors are encountered than expected?
<pixelherodev> e.g. we're expecting two errors but we got four
<pixelherodev> error.ExtraErrors is too vague
<pixelherodev> error.MoreErrorsThanExpected feels too verbose
<pixelherodev> error.UnexpectedErrors feels stupid, but I guess it's on point?
<ifreund> error.TooManyErrors
<pixelherodev> and std.fs uses it (according to ZLS), so it's good
<pixelherodev> UnexpectedError, that is
<ifreund> yeah that's pretty good
<pixelherodev> It sounds stupid but
<pixelherodev> It does convey the intended meaning
satchmo_ has quit [Ping timeout: 260 seconds]
<pixelherodev> MismatchedError might be good for when a different error than the one we expected shows up
<pixelherodev> ExpectedOtherError
<pixelherodev> s/^/or/
alexnask has joined #zig
<ifreund> error.WrongError
stripedpajamas has joined #zig
stripedpajamas has quit [Client Quit]
<pixelherodev> Now good for failed_file error messages, I think :)
<pixelherodev> Yeah
<pixelherodev> And for convenience, it prints e.g. "Expected error 'invalid decl', found 'invalid decl: %foo'"
<pixelherodev> Or to use an actual example: `Expected '', found 'unrecognized identifier: %test'`
<pixelherodev> Alright, fully done I think
<pixelherodev> If I add another PR, more than 10% of open PRs will be mine lol
satchmo_ has joined #zig
<ifreund> good job on being productive :D
<pixelherodev> Yeah :)
<pixelherodev> Three of the four PRs I have open are stage2 improvements :)
<pixelherodev> Though one is just a minor one-liner :P
<pixelherodev> I'll do more later, but for now I need to get more done on Ikiru :)
nycex- has joined #zig
nycex has quit [Ping timeout: 240 seconds]
hsh has quit [Quit: Connection closed for inactivity]
nycex- is now known as nycex
ovf has joined #zig
<pixelherodev> alexnask: thanks for the ZLS work :)
<alexnask> Does it enable completions on any of your types or are they still too complex? :D
<alexnask> Probably not, I dont think many people recursively call type fns :P
<pixelherodev> Going to find out in just a second...
riba has joined #zig
<pixelherodev> :D
<pixelherodev> It works :D
<alexnask> \o/ !
<pixelherodev> I mean, internally at least
<pixelherodev> For external usage I still need package support :)
<pixelherodev> My last attempt at implementing that didn't end well though :P
<alexnask> I will give it a shot later today, the people want it
<alexnask> Did you try to parse the build.zig file? I will probably ship a custom build runner, find zig in path and make it output a package list to the parent process (zls)
<pixelherodev> Nah, I didn't even get that far
<pixelherodev> I tried a manual override and it didn't work
<alexnask> Aah gotcha
<pixelherodev> That is, adding the name and path directly to the source
<pixelherodev> It didn't work hardcoded, and I didn't have time to try getting it working
* pixelherodev shrugs
<pixelherodev> I'll focus on stage2, it's friendlier :P
<pixelherodev> One nice benefit of ZLS showing function descriptions: it annoys me enough to document the hell out of things
riba has quit [Ping timeout: 264 seconds]
eddyb[legacy] has quit [Ping timeout: 260 seconds]
ovf has quit [Ping timeout: 240 seconds]
utzig has quit [Ping timeout: 240 seconds]
ovf has joined #zig
layneson has joined #zig
jzelinskie has quit [Ping timeout: 265 seconds]
ovf has quit [Max SendQ exceeded]
jzelinskie has joined #zig
eddyb[legacy] has joined #zig
utzig has joined #zig
<pixelherodev> `1/1 test "self-hosted"...Test 'call with non-existent target' compilation succeded, error expected`
<pixelherodev> :)
<pixelherodev> andrewrk: I'm assuming ZIR requires explicit imports, correct?
<pixelherodev> That is, if we encounter an unknown function name, we don't pull a C and define it as a preset type or anything, right? :P
ovf has joined #zig
<alexnask> lol
<alexnask> just use int where there is no type :D
<ikskuh> f(){}
<ikskuh> shortest valid c file :D
<pixelherodev> False!
<alexnask> `The empty list in a function declarator that is not part of a definition of that function specifies that no information about the number or types of the parameters is supplied.`
<pixelherodev> ikskuh: I've got a shorter one
<alexnask> Gotta love C
<pixelherodev>
layneson has quit [Ping timeout: 272 seconds]
<pixelherodev> :)
<pixelherodev> alexnask: yeah...
<pixelherodev> I mean, I do
<alexnask> Sure
<pixelherodev> It's still easily in my top three
<alexnask> Its quirky though
<pixelherodev> Oh for sure
<alexnask> `void func1() { } .... func1(1, 2, 3); ` <- The compiler need not produce an error
<pixelherodev> Yeah I know
* ikskuh laughs evil
<ikskuh> const char main __attribute__((section(".text"))) = 0xC3;
<pixelherodev> The way I see it, C's quirks are utterly atrocious
<ikskuh> valid for x86
<alexnask> Ah yes another classic
<pixelherodev> but
<pixelherodev> C's quirks are *constant*
<pixelherodev> C's quirks in ten years will be the same they were ten years ago
<pixelherodev> C++, Rust, even Zig for now, don't provide that kind of guarantee
<pixelherodev> Hell, C++ and Rust are basically determined to be as far away from that as possible
<ikskuh> zig does not want to atm :D
<pixelherodev> c++17 had so many changes the wikipedia page was basically "this... isn't complete. there's too many features to list for that."
<alexnask> GCC should standardize their C extensions
<ifreund> yeah c++ is ridiculous
<pixelherodev> C18 literally added *nothing* to the language, and just improved what was already there
<pixelherodev> alexnask: ehh
<pixelherodev> I disagree
<pixelherodev> Some of the GCC extensions are good, eys
<pixelherodev> yes*
<pixelherodev> Others less so
<alexnask> I dont mean include them in the C standard
<pixelherodev> Do you mean to define them?
<pixelherodev> Add them to Clang
<pixelherodev> ?
<pixelherodev> Add them to every other C compiler in existence?
<alexnask> Make a "GCC extension" standard so that other compilers can implement them and guarantee the same behavior
<pixelherodev> ahh
<alexnask> Clang implements a good amount of gcc extensions
<pixelherodev> True
<pixelherodev> I think an official way to define C extensions would be good
<pixelherodev> Ohh, i know a good example
<pixelherodev> You know RISC-V?
<alexnask> vaguely :P
<pixelherodev> I'm thinking `C + GNULite + Embed`
<pixelherodev> That is, well-defined standards (C standard, extension specs, etc), where a compiler explicitly reports what extensions it supports
<pixelherodev> Heck, add e.g. POSIX to that list
<pixelherodev> GCC would report `C + POSIX + GNU`
<pixelherodev> Build scripts could then do `if (compiler.supports("POSIX"))`
<pixelherodev> `if (compiler.supports("GNU"))`
<pixelherodev> etc
<pixelherodev> andrewrk: [insert party hat here]
<pixelherodev> :)
<andrewrk> let's see what happens to those ggf graphs :D
<alexnask> yay \o/
<pixelherodev> andrewrk: I'm assuming ZIR requires explicit imports, correct?
<pixelherodev> (while you're here :)
<andrewrk> I do not understand the question
<pixelherodev> If we see `call(@foo)`
<pixelherodev> and @foo hasn't been defined yet
<pixelherodev> That should error, correct?
<pixelherodev> alexnask: does this mean ZLS is about to get a bunch faster, too? :)
<alexnask> We'll see :D Let me update my branch and merge to master
<pixelherodev> :)
<pixelherodev> andrewrk: I'm asking because it currently doesn't seem to do so and I wanted to be sure this wasn't deliberate before fixing it
<andrewrk> pixelherodev, ZIR is the thing that makes all the zig compile errors work for zig source code
<andrewrk> so your question can be answered by asking, "how does it work in zig?"
<pixelherodev> That's a yes, I take it?
<pixelherodev> `1/1 test "self-hosted"...Test 'call with non-existent target' compilation succeded, error expected`
<pixelherodev> Alrighty, patching
Snetry has quit [Ping timeout: 256 seconds]
Snetry has joined #zig
dingenskirchen1 has joined #zig
dingenskirchen has quit [Ping timeout: 260 seconds]
dingenskirchen1 is now known as dingenskirchen
dermetfan has joined #zig
RagingDave has joined #zig
waleee-cl has joined #zig
<pixelherodev> andrewrk: would the proper place to make the check be genCall?
<pixelherodev> The *parser* probably shouldn't reject it; it's grammatically valid
<andrewrk> pixelherodev, codegen.zig should not be doing any semantic analysis
<andrewrk> by the time control flow gets there, everything should be smooth sailing
<andrewrk> can you explain a bit more what you're trying to solve?
<pixelherodev> Right now, `call(@foo)` doesn't result in an error if `foo` isn't defined
<pixelherodev> Or at least, `module.update()` doesn't return an error for it
<pixelherodev> My goal here is to scan the list of known decls and error out if it isn't found
<pixelherodev> This should be in Module.zig, right?
<pixelherodev> That's where semantic analysis is IIUC
<pixelherodev> Wait... that *should* be failing
<pixelherodev> self.resolveInst() should fail...
<pixelherodev> Ahh
<pixelherodev> I see
<pixelherodev> it calls through to resolveDecl, which appears to create it if it doesn't already exist
<pixelherodev> Though that *should* fail too, I'd think
<andrewrk> yeah that's where it should fail
<andrewrk> note that it will insert a placeholder "invalid" decl so that any other references to this same name will not produce redundant compile errors
<pixelherodev> ohhh, gotcha
wozeparrot__ has joined #zig
greenfork has quit [Ping timeout: 260 seconds]
RagingDave has quit [Quit: quit]
aerona has joined #zig
bjornroberg has joined #zig
satchmo has joined #zig
satchmo_ has quit [Ping timeout: 260 seconds]
tgschultz has quit [Ping timeout: 240 seconds]
dddddd has quit [Ping timeout: 240 seconds]
dimenus has joined #zig
cole-h has joined #zig
iwq has quit [Ping timeout: 246 seconds]
layneson has joined #zig
<andrewrk> alright. chores, then it's time to give some love to pull requests
iwq has joined #zig
<pixelherodev> uh oh
<pixelherodev> I need to quickly make more
<pixelherodev> before all of mine get merged :P
_Vi has joined #zig
scientes has joined #zig
<scientes> andrewrk, how do you get those nice instruction count statistics?
<scientes> I have a new enough CPU
<andrewrk> scientes, specifically, which column?
<scientes> i.e. 8df0841d6ab964e2aec750a8cee
<andrewrk> the columns are timestamp,benchmark_name,allocator,commit_hash,error_message,samples_taken,wall_time_median,wall_time_mean,wall_time_min,wall_time_max,utime_median,utime_mean,utime_min,utime_max,stime_median,stime_mean,stime_min,stime_max,maxrss,baseline_error_message,baseline_samples_taken,baseline_wall_time_median,baseline_wall_time_mean,baseline_wall_time_min,baseline_wall_time_max,baseline_utime_median,baseline_utime_mean,baseline_utime_min,baseline
<andrewrk> _utime_max,baseline_stime_median,baseline_stime_mean,baseline_stime_min,baseline_stime_max,baseline_maxrss
<andrewrk> that might be a really nice column to add
<scientes> but where do those columns come from?
<andrewrk> which one?
<scientes> all of those above?
<scientes> is it linux-perf?
<scientes> ahh perf stat
wozeparrot__ has quit [Remote host closed the connection]
<andrewrk> timestamp-> from the git commit. benchmark_name,allocator from manifest.json. commit_hash/error_message is part of the logic of the script. samples_taken is from the benchmark harness. maxrss, utime, stime are from getrusage. wall_time is from a timer
wozeparrot__ has joined #zig
<scientes> oh, my git ids are ruined by a merge
<scientes> nah, nvm
RagingDave has joined #zig
decentpenguin has joined #zig
<pixelherodev> Hmm
<pixelherodev> It never *does* resolve
<pixelherodev> Ohhh
* pixelherodev faceplams
<pixelherodev> s/plam/palm
<pixelherodev> I didn't export start
<pixelherodev> so it never analyzed it :P
<pixelherodev> ... except I get the same result if I do export it :(
greenfork has joined #zig
<pixelherodev> Hmm, I'm fairly certain analyzeFnBody is correctly erroring out (if for the wrong reason :P)
<pixelherodev> Something's intercepting it further up the chain...
<pixelherodev> Ohhhh
<fengb> use-after-free is a major vector
<pixelherodev> performAllTheWork is catching it and continuing onwards...
<ifreund> hmm, has someone proposed using underscores in function declarations to ignore parameters and making using all parameters required?
<fengb> Would we reliably detect those with the debug allocator?
<ifreund> yes, i think we would
<pixelherodev> Okay, so update() should check for failures separate from the `try` when calling performAllTheWork, and then pass it up the chain that way...
<pixelherodev> Or, since I'm already passing analysisfails upwards in update, I should do it here too, but I'm starting to suspect it was a deliberate design decision not to do so
<pixelherodev> Better yet
<pixelherodev> I shouldn't be checking if update() returned an error to see if it failed
<pixelherodev> `Unexpected decl error: ErrorMsg{ .byte_offset = 118, .msg = TODO implement type coercion from [8:0]u8 to []const u8 }`
<pixelherodev> That's better
<ifreund> ah pmwhite already followed exactly the same path I did :D https://github.com/ziglang/zig/issues/4164
<fengb> I don’t like it for function args since having a name is more self documenting
<ifreund> more so than saying "I don't use this parameter" by ignoring it with an underscode?
<fengb> But why is it there? You get nothing
<ifreund> it's there to match the function signature required when declaring, for example, a callback
<fengb> You see bizarre silliness in JavaScript where they do `function foo(/* context */)`
<fengb> Yes I know but it doesn’t tell you anything. If you write _context: Context, that hints at it matching with what’s available
<fengb> I suppose the type would work in this case too
<fengb> But compare with something like _: bool
<fengb> _isUpper: bool
<andrewrk> pixelherodev, self-hosted is designed to continue making progress even in the case of compile errors. there can be 1 compile error per decl
<andrewrk> fengb, the strategy used by GeneralPurposeDebugAllocator is not 100% foolproof, but it's pretty good, especially on 64-bit systems. it uses an monotonically increasing (but wrapping) global atomic integer as the "hint" parameter to mmap, and then never re-uses slots
<andrewrk> its effectiveness is limited only by the address space range, and the operating system's honoring of the hint parameter
<andrewrk> in practice, you have to really try on purpose to use up all the virtual address space so that the hint has to wrap back around to low addrs
<andrewrk> also, arguably, operating systems should already be doing this. giving new addrs instead of repeating addrs for map/unmap/map
<pixelherodev> andrewrk: right, that's what I realized (which is why I closed a PR)
layneson has quit [Ping timeout: 260 seconds]
decentpenguin has quit [Quit: decentpenguin]
<pixelherodev> hmm
<pixelherodev> Why would a decl be read as a [N:0]u8 instead of as a slice?
<pixelherodev> Given that I haven't seen it attempt coercion elsewhere, I'm assuming most instances don't have this behavior
dimenus has quit [Ping timeout: 246 seconds]
<shakesoda> don't things with comptime known sizes try to use sized types if possible since 0.6?
<shakesoda> i ran into this and had to throw in a few instances of slicing at callsites
<shakesoda> * sized array types
[rg] has joined #zig
chivay_ is now known as chivay
RagingDave has quit [Quit: quit]
[rg] has quit [Quit: Konversation terminated!]
[rg] has joined #zig
stripedpajamas has joined #zig
stripedpajamas has quit [Quit: stripedpajamas]
doublex has quit [Ping timeout: 246 seconds]
doublex has joined #zig
doublex has quit [Read error: Connection reset by peer]
doublex_ has joined #zig
doublex_ has quit [Read error: Connection reset by peer]
doublex has joined #zig
stripedpajamas has joined #zig
homa_rano has quit [Ping timeout: 265 seconds]
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
stripedpajamas has quit [Quit: sleeping...]
doublex has quit [Read error: Connection reset by peer]
doublex_ has joined #zig
doublex_ has quit [Read error: Connection reset by peer]
doublex has joined #zig
satchmo has quit [Ping timeout: 260 seconds]
stripedpajamas has joined #zig
_Vi has quit [Ping timeout: 260 seconds]
slurpie has joined #zig
metaleap has joined #zig
satchmo has joined #zig
return0e has joined #zig
return0e has quit [Remote host closed the connection]
layneson has joined #zig
satchmo has quit [Ping timeout: 272 seconds]
dddddd has joined #zig
doublex has quit [Remote host closed the connection]
doublex has joined #zig
aerona has quit [Quit: Leaving]
satchmo has joined #zig
bjornroberg has quit [Ping timeout: 256 seconds]
_Vi has joined #zig
traviss has quit [Quit: Leaving]
traviss has joined #zig
cole-h has quit [Quit: Rebooting]
<ikskuh> huh
<ikskuh> is it a well-known-problem that zig can't handle long paths on windows very well?
<ikskuh> i can
layneson has quit [Ping timeout: 260 seconds]
<ikskuh> i can't compile a project on a Desktop folder because zig build crashes with error.Unexpected: FileNameTooLong
cole-h has joined #zig
<andrewrk> no that's not a known problem
<andrewrk> I thought it worked up to something like 32,0000 bytes
<ikskuh> doesn't look like it
<andrewrk> smells like a bug
<ikskuh> i'll try to make a minimal example
<ikskuh> yep
<alexnask> ikskuh, Can you give me an example path length so I can try to repro? Tried on desktop (pretty long path) and in some folders in Documents but I cant get the error to trigger
<ikskuh> try building MasterQ32/gurl on Desktop
<ikskuh> username "test" for me, so "alex" should be enough :D
<ikskuh> C:\Users\test\Desktop\Projects\gurl
<ikskuh> is my folder where i build in
tdc has quit [Ping timeout: 258 seconds]
<alexnask> strange
<ikskuh> yeah
<ikskuh> win7, x86_64
<ikskuh> clean install, using gitbash
<alexnask> Managed to repro in directory C:\Users\Alex\Documents\directory_1\some_other_long_directory\a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z\gurl
<alexnask> I can build a zig init-exe proj in C:\Users\Alex\Documents\directory_1\some_other_long_directory\a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z though >_>
layneson has joined #zig
<alexnask> I can also build the init-exe project in the gurl subdirectory
<alexnask> So not a path length issue
<ikskuh> the stack trace runs into a path length error i think
<alexnask> Yes this is the error I got as well
<ikskuh> what is happening there
<alexnask> hmm
<ikskuh> *integer overflow* ?! :D
<ikskuh> in const len = try di.coff.getPdbPath(path_buf[0..]);
<ikskuh> i think it actually fails to spawn the builder process
<andrewrk> I wonder if somewhere we're using the length of a large buffer rather than a smaller slice of it
<andrewrk> oh, hmm, I recently protected against this however by introducing PathSpace rather than using the array directly
<ikskuh> integer overflow
<ikskuh> const file_offset = debug_dir.virtual_address - header.virtual_address + header.pointer_to_raw_data;
<ikskuh> this looks like it could overflow if evaluated in the wrong order
[rg] has quit [Ping timeout: 265 seconds]
ur5us has joined #zig
[rg] has joined #zig
metaleap has quit [Quit: Leaving]
[rg] has quit [Quit: Konversation terminated!]
slurpie has quit [Ping timeout: 264 seconds]
cole-h has quit [Quit: Rebooting]
cole-h has joined #zig
cole-h has quit [Client Quit]
dimenus has joined #zig
stripedpajamas has quit [Quit: sleeping...]
cole-h has joined #zig
dimenus has quit [Ping timeout: 265 seconds]
Yardanico has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Yardanico has joined #zig
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
layneson has quit [Ping timeout: 260 seconds]
bjornroberg has joined #zig
<alexnask> andrewrk, Can I use a custom build runner without `override-lib-dir`? Like just overriding the special directory or something similar
[rg] has joined #zig
<andrewrk> yeah should work fine
dermetfan has quit [Ping timeout: 260 seconds]
dimenus has joined #zig
daex has quit [Ping timeout: 256 seconds]
daex has joined #zig
SimonNa has quit [Remote host closed the connection]
_Vi has quit [Ping timeout: 260 seconds]
xackus has quit [Ping timeout: 240 seconds]
[rg] has quit [Ping timeout: 272 seconds]
[rg] has joined #zig
bjornroberg has quit [Ping timeout: 272 seconds]
[rg] has quit [Remote host closed the connection]
[rg] has joined #zig
satchmo has quit [Ping timeout: 260 seconds]
<pixelherodev> Has debug integration improved or is it just me?
slurpie has joined #zig
aerona has joined #zig
satchmo has joined #zig