FAQ
GG
On Nov 9, 2013, at 5:34 PM, golang-nuts@googlegroups.com wrote:

Today's Topic Summary
Group: http://groups.google.com/group/golang-nuts/topics

[ANN] ql [2 Updates]
SQLite and cross-compiling [3 Updates]
Why is my Mandelbrot set visualisation so sloow? [3 Updates]
gdb debug info missing for local variable [1 Update]
Stream/Sequence library with aggregate operations [1 Update]
Go crashes with C function call which calls Go function. [5 Updates]
Pointers and structs [3 Updates]
Serving ecdsa private key with net/http [2 Updates]
Is there an easier way to implement a virtual function with a default implementation in Go? [4 Updates]
[skynet-dev] Re: [ANN} SkyDNS - Service Discovery and High Availability through DNS [2 Updates]
net/http: On redirect original request headers are not kept [1 Update]
[ANN] Your Golang powered NoSQL DB engine tiedot version 1.1 is here! [1 Update]
doubling the memory capacity of go [1 Update]
go-gtk [1 Update]
How can I check if two file paths on the same partition? [2 Updates]
Share: go-vhost a library for name based virtual hosting [1 Update]
Wouldn't pass by reference be faster, easier and more modern? [5 Updates]
select eating up my CPU profile [2 Updates]
Goroutine-safe vs Thread-safe [2 Updates]
[ANN] megajson: High Performance JSON Parser Generation [5 Updates]
behavior of time.After() for long periods of time [1 Update]
Use map for dynamic undetermined length array? [4 Updates]
flag package does not support --undefok [5 Updates]
Popular DHT libraries [1 Update]
Testing SCP implementation using crypto/ssh [3 Updates]
Force garbage collection return idle memory back to the system [1 Update]
[ANN] ql
Jan Mercl <0xjnml@gmail.com> Nov 09 06:32PM +0100
Question: Do you intend to support 'standard' sql eventually? If yes,
then I can file some issues regarding sql syntax (for example count(*),
and, or, =).

Turns out adding alternative front ...more
Back to top.

Kees Varekamp <kees@mroffice.org> Nov 09 03:22PM -0800
G yg
The biggest common denominator is probably SQL-92 Entry level, but it seems
not so easy to find a formal definition of that, even.

Perhaps a good alternative is 'w3schools sql' - not very formal ...more
Back to top.

SQLite and cross-compiling
Michael Banzon <michael@banzon.dk> Nov 09 05:42PM +0100

Is there any way to cross compile a Go program that use SQLite
(through any of the officially listen SQLite libraries)?

I have searched the mailing list and web but haven't found a reliable ...more
Back to top.

minux <minux.ma@gmail.com> Nov 09 05:29PM -0500
(through any of the officially listen SQLite libraries)?
I have searched the mailing list and web but haven't found a reliable
answer to this.
Not without hacks (remove the check in ...more
Back to top.

Michael Banzon <michael@banzon.dk> Nov 09 11:46PM +0100

Thank you for the answer to my (novice) question.

I think I will just setup machines for compiling to the different
targets. It seems less hacky ;-)

OT: It would be nice with an all-Go ...more
Back to top.

Why is my Mandelbrot set visualisation so sloow?
Nils <n.bruenggel@gmail.com> Nov 09 09:14AM -0800

I recently tried out Go and decided to write a small program which
visualises the Mandelbrot set. I wanted to try out Go's complex number
library as well as Go's concurrency support. ...more
Back to top.

andrey mirtchovski <mirtchovski@gmail.com> Nov 09 10:48AM -0700

I suggest the first step is to make your package go-installable. rename the
src directory to whatever the binary will be called, or just move
everything from src/ to / and change all package imports ...more
Back to top.

jonathan.k.hanks@gmail.com Nov 09 12:07PM -0800

Nils,

Are you setting the GOMAXPROCS environment variable? By default go will
run everything in 1 thread* (I think more threads are added when you hit
blocking I/O). You either need to set ...more
Back to top.

gdb debug info missing for local variable
"Jason E. Aten" <j.e.aten@gmail.com> Nov 09 02:23PM -0800

I'm seeing gdb debug info missing for some local variables in
go1.2rc3/amd64/linux. Is this a known issue? (I'm not sure how/where to
search for these things). I'm using gdb 7.4-2012.04-0ubuntu2.1. ...more
Back to top.

Stream/Sequence library with aggregate operations
Nabeel Memon <nm3mon@gmail.com> Nov 09 05:02PM -0500

Are there any considerations to add parallel range loops, internal
iteration, aggregate functions in Go's standard library?

These are the additions to Java 8 (through language and std lib) with ...more
Back to top.

Go crashes with C function call which calls Go function.
drawtree@gmail.com Nov 08 11:38PM -0800

I am writing a Go program which runs thousands of Gorouines which calls C
function which calls another Go function within it.
And when I tried a many-Goroutine test, it crashed with this CGO error. ...more
Back to top.

Brad Fitzpatrick <bradfitz@golang.org> Nov 09 11:45AM -0500

You've hit your configured max threads. You can raise it with ulimit.
IIRC, Macs have very low limits by default.

But better: try not to tie up C threads.



...more
Back to top.

"Hoon H." <drawtree@gmail.com> Nov 10 03:40AM +0900

That's exactly what I want to know. The The fundamental reason of why it spawning OS threads. And how to avoid spawning of OS thread.
No way to use C function without OS thread spawning? Or is there ...more
Back to top.

Ian Lance Taylor <iant@golang.org> Nov 09 11:18AM -0800
That's exactly what I want to know. The The fundamental reason of why it spawning OS threads. And how to avoid spawning of OS thread.
No way to use C function without OS thread spawning? Or is ...more
Back to top.

"Hoon H." <drawtree@gmail.com> Nov 10 05:47AM +0900

OK. Problem solved.
Can I expect clear line of quick return?

...more
Back to top.

Pointers and structs
orthopteroid@gmail.com Nov 08 10:19PM -0800

Sorry to wake this thread up again. I've been using pointer receivers but
have hit a compiler snag. That I must use a reference receiver makes me
worry that A will be copied (which I don't want). ...more
Back to top.

Ian Lance Taylor <iant@golang.org> Nov 09 07:02AM -0800
}
http://play.golang.org/p/nFUQec9L1q
Is there a way to write this so it will compile with a pointer receiver?
In general you can't take the address of a value stored in a map. ...more
Back to top.

orthopteroid <orthopteroid@gmail.com> Nov 09 12:23PM -0800

Ah yes, using map[string]*A would make sense. And thanks for the tip about
slices, I didn't know that.


...more
Back to top.

Serving ecdsa private key with net/http
jfcgauss@gmail.com Nov 09 01:41AM -0800
On Saturday, March 9, 2013 12:47:28 AM UTC+2, agl wrote:

Yes.
It's not that far away from being able to support ECDSA, but the code
isn't there yet.
Hi,
I am trying the following Go ...more
Back to top.

agl@google.com Nov 09 10:43AM -0800

openssl ecparam -name secp224r1 -out ecpar.pem
openssl req -nodes -x509 -days 1234 -newkey ec:ecpar.pem -keyout key.pem
-out cert.pem
I'm a little surprised that P-224 even loaded, but ...more
Back to top.

Is there an easier way to implement a virtual function with a default implementation in Go?
Hailiang Wang <hwang.dev@gmail.com> Nov 09 12:28PM +0800

Thanks for both replies.

Both approaches define a Do method for Task1 and Task2, and then
redirect the common code to another method. But defining Do for Task1
and Task2 is the way that I try to ...more
Back to top.

marcos.lilljedahl@mercadolibre.com Nov 08 09:32PM -0800

Hi,

Is this what you're trying to do?

http://play.golang.org/p/-hS9hdUPaX

I don't know if I understood correctly the situation, but in the example
i've provided you're not redefining Task1 ...more
Back to top.

"Hǎiliàng Wáng" <hwang.dev@gmail.com> Nov 09 11:18PM +0800

Hi Marcos,

Thanks very much for helping with my question.

Correct me if I'm wrong. With the example you provided, there is no
way to define specific version of Do2 method for Task1 and Task2, ...more
Back to top.

wkharold <wkharold@gmail.com> Nov 09 09:59AM -0800

It sounds like you're trying to achieve some sort of "implementation
inheritance". Don't do that. Read
http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html.
...more
Back to top.

[skynet-dev] Re: [ANN} SkyDNS - Service Discovery and High Availability through DNS
Brian Ketelsen <bketelsen@gmail.com> Nov 09 06:32AM -0500

From the Skynet read me:

Skynet is currently undergoing a large refactoring. What's represented here used to exist under the skynet2 repo, and leverages zookeeper. We are currently refactoring to ...more
Back to top.

jmajor0711@gmail.com Nov 08 08:48PM -0800

no response?

...more
Back to top.

net/http: On redirect original request headers are not kept
xingyuanboy8@gmail.com Nov 09 01:43AM -0800

find
old row : req.Header = make(Header)

new row : req.Header = ireq.Header

在 2012年3月31日星期六UTC+8下午8时44分13秒,stephane....@gmail.com写道:
...more
Back to top.

[ANN] Your Golang powered NoSQL DB engine tiedot version 1.1 is here!
euric.reiks@gmail.com Nov 09 05:28AM -0800

Hi! I have a question about Tiedot queries. How do you query the content of
an array of structures? I have this program:

// main
package main

import (
"encoding/json"
"fmt" ...more
Back to top.

doubling the memory capacity of go
Dmitry Vyukov <dvyukov@google.com> Nov 09 05:12PM +0400

sent from phone
I might be remembering this incorrectly, but I think this isn't bumped up
by default because the bookkeeping structures have a virtual memory
footprint at runtime startup (which ...more
Back to top.

go-gtk
Gerard <gvdschoot@gmail.com> Nov 09 04:41AM -0800
On Friday, November 8, 2013 9:45:31 PM UTC+1, Kyle Wolfe wrote:
have practically no experience with windowed applications. So what might a
practical setup of the gtk environment look like when ...more
Back to top.

How can I check if two file paths on the same partition?
minux <minux.ma@gmail.com> Nov 08 07:20PM -0500
One approach is to check the directories where those files are contained in.
Like here: http://play.golang.org/p/sIJHBtWksh
could it handle /part/a/b and /part/c/d ?
...more
Back to top.

"Tamás Gulácsi" <tgulacsi78@gmail.com> Nov 09 04:19AM -0800

Why not hardlink them? That fails through device boundaries, but leaves the file there. I do have a linkOrCopy function implementing link-if-possible-otherwise-copy.
...more
Back to top.

Share: go-vhost a library for name based virtual hosting
Alan Shreve <alan@inconshreveable.com> Nov 09 12:10PM

Code: https://github.com/inconshreveable/go-vhost
It's a library that lets you implement custom name-based virtual-host like behavior for protocols that support it. You give it a connection and a ...more
Back to top.

Wouldn't pass by reference be faster, easier and more modern?
minux <minux.ma@gmail.com> Nov 08 07:33PM -0500
Maybe, just maybe, the go language should finally decide if it is a
high-level or a low-level language. If it is a high-level language,
in your definition, Go is low-level language, and I'm glad ...more
Back to top.

John Nagle <nagle@animats.com> Nov 09 12:14AM -0800
On 11/7/2013 10:37 PM, Ian Lance Taylor wrote:

In a multi-threaded language like Go, I don't see how pass by
read-only reference is an option for pass-read-only, unless you know ...more
Back to top.

Dmitry Vyukov <dvyukov@google.com> Nov 09 12:36PM +0400

Obviously what you are saying is not a win-win, otherwise it would be in
go. Even in concurrent systems the bulk of the logic is sequential. Why the
hell I need to reallocate and copy my byte slice ...more
Back to top.

Kevin Gillette <extemporalgenome@gmail.com> Nov 09 12:58AM -0800
On Saturday, November 9, 2013 1:14:57 AM UTC-7, John Nagle wrote:

More immutability would have helped. Go is kind of weird in that
respect. Strings are immutable, but little else is.
...more
Back to top.

Kevin Gillette <extemporalgenome@gmail.com> Nov 09 02:41AM -0800
On Wednesday, November 6, 2013 1:15:33 AM UTC-7, TR NS wrote:

Thanks, but I have read all of those multiple times.* I don't find any of
them particularly exact/clear.
(*The last I've ...more
Back to top.

select eating up my CPU profile
Dustin Sallings <dsallings@gmail.com> Nov 08 06:05PM -0800

An application using a library I wrote is finding 70% of its time spent
unrolling selects (dequeueg).

You can see the profile report here:

http://bleu.west.spy.net/public/sgw-prof.svg
...more
Back to top.

Dmitry Vyukov <dvyukov@google.com> Nov 09 01:42PM +0400

Hi,
I can imagine that contended select is slow.
This looks like a good benchmark for optimization. Can you provide more
details? Number of goroutines? Buffer sizes? DB request time? ...more
Back to top.

Goroutine-safe vs Thread-safe
Dmitry Vyukov <dvyukov@google.com> Nov 09 12:05PM +0400

Goroutine-safe is not well-established term. While thread-safe is, and it
means safe for concurrent access.

sent from phone
...more
Back to top.

Dmitry Vyukov <dvyukov@google.com> Nov 09 12:06PM +0400
favour of "(not) safe for concurrent access". Maybe the FAQ entry should
be updated. Especially because it refers to "access from multiple
threads", which is quite inaccurate.
+1

-- ...more
Back to top.

[ANN] megajson: High Performance JSON Parser Generation
Ben Johnson <ben@skylandlabs.com> Nov 08 05:27PM -0700

Hi everyone-

I've hit performance bottlenecks with JSON encoding on two projects (sky & goraft) so I wrote an alternative called megajson. I noticed that a lot of CPU time went to the "reflect" ...more
Back to top.

Robert Melton <robert@robertmelton.com> Nov 08 07:33PM -0500

Ben--

Thanks!

https://github.com/benbjohnson/megajson
Using the test data in encoding/json, megajson encodes and decodes about 2x
faster. Obviously, YMMV.
This is very timely, we ...more
Back to top.

Ben Johnson <ben@skylandlabs.com> Nov 08 05:50PM -0700

Robert-

Let me know how it works for you. Test coverage is about 80% but I'm going to bump that up soon. It's only about 1200 LOC so it shouldn't be too hard to grok. Let me know if you have any ...more
Back to top.

Dave Cheney <dave@cheney.net> Nov 09 12:11PM +1100

Hi Ben,

With your permission I'd like to add megajson to my autobench harness [1]

Here is some raw data comparing megajson running on 1.1.2 vs 1.2rc3

#megajson
benchmark old ...more
Back to top.

Kevin Gillette <extemporalgenome@gmail.com> Nov 08 11:45PM -0800

Some notes from your README:

*Performance* - The reflection library is slow and cannot be optimized by
the compiler at compile time.

That's not true. I significantly advanced reflect-aware ...more
Back to top.

behavior of time.After() for long periods of time
"Ibrahim M. Ghazal" <imgx64@gmail.com> Nov 09 08:53AM +0300
3. Turn the lights on.
I'm curious about this. What kind of controller are you using, and how
are you communicating with it?
...more
Back to top.

Use map for dynamic undetermined length array?
Bert Chang <jrweizhang@gmail.com> Nov 08 09:11PM -0800

Hi there,

I'm wondering is it a good idea to use map to implement an undetermined and
dynamic length array? For example,

foos := make(map[SomeThing]bool);

and then use

...more
Back to top.

Dave Cheney <dave@cheney.net> Nov 09 04:15PM +1100

Why not use a slice ? http://blog.golang.org/slices

...more
Back to top.

Bert Chang <jrweizhang@gmail.com> Nov 08 09:31PM -0800

IIRC, slice still has capacity limitation.
Keep making a new bigger capacity slice and copying the old slice into new
slice is somehow annoying.
Is there any convenient way to extend a slice?
...more
Back to top.

Dave Cheney <dave@cheney.net> Nov 09 04:39PM +1100

Sure, use append. https://code.google.com/p/go-wiki/wiki/SliceTricks

...more
Back to top.

flag package does not support --undefok
patrick@dropbox.com Nov 08 07:46PM -0800

I noticed today that the flag package does not support --undefok. Are
there plans to add undefok support in the near future? (This seems
extremely useful in a service deployment environment ...more
Back to top.

minux <minux.ma@gmail.com> Nov 08 10:50PM -0500
there plans to add undefok support in the near future? (This seems
extremely useful in a service deployment environment where the binary and
configs, e.g., borgcfg, are deployed ...more
Back to top.

Dave Cheney <dave@cheney.net> Nov 09 02:56PM +1100

Do you mean it doesn't support gnu --long-names ? If so, please
consider this package as a replacement, https://launchpad.net/gnuflag

...more
Back to top.

andrey mirtchovski <mirtchovski@gmail.com> Nov 08 08:55PM -0700

if --undefok is what the google-gflags page describes [1] then you can use
NewFlagSet(..., flag.ContinueOnError) as per [2] to get the same behaviour

-- ...more
Back to top.

Patrick Lee <patrick@dropbox.com> Nov 08 08:11PM -0800

Yes, I meant undefok as described in google-gflags (I thought the flag
package was loosely based on the gflags implementation).

There's a slight difference between the semantics of undefok vs. ...more
Back to top.

Popular DHT libraries
Abhinav Srivastava <abhi1988srivastava@gmail.com> Nov 08 04:44PM -0800

Hi,

I was going through the net to look for any existing DHT libraries that I
can use for Chord Protocol and found this. Just wanted to know, is there
any or I can refer some stuff? Since I am ...more
Back to top.

Testing SCP implementation using crypto/ssh
Mitchell Hashimoto <xmitchx@gmail.com> Nov 08 04:03PM -0800

John,

Sorry for the late response here. If you run into any problems, feel free
to compare to the SCP implementation within Packer. It isn't tested (the
SSH stuff is, however), but it has been ...more
Back to top.

Dave Cheney <dave@cheney.net> Nov 09 11:20AM +1100

At the risk of blowing my own horn I wrote this recently (with tests) if anyone is game enough to integrate it into their product.

http://godoc.org/github.com/pkg/sftp

Cheers

Dave

...more
Back to top.

Mitchell Hashimoto <xmitchx@gmail.com> Nov 08 04:23PM -0800

Dave,

I very likely will. I've had requests on Packer to implement both FTP
and SFTP as transports for source ISOs.

...more
Back to top.

Force garbage collection return idle memory back to the system
Eric Z <hadoopforme@gmail.com> Nov 08 03:39PM -0800

Thank you very much Dave.

On Friday, November 8, 2013 2:53:37 PM UTC-8, Dave Cheney wrote:
...more
Back to top.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Gerard at Nov 10, 2013 at 4:11 pm
    What is this dump?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 10, '13 at 3:06p
activeNov 10, '13 at 4:11p
posts2
users2
websitegolang.org

2 users in discussion

Gerard: 1 post Jared Bischof: 1 post

People

Translate

site design / logo © 2022 Grokbase