Re: [go-nuts] how to get dirt memory in go

2025-01-16 Thread Vasiliy Tolstov
Thanks, i'm check вт, 14 янв. 2025 г. в 16:49, Jan Mercl <0xj...@gmail.com>: > > On Tue, Jan 14, 2025 at 2:44 PM Vasiliy Tolstov wrote: > > > Hi! I'm try to search answers but have no luck. In go i can create > > memory arena/ buffer pool etc.. > > B

Re: [go-nuts] Re: how to get dirt memory in go

2025-01-16 Thread Vasiliy Tolstov
Thanks, i'm check bench with modernc ср, 15 янв. 2025 г. в 10:57, tapi...@gmail.com : > > see https://go101.org/q-and-a/make-dirty-byte-slices.html > > On Tuesday, January 14, 2025 at 9:44:40 PM UTC+8 Vasiliy Tolstov wrote: >> >> Hi! I'm try to search answers bu

[go-nuts] how to get dirt memory in go

2025-01-14 Thread Vasiliy Tolstov
Hi! I'm try to search answers but have no luck. In go i can create memory arena/ buffer pool etc.. But does it possible to get memory with like make([]byte, XXX) but without calloc for this memory? So i need to get raw memory from kernel without spending time to clearing it. -- Vasiliy To

Re: [go-nuts] ANN: selfy for self-signed certs. rpc25519 for blazing QUIC based RPC

2024-10-23 Thread Vasiliy Tolstov
All > in all, kind of delightful. > > Feedback welcome. > > Enjoy, > > Jason > > -- > 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 &

[go-nuts] Re: custom coverage report

2023-08-24 Thread Vasiliy Tolstov
Anybody knows golang package that can write cover files in desired format? вс, 20 авг. 2023 г. в 17:28, Vasiliy Tolstov : > > Hi. I have service centric tests - so i want to test not each function > inside application, but only it handlers (defined via protobuf) > Also i have cust

[go-nuts] custom coverage report

2023-08-20 Thread Vasiliy Tolstov
coverage , but don't understand how to do that? Is that possible to have another way to measure handlers coverage in case of service defined via protobuf? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-n

Re: [go-nuts] Re: smarter way to provide interface capabilities from underlining interface

2023-06-11 Thread Vasiliy Tolstov
f interfaces in descending order... But don't understand how this can be optimized... May be run profile with all known sql drivers and create pairs with most used combinations ? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru На 11 июня 2023 г., 19:31:01, Brian Candler написали: > I thin

[go-nuts] smarter way to provide interface capabilities from underlining interface

2023-06-10 Thread Vasiliy Tolstov
combo list of methods and generate interfaces for this methods. But this brings file that contains 20K lines https://git.unistack.org/unistack-org/micro-wrapper-sql/src/branch/master/wrap_gen.go Does it possible to have smaller code that provides the same effect? Or I'm miss something? -- Vasil

Re: [go-nuts] what's the most popular kafka library to use

2023-03-13 Thread Vasiliy Tolstov
I'm try all kafka libraries and my list: 1. github.com/twmb/franz-go/kgo - the best, no problems is around 1.5-2 years 2. github.com/segmentio/kafka-go (cool but have some errors 1.5 years ago, so i broke my production cluster with it) -- Vasiliy Tolstov, e-mail: v

[go-nuts] allow to use fieldaligment with own golang code

2021-12-04 Thread Vasiliy Tolstov
ecker/checker.go i'm also create golang protobuf issue about field alignment because sometimes generated structs have 3x memory usage vs properly aligned struct. What can you suggests ? I don't think that golang protobuf devs fix this in near feature.. or i'm wrong? Vasiliy Tol

[go-nuts] question about httputil. NewSingleHostReverseProxy

2021-10-18 Thread Vasiliy Tolstov
xy handler. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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...@googlegrou

Re: [go-nuts] macos file provider handling with golang

2021-09-25 Thread Vasiliy Tolstov
may be, but i don't understand how to connect it to swift based api and run on m1 macbook пт, 24 сент. 2021 г. в 19:38, Ian Lance Taylor : > > On Fri, Sep 24, 2021 at 9:00 AM Vasiliy Tolstov wrote: > > > > Hi. Does anybody knows how to call macos functions from go? >

Re: [go-nuts] Re: macos file provider handling with golang

2021-09-25 Thread Vasiliy Tolstov
; https://groups.google.com/d/msgid/golang-nuts/c9321e1c-2999-4590-a94b-57de6e3e3c59n%40googlegroups.com. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] macos file provider handling with golang

2021-09-24 Thread Vasiliy Tolstov
Hi. Does anybody knows how to call macos functions from go? Mostly my question about file provider methods, i want to write something that works as file provider for macos -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google

Re: [go-nuts] Re: Generating go code using go templates

2021-09-20 Thread Vasiliy Tolstov
p receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/406179d9-c8f5-497d-8832-ea04ff9d03b3n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nut

Re: [go-nuts] write func with optional bool return value

2021-08-27 Thread Vasiliy Tolstov
to have the same type as > `append`). > > What you ask is just categorically impossible in Go. > > On Fri, Aug 27, 2021 at 5:06 PM Vasiliy Tolstov wrote: >> >> I know, so my question is - does it possible to write such functions >> like builtin? For example I can

Re: [go-nuts] write func with optional bool return value

2021-08-27 Thread Vasiliy Tolstov
in behavior specific to some features. > > A good way to approach what you want is by assigning it to the anonymous '_' > var when you don't want the returned bool. > > Hope this helps > > Le ven. 27 août 2021 à 16:58, Vasiliy Tolstov a écrit : >> >

[go-nuts] write func with optional bool return value

2021-08-27 Thread Vasiliy Tolstov
Does it possible to have own func that have string, bool return value, but bool value optional? Like receiving from channel or get element from map, or like when casting to some type interface? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are

Re: [go-nuts] Re: sort string slice like it contains key,val

2021-03-14 Thread Vasiliy Tolstov
posted by Carla above with an added step to > remove duplicates seems like the best solution. > Thanks for all help > On Sat, Mar 13, 2021 at 11:27 PM Vasiliy Tolstov wrote: >> >> вс, 14 мар. 2021 г. в 01:10, Brian Candler : >> > >> > If I understand rig

Re: [go-nuts] Re: sort string slice like it contains key,val

2021-03-13 Thread Vasiliy Tolstov
,"xxxval","zzzkey","val"} >> >> So i'm sort by "key" and if key is duplicated - last wins. >> Mostly i want to avoid creating helper slices that contains keys and >> vals dedicated, does it possible to do sorting only by sw

Re: [go-nuts] sort string slice like it contains key,val

2021-03-13 Thread Vasiliy Tolstov
g the previously advised solution you can just range the slice *after* > you sort it, so you can just check for the next element, which I'd say is not > *too bad*, what are your performance constraints? > > Le sam. 13 mars 2021 à 21:33, Vasiliy Tolstov a écrit : >> >&g

Re: [go-nuts] sort string slice like it contains key,val

2021-03-13 Thread Vasiliy Tolstov
next element, which I'd say is not > *too bad*, what are your performance constraints? > > Le sam. 13 mars 2021 à 21:33, Vasiliy Tolstov a écrit : >> >> Looks fine =) But how to remove duplicates? >> I'm found this stuff >> https://github.com/campoy/uniqu

Re: [go-nuts] sort string slice like it contains key,val

2021-03-13 Thread Vasiliy Tolstov
u 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid

[go-nuts] sort string slice like it contains key,val

2021-03-13 Thread Vasiliy Tolstov
quot;xxxkey","xxxval","zzzkey","val"} So i'm sort by "key" and if key is duplicated - last wins. Mostly i want to avoid creating helper slices that contains keys and vals dedicated, does it possible to do sorting only by swapping "key/val&quo

[go-nuts] best way and race free case to transfer some value in context to caller

2021-02-11 Thread Vasiliy Tolstov
rspCodeKey{}).(*rspCodeVal); ok { code = rsp.code } return code } ``` -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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

[go-nuts] return own custom error from template while it executed

2021-01-14 Thread Vasiliy Tolstov
Hi. I can't find in google how to solve my problem. Inside text/template i want to check some passed data and return some descriptive text if conditions not matching. I don't have ability to check it before template executed. Does it possible? -- Vasiliy Tolstov, e-mail: v.tols...

Re: [go-nuts] Re: protobuf avoid namespace conflict

2020-09-30 Thread Vasiliy Tolstov
elp to give more specific advice...). > > *Joop Kiefte* - Chat @ Spike > <https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=pgfpn> [image: > pgfpn] > > On September 30, 2020 at 13:26 GMT, Vasiliy Tolstov > wrote: > > > So nobody knows how to deal

[go-nuts] Re: protobuf avoid namespace conflict

2020-09-30 Thread Vasiliy Tolstov
So nobody knows how to deal with this? And if some projects have proto files with the same name - protobuf always complain about it? вт, 29 сент. 2020 г. в 10:50, Vasiliy Tolstov : > > Hi! I have two packages server and client. All belongs to different > repos. In this packages i have

[go-nuts] protobuf avoid namespace conflict

2020-09-29 Thread Vasiliy Tolstov
/internal/errors" currently from: ""xxx.org/client/internal/errors" A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru --

[go-nuts] add method to interface via reflect

2020-09-10 Thread Vasiliy Tolstov
Hi! Does go support adding method to exiting interface via reflect? Mostly I need to add method to struct pointer. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] go mod why with specific version

2020-08-08 Thread Vasiliy Tolstov
files for version , but all files contain lower version of dep. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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 e

Re: [go-nuts] CGo-free SQLite database/sql driver for linux/amd64 v1.4.0-beta1 is released

2020-07-27 Thread Vasiliy Tolstov
To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/CAA40n-VUH5qDdJW1oVPbbdyuMe%3DH2XOvUFU3tXrsTWMj1RS6sg%40mail.gmail.com. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-18 Thread Vasiliy Tolstov
o it without the >> > slice tricks: https://play.golang.org/p/tNAPOcQqApN >> > It does take an additional Sprintf() though. >> > >> >> Thanks, looks good. But i think for go devs adding additional format >> that can be used to specify milli/micro/nano seconds wi

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-16 Thread Vasiliy Tolstov
ding additional format that can be used to specify milli/micro/nano seconds will be easy. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emai

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-14 Thread Vasiliy Tolstov
hat needs to be preprocessed before usage =) Format means that you get a needed sting and not that you must use slice manipulation. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To un

[go-nuts] golang time.Now().Format with milliseconds without dot in string

2020-07-14 Thread Vasiliy Tolstov
Hi! I'm read several times godoc about the time package but have now way to deal with it. I need to output strings with format MMDDHHMMSSMILLISEC without dot in string. But go able to output milliseconds only in case of .000 -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You rec

Re: [go-nuts] golang protobuf, struct copy problem

2020-05-19 Thread Vasiliy Tolstov
isit > https://groups.google.com/d/msgid/golang-nuts/71BBB1B9-9CDB-4E46-A486-A1FC7BF362BC%40ix.netcom.com. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group an

[go-nuts] gob or protobuf serialization question

2020-03-22 Thread Vasiliy Tolstov
d protobuf message of needed type with all fields as zero, protobuf must reconstruct proto.Message from it. But cos says that this is not publically available. So my questions: why this is not available and how to deal with my use-case ? Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- Yo

Re: [go-nuts] how to design log package to avoid allocations

2020-03-09 Thread Vasiliy Tolstov
st simple case is check each time log level , and output log only if level satisfied. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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

Re: [go-nuts] how to design log package to avoid allocations

2020-03-09 Thread Vasiliy Tolstov
пн, 9 мар. 2020 г. в 19:41, andrey mirtchovski : > to avoid allocations you have to hint at the type of what you're going > to print. for example see/use zerolog: https://github.com/rs/zerolog Tanks, I saw it. But mostly i want to avoid typing hint -- Vasiliy Tolstov, e-m

[go-nuts] how to design log package to avoid allocations

2020-03-09 Thread Vasiliy Tolstov
;, msg) i'm allocate memory. I don't want to guard all calls to check enabled log level to avoid allocation. How can i do zero allocation log in such case? Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google G

[go-nuts] forbid downloading package without go.mod enabling

2020-01-29 Thread Vasiliy Tolstov
ed in readme go module usage not helps). -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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 golan

[go-nuts] Re: run tests for all sub modules

2020-01-20 Thread Vasiliy Tolstov
So this is impossible with per package modules in one repo? вс, 19 янв. 2020 г. в 02:39, Vasiliy Tolstov : > > Hi! I have one repo with multiple packages. For each package i have > dedicated go.mod (this is a requirement because repo is collection of > plugins with many deps). >

[go-nuts] run tests for all sub modules

2020-01-18 Thread Vasiliy Tolstov
o.mod' , collect all dirs and run go test for all of them. Is it possible to have something less ugly? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this grou

Re: [go-nuts] Re: help with reflect

2019-12-12 Thread Vasiliy Tolstov
вт, 10 дек. 2019 г. в 00:49, Dan Kortschak : > > On Mon, 2019-12-09 at 14:57 +0300, Vasiliy Tolstov wrote: > > Nevermind. I found the error > > https://paulcunningham.me/nevermind-found-answer/ > Ok, sorry, i'm try to provide answer for next time =) -- Vasil

Re: [go-nuts] Announcing sqlc: Compile SQL queries to type-safe Go

2019-12-11 Thread Vasiliy Tolstov
scribed 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nut

[go-nuts] Re: help with reflect

2019-12-09 Thread Vasiliy Tolstov
Nevermind. I found the error пн, 9 дек. 2019 г. в 12:30, Vasiliy Tolstov : > > Hi! I'm stuck at reflection based struct assignment. > > example struct > type TestStruct struct { > Slice []*string > } > > func TestReflect(t *testing.T) { > s1 := "one&quo

[go-nuts] Re: help with reflect

2019-12-09 Thread Vasiliy Tolstov
some text after some changes i have reflect: call of reflect.Value.NumField on ptr Value so reflect.New(sfield.Type.Elem()).Elem() returns pointer to needed struct, but if i'm use reflect.Indirect i have nil variable and can't do NumField on it пн, 9 дек. 2019 г. в 12:30, Vasil

[go-nuts] help with reflect

2019-12-09 Thread Vasiliy Tolstov
) } } but i'm have error panic: reflect: reflect.flag.mustBeAssignable using unaddressable value [recovered] panic: reflect: reflect.flag.mustBeAssignable using unaddressable value -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed t

[go-nuts] transparent mitmproxy with cert caching

2019-09-27 Thread Vasiliy Tolstov
Hi!. I found many mitmproxy tools in go, but can't find any that able to cache generated certificates. I think that this is saves compute time. Also i want to modify it to work with uBlock to deny unneeded requests. Do you know anything about this? -- Vasiliy Tolstov, e-mail: v.tols...@self

Re: [go-nuts] Get struct type , save and reconstruct empty struct later

2019-07-20 Thread Vasiliy Tolstov
Thanks for link doc. It is very useful. Now i think that i'm try to use protobuf Any (as all of my struct are protobuf proto.Message. As i understand via protobuf i can register needed Req/Rsp empty messages via Any, and later unmarshal message to this empty structs. -- Vasiliy Tolstov, e

Re: [go-nuts] Get struct type , save and reconstruct empty struct later

2019-07-20 Thread Vasiliy Tolstov
Thanks, something like this, but i need to store type in string or []byte in db, and based on this create new empty struct. сб, 20 июл. 2019 г., 10:55 Jan Mercl <0xj...@gmail.com>: > On Sat, Jul 20, 2019 at 9:28 AM Vasiliy Tolstov > wrote: > > > Hi. I have reflection based

[go-nuts] Get struct type , save and reconstruct empty struct later

2019-07-20 Thread Vasiliy Tolstov
Hi. I have reflection based question. I need to store type of struct passed to func and later based on this stored type reconstruct empty needed struct. Does this possible ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

Re: [go-nuts] listen port auto allocation questions

2019-07-13 Thread Vasiliy Tolstov
back into the store for the next micro-service to use. > > I think etcd [1], may be a good use case for this. I think about it, but then we pass to kernel port 0, it allocates free port, but this is not mean that after millisecond this port not be used by other service -- Vasiliy Tolstov

[go-nuts] listen port auto allocation questions

2019-07-13 Thread Vasiliy Tolstov
in use when start by other service. How can i'm avoid such errors and not specify ports by hand? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] get interface and method name

2019-07-12 Thread Vasiliy Tolstov
чт, 11 июл. 2019 г. в 00:27, Ian Lance Taylor : > > On Wed, Jul 10, 2019 at 1:40 PM Vasiliy Tolstov wrote: > > > > Hi! i have interface like > > > > type AccountService interface { > > Create(context.Context) error > > } > > > > if i ne

[go-nuts] get interface and method name

2019-07-10 Thread Vasiliy Tolstov
).Pointer()).Name(), ".") return parts[len(parts)-2] + "." + parts[len(parts)-1] it returns string "AccountService.Create" Does it possible to get this not using runtime? only via reflect and may be without strings ? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru

Re: [go-nuts] Re: net.InterfaceAddrs() error and returned addr slice

2019-06-05 Thread Vasiliy Tolstov
чт, 16 мая 2019 г. в 19:04, : > > > > On Wednesday, May 15, 2019 at 5:00:26 PM UTC-4, Vasiliy Tolstov wrote: >> >> Hi! I have error from net.InterfaceAddrs() like route ip+net: no such >> network interface >> i think that error happened because i have do

[go-nuts] net.InterfaceAddrs() error and returned addr slice

2019-05-15 Thread Vasiliy Tolstov
available ip. So if this function not fills the slice , i need to use different method to get all addresses. Can you helps me? P.S. Error not easy to reproduce in my case, so i can't easy check does InterfaceAddrs slice filled in case of error. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru --

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
ions/130847/how-tls-certificate-chain-is-verified > > Thank you for help. Now i think that i have all needed pieces and next steps is to write simple code that acts like i need =) -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
r? > Thanks looks fine, but does i need to always have root ca to trust intermediate certs? Or if i have custom validation in tls.Config i don't need it? For example i'm pass root ca fingerprint to service, does it possible to trust all intermediates if they issued by root CA that h

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
ed CA cert, and trust all intermediate cert from it. Also trust all client certs from it intermediates. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
Also if i use own root ca to issue intermediate cert that used for issue client certs. How can i check that intermediate ca is issued by root ca? вт, 30 апр. 2019 г., 10:48 Vasiliy Tolstov : > Hi! May be i miss something, how can i get ca cert fingerprint in go via > builtin packages if

[go-nuts] Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
Hi! May be i miss something, how can i get ca cert fingerprint in go via builtin packages if i have client cert issued via this ca? -- 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,

Re: [go-nuts] Re: Mutual tls example

2019-04-22 Thread Vasiliy Tolstov
пн, 22 апр. 2019 г. в 20:06, Timothy Raymond : > > I believe Liz Rice covered this in her GopherCon 2018 talk on TLS > connections: https://www.youtube.com/watch?v=kxKLYDLzuHA > Thank you this is very helpful for me. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You r

Re: [go-nuts] Mutual tls example

2019-04-21 Thread Vasiliy Tolstov
, > http.Handler), 0), > } > > log.Fatal(srv.ListenAndServeTLS(*publicCertificate, *privateKey)) > > > 2. Look into http.Request, under TLS.PeerCertificates array > -- > -- Aldrin Leal, / https://ingenieux.io/about/ > > > On Sun, Apr 21, 2019 at 7

[go-nuts] Mutual tls example

2019-04-21 Thread Vasiliy Tolstov
Hi, I'm try to find mutual tls example in go, but can't find simple example that uses crypto/tls. I need server that for some http handler for user request with token returns tls cert for communication, and client that uses this cert to communication after it returned from request. Ideally with abi

Re: [go-nuts] Re: bin packing or knapsack

2018-12-17 Thread Vasiliy Tolstov
Thanks, Jason! вс, 16 дек. 2018 г. в 06:00, Jason E. Aten : > > search for branch-and-bound; e.g. > https://www.geeksforgeeks.org/0-1-knapsack-using-branch-and-bound/ > > On Saturday, December 15, 2018 at 5:01:51 PM UTC-6, Vasiliy Tolstov wrote: >> >> Hi! i have ta

[go-nuts] bin packing or knapsack

2018-12-15 Thread Vasiliy Tolstov
info about solving bin packing/knapsack for such cases? Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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, se

[go-nuts] Load balancing based on task memory and cpu requirement

2018-11-27 Thread Vasiliy Tolstov
Hi all. I have bunch of tasks that have predictable memory and cpu usage. I need to run them on some nodes in optimal case - fillup one node by one. Some task not needs to be run on the same node. Does anybody knows package that already provide ability to select nodes with this requirements? -- Y

Re: [go-nuts] Q16.16 fixed point numbers in go

2018-10-25 Thread Vasiliy Tolstov
ср, 24 окт. 2018 г. в 19:52, Michael Jones : > > https://en.wikipedia.org/wiki/Q_(number_format) says it all. > > you can use fixed point all the way...just shift after multiplies and before > divides and use double-width (int32) or wider math. > Thanks! -- Vasiliy Tolst

Re: [go-nuts] microservices framework

2018-10-23 Thread Vasiliy Tolstov
agger-to: https://github.com/Parquery/swagger-to > > Cheers Marko > > Le mar. 23 oct. 2018 à 19:02, Vasiliy Tolstov a écrit : >> >> Hi! I'm looking for new project some framework to write microservice based >> app. >> I'm found micro and go-kit. But mi

[go-nuts] microservices framework

2018-10-23 Thread Vasiliy Tolstov
based services) and as i see examples - sometimes compilcated. Does anybody knows alternatives? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop rec

Re: [go-nuts] Q16.16 fixed point numbers in go

2018-10-22 Thread Vasiliy Tolstov
group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups &qu

Re: [go-nuts] Q16.16 fixed point numbers in go

2018-10-22 Thread Vasiliy Tolstov
Does it possible to avoid conversation and works only with fixed point (if this can bring performance speedup)? пн, 22 окт. 2018 г. в 16:13, Vasiliy Tolstov : > > пн, 22 окт. 2018 г. в 16:02, Jan Mercl <0xj...@gmail.com>: > > > > On Mon, Oct 22, 2018 at 2:35 P

Re: [go-nuts] Q16.16 fixed point numbers in go

2018-10-22 Thread Vasiliy Tolstov
пн, 22 окт. 2018 г. в 16:02, Jan Mercl <0xj...@gmail.com>: > > On Mon, Oct 22, 2018 at 2:35 PM Vasiliy Tolstov wrote: > > > Does reading this 4 bytes to uint32 and use math.Float32frombits looks > > right? > > It does not look right, see > https://en

[go-nuts] Q16.16 fixed point numbers in go

2018-10-22 Thread Vasiliy Tolstov
? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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 opti

Re: [go-nuts] Re: splitting package question

2018-10-08 Thread Vasiliy Tolstov
you much time. :) > > The official linker does try to remove many unused functions. > Unused functions really need more time to compile. > > On Saturday, October 6, 2018 at 10:08:43 AM UTC-4, Vasiliy Tolstov wrote: >> >> Hi! >> I have some data that can be formatted

[go-nuts] splitting package question

2018-10-06 Thread Vasiliy Tolstov
unused functions and not include them in resulted binary? (if i don't use json Marshal/Unmarshal full json package not included in my binary) Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-n

Re: [go-nuts] implement something like writeback journal for writing files

2017-12-25 Thread Vasiliy Tolstov
t; You'll have to cache the file descriptors anyway. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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

Re: [go-nuts] implement something like writeback journal for writing files

2017-12-25 Thread Vasiliy Tolstov
25 Дек 2017 г. 13:54 пользователь "Jan Mercl" <0xj...@gmail.com> написал: On Mon, Dec 25, 2017 at 10:11 AM Vasiliy Tolstov wrote: What about a write ahead log? https://godoc.org/github.com/cznic/file#WAL I know about this package, but I have many files like 3-5 and cre

[go-nuts] implement something like writeback journal for writing files

2017-12-25 Thread Vasiliy Tolstov
ut have no luck =(. I know about bcache, lvm cache, flashcache and other solutions, but i need pure go and pure application solution. Does somebody already thinks about such problems or know some link where i can find ideas? Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You receiv

Re: [go-nuts] Re: Why is the cpu usage so high in a golang tcp server?

2017-12-19 Thread Vasiliy Tolstov
If I have something like this, but I know that client sends fixed sized message header 48 byte and variable sized body based on data in header, and want to minimize allocations. Does I need to use bufio? Now I'm use goleveldb util package for reusable byte slice. 19 Дек 2017 г. 11:22 пользователь

Re: [go-nuts] cache for *os.File

2017-12-14 Thread Vasiliy Tolstov
2017-12-14 9:28 GMT+03:00 Dave Cheney : > Does your profiling suggest these allocations are causing latency? > Hmm this is missing part =). How can i understand what causing latency if i use http prof? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because y

Re: [go-nuts] cache for *os.File

2017-12-13 Thread Vasiliy Tolstov
;m do os.OpenFile because passed path copied to file struct. Does it possible to eliminate such allocations? In my program i don't often do stat syscalls. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups &

[go-nuts] cache for *os.File

2017-12-13 Thread Vasiliy Tolstov
es on local fs, sometimes with different offsets. Does i need fd cache for such use-case? Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop r

[go-nuts] package for concurrent os.File operations

2017-12-07 Thread Vasiliy Tolstov
that can be read/write/close/seek/sync... Does somebody already knows such package or knows how to best write it ? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Re: try to avoid additional memory allocations

2017-11-10 Thread Vasiliy Tolstov
4 1000201 ns/op48 B/op1 allocs/op > > Playground: https://play.golang.org/p/DnGoM8PYd6 > > Peter > > > On Thursday, November 9, 2017 at 3:58:03 PM UTC-5, Vasiliy Tolstov wrote: >> >> Hi. I have server that read/write data to many files (each is

Re: [go-nuts] Re: try to avoid additional memory allocations

2017-11-10 Thread Vasiliy Tolstov
Thanks! 2017-11-10 3:52 GMT+03:00 krolaw : > func oid2filepath(cfg *Config, oID uint64) string { >return fmt.Sprintf("%s%c%x%c%016x", cfg.WorkDir, filepath.Seperator, > oid2vid(oID), filepath.Seperator, oID) > } > > On Friday, 10 November 2017 09:58:03 UTC+13, Vas

[go-nuts] try to avoid additional memory allocations

2017-11-09 Thread Vasiliy Tolstov
ata. Does it possible to write function that does not have additional allocations? And does it possible to write it in portable way (i mean path separator). -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nu

Re: [go-nuts] graceful restart of app with more than one tcp Listener

2017-11-07 Thread Vasiliy Tolstov
t https://github.com/rcrowley/goagain/issues/12 cant handle multiple listeners https://godoc.org/github.com/facebookgo/grace/gracenet does not support close the listener https://github.com/fvbock/endless works with http , but i don't need http server. -- Vasiliy Tolstov, e-mail: v.tols..

[go-nuts] graceful restart of app with more than one tcp Listener

2017-11-07 Thread Vasiliy Tolstov
iting tcp connections? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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...@google

[go-nuts] Re: speedup image/png encode/decode

2017-06-18 Thread Vasiliy Tolstov
2017-06-18 19:47 GMT+03:00 Vasiliy Tolstov : > Hi. I'm writing vnc server implementation (mostly for proxy between > client and real server). > My first version can only raw encoding, but now i'm writing TightPng > support and check results. As i see when i'm connect to

[go-nuts] speedup image/png encode/decode

2017-06-18 Thread Vasiliy Tolstov
try to profile code, may be is have many big errors that can be solved firstly... -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving ema

[go-nuts] terminal package that utilize io.ReadWriter

2017-04-27 Thread Vasiliy Tolstov
oot@143177 ~]# [root@143177 ~]# [root@143177 ~]# [root@143177 ~]# custom ReadWriter when Read returns recieved data immediately if it present, writer blocks while write data and returns when all data in buffer writed. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message b

Re: [go-nuts] Re: i/o timeout when using bufio on net connection (tcp)

2017-04-19 Thread Vasiliy Tolstov
manually, resending the parts when the writes only > partially complete. Ok, thanks! I'm try to write to buffer and use simple net.Conn Write. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-

[go-nuts] C union type to go native types

2017-04-18 Thread Vasiliy Tolstov
interface methods ? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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

[go-nuts] i/o timeout when using bufio on net connection (tcp)

2017-04-17 Thread Vasiliy Tolstov
141 and https://github.com/vtolstov/go-libvirt/blob/master/client/rpc.go#L246 what can i do to fix this timeouts ? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this g

[go-nuts] usability question

2017-04-04 Thread Vasiliy Tolstov
user POV. Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- 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...@googlegroup

Re: [go-nuts] static compile binary with newlib instead of glibc

2017-03-17 Thread Vasiliy Tolstov
runtime/cgo package expects to be able to > call functions like pthread_create that, last time I looked, newlib > does not provide. Thanks! -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts"

  1   2   >