[go-nuts] gophers analysing genomes

2020-08-06 Thread 'Dan Kortschak' via golang-nuts
The genome of the New Zealand 'lizard', the tuatara[1], has just been sequenced and published in Nature[2,3]. The analysis of the genome included an examination of the repetitive sequences within the genome. The engine for finding novel repeats for this analysis is written in Go. Gophers analyse

Re: [go-nuts] gophers analysing genomes

2020-08-06 Thread Sebastien Binet
‐‐‐ Original Message ‐‐‐ On Thursday, August 6, 2020 9:16 AM, 'Dan Kortschak' via golang-nuts wrote: > The genome of the New Zealand 'lizard', the tuatara[1], has just been > sequenced and published in Nature[2,3]. > > The analysis of the genome included an examination of the repetitive

Re: [go-nuts] gophers analysing genomes

2020-08-06 Thread 'Dan Kortschak' via golang-nuts
On Thu, 2020-08-06 at 07:41 +, Sebastien Binet wrote: > ‐‐‐ Original Message ‐‐‐ > On Thursday, August 6, 2020 9:16 AM, 'Dan Kortschak' via golang-nuts > wrote: > > > The genome of the New Zealand 'lizard', the tuatara[1], has just > > been > > sequenced and published in Nature[2,3].

Re: [go-nuts] How to read (and write) the ECN bits?

2020-08-06 Thread Uli Kunitz
Reading is possible with IP_RECVTOS on Linux but requires the use of recvmsg, because the TOS field is provided as ancillary data. This wouldn't be very portable though. Raw sockets with IP_HDRINCL are a better option if portability is a concern. On Wednesday, August 5, 2020 at 11:33:41 PM UTC+

[go-nuts] Re: Generics and parentheses

2020-08-06 Thread Mike Schinkel
JMTCW: I think using square brackets [...] instead of parenthesis (...) is a good decision. And as someone whose programming experience has not been in C++ or Java, I always found angle brackets for generics to be rather confusing but do not find square brackets as confusing. So in my mind,

Re: [go-nuts] Generics and parentheses

2020-08-06 Thread Mike Schinkel
Hi Russ, In general, I think the proposal is a really good one. I like that you abandoned contracts as interfaces were just too similar, and personally I like the choice of square brackets. There are a few aspects I do not like — 1.) no zero value and 2.) lack of covariance and contravariance

[go-nuts] How does isAsyncSafePoint check preemptable?

2020-08-06 Thread HailangGe
Recently I was trying to understand how asynchronous preemption is implemented in Go 1.14 and basically figured out the call chain. sysmon ↓ retake ↓ preemptone ↓ preemptM ↓ signalM(mp, sigPreempt)//send SIGURG to mp ↓ doSigPreempt(signal handler)

[go-nuts] Re: How to print arrays with commas and brackets

2020-08-06 Thread ranjan1234biswa
Hello Michele This won't print in the array format rather it would print it in other way. stringArray := []string{"Hello", "world", "!"} fmt.Printf("[%s]", strings.Join(stringArray , ",")) Output [Hello,world,!] On Thursday, October 10, 2019 at 10:41:59 PM UTC+5:30, Michele Caci wrote:

Re: [go-nuts] Re: How to print arrays with commas and brackets

2020-08-06 Thread Raffaele Sena
One option is to use json.Marshal or json.Encoder.Encode fmt.Printf("%q", []string{"Hello", "world", "!") would quote the separate strings and put the square brackets, but doesn't comma separate the items. On Thu, Aug 6, 2020 at 9:24 AM wrote: > Hello Michele > > This won't print in the array

Re: [go-nuts] How to read (and write) the ECN bits?

2020-08-06 Thread David Finkel
On Thu, Aug 6, 2020 at 10:02 AM Uli Kunitz wrote: > Reading is possible with IP_RECVTOS on Linux but requires the use of > recvmsg, because the TOS field is provided as ancillary data. This wouldn't > be very portable though. Raw sockets with IP_HDRINCL are a better option if > portability is a c

[go-nuts] [security] Go 1.14.7 and Go 1.13.15 are released

2020-08-06 Thread Katie Hockman
Hi gophers, We have just released Go 1.14.7 and Go 1.13.15 to address a recently reported security issue. We recommend that all users update to one of these releases (if you’re not sure which, choose Go 1.14.7). - encoding/binary: ReadUvarint and ReadVarint can read an unlimited number of b

Re: [go-nuts] How does isAsyncSafePoint check preemptable?

2020-08-06 Thread Ian Lance Taylor
On Thu, Aug 6, 2020 at 7:49 AM HailangGe wrote: > > Recently I was trying to understand how asynchronous preemption is > implemented in Go 1.14 and > basically figured out the call chain. > > sysmon > ↓ > retake > ↓ > preemptone > ↓ > preemptM > ↓ > signalM(mp,

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-06 Thread Ian Lance Taylor
On Wed, Aug 5, 2020 at 8:52 PM Robert Engels wrote: > > I understand your point, but I think a few minor corrections Make a > difference - it does not matter that String supports + and not - , a string > would not be a Number. String concatenation is not addition. My point wasn't that a string

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-06 Thread Robert Engels
We’ll probably agree to disagree there. Java has a lot of generic code written and it’s never been a problem (using methods). Rarely can you write code that treats + the same no matter if passed a string or numeric. Even operators like < with strings don’t really make a lot of sense because di

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-06 Thread 'Axel Wagner' via golang-nuts
On Thu, Aug 6, 2020 at 8:53 PM Ian Lance Taylor wrote: > My point wasn't that a string is a number. My point was that the > current design draft permits writing a function that uses + and works > with both strings and numbers. Is there a need for that? I can't really imagine one. That being s

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-06 Thread Ian Lance Taylor
On Thu, Aug 6, 2020 at 12:10 PM Robert Engels wrote: > > We’ll probably agree to disagree there. Java has a lot of generic code > written and it’s never been a problem (using methods). Rarely can you write > code that treats + the same no matter if passed a string or numeric. > > Even operators

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-06 Thread Ian Lance Taylor
On Thu, Aug 6, 2020 at 12:11 PM Axel Wagner wrote: > > On Thu, Aug 6, 2020 at 8:53 PM Ian Lance Taylor wrote: >> >> My point wasn't that a string is a number. My point was that the >> current design draft permits writing a function that uses + and works >> with both strings and numbers. > > > Is

Re: [go-nuts] Generics and parentheses

2020-08-06 Thread 'Red Daly' via golang-nuts
Have the authors considered the implications of requiring the `type` keyword to use a generic type, not just at declaration time? Would this open up more syntax possibilities, such as `var x T`? This might be easier to read at the expense of five more characters of typing. It also could unify

Re: [go-nuts] Generics and parentheses

2020-08-06 Thread Ian Lance Taylor
On Thu, Aug 6, 2020 at 12:25 PM 'Red Daly' via golang-nuts wrote: > > Have the authors considered the implications of requiring the `type` keyword > to use a generic type, not just at declaration time? Would this open up more > syntax possibilities, such as `var x T`? This might be easier to >

Re: [go-nuts] Generics and parentheses

2020-08-06 Thread 'Axel Wagner' via golang-nuts
On Thu, Aug 6, 2020 at 9:26 PM 'Red Daly' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Have the authors considered the implications of requiring the `type` > keyword to use a generic type, not just at declaration time? Would this > open up more syntax possibilities, such as `var x T`?

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-06 Thread burak serdar
On Thu, Aug 6, 2020 at 1:17 PM Ian Lance Taylor wrote: > > On Thu, Aug 6, 2020 at 12:10 PM Robert Engels wrote: > > > > We’ll probably agree to disagree there. Java has a lot of generic code > > written and it’s never been a problem (using methods). Rarely can you write > > code that treats + t

[go-nuts] A database package to run RESTful actions gracefully and easily

2020-08-06 Thread Peter Bi
Dear Netters: This is my first release of the "godbi" package. You feedback is greatly appreciated. URL: https://github.com/genelet/godbi Thanks. Here are the first few sentences in README *godbi* adds a set of high-level functions to the generic SQL handle in GO, for easier database execu

[go-nuts] [generics] Trying to make some generic handler

2020-08-06 Thread dolanor
Hi, I'm quite happy about the generics so far, but now I'm trying some ideas that I don't know if they are possible or not given the current proposal. My idea, is to create some kind of generic handler for "net/http" that could be used in a whole project. It would allow same behavior on each rou

[go-nuts] [generics] type inference on an interface function param

2020-08-06 Thread dolanor
Hello, having fun with generics I stumbled upon this failure: https://go2goplay.golang.org/p/Dc3tWrd6RzQ Bryan C. Mills helped me to fix it by forcing the type at the call point. (the comment in the code) Forcing a type on a var you just declared is a little bit troublesome in this case, but i

[go-nuts] Re: distributed runtime

2020-08-06 Thread dolanor
I completely forgot about this thread. I wanted to thank you all for your insights. I've learned quite a few things, and can add many things to my "to dig" list! Le vendredi 3 janvier 2020 23:31:52 UTC+1, Dolanor Maergal a écrit : > > Hi all and Happy New Year, > > I was daydreaming the other da

[go-nuts] How to debug the func of makeSlice Or the map creating or growing process step by step

2020-08-06 Thread Chai Baoyang
Hi All, I want to know how the slice or map grow. Do we have an method to debug the func of makeSlice Or the map creating or growing process step by step? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gr

[go-nuts] When does golang use libc for syscall implementation

2020-08-06 Thread emeguag
I read somewhere (Very sorry I couldn't get the link now) that golang uses libc to implement syscalls when the code is built in c-shared mode. I want to check if this true. I was using a go c-shared library as a plugin in my C code, and I wanted to interpose some of the syscalls. If go really

[go-nuts] Is it possible to interpose exported functions.

2020-08-06 Thread emeguag
Here in the example below: package main import ( "C" "fmt" ) //export test func test() { fmt.Println("test code") } func main() { } The above package was built using -builtmode=c-shared. I wanted to load the built library in my C code, and interpose the esported function 't

[go-nuts] Why gollvm not support race detector?

2020-08-06 Thread Yuan Ting
Hi, I know from README that gollvm does not support race detector. Is there any technical problem? Is it possible to use ThreadSanitizer in LLVM to implement a workaround race detector in gollvm? Thanks. Ting -- You received this message because you are subscribed to the Google Groups "golang

Re: [go-nuts] Is it possible to interpose exported functions.

2020-08-06 Thread Lutz Horn
Am 07.08.20 um 05:00 schrieb emeg...@gmail.com: //export test func test() { fmt.Println("test code") } `test` is not exported. It would be, if it was called `Test` with a capital `T`. Lutz -- You received this message because you are subscribed to the Google Groups "golang-nuts" group