[go-nuts] Re: Loading packages which import "C"

2023-07-17 Thread 'Alan Donovan' via golang-nuts
Hi Sarita, go/packages usually has no trouble loading packages that import "C": underneath, it calls "go list -json" which generates Go code, and that's what we load and parse. Of course, that means you see the same (generated) Go code as the compiler, which is not what the user actually typed

Re: [go-nuts] New edition of the Go Programming Language comming soon ?

2022-03-02 Thread 'Alan Donovan' via golang-nuts
There certainly are a number of topics that a second edition of our book should cover---context, modules, generics, fuzzing---but I wouldn't say we have anything as grand as a plan for it yet. On Saturday, February 19, 2022 at 12:46:36 PM UTC-5 peter.ar...@gmail.com wrote: > I can't remember

Re: [go-nuts] [ generics] Moving forward with the generics design draft

2020-08-26 Thread 'Alan Donovan' via golang-nuts
On Wed, 26 Aug 2020 at 04:31, Denis Cheremisov wrote: > > possibility of using angle brackets > > Please stop > >- call these operator signs “brackets” >- pretending they are good in a role of brackets — they are not >- spreading this nonsense from C syntax family of languages to

Re: [go-nuts] GoAWK: an AWK interpreter written in Go

2018-11-17 Thread 'Alan Donovan' via golang-nuts
This is great, both as an "étude"---a challenge for sharpening your technique---and as an exemplary write-up of the process of building something non-trivial and making it both correct and fast. Nice work. I'm sure you knew already, but Peter Weinberger (the W in AWK) is on the Go team at Google.

[go-nuts] A new API for modular static analysis

2018-09-14 Thread 'Alan Donovan' via golang-nuts
[bcc: golang-{dev,nuts}] I've been working on a common interface for modular static analysis of Go packages, and have built prototypes of several drivers, including a replacement for the existing standalone 'vet' command and for the implementation of 'go vet'. Please read the code and doc and

[go-nuts] A new API for modular static analysis

2018-09-14 Thread 'Alan Donovan' via golang-nuts
[bcc: golang-{dev,nuts}] I've been working on a common interface for modular static analysis of Go packages, and have built prototypes of several drivers, including a replacement for the existing standalone 'vet' command and for the implementation of 'go vet'. Please read the code and doc and

Re: [go-nuts] Re: Announcing: Skylark in Go

2017-11-07 Thread 'Alan Donovan' via golang-nuts
On 7 November 2017 at 15:54, Zellyn Hunter wrote: > Oh neat. So is it a sort of competitor to jsonnet? I guess jsonnet is > usually used to generate actual config files, not live-interpret executable > config. > Jsonnet is more of a templating language whereas Skylark is

Re: [go-nuts] Re: Announcing: Skylark in Go

2017-11-07 Thread 'Alan Donovan' via golang-nuts
On 7 November 2017 at 15:36, Zellyn wrote: > An only-2x-slower than CPython interpreter is pretty cool. Just very > curious what y'all are doing with it. > Various infrastructure projects (such as Copybara) are using Skylark as a configuration language since it has proven

Re: [go-nuts] Re: Announcing: Skylark in Go

2017-11-07 Thread 'Alan Donovan' via golang-nuts
On 7 November 2017 at 15:06, Ben Hoyt wrote: > > 2x as fast as CPython sounds pretty good to me -- nice! >>> >> No, CPython is 2x as fast as Skylark in Go. It's implemented in C, so it can do things that are sadly impossible in Go, like implement a threaded bytecode

[go-nuts] Announcing: Skylark in Go

2017-10-02 Thread 'Alan Donovan' via golang-nuts
I'm pleased to announce the launch of Skylark in Go: an interpreter for Skylark, implemented in Go. github.com/google/skylark Skylark is a dialect of Python intended for use as a configuration language. Like Python, it is an untyped dynamic language with high-level data types,

Re: [go-nuts] Re: Constructor return advice

2017-04-21 Thread 'Alan Donovan' via golang-nuts
On 21 April 2017 at 15:26, st ov wrote: > > When deciding between method receivers, any advice on how to choose which > to use? > Is it as simple as, when you need to change the instance pass a pointer, > otherwise pass a value. And then once one method requires a pointer,

Re: [go-nuts] Modern Garbage Collection Article

2016-12-20 Thread 'Alan Donovan' via golang-nuts
On 20 December 2016 at 11:17, wrote: > > compare 1 pointer in Go's string to 3 in java.lang.String > Sorry, "2 in java.lang.String". -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] CFG for a Go program

2016-12-20 Thread 'Alan Donovan' via golang-nuts
On 20 December 2016 at 10:07, wrote: > You mentioned it will be easier to use gc compiler's SSA representation. > By what commands can I get that SSA representation and is there any > documentation about the use of that representation. > The compiler is not structured

Re: [go-nuts] CFG for a Go program

2016-12-18 Thread 'Alan Donovan' via golang-nuts
On 17 December 2016 at 23:54, wrote: > For each instruction in any BasicBlock I want to know the type of > instruction, the variables used in that instruction. [...] Just one line > of the program corresponds to multiple instructions. Is there some > documentation as

Re: [go-nuts] [ANN] browse

2016-12-16 Thread 'Alan Donovan' via golang-nuts
Correction: https://github.com/golang/go/issues/18348 On 16 December 2016 at 11:29, Alan Donovan wrote: > On 16 December 2016 at 11:01, Jan Mercl <0xj...@gmail.com> wrote: > >> go/{scanner ,parser} speed is okay. >> It's problem is that

Re: [go-nuts] [ANN] browse

2016-12-16 Thread 'Alan Donovan' via golang-nuts
On 16 December 2016 at 11:01, Jan Mercl <0xj...@gmail.com> wrote: > go/{scanner ,parser} speed is okay. > It's problem is that it does not scale well in parallel execution when > there's a shared token.FileSet. > That's a good point. I measured the benefit of

Re: [go-nuts] Re: Code-base Refactoring Tool for Go , Move files from packages to sub packages

2016-12-15 Thread 'Alan Donovan' via golang-nuts
On 15 December 2016 at 19:52, Dave Cheney wrote: > How do aliases help this situation? In my view they'll just obscure the > true source of the declaration. > People in a hurry will continue to create bad dependencies whether or not we have aliases, but perhaps aliases might

Re: [go-nuts] Re: Code-base Refactoring Tool for Go , Move files from packages to sub packages

2016-12-15 Thread 'Alan Donovan' via golang-nuts
On 15 December 2016 at 04:38, roger peppe wrote: > > In my experience it is very common for circular dependencies to arise > not because > of something in a package that I'm using directly, but because of > something semi-related that > happens to sit in the same package. >

[go-nuts] Re: Code-base Refactoring Tool for Go , Move files from packages to sub packages

2016-12-14 Thread 'Alan Donovan' via golang-nuts
On 14 December 2016 at 15:13, Dave Cheney wrote: > For example, net/http contains both http client and server facilities, > because they both relate to the use of http. The prevailing style in other > languages would have these placed in separate packages, one for client, one >

Re: [go-nuts] import a "main" package

2016-12-14 Thread 'Alan Donovan' via golang-nuts
On 14 December 2016 at 11:16, roger peppe wrote: > It is not possible to import main packages in general, although it does > seem to be possible to import a main package > Ah, that explains it. Thanks for the correction. Clearly I never tried importing a main package from

Re: [go-nuts] CFG for a Go program

2016-12-11 Thread 'Alan Donovan' via golang-nuts
On 11 December 2016 at 12:21, wrote: > I am not sure how to get any starting node of type BasicBlock ( > ssa#BasicBlock ), so > that I can traverse the Graph using Preds/Succs relation. > An ssa.Program is a

Re: [go-nuts] What is called reference values in Golang?

2016-10-21 Thread 'Alan Donovan' via golang-nuts
I am now enlightened as to why my colleagues were so eager to banish this term from our documentation. On 21 October 2016 at 11:59, T L wrote: > > > On Friday, October 21, 2016 at 9:40:09 PM UTC+8, Ian Lance Taylor wrote: > >> On Thu, Oct 20, 2016 at 10:47 PM, T L

Re: [go-nuts] What is called reference values in Golang?

2016-10-21 Thread 'Alan Donovan' via golang-nuts
On 21 October 2016 at 11:15, T L wrote: > > On Friday, October 21, 2016 at 10:01:43 PM UTC+8, Ian Lance Taylor wrote: >> >> On Fri, Oct 21, 2016 at 6:52 AM, Henrik Johansson >> wrote: >> > The confusion I have had is rather with nilability. >> > A channel

[go-nuts] Re: Proposal: add "future" internal type (similar to channel)

2016-10-17 Thread 'Alan Donovan' via golang-nuts
On 17 October 2016 at 12:31, Sokolov Yura wrote: > > понедельник, 17 октября 2016 г., 18:08:43 UTC+3 пользователь > adon...@google.com написал: >> >> Go does not take a strong Erlang-like stance against concurrency with >> shared variables, so mutexes really are critical

[go-nuts] Re: Why is there no " declared and not used" compile error?

2016-09-14 Thread 'Alan Donovan' via golang-nuts
On 14 September 2016 at 09:32, Markus Zimmermann wrote: > > Do you think this might be worth bringing up in golang-dev? > No. We can't make this change to the language without breaking existing programs. -- You received this message because you are subscribed to the Google

Re: [go-nuts] Multiple-reader single-writer map access - is this lockless workaround safe?

2016-09-13 Thread 'Alan Donovan' via golang-nuts
On 13 September 2016 at 12:36, sqweek E. wrote: > On Tuesday, September 13, 2016 at 9:48:06 AM UTC+8, Caleb Spare wrote: >> >> See https://software.intel.com/en-us/blogs/2013/01/06/benign-dat >> a-races-what-could-possibly-go-wrong. >> > > I've read this article before and the

Re: [go-nuts] Multiple-reader single-writer map access - is this lockless workaround safe?

2016-09-13 Thread 'Alan Donovan' via golang-nuts
On 13 September 2016 at 10:33, 'Paul Borman' via golang-nuts < golang-nuts@googlegroups.com> wrote: > That said, a map is represented by a single machine word (32 or 64 bits). > I don't know of any modern architecture where reading a cache aligned word > while it is being written will yield

[go-nuts] Re: Why is there no " declared and not used" compile error?

2016-09-13 Thread 'Alan Donovan' via golang-nuts
On 13 September 2016 at 08:22, Markus Zimmermann wrote: > On Monday, September 12, 2016 at 3:41:35 PM UTC+2, adon...@google.com > wrote: >> >> unused constants and types cost nothing at run time. It's not that >> simple, of course, because constant and type declarations may

[go-nuts] Re: Close a reader to quit a loop without closing its source

2016-09-02 Thread 'Alan Donovan' via golang-nuts
On 2 September 2016 at 06:21, mhhcbon wrote: > I dig into the repo you mentioned, TBHonnest, im not that wise, and it > remains unclear. > For the few i know, select is the approach to take, but the API is unclear. > > Not sure if it s possible to come up with

[go-nuts] Re: How runtime.newobjcet is optimized in map access?

2016-08-27 Thread 'Alan Donovan' via golang-nuts
On 27 August 2016 at 00:21, Peng Gao wrote: > > Is there any good for complier or is just a simplification? > It doesn't change the escape aspects of this code, but it makes the program smaller and thus easier to read and possibly faster. Sorry, I made a wrong