ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
MajorLag has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MajorLag has quit [Ping timeout: 252 seconds]
MajorLag has joined #zig
<andrewrk> I think it's going to take 8+ hours just to type up the release notes
wilsonk has quit [Read error: Connection reset by peer]
fsateler has quit [Ping timeout: 252 seconds]
fsateler has joined #zig
bheesham has quit [Ping timeout: 252 seconds]
bheesham has joined #zig
wilsonk has joined #zig
wink_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
wink_ has joined #zig
beetcoin has quit [Ping timeout: 268 seconds]
beetcoin has joined #zig
unique_id has quit [Remote host closed the connection]
kristate has joined #zig
kristate was banned on #zig by ChanServ [*!*@pw126199016191.18.panda-world.ne.jp]
kristate was kicked from #zig by ChanServ [Banned: I would like you to take a break from Zig for a week, and then come back when you're ready to interact in an ho]
kristate has joined #zig
kristate was kicked from #zig by ChanServ [Banned: I would like you to take a break from Zig for a week, and then come back when you're ready to interact in an ho]
kristate has joined #zig
kristate was kicked from #zig by ChanServ [Banned: I would like you to take a break from Zig for a week, and then come back when you're ready to interact in an ho]
darithorn has quit [Quit: WeeChat 2.2]
_whitelogger has joined #zig
return0e has joined #zig
davr0s has joined #zig
georgewhite has joined #zig
georgewhite has quit [Remote host closed the connection]
kristate has joined #zig
kristate was kicked from #zig by ChanServ [Banned: I would like you to take a break from Zig for a week, and then come back when you're ready to interact in an ho]
wink_ has quit [Remote host closed the connection]
wink_ has joined #zig
porky11 has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristate_ has joined #zig
kristate_ was kicked from #zig by ChanServ [Banned: I would like you to take a break from Zig for a week, and then come back when you're ready to interact in an ho]
beetcoin has quit [Ping timeout: 240 seconds]
beetcoin has joined #zig
davr0s has joined #zig
beetcoin has quit [Ping timeout: 244 seconds]
beetcoin has joined #zig
noonien has joined #zig
unique_id has joined #zig
qazo has joined #zig
cgag has quit [Quit: Connection closed for inactivity]
very-mediocre has joined #zig
unique_id has quit [Remote host closed the connection]
tiehuis has joined #zig
tiehuis has quit [Client Quit]
allan0 has quit [Ping timeout: 246 seconds]
beetcoin has quit [Ping timeout: 246 seconds]
beetcoin has joined #zig
allan0 has joined #zig
MajorLag has quit [Read error: Connection reset by peer]
MajorLag has joined #zig
beetcoin has quit [Ping timeout: 244 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beetcoin has joined #zig
very-mediocre has quit [Ping timeout: 252 seconds]
unique_id has joined #zig
<unique_id> So with packed structs I can just mmap and cast the pointer to a struct that fits the precise layout on disk? That is very cool!
<unique_id> And it'll work for arrays of structs as well? Because the alignment will be 1? That's awesome!
davr0s has joined #zig
return0e_ has joined #zig
<andrewrk> unique_id, yes
<andrewrk> alright, time to merge llvm7 into master
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristate has joined #zig
kristate was banned on #zig by ChanServ [*!*@st4584.nas811.p-tokyo.nttpc.ne.jp]
kristate was kicked from #zig by ChanServ [Banned: I would like you to take a break from Zig for a week, and then come back when you're ready to interact in an ho]
davr0s_ has joined #zig
return0e_ has quit [Ping timeout: 250 seconds]
beetcoin has quit [Ping timeout: 272 seconds]
beetcoin has joined #zig
beetcoin has quit [Ping timeout: 245 seconds]
beetcoin has joined #zig
return0e_ has joined #zig
return0e_ has quit [Ping timeout: 252 seconds]
DutchGh0st has joined #zig
<DutchGh0st> what is a 'Definition.Data.Type' ?
<andrewrk> DutchGh0st, run `zig builtin` (which prints the contents of @import("builtin")) and search for `Definition`
qazo has quit [Ping timeout: 240 seconds]
<j`ey> oh, zig has run time type ino
<j`ey> *info
<andrewrk> j`ey, no, only compile-time type info
<j`ey> ah
beetcoin has quit [Ping timeout: 252 seconds]
beetcoin has joined #zig
very-mediocre has joined #zig
DutchGh0st has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
DutchGh0st has joined #zig
<wink_> andrewrk: Your thoughts on discussing ux-semantics in an issue? (https://github.com/ziglang/zig/issues/1561#issuecomment-422667618)
<DutchGh0st> mhh, I found a case that should trigger a compile error, but does not
<andrewrk> wink_, issues should be one of the following: a question, a proposal, a bug report, a use case, or missing documentation. which kind of issue would you like to open?
<andrewrk> unique_id, I haven't done thorough tests of packed structs in arrays, so please be patient if we have to solve some bugs with that
<DutchGh0st> or well, how do you concat an [][]const u8 into a large []u8 ?
kristate_ has joined #zig
kristate_ was kicked from #zig by ChanServ [Banned: I would like you to take a break from Zig for a week, and then come back when you're ready to interact in an ho]
<andrewrk> DutchGh0st, at compile time?
<DutchGh0st> yes
<andrewrk> you might be hitting #1362
<andrewrk> I can look at this today
return0e_ has joined #zig
<DutchGh0st> I have an array of compiletime "Strings",
<DutchGh0st> here's the contect: I take a struct with only funtions defined on it, which you can see as 'Interface' or 'Trait', I then also take any type
<DutchGh0st> and match if the type has all the functions the interface defines, and if not, I'd like to give an error message like "Function foo(*const Type) void Not found. Found: <all the functions listed on the type>"
<DutchGh0st> something like that
<DutchGh0st> but dinner is ready, brb!
DutchGh0st has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<wink_> andrewrk: maybe "What are the semantics of uX types?"
<andrewrk> wink_, the goal is to have the documentation be able to answer that question - so it would help to be more specific on where the docs are lacking
<andrewrk> is my checklist on your issue incomplete?
davr0s_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wink_> Because I don't know what the semantics are I don't know what questions to ask so I don't know if the list is complete or not. To be more specific, if I define a `var z: u0 = 0; var pZ: *u0 = &z;` what is the value of pZ?
<andrewrk> it's a compile-time only value
<andrewrk> same as a variable of type `type`
darithorn has joined #zig
return0e_ has quit [Ping timeout: 252 seconds]
<wink_> Hmmm, what about `const S = packed struct { f1: u8, f2: u0, f3: u8,}; var s = S { .f1 = 1, .f2 = 0, .f3 = 3, }; var pSf2 = &s.f2;`
<andrewrk> same thing
qazo has joined #zig
<wink_> what is the value of `const o = @offsetOf(S, "f2");`
<andrewrk> error: 0 bit type has no in memory representation
qazo has quit [Ping timeout: 244 seconds]
<andrewrk> that one already works, you can try it
return0e_ has joined #zig
<wink_> Agree that is what the what the compiler says, but if `f2: u8,` it has a value of 1, correct?
<wink_> s/what the what the/what the/ :)
qazo has joined #zig
<andrewrk> wink_, correct
<andrewrk> zig now depends on LLVM 7.0.0
<wink_> why is a u0 an error where as a u8 isn't they seem the same to me.
qazo has quit [Ping timeout: 240 seconds]
return0e_ has quit [Ping timeout: 250 seconds]
<MajorLag> andrewrk, looking at the LLVM thread on HN, someone posted the `printValue` example from the docs where `@isInteger` and `@isFloat` are used., which don't exist. Is this intentional?
<andrewrk> they exist but they're deprecated, use @typeInfo
<MajorLag> `test.zig:11:22: error: invalid builtin function: 'isFloat'`
<andrewrk> oh, huh, that's weird. I wonder why docgen isn't erroring out
<MajorLag> Don't get me wrong, I'm not asking for them to come back or anything. I'd just rather not mislead people with the docs.
<andrewrk> yeah I'll fix it
return0e_ has joined #zig
return0e_ has quit [Ping timeout: 252 seconds]
DutchGh0st has joined #zig
beetcoin has quit [Ping timeout: 252 seconds]
beetcoin has joined #zig
<DutchGh0st> if anyone has time to spit into this, what do you think of it?: https://pastebin.com/jB4fMFm0
beetcoin has quit [Ping timeout: 240 seconds]
<DutchGh0st> the function `require` basically takes type A, and type B, and matches if type A has all the functions type B has (a match means the names and signatures of the function are equal)
beetcoin has joined #zig
<DutchGh0st> and whenever type A does not have all the functions type B has, compilation is stopped with a compile-error
davr0s has joined #zig
<MajorLag> I think it is a bit cumbersome to force the implementer to define as_mut and as_ref. Also you should be aware that fn signiture comparison breaks down in the presence of comptime parameters. I posted some gists about an hour ago of my own pass at implementing this sort of thing if you'd like to peruse it for ideas.
<MajorLag> Otherwise it's pretty much how I did it, so I'm confident it will work.
<andrewrk> DutchGh0st, for what it's worth, I agree that this use case you're talking about is an important use case, and there's an important open issue to address it
<DutchGh0st> yes, thats a donwside I thought of myself
<andrewrk> but I haven't personally tried to solve it yet or come up with a serious proposal for the issue
<DutchGh0st> but lets say you want an Iterator, you probably only have 1 Iterator implementation for a type
<DutchGh0st> what is your github Gist MajorLag?
<MajorLag> typeclass is similar to what you're trying to do, trait is more for simple name and type matching
<DutchGh0st> is the mem.copy() a workaround of concatting an array of 'strings' ?
<DutchGh0st> mh, in the 'as_ref' and 'as_mut' example, it might be possible to have a lookup table based on the type you want .as_ref() to return, but the lookup must be comptime
hoppetosse has joined #zig
<DutchGh0st> how is the progress for 0.4 going? :)
<DutchGh0st> err, *0.3
<andrewrk> DutchGh0st, here's the schedule: https://clbin.com/TBLtI
<andrewrk> you can see we're down to 19 issues in the milestone: https://github.com/ziglang/zig/milestone/4
<andrewrk> LLVM 7 released today, so I just merged the llvm7 branch into master
<DutchGh0st> wow! Not so long ago there were sooo many issues o.O
<andrewrk> I postponed some of them, but I've also been fixing 6+ bugs per day for about a month
<DutchGh0st> that's still quite alot each day! and only 9 days to go :D :D
beetcoin has quit [Ping timeout: 245 seconds]
beetcoin has joined #zig
very-mediocre has quit [Quit: Page closed]
DutchGh0st has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
porky11 has quit [Ping timeout: 252 seconds]
porky11 has joined #zig
<andrewrk> for future reference
<andrewrk> <andrewrk> does llvm 7 as a .so have some kind of new initialization requirement? I'm getting a segfault in llvm::DIBuilder::createFile (with valid non-null parameters), when linking my frontend against llvm-7.so but not when linking against llvm .a libraries
<andrewrk> <d0k> we have an ABI bug in LLVM 7 when the .so is built with gcc but your program is build with clang. I'm sorry for that.
<andrewrk> I've already been mentioning and documenting that it's required to build zig and llvm with the same c++ compiler, but now with llvm7 there's a segfault if you try to build zig with clang and llvm was built with gcc
hoppetosse has quit [Ping timeout: 244 seconds]
DutchGh0st has joined #zig
DutchGh0st has quit [Client Quit]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
qazo has joined #zig
qazo has quit [Ping timeout: 240 seconds]
MajorLag has quit [Ping timeout: 250 seconds]
porky11 has quit [Ping timeout: 252 seconds]
davr0s has joined #zig
davr0s has quit [Client Quit]
c15ade4 has joined #zig
MajorLag has joined #zig
return0e has quit [Remote host closed the connection]