[go-nuts] cgo with custom toolchain

2018-12-29 Thread eran . yasso
Hi, Any example on how I can build cgo code using custom toolchain? Thanks, -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[go-nuts] Type inference in non-constant shift expressions

2018-12-29 Thread Caleb Spare
I noticed the following: package main func main() { x := float64(1 << 3) // fine (constant expression) v := uint(3) x = float64(1 << v) // invalid operation: 1 << uint(v) (shift of type float64) _ = x } (playground: https://play.golang.org/p/xMhEvyMw0wg) It's clear from the spec why the

[go-nuts] missing fmt.Error(...interface{})

2018-12-29 Thread Liam Breck
What's the rationale for omission of: fmt.Error(a ...interface{}) error Given that other fmt functions come in that variety? I realize it can be achieved like this, but so can fmt.Errorf errors.New(fmt.Sprint(...)) Would a proposal to add it be entertained? Happy New Year to all :-) --

[go-nuts] Re: Using of packages

2018-12-29 Thread Jason E. Aten
On Saturday, December 29, 2018 at 10:02:55 PM UTC-6, Andrey Savchuk wrote: > > I'm a beginner in Golang and quite confusing about using packages in a > program. For example, every non simple software has a bunch of classes and > interfaces or utility classes which are usually lokated in

[go-nuts] Re: WebP encoder

2018-12-29 Thread Jeffrey
since the libwebp has released the version 1.0.0, so it's time to port it to pure golang -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[go-nuts] go for robotic control, walking balance, quad flight control

2018-12-29 Thread Pat Farrell
I need a project to motivate myself into writing some non-trivial go. So I want to learn about implementing control theory, sensors, etc. Things like IMU (gyro, 3D magnetic compass, and accelerometer) GPS. Not only do I want to talk to the sensors, but I want to implement Kalman filters, PID

Re: [go-nuts] regexp: is there a way to match single byte ?

2018-12-29 Thread Michael Jones
oops! typo: https://play.golang.org/p/VYo9GTz63Hc On Sat, Dec 29, 2018 at 8:47 PM Michael Jones wrote: > Never use a cannon as a fly swatter. > A regular expression is heavy artillery. > A for-loop will do just fine: smaller, simpler, faster, land ess > dependencies: > >

Re: [go-nuts] regexp: is there a way to match single byte ?

2018-12-29 Thread Michael Jones
Never use a cannon as a fly swatter. A regular expression is heavy artillery. A for-loop will do just fine: smaller, simpler, faster, land ess dependencies: https://play.golang.org/p/2nr4VdkqaNF On Sat, Dec 29, 2018 at 8:17 PM Matt Harden wrote: > I don't believe the regexp package allows

Re: [go-nuts] regexp: is there a way to match single byte ?

2018-12-29 Thread Matt Harden
I don't believe the regexp package allows matching of bytes rather than utf-8 sequences. On Sat, Dec 15, 2018 at 3:05 AM Tamás Gulácsi wrote: > For such a simple match, I'd use two bytes.Index with an if in a for cycle. > > -- > You received this message because you are subscribed to the Google

[go-nuts] Re: Is it possible to read big xml/stream request partly using gin/fasthttp webserver

2018-12-29 Thread desaiabhijit
This will then work for me Thanks very much Tamas On Saturday, December 29, 2018 at 8:53:46 PM UTC+5:30, Tamás Gulácsi wrote: > > resp.Body is already an io.Reader, sou you can read it in chunks as you > wish. > > 2018. december 29., szombat 12:09:56 UTC+1 időpontban Abhijit Desai a >

Re: [go-nuts] http.Get not retrieving properly encoded page compared to browser

2018-12-29 Thread Dan Kortschak
It appears that this is due to the browser not knowing that the downloaded file is UTF-8; adding  to the page fixes the problem. So this is not a Go / "net/http" issue. On Sun, 2018-12-30 at 11:05 +1030, Dan Kortschak wrote: > I am putting together a tiny tool to archive the go.science G+ group

[go-nuts] Using of packages

2018-12-29 Thread cinematown
I'm a beginner in Golang and quite confusing about using packages in a program. For example, every non simple software has a bunch of classes and interfaces or utility classes which are usually lokated in different packages in the same program. So using them in Java fo example makes no

Re: [go-nuts] How to inplement C# DESCryptoServiceProvider in Go Lang?

2018-12-29 Thread kanakaraj751
*What algorithm using Rfc2898DeriveBytes* On Sunday, October 11, 2015 at 2:36:23 PM UTC+5:30, Skip wrote: > > i'm guessing iteration and/or hash function doesn't match. however, i'm > not an expert; hopefully someone with first hand experience with pbkdf1 > will comment. > > if this is for a

[go-nuts] http.Get not retrieving properly encoded page compared to browser

2018-12-29 Thread Dan Kortschak
I am putting together a tiny tool to archive the go.science G+ group for future archeology. However, I have run into an issue that I don't understand and so don't know how to fix. The code is here: https://play.golang.org/p/1vVm5dvVueS This takes in a the Takeout JSON for the community's posts

[go-nuts] Re: Closure, recursion and higher-order functions

2018-12-29 Thread David Collier-Brown
Recursion often, iteration *very* often, closure with care and conscious effort. Higher order functions? Generate and execute all the time, passing and using functions a bit less. R, I and H are easy to reason about, you see. C takes due care. --dave -- You received this message because you

Re: [go-nuts] Closure, recursion and higher-order functions

2018-12-29 Thread Justin Israel
On Sun, Dec 30, 2018 at 5:07 AM 伊藤和也 wrote: > How often do you use closure, recursion and higher-order functions? > I use closuresquite often, and recusion here and there as needed. > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To

[go-nuts] Closure, recursion and higher-order functions

2018-12-29 Thread 伊藤和也
How often do you use closure, recursion and higher-order functions? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For

[go-nuts] Re: Is it possible to read big xml/stream request partly using gin/fasthttp webserver

2018-12-29 Thread Tamás Gulácsi
resp.Body is already an io.Reader, sou you can read it in chunks as you wish. 2018. december 29., szombat 12:09:56 UTC+1 időpontban Abhijit Desai a következőt írta: > > > Not xml decoder... I mean want to capture stream chunk/parts when part > data arrived at web server > Don't want to wait to

[go-nuts] Re: Is it possible to read big xml/stream request partly using gin/fasthttp webserver

2018-12-29 Thread desaiabhijit
Not xml decoder... I mean want to capture stream chunk/parts when part data arrived at web server Don't want to wait to receive entire file/request and then process rather want to process whatever comes in Thanks for the reply On Saturday, December 29, 2018 at 3:24:54 PM UTC+5:30, Tamás

[go-nuts] Is it possible to read big xml/stream request partly using gin/fasthttp webserver

2018-12-29 Thread Tamás Gulácsi
Yes, use xml.NewDecoder(r.Br.Body) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit