On Oct 18, 2016 2:56 AM, "Aram Hăvărneanu" wrote:
>
> On Mon, Oct 17, 2016 at 8:29 PM, Liam Breck
wrote:
> > bytes.Replace(s []byte, pos int, len uint, new []byte)
>
> I have no idea what this bizarre hypothetical function does. It's an
> awful interface that aims to solve an unknown problem nobo
> On Mon, Oct 17, 2016 at 8:29 PM, Liam Breck wrote:
>> bytes.Replace(s []byte, pos int, len uint, new []byte)
>
> I have no idea what this bizarre hypothetical function does. It's an
> awful interface that aims to solve an unknown problem nobody has
> claimed to have.
>
> Also, bytes.Replace alre
On Mon, Oct 17, 2016 at 8:29 PM, Liam Breck wrote:
> bytes.Replace(s []byte, pos int, len uint, new []byte)
I have no idea what this bizarre hypothetical function does. It's an
awful interface that aims to solve an unknown problem nobody has
claimed to have.
Also, bytes.Replace already exists.
On Oct 16, 2016 6:03 PM, "Liam Breck" wrote:
>
>
>
> On Sun, Oct 16, 2016 at 5:32 PM, Ian Lance Taylor wrote:
>>
>> On Sun, Oct 16, 2016 at 5:25 PM, Liam wrote:
>> >
>> > On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor
wrote:
>> >>
>> >> On Sun, Oct 16, 2016 at 3:34 PM, Liam w
On Sun, Oct 16, 2016 at 5:32 PM, Ian Lance Taylor wrote:
> On Sun, Oct 16, 2016 at 5:25 PM, Liam wrote:
> >
> > On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor wrote:
> >>
> >> On Sun, Oct 16, 2016 at 3:34 PM, Liam wrote:
> >> >
> >> > On Sunday, October 16, 2016 at 2:56:42 PM
On Sun, Oct 16, 2016 at 5:25 PM, Liam wrote:
>
> On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor wrote:
>>
>> On Sun, Oct 16, 2016 at 3:34 PM, Liam wrote:
>> >
>> > On Sunday, October 16, 2016 at 2:56:42 PM UTC-7, Ian Lance Taylor wrote:
>> >
>> >> To argue that this should go i
On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor wrote:
>
> On Sun, Oct 16, 2016 at 3:34 PM, Liam >
> wrote:
> >
> > On Sunday, October 16, 2016 at 2:56:42 PM UTC-7, Ian Lance Taylor wrote:
> >
> >> To argue that this should go into the standard library, look at some
> >> c
On Sun, Oct 16, 2016 at 3:34 PM, Liam wrote:
>
> On Sunday, October 16, 2016 at 2:56:42 PM UTC-7, Ian Lance Taylor wrote:
>
>> To argue that this should go into the standard library, look at some
>> corpus of Go code and find out how often it occurs. If it occurs
>> fairly often, you've got a goo
On Sunday, October 16, 2016 at 2:56:42 PM UTC-7, Ian Lance Taylor wrote:
>
>
> > A function to insert a byte into a slice is conspicuous by its absence.
>
> It's a one-liner.
> append(s[:p], append([]byte{b}, s[p:]...)...)
>
This is already gobbledygook :) Does that read "Insert" to you
On Sun, Oct 16, 2016 at 1:49 PM, Liam wrote:
>
> A function to insert a byte into a slice is conspicuous by its absence.
It's a one-liner.
append(s[:p], append([]byte{b}, s[p:]...)...)
(You may want to look at https://github.com/golang/go/wiki/SliceTricks).
> // but instead it's gob
A function to insert a byte into a slice is conspicuous by its absence.
Consider this code to parse /proc/meminfo into a 2D array and insert commas:
MemTotal: 497464 kB
MemFree: 386232 kB
MemAvailable: 452420 kB
Buffers:8612 kB
Cached:
11 matches
Mail list logo