Re: [go-nuts] Any interest in nat.mulRange simplification/optimization?

2024-01-06 Thread Rob Pike
It seems reasonable but first I'd like to understand why the recursive method is used. I can't deduce why, but the CL that adds it, by gri, does Karatsuba multiplication, which implies something deep is going on. I'll add him to the conversation. -rob On Sun, Jan 7, 2024 at 5:46 PM John

[go-nuts] Any interest in nat.mulRange simplification/optimization?

2024-01-06 Thread John Jannotti
I enjoy bignum implementations, so I was looking through nat.go and saw that `mulRange` is implemented in a surprising, recursive way,. In the non-base case, `mulRange(a, b)` returns `mulrange(a, (a+b)/2) * mulRange(1+(a+b)/2, b)` (lots of big.Int ceremony elided). That's fine, but I didn't

[go-nuts] does anyone have an example of a Go kernel module

2024-01-06 Thread Siglo XIX
I have tried many ways but now that the ecosystem is more mature maybe someone knows of an example of how to make a Linux kernle module with Go,. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] Type parameter embedded field

2024-01-06 Thread Mike Schinkel
On Saturday, January 6, 2024 at 7:58:55 AM UTC-5 Axel Wagner wrote: I took this idea into account in my original message. It is bullet point 2. The case against this is that it would likely make type-checking Go code (co-)NP-complete. If you watch my talk about methods in union elements

Re: [go-nuts] Re: [RFC] Syntactic Dissonance

2024-01-06 Thread John Pritchard
Hi, With [VAR] https://blog.merovius.de/posts/2018-06-03-why-doesnt-go-have-variance-in/ we review type diaspora into possibility space. Perhaps the assertion that the abstract operand is incapable of supporting the implications of its communication. Initially, [GST]

Re: [go-nuts] Re: [RFC] Syntactic Dissonance

2024-01-06 Thread 'Brian Candler' via golang-nuts
Full explanation here: https://blog.merovius.de/posts/2018-06-03-why-doesnt-go-have-variance-in/ On Saturday 6 January 2024 at 11:55:27 UTC John Pritchard wrote: > Hi, > > Thinking about types and their conception, I could avoid the type > assertion boilerplate and rationalize the type

Re: [go-nuts] Re: [RFC] Syntactic Dissonance

2024-01-06 Thread John Pritchard
Hi, Thinking about types and their conception, I could avoid the type assertion boilerplate and rationalize the type membership relationship if this code compiled. Best, John On Sat, Jan 6, 2024 at 3:21 AM Tamás Gulácsi wrote: > Where does TestObject implement the Comparable interface, esp.

Re: [go-nuts] Type parameter embedded field

2024-01-06 Thread Mike Schinkel
On Friday, January 5, 2024 at 9:12:13 AM UTC-5 Axel Wagner wrote: If the signature of a function says you are allowed to call the function, you should be allowed to call the function. While I'd argue we would be best to stick to objective arguments and not ones that affirm the consequent,

[go-nuts] Re: [RFC] Syntactic Dissonance

2024-01-06 Thread Tamás Gulácsi
Where does TestObject implement the Comparable interface, esp. the Compare method? I don't see such in that rep. The implemented TestObject.Compare method has different signature: it requests a TestObject, not a Comparable interface, as your spec! This is only the first error. The second is