On Thu, Mar 13, 2014 at 10:13:25PM +0100, Markus Teich wrote:
> Silvan Jegen wrote:
> > When scanning the code I saw several cases where you declared and
> > initialized variables on the same line like this
> >
> > var void = 0 // target for unused values
> > var dev, rx, t
Silvan Jegen wrote:
> When scanning the code I saw several cases where you declared and
> initialized variables on the same line like this
>
> var void = 0 // target for unused values
> var dev, rx, tx, rxNow, txNow = "", 0, 0, 0, 0
> var scanner = bufio.N
2014-03-13 16:50 GMT-03:00 Markus Teich :
>
> Thanks for the hint. However I wanted to avoid spawning other processes as
> much
> as possible. Is there another way to count the cpu cores just by reading a
> file
> in /proc or maybe /sys?
See http://golang.org/pkg/runtime/#NumCPU
func NumCPU()
Paul Onyschuk wrote:
> You can get there by using sysconf(3), from man page:
Oh man, I just found this:
http://golang.org/pkg/runtime/#NumCPU
-.-
--Markus
signature.asc
Description: Digital signature
On Thu, Mar 13, 2014 at 04:33:16PM -0400, Charlie Andrews wrote:
> On Thu, Mar 13, 2014 at 09:21:09PM +0100, Markus Teich wrote:
> >
> > If you like, please explain the benefits of the first 2 points a bit more
> > detailed (see my other mail for my reasoning)
>
> In both cases, I believe it's mu
Charlie Andrews wrote:
> In both cases, I believe it's much more readable and maintainable to
> have a section for imports and a section for vars (global-ish variabls).
> Readability is subjective I guess, but maintainability is not, and it is
> much easier this way to add imports and vars with few
On Thu, Mar 13, 2014 at 09:21:09PM +0100, Markus Teich wrote:
>
> If you like, please explain the benefits of the first 2 points a bit more
> detailed (see my other mail for my reasoning)
In both cases, I believe it's much more readable and maintainable to
have a section for imports and a section
On Thu, 13 Mar 2014 20:50:38 +0100
Markus Teich wrote:
> Thanks for the hint. However I wanted to avoid spawning other
> processes as much as possible. Is there another way to count the cpu
> cores just by reading a file in /proc or maybe /sys?
You can get there by using sysconf(3), from man pag
Charlie Andrews wrote:
> I write go for a living, and these 3 comments were the only ones off the
> top of my head as well.
If you like, please explain the benefits of the first 2 points a bit more
detailed (see my other mail for my reasoning)
> > 3. Instead of appending to the same slice several
Silvan Jegen wrote:
> 1. The usual way to import several packages is
>
> import (
> "fmt"
> "whatever"
> "etc"
> )
I know that it is possible, but what benefits do I get? I decided against it,
because on small laptop screens I get 2 loc more on the screen and the few bytes
neces
On Thu, Mar 13, 2014 at 09:00:58PM +0100, Silvan Jegen wrote:
> On Thu, Mar 13, 2014 at 08:34:04PM +0100, Markus Teich wrote:
> > Heyho,
> >
> > the recent discussion about Go motivated me to finally rewrite my
> > dwm status shell script. Since this is one of my first programms
> > written in Go
On Thu, Mar 13, 2014 at 08:34:04PM +0100, Markus Teich wrote:
> Heyho,
>
> the recent discussion about Go motivated me to finally rewrite my
> dwm status shell script. Since this is one of my first programms
> written in Go, I would love to get some feedback from you Go gurus out
> there. The we
On Thu, Mar 13, 2014 at 08:50:38PM +0100, Markus Teich wrote:
> Alexander Huemer wrote:
> > I don't have much clue about go, but I think that the content of
> > /proc/cpuinfo
> > differ greatly on different architecture. Maybe the output ls `lscpu` is
> > better suited for that purpose.
>
> Thank
Alexander Huemer wrote:
> I don't have much clue about go, but I think that the content of /proc/cpuinfo
> differ greatly on different architecture. Maybe the output ls `lscpu` is
> better suited for that purpose.
Thanks for the hint. However I wanted to avoid spawning other processes as much
as p
On Thu, Mar 13, 2014 at 08:34:04PM +0100, Markus Teich wrote:
> the recent discussion about Go motivated me to finally rewrite my dwm
> status shell script. Since this is one of my first programms written
> in Go, I would love to get some feedback from you Go gurus out there.
> The weird chara
Heyho,
the recent discussion about Go motivated me to finally rewrite my dwm status
shell script. Since this is one of my first programms written in Go, I would
love to get some feedback from you Go gurus out there. The weird characters in
the output are used for coloring and as icons/separators
On Wed, Mar 12, 2014, at 15:04, FRIGN wrote:
> Impressive, but better use
> $ LD_TRACE_LOADED_OBJECTS=1 t
> instead of
> $ ldd t
> next time to prevent arbitrary code-execution[1] in case you're dealing
> with unknown binaries.
I don't know if it was here and you or somewhere else or someone els
17 matches
Mail list logo