ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
isd has quit [Quit: Leaving.]
JinShil has joined #zig
kristate has joined #zig
<isolier> Is there a way to get the intel syntax assembly from a zig source file?
kristate has quit [Remote host closed the connection]
<andrewrk> isolier: I really tried to make Intel syntax the default. I had to revert it. Bottom line is llvm support for Intel syntax isn't good enough
relatingdata has joined #zig
<relatingdata> Hi Andrew et al
<relatingdata> Where are we at with the self hosting compiler and the work on caching files /functions /AST etc and llvm backend?
zolk3ri has quit [Quit: Lost terminal]
<andrewrk> relatingdata: I just got the breaking changes I wanted to done, I'm planning on starting that effort this week
<andrewrk> It will be a couple months I think before we are fully self hosting
kristate has joined #zig
kristate has quit [Remote host closed the connection]
<relatingdata> :-) when you have an initial plan please let me see if I can help in any way :-)
<relatingdata> I am fascinated by the pony language at the moment and their "objectives" https://www.ponylang.org/discover/#what-is-pony in terms of type, memory, exception safety, and data-race and deadlock free objectives :-)
<relatingdata> by fully self hosting do you mean that we will not rely on llvm?
kristate has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Remote host closed the connection]
isd has joined #zig
mahmudov has quit [Ping timeout: 256 seconds]
kristate has joined #zig
<andrewrk> relatingdata: no, we will always depend on llvm
<andrewrk> Fully self hosted means that the self hosted compiler can build the self hosted compiler
kristate has quit [Ping timeout: 248 seconds]
<relatingdata> :-) so a zig compiler "fully" written in zig, able to compile itself after bootstrapping :-)
<relatingdata> and obviously the build system follow :-)
<relatingdata> is there any effort to produce a C -> zig translator/compiler?
isd has quit [Remote host closed the connection]
dbandstra has joined #zig
very-mediocre has joined #zig
<andrewrk> relatingdata: yes. Have a look at the translate-c command
<andrewrk> zig translate-c file.c
<relatingdata> ok :-) Thanks
<relatingdata> The C++ used in the compiler at the moment is C++11 or more modern or older? I remember a time when C++ compilers were in most part translators to C and some supporting libraries
<relatingdata> If the objective is to get a working self hosted compiler has that avenue been explored?
<relatingdata> a C++ to zig compiler seems a big target to attempt (at the moment)
very-mediocre has quit [Ping timeout: 260 seconds]
kristate has joined #zig
very-mediocre has joined #zig
<very-mediocre> since the target is llvm having a c transpilation step would be superfluous
davr0s has joined #zig
<andrewrk> relatingdata, see also this issue: https://github.com/ziglang/zig/issues/853
very-mediocre has quit [Ping timeout: 260 seconds]
<andrewrk> there's no reason to try to auto translate the compiler
<andrewrk> for one, it's just overcomplicated
<andrewrk> more importantly, this is an opportunity to rewrite and rework the ugly parts from a clean slate
<andrewrk> why would I give that opportunity up in exchange for maintaining a messy, awkwardly translated codebase?
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<relatingdata> indeed you wouldn't! but only if it speeds things up and improves zig along the journey
<relatingdata> are things like bison/yacc flex/lex in use or are the more modern things that I am not aware of
<andrewrk> it's recursive descent
<andrewrk> the only 3rd party dependencies are llvm, libclang, lld
<relatingdata> Most of my compiler writing has been LISP targeting LISP and fairly simple ones at that :-) It nice when your AST is the source code :-)
<relatingdata> :-)
<relatingdata> and code and data are the same
very-mediocre has joined #zig
davr0s has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
very-mediocre has quit [Ping timeout: 260 seconds]
<kristate> andrewrk: thanks for improving on my PR; reading through the diff has improved my understanding https://github.com/ziglang/zig/commit/85f928f8bff8c033f6ef0104d68b033669cb36e4
very-mediocre has joined #zig
<andrewrk> no problem
<kristate> I am excited
<kristate> and also happy for you that you get to work full time on zig
<andrewrk> we should see some accelerated progress now :)
<kristate> I have been working on the event loop code and have come up with an event handle of sorts
<kristate> somewhat similar to libuv -- I have been trying to keep the design neutral to iocp on windows
<GitHub111> [zig] tiehuis opened pull request #1143: Add float repr bit extraction functions (master...float-repr) https://git.io/fCxJn
<kristate> andrewrk: Ah, I also had a question about function declarations in zig
<kristate> const my_function_h = fn (*EventHandle) error!void;
<kristate> is that correct? if I do that, I get ->-> error: 'my_function_h' depends on itself
<andrewrk> hmm, do you have a test case?
<andrewrk> we do have a couple bugs related to this: https://github.com/ziglang/zig/issues/624 and https://github.com/ziglang/zig/issues/679
<andrewrk> if you show me your test case I can help you come up with a workaround
<andrewrk> my plan is to use the self hosted compiler to try out a different approach for top level declaration resolution and if it solves this bug then "backport" the solution into the stage1 compiler
kristate has quit [Ping timeout: 248 seconds]
xtreak has joined #zig
very-mediocre has quit [Ping timeout: 260 seconds]
kristate has joined #zig
kristate has quit [Ping timeout: 264 seconds]
<GitHub189> [zig] andrewrk closed pull request #1143: Add float repr bit extraction functions (master...float-repr) https://git.io/fCxJn
<GitHub89> [zig] andrewrk pushed 1 new commit to master: https://git.io/fCxUc
<GitHub89> zig/master f50c0c6 Marc Tiehuis: Add float repr bit extraction functions
jjido has joined #zig
kristate has joined #zig
<kristate> andrewrk: let me come up with a small test case -- thanks
relatingdata has quit [Ping timeout: 260 seconds]
dbandstra has quit [Quit: Leaving]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kristate> here is a small test case and issue: https://github.com/ziglang/zig/issues/1144
relatingdata has joined #zig
<andrewrk> kristate, it's definitely a bug. I posted a workaround for y ou
<andrewrk> I'm headed to bed, good night
<kristate> andrewrk: thanks, goodnight
jjido has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
very-mediocre has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
very-mediocre has quit [Ping timeout: 260 seconds]
kristate has quit [Remote host closed the connection]
alexnask has joined #zig
<alexnask> Is there some kind of priority queue for issues/features in zig?
<alexnask> I will likely be finishing up basic @reify tomorrow but I don't really know what to tackle next, I would like to work on the self hosting compiler
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relatingdata has quit [Quit: Page closed]
alexnask has quit [Ping timeout: 255 seconds]
alexnask has joined #zig
xtreak has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
xtreak has joined #zig
noonien has joined #zig
kristate has quit [Remote host closed the connection]
JinShil has quit [Read error: Connection reset by peer]
zolk3ri has joined #zig
very-mediocre has joined #zig
kristate has joined #zig
kristate has quit [Ping timeout: 276 seconds]
very-mediocre has quit [Ping timeout: 260 seconds]
LPeter1997 has joined #zig
LPeter1997 has quit [Ping timeout: 260 seconds]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
very-mediocre has joined #zig
davr0s has joined #zig
<GitHub120> [zig] isaachier opened pull request #1145: Fixes #1111. (master...bigint-neg-one-incr-fix) https://git.io/fWbi9
alexnask has quit [Ping timeout: 240 seconds]
xtreak has quit []
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
<very-mediocre> std.heap.FixedBufferAllocator doesn't do any heap allocation currently, right?
<very-mediocre> I skimmed it and it looks like it manages a buffer that lives on the stack? Or am I missing something?
vegecode has joined #zig
<vegecode> exit
vegecode has quit [Client Quit]
<GitHub173> [zig] isaachier opened pull request #1147: Fix segmentation fault on invalid enum field (master...enum-invalid-field-fix) https://git.io/flFs0
alexnask has joined #zig
vegecode has joined #zig
vegecode has quit [Client Quit]
xtreak has joined #zig
isolier has quit [Ping timeout: 264 seconds]
xtreak has quit [Remote host closed the connection]
bheads__ has joined #zig
Ichorio has joined #zig
lain0n has joined #zig
bheads_ has quit [Ping timeout: 256 seconds]
lain0n has quit [Quit: Leaving]
<ltr__> hello everyone o/
<ltr__> hey andrewrk , saw your twit about vulkan libraries , are you working on something related with zig and games?
<alexnask> Hi
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alexnask> Afaict andrewrk was looking into using some graphics API without a libc dependency
<ltr__> yes, i was under the impresion that vulkan was much more lightweight than opengl
<ltr__> any experiments with zig<->vulakn so far?
<alexnask> I don't know if lightweight is a correct description, it's much lower level for sure
<alexnask> But at least on linux it uses libc (and c++??) under the hood
<ltr__> thin layer between gpu and the rest of the world
<alexnask> It seems like @cImport'ing vulkan is buggy atm
<ltr__> oh =/
<alexnask> But it should be pretty easy to use if that bug is fixed
<ltr__> ill try to look into that this weekend
<alexnask> And it may be an easy manual fix, I may look into it tomorrow
<ltr__> nice, ill be msg you then
<alexnask> But in general it's really easy to use C libraries
<ltr__> may be it can be used with sdl on top of vulkan
<alexnask> SDL should work fine
<ltr__> my goal is to do a PoC of a simple game i have a in mind, ill use zig to do it.
<ltr__> yeah i saw that, thats why i think sdl would be a good choice, it works well with zig
<alexnask> I've used windows and opengl headers before really easily, vulkan headers must be doing something pretty weird to not work with @cImport
<ltr__> i can imagine that is the same problems that libuv has, opaque unions that macro dark magic
<ltr__> and* macro magic
<ltr__> im always lost with opengl versions , supported hardware and capabilities of each one
isolier has joined #zig
<very-mediocre> ltr__ for OpenGL there are 2 main "mobile" versions (OpenGL ES 2 and 3) with a big discontinuity of feature sets
<very-mediocre> and the desktop version is generally equivalent to DX12
<very-mediocre> The ES versions are very disappointing
<very-mediocre> 3 in particular has very poor hardware support
<very-mediocre> For targeting mobile many teams stick with OpenGL ES 2
<very-mediocre> or even use Vulkan
<very-mediocre> and WebGL is a derivation of OpenGL ES 2
LPeter1997 has joined #zig
<LPeter1997> Hi! I've just found out about this language and it's like the perfect thing I was searching for. Is there any way I can contribute to the project in any way? (I'm a hobbyist compiler writer if that matters any)
<alexnask> Hi
<alexnask> Any helps is appreciated, I'm a hobbyist compiler dev too and I've made a couple of PRs
<alexnask> Just pick any issue on the tracker and give it a shot I guess :)
very-mediocre_ has joined #zig
<very-mediocre_> google is awesome for rewriting links like that
<very-mediocre_> actual link: https://www.youtube.com/watch?v=NbHYLAro02M
<very-mediocre_> oh my messages died
<very-mediocre_> LPeter1997: ^ the above is a compiler internals video
<alexnask> Something like #1118 could be a reasonable start
isd has joined #zig
<LPeter1997> Thanks guys! I'll watch the video and toy around with the compiler, then I'll look at issues. Are proposals in the form of issues too?
<alexnask> Yes
very-mediocre has quit [Ping timeout: 260 seconds]
very-mediocre_ is now known as very-mediocre
hinst has quit [Ping timeout: 256 seconds]
<andrewrk> alexnask, the milestones are the priority queue
<alexnask> fair enough
<andrewrk> very-mediocre, std.heap.FixedBufferAllocator manages a buffer that you pass to it upon initialization - which could be anywhere
<very-mediocre> figured after looking into it more deeply, but thanks :)
zolk3ri has quit [Quit: Lost terminal]
<GitHub193> [zig] andrewrk closed pull request #1145: Fix bigint -1 increment operation (master...bigint-neg-one-incr-fix) https://git.io/fWbi9
<GitHub17> zig/master eeda1a1 Isaac Hier: Fix logic
<GitHub17> zig/master f1207a8 Isaac Hier: Add test case
<GitHub17> zig/master 0ab4afb Isaac Hier: Fix increment operation for bigint -1
<GitHub17> [zig] andrewrk pushed 4 new commits to master: https://git.io/flF5O
mahmudov has joined #zig
noonien has quit [Quit: Connection closed for inactivity]
vegecode has joined #zig
<vegecode> I'm trying to use @setGlobalSection and I'm getting an error. I can't see any use of it in github other than when the issue was filed that suggested the feature. I think I'm doing the syntax the same, does anyone see my problem?
<vegecode> const isrfn = nakedcc fn(void)void; const vectortable = ([]isrfn{undefined} ** 14) ++ []isrfun{_start}; {@setGlobalSection(vectortable, ".isrvectors");}
<vegecode> Here is where the issue is filed: https://github.com/ziglang/zig/issues/241
<andrewrk> vegecode, apologies for that being out of date
<andrewrk> is it a function or a variable?
<vegecode> Oh my goodness that is quite alright.
<vegecode> I am trying to declare a table of function pointers to nakedcc void functions to put where interrupts go
<vegecode> The section isrvectors has 14 interrupt vectors that I'm leaving undefined for now and then the 15th is the reset vector
<vegecode> I thought the linker would automatically put the address of the entry point in it, but it doesn't
<vegecode> The generated assembly does declare it as the entry point oo
<andrewrk> there is syntax for section now
<vegecode> Also, is it possible to declare a variable or function as required (like for copyright strings, etc., or interrupts)
<andrewrk> export var aoeu: i32 section(".text2") = 1234;
<andrewrk> this is completely undocumented. I am making a note for myself to add documentation for it
<andrewrk> for "required" stuff I think you want the `export` keyword
<vegecode> Perfect, thank you
davr0s has joined #zig
<vegecode> export const vectortable section(".isrvectors") = []isrfn{@intToPtr(isrfn, 0x3FFF)} ** 14 ++ []isrfn{_start};
<vegecode> const isrfn = nakedcc fn();
<vegecode> What am I doing wrong here?
<vegecode> I've tried sticking void in there and after the parentheses
<vegecode> I get invalid token ';'
<vegecode> If I stick void after the parentheses it expects '{' when I'm trying to declare another function quite a ways down the page
<vegecode> I can
<vegecode> I can't seem to declare a void function pointer
<vegecode> I'm over on my lunch by twenty minutes, but if you could point me to an example of a void function pointer I will check the channel logs after work
<andrewrk> vegecode, const isrfn = nakedcc fn() void;
lainon has joined #zig
<GitHub88> [zig] andrewrk pushed 1 new commit to master: https://git.io/flFpZ
<GitHub88> zig/master 5f38d6e Andrew Kelley: add casting docs, __extenddftf2, and __extendsftf2
vegecode has quit [Ping timeout: 260 seconds]
very-mediocre has quit [Ping timeout: 260 seconds]
lainon has quit [Ping timeout: 245 seconds]
bheads_ has joined #zig
mahmudov has quit [Ping timeout: 256 seconds]
bheads__ has quit [Ping timeout: 264 seconds]
darithorn has joined #zig
mahmudov has joined #zig
jjido has joined #zig
LPeter1997 has quit [Quit: Page closed]
alexnask has quit [Ping timeout: 240 seconds]
Ichorio has quit [Ping timeout: 260 seconds]
<GitHub174> [zig] andrewrk opened pull request #1149: fix compiler crash for invalid enum (master...issue346) https://git.io/flbsy
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lainon has joined #zig
kristate has joined #zig
isd has quit [Quit: Leaving.]