ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sagecode has quit [Ping timeout: 260 seconds]
sagecode has joined #zig
alexnask has quit [Ping timeout: 248 seconds]
diefroggy242 has joined #zig
<GitHub197> [zig] andrewrk closed pull request #1109: allow passing by non-copying value (master...pass-by-non-copying-value) https://git.io/vh6oi
<GitHub134> [zig] andrewrk pushed 1 new commit to master: https://git.io/vhMLA
<GitHub134> zig/master 7515187 Andrew Kelley: Merge pull request #1109 from ziglang/pass-by-non-copying-value...
<diefroggy242> I'm getting a build error about the TargetMachine and the type of file it emits. I found the relevant error string in zig_llvm.cpp but it's not obvious to me what I'm doing wrong.
sagecode has quit [Ping timeout: 245 seconds]
<andrewrk> hmm let me see if I can reproduce it
<diefroggy242> Thank you
<andrewrk> ok I get the same thing, let me check something...
<andrewrk> I'm wondering if msp430 is an experimental target of LLVM (not enabled by default)
<diefroggy242> I think it might be
<andrewrk> hm looks like a normal target
<andrewrk> I'm going to go ask #llvm
<andrewrk> diefroggy242, I get this when I try to use clang with msp430 target: https://clbin.com/s5ctr
<andrewrk> this is why we don't have msp430 in the support table in the readme
<andrewrk> I think it's not fully working in LLVM. I'll send a message to the mailing list to find out what's going on.
<diefroggy242> hmmm... why would llvm say that msp430 was a target if it didn't work even that much?
<diefroggy242> what is the msp430-unknown? specifically the unknown part?
<diefroggy242> is that the environment? I wasn't sure what setting to use for that. I've tried code16 and unknown in my build.zig file. Neither worked.
<andrewrk> diefroggy242, "unknown" in the target triple to clang means "freestanding"
bheads has joined #zig
<diefroggy242> It looks like clang can at least get to the part where it turns the c file into assembly instructions, even if the assembler can't do anything with them? Is there an option in zig to emit assembly? I could then use the gcc assembler that TI provides.
<andrewrk> diefroggy242, yeah, try this: zig build-obj yourfile.zig --target-arch msp430 --target-os freestanding --emit asm
dbandstra has quit [Read error: Connection reset by peer]
<andrewrk> I don't think we have a build API for this yet
<andrewrk> but you can run this command directly
<diefroggy242> perfect thanks
<diefroggy242> andrewrk, excuse my ignorance, but by build API you mean within the build.zig file? I would have to switch to a Makefile for this, right?
<andrewrk> yes that 's what I meant
<andrewrk> I can add it, just haven't yet
<andrewrk> build.zig is a bit experimental right now
dbandstra has joined #zig
<diefroggy242> Thanks for your help. I haven't gotten very far with Zig yet, but I really like what I've seen. I do embedded software for high reliability systems at work only in C, and am searching for something better. Thanks for sharing your work with the world. Goodnight
<andrewrk> goodnight, come back any time
diefroggy242 has quit [Ping timeout: 260 seconds]
bheads has quit [Ping timeout: 256 seconds]
zolk3ri has quit [Remote host closed the connection]
<dbandstra> andrewrk, how can i call c.SDL_GL_SetAttribute? its first param is a `typedef enum {...} SDL_GLattr;`
<dbandstra> if i pass e.g. c.SDL_GL_STENCIL_SIZE, i get the error integer value 7 cannot be implicitly casted to type 'SDL_GLattr'
<andrewrk> hmmm, C lets you implicitly cast integers to enums, doesn't it
<andrewrk> try this: c.SDL_GLattr(c.SDL_GL_STENCIL_SIZE)
<dbandstra> that says 'expression value is ignored' for some reason
<dbandstra> that says 'expression value is ignored' for some reason
<dbandstra> oops
<dbandstra> nevermind that was because SDL_GL_SetAttribute returns an int, thanks
xtreak has joined #zig
<andrewrk> dbandstra, you know about `_ = foo()` ?
<andrewrk> to throw away a return value
<dbandstra> yeah
<dbandstra> i was just thrown off for a moment by the '^' in the error message(points to the end of SDL_GL_SetAttribute token so i intuitively thought something was wrong with the argument)
<andrewrk> ah, yeah that could be much better
kristate has quit [Ping timeout: 245 seconds]
xtreak has quit [Ping timeout: 245 seconds]
xtreak has joined #zig
<dbandstra> has anyone started to make a game in zig? other than tetris, and the mysterious wolf3d thing on tgschultz's site?
<andrewrk> i'm not aware of any projects
<andrewrk> my game projects are progressing very slowly because I'm insisting in one project to not have an operating system (boot into the game), and in the other project not depend on libc
<dbandstra> i'm trying to come up with an idea that would be technically useful/interesting (zig-wise), and also quick to make
<dbandstra> if only to help get some basic libraries built (image loading, 3d math, whatever)
<dbandstra> maybe just a FPS.. that's always a good fallback if you have no original ideas i guess
<dbandstra> except it needs art assets
<dbandstra> something with non-animated actors (tanks? ships?) ... arcade gameplay ... multiplayer possibilities
<dbandstra> basic physics
<andrewrk> opengameart.org is pretty good
sagecode has joined #zig
very-mediocre has joined #zig
dbandstra has quit [Quit: Leaving]
xtreak has quit [Read error: Connection reset by peer]
xtreak has joined #zig
quc has joined #zig
<GitHub51> [zig] andrewrk opened pull request #1123: Remove number casting syntax (master...remove-number-casting-syntax) https://git.io/vhMZG
sagecode has quit [Ping timeout: 264 seconds]
Ichorio has joined #zig
davr0s has joined #zig
very-mediocre has quit [Ping timeout: 260 seconds]
xtreak has quit [Remote host closed the connection]
_whitelogger has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexnask has joined #zig
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
very-mediocre has joined #zig
Ichorio has quit [Ping timeout: 256 seconds]
jjido has joined #zig
jjido has quit [Client Quit]
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quc has quit [Remote host closed the connection]
jjido has joined #zig
zolk3ri has joined #zig
davr0s has joined #zig
quc has joined #zig
Ichorio has joined #zig
earbanana has joined #zig
alexnask has quit [Ping timeout: 264 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bheads has joined #zig
sagecode has joined #zig
xtreak has joined #zig
<bodie_> I want to get the fd for the executable file of the calling process in C++ so I can patch the macOS relative path bug.
<bodie_> how should I do this?
<bodie_> i.e., without /proc
davr0s has joined #zig
<bodie_> it looks like the usual way is to read argv[0], which is kinda disappointing
Perelandric has joined #zig
earbanana has quit [Ping timeout: 260 seconds]
Hejsil has joined #zig
very-mediocre has quit [Ping timeout: 260 seconds]
diefroggy242 has joined #zig
<diefroggy242> I think the compiler is treating my target as 32 bit. See https://clbin.com/MycxY
<diefroggy242> I am using the include files provided by TI and intended for gcc. They use int for 16 bits, etc. Maybe I should just modify the header to use stdint types? I'm not sure what other problems could come up from the compiler having the wrong int size though
<Hejsil> I think that is Zig giving c_int the wrong size for the target: https://github.com/ziglang/zig/blob/d464b2532200de3778ac7362e701791a11150d55/src/target.cpp#L693
<diefroggy242> Ah I see maybe. I guess for freestanding, there should be another switch inside there per architecture? I tried building the compiler from source but got an error about missing CLANG even though I think I have everything installed. I didn't try very long though.
<diefroggy242> I've never filed an issue on Github before. I've only used subversion at work. Would this count as an issue?
<diefroggy242> It would be pretty easy to just modify my include files to take that into account.
<Hejsil> It sounds like a bug to me
<Hejsil> If Zig can compile to your target, everything really should just work
<Hejsil> c_int and all
<diefroggy242> By the logic currently, a long on msp430 is shorter than an int
<diefroggy242> Thanks for your help.
<Hejsil> I think this is releated, but I can't find an issue for c_<type> in general: https://github.com/ziglang/zig/issues/977
<Hejsil> So post your issue :)
mahmudov has quit [Ping timeout: 248 seconds]
<diefroggy242> Sweet first issue posted on github! https://github.com/ziglang/zig/issues/1125
alexnask has joined #zig
bheads has quit [Ping timeout: 265 seconds]
xtreak has quit [Remote host closed the connection]
ofelas has quit [Quit: shutdown -h now]
ofelas has joined #zig
xtreak has joined #zig
jjido has joined #zig
diefroggy242 has quit [Ping timeout: 260 seconds]
xtreak has quit [Remote host closed the connection]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
earbanana has joined #zig
earbanana has left #zig [#zig]
sagecode has left #zig [#zig]
mahmudov has joined #zig
xtreak has joined #zig
i_right_i has joined #zig
<GitHub102> [zig] andrewrk pushed 1 new commit to master: https://git.io/vhM6n
<GitHub102> zig/master e5956f2 Andrew Kelley: add target C int type information for msp430 target...
xtreak has quit [Remote host closed the connection]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
i_right_i has quit [Quit: Leaving]
isolier has joined #zig
klltkr has joined #zig
dbandstra has joined #zig
<andrewrk> I'm not able to reproduce the travis failure on my mac
jjido has joined #zig
<GitHub41> [zig] andrewrk pushed 1 new commit to master: https://git.io/vhMAw
<GitHub41> zig/master 431fda4 Andrew Kelley: Merge pull request #1123 from ziglang/remove-number-casting-syntax...
<GitHub154> [zig] andrewrk closed pull request #1123: Remove number casting syntax (master...remove-number-casting-syntax) https://git.io/vhMZG
davr0s has joined #zig
<GitHub27> [zig] binary132 opened pull request #1127: Fix 1117: Use realpath in stage1 Darwin os_self_exe_path (master...fix-1117-macos-realpath) https://git.io/vhMpC
<bodie_> andrewrk, well I was hoping to use getpid() and then somehow map that to the fd so I could look up the real path by fd instead of by path
<bodie_> but this patch should do the trick
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
tyler has quit [Disconnected by services]
tyler has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rom1504 has joined #zig
vegecode has joined #zig
<vegecode> andrewrk, did you ever get a response from llvm about the status of msp430? I would enquire, but I'm not entirely sure what to ask
Perelandric has quit [Quit: Page closed]
vegecode_ has joined #zig
vegecode has quit [Ping timeout: 260 seconds]
Hejsil has quit [Ping timeout: 260 seconds]
vegecode_ has quit [Ping timeout: 260 seconds]
sagecode has joined #zig
jjido has joined #zig
Ichorio has quit [Ping timeout: 265 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bheads has joined #zig
alexnask has quit [Ping timeout: 276 seconds]
pecan has joined #zig
quc has quit [Ping timeout: 264 seconds]
bheads has quit [Quit: Leaving]