Slightly off topic.
But is there any way to enhance google groups so that it will support
Markdown?
Or at least provides a simple way to post formatted code without the
indentation being destroyed?
People often want post code snippets on this group.
And I have yet to find an easy way to do this.
Hi Sebastien,
a few years ago I started with dvitype
https://github.com/speedata/gotex
Patrick
Sebastien Binet schrieb am Dienstag, 16. Februar 2021 um 15:23:41 UTC+1:
> hi there,
>
> I'd like to introduce star-tex[1], a (Work In Progress) TeX engine.
>
> it wraps the output of the official te
The modules documentation has a section on this: "Developing and testing
against unpublished module code"
https://golang.org/doc/modules/managing-dependencies#tmp_9
On Saturday, 20 February 2021 at 13:10:38 UTC+1 pkle...@xs4all.nl wrote:
> Is there a way to tell go.mod that it should use local f
Hello fellow gophers,
Ian announced the intention to update how type switches work in the
generics proposal in a golang-nuts thread from this August:
https://groups.google.com/g/golang-nuts/c/iAD0NBz3DYw
It included this from Ian (which is a snippet of his item #4 from his first
post ther
Thank you derek, your references just saved me some headache.
On Sunday, January 21, 2018 at 11:11:39 AM UTC-6 derek wrote:
> On Fri, Jan 19, 2018 at 10:07 AM, Ian Lance Taylor
> wrote:
> > Sounds like a good approach. Or I'm also open to someone writing the
> > necessary code for golang.org.
I don't believe anyone is talking about not handling errors. There are
functions that perform a sequence of actions and need to go no further when
an error is encountered. An example of this type of function is presented
in the "Errors are Values" post:
https://blog.golang.org/errors-are-values
Dnia 2021-02-20, o godz. 07:52:26
Peter Kleiweg napisał(a):
> you *can* tell go.mod that it should use local files instead of a repository.
[...]
> replace github.com/pebbe/package =>
> /home/peter/go/src/github.com/pebbe/package
In that sense, yes. You point to package directory and there are
Dnia 2021-02-20, o godz. 13:21:09
Michael Ellis napisał(a):
> FWIW, I've put together a tiny package that, with some tradeoffs, seems
> useful for reducing boilerplate in the common case where a function simply
> wants to return an error to its caller.
> The code is almost trivial. It consis
Neat. What you and I are doing is very similar. Particularly how the
handler is "bound" to the error and checks to make sure that the error is
non-nil before attempting to recover.
The differences I see in our approaches are as follows:
I support wrapping an error or performing some arbitrary
Some developers build sheds others build skyscrapers. Exceptions let you build
skyscrapers - but not everyone needs a skyscraper.
I’ve use both methods extensively in my career - well written exception code is
far easier to write and maintain for more complex systems.
> On Feb 20, 2021, at 2:3
I consider checked vs unchecked exceptions “well written” or even valid code.
Checked exceptions are similar to Gos error return except more/easier/better?
compile and coding time validation. Unchecked exceptions are similar to panic
recover except you have more information.
There is no differ
FWIW, I've put together a tiny package that, with some tradeoffs, seems
useful for reducing boilerplate in the common case where a function simply
wants to return an error to its caller.
https://github.com/Michael-F-Ellis/ro
The code is almost trivial. It consists of two small functions,
ro
I'm referring to errors found in the function (i.e., by calling
other functions). It's the responsibility of the callers of a function to
handle the errors it returns, and not the function itself. How can one
function claim responsibility for the error handling strategy of all
programs using it?
Y
On Sat, Feb 20, 2021 at 12:11 PM Robert Engels wrote:
>
> Can you clarify what you mean mean by “the code does exactly what it shows on
> the page”? How do you know by looking at the code, or even compiling the
> code, that all possible errors returned by a function are handled? That to me
> is
Can you clarify what you mean mean by “the code does exactly what it shows on
the page”? How do you know by looking at the code, or even compiling the code,
that all possible errors returned by a function are handled? That to me is
biggest difficult in reading (or using) others Go code. Exceptio
Roger beat me to it.
But allow me to rephrase,
"The users of Go for a long time have resisted any changes to its simple,
clear method of error handling despite it being a major concern of folks
who don't use Go much." *
* I'm referring to the original survey, which was worded along the lines of
On Sat, Feb 20, 2021 at 8:34 AM changkun wrote:
>
> Dear Ian, thanks for the inspiration and sorry for the late response. I just
> got a chance to test your suggestion.
> But, it turns out that the wrapping struct can cause the following error:
>
> panic: runtime error: cgo argument has Go pointe
Awesome !!
Thank you.
Il giorno sabato 20 febbraio 2021 alle 19:59:37 UTC+1 DrGo ha scritto:
> Dear Lorenzo,
> Here’s a link to an old but still relevant tutorial on benchmarking Go
> programs
>
> https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go
>
> Happy benchmarking
>
> On Sat
Dear Lorenzo,
Here’s a link to an old but still relevant tutorial on benchmarking Go
programs
https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go
Happy benchmarking
On Saturday, February 20, 2021 at 11:19:40 AM UTC-6 TiT8 wrote:
>
> Thank you Volker.
>
> I want to say that I was n
I am writing this to see what everyone thinks about a solution I have for
the composite pattern.
The composite pattern is when 0 or more instances of some interface X can
act together as a single instance of interface X. For instance you may have
a Filter interface that filters instances of cla
On Sat, 20 Feb 2021, 16:31 L Godioleskky, wrote:
> Rust lang, very early in its evolution, saw the need to create its
> operator '?' to more efficiently manage error handling. But the guardians
> of Go lang have resisted any changes to its clumsy method of error handling
> despite it being a maj
Many, many thanks. The hpcloud/tail hit the spot exactly, along with using
timer.AfterFunc() along with judicious use of .Stop() calls to
turn on and off
audible alarms. That was just the help I needed! again, Many thanks!
murf
On Thursday, February 18, 2021 at 12:02:46 PM UTC-7 Amnon wrote:
Thank you Volker.
I want to say that I was not trying to benchmark the two version of Go (two
weeks ago I had go1.15.8, now 1.16). At the beginning I was trying to do
some linear algebra with Go as a free “alternative of Matlab”, so I noted
the difference between the exe coming from the two ve
Dear Ian, thanks for the inspiration and sorry for the late response. I
just got a chance to test your suggestion.
But, it turns out that the wrapping struct can cause the following error:
panic: runtime error: cgo argument has Go pointer to Go pointer
If my understanding of Cgo constraints corr
(premature send, sorry)
4. Your matrix multiplication is just a few CPU instructions, it is hard
to measure something tiny reliable. So use larger matrixes.
5. You are benchmarking also how fast you can format and output
the results to stdout. This might or might not be intentional but
probably is
Rust lang, very early in its evolution, saw the need to create its operator
'?' to more efficiently manage error handling. But the guardians of Go
lang have resisted any changes to its clumsy method of error handling
despite it being a major concern of Go users for a very long time.
On Sunda
1. Do not use go run main.go. Never!
2. Do not run your code with the much less problematic go run because
go run compiles and executes your code and the time needed to compile
it will ruin all benchmarks.
3. Always use the benchmarking infrastructure built into go test and
and package testing.
O
Reading https://github.com/rogpeppe/gohack en trying some things, I found
that
you *can* tell go.mod that it should use local files instead of a
repository.
I have a test program outside my `~/go` tree with a `go.mod` like this:
```
module peter.nl/tester
go 1.16
replace github.com/pebbe/pac
Hello everyone,
I'm Lorenzo and I'm not a computer scientist, I have used some "Matlab" and
I am new with Go (surprisingly fast, simple and elegant).
I'm trying to do some basic operation on matrix with the "Gonum" package
using vectorization. I was curious about the speed of development and the
Dnia 2021-02-20, o godz. 04:10:38
Peter Kleiweg napisał(a):
> Suppose I am writing a package that is in its own module, and I want
> to test it. Not with unit tests, but with a larger program that uses
> other non-standard packages as well.
[...]
> How do I get this right?
>
> Is there a way to
Suppose I am writing a package that is in its own module, and I want
to test it. Not with unit tests, but with a larger program that uses
other non-standard packages as well.
Before modules, I would develop the package in ~/go/src, write the
test program somewhere else, and import the package. Thi
reasonable. Thanks both for explanations.
On Friday, February 19, 2021 at 7:20:36 AM UTC-5 Amnon wrote:
> go mod tidy has to ignore build tags.
>
> Because if it did not ignore build tags, it would delete dependencies
> needed by other platforms.
>
> On Friday, 19 February 2021 at 02:23:45 UTC I
Hi,
this January a fork of gddo was was announced to this list. Take a look
https://godocs.io/
Best regards
On 20.02.21 08:13, Sankar P wrote:
Hi
We have a bunch of private repos in github with Go sources. We want to
see the documentation for these repository sources in an easy to click URL.
33 matches
Mail list logo