Re: [go-nuts] New to Go; Saying Hello !

2018-02-23 Thread Daniel Skinner
hi :) On Fri, Feb 23, 2018, 8:26 AM wrote: > So, I started programming in Go about a month ago. I can't stop. > I can't even describe why I am enjoying the language so much, except by > saying... > > It's fun to program in Go! > > I have now embarked on a mission to

Re: [go-nuts] Puzzle: make a sync.Once fire more than once

2017-11-19 Thread Daniel Skinner
I'd note the following: https://play.golang.org/p/U_lmt-go6M Also, this can be simplified to the following: https://play.golang.org/p/eFnM98yRLk Such a puzzle should look something more like: https://play.golang.org/p/8KD6INL9QP On Sun, Nov 19, 2017 at 6:25 PM Carl Mastrangelo

Re: [go-nuts] A way to detect closed channel

2017-11-07 Thread Daniel Skinner
Instead of recover, I'd consider simply writing to the channel. https://play.golang.org/p/ShoadwrwTQ If it has to be a close, pass in additional state to close only once. https://play.golang.org/p/pwO3JF60Cr On Tue, Nov 7, 2017 at 3:32 AM roger peppe wrote: > On 7

Re: [go-nuts] A way to detect closed channel

2017-11-06 Thread Daniel Skinner
meaning, don't call that select+code block from multiple goroutines. If on the other-hand that block is always called from the same goroutine, then it will do what you want, but that may be a slippery slope depending on what you're writing. On Mon, Nov 6, 2017 at 7:33 PM Dan Kortschak

Re: [go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-05 Thread Daniel Skinner
t depth can occur while not being on > shortest path. Note that path was used in this discussion as meaning full, > unpromoted path, ie. like if every embedded field of type T was declared T > T instead. The actual selector expression is a prefix of this full path. > > On Sun, Nov 5, 20

Re: [go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-05 Thread Daniel Skinner
orm GLUniform is changed to this: type Uniform struct { GLUniform } access to the Value fields would now exist at the same depth and produce the error I was expecting to see. https://golang.org/ref/spec#Selectors On Fri, Nov 3, 2017 at 5:38 PM Daniel Skinner <dan...@dasa.cc> wrot

[go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-03 Thread Daniel Skinner
https://play.golang.org/p/Y1UxMgNhWx I ran into this today but don't understand why the compiler isn't throwing an ambiguous reference error. Maybe I've misunderstood why this error is thrown the few times I've seen it. -- You received this message because you are subscribed to the Google

Re: [go-nuts] Re: Pure Golang Android Service

2017-10-24 Thread Daniel Skinner
The manifest can specify hooks for Service implementations, such as to start on-boot, but the platform still requires the implementation of the Service class. One could write a generic NativeService implementation for easy reuse and launching of native processes, but otherwise nothing has changed

Re: [go-nuts] Re: Cross compiled binary caches goroot?

2017-10-16 Thread Daniel Skinner
fference between the failing program and the > succeeding one > > > > On Monday, October 16, 2017 at 12:22:00 PM UTC-4, Daniel Skinner wrote: > >> As mentioned in last paragraph here: https://golang.org/pkg/runtime/ >> >> GOARCH, GOOS, and GOROOT are

Re: [go-nuts] Re: Gomobile and SAF

2017-10-16 Thread Daniel Skinner
I'm inclined to say a Service would be better for Context access instead of a noop Activity. You should be able to make the Service instantiate needed resources or provide an implementation to instantiate those resources and a method for communicating that logic in Go. If you don't want parallel

Re: [go-nuts] Re: Gomobile and SAF

2017-10-16 Thread Daniel Skinner
How were you intending to run the Go program? iirc you'll need access to a Context that can only be provided by the Dalvik VM, and that can only be instantiated via bytecode ran on the VM (so use Java). The first entry point this is provided is Application.onCreate when said class is declared in

Re: [go-nuts] Re: Cross compiled binary caches goroot?

2017-10-16 Thread Daniel Skinner
As mentioned in last paragraph here: https://golang.org/pkg/runtime/ GOARCH, GOOS, and GOROOT are recorded at compile time and made available by constants or functions in this package, but they do not influence the execution of the run-time system. I'd first be inclined to think Mage source has

Re: [go-nuts] favicon generator

2017-09-27 Thread Daniel Skinner
you could adapt something like this to your needs: https://github.com/dskinner/x/blob/master/cmd/droidscale/droidscale.go On Tue, Sep 26, 2017, 4:48 AM Joe Blue wrote: > drives me nuts making icons for web, desktop and mobiles. > > anyone know or a generator. prefer using

Re: [go-nuts] Is x/exp/shiny dead?

2017-07-31 Thread Daniel Skinner
As one of the persons reached out to for that effort (and I'm not a shiny contributor), my current unpublished work will eventually serve as a basis for some proposals to shiny for review that maybe after some testing and input from others will stand on its on merits, for such a proposal. Even as

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread Daniel Skinner
You're right, I failed to consider the constants on Service. I thought I saw something about this recently but it just turned out to be you five days ago :) On Sat, Dec 24, 2016 at 4:27 PM andrey mirtchovski wrote: > Apologies for the digression. > > > This suggests that

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread Daniel Skinner
> app redeclared as imported package name This suggests that you still have multiple `app` imports without each having a unique name. Double check your imports in all source files being compiled. > import "Java/android/app/Service" I'd imagine `Service` is not a package and not something you

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread Daniel Skinner
I haven't used these bindings but wouldn't you rename the v7 import as sapp "Java/android/support/v7/app" and then import "Java/android/app" then reference `app.AlertDialog` as appropriate? You'll also need to call `dialog.Show()` in `showDialog`. On Sat, Dec 24, 2016 at 8:35 AM glenford

Re: [go-nuts] Hashing (u)int8

2016-12-16 Thread Daniel Skinner
It's surprising but it's not. Who would have guessed 8bits would be more expensive on a 64bit platform. On Fri, Dec 16, 2016 at 11:15 PM Damian Gryski wrote: > The runtime has optimized map implementations for strings, int32 and > int64-sized thing > > There is no optimized

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-10-28 Thread Daniel Skinner
> > The original e-mail is clear that it was passing along a complaint > from someone else. That person was following the procedure outlined > in Go's code of conduct (https://golang.org/conduct). > In bold, the CoC calls out, "Note that the goal of the Code of Conduct and the Working Group is

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-10-27 Thread Daniel Skinner
The email was presumptuous, so as to describe "more productive", and threatening with "consider this a warning". It also felt cold and unwelcoming like a bot generated it. I do not advocate this CoC at all, but at the very least the email could have stuck to what was known to start a private

Re: [go-nuts] Shiny

2016-08-19 Thread Daniel Skinner
> > There is also some very impressive work by Skinner over at: > https://github.com/dskinner/material > > The branch called mediansdf has impressive font improvements. > Thanks for the shout out, though I'm already looking at dropping that branch. I'm interested in shiny as well but waiting for

Re: [go-nuts] Go is for everyone

2016-07-19 Thread Daniel Skinner
is the Go tour really that out of touch for people with little to no programming experience? I'd think there's enough in there to keep one busy for quite a while. Now, whether that work is actually interesting to them is another matter... I sat my 9 year old daughter in front of the tour a few

Re: [go-nuts] goimports has been updated

2016-07-15 Thread Daniel Skinner
$HOME/local/src usage predates Go usage for me, and besides, the structure and content of a GOPATH has merit stretching beyond languages as a simple method for source organization. On Fri, Jul 15, 2016, 4:30 PM Dave Cheney wrote: > Why not put non go code in another directory

Re: [go-nuts] Re: formal verification in Go? someday perhaps?

2016-06-28 Thread Daniel Skinner
<seb.bi...@gmail.com> wrote: > On Tue, Jun 28, 2016 at 12:24 AM, Daniel Skinner <dan...@dasa.cc> wrote: > >> > I think a better question is: can go tools for formal verification >> become available? >> >> I did some research on formal verification recently

Re: [go-nuts] Re: Any keyboard players here?

2016-06-26 Thread Daniel Skinner
Finally have a place to setup my keyboard and tgui-harm worked well, nice work. On Sun, Jun 26, 2016 at 3:25 AM wrote: > Hi Daniel, > > I already investigated your piano and snd projects at github, but could > not get them working: too much unknown libraries. Anyhow, it seemed

Re: [go-nuts] Re: Any keyboard players here?

2016-06-23 Thread Daniel Skinner
Yes, the Android app is a toy app. Touchscreen or not, the hardware latency alone makes that a fact. But that's why it's an example, not the root project. I've been using the gui example as a playground to work out further improvements to a separate project and I realize this is in disarray. I

Re: [go-nuts] Any keyboard players here?

2016-06-22 Thread Daniel Skinner
tgui-harm looks pretty interesting, I'll have to check it out this weekend. > Go is a very neat programming language, but it is not particulary fast. On my rather old computer a sampling frequency of 44100Hz caused problems, but 24000Hz did work my package dasa.cc/snd defaults to 44100 sample

Re: [go-nuts] GoMobile window size always 800x800

2016-06-21 Thread Daniel Skinner
ing block that I researched online > and found others having difficulty with as well. It would help a lot to > have this feature, but I'm not familiar enough with the codebase or feature > threshhold to understand the downside of adding it to the API. > > Andy > > On Fri, Jun 17

Re: [go-nuts] [?] emulating an opengl shader in cpu bound functions

2016-06-21 Thread Daniel Skinner
I pinned this question to my email b/c I'm going to be doing something similar soon and why not help a similar soul out, but really even though I can't give you a straight answer now, the answer is still pretty straight forward. There's nothing predominantly interesting between a gpu shader and a