[go-nuts] Which is the most efficient way to read STDIN lines 100s of MB long and tens of MB info is passed to it

2022-05-07 Thread Constantine Vassilev
I need to write a program that reads STDIN and should output every line that contains a search word "test" to STDOUT. How I can test that considering the problem is a line can be 100s of MB long (\n is line end) and tens of MB info is passed to it. -- You received this message because you

Re: [go-nuts] What are debian:buster-slim advantages vs alpine ones?

2020-12-16 Thread Constantine Vassilev
What about the size of images? For pure Golang project what are the advantages of glibc? For a project I have to present pro and cons before the team to decide. On Tuesday, December 15, 2020 at 6:03:29 PM UTC-8 amits...@gmail.com wrote: > > > On Wed, 16 Dec 2020, 12:38 pm Constantine

[go-nuts] What are debian:buster-slim advantages vs alpine ones?

2020-12-15 Thread Constantine Vassilev
All examples in Google Cloud Run for building Golang Docker images are based on Debian. FROM golang:alpine AS builder ... FROM debian:buster-slim ... What are debian:buster-slim advantages vs alpine ones? -- You received this message because you are subscribed to the Google Groups "golang-nut

[go-nuts] Re: draft designs for file system interfaces & file embedding

2020-11-30 Thread Constantine Vassilev
I made it work with status web site in the folder "www": --- package main import ( "embed" "log" "net/http" ) //go:embed www var src embed.FS func main() { // http://localhost:8080/www/ filehandler := http.FileServer(http.FS(src)) http.Handle("/", http.StripPrefix("/", filehandler)) // Run the

Re: [go-nuts] Re: draft designs for file system interfaces & file embedding

2020-11-30 Thread Constantine Vassilev
Thank you for sharing your experience! On Sunday, November 29, 2020 at 6:38:56 AM UTC-8 peterGo wrote: > On Saturday, November 28, 2020 at 3:59:21 PM UTC-5 Constantine Vassilev > wrote: > >> I generated it from the source. I that the version I need? >> >> go version d

Re: [go-nuts] Re: draft designs for file system interfaces & file embedding

2020-11-28 Thread Constantine Vassilev
I generated it from the source. I that the version I need? go version devel +4ce0a7cea6 Sat Nov 28 18:42:44 2020 + darwin/amd64 On Saturday, November 28, 2020 at 12:08:29 PM UTC-8 Ian Lance Taylor wrote: > On Sat, Nov 28, 2020 at 10:27 AM Constantine Vassilev > wrote: > > >

[go-nuts] Re: draft designs for file system interfaces & file embedding

2020-11-28 Thread Constantine Vassilev
I would like to test it. How to install the go 1.16 tip version? On Tuesday, July 21, 2020 at 8:22:30 AM UTC-7 Russ Cox wrote: > Hi all, > > I've posted two draft designs: one introducing general-purpose file system > interfaces, with Rob Pike; and one for embedding files into Go programs, > wi

[go-nuts] gomobile + macOS + Catalyst

2020-07-29 Thread Constantine Vassilev
With macOS 10.15, users can build iPad apps to run on macOS using Catalyst. Does anyone had a success in binding for Apple Catalyst? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails f

[go-nuts] Re: How to convert time interval in days to human readable form?

2020-01-24 Thread Constantine Vassilev
I've the start-end date, then how to do that? On Friday, January 24, 2020 at 9:06:12 AM UTC-8, Constantine Vassilev wrote: > > I have the following task: > > 1) a number representing days. > 2) how to convert it to human readable form? > > Like this: > 11 years 3

[go-nuts] How to convert time interval in days to human readable form?

2020-01-24 Thread Constantine Vassilev
I have the following task: 1) a number representing days. 2) how to convert it to human readable form? Like this: 11 years 3 months 5 days The actual calculations are: 4095 days = 136.5 months = 11.375 years -- You received this message because you are subscribed to the Google Groups "golan

[go-nuts] Re: How to implement Segment Tree in key/value datastore to use Google S2 geometry?

2018-01-14 Thread Constantine Vassilev
; > 2018. január 14., vasárnap 5:48:11 UTC+1 időpontban Constantine Vassilev a > következőt írta: >> >> I need to implement the following: >> >> 1) I have a database of ~100 mil records. >> >> Each record is of type key/value. >> >> The key is an interna

[go-nuts] How to implement Segment Tree in key/value datastore to use Google S2 geometry?

2018-01-13 Thread Constantine Vassilev
I need to implement the following: 1) I have a database of ~100 mil records. Each record is of type key/value. The key is an internal ID of type: "123456789". The value is a kml with geographic boundary in form of lat/lon coordinates: http://www.opengis.net/km

Re: [go-nuts] http.FileServer: how to serve static files requested from different domains?

2018-01-13 Thread Constantine Vassilev
Path + "/Desktop/" + "www.domain.com" fs := http.StripPrefix("/", http.FileServer(http.Dir(webrootStr))) fs.ServeHTTP(w, r) } } ... http.HandleFunc("/assets/", wwwAssetsHandler) ... On Tuesday, January 9, 2018 at 10:32:43 AM UTC-8, Ayan George wrote: > >

[go-nuts] http.FileServer: how to serve static files requested from different domains?

2018-01-09 Thread Constantine Vassilev
I have web server serving requests from two domains: domain1.com and domain2.com The assets directories are different for the two domains. webrootdomain1/assets and webrootdomain2/assets How to make the handler for assets to serve different directory depending from the requests from different

Re: [go-nuts] Re: [ANN] Go geospatial libraries: geometries, GeoJSON, WKB, KML, PostGIS, GPX, polyline

2017-03-30 Thread Constantine Vassilev
> e, err := enckml.Encode(g) > if err != nil { > log.Fatal(err) > } > if err := kml.KML(kml.Placemark(e)).Write(os.Stdout); err != nil { > log.Fatal(err) > } > // Output: > // > // http://www.opengis.net/kml/2.2 > ">2,4 > } > > 8< > >

[go-nuts] Re: [ANN] Go geospatial libraries: geometries, GeoJSON, WKB, KML, PostGIS, GPX, polyline

2017-03-27 Thread Constantine Vassilev
How to use go-geom to convert WKBHEX to KML? Are there a simple example? On Sunday, November 13, 2016 at 10:33:27 AM UTC-8, Tom Payne wrote: > > A quick announce of a few libraries for geospatial applications that are > now mature and battle-tested: > > https://github.com/twpayne/go-geom : effic

[go-nuts] http/2 with go version 1.6.2 not working under iOS 9 mobile Safari

2016-07-02 Thread Constantine Vassilev
I am using go version 1.6.2 to set up a web page to work with http/2. It is working on desktop but in iOS 9 mobile Safari the site does not loads. Here is my setup: OS El Capitan Version 10.11.5 === s := http.Server{Addr: addr + ":443"} http2.ConfigureServer(&s, nil) err := s.ListenAndS