Re: [go-nuts] What is The compiler's -json optimization logging

2020-09-04 Thread 'David Chase' via golang-nuts
There is also a command-line proof-of-concept that combines it with profiling information to show you only the missed/unabled optimizations that are also hot spots in the profile. https://github.com/dr2chase/gc-lsp-tools There's a lot of checks and things that can't be optimized away, but very

[go-nuts] Re: Is it possible to get code coverage information in a way that does not assume you can see color?

2020-01-10 Thread 'David Chase' via golang-nuts
Lack of accessibility is a legitimate bug. Would would be good for you? For example, is there something in html that would work? I have no idea what current screen readers do -- would *underlining*, or *bolding*, or *italics?* (I used the three styles for the three words in the line just above.)

Re: [go-nuts] Re: mutual exclusion algorithm of Dijkstra - strange behaviour

2019-08-19 Thread 'David Chase' via golang-nuts
If you want preemption within a particular package, you can compile it "go build -gcflags=particular_package=-d=ssa/insert_resched_checks/on" . That will not fix any problems with underlying raciness, though it may mask them. If you want an entire compiler that defaults to that mode and

Re: [go-nuts] Re: [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread 'David Chase' via golang-nuts
On Tuesday, March 12, 2019 at 5:45:36 PM UTC-4, Robert Engels wrote: > > I did just encounter a case though where trying to copy and paste a table > wasn’t happening, and there is no way I am going to type it all in or get > the author to change it, so screen shot it is... > I have done the

Re: [go-nuts] Debugging & breakpoints in Go compiler source code

2019-03-12 Thread 'David Chase' via golang-nuts
Wouldn't mind knowing the version of that Go compiler. What you see there is a bug in generated debugging information (DWARF). You might be better off using Delve; parts of the compiler are multithreaded (with goroutines, not necessarily threads that gdb understands) and that is not best case

[go-nuts] Re: How can I try debug.SetMaxHeap?

2019-02-28 Thread 'David Chase' via golang-nuts
I think you actually want this stack of CLs. Despite Gerrit's predictions of doom, in fact they cherry-pick cleanly onto tip, and it builds, and passes tests: git fetch https://go.googlesource.com/go refs/changes/90/66090/4 && git cherry-pick FETCH_HEAD git fetch https://go.googlesource.com/go

Re: [go-nuts] Go vs C speed - What am I doing wrong?

2019-02-04 Thread 'David Chase' via golang-nuts
A general problem with interlanguage benchmarks is that you can only compare those features that both languages have, so these always reduce to lowest common denominator and are inherently biased against new features. So for example, go will get no credit for having a garbage collector,

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread 'David Chase' via golang-nuts
I'm curious how much experience people have with hand-translation of one language into another. What I find is that for not-too-different languages (e.g., C to Java, or C to Modula-3) I can process about 1000 lines per day. K C to ANSI C goes a good deal more quickly. C pointers translated into

[go-nuts] Re: [ANN] Geometric index Library

2018-12-12 Thread 'David Chase' via golang-nuts
Before you have too many people depending on the current interfaces, would you consider replacing the point encoding of even/odd array elements with, say, "type Point struct { x, y float64}" ? I think it would be a more attractive interface. Would also be nice to use build tags to allow use

[go-nuts] Re: Unsupported File Format error while building for linux-amd64 on mac os

2018-09-28 Thread 'David Chase' via golang-nuts
One possibility is to use Docker on your Mac to run Linux in a container; I use Macs a lot, but don't know how to cross-compile directly when cgo is involved (works fine for non-cgo binaries, however). This assumes you are okay with Docker and Linux; in both cases, I flail quite a bit but have

[go-nuts] Re: Debug Go program with GDB on macOS shows nothing

2018-09-27 Thread 'David Chase' via golang-nuts
You did nothing wrong, in 1.11 we started compressing the debug information to reduce binary size, and gdb on the Mac does not understand compressed DWARF. We had hoped that the several speedbumps involved in running gdb on modern OSX would have caused most users to move to Delve, which handles

[go-nuts] Re: Compile to go languages?

2018-08-14 Thread 'David Chase' via golang-nuts
It's not a bad idea, except for the "idiomatic" part. I guess it depends upon how idiomatic you want it to be. Once upon a time, we compiled code to C (C++, Modula-3, and Cedar Mesa all had a compiler of that sort at one time or another). Some people tried it for Java. The advantage of

Re: [go-nuts] [ANN] oksvg and rasterx; SVG 2.0 path compliant renderer and rasterizer

2018-04-25 Thread 'David Chase' via golang-nuts
On Tuesday, April 24, 2018 at 10:45:35 AM UTC-4, matthe...@gmail.com wrote: > > I’m curious if some companies juggle the GPL. I guess if the app is used > internally only then there’s no problem with accidentally requiring a > proprietary program to be released as source code to the world. I’d

[go-nuts] Re: All Forms of Wishful Generics

2018-02-22 Thread 'David Chase' via golang-nuts
I agree that this is one of the two large risks. The other is whether the language remains comparatively easy to learn. The next largest problem after those two is "what exactly do you mean by generics"? Some people want code stenciling, like C++ (it's fast, it's easy to understand, code size

[go-nuts] Re: Go Compiler How Work?!

2017-12-13 Thread 'David Chase' via golang-nuts
I think one of the best references to this is "BCPL: The Language and Its Compiler". It is shorter than the Dragon Book, accessible, historical, and very well written. I think you can find the PDF online (maybe, not sure). On Tuesday, December 12, 2017 at 4:03:08 PM UTC-5, Compiler wrote: > >

Re: [go-nuts] Elphaba Chess

2017-12-04 Thread 'David Chase' via golang-nuts
On Sunday, December 3, 2017 at 1:57:58 AM UTC-5, Ian Lance Taylor wrote: > > On Sat, Dec 2, 2017 at 11:37 AM, > wrote: > > > > Google is not going to be happy if somebody uses Go to compete against > > Google. > > I think that Go is a nice language, but it's not so

[go-nuts] Re: Generics and readability

2017-08-28 Thread 'David Chase' via golang-nuts
One distinction that might be helpful is the difference between people using a generic data structure and people writing a generic data structure. It's much more important that the code that makes use of generics be readable than it is that the body of the generic be readable; after all, the

[go-nuts] Re: Go's scheduler always “stuck” after certain time when executing the code below

2017-06-21 Thread 'David Chase' via golang-nuts
Try compiling your code with -gcflags -d=ssa/insert_resched_checks/on . You should see the scheduler thrashing stop, at the expense of some loop overhead. (The simpler the loop, the worse the overhead, that is why this phase is not normally enabled. We're working on the overhead issues, they've

Re: [go-nuts] Why golang garbage-collector not implement Generational and Compact gc?

2017-05-16 Thread 'David Chase' via golang-nuts
See also: Norman R. Nielsen. Dynamic memory allocation in computer simulation. Communications of the ACM, 20(11):864–873, November 1977. This was the first place I saw this result. A later improvement was realizing this allowed headerless BIBOP organization of allocated memory. I think the

[go-nuts] Re: Some best practices for debuging and optimizing with -gcflags?

2017-02-28 Thread 'David Chase' via golang-nuts
Goal "best" practice is that there is no need to tinker with -gcflags, and this is already true for optimization. In practice -gcflags -N tends to make the generated code easier to debug, but that is a sort of a bug that we're trying to fix by improving the compiler's Dwarf generation skills.

Re: [go-nuts] why "iota"?

2016-11-09 Thread 'David Chase' via golang-nuts
If you're looking for Greek pronunciation of Greek letters, there's this: https://www.youtube.com/watch?v=vPEtRc05G7Q which agrees with what I learned in high school (and what is now stuck in my head). On Saturday, April 27, 2013 at 8:52:36 PM UTC-4, mb0 wrote: > > > Wikipedia says it's a greek