On Fri, Jun 4, 2021 at 3:02 PM christoph...@gmail.com
wrote:
> > That is true in current implementations, but Go, the language, does not
> > guarantee that pointers will never move.
>
> That is what I thought, but it is allowed to use a pointer far map keys. And
> I have seen some
On Fri, May 28, 2021 at 12:32 PM NieomylnieJa wrote:
> But the docs state something different:
>
> // ParseInLocation is like Parse but differs in two important ways.
> // First, in the absence of time zone information, Parse interprets a time as
> UTC;
> // ParseInLocation interprets the time
On Tue, Jun 1, 2021 at 4:40 PM tapi...@gmail.com wrote:
> The following is a tip to get an array pointer but avoid the array escaping.
I don't think so. The pointer to the local array 't', stored in 'y'
never leaves the function, so there's no need for 't' to escape. See
the previous post.
>
>
On Tue, Jun 1, 2021 at 3:52 PM tapi...@gmail.com wrote:
By default, any local variable that has its address taken and that
address can outlive the function execution forces the variable to
escape, quite naturally as the stack frame with the variable is
destroyed upon returning from the function.
On Thu, Jul 8, 2021 at 2:30 PM christoph...@gmail.com
wrote:
> I need to write a binary encoder/decoder very similar to the std JSON
> encoder/decoder.
> I would like to reuse 80% of the JSON encoder/decoder code and adapt it to
> support my binary encoding.
>
> Is this allowed and at which
On Thu, Jul 1, 2021 at 2:34 PM tapi...@gmail.com wrote:
> It is not rare a function will use 10M+ stack.
What's the source of this claim? If it's not rare, it should be easy
to find an example in the stdlib, I guess. Do you know of one?
Note that stacks of such size, if common in the wild,
On Sun, Jun 27, 2021 at 5:25 PM Victor Giordano wrote:
> If you see here you will find a definition for a function.
This defines type `HandlerFunc`:
https://github.com/golang/go/blob/37f9a8f69d6299783eac8848d87e27eb563500ac/src/net/http/server.go#L2042
> Then if you look here you will find
On Sun, Jul 4, 2021 at 1:16 PM alex-coder wrote:
> But what do you use instead then ?
For what?
In case it's not obvious, I never touched UML and I don't really
understand its utility. So I'm asking an honest question. Knowing the
answer might help to possibly provide some answer to your
On Sat, Apr 24, 2021 at 2:42 PM xie cui wrote:
> func f(a, b int) int {
> a &^= b
> return a
> }
> what is this op (&^=) means?
There is a wonderful source of answers to such questions here:
https://golang.org/ref/spec
--
You received this message because you are subscribed to the
On Thu, Apr 29, 2021 at 2:26 PM Øyvind Teig wrote:
> Your suggestion would in fact do pri select in the special case 1. below:
>
> Poll highPri first (take it if it's ready), if highPri not ready then take
> lowPri (provided highPri has not become ready since the first poll)
> However, if
On Thu, Apr 29, 2021 at 3:23 PM Øyvind Teig wrote:
> 4c is not "correct" as I want it. In the pri select case, if more than one is
> ready, then they shall not be randomly chosen. Never. They should be selected
> according to priority.
That's not what 4c says. Instead of "more than one ready"
On Thu, Apr 29, 2021 at 3:54 PM Øyvind Teig wrote:
> Even if that probability is low, it would need knowledge like yours to show
> that this may in fact be zero. There could be a descheduling in between, one
> of those in my opinion, not relevant arguments.
The upper limit of 4c happening is
On Fri, Apr 30, 2021 at 7:51 PM 'Valentin Deleplace' via golang-nuts
wrote:
> func f() string {
> s := "a" + "b"
> return s
> }
Handled by constant folding.
> func g() string {
> s := "a"
> s += "b"
> return s
> }
The second assignment to 's' here is
On Thu, Apr 22, 2021 at 1:15 PM Mikhail Mazurskiy
wrote:
> I stumbled upon this strange looking piece of code [1]. I thought it
> dereferences the pointer, creating a copy of the mutex, and then calls
> RLock() on the copy (i.e. a nop). But it does not work this way. I
> experimented with it
On Thu, Apr 29, 2021 at 10:52 AM Øyvind Teig wrote:
> I know from some years ago that go did not have any priority or ordered
> select construct [1].
Not sure what does "ordered" wrt select mean, but the default clause
of the select statement provides exactly that - a priority mechanism:
first
On Thu, Apr 29, 2021 at 11:24 AM Øyvind Teig wrote:
> This is not solved with a default clause, which transforms the selective
> choice waiting for some event to happen into busy polling. It's nice yo have
> some times, but that is something orthogonal to pri/ordered.
Not sure if I would call
On Sat, Apr 24, 2021 at 10:37 PM Shivendra Singh
wrote:
> ..., now in the init() method it parses flag to read variables such as env
> and app name that is required to load the appropriate config.
IINM, calling flag.Parse anywhere else than in main() or TestMain() is
not really compatible with
On Mon, May 3, 2021 at 6:44 PM Delta Echo wrote:
> Hi, Is there any document that explains how recursive type definitions like
>
> type stateFn func(*Scanner) stateFn
>
> are handled in Go?
Not sure what "handle" means in this case. The language specs do not
mention recursive types, so what
On Mon, Feb 8, 2021 at 3:03 PM Johan Martinsson
wrote:
> Am I missing some option here?
It's additionally possible to use a test flag like -mayfail and call
flag.Parse() in TestMain().
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
https://www.geospatialworld.net/blogs/goodbye-michael-jones-the-man-who-gave-the-power-of-maps-in-our-hands/
--
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
On Fri, Feb 5, 2021 at 3:46 PM Fernando Meyer wrote:
> I understand the pragmatism behind having or not features in the language and
> its standard library. But, almost all the golang projects I've worked with
> implement their own utility function to remove elements from a slice,
> sometimes
On Sun, Jan 31, 2021 at 5:24 PM Amnon wrote:
> https://play.golang.org/p/jnRn4Bv98xS
>
> See the example on the Go Playground.
>
> Jan, someone can explain to me why it will no longer compile?
That's not an example of what I wrote: "Changing it to an unnamed one
will cause the program to no
On Sun, Jan 31, 2021 at 6:01 PM Amnon wrote:
> If you take the
> https://play.golang.org/p/L8z2Q_F_fi3
>
> and change the line 18
> from
> func foo() (err error) {
>
> to
> func foo() error {
>
> The code will continue to compile.
That's again the case of "making the return variable unnamed and
On Thu, Apr 1, 2021 at 11:52 PM Dmitri Shuralyov
wrote:
> We have just released Go versions 1.16.3 and 1.15.11, minor point
releases.
Cleared everything ($ go clean -cache -modcache -testcache ; rm -rf ~/pkg
~/.cache/go-build) and upgraded from 1.15.10 to 1.16.3. Now I am seeing
while hacking
On Mon, Apr 5, 2021 at 5:17 PM peterGo wrote:
> Held: Google’s copying of the Java SE API, which included only those lines of
> code that were needed to allow programmers to put their accrued talents to
> work in a new and transformative program, was a fair use of that material as
> a matter
On Fri, Apr 2, 2021 at 4:40 PM Michael Pratt wrote:
> mgcsweepbuf.go was deleted in 1.16, so it seems you still have files from
> 1.15 sitting around in /usr/local/go/.
I would swear I've deleted those files, but doing all the steps once
again from scratch proves you are right and I can no
On Wed, Mar 24, 2021 at 11:25 PM Matt Mueller wrote:
> I noticed a lonely BUG comment without an explanation in the flag package:
> https://github.com/golang/go/blob/master/src/flag/flag.go#L955
Looking at the code it seems to me that the comment is saying the
_client_ code has a bug in that
On Thu, Mar 11, 2021 at 6:12 PM WX Lai <0xbill...@gmail.com> wrote:
> The code: https://repl.it/talk/share/The-assignment-disappeared/127774
>
> The assignment of the global variable `isRunning` in function `fg1` does not
> work at all.
> In fact, the assignment is deleted in the assembly (see
On Sat, Mar 13, 2021 at 3:53 PM Axel Wagner
wrote:
> We have different interpretations of "ignore". To me, "ignore" means "be
> unaware of or pretend they don't exist".
> You seem to use it as "disagree about their validity or the weight they are
> given in the decision". That seems
On Sat, Mar 13, 2021 at 4:43 PM 'Axel Wagner' via golang-nuts
wrote:
>
> I don't think it is useful to quibble over the definition of "ignore". When I
> said it is demonstrably false that arguments have been ignored, I was
> assuming what I perceive to be the common definition: "refuse to take
On Sat, Mar 13, 2021 at 3:35 PM arthurwil...@gmail.com
wrote:
> I just want to remove one thing go getted, not the entire cache.
For new features one can fill a proposal. If accepted, a follow-up
with the implementation CL is very nice
--
You received this message because you are subscribed
On Sat, Mar 13, 2021 at 3:31 PM 'Axel Wagner' via golang-nuts
wrote:
> I want to re-iterate: The discussion of whether or not generics will be added
> to Go has been going on for more than a decade. All arguments from all sides
> have gotten fair consideration. A decision was reached.
>
> You
On Sat, Mar 13, 2021 at 4:18 PM Bruno Albuquerque wrote:
> FWIIW, I also agree that "ignore" makes no sense here. You might listen and
> think about several opinions/options and conclude that one of them is the
> best one. This does not mean you ignored all the others.
You do not ignore the
On Sat, Mar 13, 2021 at 4:57 PM arthurwil...@gmail.com
wrote:
> OK I'll try and figure out how to do that. What is a CL?
Change List. A patch against the repository that implements a feature,
fixes a bug etc.
--
You received this message because you are subscribed to the Google Groups
On Sat, Mar 13, 2021 at 1:44 PM Martin Schnabel wrote:
> as far as i know there is no reason that anybody has to write code with
> generics when they are available. therefor i really don't understand the
> negative mails to this list.
That nonchalantly ignores that code is way more often read
On Fri, Mar 12, 2021 at 1:24 AM Kevin Chadwick wrote:
> Why doesn't go auto init or make an empty map for a named return to avoid the
> potential chance of a panic due to operating on a nil return?
A non-zero value map value must be allocated. All well-known Go
compilers allocate maps in heap.
On Sat, Mar 13, 2021 at 5:52 PM Kevin Chadwick wrote:
> Very little resources, unless the map is actually used and not for long. If
> you really need to control gos memory use, you need to preallocate arrays in
> a long standing manner anyway, not for maps though, as you can't delete
>
On Sun, Mar 14, 2021 at 12:57 PM Elias Naur wrote:
> > Eg. if you really need to hook at battle-tested C code that needs no
> > further maintenance, you may try https://github.com/minio/c2goasm
> > It lets you bootstrap fast, then you may aim at a proper rewrite.
> >
>
> A rewrite is one
On Tue, Mar 16, 2021 at 7:06 AM Sharan Guhan wrote:
> Seems a trivial problem, but unable to find the right imports to do this..
> Want to search for a substring in a huge string ( output of a exec.command)
> and get the index for every occurrence of that substring. I used Index and
>
On Mon, Mar 15, 2021 at 11:03 PM Ian Lance Taylor wrote:
> The formal proposal (https://golang.org/issue/43651) got 1784 thumbs
> up and 123 thumbs down (and ten "confused"). Yes, there were critics.
> But I think it is fair to say that the proposal has far more
> supporters than critics.
I
On Mon, Mar 15, 2021 at 1:49 PM cpu...@gmail.com wrote:
> type WrappedToken Token
Note that this is not a type alias. WrappedToken is a new type. Even
if its underlying type is Token, WrappedToken does not automatically
have any methods of Token.
> Only to find out, that unmarshaling a
On Mon, Mar 15, 2021 at 3:03 AM Barisere Jonathan
wrote:
> I think this mistake can be caught by code analysis tools, but I don't know
> of any that catches these.
IMO the problem is that while sometimes it's a mistake, in some other
cases it is not and it is perfectly good, reasonable code.
On Tue, Mar 16, 2021 at 1:10 PM 'Axel Wagner' via golang-nuts
wrote:
> On Tue, Mar 16, 2021 at 1:05 PM Robert Engels wrote:
>>
>> Failure to provide a standard “collections” package would be a huge mistake.
>> It is certainly a top 3 reason for the success of Java.
It would be probably a huge
On Tue, Mar 16, 2021 at 4:53 PM jake...@gmail.com wrote:
> It seems like a real oversight that there is no search on the official go
> documentation though. It seems like it would be really helpful, especially to
> beginners. I would love to hear from someone involved why the go team decided
On Thu, Mar 18, 2021 at 4:51 PM Brian Candler wrote:
> OK. I'll just point out that if the repo contains a set of related packages,
> then normally you'd only put a go.mod at the top level.
I think the OP never mentioned a repository but "world". I infer that
means all the repositories the OP
On Wed, Mar 17, 2021 at 10:57 AM mortdeus wrote:
I'm probably giving up any hopes to work for Google in the future by
writing this: +1. I find the banner deeply offensive, divisive and
excluding for people with dissenting views, regardless of the
omnipresent inclusiveness narrative. I cannot
On Wed, Mar 17, 2021 at 4:59 PM jake...@gmail.com wrote:
>
> On Tuesday, March 16, 2021 at 11:59:31 AM UTC-4 Jan Mercl wrote:
>>
>> Entering `rename site:golang.org/pkg` in Chrome seems to work well, for
>> example.
>>
>> (But I'm not using this kind of
On Fri, Mar 19, 2021 at 1:47 PM xie cui wrote:
> https://github.com/golang/go/blob/master/src/cmd/compile/internal/types2/universe.go#L58-L64
> there are some basic type call untyped xxx? what is it mean?
Untyped bool, int, etc are the types of untyped constants:
On Fri, Mar 19, 2021 at 4:36 AM Paul Zhang wrote:
Please do not post colorized code to the ML. Particularly with
inverted colors. Please use plain black on white text, thank you.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe
On Wed, Mar 17, 2021 at 9:18 PM tapi...@gmail.com wrote:
> Now, to modify a map element, especially the element type is not a basic
> type, two hashes are needed to compute.
https://github.com/golang/go/issues/5147
--
You received this message because you are subscribed to the Google Groups
On Wed, Mar 17, 2021 at 7:38 PM Glen Newton wrote:
>
> zip archives contain files and directories. Often, some of the files
> contained in zip archives are also archives, zip and tar(.gz|bz2). Sometimes,
> these contained archives also contain such archives (and so on...).
>
> Reading a zip
On Sat, Feb 27, 2021 at 10:37 PM Bob Alexander wrote:
> Try removing all the space from your post and see how understandable it is,
> or remove all indentation from a Go program, etc. (Hmm, that would make
> formatters a lot easier to write... )
Removing all spaces makes most languages
On Sun, Feb 28, 2021 at 6:32 AM Marcin Romaszewicz wrote:
> - if s is a string, s[0] is a rune
If s is a non-empty string, s[0] is a byte.
> - if r is a rune, string(r) is a 1 character string
If r is a rune, string(r) is a string of 1 or more bytes.
--
You received this message because you
On Sun, Feb 28, 2021 at 9:05 AM 'Dan Kortschak' via golang-nuts
wrote:
> I'm curious where the meaningful whitespace is in Go (for amounts
> differences in number greater than 1).
I meant, for example, in regexp notation, ` *` vs `\n *` between a
function signature and the opening brace of the
On Mon, Apr 12, 2021 at 6:01 PM Luke Wilson wrote:
> I've heard several times from members of the community (on Matrix and
> possibly on answers) that a simple iteration like
>
> const mixed = "\b5Ὂg̀9! ℃ᾭG"
> for _, c := range mixed {
> ... do something with c (but not write to it)
>
> will
On Tue, Apr 13, 2021 at 11:40 AM Tenjin wrote:
> So I am using WSL2 to develop using golang but for some reason I am unable to
> use other peoples packages.
> For example: I am wanting to use the sql driver
> https://github.com/go-sql-driver/mysql I am able to go get it and it says it
> is
On Wed, Apr 14, 2021 at 1:51 PM Steve Mynott wrote:
> I'm aware tools exist to parse go and a quick google search search
> fails me but I was wondering if there was a utility which was a
> go-aware diff which I could use like "git diff master" which printed
> out a list of funcs changed?
Would
On Thu, Apr 8, 2021 at 5:18 PM tapi...@gmail.com
wrote:
> It looks such info is not recorded in GOPATH/pkg/mod.
Do you mean the import path to repository URL mapping?
jnml@e5-1650:~/tmp$ wget modernc.org/sqlite && grep go- sqlite
--2021-04-08 17:23:49-- http://modernc.org/sqlite
Resolving
On Tue, Feb 16, 2021 at 9:30 PM Santhosh T wrote:
> in Java, this is not case.
That compares decimal vs floating point representations. Those have
very different properties, for different usage patterns.
--
You received this message because you are subscribed to the Google Groups
On Tue, Feb 16, 2021 at 10:52 PM ben...@gmail.com wrote:
> Jan, is there any write-up about modernc.org/sqlite? I've dabbled in
> automated conversion, and I'm very curious if there's more information about
> how it works, any pitfalls / unsupported stuff, etc, but having trouble
> finding
On Sat, Feb 6, 2021 at 5:36 PM Sean wrote:
> I think there is definitely a need for a built-in "remove" function for
> arrays and slice.
> Everyone is writing their own implementation for this, it is both confusing
> and "x = append(a[:x], b[x:])" like blablabla is not readable.
Please define
On Sat, Feb 6, 2021 at 8:01 PM Axel Wagner
wrote:
> FTR, I think even a library function that is defined as "the equivalent of
> `append(a[:i], a[j:]...)`" (for example) would provide value.
Yes, but IMO a net negative value. Many people will then mindlessly
just use this O(n) variant even
On Fri, Feb 19, 2021 at 3:46 PM Neehar Vijay wrote:
> Is this intentional? Does gofmt assume tab width of 4 or 8?
No.
Does this look better? https://play.golang.org/p/0NnZmegKVAu
Ie. just add a line break between the return values. Gofmt will keep
yout choice.
--
You received this message
On Sun, Aug 22, 2021 at 7:50 PM Serge Hulne wrote:
> Is there a preview Golang version I can download to try out generics ?
Use this doc: https://golang.org/doc/install/source
And follow this optional step: https://golang.org/doc/install/source#head
Not tested.
--
You received this message
On Sun, Aug 29, 2021 at 9:02 PM 'nadashin' via golang-nuts
wrote:
> fmt.Printf has a format specifier, %q that escapes string with Go
> syntax and add quotes around the string. ( %#v also does it)
>
> But it doesn't have one that unescapes a string.
>
> I couldn't find any stdlib function that
On Thu, Aug 19, 2021 at 4:43 PM Денис Мухортов
wrote:
> I just started practicing with channels, after writing to the channel,
> nothing is output from there
> func main() {
> d := make(chan int)
> go factorial(5, d)
> time.Sleep(3 * time.Second)
> }
>
> func factorial(n int, d
On Tue, Sep 7, 2021 at 4:40 AM 'nadashin' via golang-nuts
wrote:
> Why is the function in Go compiler that interprets escape sequences not
> available in Go's standard library?
FTR: This seems to be an unfortunate way of continuing the thread at
On Tue, Sep 7, 2021 at 2:29 PM 'nadashin' via golang-nuts
wrote:
> > It does. See https://pkg.go.dev/strconv#Unquote. Try this hastily thrown
> > together example:
> >
> > package main
> >
> > import (
> > "fmt"
> > "strconv"
> > )
> >
> > func main() {
> > e :=
On Tue, Sep 7, 2021 at 12:40 PM Kamil Ziemian wrote:
> In the post "Concurrency is not parallelism" by Andrew Gerrand
> (https://go.dev/blog/waza-talk) under the paragraph starting with "To clear
> up this conflation, Rob Pike gave a talk at Heroku’s Waza" in my browser is
> big blank space.
modernc.org/ccgo/v3 compiles test C source files into Go source file and
executes the result to check if it compiles and performs correctly. To
avoid incorrectly transpilled programs to hang the test, the resulting Go
code is executed like this:
out, err := func() ([]byte, error) {
On Tue, Oct 12, 2021 at 4:35 PM Brian Candler wrote:
> I think that's it. New version of main.go:
> https://play.golang.org/p/KpvwsJtwHyQ
>
> It stops after 1 second in each case.
Wonderful! Thank you very much. I hope to have permission to use your
code, do I? I suggest sending a PR that adds
On Tue, Oct 12, 2021 at 4:56 PM Brian Candler wrote:
> You're more than welcome to use it - it's nothing more than a snippet that
> reimplements one line of cmd.Start.
>
> Actually, checking that source code: at your side you should call
> exec.Command not exec.CommandContext. That is:
>
>
On Wed, Oct 6, 2021 at 5:43 PM Renat Idrisov wrote:
> Total allocations of golang program are about 42MB, but go runtime takes 8GB
> for in OS thread stacks.
> What am I doing wrong?
If you're on 64 bit Linux, chances are the default OS thread stack
size is 8 MB. In that case your program uses
On Wed, 6 Oct 2021, 18:38 Renat Idrisov, wrote:
... I do use a lots of gorotines,
> but I supposed they are not mapped to OS threads that frequently.
>
The runtime attempts to limit the number of OS threads to the value of
GOMAXPROCS. However, some threads do not count against that budget,
This is a variation on
https://github.com/gcc-mirror/gcc/blob/2f2aeda98f3aa24034a700e7efcb6c1a9397836f/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c
package main
/*
float s(unsigned long long k) {
float x;
x = (float)k;
return x;
}
unsigned long long cmain() {
On Wed, Oct 6, 2021 at 1:06 AM Ian Lance Taylor wrote:
> I opened https://golang.org/issue/48807.
Thank you.
--
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
On Sun, Oct 24, 2021 at 8:11 PM jlfo...@berkeley.edu
wrote:
> I noticed that the len() function doesn't take a struct as an argument (see
> below).
> This is a big surprise. Can someone shed some light on why this restriction
> exists?
What is the expected value of len() when applied to a
On Fri, Dec 17, 2021 at 6:28 AM Ian Lance Taylor wrote:
> There are no compatibility promises for unsupported techniques like
> go:linkname. If they update their copy of golang.org/x/sys, it will
> work with Go1.18beta1. I believe that this was fixed by
> https://golang.org/cl/274573 which was
On Sun, Dec 19, 2021 at 6:03 PM jlfo...@berkeley.edu
wrote:
> 1) Let's say I wanted to make the map elements smaller, so the map value
> would be a pointer to a structure, not the structure itself. I couldn't
> figure out how to modify this program so that the initialization still
> worked.
On Wed, Jan 5, 2022 at 11:09 AM Brieuc Jeunhomme wrote:
> But here ,since under non-windows platforms, I can't import the package, it
> means I have to define wrappers for everything I use: types, constants,
> functions.
I don't get it. Put the common code in a file/in files with no build
On Wed, Jan 5, 2022 at 11:32 AM Brieuc Jeunhomme wrote:
>
> So:
> $ cat mypackage.go
> package mypackage
>
> import "something/something/foo"
>
> func MyFunction() {
> some code
> some code
> some code
> foo.Bar(make(chan foo.Baz), make(chan foo.Foobar))
> }
>
> Is the code I would
On Mon, Jan 3, 2022 at 9:48 PM Davi Marcondes Moreira
wrote:
> I've read the docs for https://pkg.go.dev/go/build and
> https://pkg.go.dev/cmd/go#hdr-Build_constraints but I couldn't find anything
> explicitly related to test execution.
It is not related to test execution. The build system
On Wed, Nov 24, 2021 at 10:53 PM ben...@gmail.com wrote:
> 2) The download link is for the Windows binary, and I'm running Linux.
[image: image.png]
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
The linker knows nothing about heap. That's a runtime only thing.
On Fri, Nov 26, 2021, 05:00 arthurwil...@gmail.com <
arthurwilliammor...@gmail.com> wrote:
>
> On Saturday, November 13, 2021 at 12:48:41 PM UTC-6 seank...@gmail.com
> wrote:
>
>> global variables are stored in there data section
On Mon, Nov 15, 2021 at 7:00 PM Kamil Ziemian wrote:
> ... when in practice you should use runes?
For example the API of the unicode package uses runes extensively:
https://pkg.go.dev/unicode.
> My understanding at this moment is like that. Unicode assign every symbol a
> number (at this
On Fri, Oct 29, 2021 at 12:53 PM Kamil Ziemian wrote:
>
> From what I understand about EBNF production_name should be defined using
> EBNF notation in manner like below.
>
> production_name = something1 | something2
>
> But I don't see such definition in Spec.
Because production_name is a
testSlice mentions printLen, printLen mentions testSlice. The specification
explicitly forbids such init cycles.
On Fri, 22 Oct 2021, 19:51 dana...@gmail.com, wrote:
> Why do I get an initialization loop in the following program?
>
> ```go
> package main
> import "fmt"
> var testSlice =
On Sun, Nov 7, 2021 at 7:23 PM Kamil Ziemian wrote:
> Can anyone give me explicit example when semicolon is omitted in accordance
> to the second rule and explanation where it should be? I probably see such
> situations dozens of times, I just not know that they would needed semicolon
> in
On Sun, Oct 31, 2021 at 6:17 PM Elemer Pixard wrote:
> Is there a way to solve this ?
Some hopefully related info can be found here:
http://www.swig.org/Doc3.0/Go.html
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
On Sun, Dec 12, 2021 at 5:15 PM Денис Мухортов
wrote:
> It's a little unclear how os.stdin actually works. Why, if you just run the
> program, is data from stdin constantly being listened to?
> For example:
> func main() {
> sc := bufio.NewScanner(os.Stdin)
> for sc.Scan() {
>
On Tue, Dec 14, 2021 at 8:51 PM Cherry Mui wrote:
There's a test regression with Go1.18beta1 on freebsd/amd64 and
modernc.org/file.
The log file
(https://gitlab.com/cznic/builder/-/blob/cdca564a0543e9ad0441884e3c12f7c0a326bdab/logs/freebsd64)
does not say much and I have not yet managed to
On Tue, Dec 14, 2021 at 8:51 PM Cherry Mui wrote:
Let me report another failure that works, ie. tests build and pass,
with Go1.17.5 but not with Go1.18beta1
jnml@darwin-m1:~$ GO111MODULE=off go get github.com/edsrzf/mmap-go
jnml@darwin-m1:~$ cd edsrzf/mmap-go/
On Thu, Dec 2, 2021 at 10:13 AM Денис Мухортов
wrote:
> How can the output of the program be explained? Why checking for nil gives
> false??
Because it is not nil: https://go.dev/doc/faq#nil_error
--
You received this message because you are subscribed to the Google Groups
"golang-nuts"
On Tue, Dec 14, 2021 at 8:51 PM Cherry Mui wrote:
> We have just released go1.18beta1, a beta version of Go 1.18.
> It is cut from the master branch at the revision tagged go1.18beta1.
>
> Please try your production load tests and unit tests with the new version.
> Your help testing these
On Wed, Dec 15, 2021 at 7:41 PM Austin Clements wrote:
> Jan, assuming you're running on an AMD CPU, this is go.dev/issue/34988 (if
> you're not running on an AMD CPU, that would be very interesting to know!)
> The TL;DR is that this appears to be a kernel bug, and we have a C
> reproducer,
On Fri, Feb 11, 2022 at 5:06 PM 'Axel Wagner' via golang-nuts
wrote:
> FYI I went ahead and filed https://github.com/golang/go/issues/51145
I must be missing something because I still don't understand what the
problem is. The syntax `type A[B]C` can be reduced both in Go1.17 and
Go1.18 in only
On Tue, Mar 15, 2022 at 4:41 PM Thomas Bushnell BSG
wrote:
> Not in the normal implementation it doesn't. Typically it might be:
>
> type element struct {
> value int
> next *element
> }
>
> next is a pointer to an element, not a pointer to a pointer. That element
> contains within it a
A linked list, for example, consists of pointers to pointers to pointers...
Why should any limit exist to the length of the list except resources
available?
On Thu, Mar 10, 2022, 03:59 shan...@gmail.com wrote:
> This morning someone asked about dereferincing a pointer to a pointer to a
>
On Thu, Mar 10, 2022 at 1:40 PM 'wagner riffel' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> I don't think it's mentioned in the specification, my bet is that
> unless your type requires inifnity amout of memory (eg: `type t struct
> {t}`) or the type is an interface and break its
On Thu, Mar 10, 2022 at 2:18 PM 'Axel Wagner' via golang-nuts
wrote:
> TBH I find it rather surprising that the spec does not mention why `type X X`
> is *not* allowed.
The specs guarantee unsafe.Sizeof() to produce the size. I think that
gives a Go compiler the right to reject that type
901 - 1000 of 1138 matches
Mail list logo