I won't speak for the maintainers of cmd/compile/internal/syntax, but
packages in the standard library have to be backwards compatible with
previous releases. This makes it difficult to make changes to its interface
(possibly for performance reasons) and major re-architectures of its
implementa
On Sat, Mar 27, 2021 at 4:55 PM Hotei wrote:
> Could use a little help figuring out how to attack the following problem:
>
> I normally run godoc locally with $godoc -http=":6060"& and then browse it
> with chrome.
>
> Many years ago that method broke for a while as godoc was "reinvented"
> but
For testing library functions that accept fs.FS, I've been creating mock FS
implementations. However, I'm surprised by the amount of code I've had to
write for something like an FS with a single file in it. See below:
*type singleFileFS struct {*
*f stringFile*
*}*
*func (r singleFileFS) Op
On Sat, Mar 27, 2021 at 6:55 PM Perry Couprie wrote:
> I created the following test code. To isolate the compile error.
>
> Why do i get the error message :
>
> cannot use messageBody (type []byte) as type byte in append.
>
Because the append function takes a variadic list of of elements to appe
May want to check out this setting on your issue:
"cmd/internal/obj: reject splittable ABIInternal functions without
morestack spill info (e.g., asm functions) because we can't generate a
correct morestack path "
Unless of course you don't want to use asm functions
On Thursday, March 25, 2021 a
I created the following test code. To isolate the compile error.
Why do i get the error message :
cannot use messageBody (type []byte) as type byte in append.
Greeting from Amsterdam,
Perry
package main
import (
"encoding/hex"
"fmt"
)
func encodeMessage(messageBody []byte) ([]byte) {
tmp,_
Hey folks,
Why does Go reimplement the parser in pkg/go/parser on top of the one in
cmd/compile/internal? Why have two packages with somewhat duplicate code?
My guess is that it's easier to control what is public-public (available to
authors of Go programs) vs public within the compiler by havi
Could use a little help figuring out how to attack the following problem:
I normally run godoc locally with $godoc -http=":6060"& and then browse it
with chrome.
Many years ago that method broke for a while as godoc was "reinvented" but
then it came back pretty much the same as before. A few
Good afternoon,
For a case where there's a file containing a sequence of hashes (it could
be arrays too, as the underlying object type seems irrelevant) as per
RFC-7464. I cannot figure out how to handle this in a memory efficient way
that doesn't involve pulling each blob
I've tried to expr
Don't use that code - instead pick up something modern and well-supported
like https://www.gonum.org/
On Sat, Mar 27, 2021 at 3:23 PM Gabriel Pcklub
wrote:
> thanks for explanation, well, how can I change that code, so it will take
> count of Threads (or gorutines) instead size of matrix for one
So Threshold is Size / Threads?
Dátum: štvrtok 25. marca 2021, čas: 19:21:02 UTC+1, odosielateľ:
jas...@gmail.com
> Blast from the past so it's hard to be sure, but I think that was how many
> rows or columns to pick for parallel sub matrices to multiply.
>
> On Thu, Mar 25, 2021, 1:17 PM Gabri
thanks for explanation, well, how can I change that code, so it will take
count of Threads (or gorutines) instead size of matrix for one gorutine?
Dátum: štvrtok 25. marca 2021, čas: 19:21:02 UTC+1, odosielateľ:
jas...@gmail.com
> Blast from the past so it's hard to be sure, but I think that wa
When I want to ensure that the HTTP server is started (or if I want
additional stuff), I do this :
https://play.golang.org/p/mX0OsNWFf-f
Le samedi 27 mars 2021 à 15:13:40 UTC+1, cpu...@gmail.com a écrit :
> The typical Go tutorials pattern for starting a server is something like
>
> log.Fa
I guess I have misunderstood something about the process of the allocation
and gc :) Maybe I need to learn from the gc theory first. BTW thanks for
your reply.
在2021年3月20日星期六 UTC+8 上午1:20:12 写道:
> On Thu, Mar 18, 2021 at 8:36 PM Paul Zhang wrote:
> >
> > Can I just understand that for the defa
Because there are no atomic operations for smaller integers, I assume :)
On Sat, Mar 27, 2021 at 4:18 PM Paul Zhang wrote:
> For the channel structure:
>
> type hchan struct {
> qcount uint
> dataqsiz uint
> buf unsafe.Pointer
> elemsize uint16
> closed uint32
>
For the channel structure:
type hchan struct {
qcount uint
dataqsiz uint
buf unsafe.Pointer
elemsize uint16
closed uint32
elemtype *_type
sendxuint
recvxuint
recvqwaitq
sendqwaitq
lock mutex
}
Why does the closed need a uint32?
The best way to do it is probably by making an HTTP request and see if it
succeeds. In production, it's always a good idea to have a health check
endpoint anyways. So some service manager can check if it's alive and
restart it if necessary. Or so that a load balancer doesn't send traffic
until the
The typical Go tutorials pattern for starting a server is something like
log.Fatal(http.ListenAndServe(":8080"))
But what if the application needs to do other things after the server is
started? It seems there is virtually no method to wait for the server
actually start listening to reques
I suppose the difference between int and int32 comes from the behavior of
the modulo strength reduction mechanism.
With int (=int64), n%1 is compiled as:
MOVQ $0xabcc77118461cefd, AX
MOVQ #n, CX
IMULQ CX
ADDQ CX, DX
SARQ $0x1a, DX
MOVQ CX, BX
SARQ $0x3f, CX
SUBQ CX, DX
IMULQ $0x5f
19 matches
Mail list logo