justforfunc #19: mastering io.Pipes

preview_player
Показать описание
We've all used a bit of the io package ... right?
Implementations of io.Writer and io.Reader can be literally found everywhere ... but do you really know the io package well?

In this episode I write a program to do cat images into iTerm2, and to do that I use the best pieces of the io package.

I use four types in the io package:
Рекомендации по теме
Комментарии
Автор

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

JustForFunc
Автор

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

luizfelipemartino
Автор

Am your biggest fan. Your videos are very educational, fun and to the point. I wish you a million subs and beyond

abiiranathan
Автор

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 !

yann
Автор

Thank you for interesting introduction to io.Pipes.

silence
Автор

Where does the trailing % @ 8:58 come from? I've seen that one before but never really understood why it happens.

leonklingele
Автор

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?

saadazzz
Автор

How to create a named pipe and write a content to it?

Shan-fxwv
Автор

So cool! I made similar mistakes, I even don't know that is wrong.

kitgary
Автор

Syscall.Mkfifo is not getting imported

Shan-fxwv
Автор

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?

AlbertoRestifo
Автор

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

MagnusAndersson
Автор

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 "<-w.done" what does that do?

BryanChance
Автор

Hi Francesc, first at all, many thanks for all your time invested on this and by sharing knowledge in a very creative way.


I would really appreciate any feedback, thanks in advance.

nbari
Автор

11:02 laziest person I've ever seen. Why not just "mw.Write([]byte('hello'))"? Use what it has already man

vikramdurai