Dave MacFarlane | 23 Jun 03:41 2016
Picon

[ANN] de: my programming text editor

I don't know why, but I just realized I announced this project on
/r/golang but forgot about go-nuts.

I've been working on a text editor (built in Go, of course) which
tries to combine the things I like about acme with the things I use in
vim, because I was getting annoyed going back and forth between them
when switching between Plan 9 and Unix and while I really like the
"words are power" idea of acme, I really don't love the mouse all that
much.

If anyone wants to try it out:

https://github.com/driusan/de

(It's been bootstrapping it's own development since about day 2, so
while it's obviously not as mature as its influences, it's definitely
usable, at least if your usage patterns are similar to mine.)

- Dave

--

-- 
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@...
For more options, visit https://groups.google.com/d/optout.

Caleb Spare | 23 Jun 01:55 2016
Picon
Gravatar

GODEBUG=gctrace=1 vs. debug.GCStats

Hi,

I'm looking at GC statistics using both GODEBUG=gctrace=1 and
debug.ReadGCStats. My question is: should the pause durations reported
in debug.GCStats match the sum of the two STW phases listed in the
gctrace?

I ask because they are generally close but not the same. I have a
trivial program (https://play.golang.org/p/9NYDjBW6ei) that prints gc
stats; when I run it with GODEBUG=gctrace=1, I see output like this:

LastGC: 1969-12-31T16:00:00-08:00 NumGC: 0 PauseTotal: 0 Pause: []
LastGC: 1969-12-31T16:00:00-08:00 NumGC: 0 PauseTotal: 0 Pause: []
LastGC: 1969-12-31T16:00:00-08:00 NumGC: 0 PauseTotal: 0 Pause: []
gc 1  <at> 3.427s 0%: 0.046+0.20+0.060 ms clock, 0.14+0.024/0.13/0.13+0.18
ms cpu, 4->4->0 MB, 5 MB goal, 4 P
LastGC: 2016-06-22T16:46:13-07:00 NumGC: 1 PauseTotal: 106.965µs
Pause: [106.965µs]
LastGC: 2016-06-22T16:46:13-07:00 NumGC: 1 PauseTotal: 106.965µs
Pause: [106.965µs]
LastGC: 2016-06-22T16:46:13-07:00 NumGC: 1 PauseTotal: 106.965µs
Pause: [106.965µs]
LastGC: 2016-06-22T16:46:13-07:00 NumGC: 1 PauseTotal: 106.965µs
Pause: [106.965µs]
gc 2  <at> 7.320s 0%: 0.008+0.14+0.20 ms clock, 0.033+0/0.098/0.13+0.82 ms
cpu, 4->4->0 MB, 5 MB goal, 4 P
LastGC: 2016-06-22T16:46:17-07:00 NumGC: 2 PauseTotal: 322.029µs
Pause: [215.064µs 106.965µs]

For the first GC, gctrace shows 0.046ms + 0.060ms = 106µs vs 106.965µs
(Continue reading)

robfig | 22 Jun 18:55 2016
Picon
Gravatar

upx / darwin support

Does anyone know a way to use upx (or comparable tool) to shrink Go darwin binaries?  (It already works extremely well for linux binaries)

I saw a link to mpress which claims to do the same thing (brew install mpress), but the source site appears to have gone offline and I can't find a copy of it.

Thank you!
Rob

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Evan Digby | 22 Jun 22:13 2016
Picon

Text template with same name - inconsistent errors

I'm noticing that if I accidentally create a second template with the same name but no content there is no error reported when I "parse" it, but then when I attempt to execute it I do see an error:

https://play.golang.org/p/Rj3433vvju

Is this expected behaviour? Why wouldn't it simply return an error from the Parse call?

The key is the second template must have no content. The following does not return an error on execute:

https://play.golang.org/p/O5xv5rS-cg (both have content)
https://play.golang.org/p/kaoVWRunrP (only the second has content)

I have also noticed that this isn't an issue if they are not all based from the same template:

https://play.golang.org/p/iLoHokX4uy
https://play.golang.org/p/T07Z9rvfmW

The inconsistency in behaviour between the examples listed is a bit confusing. If there truly is expected that the one case that does error our on execute should error out, and not the others, I believe that the error makes more sense (and could be easily caught) on the Parse call, not the execute call.

Can someone provide some insight into why this might legitimately be behaving this way? 

Thank you!




--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Manlio Perillo | 22 Jun 19:44 2016
Picon

incorrect compiler error with invalid constants

Hi.

With this example:
https://play.golang.org/p/OTyO37vYck

the compiler reports that the Huge constant is invalid, but it also reports a division by zero in the Huge/Huge expression.
It should probably not report the error.
The error is also reported by Go 1.6.2.

It seems that the compiler is assuming that Huge is a constant with default type of int, but since the value is invalid it is set to the default value of 0.


Thanks
Manlio

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
wboe73 | 22 Jun 18:37 2016
Picon

Any keyboard players here?

Hello,

I created a (kind of) organ or piano, to be played with a MIDI keyboard. It has a GUI running in the terminal, thanks to the excellent termbox-go library. It's only for Linux, but porting should not be too difficult. PulseAudio is used for sound.

In my humble opinion this software instrument sounds very good. You can add new patches of your own, adding to the about 20 built-in patches. What you play can be dumped into a WAVE file. 

You can get it here: https://github.com/wboeke/tgui

W.Boeke

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Picon
Gravatar

[ANN] reform, a better ORM, reaches v1, moves to gopkg.in

Hi,

reform, an ORM based on non-empty interfaces, code generation, and initialization-time reflection,
reached version 1. Code moved to https://github.com/go-reform/reform, and canonical import path now
is gopkg.in/reform.v1. Expect new releases to be tagged, with proper changelogs, and
SemVer-compatible. One can build an own library on top of it without fear of compatibility breaking.

See https://github.com/go-reform/reform/blob/v1-stable/README.md for details.

–-–
Alexey «AlekSi» Palazhchenko

--

-- 
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@...
For more options, visit https://groups.google.com/d/optout.

indev | 22 Jun 10:13 2016
Picon

specific file cannot build

Hi. I have a question about relation between building source code and its filename.

When I try to build with store_arm.go file, I cannot build(compiler ignore this file).

But after just change filename of same source code, it is built.

How this "magic" can be occurred?





--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
rbirac | 22 Jun 03:58 2016
Picon
Picon

windows gamepad access

Hi all,
    I'm just getting started with Go and, for various reasons, want to run under Windows 10.   I need to read a gamepad (x360) which is read by a Windows hid driver.  I can't find any posts here or elsewhere that give an easy explanation of how to do so.  Is there anything in the standard libraries?  or any other libraries?  or do I have to do it by calling a Win32 dll or something?    
   Thanks in advance for any help.  And I apologize if this question is naive, but I am a newbie.
Alex

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
raidopahtma | 21 Jun 22:45 2016
Picon

Getting a pointer in a type switch gives a *interface {} if case lists several options

I have encountered some unexpected and inconsistent behavior with type switches. Can someone shed some light as to why Go behaves this way?

Take a look at https://play.golang.org/p/YPV5YPtWF8

I would expect both of the switches to behave the same way, but for some reason the one with multiple options in the case ends up with a pointer to an interface and the one with just one option ends up with a pointer to the correct type.

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
chandradeepak.k | 21 Jun 23:51 2016
Picon

Handling panics in go_kafka_client

Hi, We are trying to build an application using the go_kafka_client, for managing the consumer creation etc. We find it very convenient and easy to use. Thanks for building!

But in the go_kafka_client code we see a lot of panics.  

For example we created a consumer for a topic that doesn't exist, like below:

consumer.StartStatic(map[string]int{topic: config.NumConsumerFetchers}) which in turn does


     go c.createMessageStreams(topicCountMap)  -> since this is calling createMessageStreams in a go routine, we are not able to recover from the panic, when its thrown inside


Here is the place that does panic (partition_assignment.go):


partitionsForTopic, err := coordinator.GetPartitionsForTopics(myTopics)

if err != nil {
panic(fmt.Sprintf("Failed to obtain partitions for topics: %s, topics: %v", err, myTopics)) --> this panic makes our application crash
}


We do see there is a panic handler for the zookeeper coordinator but not for the go_kafka_client package. What is the recommended way to handle panics from go_kafka_client?


Thanks,

Chandra.



--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Gmane