ChanServ changed the topic of #zig to: zig programming language | | be excellent to each other | channel logs:
dimenus has joined #zig
<dimenus> andrewrk: automatically translating c headers is such a great feature of Zig
SimonN has joined #zig
SimonNa has quit [Ping timeout: 244 seconds]
dimenus has quit [Remote host closed the connection]
dimenus has joined #zig
dimenus has quit [Client Quit]
dimenus has joined #zig
adrusi_ has joined #zig
adrusi has quit [Ping timeout: 252 seconds]
<unique_id> I might be wrong about this, but: for a long time I was unsure about OOP (not inheritance but simply writing methods). I wondered, would I write code differently in C? Are methods affecting the way I write code? Now I realize that it's simply a stylistic choice. What does affect the way you write code are private fields, operators, and the various c++ constructors. Together these things push you towards creating these 'perfect'
<unique_id> mini APIs which you do not need. You make things into what they are not, you over complicate.
<unique_id> C++ can not be saved from these things
<scientes> * 3. Prevent C++ from infecting the rest of the project.
<scientes> from src/zig_llvm.cpp
<unique_id> haha
<unique_id> Honestly I've wondered for such a long time what OOP was doing to my brain. I think I finally understand programming. I finally understand what is useful and what isn't, what distracts and what doesn't. I've been in anguish for years about this stuff.
<scientes> i've got this heisenbug, when i'm in lldb its all good, but when i look at it with strace its totally wrong
<scientes> yeah i hate c++, it took me forever to write this tiny patch because of the crazy class stuff :
<scientes> oh i got it
<MajorLag> uniqui_id, what you describe is what I'd refer to as sapir-whorf for programmers. The language you use to model the concepts affects the way you think about the concepts.
<unique_id> interesting
<unique_id> alright I've got to go, I have a flight tomorrow
<scientes> > what distracts <<< still working on that
kristate has joined #zig
<kristate> scientes: hey, fell asleep :) it was 3am
<scientes> good morning
<scientes> i took a nap too :)
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kristate> hmm, looks like you added an extra param to ZigLLVMBuildCall for sret
wink_ has quit [Remote host closed the connection]
<scientes> / TODO Generalize SRet to an NumArgs length array of LLVMAttributeRef
<scientes> the problem is that building LLVMAttributeRef requires more C++
<kristate> well lets write some c++ :)
<scientes> alot is working now with arm64
adrusi_ has quit [Ping timeout: 246 seconds]
adrusi has joined #zig
<kristate> what happened to function inlining?
<scientes> that patch looks funny cause its from v1 to v2
<scientes> i'll smoosh them
<kristate> actually, the sret stuff should be its own PR
<kristate> and then we can depend on it from arm64
adrusi has quit [Ping timeout: 245 seconds]
adrusi has joined #zig
reductum has joined #zig
<scientes> the way llvm handles attributes is really complicated since they switched from using a bitfield
<scientes> i feel that the general support belongs in the zig complier but not stage1
<scientes> as only sret is necessary for getting the language right: byval, inreg, returned are all optimizations
<scientes> meh
<scientes> i guess i'm diving it
<unique_id> Sorry for the incoming text:
<unique_id> I've never been more hyped for better C style languages like Zig and Jai. I tried to design "E++" for a few days. Seeing just how much C++ could be simplified. Just no. Removing references is incredibly difficult, even if you introduce [*] pointers so * can be used with operator[]. Though JBlow found a way to have operator[] I think. I tried to design a syntax that would not bias towards unnamed constructors. So you
<unique_id> could have "Vector(int) v !with_size(5);", since no-name constructors get confusing in many cases. And on, and on, and on. It's so difficult to fix C++. Better C > Better C++
<unique_id> The thing I'm most hyped about is seeing actually good libraries made! All the C++ libraries are so bad!
<scientes> llvm is a c++ library
<scientes> but you mean things like boost
<unique_id> I mean on the API side. Also the standard library. Howard Hinnant's Date stuff would be super useful, but it's made so bad by the C++ness of it IMO.
<scientes> yeah its impossible to do binary compatibility for c++ libraries too, you ever look at the symbol table of a c++ library
<scientes> ?
<unique_id> I have not
<scientes> rust uses symbol mangling too
dimenus has quit [Read error: Connection reset by peer]
xvilka has joined #zig
<xvilka> Hi!
<kristate> xvilka: hi
<xvilka> is inaccessible from China
<kristate> xvilka: wow, why do you think so?
<xvilka> Because I am in China
<kristate> xvilka: yes, why do you think that is not available?
<xvilka> I tried on different ISPs
<xvilka> I think many people don't have means to use VPN/whatever
<kristate> xvilka: hmm, it is hosted in seattle on amazon EC2
<xvilka> would be awesome to work out of the box too
<kristate> andrewrk: we are blocked in china
<xvilka> Also for Patreon sponsoring - you might consider some middle grounds options - a jump from 5$ to $400 is very big, a few more intermediate options would be awesome
<unique_id> adrusi: Thanks for zig.kak. I'm trying out kakoune for fun!
<unique_id> oh though is also zig-kak from Vurich
<unique_id> there*
wink_ has joined #zig
<wink_> Is there a way to create a struct at compile time, something like ?
<scientes> unique_id, zig doesn't guarantee padding or order in structs, so it isn't as big of a deal what he is talking about with integers
<unique_id> scientes: what is the default int type that I should use? When I don't care
<scientes> i don't know
kristate_ has joined #zig
kristate has quit [Ping timeout: 260 seconds]
redj has quit [Ping timeout: 268 seconds]
redj has joined #zig
kristate_ has quit [Ping timeout: 250 seconds]
reductum has quit [Quit: WeeChat 2.2]
davr0s has joined #zig
kristate has joined #zig
<kristate> back in the office 16:18 JST
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xvilka> Posted a link in Weibo
<xvilka> already got some traction
<xvilka> hopefully more people
<kristate> xvilka: thanks!
dpk has quit [Ping timeout: 240 seconds]
<xvilka> Do you have any plans for algebraic sum types?
dpk has joined #zig
davr0s has joined #zig
<kristate> scientes: you up?
<scientes> yeah i woke up at 3am
noonien has joined #zig
<kristate> morning -- make sure to get some rest too :-)
<scientes> i'll take a nap later
<kristate> I'll check your PR in a bit
<kristate> i think its a good idea that you split it off
<scientes> Its the same patch
<kristate> scientes: wonder if there is any way that we can have ZigLLVMBuildCall infer to invoke sret
<kristate> instead of passing
<kristate> good work, though!
<kristate> scientes: I added printing hex bytes to fmt, but fmt doesn't seem to be any tests for it
<kristate> hmm, its inside the fmt/index.zig
<kristate> ok, let me launch firefox
<kristate> okay, I'm in
<kristate> I can hear you -- how about on your end
<scientes> i can't hear you
<kristate> hmmm
<scientes> ahh fixed it
<kristate> we can print bytes in hex now:
kristate has quit []
kristate_ has joined #zig
kristate_ is now known as kristate
<kristate> scientes: testing new irc client
<scientes> I use hexchat
kristate has quit [Quit: WeeChat 2.2]
kristate has joined #zig
<kristate> scientes: yeah, get some rest :)
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
return0e has quit [Ping timeout: 244 seconds]
return0e has joined #zig
davr0s has joined #zig
<kristate> andrewrk: morning. commented here
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<unique_id> This is completely off topic, but my airline's jpg boarding pass doesn't open on linux and hasn't done so for years xD
<unique_id> "Not a JPEG file"
<scientes> there are differn't jpeg decoders
<scientes> try in firefox
<unique_id> it works on my phone
<scientes> does it work in firefox or chromium
<unique_id> yes
<scientes> your welcome
<unique_id> see, the linux desktop must become a browser app
<scientes> its just that firefox has to have a lenient parser
<unique_id> right, good point
<scientes> it just uses libjpeg
unique_id has left #zig ["Konversation terminated!"]
davr0s has joined #zig
ofelas has joined #zig
ofelas has quit [Quit: shutdown -h now]
ltr_ has quit [*.net *.split]
Guest29528 has quit [*.net *.split]
monteslu has quit [*.net *.split]
bwb` has quit [*.net *.split]
ltr_ has joined #zig
bbrittain has joined #zig
reductum has joined #zig
mnoronha has joined #zig
return0e has quit [Remote host closed the connection]
return0e has joined #zig
adrusi_ has joined #zig
adrusi has quit [Ping timeout: 272 seconds]
ofelas has joined #zig
return0xe has joined #zig
return0e has quit [Ping timeout: 240 seconds]
mnoronha has quit [Ping timeout: 250 seconds]
ofelas has quit [Quit: shutdown -h now]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 250 seconds]
mnoronha has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]