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
<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.
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
<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
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
<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
<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…]