https://play.golang.org/p/XhnDZwJYdLp
On Sunday, February 28, 2021 at 10:57:21 PM UTC-5 Hugo3 wrote:
> I used 2 test keys using the key block for Alice as the public key and
> Roger as the private key. but receiving a panic error: panic: runtime
> error: invalid memory address or nil pointer
I used 2 test keys using the key block for Alice as the public key and
Roger as the private key. but receiving a panic error: panic: runtime
error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x128 pc=0x51fdd7]
On Sunday, February 28,
I wasn’t referring to the mixed tab/space issue. I mean you copy a few live
that are at one indentation to another location with a different indentation -
everything is mucked up usually. You don’t have these issues with brackets -
the code is easily formatted correctly or a bracket added then
On Monday, March 1, 2021 at 9:36:57 AM UTC+13 ren...@ix.netcom.com wrote:
> I think the only time the indentation is a problem is when refactoring
> code - copying pasting code blocks seems to be a guessing game with my IDEs
> and often require manual fixes - the issue seems far less common
On Sun, 2021-02-28 at 10:11 -0800, Bob Alexander wrote:
> I never have understood the *serious* hatred of Python's "indentation
> as syntax" approach. I've used lots of bracketed and begin/end
> languages (C/C++, Algol & relatives, Ruby, and most other programming
> languages), and when I write
I think the only time the indentation is a problem is when refactoring code -
copying pasting code blocks seems to be a guessing game with my IDEs and often
require manual fixes - the issue seems far less common (and more easily
corrected) when using brackets.
> On Feb 28, 2021, at 12:12 PM,
On Sun, Feb 28, 2021 at 7:52 AM tapi...@gmail.com wrote:
>
> On Sunday, February 28, 2021 at 8:29:51 AM UTC-5 Ian Lance Taylor wrote:
>>
>> On Sat, Feb 27, 2021 at 8:00 PM tapi...@gmail.com wrote:
>>
>> > 2.
>> >
>> > func String2ByteSlice(s string) []byte {
>> > return
On Sun, Feb 28, 2021 at 7:04 AM zhz shi wrote:
>
> According Russ's plan(replacing cmd/compile/internal/types with types2) and
> the discussion topic Jeremy Faller posted, can I understand it as that check2
> will be the entry of new and default typechecker in the future(with the
> release of
I never have understood the *serious* hatred of Python's "indentation as
syntax" approach. I've used lots of bracketed and begin/end languages
(C/C++, Algol & relatives, Ruby, and most other programming languages), and
when I write code in those languages I usually indent as I write.
Obviously,
Popularity has nothing to do with good - thus Twitter and the Kardashians. .
> On Feb 28, 2021, at 2:35 AM, 'Dan Kortschak' via golang-nuts
> wrote:
>
> On Sun, 2021-02-28 at 09:23 +0100, Jan Mercl wrote:
>> I meant, for example, in regexp notation, ` *` vs `\n *` between a
>> function
Thanks Brian. It sounds like golang made it illegal to define methods on a
defined pointer type for readability/disambiguation reasons rather than
some fundamental, underlying technical issue. Frankly the confusion it
eliminates still isn’t entirely clear to me. Given that names in general
don’t
On Sunday, February 28, 2021 at 8:29:51 AM UTC-5 Ian Lance Taylor wrote:
> On Sat, Feb 27, 2021 at 8:00 PM tapi...@gmail.com
> wrote:
> >
> > 1.
> >
> > func String2ByteSlice(s string) []byte {
> > return (*[^uint(0) >> 1]byte)(unsafe.Pointer())[:len(s):len(s)]
> > }
>
> This doesn't
Thanks Brian, Axel & Ian for your very thorough treatment of my post.
When I first read about golang interfaces, I was impressed with how elegant
and powerful they are, so it's very disappointing that my first opportunity
at leveraging them was such a fail! Your explanations did a remarkable job
That's very helpful, thank you Ian.
According Russ's plan(replacing cmd/compile/internal/types with types2) and
the discussion topic Jeremy Faller posted, can I understand it as that
check2
You've stated the assignment.
What have you tried in order to solve it?
The best way to get at this is to just jump out in it and start trying
stuff and see when it fails. Don't be afraid of stuff falling apart in the
beginning. That's not what you are going to hand in, anyway. In addition,
we
On Sat, Feb 27, 2021 at 8:00 PM tapi...@gmail.com wrote:
>
> 1.
>
> func String2ByteSlice(s string) []byte {
> return (*[^uint(0) >> 1]byte)(unsafe.Pointer())[:len(s):len(s)]
> }
This doesn't do what you probably want, as is not the address of
the bytes in the string.
> 2.
>
> func
On Sun, Feb 28, 2021 at 1:06 AM Reto wrote:
>
> On Sat, Feb 27, 2021 at 06:56:04PM -0800, Ian Lance Taylor wrote:
> > Although rule 4 in the documentation of the unsafe package mentions
> > syscall.Syscall, the implementation isn't restricted to the syscall
> > package. It applies to any
On Sunday, 28 February 2021 at 10:36:55 UTC Brian Candler wrote:
> On Sunday, 28 February 2021 at 03:03:17 UTC Deiter wrote:
>
>> The example uses a “short assignment” statement, so it’s not obvious what
>> “concrete” type c.StdoutPipe() returns
>>
>
> You can't tell
>
By which I meant "you
On Sunday, 28 February 2021 at 03:03:17 UTC Deiter wrote:
> The example uses a “short assignment” statement, so it’s not obvious what
> “concrete” type c.StdoutPipe() returns
>
You can't tell, and indeed it might not return any concrete type at all (it
may return nil).
Given
stdout, err :=
Hi all
If anyone is interested, i made a little tool to download and package go
modules for air-gapped environments.
Here the link to the repo: https://github.com/go-sharp/go-offline-packager
Any comments or suggestions are most welcome.
Cheers,
Sandro
--
You received this message because
On Sun, Feb 28, 2021 at 9:09 AM tapi...@gmail.com
wrote:
> Is this error essential?
>
Yes. You need to be able to do arithmetic on addresses to use an array, but
for that they need to have a known type and size. By exceeding the address
space, you are creating a type that the compiler can't
On Sun, Feb 28, 2021 at 4:03 AM Deiter wrote:
> My (clearly flawed) interpretation of interface types suggested that I
> could assign the first result from c.StdoutPipe() to anything that
> implements io.ReadCloser.
>
To try and explain the flaw in the argument: These two statements are
Thanks to both of you.
On Sat, Feb 27, 2021 at 06:56:04PM -0800, Ian Lance Taylor wrote:
> Although rule 4 in the documentation of the unsafe package mentions
> syscall.Syscall, the implementation isn't restricted to the syscall
> package. It applies to any function that is written in assembly:
Your program does that already, so I'm not sure what the problem is.
Note that you don't need the private key to encode. Your function
encryptMessage() makes no use of the arguments privateKey,
privateKeyPassword - you can simply remove them.
https://play.golang.org/p/EbuCRR32C7d
Now it's
On Sun, 2021-02-28 at 09:23 +0100, Jan Mercl wrote:
> I meant, for example, in regexp notation, ` *` vs `\n *` between a
> function signature and the opening brace of the function body.
Ah, yes.
> This assumes newline is a whitespace. Most programming languages
> agree, but humans may not.
With
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
E.g. compare
a = 1
b = 2
And
a = 1 b = 2
They do no mean the same in Go.
Arnaud
On Sun, 28 Feb 2021, 08:05 'Dan Kortschak' via golang-nuts, <
golang-nuts@googlegroups.com> wrote:
> On Sun, 2021-02-28 at 08:40 +0100, Jan Mercl wrote:
> > Actually Go has that problem as well, just
Sorry, the first one will get a "type [9223372036854775807]byte larger than
address space" error.
The following code will get the same error
var x *[^uint(0) >> 1]byte
Is this error essential?
On Saturday, February 27, 2021 at 11:00:26 PM UTC-5 tapi...@gmail.com wrote:
> 1.
>
> func
On Sun, 2021-02-28 at 08:40 +0100, Jan Mercl wrote:
> Actually Go has that problem as well, just a thousand times smaller.
I'm curious where the meaningful whitespace is in Go (for amounts
differences in number greater than 1).
> FTR, I also think Python's approach to white space is a failure.
29 matches
Mail list logo