Having an option to link to old docs on golang.org (say
golang.org/pkg/something?tag=1.6.0) will result in people linking to
that option, crawlers storing that option, search engines pointing to
that option, and articles, help information and whatever else online
pinning themselves to that option.
in the spec i have something defined as:
Inner ::= [10] IMPLICIT SEQUENCE {
one INTEGER,
two INTEGER
}
Outer :== [11] IMPLICIT SEQUENCE {
one Inner,
two INTEGER
...
}
what are my options for tagging the "Inner" struct? do I need to
specify the tag (10) in each instan
on the Go side you have an array of bytes, on the C side you are
passing a pointer to an array of shorts (16-bits)
--
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
I'm trying to understand why os/signal tests fail on my 10.12 macbook
pro at tip:
$ ./all.bash
[...]
ok net/textproto (cached)
ok net/url (cached)
ok os 0.678s
ok os/exec 1.185s
--- FAIL: TestTerminalSignal (5.01s)
signal_cgo_test.go:138: "PS1='prompt> '\r\n"
signal_cgo_test.go:163: timed out
$ go test -c os/signal
$ ./signal.test
PASS
$ go tool dist test -v
# Testing packages.
# go tool dist test -run=^go_test:archive/tar$
[...]
ok net/url (cached)
ok os 0.677s
ok os/exec 1.414s
--- FAIL: TestTerminalSignal (5.01s)
signal_cgo_test.go:138: "PS1='prompt> '\r\n"
signal_cgo_test.go
Please add your comments to this issue:
https://github.com/golang/go/issues/23749 There are already a couple
of reports for that particular usage pattern, one of which is mine.
For now you have the option to do:
#cgo LDFLAGS: -L${SRCDIR}/../../../LuaJIT/LuaJIT/src -lluajit -lm -ldl
There are othe
If you mix dynamic libraries with static ones in the same folder the
-L -l trick won't work. a workaround is to softlink the .a files to a
separate folder so that the linker doesn't see the .so/.dylib files.
On Fri, Feb 9, 2018 at 12:11 PM, Jason E. Aten wrote:
>> Note that the _ALLOW environment
#cgo darwin LDFLAGS:-framework Security -framework Foundation
-framework SystemConfiguration
#cgo linux LDFLAGS:-L${SRCDIR}/../../lib -lxml2
etc.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving e
just bump the clock rate to 3ghz and you'll reduce the cgo call cost
to reasonable values :D
On Thu, Feb 15, 2018 at 11:29 AM, Dave Cheney wrote:
> cgo is not go.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this
While trying to retrofit context.Context within a
worker-pool-patterned package, where work is sent down a channel to be
picked up by number of worker goroutines.
I'm running against the mantra of "Do not store Contexts inside a struct type".
For example, I want to put a timeout on the amount of
t;
>> I did something like this here:
>>
>> https://github.com/brunoga/workerpool
>>
>> I do not store the context anywhere, I pass it to my Start() method and it
>> passes it down to any place I need it.
>>
>>
>> On Fri, Feb 16, 2018 at 1:05 PM
didn't reply to list, sorry:
> https://github.com/chemikadze/asn1go
i gave it a try. it's a good start (we use asn1c heavily, asn1go is a
good match for our use case) but there seems to be a lot missing.
including a license. i created an issue for that.
it failed to parse our asn.1 on some techn
in the first Printf "area" is truncated. try %.40f to see the real
value, which is more like:
262256.4523014638689346611499786376953125
plugging that in as h2 will result in
39709429597.0098280725069344043731689453125 (according to wolfram
alpha)
On Thu, Feb 22, 2018 at 1:32 PM, wrote:
>
>
sorry, i just realized that i said 'area' but meant 'height' in my
previous email.
On Thu, Feb 22, 2018 at 2:09 PM, andrey mirtchovski
wrote:
> in the first Printf "area" is truncated. try %.40f to see the real
> value, which is more like:
>
>
can you create an issue for this? we're also suffering from the same
internally. please make it about GitHub Enterprise, as that is what
they call it :)
On Thu, Feb 22, 2018 at 5:16 PM, Richard Wilkes wrote:
> Is it expected that vgo should work with enterprise GitHub servers at this
> point in t
> I don't know that. append was not in Go 1.0?
Go the language was opened to the world on Nov 10, 2009. Go 1.0 was
released 28 March 2012.
Append appeared on Oct 27, 2010:
https://github.com/golang/go/commit/d8b5d039cd1bec151cc325973ff32bd34ebb0456
--
You received this message because you are s
Use 'go build -gcflags="-m"' to see what inlining actions the compiler
takes. more here:
https://github.com/golang/go/wiki/CompilerOptimizations#escape-analysis-and-inlining
for example this https://play.golang.org/p/QyAauePKbn- will result in:
$ go build -gcflags='-m' t.go
# command-line-argumen
On Tue, Feb 6, 2018 at 4:20 PM, Ian Lance Taylor wrote:
> On Tue, Feb 6, 2018 at 2:54 PM, andrey mirtchovski
> wrote:
>> $ go test -c os/signal
>> $ ./signal.test
>> PASS
>> $ go tool dist test -v
>>
>> # Testing packages.
>> # go tool dist test
You have a variable of type *user.User. The documentation
(https://golang.org/pkg/os/user/#User) says there is a field on that
type called "Username". To get the username of a user you should
therefore use username.Username (but that's too stuttery, perhaps "u,
err := user.Current()" and then use u
> var testuser string = string(user.Username)
you don't need the conversion. user.Username is already a string.
--
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
Thanks. This will give me a chance to check the new GitHub PR process:
https://github.com/golang/go/pull/24255
On Mon, Mar 5, 2018 at 11:40 AM, Ian Lance Taylor wrote:
> On Mon, Mar 5, 2018 at 10:10 AM, andrey mirtchovski
> wrote:
>>
>> I finally found some time to work on
maybe this will give you a hint: https://play.golang.org/p/ANIjc3tCdwp
maps are reference types, but they still get passed by value. if you
pass a nil map around, the old value you passed will not magically
start pointing to a new map once you instantiate it elsewhere.
--
You received this messa
the answer is hidden in the spec, i believe (it's not easy to parse,
so i suggest reading the whole thing):
"The right operand in a shift expression must have unsigned integer
type or be an untyped constant representableby a value of type uint.
If the left operand of a non-constant shift expressio
it deadlocks because you're not reading all the data. Read() may
return "up to len(p)", but not necessarily the whole thing. the reader
should loop until it reads all available bytes in your case you know
how many bytes you are going to write beforehand.
if you do not ignore the first value return
wanted: panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1090432]
got: ** Signal 11 from untrusted code: pc=6559000898c0
is this just an idiosyncrasy of the playground, or am I breaking something?
--
You rece
the backslash character means something within double quotes. either
escape it ("\S" becomes "\\S") or use backquotes (`\S`)
On Thu, Mar 22, 2018 at 4:33 PM, Tong Sun wrote:
> I'm trying with simple Perl character class regular expression, which should
> be supported by Go (link).
>
> However, I'
Is this what you're referring to? It's on tip.golang.org (don't see it
on golang.org):
https://i.imgur.com/vrPD0UC.png
for me the order does not change, but that can be an artefact of caching.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
I have a piece of valid asn.1 that i'm not able to properly parse with
Go's encoding/asn.1. I have distilled the example down to:
https://play.golang.org/p/YQCVxhEKnJx
the asn1 code, which i generated with asn1c, is parseable by asn1c and
lapo.it: http://lapo.it/asn1js/#A010A106800101810102A20680
Thanks for your help. I think I understood the problem I was having.
In the original code (not the example in this email) things that would
normally go to a CHOICE field were marshalled into a RawValue, which
then got switched on RawValue.Tag to decide where to go (it's part of
the protocol, unrela
this is https://github.com/golang/go/issues/8005, i believe.
On Mon, Apr 2, 2018 at 5:37 PM, Andrew Pennebaker
wrote:
> Some Go types like sync.Mutex have a subtle API issue, where the objects
> really shouldn't be copied or passed around into different function calls,
> e.g. to a goroutine worke
The easiest way to avoid this is to make the channel buffered with
enough room to consume all responses. Only the first one will be read,
but the rest will be garbage collected.
c := make(chan Result, len(replicas))
should be enough.
On Wed, Apr 4, 2018 at 4:20 AM, wilby yang wrote:
> I am new
> ah, it's all (i think) clear now. so, based on what i see under
> ${GOROOT}/src/hash, i could do any or all of the following:
>
> import "hash"
> import "hash/adler32"
> import "hash/crc32"
> import "hash/crc64"
> import "hash/fnv"
note that you don't need to import "hash" unless you
from the panic you can see that you're passing to ReadAll a valid
interface (non-nil type pointer) however the interface contains a nil
object (nil value pointer):
io/ioutil.ReadAll(0x14ce020, 0x0, 0x0, 0x1a, 0xc420069cb0, 0x1, 0x1)
to understand why there are more arguments than you expect in th
but when it reaches:
>
> body, err := ioutil.ReadAll(reader)
>
> if the reader is gzip.Reader - it throws an error: "unexpected EOF"
>
>
>
> On Thu, Apr 12, 2018 at 10:45 PM andrey mirtchovski
> wrote:
>>
>> from the panic you can see that you're
Due to Go's compatibility promise most example code written since Go
1.0 should still be relevant, will compile, and will run. Libraries
have grown since 1.0 as our understanding of how to write Go code
improves (context.Context is one such innovation), but the examples in
the documentation are kep
If you're looking for general examples of modern Go, perhaps the
JustForFunc series will be of interest:
https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw
On Fri, Apr 13, 2018 at 10:28 AM, JM wrote:
> thanks. I run a software engineering team so I've been less hands-on lately
> and want t
In short, your concurrency is too fine-grained. Adding concurrency
primitives requires locking which is expensive, and creating a lot of
goroutines does consume resources, even if we consider it relatively
cheap.
If you slice the problem slightly differently it can be made faster:
one goroutine pe
> I’d have thought the case would be the same with the AGPL.
https://opensource.google.com/docs/using/agpl-policy/
--
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
t
every time float accuracy is mentioned i think of this:
http://0.30004.com/
--
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...@g
> math.Pow does not give as precise answers as the C++ std lib.
math pow doesn't just multiply X by itself Y times, it uses a
different algorithm:
https://golang.org/src/math/pow.go#L40
it would perhaps make sense to quantify the error margins that this
algorithm introduces.
not sure what c++ s
I believe I've never encountered this nor seen anyone mention this
error before. It occurred while fuzzing a C library that we interface
with:
PC=0x7fffbafc847c m=0 sigcode=0
goroutine 0 [idle]:
runtime: unknown pc 0x7fffbafc847c
stack: frame={sp:0x7fff5fbff088, fp:0x0} stack=[0x7fff5fb80888,0x7f
It is unfortunately not reproducible. I got 2 crashes out of 500
million executions. I've updated to tip and have not seen it since.
On Fri, May 4, 2018 at 12:14 PM, Ian Lance Taylor wrote:
> On Thu, May 3, 2018 at 11:39 PM, andrey mirtchovski
> wrote:
>>
>> I believe
also useful if you're dealing with blobs of C memory:
https://utcc.utoronto.ca/~cks/space/blog/programming/GoCGoCompatibleStructs
On Sat, May 19, 2018 at 3:03 PM, Jan Mercl <0xj...@gmail.com> wrote:
>
> On Sat, May 19, 2018 at 10:42 PM Max
> wrote:
>
> > The question is: is it allowed to take t
it seems from your suggested solutions that you're concerned about cpu
usage. does the goroutine communicate with anything? you can limit its
resources by feeding it less data (via a limiter goroutine) or by
editing it itself do less work (via editing the code)? there is
nothing inherently needed f
> You're right but I think developers of Go can think about that because its
> benefits are obvious.
can you please enumerate those benefits? many gophers are not
convinced they are obvious.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To un
Plenty of previous discussions on the subject. Here's an example from 2012:
https://groups.google.com/d/msg/golang-nuts/wcrZ3P1zeAk/KaR68a8rROEJ
I don't think reasoning has changed.
On Mon, Sep 3, 2018 at 10:38 PM Dat Huynh wrote:
>
> Just a question.
>
> Why does Go allow to call a method with
> most languages offer programs at least some operating system like services
> via a runtime service layer
> -> in C, this was initially "crt0" the thin c runtime
> -> in Go, the service layer is richer, offering thread management and
> goroutine multiplexing, garbage collection, and more.
>
> th
> It's a plausible mistake from any old Unix hand, I think.
anecdotally, i ran into this very same issue yesterday when trying to
instrument a 1.10 go program that allocated (but never used) more than
512 gigabytes of memory. i put in the memprofile saving code as a
deferred closure in main and hi
you're talking about https://github.com/pkg/profile, presumably. while
i did find that fairly quickly and it appears to be very useful, it
wasn't immediately obvious that it would solve my particular issue.
unfortunately we're also averse to importing third-party packages
without additional vetting
On 19 Sep 2018, at 12:23, andrey mirtchovski wrote:
> >
> > you're talking about https://github.com/pkg/profile, presumably. while
> > i did find that fairly quickly and it appears to be very useful, it
> > wasn't immediately obvious that it would solve my p
I do not think this has been shared yet, please accept my apologies if
this is a repeat.
https://www.usenix.org/conference/osdi18/presentation/cutler
The paper contributes Biscuit, a kernel written in Go that implements
enough of POSIX (virtual memory, mmap, TCP/IP sockets, a logging file
system,
on mac (and I suppose linux too) you can use fontsrv to extract the
plan 9 font files as acme sees them. on my mac I did:
$ fontsrv -m font
$ acme -f font/GoMono/12a/font
here are screenshots of GoRegular and GoMono in 12a:
https://imgur.com/a/7xnGrmx
I will send you privately a tar of GoMono/1
> Well, ok. But I would call “Shuffle” a misleading misnomer, because until the
> user defines a shuffler function (which perversely might not, or might fail
> to, shuffle anything), it does not shuffle anything.
how would you implement shuffle in golang so that it's not a
misleading misnomer? i
> May be it ought to be called FYShuffle?
then we'ld have to rename it if we switched the algorithm (which has
happened once for sort.Sort already). that's not what go is about :)
maybe you're advocating for implementing a Shuffle interface, which
brings us round about to where we are right now :
> Unlikely :-)
>
> The following is much less obscure.
>
> func Shuffle(slice inteface{})
>
> & might have more more sense. e.g.
>
> var cards []card
> ...
> rand.Shuffle(cards)
you've now restricted Shuffle to "shuffling" only slices. and it has
to examine interface{}
> JavaScript needs a standard - there are many implementations and browsers.
> For the moment, there is only one Go, and I like that.
one go, but two reference implementation. any other implementation is
expected to conscribe to the spec.
--
You received this message because you are subscribed
as https://golang.org/pkg/time/#Date says:
The month, day, hour, min, sec, and nsec values may be outside their
usual ranges and will be normalized during the conversion. For
example, October 32 converts to November 1.
On Tue, Oct 23, 2018 at 3:12 PM wrote:
>
> If you check the source code for th
The 512GB heap limit was removed in go 1.11. Here's the commit that
did it, it has some additional information:
https://github.com/golang/go/commit/2b415549b813ba36caafa34fc34d72e47ee8335c
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsub
this is a case of a variable being reused during a range loop.
essentially k[:] is optimized to something resembling &k (a pointer to
the memory location of the backing array) which is appended as such to
the [][]int variable. the next iteration it is the same variable in
memory, however it's point
> It would sure help if Go had sum types. Has there been any discussion
> of adding these?
one of many, but has links to others: https://github.com/golang/go/issues/19412
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this g
Incidentally, here's Hoare's proposal for records (structs), and
pointers (references) for Algol 60:
https://archive.computerhistory.org/resources/text/algol/algol_bulletin/A21/P36.HTM
as with most things Hoare has produced, it is very well written and
presents a very good justification for the e
sorry to be a bother, but are you publishing new archives? will you
publish new hashes for the archives with the commands executed thusly?
On Wed, Jan 23, 2019 at 5:12 PM Julie Qiu wrote:
>
> Hello gophers,
>
> Due to an issue with the release tooling (https://golang.org/issue/29906),
> go1.11.5
o change the contents of
> already published archives.
>
> Julie
>
> On Wed, Jan 23, 2019 at 8:00 PM andrey mirtchovski
> wrote:
>>
>> sorry to be a bother, but are you publishing new archives? will you
>> publish new hashes for the archives with the commands exe
cray was optimized for throughput, after all ;)
--
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.
For more options, visit
There was a change to how go mod treats softlinks in repositories
which changed the hash generated for some packages (we found out the
issue via git.apache.org/thrift.git). If the repo contains softlinks
and you generated your go.mod file before Go 1.11.3 (Go 1.11.2 still
exhibited the bug) then th
reposting my private comment from a day ago for those searching for answers:
try "command-shift-p" or ctrl-shift-p depending on your operating
system, to bring the "all commands" pop-up. there you should be able
to find "Go: Install/Update tools". click on the checkboxes. hit
enter.
On Wed, Feb 2
> I tried the solution posted by Andrey (Thank you!) and it still does the
> popup thing. Oh well, it's a minor distraction, click update and it goes
> away.
If you go to the OUTPUT tab does it give you an error message? or does
it say "things successfully installed"?
--
You received this mes
in https://play.golang.org/p/5P5vcebYkGj you're shadowing s by
creating a new variable via :=
this is a common go interview question :)
On Sat, Feb 23, 2019 at 9:34 PM wrote:
>
> Hello,
>
> It's likely that I'm misinterpreting the language spec. It's also easy to
> circumvent by assigning the o
There used to be a 512GB heap limit which was removed in Go 1.11.
Currently there should be no heap limit. For additional information
see:
https://github.com/golang/go/commit/2b415549b813ba36caafa34fc34d72e47ee8335c
On Tue, Mar 5, 2019 at 2:08 PM wrote:
>
> I've seen various figures from older v
It may help to note that in the earliest references to the Read
interface in the history of the language it accepted a *[]byte, hence
'p' may indeed stand for pointer.
https://github.com/golang/go/commit/7c9e2c2b6c2e0aa3090dbd5183809e1b2f53359b#diff-bf734f53a84f388bf39699d291b06b1d
--
You receiv
> This is all fine and good until the project is fetched with a go get command,
> which dumps everything directly into GOPATH, thereby preventing it from
> fetching dependencies.
If you are fetching it with "go get" then that's presumably because
it's a dependency required by another package or
> So do *not* use go get when manually cloning the project then I take it?
That is correct. For most developers it would be one or more
repositories that contain many modules, not all of which would be
go-gettable anyway.
Also note that "go get" in module mode (outside of GOPATH) will
unpackage w
offset, err := f.Seek(0, os.SEEK_CUR)
On Thu, Apr 18, 2019 at 8:50 AM wrote:
>
> I want to know file's current read offset after open a file, but I can not
> found related API.
>
>
>
>
>
> f, err := os.Open("/tmp/")
> if err != nil{
> panic(err)
> }
>
> ... // some read opera
> offset, err := f.Seek(0, io.SeekCurrent)
my code has been written so long ago i didn't even notice os.SEEK_CUR
is deprecated :)
--
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, s
On Fri, Apr 19, 2019, 4:48 PM Rob Pike wrote:
> I just use 1 so I don't have to look up what it's called these days, but
> I'm seriously old school.
>
Does that pass code review or do people give you the benefit of doubt?
>
--
You received this message because you are subscribed to the Google
You need the -benchmem flag to get a report of allocations:
$ go test -bench=. -benchmem
goos: darwin
goarch: amd64
BenchmarkTestSleep_2000-4 1 2005447537 ns/op 456 B/op
3 allocs/op
BenchmarkTestSleep_1000-4 1 1001627153 ns/op 64 B/op
1 allocs/op
BenchmarkT
the go runtime (bare, nothing else) is about 1.1MB now. the "fmt"
package brings almost a MB of dependencies including 800 or so
unicode-related functions (names/symbols), reflection, etc. the math
package brings almost nothing: 11 symbols.
-8<
$
wolfram alpha is a good place to do numbers:
https://www.wolframalpha.com/input/?i=-1+%3C%3C+31
if you're on a mac, the calculator has a "programmer mode" which
allows arbitrary manipulations of bits.
On Sun, Apr 21, 2019 at 9:36 PM Pat Farrell wrote:
>
> I have a logic error in my calculation.
> ? (test) {
> //...do something
> }
> {
> //..do something else
> }
I believe the Go team considered this very carefully early on the
language's development and came to the decision to use "if test" for
"? (test)" and "} else {" for "}{" (without the implied newline). They
also threw in "} else i
Here's the lore associated with the subject: Ken wanted ternary, Rob
and Robert did not. They overruled Ken (remember, early on all three
had to agree for a feature to go in). The end.
The number of frivolous and egregious abuse of ternary that I've seen
in _modern_ C code is too high.jpg
--
You
> I may easily misremember, but that doesn't match my recollection. I
> don't remember what position Rob and Robert took, but as I recall Ken
> was generally opposed to the ternary operator. He had been in part
> responsible for adding it to C, and felt that it had been a mistake.
>
> Ian
I am h
Please do! We need to resolve this connundrum for the next 5
generations of computer programmers!
On Wed, Apr 24, 2019 at 8:41 PM David Riley wrote:
>
> On Apr 24, 2019, at 5:25 PM, andrey mirtchovski wrote:
> >
> >> I may easily misremember, but that doesn't
> So, the question is: why ‘i’ isn’t treated as unsigned, since it is a range
> index - won't it always be positive?
The author of the PR was most likely working on Go's tip (what will
become 1.13), where the requirement that the right operator in a shift
is an unsigned integer has been lifted.
> But still, it would seem the range index should be unsigned - what would be
> the purpose of it being signed? Similarly, the slice indexing should be
> unsigned as well. Just thinking about it...
not the first time this has come up. here are a couple of references:
https://groups.google.com/d
try setting GOTMPDIR. not sure what this corresponds to on windows,
but it will change where the go tool will create its temp files:
$ go run -x t.go
WORK=/var/folders/sp/06p28g2d0vs7gd2vhf26wl9mgn/T/go-build126372523
[...]
$ GOTMPDIR=/tmp/go go run -x t.go
WORK=/tmp/go/go-build661115935
[...]
> PS F:\GoWorckspace\src\hello> go install
> open E:\temp\go-build447177998\b001\exe\a.out.exe: The system cannot find the
> file specified.
is this a school or work computer? if yes then a group policy may have
disabled the execution of exe files. supply the "-work" argument to go
build. it will
> PS F:\GoWorckspace\src\hello> go build -work
> WORK=E:\temp\go-build828919622
> open E:\temp\go-build828919622\b001\exe\a.out.exe: The system cannot find the
> file specified.
once you have done this you should be able to cd to
E:\temp\go-build828919622 and look around to see if any files have
\windows_amd64\unicode\utf16.a
> packagefile unicode=C:\Go\pkg\windows_amd64\unicode.a
> packagefile internal/race=C:\Go\pkg\windows_amd64\internal\race.a
> packagefile
> internal/syscall/windows/sysdll=C:\Go\pkg\windows_amd64\internal\syscall\windows\sysdll.a
> packagefile
> int
macOS doesn't support static linking user binaries. in fact I do see
libSystem linked for each go binary on my Mojave system, including the
simplest non-outputting hello world:
$ cat > t.go
package main; func main(){}
$ go build t.go && otool -L t
t: /usr/lib/libSystem.B.dylib (compatibility versi
https://www.ardanlabs.com/blog/2018/12/garbage-collection-in-go-part1-semantics.html
--
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...@googl
when you terminate a process the virtual memory associated with that
process ceases to exist. any real memory associated with that process
is not addressable anymore. if another process allocates a page that
maps to a page previously held by the first process will get a
zeroed-out page.
you should
file an issue, please, if you have not done so already. i'd like to follow it.
On Mon, May 13, 2019 at 8:01 PM Jason E. Aten wrote:
>
> Indeed, confirming data: I can re-create the crashing circumstances
> immediately by renaming C:\Go to C:\Go1.12.5.
>
> On Tuesday, May 14, 2019 at 3:53:10 AM U
On Fri, May 24, 2019 at 12:49 AM Rob Pike wrote:
>
> If that's true - and it might well not be - it's a surprise to me. When
> launching the language we explicitly made sure NOT to trademark it.
>
Go appears to be trademarked, as well as the new design of the Go
logo. Golang doesn't seem to be.
Atan is implemented in assembly. for amd64 it's just a call to atan
(lowercase a): https://golang.org/src/math/atan_amd64.s
for 386 it is not: https://golang.org/src/math/atan_386.s
On Thu, May 30, 2019 at 9:15 AM rhiro wrote:
>
> I'd like to see the implementation for math.Atan, but I see that
?w=1 is an option.
On Tue, Feb 18, 2020 at 7:16 PM Wojciech S. Czarnecki wrote:
>
> Dnia 2020-02-18, o godz. 10:16:57
> Manlio Perillo napisał(a):
>
> > Here is an example of a diff with a lot of noise, where the actual change
> > is very hard to see:
> > https://gist.github.com/perillo/c5b3bdff
got it down to two:
https://play.golang.org/p/jmTqhLGaLY_T
On Fri, Feb 21, 2020 at 11:24 AM Bruno Albuquerque wrote:
>
> This is interesting. If I simplify the loop to something like this:
>
> nrgbaData := make([]byte, len(rgbData)+(len(rgbData)/3))
>
> _ = nrgbaData[len(rgbData)]
>
>
my take:
- c++ programmers are going to c++ program. film at 11 (rob pike had a
talk about that)
- dart has UI
- rust is fashionable, but scary (if you've done rust you'll know why)
yes, go was touted as a systems programming language, but it meant
"distributed systems". had that been made clear f
to avoid allocations you have to hint at the type of what you're going
to print. for example see/use zerolog: https://github.com/rs/zerolog
On Mon, Mar 9, 2020 at 10:36 AM 'Axel Wagner' via golang-nuts
wrote:
>
> IMO, there really isn't a super good answer. The simple answer is: You need
> to de
IPv6 addresses including a zone identifier [rfc4007] are not parsed
correctly by net.ParseIP. is there any point in creating an issue or
is this intentional and we're supposed to strip the zone identifier?
https://play.golang.org/p/kQKyYYnZydX
--
You received this message because you are subscri
thanks. that ought to do it.
On Fri, May 1, 2020 at 11:16 AM Brian Candler wrote:
>
> parseIP returns a net.IP which is just a slice of bytes without the zone.
>
> However, type net.IPAddr includes the zone. Looks like net.ResolveIPAddr
> will do the job:
>
> https://play.golang.org/p/7p1XXIrVG
1 - 100 of 228 matches
Mail list logo