ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
daurnimator has quit [Ping timeout: 256 seconds]
daurnimator has joined #zig
stripedpajamas has joined #zig
<stripedpajamas> is there a built in or std library func to round floats to some number of decimal places ?
<waleee-cl> std.math.clamp?
<waleee-cl> ah, no, that was between values
<stripedpajamas> i think for my purposes i can use std.math.approxEq
<stripedpajamas> assuming there is some rounding/precision func somewhere here but i can't find it atm
aerona has joined #zig
blinghound has joined #zig
stripedpajamas has quit [Quit: sleeping...]
t-b is now known as oats
blinghound has quit [Remote host closed the connection]
<andrewrk> it's integrated into formatted printing
ur5us has quit [Ping timeout: 256 seconds]
layneson has joined #zig
frmdstryr has joined #zig
ur5us has joined #zig
<frmdstryr> Has something changed with how zig inlines functions? I'm getting "error: unable to inline function" for a function that is one line
<frmdstryr> pub inline fn writeReg(reg: *volatile u32, val: u32) void {reg.* = val;}
<frmdstryr> Has been working for 7-8 months now...
<frmdstryr> Well I guess using -Drelease-safe makes it work so nevermind
<frmdstryr> Maybe it's becuase llvm updated becuase the build is now 12kb instead of 282kb which is closer to what it was with llvm 9
layneson has quit [Ping timeout: 264 seconds]
craigo has quit [Ping timeout: 272 seconds]
frmdstryr has quit [Read error: Connection reset by peer]
B4s1l3 has joined #zig
opDispatch has quit [Ping timeout: 260 seconds]
nikita_ has joined #zig
nikita` has quit [Ping timeout: 264 seconds]
<andrewrk> I'm starting to think there might be some nondetermisistic behavior here
stripedpajamas has joined #zig
<Snektron> I still do a double take every time i see robin-hood-hashinh
<andrewrk> josh pointed out to me that it might be better to put the max_distance_from_start in the indexes array
<Snektron> (cause its my name)
<andrewrk> oh haha
knebulae has quit [Read error: Connection reset by peer]
stripedpajamas has quit [Quit: sleeping...]
<shakesoda> oh is hashmap being optimized
<shakesoda> we switched to robin hood hashing in soundself a while back (slightly before release), fixed various performance problems
<shakesoda> no idea what the state of the art for a good hashmap is but i was very happy with that move
stripedpajamas has joined #zig
knebulae has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
<fengb> andrewrk: should I switch my donation to ZSF instead?
<andrewrk> hmm I guess the cat is out of the bag
<andrewrk> doesn't hurt anything, but maybe wait until the 11th ;)
aerona has quit [Quit: Leaving]
lunamn has quit [Ping timeout: 256 seconds]
linuxgemini has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 256 seconds]
stripedpajamas has quit [Quit: sleeping...]
marnix has joined #zig
B4s1l3 has quit [Quit: Konversation terminated!]
_Vi has joined #zig
r0bby has joined #zig
<marnix> Did anyone try to do Python-style generators in Zig? Seems perfectly possible using suspend and resume, but a working implementation with a simple API eludes me at the moment... (Can perhaps post a gist of an attempt later, not today probably.)
<daurnimator> yes
<daurnimator> there's a few around
<daurnimator> they're... imperfect
dermetfan has joined #zig
_Vi has quit [Ping timeout: 240 seconds]
<lemmi> ifreund: just watched the swiss map video. i'm wondering if this might still be fast even without simd
dermetfan has quit [Ping timeout: 256 seconds]
<marnix> @daurnimator Any links, perhaps?
antaoiseach has joined #zig
dddddd has joined #zig
<antaoiseach> Hello good folks, I know that there is no official dependency manager for Zig yet, but suppose I wanted to include another zig project in a new project, aside from building a library and linking against it, is there a way to include the project directly? Or is there a preferred way of going about including dependencies? Is there a plan for a central repository of libraries like crates.io?
<ikskuh> antaoiseach: right now, there's no package manager and the usual way is to either include repositories as source or as a submodule in your code base
<ifreund> an official centralized package repo isn't planed, but it's very likely that several unofficial ones will arise after the advent of the package manager
<antaoiseach> ikskuh: Hmmm... sort of what I expected. Thank you! Just curious - including the project directly will still use the same licensing terms etc., right? I mean, that aspect shouldn't be any different from using a binary of the project?
<antaoiseach> Hmmmm
<ikskuh> it depends
<ikskuh> but you cannot include zig libraries as binaries
<ikskuh> zig is always compiled from source
<antaoiseach> I mean support project "calculator" is compiled as libcalc.a and then I link to it, that is fine, right? It's only zig itself which should be built from source if it were to be used in another project? Or did I get that wrong"?
<antaoiseach> suppose*
<ikskuh> if it's a zig library/package, you won't have a "libcalc.a", only "libcalc.zig"
<ifreund> you can compile zig code to a dynamic library with C ABI and link dynamically against
<ikskuh> for native dependencies like C projects you wil have a libcalc.a
<ifreund> this is not the standard way to do things though
<antaoiseach> ifreund: yes, that's what I meant ... as a native lib
<daurnimator> antaoiseach: use a git submodule
<antaoiseach> daurnimator: Okay, I could try that out and see ...
<antaoiseach> Again, not too familiar with licensing restrictions ... suppose the linked project is failing, and I use an updated version of it (as source) in my project ... would that be a potential breach of licensing?
<antaoiseach> (Maybe not)
<ikskuh> it really depends on the licence
<antaoiseach> ikskuh: that makes sense...
<antaoiseach> Okay, thanks, ikskuh ifreund daurnimator - I'll try out some experiments and also check the licences of the dependencies I have in mind! Thank you for the help! :-)
antaoiseach has quit [Quit: leaving]
<ifreund> lemmi: yeah I watched it too and they look quite promising. I think I'm going to go ahead with a zig implementation and try to copy some benchmarks
<lemmi> ifreund: i also tempted to just naively write one for shits and giggles
<ifreund> do it, we can have a hashtable-benchmark-off
<ifreund> I haven't had a chance to use zig's simd stuff for real yet, so I'm curious how that will work out
<lemmi> if time permits, yep
<alexnask> ifreund, Caved in and implemented utf16 offsets for zls :P kak should still be fine though, I support the clangd extension for utf-8 offsets as well
<ifreund> suppose that's necessary for vscode?
<alexnask> Yeah I wanted muh pretty semantic tokens
<ifreund> thanks for implementing the extension <3
<alexnask> And also correct completions on lines with non ascii chars
nikita_ is now known as nikita
nikita is now known as Guest25669
dermetfan has joined #zig
<alexnask> I think you have to add offset_encoding = "utf-8" to language.zig and offsetEncoding = ["utf-8"] to language.zig.initialization_options though
<alexnask> Not sure, I will investigate soon (should work out of the box with utf16 offsets anyway but utf8 offsets are jsut more efficient)
discipulus has joined #zig
<alexnask> andrewrk, Fixed the formatting btw (it was inconsistent because I was sending the result then immediately a null result because of a missed return >.>)
<ikskuh> heya
<alexnask> o/
<ikskuh> is there a way to read "available" data from stdin?
<alexnask> Can you seek stdin?
<ikskuh> no
<ikskuh> it's usually a pipe
craigo has joined #zig
<ifreund> I think you can open the file with O_NONBLOCK and read until you get EAGAIN
<ifreund> this is assuming you're on linux
<ikskuh> not sure, afaik the "file" is already open
ur5us has joined #zig
<ifreund> well, you could probably use fcntl then
Mulugruntz has joined #zig
<ifreund> looks like you should use SETFL not SETFD though as stdin/stdout/stderr usually share the same fd
mixi has quit [Quit: quit]
mixi has joined #zig
<ikskuh> hm
* ikskuh is working some Zig stuff with OpenGL again
<ikskuh> i really wonder how to define glCreateVertexArrays correctly
<ikskuh> oh wait…
<ikskuh> there was something recently that single item pointers coerce to unknown-length-pointers
Snetry has quit [Quit: left Freenode]
Snetry has joined #zig
<alexnask> *T coerces to *[1]T which coerces to [*]T
<alexnask> But you cant go directly from *T to [*]T
discipulus has left #zig [#zig]
_whitelogger has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
craigo has quit [Quit: Leaving]
dermetfan has quit [Ping timeout: 244 seconds]
craigo has joined #zig
_Vi has joined #zig
daurnimator has quit [Ping timeout: 256 seconds]
daurnimator has joined #zig
Guest25669 is now known as nikita
nikita has quit [Quit: Reconnecting]
Guest6133 has joined #zig
Guest6133 is now known as nikita`
dermetfan has joined #zig
layneson has joined #zig
<ifreund> what's the best way to create an integer type with the minimum number of bits needed to represent the bit count of a given type T?
<ifreund> tried @TypeOf(@ctz(T, 0)) but got that "unable to evaluate const expression" thing
<scientes> factormystic, zext bit_count, then clz
<scientes> *bit_count + 1
<scientes> nah, jut bit_count
<ifreund> we don't have zext builtin do we?
<scientes> just cast big
<scientes> like @intCast(u32, foo)
<scientes> then do clz
<scientes> and then 32 - clz
<scientes> kinda a pita
<ifreund> the discord people pointed out that we have std.math.Log2Int as well
<ifreund> that is off by one bit with the return type of @ctz though
<alexnask> Discord ppl best ppl B)
<scientes> ifreund, yeah that doesn't work
<scientes> the clz thing i mentioned will work
<ifreund> yeah I think I'm going to do that, it is a bit of a pita though
<ikskuh> alexnask: discord ppl memeiest ppl
<alexnask> :zerodrool:
<ifreund> here it is: std.meta.Int(false, @clz(T, @as(T, 0)));
<ifreund> not actually too bad
<scientes> ifreund, no, you need to do T.bit_count - @clz
<scientes> or just use u32 for the outer type
<scientes> cause you can't have numbers that big
<ifreund> i'm not sure I understand, this seems to give me the right result
<ifreund> or not :P
<scientes> std.meta.Int(false, 32 - @clz(u32, @as(T, 0)));
<scientes> uggh
<scientes> missing a bunch of stuff there
<ifreund> yeah it's returns a u0
<scientes> std.meta.Int(false, 32 - @clz(u32, T.bit_count));
<ifreund> that works
<ifreund> thanks man
<ifreund> didn't realize that you can do .bit_count on things
samtebbs has joined #zig
<ifreund> though this is also the first really low level stuff I'm doing in zig, just started on a swiss tables implementation
decentpenguin has joined #zig
waleee-cl has joined #zig
<ifreund> anyone have good examples of zig SIMD code lying around?
<scientes> bear in mind that has bit-rotted
samtebbs has quit [Ping timeout: 246 seconds]
<ifreund> thanks
<scientes> ifreund, I actually gave a talk on that code https://www.youtube.com/watch?v=CRSmOlCxHZE
<ifreund> oh sweet!
samtebbs has joined #zig
doublex has quit [Read error: Connection reset by peer]
doublex has joined #zig
VojtechStep has joined #zig
alexnask has quit [Quit: Leaving]
shcv has quit [Remote host closed the connection]
samtebbs has quit [Ping timeout: 246 seconds]
josias has joined #zig
<josias> When compiling from master, I get "undefined reference to `getPollyPluginInfo()'". I am using g++ and the error occurs at "Linking CXX executable zig0".
<ifreund> josias: what OS/distro are you on? you're probably hitting this: https://github.com/ziglang/zig/issues/4799
<ifreund> oh you might be able to use -DZIG_WORKAROUND_POLLY_SO
<ifreund> just saw that that got merged
<josias> I am using a Debian chroot on ARM. So I guess that indeed is the issue that I am hitting.
<scientes> josias, there is a fix in ci/azure/linux_script
MajorLag has joined #zig
stalli has joined #zig
traviss_ has joined #zig
<josias> The script wants to run:
<josias> > sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
<josias> Which doesn't work on Debian.
<scientes> josias, there is a patch in that script
<scientes> don't run the script, read it
<josias> Okay. Got it.
Mulugrun_ has joined #zig
st4ll1 has quit [Ping timeout: 240 seconds]
Mulugruntz has quit [Ping timeout: 240 seconds]
Amun_Ra has quit [Ping timeout: 240 seconds]
traviss has quit [Ping timeout: 240 seconds]
tgschultz has quit [Ping timeout: 240 seconds]
MajorLag is now known as tgschultz
swills has quit [Ping timeout: 264 seconds]
Amun_Ra has joined #zig
<josias> I applied the patch, and zig0 compiled, but when it runs I get a segmentation fault.
forgot-password has joined #zig
<forgot-password> How does one assign a string when I have a pointer of type [*c]u8?
<ifreund> forgot-password: I assume you're doing interop with C and want to create a null-terminated string to pass to a c library?
<ifreund> if so allocSentinel() is the function you want
<ifreund> josias: would you mind opening an issue? that isn't good :/
<forgot-password> I'm given a pointer from the caller
<ifreund> forgot-password: so you want to read the string?
<forgot-password> I want to write it
<oats> forgot-password: ah, you want to write a string into the memory at the [*c] pointer?
<forgot-password> with the sentinel value
<forgot-password> Exactly
<forgot-password> I think we went through every possibility now haha
<ifreund> this doesn't make sense, the C library is providing the memory for you?
<forgot-password> Yes
<ifreund> how does it know how much memory to allocate?
<oats> forgot-password: do you know how long the memory is that was allocated?
<forgot-password> I basically want to std.mem.copy(u8, ptr, "string")
<forgot-password> There's a maximum length for the string
<forgot-password> Yes
<ifreund> ok
<forgot-password> A maximum of 64 bytes
<scientes> or 63?
<ifreund> std.mem.copy should work fine then
<ifreund> and then you can manually set the byte one past the end of your string to '\0'
<scientes> or if you source is :0 you can copy one more length
<oats> hmm, I wonder if zig should have some stdlib functions for dealing with c strings?
<scientes> oats, people should just use the c functions
<scientes> c.strcpy()
<oats> or you could just call into libc
<oats> yeah
<ifreund> josias: that's not good :/ did you get a stack trace? mind opening an issue?
<ifreund> whoops I already said that
<ifreund> scientes: would you happen to know if zig supports the llvm equivalent of _mm_movemask_epi8 yet?
<ifreund> I haven't been able to figure out what the llvm equivalent is yet
swills has joined #zig
<scientes> ifreund, @Vector(i8, 32) < 0
<scientes> @Vector(i8, 32) < @splat(32, 0)
<scientes> @splat(32, @as(i8, 0))
<scientes> that returns @Vector(bool, 32)
<ifreund> i feel like I'm not grokking what @Vector() is doing. What I expect to get out of this operation is a bitmask
<scientes> ^^@Vector() is a type
<forgot-password> ifreund: std.mem.copy doesn't work, because my pointer type is [*c]u8
<ifreund> forgot-password: the @memcpy() builtin then
<scientes> so more like @as([_]@Vector(i8, 32){0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...}) < @splat(32, @as(i8, 0))
<scientes> which returns type @Vector(bool, 32)
<ifreund> yeah I get that it's a type, but it's unlike any other type I've used before
<scientes> which you can then @bitcast(u32, blah) to get the same thing
<scientes> that _mm256_movemask_epi8 returns
<ifreund> that's what I was about to ask :D
<ifreund> thanks for the examples
<scientes> that example isn't quite right
<scientes> but look at the code i posted to see how to cast to vector
<forgot-password> ifreund: Aha, that did the trick. Thanks :)
<ifreund> yeah I need to spend a bit of time trying things with a lot of print statements I think
<ifreund> forgot-password: np
samtebbs has joined #zig
<josias> ifreund, I opened up an issue here: https://github.com/ziglang/zig/issues/5782
<scientes> >
<scientes> Debian 10 in chroot in Termux in Android 5.1 on an ARM tablet.
<scientes> can you try on a more recent android?
<scientes> cause IIRC they changed a bunch of C stuff at some point
<josias> I don't have access to such a device at the moment unfortunately.
<scientes> what kernel version?
<josias> uname -r says 3.18.19
<scientes> josias, also can you you use follow-child-mode
<scientes> strace -f
layneson has quit [Ping timeout: 256 seconds]
<josias> That doesn't change the output.
<scientes> anyways you should put android in the topic
<scientes> and ancient kernel
<scientes> *old
<ifreund> thanks for opening the issue
<josias> Updated the issue.
<scientes> it could be that android only supports PIE executables
<scientes> but that might just be bionic
<scientes> anyways, no idea
samtebbs has quit [Ping timeout: 246 seconds]
<josias> A quick search says that PIEs have been supported from Android 4.1.
<scientes> bionic ONLY executes PIEs
<scientes> but you are running a chroot so that changes a bunch of stuff
<scientes> you are running glibc
<josias> Yes.
<ifreund> oats: by the way, std.cstr is a thing
<scientes> anyways I had been fine running statically-linked non-PIE zig executables on android
<scientes> in order to test stuff
blinghound has joined #zig
<blinghound> is there a clean way of adding a signed int that could be positive or negative to an unsigned int if I know the unsigned int won't underflow/overflow?
<fengb> @bitCast one to the other
<scientes> you have to sext the signed number
<scientes> with @as()
<scientes> and then @intCast() it back
<scientes> after the add
<blinghound> hmm, I want to be able to do something like 'var unum: u64 = 69; var snum: i8 = -10; unum += snum;'
<blinghound> so can I just bitCast the signed int?
<ikskuh> nah, that won't work
<scientes> so you add a sign bit to unum
<ikskuh> you need to sign-extend first
<scientes> @as(i65, unum)
<ikskuh> @bitCast(u64, @as(i64, snum))
<scientes> no, i65
<scientes> @intCast(u64, @as(i65, unum) + snum)
<ikskuh> oh, right
<blinghound> ohh I seee
<ikskuh> forgot that unsigned overflow is undefined :D
<blinghound> I think I'll wrap that into an inline generic function
blinghound has quit [Remote host closed the connection]
wootehfoot has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
dddddd has quit [Ping timeout: 256 seconds]
josias has quit [Quit: Quit]
josias has joined #zig
<ifreund> scientes: vectors are starting to make sense to me, holy shit this is so much better than C
<scientes> ifreund, I said that at my talk and people really didn't want to believe me....
<scientes> I was like "this is impossible in C"
<scientes> and "C cannot be fixed"
<ifreund> I think I will have to do a blog post or talk or something when I get this swiss tables impl working
<ifreund> do some comparisons of the unreadable C++ code and the much shorter, more clear zig code
layneson has joined #zig
josias has quit [Remote host closed the connection]
josias has joined #zig
cole-h has joined #zig
riba has joined #zig
_Vi has quit [Ping timeout: 244 seconds]
a_chou has joined #zig
a_chou has quit [Remote host closed the connection]
a_chou has joined #zig
a_chou has quit [Client Quit]
dingenskirchen has quit [Quit: dingenskirchen]
layneson has quit [Ping timeout: 264 seconds]
decentpenguin has quit [Quit: decentpenguin]
dermetfan has quit [Ping timeout: 256 seconds]
dingenskirchen has joined #zig
<companion_cube> grrr I forgot the name of the chan with a bunch of language designers
dddddd has joined #zig
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen has joined #zig
dingenskirchen has quit [Client Quit]
dingenskirchen has joined #zig
dingenskirchen has quit [Client Quit]
dingenskirchen has joined #zig
cole-h has quit [Quit: Goodbye]
marnix has quit [Ping timeout: 264 seconds]
dingenskirchen has quit [Client Quit]
dermetfan has joined #zig
<ikskuh> i have the strong feeling that @enumToInt is borked for exhaustive enums
<ikskuh> const T = enum(c_uint) { invalid = 0, _, };
<ikskuh> std.testing.expect(@enumToInt(@intToEnum(T, 123)) == 123);
<ikskuh> this fails
dingenskirchen has joined #zig
riba has quit [Ping timeout: 240 seconds]
stripedpajamas has joined #zig
<ikskuh> oh, that's #5314, with #5495 as a fix... *waiting to be merged*
nycex has quit [Remote host closed the connection]
layneson has joined #zig
nycex has joined #zig
<rooke> ifreund: I would enjoying watching/reading it if you do get around to it :3
marnix has joined #zig
dermetfan has quit [Ping timeout: 272 seconds]
dermetfan has joined #zig
<leeward> Ugh, looking at LLVM reminds me how terrible C++ is. I can mostly ignore it because I rarely use C++, but...it's so awful.
layneson has quit [Ping timeout: 246 seconds]
<leeward> Ok, got this C program building with LLVM. Next to build it with zig-cc, then the Zig version.
marnix has quit [Ping timeout: 246 seconds]
<scientes> leeward, oh its not that bad, but C++, yes
<scientes> the data-structures and algorithms can be quite decent
<leeward> scientes: The thing that triggered me was seeing "private" in a header file. It's just a fundamentally broken language.
<scientes> yes, broken language
<scientes> and impossible to read because of implicit control flow
<scientes> but LLVM is not a bad piece of software
<leeward> Oh, yeah, I don't dislike LLVM, and I understand why they chose C++. It's just that sometimes the best tool for the job is a crappy tool.
<leeward> Though I wouldn't mind if the LLVM project did a better job of documenting its stuff.
<scientes> they only need documentation because of how bad c++ is
<leeward> No, it's not that.
<scientes> like i spent a few hours thinking that operands were a linked-list
<scientes> but they are a linear array, that LOOKS like a linked-list
<scientes> leeward, seriously, code like this its really about the data structures, and documentation goes out of date too fast to be useful
<leeward> Problem: I'm a user who's trying to compile something using clang for a particular target. Some googling leads me to http://llvm.org/svn/llvm-project/llvm/trunk/lib/Target/
<scientes> the doxygen is much better
<leeward> "How do I use this" is not the kind of thing that should go out of date super fast. I'm not talking about comments in code.
<leeward> I just want to know what argument to pass it, and I have to look at the source code? Not well documented.
<scientes> the tests are usually the best documentation of that stuff
dermetfan has quit [Ping timeout: 244 seconds]
<leeward> Yes, source code. I just want a freaking man page.
waleee-cl has joined #zig
dermetfan has joined #zig
<leeward> man gcc gives me a complete list of options available for my target platform, along with all the valid target specification options.
wootehfoot has quit [Read error: Connection reset by peer]
dermetfan has quit [Quit: WeeChat 2.7.1]
dermetfan has joined #zig
swills has quit [Ping timeout: 246 seconds]
<pmwhite> I have a value `t` of type `[*]const u8`. If `t[0] & 0x80 != 0`, then I want to interpret the first 8 bytes as a u64. I was testing with the array `[8]u8{0x80,0,0,...,0}`, and tried to use `var x = @ptrCast(*align(1) const u64, t)` to do the reinterpretation, but the value `x.*` is printing out as just 128, which means it is just using the first byte as the whole u64 value.
<fengb> std.mem.readIntLittle
<fengb> Or should it be big endian?
<pmwhite> Oh, cool.
<pmwhite> Big endian is the backward one, right
<pmwhite> ?
<leeward> no, little endian is backwards
<pmwhite> Do you know what @ptrCast is wrong? What's going on?
<leeward> big endian is the one you probably don't have, unless you're on a weird architecture
ur5us has joined #zig
<pmwhite> readIntBig was what worked.
<leeward> Oh, the *data* was big endian.
a_chou has joined #zig
* leeward is easily confused by liliputians.
ilmu has joined #zig
<pmwhite> honestly, i'm lost with regards to endianness. I've heard all the facts at one time or another, but I think I need to get a refresher at some point.
a_chou has quit [Client Quit]
<leeward> There are 2 common ways to interpret a value that's more than 1 byte long: The first byte can be the most significant, or the least significant. Networks (mostly) interpret the first byte as the most significant. Most computer architectures choose the opposite representation. There is much strife, and warring among the Lilliputians.
<leeward> The only times it matters exactly how the bytes are swapped around are when you're debugging or writing ntoh[X].
<fengb> Little endian has nice pointer semantics. Big endian matches human number conventions
<fengb> And thanks to Intel, modern processors are mostly little endian
<leeward> Big endian also has advantages when bytes are received one at a time (hence its use in networks)
r4pr0n has joined #zig
<fengb> It used to be more varied but pure big endian kinda died off
<leeward> Ugh, the way LLVM "supports" AVR is by calling GCC's linker.
<leeward> I don't think this is a viable target for Zig. Even if I do get it working, it will require having GCC's ld installed.
<scientes> it is very limited
<leeward> Next week I'll have an msp430 dev kit here. We'll see if that works better. Looks like the LLVM backend uses gcc's assembler.
ur5us has quit [Quit: Leaving]
tariq has joined #zig
<tariq> are there any guidelines on directory structure for a zig project? i have a src/ and test/ dir but I'm getting an error when I @import("../src/some
<tariq> error: import of file outside package path: '../src/some_file.zig'
<andrewrk> set `--main-pkg-path` to the parent that they share
<andrewrk> here's some inspiration: https://www.youtube.com/watch?v=_mTRvJ9fugM
<leeward> Ooh, I did actually get code that was written in Zig to run on an AVR.
Mulugrun_ has quit [Quit: ZZZzzz…]
<leeward> I had to -femit-asm, then assemble it myself, but the LED is on when I turn it on and off when I turn it off.
ur5us has joined #zig
<tariq> haha sweet thank you andrewrk
stripedpajamas has quit [Quit: sleeping...]
student069 has joined #zig
tariq has quit [Remote host closed the connection]
a_chou has joined #zig
a_chou has quit [Client Quit]
a_chou has joined #zig
josias has quit [Quit: Quit]
a_chou has quit [Client Quit]
ur5us has quit [Ping timeout: 256 seconds]
nikita` has quit [Quit: leaving]
<ifreund> Is there anything preventing non exhaustive enums from being used as vector elements?
heitzmann has quit [Quit: WeeChat 2.8]
dermetfan has quit [Ping timeout: 272 seconds]
heitzmann has joined #zig
ur5us has joined #zig
r4pr0n has quit [Quit: r4pr0n]
blinghound has joined #zig
<blinghound> is there a zig strlen function somewhere to get the length of a null terminated c string?
<Snektron> std.mem.spanZ
<Snektron> or lenZ
<blinghound> damn you're quick
<blinghound> thanks!
<ifreund> anyone know of a better site than this for looking up what C sse intrinsics do? https://software.intel.com/sites/landingpage/IntrinsicsGuide/
<ifreund> it doesn't have _mm_cmpgt_epi8_fixed, and I can't seem to find any info on this one anywhere
<ifreund> oh nvm, It seems to be some custom function that google made
<ifreund> something about mm_cmpgt_epi8 being buggy on gcc