justforfunc #19: mastering io.Pipes

  Рет қаралды 34,020

justforfunc: Programming in Go

justforfunc: Programming in Go

Күн бұрын

Пікірлер: 46
@JustForFunc
@JustForFunc 7 жыл бұрын
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
@abiiranathan
@abiiranathan 3 жыл бұрын
Am your biggest fan. Your videos are very educational, fun and to the point. I wish you a million subs and beyond
@luizfelipemartino6804
@luizfelipemartino6804 7 жыл бұрын
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
@Ojee2
@Ojee2 7 жыл бұрын
The intro made me smile :)
@vladimirbauer6604
@vladimirbauer6604 7 жыл бұрын
Indeed, nice animation :)
@leonklingele
@leonklingele 7 жыл бұрын
Where does the trailing % @ 8:58 come from? I've seen that one before but never really understood why it happens.
@leonklingele
@leonklingele 7 жыл бұрын
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.
@yann3658
@yann3658 7 жыл бұрын
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 !
@silence1598
@silence1598 7 жыл бұрын
Thank you for interesting introduction to io.Pipes.
@shamim520778774
@shamim520778774 6 жыл бұрын
Your sessions are all mind blowing
@ucheumeh7357
@ucheumeh7357 4 жыл бұрын
Great tutorial on io.Pipes!!!
@saadazzz
@saadazzz 7 жыл бұрын
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?
@Shan-fx5wv
@Shan-fx5wv 3 жыл бұрын
How to create a named pipe and write a content to it?
@LucasVieira42
@LucasVieira42 7 жыл бұрын
This blew my mind \o/
@Shan-fx5wv
@Shan-fx5wv 3 жыл бұрын
Syscall.Mkfifo is not getting imported
@kitgary
@kitgary 7 жыл бұрын
So cool! I made similar mistakes, I even don't know that is wrong.
@AlbertoRestifo
@AlbertoRestifo 7 жыл бұрын
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?
@JustForFunc
@JustForFunc 7 жыл бұрын
+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
@reddinghiphop1
@reddinghiphop1 6 жыл бұрын
Thanks man !
@MagnusAndersson79
@MagnusAndersson79 7 жыл бұрын
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
@JustForFunc
@JustForFunc 7 жыл бұрын
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
@MagnusAndersson79
@MagnusAndersson79 7 жыл бұрын
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) :)
@svenax
@svenax 7 жыл бұрын
Sure, but would it be reusable and easily pluggable in bash?
@simonso3251
@simonso3251 7 жыл бұрын
How would you do this in one line in bash?
@JustForFunc
@JustForFunc 7 жыл бұрын
according to iTerm2 this is the equivalent bash, a bit more than one line :) raw.githubusercontent.com/gnachman/iTerm2/master/tests/imgcat
@BryanChance
@BryanChance 2 жыл бұрын
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 "
@nbari8971
@nbari8971 7 жыл бұрын
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.
@vikramdurai2025
@vikramdurai2025 6 жыл бұрын
11:02 laziest person I've ever seen. Why not just "mw.Write([]byte('hello'))"? Use what it has already man
@JustForFunc
@JustForFunc 6 жыл бұрын
well, laziness is a feature of most good engineers ... so thanks!
@vikramdurai2025
@vikramdurai2025 6 жыл бұрын
im also quite a lazy programmer, but just use the methods dude you don't need so many libraries
justforfunc #18: understanding Go's type aliases
38:58
justforfunc: Programming in Go
Рет қаралды 26 М.
justforfunc #37: sync.Pool from the pool
27:11
justforfunc: Programming in Go
Рет қаралды 17 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
How And When To Use io.MultiWriter In Golang!?
12:08
Anthony GG
Рет қаралды 6 М.
justforfunc #30: The Basics of Protocol Buffers
28:31
justforfunc: Programming in Go
Рет қаралды 46 М.
How To Use A Bytes Buffer In Golang And Make It Even Better?
14:32
justforfunc #29: dependency injection in a code review
28:09
justforfunc: Programming in Go
Рет қаралды 33 М.
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 579 М.
justforfunc #43: Migrating Go Modules to v2+
23:45
justforfunc: Programming in Go
Рет қаралды 34 М.
Go (Golang) io.Writer Interface
16:42
Golang Cafe
Рет қаралды 7 М.
err != nil Is GOOD? (And Why)
7:19
ThePrimeTime
Рет қаралды 102 М.