* Axel Wagner:
> One way to fix this is to change the signatures to
>
> func Contains[I Iterator[T], T comparable](c I, value T) bool
> func Contains2[I Iterator[T], T comparable](value T, c I) bool
I had not realized that, thanks. The opposite order is perhaps more
useful, [T comparable, I Itera
I've tried this example, related to the collections example in the
proposal.
package main
type Iterator[T any] interface{
Next() (T, bool)
}
func Contains[T comparable](c Iterator[T], value T) bool {
for {
v, ok := c.Next()
if ok {
Do I have to tell the runtime that a system call is blocking? For
example, I use this code snippet to perform a blocking ioctl:
conn, err := file.SyscallConn()
if err != nil {
return
}
err1 := conn.Control(func(fd uintptr) {
_, _, er
* Dave Cheney:
> On Fri, Nov 25, 2016 at 4:24 PM, Florian Weimer wrote:
>> * Brad Fitzpatrick:
>>
>>> In light of the CEO of Reddit admitting to editing user comments (see
>>> dozen news stories today), I propose we delete the /r/golang subreddit.
>>>
&g
* Brad Fitzpatrick:
> In light of the CEO of Reddit admitting to editing user comments (see
> dozen news stories today), I propose we delete the /r/golang subreddit.
>
> That is so beyond unethical and immature,
Was it immature because they didn't make any money out of it, at least
not directly?
* audrius butkevicius:
> I am looking for advice how this could be implemented in a more robust way
> without leaking resources.
You can't with just an io.Writer. If a write operation cannot be
canceled (and io.Writer does not provide this capability), a timeout
will always result in a resource
* Tong Sun:
> The dark voodoo regexp as described here works for many cases.
> http://www.perlmonks.org/?node_id=261292
In general, whitespace is significant in XML, so you need a DTD or
schema to make sure that you can make such edits without changing the
meaning of the document.
--
You receiv
* Elazar Leibovich:
> Hi,
>
> I'm the author of the goproxy project.
>
> Recently I received a complaint from a user about goproxy being categorized
> as a virus.
>
> https://www.reasoncoresecurity.com/sysnetwk.exe-fbcc41dafc7bd8cf9b373e0d6b74808b11a9ba3c.aspx
>
> From a cursory look, it looks li
* Pietro Gagliardi:
> Just pass the null-terminated string and use C.int(len(goString)) as
> the length. The length of a Go string is already in bytes and does not
> include the terminating null (since Go has none), and I assume
> C.CString() produces the same byte sequence without encoding
> conv
* Chris Kastorff:
> If your program is spending that much time in GC, then you're likely
> spending a lot of time with the pointer write barriers on, which slow
> execution (for the benefit of having your code run at all during GC.)
Well, it's creating a lot of garbage, so I can't really complain
* John Morrice:
> Thought I'd be kind and illustrate your bug vs my solution with code. I
> use WaitGroups in both examples to keep things clearer.
>
> Your bug:
> https://play.golang.org/p/yoNPmbXnlW
>
> I.e.
>
> Ringo wrote Yellow Submarine
> Ringo wrote I am the Walrus
> Ringo wrote Eleanor R
* Clark Wierda:
> I don't have specific answers, but I do have some thoughts.
>
> First, the externally parallel has no overhead related to coordination. I
> would expect you to get the result you have of full core utilization and
> nearly perfect scaling.
GNU parallel saves intermediate outpu
I'm trying to parse OpenPGP key server dumps. Throughput is not too
bad so far, but I'd like to speed things up by introducing
parallelism.
The dumps are split into several files (each about 40 MB large, with a
few thousand keys). The toy version I have so far does not need any
coordination betw
PublicKey.parseRSA() has this check:
if len(pk.e.bytes) > 3 {
err = errors.UnsupportedError("large public exponent")
return
}
I get that it is valuable to limit the exponent size, but this limit
is too low: quite a few RSA keys in a dump from the pu
14 matches
Mail list logo