ChanServ changed the topic of #zig to: zig programming language | | be excellent to each other | channel logs:
<mikdusan> yeah between 10.15.x Catalina and 11.x Big Sur, Apple has thrown 3 different wrenches at building software from CLI: forcing SDK, OS-version detection, and dlopen-only way to access installed system libraries
<andrewrk> also another architecture and mandatory code signing
kenran has quit [Quit: leaving]
tane has quit [Quit: Leaving]
<g-w1> is it better to make big-ish prs like 7092 or smaller ones like 7628. The latter could have also been included with the try astgen pr, but I don't know which one is easier for the reviewers?
a92 has joined #zig
ur5us_ has joined #zig
<squeek502> g-w1, imo its best for PRs to be focused (all changes are related to a single topic/goal); size is secondary to that
fraktor has joined #zig
<fraktor> I know I asked about this yesterday, but I'm curious: has anyone done anything with an immediate mode GUI in Zig?
<g-w1> thx
a92 has quit [Quit: My presence will now cease]
a92 has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
<fengb> Is there a way to setup the event loop manually?
<fengb> Shifting my entire main into async is breaking things :(
<andrewrk> I break this rule all the time but as a reviewer I prefer smaller PRs
<andrewrk> oops and by smaller I mean focused, like squeek502 said above
<fengb> Iā€™m curious which PRs have beeen the largest
ur5us_ has quit [Ping timeout: 260 seconds]
osa1_ has joined #zig
hch has quit [Quit: No Ping reply in 180 seconds.]
osa1 has quit [Ping timeout: 265 seconds]
hch has joined #zig
notzmv has quit [Remote host closed the connection]
notzmv has joined #zig
<fengb> Ah I think I can spin up a separate thread to take care of this fugly recursion. Stopgap until it can be made iterative
a92 has quit [Quit: My presence will now cease]
bitmapper has quit [Quit: Connection closed for inactivity]
<wilsonk_> fraktor: there is zig-upaya ( that uses ImGUI...maybe that is what you are looking for?
craigo has joined #zig
alexpana has quit [Ping timeout: 264 seconds]
mikdusan has quit [Quit: WeeChat 2.6]
mgxm has quit [Quit: ....]
mgxm has joined #zig
mgxm has quit [Client Quit]
mgxm has joined #zig
osa1_ is now known as osa1
koakuma has joined #zig
<koakuma> Excuse me, is there any formatting/printing function that can print out a full f128 value?
<koakuma> AFAICT the ones in std.fmt casts its input to f64 before formatting so it's useless for examining small differences in f128 computation
proteusguy has quit [Ping timeout: 246 seconds]
osa1 has quit [Quit: osa1]
osa1 has joined #zig
proteusguy has joined #zig
craigo has quit [Ping timeout: 240 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
craigo has joined #zig
benjif has quit [Quit: Leaving]
<koakuma> Oh thanks g-w1
<koakuma> How do I use it? Just import ryu.zig?
<koakuma> Also, I don't see any f128-taking functions in there, at least in the Zig part
craigo has quit [Ping timeout: 256 seconds]
<koakuma> Oh nvm, casting it to u128 and printing as hex seems to work well enough for my purposes :)
kbd has joined #zig
craigo has joined #zig
mrcurious15 has joined #zig
mrcurious15 has quit [Remote host closed the connection]
kbd has quit [Remote host closed the connection]
hspak3 has joined #zig
hspak has quit [Ping timeout: 240 seconds]
hspak3 is now known as hspak
lucid_0x80 has joined #zig
alexpana has joined #zig
cole-h has quit [Ping timeout: 240 seconds]
cole-h has joined #zig
cole-h has quit [Ping timeout: 256 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
koakuma has quit [Quit: Leaving.]
wootehfoot has joined #zig
_whitelogger has joined #zig
lucid_0x80 has quit [Ping timeout: 256 seconds]
lucid_0x80 has joined #zig
lucid_0x80 has quit [Ping timeout: 272 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
nycex- has joined #zig
nycex has quit [Ping timeout: 240 seconds]
waleee-cl has joined #zig
<daurnimator> andrewrk: you around perchance?
bitmapper has joined #zig
<oats> hmmm, I don't see the `try` operator in the operator precedence table
<ifreund> oats: should be the same as orelse and catch
<oats> ifreund, cheers, thanks :)
<ifreund> but yeah that's an easy fix if you feel like making a PR
<ifreund> (try is sugar for catch |e| return e;)
sord937 has joined #zig
Akuli has joined #zig
<daurnimator> huh; when/why did ZIG_SKIP_INSTALL_LIB_FILES become windows only?
<daurnimator> o.o mikdusan changed it like a year ago
mikdusan has joined #zig
kbd has joined #zig
<kbd> Hi, is there a way to get a function's name through reflection, or are functions anonymous?
<kbd> Trying to build a hashmap of functions to call and I'm trying to make it nice to build that up.
<ifreund> kbd: see
<kbd> <3
<kbd> Really really enjoying Zig so far btw!
<ifreund> same :)
<daurnimator> ifreund: that works if you have the typeinfo of a struct containing a function; but not if you have just a bare function
<ifreund> daurnimator: indeed
<daurnimator> kbd: functions are essentially anonymous at comptime; but at runtime you might be able to inspect debug info to get a name. note this is non-reliable
<ifreund> that breaks as soon as someone strips your binary
<daurnimator> > note this is non-reliable
<kbd> hmm, thanks. This:const info = @typeInfo(@TypeOf(hello));try print("{}", .{info});try print("{}", .{info.Declaration});gives "error: no member named 'Declaration' in union 'std.builtin.TypeInfo'"
<kbd> oy
<kbd> hmm, thanks. This:```const info = @typeInfo(@TypeOf(hello));try print("{}", .{info});try print("{}", .{info.Declaration});```gives "error: no member named 'Declaration' in union 'std.builtin.TypeInfo'"
<kbd> no block code here I guess, sorry.
<daurnimator> kbd: yeah this is IRC, not discord :p
<kbd> Figured maybe clients were fancy nowadays.
<kbd> ok, so sounds like no way to take an array of function pointers and turn it into a map of them.
<ifreund> no, but you could given a file of function declarations
<ifreund> call @typeInfo() on the file -> iterate TypeInfo.Struct.decls
<kbd> Oh, awesome.
<kbd> also fwiw daurnimator, freenode's webchat did show `code formatting` just not blocks :)
<ifreund> many of our clients run in a terminal and have nothing of the sort :P
<kbd> ofc, I should keep that in mind.
<ifreund> pastebins are the way to go yeah
<ugla> Can I drive the Zig evented IO event loop manually? I'd like to integrate it with the glib event loop in a GTK program, so I can use Zig async goodness, but I don't know what I'm doing.
<fengb> At that point, all messages are code blocks :P
<daurnimator> ugla: not with the current implementation
<daurnimator> ugla: though funny you bring it up now; I just mentioned it in the zig event loop discord channel
<ugla> daurnimator: I see, thanks. Is it something that might happen eventually?
<ugla> Pun intended :)
<fengb> Zap is a different event loop implementation that works with other languages
<ugla> šŸ‘€
<ifreund> last I heard the ziggo branch was recommended
<kbd> ifreund: almost there, but getting "error: values of type 'std.builtin.Declaration' must be comptime known, but index value is runtime known". Possible to build a hashmap at comptime for use at runtime?
<ifreund> kbd: sounds like you need an inline for/while loop
<ifreund> oh and see std.ComptimeHashMap
<ifreund> since the allocator interface doesn't work at comptime
<kbd> amazing, inline for worked.
<kbd> ty so much, never would have figured out that combination of "put public functions in another file then iterate over the imported object's Struct with an inline for" :)
<ifreund> no problem!
<kbd> and now I don't even need to define anything since I'm using an ArrayHashMap and I can put the functions in the file in the order I want.
<kbd> I have no idea what would be involved in this, but if y'all could make the Zig Software Foundation available for Amazon Smile donations I'll switch from the Python Software Foundation. (Gonna donate anyway tho)
<ifreund> kbd: I pinged the dude responsible for stuff like that :D
Michcioperz has joined #zig
blueberrypie has quit [Quit: leaving]
hnOsmium0001 has joined #zig
<andrewrk> kbd, I just signed up ZSF for it, let me know if it works
<kbd> oh neat, I'll go look and see if it's an option
<kbd> oh, wrong place
<andrewrk> I don't think it will be that useful though - it's only 50 cents on a $100 purchase
<kbd> Yeah it's small, but better than 0. FWIW Amazon says the PSF has received 2,556.09 as of Nov 2020.
<andrewrk> in total?
<andrewrk> over a period of years?
<kbd> lol yeah that's what it looks like.
<andrewrk> tbh that's not much...
<kbd> It's not.
<kbd> But, easy way for people to donate. Personally I often forget to order things from instead of :(
<marler8997> is there a decl equivalent for @field?
<andrewrk> @marler8997, @field is just a.b syntax where b is a comptime string
craigo has quit [Ping timeout: 240 seconds]
<marler8997> it should work with decls as well
SimonNa has joined #zig
a_chou has joined #zig
<marler8997> it worked, but, looks like isn't declaring that it is null-terminated
<marler8997> it is guaranteed to be null-terminated correct?
a_chou has quit [Client Quit]
lucid_0x80 has joined #zig
<andrewrk> you're looking at the compiler source? I see name: [*:0]const u8
<marler8997> I just assumed they were since string literals are
<andrewrk> what's "they"?
<marler8997> the strings inside TypeInfo
<marler8997> like,, etc
<andrewrk> ah, I thought you were working on stage2 stuff, never mind
<marler8997> pivoting...should the root.panic handler be called on a null-reference error on windows?
<andrewrk> you're talking about the segfault handler?
<marler8997> root.panic
<marler8997> can you also provide a default segfault handler?
<andrewrk> what's a null-reference error?
<marler8997> (@intToPtr(fn() void, 1))();
<marler8997> almost null :)
<andrewrk> ok yeah the segfault handler
<andrewrk> you can disable it and set up your own
<marler8997> sweet
<andrewrk> put `pub const enable_segfault_handler = false;` in your root source file
<marler8997> looks like the default one doesn't do anything for a Windows application (with no console)
amelaye has joined #zig
<marler8997> probably should submit a PR to fix that
<marler8997> there's just so much to do, it's endless
<andrewrk> we're building a skyscraper by hand
<marler8997> true, I'm also pretty limited since it takes a while for my PRs to get looked at :)
<marler8997> any reason why this PR that fixes a truly egregious error hasn't been merged yet?
cole-h has joined #zig
<marler8997> not being able to include ".." in pathnames on windows...I can't believe it's been broken for so long
Michcioperz has left #zig [#zig]
amelaye has quit [Remote host closed the connection]
<ifreund> oh wow, I saw someone having issues with that and just assumed windows was stupid or something
<fengb> Why not both šŸ™ƒ
<andrewrk> marler8997, the reason is mostly holidays but I'll look now
<andrewrk> thanks for this btw, you are right this is long overdue
lucid_0x80 has quit [Ping timeout: 260 seconds]
factormystic4 has joined #zig
factormystic has quit [Ping timeout: 268 seconds]
factormystic4 is now known as factormystic
factormystic has quit [Read error: Connection reset by peer]
factormystic has joined #zig
benjif has joined #zig
FireFox317 has joined #zig
FireFox317 has quit [Remote host closed the connection]
Kingsquee has joined #zig
factormystic0 has joined #zig
factormystic has quit [Ping timeout: 240 seconds]
factormystic0 is now known as factormystic
<marler8997> andrewrk, are you wanting us to duplicate the RtlDosPathNameToNtPathName logic inside the Zig standard library?
<marler8997> to avoid the heap allocation?
<andrewrk> yes
<g-w1> I think right now this should work, (stage2) but it is not because there is a missing deref somewhere in astgen for orelsecatchexpr. is this a kind of thing I should make an issue for? or just leave it? Trying to make some tests for stuff like this, but I don't know if this warrants an issue or not.
<g-w1> ah, well I fixed it :P. but still pertains to the future when facing harder issues
<g-w1> if the compiler is known to be incomplete, does a bug just add to the noise? maybe a comment is better?
meowray has left #zig ["WeeChat 2.6"]
<ifreund> daurnimator: by the way, river now does change where it looks for the system config based on the install prefix used while building
<ifreund> I think your PKGBUILD will still work, it will just rebuild some things in the install step :/
sord937 has quit [Quit: sord937]
Daimanta has joined #zig
<Daimanta> Hi, I'm new!
<fengb> Hi new, Iā€™m dad
<Daimanta> Hi dad :)
<ifreund> o7
<Daimanta> If I have a technical question about Zig, is this the place to be?
<ifreund> yup
<Daimanta> Nice :)
<andrewrk> welcome Daimanta
Daimanta has quit [Remote host closed the connection]
kbd has quit [Remote host closed the connection]
<andrewrk> I'll be streaming some self-hosted compiler development soon
<andrewrk> 30 min ish
Daimanta has joined #zig
<Daimanta> So, I'm building my first program and part of the program is reading a password for further processing. Reading stdin is quite easy (yay!) but I want to silently read, that is without echo. Is this possible
<andrewrk> I'm not sure how that works
<andrewrk> I've seen some software do it
<ifreund> some termios thing
cole-h has quit [Quit: Goodbye]
<ifreund> I think there's a flag you can set to disable echo
cole-h has joined #zig
cole-h has quit [Client Quit]
<Daimanta> I'm afraid that the solution is not very portable, but that is something I can accept
<Daimanta> I know that cmd has "@ECHO OFF" and many linux shells have "stty -echo" but that will probably require some differentiation.
<ifreund> well the proper way to do thisn on unix-like systems is termios, we have std.os.tcgetattr and std.os.tcsetattr
<Daimanta> ah, that probably gives me some handles, thanks.
<ifreund> man termios says the ECHO flag is what you want to unset
<ifreund> no problem and good luck!
<Daimanta> Is there any place where you can give input on things like documentation as I have some constructive feedback
<ifreund> Well, the issue tracker if it's a concrete problem. Be aware that there are other higher priority tasks at this stage in the languages development however
<Daimanta> ok, I see. I have more than a single issue on this point so I'll probably check back in on a later date
<ifreund> PRs are always welcome of course
<Daimanta> Understoord
<Daimanta> I do want to complement the devs on the creation of this language. It's the first time I'm actually motivated to do low-level langs without being repulsed by the language design decisions.
<andrewrk> :)
<Daimanta> I do struggle with the documentation, so that's a major hurdle for me
<fengb> Have you seen
<Daimanta> I did and it's really helpful but very incomplete at the moment.
<Daimanta> Major kudos to the people doing the documentation as well. I know it's generally considered not "sexy" but documentation really helps with the onboarding process.
<ifreund> I think the documentation on the language itself is pretty solid
<ifreund> documentation for the standard library is quite sparse though, mostly you just want to read the source code
<ifreund> I could also be biased about the language reference coming from C/C++
<ifreund> it's probably less accessible if you are coming from, say, javascript
<Daimanta> I do come from high-level languages so I work with other types of documentation. But I do agree that the automated source code doc is not complete yet.
Akuli has quit [Quit: Leaving]
Daimanta has quit [Ping timeout: 245 seconds]
cole-h has joined #zig