Re: [go-nuts] Abridged summary of golang-nuts@googlegroups.com - 80 updates in 24 topics

91 views
Skip to first unread message

James Groat

unread,
Apr 20, 2015, 10:29:58 PM4/20/15
to golan...@googlegroups.com, Abridged recipients
   Vg



On Mon, Apr 20, 2015 at 4:26 PM, golan...@googlegroups.com <golan...@googlegroups.com> wrote:

Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 11:04AM +0930

Resurrecting an old thread.
 
https://groups.google.com/d/topic/golang-nuts/4aFAxBEjjBY/discussion
 
I'm using gob to serialise very large data sets for storage rather than
message passing (maybe ...more
Egon <egon...@gmail.com>: Apr 19 11:25PM -0700

On Monday, 20 April 2015 04:34:44 UTC+3, kortschak wrote:
> other approach if this is the case - it seems like the best option at
> this stage). Some cases leave me with gobs that are on the order ...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 04:19PM +0930

On Sun, 2015-04-19 at 23:25 -0700, Egon wrote:
> Can you give the data-structure(s)?
> How often do you read/write the whole data?
> Do you need random access to data?
 
Slices of named 4-tuples ...more
Egon <egon...@gmail.com>: Apr 19 11:55PM -0700

On Monday, 20 April 2015 09:49:59 UTC+3, kortschak wrote:
> > How often do you read/write the whole data?
> > Do you need random access to data?
 
> Slices of named 4-tuples (struct of ints). ...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 04:27PM +0930

On Sun, 2015-04-19 at 23:55 -0700, Egon wrote:
 
> Or do you mean that the slices are named?
 
> type Data []struct { Name string; Values []Tuple }
 
> Also, how long are the names?
...more
Sebastien Binet <seb....@gmail.com>: Apr 20 09:04AM +0200

using encoding/binary isn't that brittle and seems to have rather nice
performances (size, speed):
http://ugorji.net/blog/benchmarking-serialization-in-go
 
I went with encoding/binary for my disk ...more
Egon <egon...@gmail.com>: Apr 20 12:46AM -0700

On Monday, 20 April 2015 09:57:48 UTC+3, kortschak wrote:
> }
 
> type Traps []Trap
 
> We are keeping Traps.
 
Does the order matter?
 
First I would change the Top/Bottom ... ...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 05:34PM +0930

On Mon, 2015-04-20 at 00:46 -0700, Egon wrote:
> Does the order matter?
 
No, not really.
 
> First I would change the Top/Bottom ... to int8, int16, int32, int64
> depending on what is needed. ...more
Egon <egon...@gmail.com>: Apr 20 01:48AM -0700

On Monday, 20 April 2015 11:04:28 UTC+3, kortschak wrote:
> > Then I would just mmap the whole structure to a file.
 
> This is something I'd rather avoid. This is research software and is ...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 06:36PM +0930

On Mon, 2015-04-20 at 01:48 -0700, Egon wrote:
> convert from old format to a newer format?
> Or simply for experimentation it's easier if you don't have to worry about
> serialization?
...more
Rob Pike <r...@golang.org>: Apr 20 07:56AM -0700

The underlying issue is that the gob protocol requires that the whole
message be in memory both for encoding and decoding. An arbitrarily large
message cannot work.
 
I am uncomfortable just ...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 06:19PM

Thanks. Comments in line.
 
 
> The underlying issue is that the gob protocol requires that the whole message be in memory both for encoding and decoding. An arbitrarily large message cannot work.
...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 06:30PM

To clarify, the default limit is still tooBig (1<<30), but can be altered within this range.
 
...more
Rob Pike <r...@golang.org>: Apr 20 11:35AM -0700

The entire message is built in memory before being transmitted, so the
length can be written as a prefix.
 
-rob
...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 06:40PM

I don't see how making the limit per-decoder harms that.
 
...more
Rob Pike <r...@golang.org>: Apr 20 12:30PM -0700

I was just rebutting your point that it is possible to write arbitrarily
large messages. You are limited by available memory as well as the static
check.
 
-rob
 
 
On Mon, Apr 20, 2015 at 11:40 ...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 08:54PM

OK, so it's not really a rebuttal then; I can write 10GB gobs right now - I can't read them. So it is already the case that for some (probably not small) set of machines it is possible to wrte gobs ...more
Rob Pike <r...@golang.org>: Apr 20 02:27PM -0700

I am resisting because APIs that let you choose parameters like this enable
bad designs. The constraint is there for a reason: bad data can cause bad
things to happen to the heap, and the easiest ...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 20 09:52PM

Thanks. So are you saying that if someone were to set the limit too high for their machine to cope with the input that will lead to heap corruption?
 
I'm really struggling to see how this would ...more
Rob Pike <r...@golang.org>: Apr 20 03:23PM -0700

I am saying that I'd prefer not to change the API, which implies, as I said
before, that your best solution is to change it yourself or perhaps write a
custom codec.
 
I really dislike knobs in ...more
Dan Kortschak <dan.ko...@adelaide.edu.au>: Apr 21 07:57AM +0930

On Mon, 2015-04-20 at 15:23 -0700, Rob Pike wrote:
 
> I really dislike knobs in APIs.
 
> The code should probably complain in the encoder if it's too big; I'll
> file an issue for that.
...more
Ugorji Nwoke <ugo...@gmail.com>: Apr 20 04:26PM -0700

Follow up to what Rob said, you can write a custom codec or use one which
supports explicit delimiters at end of lists (like JSON "]"), as opposed to
length-prefixing. cbor is a really good ...more
Steve Burrus <steveb...@gmail.com>: Apr 20 03:55PM -0700

Why am I consistently getting this error message when I try to run Go?
 
"C:\Go>go run hello.go
DNS server not authoritative for zone."
...more
Chris Manghane <cm...@google.com>: Apr 20 10:59PM

I think we'd need to know what's in "hello.go."
 
On Mon, Apr 20, 2015 at 3:56 PM Steve Burrus <steveb...@gmail.com>
wrote:
 
...more
steveb...@gmail.com: Apr 20 03:01PM -0700

Can someone please help me with my attempted Go installation? I got it
right the other day with oinstalling Go, actually did a little bit of
coding in it. But since then I get this series of ...more
Marvin Renich <mr...@renich.org>: Apr 20 11:01AM -0400

> > almost 8 hours without anyone offering to translate or suggesting to the
> > OP to use golang-ru instead.
 
> and this, ladies and gentlemen, is why we can't have nice things.
...more
Marvin Renich <mr...@renich.org>: Apr 20 11:02AM -0400

Sorry for the late reply. I was on vacation and then catching up on
other matters. I am trimming substantially less than I would otherwise
to give better context to a two-week-old thread.
...more
"atd...@gmail.com" <atd...@gmail.com>: Apr 20 09:12AM -0700

Давай! Why so serious ;)
...more
Joubin Houshyar <jhou...@gmail.com>: Apr 20 01:54PM -0700

حرف حساب میزنه, well
 
(& no, that does not mean "word count increased" ..;)
 
On Saturday, April 4, 2015 at 10:40:49 PM UTC-4, Robert Melton wrote:
...more
Benjamin Measures <saint....@gmail.com>: Apr 20 03:24PM -0700

> I was not rude, and I gave a specific reason why I believed it was inappropriate to have a conversation in a different language on the mailing list. My criticism was constructive and based on ...more
Janne Snabb <sn...@epipe.com>: Apr 21 12:33AM +0300

On 2015-04-15 14:47, Сергей Жуматий wrote:
> Is there way to make something like lambda or something else to
> implement "local" version of logger function, which is different for ...more
j...@tsp.io: Apr 20 02:02PM -0700

Hi all!
 
I've been working on a high-performance memcached-like server in
Go: https://github.com/jonhoo/cuckoocache.
It uses three goroutines for each connection (one for reading, one for ...more
mm <pistac...@gmail.com>: Apr 20 09:22AM -0700

Could someone point me to a nice implementation of how CRUD is used in GO?
So far I have found this -
http://paste.ubuntu.com/8503695/
but it is incomplete. I come from Python, so I really need an ...more
DV <dimiter....@gmail.com>: Apr 20 10:26AM -0700

This is a strange question.
 
You're looking for an example that demonstrates how to do Create, Update,
Delete with a relational database in Go? You can start ...more
mm <pistac...@gmail.com>: Apr 20 10:41AM -0700

Sorry for being so oblique. Im using mgo/mongodb
I am trying to understand, specifically how to do GET and POST... usually
in python I have something like this:
 
class Edit(BaseHandler, ...more
Egon <egon...@gmail.com>: Apr 20 11:46AM -0700

Read http://golang.org/doc/articles/wiki/ it has an example how to use FormValue.
Then http://astaxie.gitbooks.io/build-web-application-with-golang/content/ for a thorough explanation how to build ...more
mm <pistac...@gmail.com>: Apr 20 12:38PM -0700

Ok found what I am looking for...Using Gocraft:
 
You can capture path variables like this:
 
router.Get("/suggestions/:suggestion_id/comments/:comment_id")
 
In your handler, you can access them ...more
mm <pistac...@gmail.com>: Apr 20 12:39PM -0700

Thanks so much Egon, those are great links for me!!
 
On Monday, April 20, 2015 at 2:46:36 PM UTC-4, Egon wrote:
...more
Guillermo Estrada <phro...@gmail.com>: Apr 20 01:51PM -0700

You're probably looking how to do an app using a framework (router at
least) and a database backend. I read you use MongoDB in Python, so for
that you should use the excellent Mongo library by ...more
Jason Phillips <jasonrya...@gmail.com>: Apr 19 04:30PM -0700

There's also nothing stopping you from setting GOPATH per project, like
many gophers do.
 
On Saturday, April 18, 2015 at 4:56:50 PM UTC-4, Thiago Farina wrote:
...more
andrewc...@gmail.com: Apr 19 05:17PM -0700

As other people have said, write a script which just sets it then builds.
That being said, the GOPATH variable is the reason why the rest of go works
so seamlessly.
 
GOPATH allows: ...more
Thiago Farina <tfa...@chromium.org>: Apr 20 05:21PM -0300

On Sun, Apr 19, 2015 at 8:30 PM, Jason Phillips <jasonrya...@gmail.com
 
> There's also nothing stopping you from setting GOPATH per project, like
> many gophers do.
 
> That does not seem to ...more
Shawn Milochik <shawn...@gmail.com>: Apr 20 04:32PM -0400

See this, it should help:
 
https://golang.org/doc/code.html#GOPATH
 
You can have multiple items in GOPATH, just as you can in PATH. And you
don't *have to* set environment variables, as others ...more
adi.4...@gmail.com: Apr 20 01:02PM -0700

I'm trying to link a Go program with a C function from a dll compiled in
Visual Studio (x64) on Windows.
 
The C++ code is this:
 
 
extern "C" {
__declspec(dllexport) int add(int a, int b) { ...more
"John Souvestre" <jo...@sstar.com>: Apr 20 11:39AM -0500

I'm trying to get the numeric values (value property) for some non-ASCII code
points which are decimal digits (as per Unicode.IsDigit). I believe that in
Java you would use getNumericValue, and in ...more
Konstantin Khomoutov <flat...@users.sourceforge.net>: Apr 20 08:17PM +0300

On Mon, 20 Apr 2015 11:39:37 -0500
> getNumericValue, and in .Net GetNumericValue, for example. How can I
> do this in Go?
> Thanks,
 
Go uses type `rune` to represent individual Unicode code ...more
Konstantin Khomoutov <flat...@users.sourceforge.net>: Apr 20 08:20PM +0300

On Mon, 20 Apr 2015 11:39:37 -0500
> Unicode.IsDigit). I believe that in Java you would use
> getNumericValue, and in .Net GetNumericValue, for example. How can I
> do this in Go?
...more
"John Souvestre" <jo...@sstar.com>: Apr 20 12:39PM -0500

> `rune` is defined to be `int32`, so just type-convert your rune value to
`int32` to get its "value property".
 
I believe that you would just get the of the code point, not the value which ...more
Jason Gade <jay...@gmail.com>: Apr 20 10:55AM -0700

I don't think that's what he's looking
for. http://docs.oracle.com/javase/7/docs/api/java/lang/Character.html#getNumericValue(char)
 
If someone gives him a Chinse or Tamil or Roman numeral in ...more
Doug Henderson <djnd...@gmail.com>: Apr 20 12:09PM -0600

Hi,
 
Go does not seem to have the full unicode data that we find in the python
unicodedata module.
 
You may have to scan each individual rune (or []byte containing the utf-8).
...more
"John Souvestre" <jo...@sstar.com>: Apr 20 01:18PM -0500

Ø IIRC, Unicode.IsDigit checks for the Nd category only. I suspect that other numeric categories will not be accepted in numbers.
 
Yes, Unicode.IsDigit does identify decimal digits for all of the ...more
Andy Balholm <andyb...@gmail.com>: Apr 20 11:50AM -0700

That sounds like something that would belong in the unicode package, but apparently no one has implemented it yet.
...more
"John Souvestre" <jo...@sstar.com>: Apr 20 02:13PM -0500

> That sounds like something that would belong in the unicode package, but
apparently no one has implemented it yet.
 
Yes, that would be nice! Meanwhile, I think I'll make a map and load the 230 ...more
Alex Howard <3du...@gmail.com>: Apr 20 11:10AM -0700

I know this is a AppEngine topic, but this forum is the best Go forum.
 
Does anyone have an example of how to connect a Go AppEngine app to google
cloud sql?
 
The below package gets me ...more
Ian Lance Taylor <ia...@golang.org>: Apr 20 10:42AM -0700

> that code to be useful, the C++ library needs to be compiled. Is it possible
> to use the swig features of Go build toolchain to also compile C++
> libraries?
 
Sorry, I'm still not sure ...more
"Jon Valdés" <jua...@gmail.com>: Apr 20 12:49AM -0700

Hi there,
 
I'm working on a project where I'm cross compiling on every build (for
linux amd64 and linux arm6, while working on a mac), and I've noticed
compilation times are much much longer ...more
Dave Cheney <da...@cheney.net>: Apr 20 01:20AM -0700

remember the rule, go build builds, then discards, go install installs a
copy.
 
the caviet to this is, dependig on where you have built go, you may
encounter a permission error.
...more
"Jon Valdés" <jua...@gmail.com>: Apr 20 03:28AM -0700

Hi Dave,
 
Not very intuitive I'd say, but that did indeed solve it.
Thanks a bunch!
 
 
On Monday, April 20, 2015 at 10:20:58 AM UTC+2, Dave Cheney wrote:
...more
Carlos Castillo <cook...@gmail.com>: Apr 20 08:59AM -0700

Despite Dave's usual (and correct) suggestion to use go install more often,
I think for cross-compiling (especially to multiple targets) it is less
useful. The -i flag to go build will do the ...more
"Jon Valdés" <jua...@gmail.com>: Apr 20 07:24PM +0200

Oh, that's a nice feature I didn't know about!
Thanks a lot, Carlos!
 
Kind regards,
Jon Valdes
 
...more
Andy Balholm <andyb...@gmail.com>: Apr 20 09:22AM -0700

That looks like a mixture of C and Go syntax. Try
 
myint := int(myInt64)
...more
Arpit Arora <arpitt...@gmail.com>: Apr 20 12:14PM -0400

Dear Partner
 
Hope you are doing great!!
 
Please go through the requirement and let me know if you have any
consultant for the same position.
 
 
 
 
 
*Position Title: **Business Data Analyst * ...more
bana...@gmail.com: Apr 19 10:31AM -0700

Hi everyone! Just want to share that ULAPPH Cloud Desktop is now available,
it's free! It can be used to create and show slides and articles using the
cloud. Please visit http://www.ulapph.com. ...more
Dmitry Savintsev <dsav...@gmail.com>: Apr 20 08:58AM -0700

Francesc mentioned once http://go-talks.appspot.com/ which allows to view
present-based slide decks checked in github.com. For example, ...more
Sebastien Binet <seb....@gmail.com>: Apr 20 06:03PM +0200

> https://github.com/dmitris/talks/blob/master/mun-golang-meetup/20150217/webseclab.slide
> gets presented as ...more
simran <simran...@gmail.com>: Apr 20 11:33AM +1000

Hi All,
 
Where can one find the definition of the string(...) function.
 
I'm assuming it's a builtin?
 
I've tried various web searches like: golang [builtin] {functions,string}, ...more
Jesse McNelis <jes...@jessta.id.au>: Apr 20 11:36AM +1000


> Hi All,
 
> Where can one find the definition of the string(...) function.
 
> I'm assuming it's a builtin?
 
It's not a function, it's a conversion.
http://golang.org/ref/spec#Conversions
...more
simran <simran...@gmail.com>: Apr 20 01:23PM +1000

Thankyou Jesse. Much appreciated. Has helped clear a lot of my confusion :)
 
...more
roger peppe <rogp...@gmail.com>: Apr 20 12:56PM +0100

> Would appreciate any pointers to where i can find official documentation for it.
 
You might find this useful: http://golang.org/pkg/builtin/
 
 
...more
Konstantin Khomoutov <flat...@users.sourceforge.net>: Apr 20 06:38PM +0300

On Mon, 20 Apr 2015 11:33:09 +1000
 
> Where can one find the definition of the string(...) function.
[...]
 
> * It will call a "String(...)" function if one exists for that
> object/struct?
...more
k.ja...@gmail.com: Apr 20 12:56AM -0700

Is there any way I can compile/build my go program on Xtensa architecture?
There is gcc-xtensa available and contains libgo. But, I don't know how to
use it to compile my go files.
...more
k.ja...@gmail.com: Apr 20 08:15AM -0700

I tried building crosstool-NG with golang enabled. Now I have xtensa-gccgo
tool. Need to figure it out how to use it.
...more
bana...@gmail.com: Apr 19 09:51AM -0700

Hi everyone! Just want to share that ULAPPH Cloud Desktop is now available,
it's free! It can be used to create and show slides and articles using the
cloud. Please visit http://www.ulapph.com. ...more
william...@gmail.com: Apr 20 07:37AM -0700

This only parses the html files in the existing directory, not
subdirectories. This does not solve the question being asked. He is
looking for a recursive version of this.
 
On Wednesday, 17 ...more
Slawomir Pryczek <slawe...@gmail.com>: Apr 20 05:37AM -0700

Hi Guys,
im thinknig about "garbage" collection algorithm that'll scan the memory
that needs to be collected looking for expired items. The idea is to scan
the memory that is being constantly ...more
Dmitry Vyukov <dvy...@google.com>: Apr 20 03:44PM +0300

> cache this way, so after locking i'll still get "incorrect" value that is
> corrupted? Is there any potential problem with that approach, in C / Golang?
> Any way to "tell" race detector to be ...more
Dave Cheney <da...@cheney.net>: Apr 20 07:05AM -0700

This is double checked
locking, http://en.wikipedia.org/wiki/Double-checked_locking. It is
generally considered unsafe.
 
On Monday, 20 April 2015 22:37:09 UTC+10, Slawomir Pryczek wrote:
...more
"atd...@gmail.com" <atd...@gmail.com>: Apr 20 05:33AM -0700

A bit cleaner of an example, (added the possibility to provide an alternate
logging function as John mentioned it could be useful)
http://play.golang.org/p/FaDIzeBc9t
...more
Tester <ma....@gmail.com>: Apr 20 02:05AM -0700

@Tamás Gulácsi Thank you for this valuable information and for your patience
 
On Sunday, April 19, 2015 at 12:59:13 PM UTC+2, Tamás Gulácsi wrote:
...more
Nigel Tao <nige...@golang.org>: Apr 20 01:37PM +1000

The make form lets you supply a size hint. The literal form lets you
specify initial elements. If you're doing neither, then
 
m0 := make(map[string]int)
m1 := map[string]int{}
 
are equivalent.
...more
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to golang-nuts...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages