smol_mazunki 2022-07-30 10:48:53
alexmb7 2022-07-30 10:48:40
fwrite
makes sense
alexmb7 2022-07-30 10:49:05
ye i only see this way
K11M1 2022-07-30 10:49:14
Fputs
alexmb7 2022-07-30 10:49:21
so ill have 2 different reads
smol_mazunki 2022-07-30 10:49:23
K11M1 2022-07-30 10:49:14
Fputs
pretty sure fputs doesn’t solve it
alexmb7 2022-07-30 10:49:32
fputs is i think the way slower solution
K11M1 2022-07-30 10:49:38
Oh shit I see the now
alexmb7 2022-07-30 10:49:42
ye
K11M1 2022-07-30 10:49:58
Well that’s stupid because declaring that string breaks c strings xD
smol_mazunki 2022-07-30 10:50:07
K11M1 2022-07-30 10:49:58
Well that’s stupid because declaring that string breaks c strings xD
it’s technically not a string
alexmb7 2022-07-30 10:50:08
hm or maybe just one read, the per one byte read
smol_mazunki 2022-07-30 10:50:09
it’s just a stream
K11M1 2022-07-30 10:50:12
smol_mazunki 2022-07-30 10:50:07
it’s technically not a string
Yep
alexmb7 2022-07-30 10:50:20
and use select always
alexmb7 2022-07-30 10:50:24
or something
K11M1 2022-07-30 10:50:25
smol_mazunki 2022-07-30 10:50:09
it’s just a stream
Haven’t learnt about c streams
smol_mazunki 2022-07-30 10:50:32
alexmb7 2022-07-30 10:50:20
and use select always
why you need select
smol_mazunki 2022-07-30 10:50:38
K11M1 2022-07-30 10:50:25
Haven’t learnt about c streams
it’s just a concept
smol_mazunki 2022-07-30 10:50:41
nothing special
alexmb7 2022-07-30 10:50:51
smol_mazunki 2022-07-30 10:50:32
why you need select
to not block reads, instant react
smol_mazunki 2022-07-30 10:50:52
a stream is just a consecutive non-ending stuff of “something”
K11M1 2022-07-30 10:50:57
fwrite should be fine then
K11M1 2022-07-30 10:51:06
You just need go know how long it is before hand
alexmb7 2022-07-30 10:51:10
fwrite fread man pages say binary-stream
smol_mazunki 2022-07-30 10:51:13
only reason it would stop is because you told it there is exactly 1024 characters
alexmb7 2022-07-30 10:51:25
ye but i need reaction
alexmb7 2022-07-30 10:51:27
not block
smol_mazunki 2022-07-30 10:51:37
btw alex
alexmb7 2022-07-30 10:51:40
2 reactions
code parsing mode
and data by uset parsing mode
code parsing mode
and data by uset parsing mode
alexmb7 2022-07-30 10:51:43
supp
smol_mazunki 2022-07-30 10:51:50
if you cat somefile | your_program
smol_mazunki 2022-07-30 10:52:00
how are you gonna know how long the file is?
K11M1 2022-07-30 10:52:10
(You won’t)
alexmb7 2022-07-30 10:52:13
at end is clear
smol_mazunki 2022-07-30 10:52:15
K11M1 2022-07-30 10:52:10
(You won’t)
exactly