ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
hasen_judy has quit [Remote host closed the connection]
ltr_ has joined #zig
<ltr_> hello
arBmind has quit [Quit: Leaving.]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 258 seconds]
_whitelogger has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
btyrbgvkdw has joined #zig
btyrbgvkdw has quit [Remote host closed the connection]
brbosvyuby has joined #zig
brbosvyuby has quit [Remote host closed the connection]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
pupp has joined #zig
<pupp> ltr_, hello
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
puppp has joined #zig
pupp has quit [Ping timeout: 258 seconds]
arBmind has joined #zig
hoppetosse has joined #zig
redj has quit [Ping timeout: 252 seconds]
arBmind has quit [Quit: Leaving.]
J has joined #zig
<J> Hello
J is now known as Guest87283
Guest87283 has quit [Client Quit]
imran has joined #zig
imran has quit [Client Quit]
puppp has quit [Ping timeout: 248 seconds]
puppp has joined #zig
arBmind has joined #zig
<tankfeeder> hi all
hasen_judy has joined #zig
hasen_judy has quit [Remote host closed the connection]
puppp has quit [Read error: Connection reset by peer]
puppp has joined #zig
hoppetosse has quit [Ping timeout: 240 seconds]
hasen_judy has joined #zig
hasen_judy has quit [Remote host closed the connection]
hasen_judy has joined #zig
hasen_judy has quit [Remote host closed the connection]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 255 seconds]
hoppetosse has joined #zig
hasen_judy has joined #zig
hoppetosse has quit [Ping timeout: 240 seconds]
hoppetosse has joined #zig
hasen_judy has quit [Remote host closed the connection]
puppp has quit [Ping timeout: 246 seconds]
puppp has joined #zig
hoppetosse has quit [Ping timeout: 255 seconds]
Guest131 has joined #zig
Guest131 has left #zig [#zig]
dimenus has joined #zig
hoppetosse has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
<dimenus> andrewrk: ran into a few snags, not sure how I had this working properly the other day but it doesn't work now.
<dimenus> I can compile a program linking to the CRT just fine, but it doesn't find symbols as I would expect
hoppetosse has quit [Ping timeout: 255 seconds]
ofelas has joined #zig
hoppetosse has joined #zig
ofelas has quit [Quit: shutdown -h now]
hoppetosse has quit [Ping timeout: 248 seconds]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
redj has joined #zig
puppp has quit [Quit: puppp]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
hoppetosse has joined #zig
PV_ has joined #zig
cenomla has joined #zig
cenomla has quit [Client Quit]
cenomla has joined #zig
cenomla has quit [Client Quit]
cenomla has joined #zig
<GitHub80> [zig] Dimenus opened pull request #570: WIN32: Linking with the CRT (master...master) https://git.io/vFqwC
<andrewrk> dimenus, I'm looking at your pull request now
<dimenus> I think it closes a couple other issues as well
<dimenus> but i haven't hunted around yet
<dimenus> i figured out the printf issue by the way, silly Microsoft
<andrewrk> printf issue, sounds like text/binary mode
<dimenus> i was getting undefined reference to printf and it was driving me nuts
<dimenus> created a hello world C app and removed the '%AdditioanlDependencies' included by default in Visual Studio
<dimenus> and that too failed the same way
<dimenus> so I found out that they ported the implementation of non-inline stdio to another lib
<dimenus> so really we're linking 4 (5 if you include the kernel32 that zig builds) libs in order to support the CRT
<andrewrk> ah, good to know.
<andrewrk> dimenus, I think that means once we solve https://github.com/zig-lang/zig/issues/515 we could avoid linking that lib that has printf
<dimenus> correct
minus has quit [Quit: Bye]
dimenus has quit [Ping timeout: 255 seconds]
minus has joined #zig
<PV_> andrewrk: I have a question about comptime string paramater, like fn(comptime par : []const u8). Is such parameter always string sitting in readonly section of executable?
<PV_> Or is there chance that compiler will put it somehow on stack? What I ask is whether it is safe to take address of such string parameter and use it outside the function.
<andrewrk> PV_, yes if it is comptime it is guaranteed to be in static readonly memory
<andrewrk> it seems like a smell to do that though, maybe you can show some code and I can have a look at what you're trying to do
<PV_> OK. What I intend to do is logger which takes a string and instead of copying it it stores only the address. I wasn't sure whether it is safe enough.
<andrewrk> PV_, and then what? what does it do with the address?
dimenus has joined #zig
<PV_> My aim is to implement white box testing support. Functions log various things, the test then checks whether what was expected to happen did really happen. The logs are stored as pointers (where applicable) to save space.
<andrewrk> interesting
hoppetosse has quit [Ping timeout: 240 seconds]
<PV_> I got this idea from Agaram Kertik ( http://akkartik.name/post/tracing-tests ). Basically it allows to verify what's going on inside the code, without need to change the code, make everything exposed, everything interface. One example: If allocators do log their allocations and dellocations then it is possible to verify that given code snippet does not use heap or uses it exactly as planned.
<andrewrk> that's a neat idea
<PV_> I'd implemented it in C and it is performant enough. In a test I first express interest in certain logs (in certain string prefixes), the code then records these logs (and not the others) and then I check if the expected logs are in and undesirable logs are not present. These limitations keep the overhead down.
<PV_> The essay I linked describes more powerful system (everything is logged, one can browse the logs to get idea what is going on). K. Agaram later wrote me that he switched to restricted system, like I have.
hasen_judy has joined #zig
<PV_> The technique is non-intrusive, no need to modify anything, only the logs need to be added. It is prone to typos, however. I have some hope for metaprogramming in Zig to be able to check the strings and spot obvious mistakes.
arBmind has quit [Quit: Leaving.]
<andrewrk> PV_, you should be able to do it with 0 runtime cost, you can check for builtin.is_test
<andrewrk> or make your own comptime known bool
hasen_judy has quit [Remote host closed the connection]
arBmind has joined #zig
<PV_> andrewrk: my logs are generated only inside tests, and also only if the were requested (their string prefix was requested). I played with idea to place assembler "nop" instructions instead all logs and then re-insert the original log calls according to the need, but gave up.