Live data from Hacker News

Gonix – Unix tools written in Go

github.com

21–30 of 85 posts

Re: Gonix – Unix tools written in Go

#21
post #3

What happens when you tail a 32 gig file?

From a glance at the code [0], it looks like it will read it all into memory first. A better way to do this would be to utilize the io.Reader interface. [0] https://github.com/polegone/gonix/blob/0b65cd4fb9c6c44357d0a...

Thank you. I will look into this.

Re: Gonix – Unix tools written in Go

#24

https://github.com/uiri/coreutils .>

While I'm not sure if he posts here, I used to work in the same group with Jim Meyering, who maintained/maintains coreutils. Great guy. Anyway, he told some great stories of the complexities of POSIX, and what happens in Solaris when you have directories 20,000 lines deep (and how to do it efficently, and the fun of teaching various coreutils commands about SELinux). Lots of it gets surprisingly low level quick. Core…

agreed! so many folks see all that stuff as "bloat". In many cases, that code is there for a reason.

Re: Gonix – Unix tools written in Go

#25
post #13

Forget the haters, this is awesome. GNU started as GNU's Not Unix, reimplementing Unix userland for free. The people who are adamant about calling it GNU/Linux are, on some level, remembering that the userspace is historically a reimplementation. Give me a busybox that I can 'go build' and that becomes really quite interesting.

Except for the fact that it'll be years before all of the subtle bugs are worked out and you can rely on those apps to be as stable as the ones we've got:

http://www.joelonsoftware.com/articles/fog0000000069.html

Re: Gonix – Unix tools written in Go

#26
post #9

There is no reason to ever want to do this.

I'm just doing this for fun and to learn about Go and Unix at the same time. I am a beginner, and a lot of my code is inefficient and/or incomplete, but by putting it on the Internet I can get criticism and find out where I went wrong. For instance, some of you have told me that the way I've been reading files is very inefficient, so now I'll try and do it the correct way.

That is a great reason to do this and the best way to learn.

Re: Gonix – Unix tools written in Go

#27

Nice, I was thinking of doing something like that, but I don't know as many unix tools as the author does. :-P

I rewrote "pause" from Windows into my Ubuntu box out of habit of using it in some cases. First it was written in perl, then in Python, I also symlink clear as cls out of habit from Windows. There's small little "hacks" that you can do that are kind of fun.

Re: Gonix – Unix tools written in Go

#29

Earlier quoted context omitted.

From a glance at the code [0], it looks like it will read it all into memory first. A better way to do this would be to utilize the io.Reader interface. [0] https://github.com/polegone/gonix/blob/0b65cd4fb9c6c44357d0a...

Thank you. I will look into this.

No problem. Also, please do not ignore errors. They're meant to be handled.

Re: Gonix – Unix tools written in Go

#30

Earlier quoted context omitted.

While I'm not sure if he posts here, I used to work in the same group with Jim Meyering, who maintained/maintains coreutils. Great guy. Anyway, he told some great stories of the complexities of POSIX, and what happens in Solaris when you have directories 20,000 lines deep (and how to do it efficently, and the fun of teaching various coreutils commands about SELinux). Lots of it gets surprisingly low level quick. Core…

agreed! so many folks see all that stuff as "bloat". In many cases, that code is there for a reason.

bloat always does have some reason. but it's still bloat.

Good engineering makes good tradeoffs, rather than throwing in everything anyone wants.

(Not that I think this effort in go is "awesome". For one, it's probably bigger executables than even statically linked coreutils. The suckless sbase/ubase have some real potential though.)

Post reply on HN