omglasers2 has quit [Read error: Connection reset by peer]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
osa1 has quit [Ping timeout: 256 seconds]
msingle has quit [Ping timeout: 240 seconds]
radgeRayden has joined #zig
ur5us_ has joined #zig
osa1 has joined #zig
<andrewrk>
g-w1, source from the fs
<pixelherodev>
andrewrk: for bool in CBE - since bool doesn't exist pre-C99 - should we add an ifdef set to the header defining bool as unsigned char, false as zero, and true as one for C89 (and including stdbool on later revisions)?
<pixelherodev>
Or just use integer values explicitly?
<ifreund>
why are we supporting pre-C99 now? can't that wait?
<pixelherodev>
With ifdef-based support for later revisions
<ifreund>
just curious, are there many compilers that support C89 but not C99?
<pixelherodev>
probably not
<ifreund>
what's the logic behind targeting C89 then?
<pixelherodev>
We use the lowest common denominator, while still taking advantage of later support when it is present
<pixelherodev>
So yeah, that actually tells me exactly what to do :P
<pixelherodev>
ifreund: e.g. we use _Noreturn on C11, or __attribute(noreturn) on GCC, but leave it as plain void for compilers which don't support those
<ifreund>
that all makes sense to me
msingle has joined #zig
<ifreund>
I'm just wondering if there's a compelling reason to support C89 other than "because we can"
<pixelherodev>
Just because most compilers support C99 doesn't mean we should rely on it
<dominikh>
any love for K&R C?
<pixelherodev>
GCC/Clang both support C11, and people are probably going to argue we should use that as the base as a result
<pixelherodev>
dominikh: nope :P
<pixelherodev>
Only ISO C
<pixelherodev>
ISO/ANSI, at any rate
<andrewrk>
ifreund, pixelherodev: I see no reason to support anything besides C89 for the C backend
<andrewrk>
the output is not supposed to be readable, it's supposed to be widely compatible
<andrewrk>
for #6378 we'll have a branch where we hack up the C backend for the one time transformation to make the output readable, do it, then delete the branch and forget about it
<pixelherodev>
Good news: got header tests working, so tetsuo's emit_h branch is just about ready for merge :)
<andrewrk>
nice
<pixelherodev>
whoa!
<pixelherodev>
`and` for `&&` is part of C95??
<ifreund>
supporting only C89 makes more sense to me than supporting all the more recent versions as well
<pixelherodev>
ifreund: it's not really "supporting"
<g-w1>
after the c self-hosted compiler, will you have to update the c every time you update the zig, or will the c-based compiler be just good enough to compile the the zig compiler?
<pixelherodev>
e.g. unreachable is only present as a GNU extension - so when it's available, we use it, because it's a more faithful recreation
<ifreund>
my point was more that focusing on a single target would probably make getting that target to feature completion faster, but I'm not the one doing the work so feel free to ignore me of course
<pixelherodev>
g-w1: at that point, the language is intended to already be stable
<g-w1>
ah
<pixelherodev>
ifreund: there's no real effort involved lol
a92 has joined #zig
<pixelherodev>
it's a tiny 5-line ifdef in a common header file
<ifreund>
nice
<pixelherodev>
As far as the CBE is concerned, e.g. zig_unreachable() is guaranteed to exist
<pixelherodev>
It just happens to be a nop on many platforms
<ifreund>
yeah I see what you mean now, that's quite a nice way of handling things
<andrewrk>
pixelherodev, your proposal regarding stdbool.h and ifdefs sounds reasonable to me
squeek502 has quit [Remote host closed the connection]
<pixelherodev>
Added a bit of type support to CBE too while I was it
<pixelherodev>
s/it/at &
<g-w1>
when the language is stable and it has a c based compiler, lets say the version upgrades to 2.0, then will the c based compiler be updated? if so, manually or automatically? or will it be so stable that the newer version is just more optimisations and stuff, but the semantics are the same?
<pixelherodev>
g-w1: the idea is to never update the language like that after 1.0
<pixelherodev>
First header test passing :)
<andrewrk>
g-w1, manually
<g-w1>
thx
earnestly has quit [Ping timeout: 256 seconds]
hlolli__ has quit [Ping timeout: 272 seconds]
msingle has quit [Ping timeout: 240 seconds]
<pixelherodev>
Now to just add CBE Execution support via `argv[0] cc` :D
<pixelherodev>
Then CBE test harness will be basically done
msingle has joined #zig
<g-w1>
is there a way to do @fieldParentPtr in gdb, or the equavalent?
<pixelherodev>
Uh, so I just updated zig master, and now every attempt to build gives "cacheunavailable" :(
<torque>
it's possible that the cache is not available
AlbinoDrought has quit [Quit: quit]
<pixelherodev>
lol
<pixelherodev>
Wiped the cache, problem persists :(
<g-w1>
did you wipe the global cache?
<pixelherodev>
Nope
<pixelherodev>
Good call, let's see if that helps
<pixelherodev>
Seems to have helped, good catch!
<daurnimator>
pixelherodev: I once suggested a `#include <zig/common.h>` that does all sorts of ifdefs
<pixelherodev>
daurnimator: that's basically what we do...
<pixelherodev>
daurnimator: we just inject it automatically into every file instead of requiring an include
a92 has quit [Quit: My presence will now cease]
msingle has quit [Ping timeout: 240 seconds]
<pixelherodev>
andrewrk: to run zig cc, should I make main's buildOutputTpe public, use std.process.args (ugh) to find argv[0] and exec it, or something else entirely?
<pixelherodev>
punt_to_clang, maybe?
<pixelherodev>
ZigClang_main might be good...
msingle has joined #zig
<daurnimator>
why isn't the zig compiler a library itself (like clang is)
<pixelherodev>
Why should it be?
<andrewrk>
it's structured that way - what changes would you expect to see from status quo?
<pixelherodev>
ZigClang_main will act exactly like running clang with the given arguments, correct?
<daurnimator>
andrewrk: actually it's better than I remember. couple of things: 1. execve is a spanner in the world. 2. entry points (at the moment `mainArgs`) or a C-abi friendly wrappers should be exported 3. don't rely on cwd anywhere: take the working dir as an argument
<andrewrk>
pixelherodev, correct
<andrewrk>
daurnimator, libraries should use Compilation as the library entry point, not main.zig
<andrewrk>
so I think (2) is the only issue
<andrewrk>
not sure what you mean by "spanner"
<pixelherodev>
Ah, right! I can use Compilation to compile C?
<pixelherodev>
Or is that for Zig only?
<andrewrk>
yes
<andrewrk>
it will rely on executing self_exe_path with `zig clang` args
<andrewrk>
so the main problem you have to solve is making that work
<daurnimator>
andrewrk: uh "spanner in the works"
<andrewrk>
daurnimator, I'm still not following, can you elaborate on (1)?
<daurnimator>
> To throw a spanner in the works is to, deliberately or otherwise, cause disruption; to interfere with the smooth running of something.
<andrewrk>
oh, I see. in the u.s. we call that a monkey wrench
<andrewrk>
pixelherodev, I had a plan for this, which is that for testing stage2 we would actually pass the zig_exe_path as self_exe_path
<daurnimator>
andrewrk: there are a few places where main.zig calls `execve`: if someone was trying to use zig as a library in that manner, then they would be unhappy :)
<andrewrk>
I'm not ready to make a stable C API for the compiler, but it is written cleanly, with Compilation being the entry point API and main.zig doing not much more than CLI parsing
<andrewrk>
pixelherodev, we have Builder.zig_exe when doing `./zig build test-stage2` so the only problem to solve is getting that path to be available when we invoke `zig test src/test.zig`
<andrewrk>
maybe we can use addArg on the resulting LibExeObjStep for the test, and then get the arg from src/test.zig
<andrewrk>
I think that would be a matter of putting `pub ` in front of `const translate_c = @import("translate_c.zig");`
<andrewrk>
I'm not being sarcastic
kristoff_it has quit [Ping timeout: 256 seconds]
wilsonk__ has joined #zig
ur5us_ has quit [Ping timeout: 260 seconds]
wilsonk_ has quit [Ping timeout: 264 seconds]
osa1 has quit [Quit: osa1]
osa1 has joined #zig
wilsonk_ has joined #zig
wilsonk__ has quit [Ping timeout: 256 seconds]
msingle has quit [Ping timeout: 240 seconds]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
<novaskell>
I use guix (similar) and mostly sidestep the package system for now until it's more stable. Handling it properly in package scripts would be the same deal as Rust where you place everything into a reachable directory and then call `zig build` on it and copy the binary. Sadly lose the cache when you do so though
<siraben>
Potentially one could be made for Zig as well
<siraben>
Building Zig itself seems to fail ATM, src/os.cpp:1105:9: error: use of undeclared identifier 'futimens'
<siraben>
if (futimens(file, times) == -1) {
<siraben>
^
<siraben>
(on macOS)
<daurnimator>
andrewrk: that's a simple fix at least: adding `pub`... and creating a package :)
<novaskell>
siraben: Guix has the same though it doesn't gain anything from guix and the sometimes "smarter than average" build.zig scripts make some of it non-trivial at the moment
<siraben>
I see. Can you specify versions of packags and pin them?
<siraben>
packages*
<novaskell>
same as nix, you can pull packages from the future and the past and pinning is just creating a package/manifest referencing a specific commit/release
<siraben>
Ah yeah I mean in the context of Zig's packages
<novaskell>
inherit/derive a package (if it exists) then specify a fixed commit/release? Nix/Guix don't really care about what version something is as much as they care about where to get it and what the has of the content is
<siraben>
As in, Rust has Cargo.lock, does Zig have some lockfile
<novaskell>
ah, there's no package management at the moment in zig at present
<siraben>
I see
<novaskell>
so no lock file or concept of versions
decentpenguin has quit [Quit: ZNC crashed or something]
decentpenguin has joined #zig
<daurnimator>
siraben: are you on old OSX? futimes was only added in 10.13 which is the frequent cause of that error message
<siraben>
daurnimator: I'm on 10.15, but I'm using the Nix package manager which hasn't updated its libsystem from 10.12 to 10.13 yet, https://github.com/NixOS/nixpkgs/pull/101940
<daurnimator>
siraben: they better hurry up and get to 10.16...
<daurnimator>
uh, 10.14 sorry
<daurnimator>
we're likely to drop support for 10.13 soon
<siraben>
10.13 is being EOL'd?
<daurnimator>
I expect so; generally they EOL a month after the 3rd following release
<siraben>
Where would I find Apple's LTS schedule?
<daurnimator>
--> big sur (10.16) was released 7 days ago
<daurnimator>
so 10.13 will fall out of support before the end of the year
<siraben>
Why would Zig require such new dependencies?
<daurnimator>
siraben: we only support what OS vendors support.
THFKA4 has quit [Ping timeout: 260 seconds]
THFKA4 has joined #zig
osa1 has quit [Quit: osa1]
osa1 has joined #zig
sord937 has joined #zig
haliucinas has joined #zig
omglasers2 has joined #zig
omglasers has joined #zig
AlbinoDrought has quit [Remote host closed the connection]
AlbinoDrought has joined #zig
AlbinoDrought has joined #zig
omglasers2 has quit [Ping timeout: 272 seconds]
skuzzymiglet has joined #zig
skuzzymiglet has quit [Ping timeout: 260 seconds]
cole-h has quit [Ping timeout: 264 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
jjido has joined #zig
sord937 has quit [Quit: sord937]
sord937 has joined #zig
earnestly has joined #zig
hlolli__ has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
msingle has joined #zig
msingle has quit [Ping timeout: 240 seconds]
marnix has quit [Ping timeout: 260 seconds]
marnix has joined #zig
_whitelogger has joined #zig
marnix has quit [Read error: Connection reset by peer]
xackus has joined #zig
marnix has joined #zig
lucid_0x80 has joined #zig
xackus has quit [Quit: Leaving]
xackus has joined #zig
lltt has quit [Ping timeout: 240 seconds]
covfefe2proofs has joined #zig
covfefe2proofs has quit [Remote host closed the connection]
msingle has joined #zig
techtirade has quit [Read error: Connection reset by peer]
techtirade has joined #zig
donniewest has joined #zig
kristoff_it has joined #zig
Enrico2048 has joined #zig
Enrico204 has quit [Ping timeout: 264 seconds]
Enrico2048 is now known as Enrico204
donniewest has quit [Remote host closed the connection]
CodeSpelunker has joined #zig
techtirade has quit [Remote host closed the connection]
techtirade has joined #zig
waleee-cl has joined #zig
a_chou has joined #zig
osa1 has quit [Quit: osa1]
osa1 has joined #zig
donniewest has joined #zig
Kena has joined #zig
<Kena>
Please how can I read what I wrote in a file? I tried several times with `print` but that does print the bytes written. https://zero.hurtig.ninja/?699e74331f90d8fc#By97/P++ArXJQ0v7lxVnVyu2RTiHE4JXB1UjvN3FWIM=
<Kena>
I'm not a programmer so everything that is not on ziglang.org or ziglearn.org is beyond me.
<ifreund>
you probably want to print what gets written to your buffer
<Kena>
That's right.
<ifreund>
oh readAll returns a slice doesn't it? thats what you want to print but it won't have an items field...
<ifreund>
nope it does return a usize
hnOsmium0001 has joined #zig
<Kena>
Its return a usize, so it doesn't have a field access to items.
<ifreund>
then you want to print buffer[0..bytes_read]
<Kena>
print("{}\n", .{buffer}); returns the bytes written but with a artifact after the string like: Cybernetics¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
kristoff_it has quit [Ping timeout: 260 seconds]
<ifreund>
yeah, because you want to only print the bytes you actually read
<Kena>
I think that the bytes allocated by the bufffer but not used.
<ifreund>
so slice the buffer from 0 to bytes_read
<Kena>
Yes you're right.
<Kena>
Cool, thank you.
<Kena>
Do you know what function to use to read a user input instead of hard code a string into the source?
<Kena>
Instead of `writeAll` from the std.file.File type I mean.
<ifreund>
you want to read from stdin assuming your on linux or something posixy
<ifreund>
or do you mean take a file name as an argument?
donniewest has quit [Ping timeout: 260 seconds]
<Kena>
I would like to prompt the user to enter a string to it have to be read from stdin, although I'm still on Windows for the moment.
<Kena>
s/for/at
<Kena>
But I'll go back to Debian in a few weeks, that's the plan since I failed a migration towards voidlinux.
Enrico204 has quit [Quit: Enrico204]
<ifreund>
well, std.io.getStdIn() looks to support windows
<Kena>
Allright, I'll take a look right away.
<Kena>
By the way, `std.io` assumes that all methods trigger a system call, I am right?
<g-w1>
I did `const stdin = std.io.getStdIn().reader(); const input = try stdin.readUntilDelimiterAlloc(gpa, '\n', 100000);`
donniewest has joined #zig
<ifreund>
Kena: not necessarily, std.io.getStdOut() just returns a constant on linux for example
<g-w1>
probably readUntilDelimiterOrEof is better
a_chou has quit [Remote host closed the connection]
<Kena>
Please why does a slice of a non-array type should raise an error, isn't a slice of a slice authorized? https://godbolt.org/z/EPG6b8
Akuli has joined #zig
<dutchie>
you have a ?[]u8: an optional slice, not a slice
<Kena>
Yes I see it now, but what should I do? Like I said I'm not a programmer.
<Kena>
It's so damn hard to learn programming without a teacher 2 times a week during 5 years.
<dutchie>
there are a few ways to get a value out of an optional: you can use `if (optional) |val| { ... }` `optional orelse ...` and if you are sure that it's non-null `.?`
<Kena>
Yes, I recall these syntaxes from the reference manual but I have not developped algorithmic thinking so it's extremely delicate to convert a task into some code.
<Kena>
Thanks dutchie.
<dutchie>
don't worry, it takes a while to get the hang of things, especially if you are trying to teach yourself
<dutchie>
keep at it and before you know it you'll be answering beginners' questions yourself
<g-w1>
Kena: do you know any other programming languages, so that I can maybe make relations when explaining stuff
<Kena>
Thanks for your support it's warming because I'm failing for several years.
<Kena>
Not I just babbled with zsh last year but now i don't remember anything.
<g-w1>
ok
<Kena>
what shall I do with the `else` branch? because there is nothing useful to do it's it's not an optional value.
<dutchie>
you don't need an else branch with the `if (optional) |value|` pattern
<dutchie>
or if you want to bail out you can just `return` from your main function
<dutchie>
for example if there's more code afterwards that you don't want to run if the optional was null
<Kena>
return from main will exit the program right?
<dutchie>
yes
cole-h has joined #zig
<Kena>
I encompassed the print function in a `if` like you said but it still raises the same error, and I can't use `.?` because it could be null if the user accidently press enter without a input.
<Kena>
Are you saying that it needs a buffer for `readUntilDelimiterOrEof` and another one for `readAll`?
<Kena>
what's the point?
nrdmn0 has joined #zig
<g-w1>
when you create a file, you are writing nothing to it
<g-w1>
library.txt has nothing in it
<Kena>
Since the user input reading has finished, it can be overwritten safely to read the the "same" data in the written file.
<Kena>
I agree, create it does nothing else.
<g-w1>
at what line in your example do you write the data to the file?
<g-w1>
since it reads the data from the file and the file has nothing, the buf is just ''
<Kena>
I don't know, either the one with std.io.getStdIn().reader() or the one with readuntildelimiteroreof()
<g-w1>
look at my example that i sent, it is working
<Kena>
I'm not sure about their role
<Kena>
Yes, I read it thanks. But isn't it sub-optimal instead of reusing the same?
<g-w1>
if you reuse the same buffer, it gets overwritten by the data in the file which is nothing.
<Kena>
You're right I misinterpreted the result in the terminal.
<Kena>
But is it std.io.getStdIn().reader(); or stdin.readUntilDelimiterOrEof(&buf, '\n'); which reads the user input?
<g-w1>
reader creates a reader, and then readUntil... actually reads
<Kena>
I didn't even suspect this typology of mechanism, I keep thinking even ziglearn made a shit load of assumptions regarding to silently required prior knowledge. It's really discouraing but thanks for your patience.
<Kena>
thereby, using seekTo(0) isn't needed anymore if I use a second buffer right?
<g-w1>
yes
<Kena>
running your file got the terminal stuck before emitt LLVM output, did you try it?
<Kena>
*emitting
<Kena>
Yours compile too but still doesn't print anything in stdout. :/
<ifreund>
urgh, there is no dev_t definition for linux
<ifreund>
wish I had noticed befor 0.7.0, but maybe I can get it in for 0.7.1
<ifreund>
ok I take that back, it's defined for many linux archs but not x86_64 for some reason
<g-w1>
kena it works on linux, maybe it doesn't work with windows though. im afraid this is the limit of my knowlege
Akuli has quit [Quit: Leaving]
<Kena>
I'm not sure it is due to Windows, nothing is printed because nothing it's written in the file.
frmdstryr has joined #zig
<ugla>
Did you change the code so that it writes to the file? Do you even want to write to a file? It's not needed if you just want to print back the user input.
<Kena>
What I'm trying to do is the following:
<Kena>
1. create a file2. read a user input3. write the user input into a file4. print in stdout from the file
<Kena>
But I'm stuck because `writeAll` takes a slice of bytes (i.e. []u8) whereas `readUntilDelimiterOrEof` takes a constant one (i.e. []const u8)
<Kena>
The error suggests it doesn't want a pointer so when I remove the address-of operator in front of `writeAll(input)` i get in return `error: expected type '[]const u8', found '?[]u8'`
<ifreund>
you get the Reader from the File you want to read
<ifreund>
using File.Reader()
skuzzymiglet has joined #zig
<Kena>
Yes but which argument do I pass into file.readAll()? as I haven't any variable nor address pointing to the file.
<ifreund>
std.fs.File.readAll() takes a buffer into which it will write what it reads
<ifreund>
isn't that the first function we looked at today?
<Kena>
Returns the number bytes read means "write" ? seriously? the naming is quite confusing.
<Kena>
The compiler complains because it wants a usize and found instead an optional type. https://godbolt.org/z/759P6o
<ifreund>
you can't put a usize in an if statement like that
<Kena>
I understand the incompatibily between theses types but what is it necessary to do in order to obtain a usize that can be "returned" or "read" or whatever
<fengb>
There’s no “peek” capabilities in the reader interface
<ifreund>
Kena: you use that usize to know how much of your buffer has been filled with data read from the file
<Kena>
I agree about the usize inadequate in a if but still I don't see which mechanics do I have to use
<ifreund>
scroll up about half an hour, we already went over thies
g-w1 has quit [Quit: WeeChat 2.3]
<Kena>
It was a different case, I was reading from stdin, now I need to read from the file which has just been created and seeded.
<ifreund>
you're using the same function, std.fs.File.readAll()
g-w1 has joined #zig
<ifreund>
which works the same way no matter what file you are reading from
<fengb>
Aside: does readAll() work with stdin?
jjido has joined #zig
<ifreund>
probably not what you want to use for that yea, it will hang untill stdin is closed
<ifreund>
orignally Kena was using it to read from a file not stdin though
<Kena>
In fact, I'm trying to but don't follow you
g-w1 has quit [Quit: WeeChat 2.3]
<Kena>
I miss one mental step, the data has been written and I returned the proportion of buffer actually used, what is it missing before printing it in stdout?
g-w1 has joined #zig
<Kena>
I returned the cursor at the beginning of the file with file.seekTo(0), what should I do with the usize?
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
lucid_0x80 has quit [Ping timeout: 260 seconds]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<earnestly>
ifreund: (But stdin is a file)
skuzzymiglet has quit [Quit: WeeChat 3.0]
skuzzymiglet has joined #zig
<ifreund>
technically correct is the best kind of correct, but don't tell me you don't know what I mean :P
<ifreund>
std.mem.strip doesn't exist, I was thinking of std.mem.trim
<ifreund>
see the line of code I just sent
<Kena>
I'm sorry I lack focus.
<Kena>
I must be the only idiot who try to learn programming starting with zig.
<ifreund>
most people would probably start with C or javascript depending on what end of the spectrum they are on
<novaskell>
Kena: just means you're in the perfect position to note down the process of learning zig as a first language such that a tutorial for absolute beginners can be written with input
skuzzymiglet has quit [Read error: No route to host]
<Kena>
Yes you're right but that the ideal line of events, I'm frightened in advance where nobody will have the patience to keep answering my questions because it's too boring to help a total beginner.
<Kena>
Nobody likes the noise on this channel and it's pretty easy to understand why.
<novaskell>
I doubt most mind beginner questions and I'd even say some enjoy them
<novaskell>
so don't worry
<Kena>
Allright.
sord937 has quit [Quit: sord937]
<Kena>
Your solution works ifreund thanks. But now I have a new quest to undertake, the utf-8 encoding support! Because all characters with a accent are replaced with a coma, do you know a function related to streams who allow utf-8?
<Kena>
And on a side note, I wish to learn zig to aim at embedded systems programming. I think it's a stimulating choice of career.
<novaskell>
streams are agnostic to encoding
layneson has quit [Quit: WeeChat 2.9]
<ifreund>
isn't windows utf-16 and broken as fuck?
<Kena>
When I entered `La modélisation des systèmes complexes`, the output stream in the file is `La mod‚lisation des systŠmes complexes`
<Kena>
lol..
<g-w1>
maybe your terminal can't handle accents?
<Kena>
tell Microsoft their powershell cannot handle accents lol
<Kena>
Are you sure It's the terminal?
<g-w1>
i'm not
<Kena>
Do you accept to run a test on your machine if a provide again the link to the source code?
<Kena>
Except C# and F#, Microsft windows does not seems to be developer-friendly, or even targeted for industry in 21st century...
<Kena>
I'll try the master branch instead of 0.7.0 but the probability of an improvement over utf-8 encoding is low.
<g-w1>
it is not
<g-w1>
once that pr gets merged, it will work
<Kena>
That's a pipe dream, there isn't even any milestone assigned, it could be resolved in several months at least.
<Kena>
But I'm going to suscribe to the issue, thanks for pointing this out.
<ifreund>
you can probably work around this by just writing the bytes directly to stdout
<justin_smith>
Kena: I think the root issue here is that zig doesn't try to address unicode at all, and in the linux and osx ecosystems many things "just work" because of utf8 defaults, and you need extra effort or different tooling to make anything "just work" with the assumptions of windows
<Kena>
Yes I admit the difficulty to implement anything with Microsoft Windows. I just wanted to learn seriously.
<justin_smith>
the lowest friction thing, especially if you are just now learning to program, is probably to use a *nix system (linux or osx or some sufficienly compatible windows subsystem)
marnix has quit [Ping timeout: 260 seconds]
<justin_smith>
otherwise your learning is going to be impeded by weird historical differences IMHo
<Kena>
You're right.
<Kena>
I'm terrorized to not be able to reinstall Debian since I lost my entire RAID1. My PC won't even boot it so I'm using a laptop with windows 10 from somebody else.
<Kena>
It affected me real hard.
<justin_smith>
Kena: depending on what you are trying to do you could even use a cheap virtual server, if you are comfortable going 100% CLI
retropikzel has joined #zig
<Kena>
to host a GNU/linux instance from Windows 10 host you mean?
<earnestly>
Any real learning is always a test of curiosity, just struggle
<Kena>
I don't like using the mouse but I'm not 100% CLI-able either.
<justin_smith>
Kena: I mean renting a cheap remote instance and using ssh to access it
<Kena>
I didn't think about that but it could be a interesting way of dealing with the current situation I suppose.
waffle_ethics has quit [Ping timeout: 256 seconds]
<novaskell>
100% cli is just a case of removing your file/archive/etc manager
<pixelherodev>
... I mean, no? If you want 100% CLI you need to remove your display server (X11 / Wayland compositor)
<Kena>
In order to append to the file instead of override it each time, I could replace `.{ .read = true} by `.{ .truncate = true}`, but then I have to move the cursor to the next line before writing to again right? I'm not sure to understand " it will be truncated to length 0. " explanation.
<pixelherodev>
Truncated means deleted
<pixelherodev>
It's new length will be zero
<pixelherodev>
That is, there will be nothing left
<Kena>
Allright, so it cannot be used to append anything. What field of std.file.CreateFlags should I use?
<novaskell>
pixelherodev: it ends up with 99% terminal and the only other thing being either gimp or a web browser
<Kena>
pixelherodev are you using 9front or is it LemonBoy?
tdeo has joined #zig
<waleee-cl>
Kena: pixelherodev mentioned it sometime last week
<waleee-cl>
(I think. Might have been this week)
<Kena>
Allright, that's because I told myself that perhaps he could be interested to use and/or contribute to another fork of Plan 9.
<ifreund>
As you can see though, it caught two things that didn't compile though so that's a win
<andrewrk>
I've been thinking recently about how we could maybe walk back the laziness a little bit and have zig look at all top level decls
<andrewrk>
conditional compilation would have to be with comptime branches
CodeSpelunker has joined #zig
<ifreund>
I think that would be a lot more intuitive tbh
frmdstryr has joined #zig
<g-w1>
Right now, I feel like it is python, having code that can run, while it still has weird errors. IMO that would help a lot with development speed.