On Mon, Jan 27, 2025 at 6:54 PM 'Ivan Burak' via golang-nuts
wrote:
WAI: https://go.dev/play/p/4bWHGemItL_9
--
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 gola
On Tue, Jan 14, 2025 at 2:44 PM Vasiliy Tolstov wrote:
> Hi! I'm try to search answers but have no luck. In go i can create
> memory arena/ buffer pool etc..
> But does it possible to get memory with like make([]byte, XXX) but
> without calloc for this memory?
Not sure if it's what you're after,
On Fri, Oct 18, 2024 at 9:17 AM 'Axel Wagner' via golang-nuts
wrote:
> I tried it out and the format parsed by debug.ParseBuildInfo is almost
> exactly what is output by go version -m:
> https://go.dev/play/p/L-MNzr0EnjV
> (and yes, my goimports version is old)
And https://go.dev/play/p/bgeGr2h
On Mon, Oct 14, 2024 at 9:28 PM robert engels wrote:
> This what it look like… it transpiles the libX library (on linux and osx
> anyway), in order to bind to the X Window system.
darwin/macOS is supported by the purego project and on that target
Tcl/Tk uses Aqua, not XQuartz(X11) for the GUI.
On Mon, Oct 14, 2024 at 9:16 PM 'Brian Candler' via golang-nuts
wrote:
> Or it could be like https://pkg.go.dev/modernc.org/sqlite, which took the
> Sqlite C source code and transpiled it into pure Go.
It's both, depending on target. The targets supported by
ebitengine/purego[0] link dynamicall
On Thu, Oct 10, 2024 at 2:23 PM 'Timo Beckers' via golang-nuts
wrote:
> I've been searching around for some info or existing conversations around
> this topic, but that hasn't turned up anything useful so far. I had a
> question around some implicit behaviour of Go's heap allocator.
>From the
On Wed, Oct 2, 2024 at 3:07 PM Mandolyte wrote:
> What did I do wrong?
Copying the go.mod file effectively declares the code in hello.go to be in
package modernc.org/tk9.0.
That's the package hello.go imports, hence the import cycle. This works
here:
jnml@t3610:~/tmp$ mkdir tk
jnml@t3610:~/tmp$
On Sat, Sep 28, 2024 at 10:09 PM 'Brian Candler' via golang-nuts
wrote:
> Aside: on front page: "Viewing this on go.pkg.dev?"
>
> Actually I was viewing it on pkg.go.dev :-)
Thanks to D. Honnef on Slack for revealing to me the [invisible to me]
difference between go.pkg.dev and pkg.go.dev. Fix c
On Sat, Sep 28, 2024 at 10:09 PM 'Brian Candler' via golang-nuts
wrote:
> Aside: on front page: "Viewing this on go.pkg.dev?"
>
> Actually I was viewing it on pkg.go.dev :-)
The text in the picture tries to nudge you into expanding the
README.md section on go.pkg.dev, where it is collapsed by de
http://modernc.org/tk9.0
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https
On Mon, Sep 9, 2024 at 9:24 PM P Padil wrote:
> Can someone please explain to me why the following doesn’t work:
>
> slices.SortFunc(ilps, func(u, w *big.Int) int { return u.Cmp(w) })
>
> I get:
> slices.SortFunc(ilps, (func(u, w *big.Int) int literal)) (no value) used as
> value
Providing a co
On Sat, Aug 31, 2024 at 2:22 PM Mike Schinkel wrote:
> go fmt ./tools.go
'go fmt' is not gofmt. The OP talks about gofmt. I haven't tried
anything but you may try if using gofmt instead of 'go fmt' makes a
difference.
--
You received this message because you are subscribed to the Google Groups
On Thu, Aug 8, 2024 at 9:35 PM 'lijh8' via golang-nuts
wrote:
> I try to use slice of any to imitate the tuple type,
> and use this function to compare two slices: a, b.
>
> How can I improve it?
Take a look at https://pkg.go.dev/slices#Compare if it can fit your use case.
--
You received this
On Thu, Jul 18, 2024 at 4:24 PM Lammie Jonson wrote:
> goroutineRunning.Done()
Should be
defer goroutineRunning.Done()
(not tested)
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop rece
On Tue, Jul 16, 2024 at 3:57 PM Robert Engels wrote:
> Yes, I just added that tag and pushed it, but @latest wouldn’t pick it up for
> some reason, needed to specify the release exactly using @v0.3.1
@latest is the "latest" known to the proxy server. It has some varying
delay to update.
--
Yo
On Tue, Jul 16, 2024 at 3:50 PM Robert Engels wrote:
>
> Weird, even after I added the tag, using @latest did not pull the latest
> code, I needed to specify the tag specifically @v0.3.1
I think I see the exported identifiers you need in v0.3.1, published
2018: https://pkg.go.dev/github.com/rob
On Tue, Jul 16, 2024 at 3:41 PM 'Robert Engels' via golang-nuts
wrote:
> The go get works, and the code is there, but it isn’t seeing my code - it
> seems like it is using the original gocui which has since added module
> support.
>
> cmd/client/main.go:43:7: gui.Update undefined (type *gocui.G
On Mon, Jul 8, 2024 at 10:36 PM Robert Engels wrote:
> Is there anyway to do what I want?
The usual way is to factor out any parts that can skew the results
before the benchmark loop and call b.ResetTimer() just before entering
the 'for i := 0; i < b.N; i++ {' loop.
> If not, maybe a useful add
On Mon, Jul 8, 2024 at 10:08 PM 'Robert Engels' via golang-nuts
wrote:
> Given this code (which I know is not “correct”):
Setting b.N in the benchmark code has no specified behavior. The
actual behavior at the moment ignores such changes.
The algorithm used by the testing package adjusts b.N in
On Sat, Jul 6, 2024 at 5:21 PM Robert Engels wrote:
> That is not a data race. The wait group is a synchronization barrier.
Multiple concurrent, uncoordinated writers are a perfect data race.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
On Thu, Jun 20, 2024 at 1:26 PM 'Axel Wagner' via golang-nuts
wrote:
> (apologies for the abundance of grammatical and spelling errors that occurred
> during editing and of course only became visible after hitting "send")
(Send collapses the wave function ;-)
--
You received this message bec
On Thu, Jun 20, 2024 at 1:16 PM Oliver Eikemeier
wrote:
> • Pointer types are comparable. Two pointer values are equal if they point to
> the same variable or if both have value nil. Pointers to distinct zero-size
> variables may or may not be equal.
Compare to (made up) "NaNs always compare n
On Thu, Jun 20, 2024 at 12:28 PM Oliver Eikemeier
wrote:
> It mentions “pointers” (plural) to zero-sized variables, but for this
> behavior it is sufficient when only one pointer derives from a pointer to a
> zero-sized variable, as demonstrated in the example below.
The plural is there becaus
On Thu, May 30, 2024 at 10:34 AM Benoît Marguerie wrote:
> I discovered a "strange" behavior doing a simple operation.
> I defined 2 const : one integer and one string. With delve (or other
> debugger), I'm able to consult the const integer value but not the const
> string value. Delve team exp
On Sun, Apr 28, 2024, 03:03 J Liu <8859210...@gmail.com> wrote:
> My program is like this:
>
> type Girl struct {
> Name string
> Age int
> }
>
> type Person struct {
> girl *Girl
> job string
> }
>
>
> What should I do to Marshal 'Person'?
>
I think you need to export th
On Mon, Apr 22, 2024 at 11:23 AM Xiangrong Fang wrote:
> Is golang.org/x/text/message's *message.Printer safe to use in goroutines?
I don't know, but usually things are safe for concurrent use by
multiple goroutines only when explicitly documented as such.
--
You received this message because
On Mon, Mar 18, 2024 at 4:41 AM Daniel Lepage wrote:
> This change would be entirely backward-compatible ...
Let's consider, for example, the type uint8, aka byte. A variable of
type byte is specified* to occupy 8 bits of memory and has 256
possible values. To represent all those values and the
On Sun, Mar 3, 2024 at 10:25 PM Jeffery Carr wrote:
> Has this been deprecated or maybe it is broken in debian sid, but:
>
> bash$ GO111MODULE=off go get -v go.wit.com/apps/test
> go: modules disabled by GO111MODULE=off; see 'go help modules'
> basj$ go version
> go version go1.22.0 linux/amd64
>
On Mon, Mar 4, 2024 at 6:19 PM Jeremy French wrote:
> More, to prevent PrintMonth(14), which the function would have to check for
> and either return an error or panic, since there is no meaningful output. In
> fact, it's fairly easy to see, even in this case, where the PrintMonth
> signature
On Mon, Mar 4, 2024 at 4:19 PM Jeremy French wrote:
> It's checked at compile-time rather than run time.
That requires immutability of variables of enum type. Go does not
support immutable variables.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" gr
On Tue, Feb 27, 2024 at 6:20 AM tapi...@gmail.com wrote:
> From common sense, this is an obvious bug. But the spec is indeed not clear
> enough.
> It doesn't state whether or not comparisons of pointers to two distinct
> zero-size variables should be consistent in a run session.
> Though, from
On Thu, Feb 22, 2024 at 10:06 AM 'Carla Pfaff' via golang-nuts
wrote:
> This omission is notable considering "any" is among the most frequently used
> constraints in writing generic code.
Interesting to know, I'd naively guess the opposite. Can you please
share the source data set? Thank you.
On Tue, Feb 20, 2024 at 11:07 AM Peter Bočan wrote:
> Is there a way to debug this? Is there a way to step over the initialisation
> order?
I try to get help from '$ go mod graph' in similar investigations.
--
You received this message because you are subscribed to the Google Groups
"golang-
On Wed, Feb 14, 2024 at 12:14 PM 'Dan Kortschak' via golang-nuts
wrote:
> Given that this can happen without a race or unsafe modifications it
> might be worth filing a issue for.
I think this is expected. Quoting from the big.Int docs
https://pkg.go.dev/math/big#Int
To "copy" an Int value
On Fri, Jan 12, 2024 at 7:57 PM Rochus Keller wrote:
> Here is the full question with examples (though meanwhile closed as usual in
> recent times on stackoverflow, so answer here please):
> https://stackoverflow.com/questions/77802102/mutex-and-condition-variables-in-go-without-using-the-sync-
On Fri, Jan 12, 2024 at 12:34 PM 'Brian Candler' via golang-nuts
wrote:
> At worst, it may possible to compile C into Go. It sounds mad, but I believe
> SQLite has been ported to pure Go this way.
Challenge accepted: https://pkg.go.dev/modernc.org/libfreetype
--
You received this message beca
On Tue, Dec 26, 2023 at 9:12 AM Gergely Brautigam wrote:
> If you have a top level recover in you main, it doesn't matter where the
> panic happens, you'll capture it. Even in third party library.
Iff the panic occurs in the same goroutine where the defer is. Every
go statement starts a new gor
On Tue, Dec 19, 2023 at 9:37 PM Nathan Lacey wrote:
> I noticed that we have a circular dependency between golang.org/x/mod and
> golang.org/x/tools
>
> golang.org/x/mod zip/zip_test.go includes golang.org/x/tools
> I think we could get rid of the circular package dependency by changing that
On Mon, Dec 18, 2023 at 2:19 PM Brijesh Wawdhane
wrote:
> I added a go-import meta tag to my git server's website on the repo page
and it looks like
>
> https://brijesh.dev/kairos.git";>
>
> but when I try running "go get brijesh.dev/kairos" I get an error saying
'go: unrecognized import path "br
On Sun, Dec 10, 2023 at 8:34 PM Jason E. Aten wrote:
> I noticed that the binary log was not growing, and its update timestamp was
> not changing.
I think the file was still growing as intended. It was only no more
associated with the _new_ entry/name in the directory. I'm pointing it
out becau
On Sun, Dec 10, 2023 at 5:41 PM Jason E. Aten wrote:
> My question is: is there a way to have the Go process detect if the file it
> is writing to has been deleted by another process (git in this case) so that
> attempting to append to the file is no longer effective?
It is effective and [most
On Wed, Nov 15, 2023 at 9:59 PM Stephen Illingworth
wrote:
>
> That works better although not perfectly for my purposes. More work required
> from me.
>
> I'm curious though, about the -marm flag. How can I remove it from the
> GOGCCFLAGS variable? Or are we saying we can't use the aarch64 compi
On Wed, Nov 15, 2023 at 8:30 PM Stephen Illingworth <
stephen.illingwo...@gmail.com> wrote:
> I'm trying to build a project on the Raspberry Pi, natively.
>
> Using "go env" I can see that Go has the following value for GOGCCFLAGS
>
> GOGCCFLAGS='-fPIC -marm -Wl,--no-gc-sections -fmessage-length=0
On Wed, Nov 8, 2023 at 4:01 PM Stephen Illingworth
wrote:
> I would have expected the "main.A" string to require the same form. But
> either way, that's the correct solution.
It is the correct form. Package main cannot be imported and has a
special import path. Though I don't know where it is d
On Wed, Nov 8, 2023 at 1:35 PM Stephen Illingworth <
stephen.illingwo...@gmail.com> wrote:
>
> Hello,
>
> I'm trying to use the -X ldflag to set a string at compile time. I can do
this successfully if the string is in the main package but it does not work
if the string is in a subpackage.
>
> For i
On Wed, Oct 11, 2023 at 8:11 PM Torsten Bronger
wrote:
> Then, all boils down to the fact that you can’t pass []float64 as an
> []any. To be honest, I still don’t fully understand why this is
> forbidden, so I just accept that the language does not allow it.
It's the same reason why one cannot
On Mon, Oct 9, 2023 at 6:02 PM Peter Riemenschneider wrote:
Just '$ go build' as usual, but one must declare the asm function:
https://go.dev/play/p/KySqFvCVz_T
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and
On Mon, Oct 9, 2023 at 3:46 PM Dean Schulze wrote:
> If the docs are correct, how do you append to nil?
https://go.dev/play/p/WY0Bycj-_Tn
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails
On Mon, Sep 25, 2023 at 1:57 PM Andrew Pillar wrote:
A nice discussion of slices can be found for example here:
https://research.swtch.com/godata
tl;dr: Yes, slices are passed by value (everything in Go is passed by
value), but a slice does not contain the backing array, only a pointer
to it.
-
On Fri, Sep 15, 2023 at 10:31 AM 'Jim Idle' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> The go.mod at the root was one thing that might work, but it will cause
the entire repo to be pulled in so the tag will still have to be sec/go/
etc.
tl;dr: Putting a go.mod in the repository root
On Wed, Sep 13, 2023 at 12:25 PM John Souvestre wrote:
> I did try that also. I get this error message:
>
> CreateFile *.go: The filename, directory name, or volume label syntax
is incorrect.
Sorry, I'm not familiar with Windows and only TIL cmd.exe does not expand
globs. I suggest to instal
On Wed, Sep 13, 2023 at 5:47 AM 'John Souvestre' via golang-nuts
wrote:
> I’m trying to run gofmt on all of the .go files in a directory, but not any
> subdirectories.
$ gofmt *.go
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscrib
On Fri, Sep 8, 2023 at 9:24 AM 'Mark' via golang-nuts
wrote:
> Is there a compile-time solution for this that I've missed?
No. Go does not have enum types.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
On Sat, Aug 26, 2023 at 2:33 PM Jason E. Aten wrote:
>
> Is there any IDE that allows you to jump through a stack trace like emacs
> does?
I think many code editors can do that, for example vim:
https://vim.fandom.com/wiki/Open_file_under_cursor
--
You received this message because you are sub
On Sat, Aug 19, 2023 at 10:06 PM Christian Stewart
wrote:
> Autocomplete and a go language server (gopls) add a ton of speed because you
> don't need to look up the docs for function and variable names. And go to
> definition improves speed navigating code significantly.
- Using autocomplete a
On Sat, Aug 19, 2023 at 9:42 PM Robert Engels wrote:
> I guarantee that two developers of equal competence - the one with a powerful
> IDE will outperform the other using a text editor with syntax highlighting
> (but come on that is a crutch a real developer doesn’t need) by 2-10x
> depending
On Sat, Aug 19, 2023 at 11:27 AM alex-coder wrote:
> Gophers, may be there is another place where I should look for IDE for GO ?
Unix is my IDE and vim is its prophet.
IME IDEs make programmers write low quality code while enjoying the
illusion of being "more productive".
--
You received this
On Wed, Aug 9, 2023, 09:12 Marcello H wrote:
> https://go.dev/dl/go1.21.0.windows-arm64.zip
>
> It is found when you click on "Other Ports"
Thanks. I may have a false memory of always finding the windows/arm64 port
beside the windows/amd64 one in the same section.
-j
--
You received this mes
On Tue, Aug 8, 2023 at 5:24 PM wrote:
> We have just released Go 1.21.0.
>
> To find out what has changed in Go 1.21, read the release notes:
> https://go.dev/doc/go1.21
>
> You can download binary and source distributions from our download page:
> https://go.dev/dl/#go1.21.0
It looks like the d
On Fri, Aug 4, 2023 at 1:22 PM Brian Candler wrote:
> Also there's a project which compiles C code to Go - ISTR it was used to
> build a pure Go version of Sqlite. Presumably the same approach could be
> applied to an image processing library.
>
> https://twitter.com/bradfitz/status/8552718671
On Tue, Aug 1, 2023 at 1:47 AM DrGo wrote:
> The verbosity of error handling is the number one concern for Go developers
> in the most recent survey.
That says something about those developers, about their preferences,
opinions, taste etc and that it differs from what the Original
Language Desi
On Wed, Jul 26, 2023 at 9:44 AM sumith s wrote:
> Currently, we do not have pure Test Classes defined by us. We are using
> Golang specific Test Class structure. Each FILENAME_test.go will have its own
> test class under "Golang Test".
> I'm trying to define a pure Test Classes. how can do tha
On Wed, Jul 26, 2023 at 12:32 AM Bravo Moua wrote:
> For a fact, bytes, fmt, and packages in those category are from Satoshi
> Nakamoto and myself.
Extraordinary claims require extraordinary evidence.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts"
On Mon, Jul 24, 2023 at 9:26 AM David N wrote:
> Yup, this makes sense and should work, but I'm still surprised this can't be
> entirely done in Golang.
Who says it's not possible? I'm not aware of a reason why the required
parts cannot be implemented in pure Go (+ syscalls + right permission
b
On Mon, Jul 24, 2023 at 9:14 AM David N wrote:
On Linux you may try fiddling with iptables, limitations apply:
https://stackoverflow.com/questions/44464617/stop-accepting-new-tcp-connections-without-dropping-any-existing-ones/44509993#44509993
--
You received this message because you are subscr
On Tue, Jul 18, 2023 at 4:35 PM Jochen Voss wrote:
> Is there a better way?
I have never been here and please don't do this:
https://go.dev/play/p/x4QYJubXMnQ
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and s
On Sun, Jul 16, 2023 at 6:02 PM Leonard Mittmann
wrote:
> Hi everyone, I am wondering if there is efficient way to do the following
> type conversion (without looping over the map):
>
> var m = map[uint]uint{ /*...*/ }
> type uintXXX uint
> // this does not work
> var m2 map[uintXXX]uintXXX = (m
On Tue, Jul 4, 2023 at 5:38 PM Gurunandan Bhat wrote:
> Every example of http Handler that I have seen so far looks like this:
>
> func handleSomeRequest(w http.ResponseWriter, r *http.Request) {
>
> // do something that returns an error
> if err != nil {
> http.Error(w, "Somethin
On Fri, Jun 23, 2023 at 10:38 AM christoph...@gmail.com
wrote:
>
> Here is the minimal example code causing delve 1.20.2 to crash with a stack
> overflow
>
> func TestExample(t *testing.T) {
> type pptr *pptr
> var p pptr
> p = &p
> t.Error("hello")
> }
>
> Here is the stack trac
On Fri, Jun 23, 2023 at 10:18 AM Axel Wagner
wrote:
> Just for context, as not everyone seems to be aware: I was, in that sentence
> you quoted, referring to examples like this
> https://www.reddit.com/r/ModCoord/comments/14eq8ip/the_entire_rmildlyinteresting_mod_team_has_just/
> This demonstrat
On Fri, Jun 23, 2023 at 7:01 AM 'Axel Wagner' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> And even *when* they ask and get overwhelming backing from their
communities, ...
Latest poll results on r/golang as of now:
[image: image.png]
https://www.google.com/search?q=define+overwhelm
On Thu, Jun 22, 2023 at 12:16 PM christoph...@gmail.com
wrote:
>
> I'm trying to get the uintptr address of a value p for which I have the
> reflect.Value so that I can compare it with the value obtained with
> v.Pointer() when p is a pointer.
>
> Here is a simple recursive pointer example code
On Wed, Jun 21, 2023 at 8:33 PM Dzmitry Lahoda wrote:
>
> rust just got shebang and cargo in one file. i was hoping using go as good
> fit for some cases. but seem it will be rust. we are go, bash, nix, rust
> coders. sure there is some js in our repo. but i hate it. i like to so script
> which
On Thu, Jun 15, 2023 at 10:16 AM christoph...@gmail.com
wrote:
> It is possible to define two structures globally with mutual type dependency
> as this:
>
> type A struct {
> B []B
> }
>
> type B struct {
> A A[]
> }
>
> but I just noticed that we can't do that inside a function:
>
> fun
On Sun, Jun 11, 2023 at 7:40 PM alex-coder wrote:
> Could you please advise me the simple hosting to deploy && run a small exe
> assembled from go.
I'm using https://www.hetzner.com/cloud?country=us and Google Cloud
free tier. The later natively supports deployment of Go programs.
--
You re
On Fri, May 5, 2023 at 4:21 PM envee wrote:
>
> Thanks Jan.
> My interface speed is 20 Gb/s
> The payload size is about 2.8Kb.
> So at 9000 Txn/s this works out to 9000 x 3 ≅27MB/s ≅ 200 Mb/s (This matches
> the so (socket out) value shown in my atop command output)
> I guess the interface speed
On Fri, May 5, 2023 at 2:45 PM envee wrote:
> Still, I don't understand why I cannot achieve higher throughput than 9000
> per second.
What is the max bitrate of the network interface used in the
measurement and what is the size of the payload that has to get
through for every connection?
--
On Sun, Apr 23, 2023 at 10:28 AM Amnon wrote:
> Yes GOPATH and GOROOT have been deprecated.
Both are alive and well. They are essential for the build system/go
command to work as required.
tl;dr: There's a default value of GOPATH so one does not have to set
it. A much longer version can be obta
On Sun, Apr 16, 2023 at 12:51 PM Andreas Götz
wrote:
> Isn't gofmt ist part of the go command? Go ist the latest version:
It is but it's a separate binary/executable file. Go version is one thing,
the version of the binary file that is actually executed when '$ gofmt' is
invoked is another thing
On Sun, Apr 16, 2023 at 12:17 PM Andreas Götz wrote:
>
> Good morning. Please excuse me for asking here- I'm stuck with something that
> looks like a gofmt bug though that seems very unlikely.
>
> In CI
> (https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485)
> I'm us
Resending to the mailing list as that was my intention but I errored
again. Did the gmail UI changed again?
-- Forwarded message -
From: Jan Mercl <0xj...@gmail.com>
Date: Tue, Apr 11, 2023 at 9:11 AM
Subject: Re: [go-nuts] Redfining loop variable semantics - what's t
The only broken thing in the code below is the TestHello function.
rsc.io/quote uses rsc.io/sampler where the Hello func
(https://pkg.go.dev/rsc.io/sampler#Hello) is documented to return a
localized string by default. Localized, in the sense of respecting the
user's locale. That is not compatible w
On Wed, Mar 15, 2023 at 11:03 AM Frank Jüdes wrote:
>
> Well, that didn't go very far: https://go.dev/play/p/UtsrRar9J0Q
> Fails with the messages
> ./prog.go:15:11: invalid operation: cannot index p_Map (variable of type MAP
> constrained by DataMap)
> ./prog.go:16:26: cannot range over p_Map (v
The subject target is not distributed by the Go team. Attempting to build
if from sources in a qemu 4GB VM [OpenBSD 7.2 (GENERIC.MP) #404: Tue Sep 27
12:54:46 MDT 2022] via
$ GOROOT_BOOTSTRAP=~/go1.19 nohup ./make.bash
produces
Building Go toolchain1 using /home/jnml/go1.19.
On Thu, Feb 16, 2023 at 8:22 AM Jan wrote:
> Any thoughts ?
A minimal, self-contained and runnable reproducer would be rather
useful in this case.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receivin
A user filled https://gitlab.com/cznic/sqlite/-/issues/132, but I'm not
able to reproduce it on RPi 4 and I don't have access to the subj.
chip/system. It might be possibly something HW related, IDK. Looking for
expert advice for the linux/arm Go target. Anyone out there?
Thanks in advance.
-j
-
On Sun, Feb 5, 2023 at 5:12 PM cpu...@gmail.com wrote:
> Would that still busy-loop? Are there better patterns?
for range q.data {}
iff the sending side properly closes the channel.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To u
On Tue, Dec 20, 2022 at 9:21 AM Jason E. Aten wrote:
> Shutting down goroutines quickly was needed so often that I wrote a package
> to help me with it. it is called idem, short for idempotent.
>
> It uses the idea of an idempotent Close of a channel to signal that the
> goroutine should stop.
On Mon, Dec 19, 2022 at 11:01 AM Torsten Bronger
wrote:
> The context documentation gives this example:
>
> // Stream generates values with DoSomething and sends them to out
> // until DoSomething returns an error or ctx.Done is closed.
> func Stream(ctx context.Context, out chan<- Va
On Mon, Nov 28, 2022 at 1:44 PM Wojciech Muła wrote:
> Is there any tool that would point out places with
> an assignment to the blank identifier?
>
> I'd like to spot possible refactoring/debug leftovers,
> like `_ := func() {}` or unused imports.
>
> I went through the staticcheck list of check
ented language?
To: Jan Mercl <0xj...@gmail.com>
I apologize for this automatic reply to your email.
To control spam, I now allow incoming messages only from senders I
have approved beforehand.
If you would like to be added to my list of approved senders, please
fill out the short reques
On Tue, Nov 22, 2022 at 4:43 PM Robert Engels wrote:
> Go is not listed as an OO language on Wikipedia.
Check https://en.wikipedia.org/wiki/Go_(programming_language):
"ParadigmMulti-paradigm: concurrent imperative, object-oriented[1][2]"
> Personally I think it is OO-like. OO typically has inhe
On Mon, Nov 21, 2022 at 9:57 AM Nikhilesh Susarla
wrote:
> I have an int64 value say 12
> I want to convert that to []byte array.
Such conversion is not supported. Also, []byte is a slice.
However, the desired result can be computed in code. You can use the
encoding/binary package for that. End
On Fri, Nov 18, 2022 at 7:15 PM Brian Candler wrote:
> This used to work:
> https://play.golang.org/p/YQoAu1Iwkor
>
> But now when I click on "Run", the import path of "example.com/myprog/foo" is
> removed, and it fails to compile.
>
> Any clues as to what's going on?
I think the playground use
On Tue, Nov 8, 2022 at 10:56 AM 'Mark' via golang-nuts
wrote:
> // Want to sort by T < T //
> elements := make([]string, 0, len(me))
> for element := range me {
> elements = append(elements, fmt.Sprintf("%#v", element))
> }
> sort.Strings(elements)
>
On Tue, Nov 8, 2022 at 9:53 AM 'Mark' via golang-nuts
wrote:
> Given a function:
>
> func F[T comparable](a T) {
> }
>
> is it possible to check T's type inside F?
>
> My use case is that I have a function with signature G[T comparable](x []T)
> and inside G I want to sort the elements in slice
On Sun, Nov 6, 2022 at 12:54 PM Kn (Kn) wrote:
> Now the problem begins. I expect the ballast like `ballast := make([]byte,
> 1<<30)` shouldn't take up any physical memory because there's no any writing
> to it.
The backing array is specified to be zeroed, so we cannot say there's
no writing t
On Fri, Nov 4, 2022 at 6:54 PM Canuto wrote:
> I'm just starting out with go ...
> I have searched for lights on this string but without success.
> What does this sign mean " _, err " , what the underscore symbol means here ?
>
> func generateSalt() string {
> randomBytes := make([]byte, 16)
>
On Thu, Nov 3, 2022 at 12:49 PM Hotei wrote:
> I added some generic code to a project and godoc doesn't seem to like that
> and stops working when it sees the generics. It's a 4 year old version of
> godoc so that's perhaps not a surprise. What is a surprise is that godoc
> isn't shipped wit
:
Date: Wed, Nov 2, 2022 at 6:10 PM
Subject: Re: Re: [go-nuts] There is a passage in book that is difficult to understand, can anyone help
explain it?
To: Jan Mercl <0xj...@gmail.com>
I apologize for this automatic reply to your email.
To control spam, I now allow incoming messages only from s
1 - 100 of 1232 matches
Mail list logo