It turns out I can't add links to the the video from this video ... which is sad, but if you wanted to skip the io.Pipe basics and go into the iterm2 imgcat program it's 11:45
Hey Francesc, thank you for those videos man, I really like it. I'd like suggest you talk a bit about architecture, I know it's a bit subjective but We've got lots of design patterns and stuff for OO and since go has a sort of new paradigm would be nice to learn a bit more about it
Nice video ! For this kind of complex things, maybe you can provide some visuals of what's in, what's out and interactions with pipes? Thank you, I really like your videos !
Oh, nvm, it's because I was testing it in bash. The shell you're using - zsh - seems to automatically append a percent sign (%) to denote the end of a partial line (if it does not end in " "). unix.stackexchange.com/questions/167582/why-zsh-ends-a-line-with-a-highlighted-percent-symbol Guess I need to use zsh more often.
Hey Francesc. Thanks for the instructional video. I have a question. How do you do async I/O in Go? All of these examples seem synchronous? Would I have to use channels instead of pipes?
Amazing and instructive as always Francisco! I have one question: in the imgcat package, you defined the `writer` struct as an unexported variable, despite the fact that is returned by an exported method. Why does this work?
+Alberto Restifo first things first: my name is Francesc I define an exported type, but I return an exported interface (io.WriteCloser). You could technically return the unexported type too, but that's just a bad idea
This should be called "how to write enterprise code"! "This is a working program, let's add go functions, channels and interfaces!" Still, you just earned a subscriber :D
that's not really the point though it is a working program, but something that is hard to reuse in order to provide something that is easily pluggable (i.e. an io.Writer) you need to use pipes and goroutines
Yeah, I know.. I just thought it was funny how complex you made something that would be a one-liner in bash.. (Not being negative here, just found it interesting and amusing) :)
Hi Francesc, first at all, many thanks for all your time invested on this and by sharing knowledge in a very creative way. Regarding io.Pipes, I tried them for STDOUT & STDIN but had some problems with them, I used os.Pipe and that fixed my problem. Taking advantage of your expertise on the topic and if it's not too much to ask, could you please review the lines in question regarding this: github.com/immortal/immortal/blob/master/process.go#L74-L106 I would really appreciate any feedback, thanks in advance.
It turns out I can't add links to the the video from this video ... which is sad, but if you wanted to skip the io.Pipe basics and go into the iterm2 imgcat program it's 11:45
Hey Francesc, thank you for those videos man, I really like it.
I'd like suggest you talk a bit about architecture, I know it's a bit subjective but We've got lots of design patterns and stuff for OO and since go has a sort of new paradigm would be nice to learn a bit more about it
Am your biggest fan. Your videos are very educational, fun and to the point. I wish you a million subs and beyond
Nice video ! For this kind of complex things, maybe you can provide some visuals of what's in, what's out and interactions with pipes? Thank you, I really like your videos !
The intro made me smile :)
Indeed, nice animation :)
Where does the trailing % @ 8:58 come from? I've seen that one before but never really understood why it happens.
Oh, nvm, it's because I was testing it in bash. The shell you're using - zsh - seems to automatically append a percent sign (%) to denote the end of a partial line (if it does not end in "
"). unix.stackexchange.com/questions/167582/why-zsh-ends-a-line-with-a-highlighted-percent-symbol Guess I need to use zsh more often.
Thank you for interesting introduction to io.Pipes.
Great tutorial on io.Pipes!!!
How to create a named pipe and write a content to it?
Your sessions are all mind blowing
Hey Francesc. Thanks for the instructional video. I have a question. How do you do async I/O in Go? All of these examples seem synchronous? Would I have to use channels instead of pipes?
Syscall.Mkfifo is not getting imported
Amazing and instructive as always Francisco!
I have one question: in the imgcat package, you defined the `writer` struct as an unexported variable, despite the fact that is returned by an exported method.
Why does this work?
+Alberto Restifo first things first: my name is Francesc
I define an exported type, but I return an exported interface (io.WriteCloser). You could technically return the unexported type too, but that's just a bad idea
So cool! I made similar mistakes, I even don't know that is wrong.
This blew my mind \o/
OMG, i thought C is convoluted. LOL And all the err err err err err. (I've never used Go before. just my first impression)At 36:55, line 64 "
Thanks man !
This should be called "how to write enterprise code"!
"This is a working program, let's add go functions, channels and interfaces!"
Still, you just earned a subscriber :D
that's not really the point though
it is a working program, but something that is hard to reuse
in order to provide something that is easily pluggable (i.e. an io.Writer) you need to use pipes and goroutines
Yeah, I know.. I just thought it was funny how complex you made something that would be a one-liner in bash..
(Not being negative here, just found it interesting and amusing) :)
Sure, but would it be reusable and easily pluggable in bash?
How would you do this in one line in bash?
according to iTerm2 this is the equivalent bash, a bit more than one line :)
raw.githubusercontent.com/gnachman/iTerm2/master/tests/imgcat
Hi Francesc, first at all, many thanks for all your time invested on this and by sharing knowledge in a very creative way.
Regarding io.Pipes, I tried them for STDOUT & STDIN but had some problems with them, I used os.Pipe and that fixed my problem. Taking advantage of your expertise on the topic and if it's not too much to ask, could you please review the lines in question regarding this: github.com/immortal/immortal/blob/master/process.go#L74-L106
I would really appreciate any feedback, thanks in advance.
11:02 laziest person I've ever seen. Why not just "mw.Write([]byte('hello'))"? Use what it has already man
well, laziness is a feature of most good engineers ...
so thanks!
im also quite a lazy programmer, but just use the methods dude you don't need so many libraries