sorry for being not specific.
my question is:
according to my understanding about memstat ( correct me if I'm wrong)
with GOGC set to 50, I can see from the graph above that GCGoal is ~ 26GB
and heapIdle - heapReleased is how much memory go runtime retain from OS
for later usage, how can it (he
Have a look at https://tip.golang.org/doc/gc-guide
and
https://opensourcelive.withgoogle.com/events/go-day-2022/watch?talk=talk4
On Thursday, 24 November 2022 at 05:08:55 UTC Zhao Weng wrote:
> [image: memory.jpg]
> memstats show heapIdle - heapReleased > heapAlloc or heapInUse
>
> I try to sea
As others have said, it is worth trying to reduce the program to the
minimal version which reproduces your problem
(and then publishing it on https://go.dev/play/ ).
On Thursday, 24 November 2022 at 02:38:30 UTC kra...@skepticism.us wrote:
> You cannot mutate strings. Your code is also missing
Your reading comprehension skills need some work.
The point of “labels matter” was answering Rob Pike’s “why does it matter”
question.
I used extremely different objects - yet both modes of transportation -
intentionally to highlight the need for common definitions in order to
communicate.
Th
Hi,
I'm developing a Go wrapper for a dll.
dll contains the following structure:
struct ck_version {
unsigned char major;
unsigned char minor;
};
struct ck_info {
struct ck_version cryptoki_version;
unsigned char manufacturer_id[32];
ck_flags_t flags;
unsigned char library_description
> I think the amount of hair-splitting over what is an object oriented
language is reason to say it *isn't* an Object Oriented language at all.
Given the FAQ header's "Is Go an object-oriented language? emphasizing that
"object-oriented" is in lowercase, not the titlecase "Object-Oriented" that
Rob Pike wrote:
> Let me ask, because I'm genuinely curious: Why does it matter? The labels
> we apply to things do not affect their function. Perhaps it affects how we
> think about them. Is that it?
>
Yes -- that's it exactly!
I think the amount of hair-splitting over what is an object orient
Doh! I forgot the include. I get a linker error now:
...
package main
/*
#cgo pkg-config: python3
#cgo LDFLAGS: -lpython3.8
#include
*/
import "C"
import (
"fmt"
)
func main() {
C.Py_Initialize()
fmt.Println(C.GoString(C.Py_GetVersion()))
C.Py_Finalize()
}
...
$ go run .
# producer
/usr/local/g
I am not sure what you are trying to say here.
> On Nov 23, 2022, at 8:36 PM, Holloway Kean Ho
> wrote:
>
> Your examples have something to do with the developer's psychological problem
> for failing to distingush between objects; not OO, OOP, or any programming
> languages. Neither Java or
macOS: 12.5.1
go: go1.19.3 darwin/amd64
I'm having trouble building a go module that uses Python as a shared
library.
This code works:
...
package main
// #include
import "C"
import "fmt"
func main() {
fmt.Println("Max float value of float is", C.FLT_MAX)
}
...
$ go run .
Max float value of
You might not need FFT for this problem, although it's a powerful tool that
would work
The minimal LP/HP filter is very little code,
https://ccrma.stanford.edu/~jos/filters/Definition_Simplest_Low_Pass.html
From: golang-nuts@googlegroups.com on behalf of
pat
You cannot mutate strings. Your code is also missing a final close-brace
and possibly has other problems. That your example includes commented out
code is also problematic. As Nikhilesh Susarla pointed out you should post
a link to the Go playground to avoid any ambiguity.
I added the missing clos
> If the answer to that question is "yes and no," it'd be less ambiguous to
simply say, "no." And that would be a definitive way of indicating that it
woul be inappropriate to apply many patterns from object oriented languages
to Go -- and to encourage people to accept Go for what it is.
Go doe
Before anyone takes a look, can you please place the code
in https://go.dev/play/ and then share that link where the code compiles
and if it works on the browser and you have specific settings for goarch
and goos then gophers can take a look at it.
Thank you
On Thursday, 24 November 2022 at 0
Perhaps explicitly capture the error value? That is,
result, err := GetAsOr[MyObj](services.GetServiceOr())
Alternatively, if you don't care if there is an error replace "err" with
"_" to make that clear.
On Wed, Nov 23, 2022 at 4:34 PM Denis P wrote:
> Hi guys,
>
> Does anyone know how to pas
Human beings survive by classifications and compartmentalizing. Applying a
label associates it with certain traits.
If someone said “I have a car for sale”, and you showed up and it had no wheels
but a hull and a sail - you might be a bit upset.
Whether Go is a car or a boat is up to the expert
Show us the output of `which go`. I'm not convinced you're using a native
Linux Go compiler.
On Wed, Nov 23, 2022 at 5:31 PM pat2...@gmail.com
wrote:
> Just in case my use of the "windows installer" for go and then using
> WSL/bash
>
>> was confusing assorted magic env variables, I uninstalled/d
In your reply to the request for `go env` output you say "For all of the
above I am using WSL (bash under Windows 11)". It looks like you're using
the native Windows Go toolchain from WSL. I would not expect that to work
and that is likely the reason you're having problems. You should install Go
fo
Just in case my use of the "windows installer" for go and then using
WSL/bash
> was confusing assorted magic env variables, I uninstalled/deleted the
Windows installed version
then I downloaded the "linux" version, and did the usual "sudo tar " install
Made no difference
Get the same error mess
Let me ask, because I'm genuinely curious: Why does it matter? The labels
we apply to things do not affect their function. Perhaps it affects how we
think about them. Is that it?
-rob
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscrib
Hi Kurtis,
On Wed, Nov 23, 2022, 4:57 PM Kurtis Rader wrote:
> On Wed, Nov 23, 2022 at 7:33 AM Christian Stewart
> wrote:
>
>> This is what I'm trying to accomplish:
>>
>> Start delve (dlv) with os/exec passing a set of []string os.Args as
>> --build-flags
>>
>> Let's say I have this build argu
On Wed, Nov 23, 2022 at 7:33 AM Christian Stewart
wrote:
> This is what I'm trying to accomplish:
>
> Start delve (dlv) with os/exec passing a set of []string os.Args as
> --build-flags
>
> Let's say I have this build arguments set: []string{"-gcflags", "-N -l"}
>
> - How can I pass this to --bu
On Wednesday, November 23, 2022 at 7:00:35 PM UTC-5 kra...XXX wrote:
> On Windows Go is normally installed to C:\Program Files\Go. You should not
> put your source code inside that directory. Put the source for your
> projects somewhere else such as %HOME%/go.
>
My source files are not under "C
On Wednesday, November 23, 2022 at 6:31:51 PM UTC-5 se... wrote:
> output of `go env` please
>
I am using WSL (bash under Windows 11)
Shell env:
env
HOSTTYPE=x86_64
LESSCLOSE=/usr/bin/lesspipe %s %s
LANG=C.UTF-8
WSL_DISTRO_NAME=Ubuntu
USER=pfarrell
PWD=/home/pfarrell/whome/sandbox/gows/tre
Hi guys,
Does anyone know how to pass it properly and without adding extra lines of
code?
```
func GetAsOr[T any](t interface{}, e error) (T, error) {
return t.(T), e
}
func (s ServiceProvider) GetServiceOr() (interface{}, error) {
}
result := GetAsOr[MyObj](services.GetServiceOr()
"But I feel like programmers bringing their ideas from other less
ambiguously object oriented languages like Java and C++ often have
difficulty writing idiomatic Go."
I personally think that Java and C++ are less ambiguously OOP, only because
we informally define OOP language as "language that i
On Windows Go is normally installed to C:\Program Files\Go. You should not
put your source code inside that directory. Put the source for your
projects somewhere else such as %HOME%/go.
On Wed, Nov 23, 2022 at 3:26 PM pat2...@gmail.com
wrote:
> I've separated my code into separate subdirectories
I think in the 1990s it was a debate if Lisp with Common List Object System
(CLOS) is OOP language. The answer they arrive was something like that.
"No, if your definition of OOP is based on C++. But, why your definition of
OOP should be based on C++?"
I think the same fits Go. Go is in many way
output of `go env` please
- sean
On Wed, Nov 23, 2022 at 11:25 PM pat2...@gmail.com
wrote:
> I've separated my code into separate subdirectories, added a go.mod
> ran go mod tidy on each.
>
> I'm mostly back where I started, which a better source file tree
>
> I'm trying to test the "treesort"
I've separated my code into separate subdirectories, added a go.mod
ran go mod tidy on each.
I'm mostly back where I started, which a better source file tree
I'm trying to test the "treesort" package from the "Donovan and Kernigan"
The Go programing language book.
When I connect into the treeso
You want to find a discrete fast fourier transform package.
convolve with a suitable filter, and then inverse the DFFT
--
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 emai
It seems if you do it that way - you get all or nothing. Meaning if you have
access to the socket - you can issue any command that is registered, and also
start/stop any service with no further access controls.
Still, I looked at the code you referenced, and if you look at the caller here
https
I presume you're referring to API access? I wasn't around when the initial
API and access control stuff was designed (it's inherited from snapd), but
here's my understanding of how it works. The bulk of the API is exposed
using HTTP-over-unix-socket, so is only accessible if you have permission
to
Hello Golangers!
Is there anyone who can test the reliability of the following Golang slice
feature? I am using an AMG64 computer with Windows 10, and Go version
0.36.0. When I use the following code, to detect and then replace a
character at any given length *n* (9) in a string with an Uppercas
I took a look at Pebble. I don’t see anything related to auth and credentials
and it seems like a huge back door security hole.
Did I miss something?
> On Nov 23, 2022, at 3:20 PM, ben...@gmail.com wrote:
>
>
> Part of my day job is working on Canonical's "Pebble"
> (https://github.com/can
I would manage this externally. As complex as Kubernetes or as simple as initd.
> On Nov 23, 2022, at 1:01 PM, Mathieu CARBONNEAUX
> wrote:
>
> https://github.com/ochinchina/supervisord is a go version of supervisord
>
>> Le mercredi 23 juillet 2014 à 03:02:36 UTC+2, kard...@gmail.com
Part of my day job is working on Canonical's "Pebble"
(https://github.com/canonical/pebble), a simple service manager written in
Go. Unique features: layered configuration, and an HTTP-over-unix-socket
API. It's GPLv3 licensed.
-Ben
On Monday, July 21, 2014 3:51:12 PM UTC-7, ChrisLu wrote:
>>>
On Wed, Nov 23, 2022 at 9:25 AM Frédéric De Jaeger
wrote:
>
> There is something that puzzles me a lot in the doc about cgo.Handle there
> https://pkg.go.dev/runtime/cgo. It says:
>
> Some C functions accept a void* argument that points to an arbitrary data
> value supplied by the caller. It is
https://github.com/ochinchina/supervisord is a go version of supervisord
Le mercredi 23 juillet 2014 à 03:02:36 UTC+2, kard...@gmail.com a écrit :
> godoc.org/bitbucket.org/kardianos/service
>
> On Monday, July 21, 2014 3:51:12 PM UTC-7, ChrisLu wrote:
>>
>> I am tasked to start a go service
Hi all,
I am new to go, for studying engineer graduate course for late age at night
school
My senior college want to test me digital filter with the well logging data.
It must be done with go-lang.
If I failed, I have to buy dinner for 10 people for the group test LOL.
this data was sampled bet
Hi,
There is something that puzzles me a lot in the doc about cgo.Handle there
https://pkg.go.dev/runtime/cgo. It says:
*Some C functions accept a void* argument that points to an arbitrary data
value supplied by the caller. It is not safe to coerce a cgo.Handle (an
integer) to a Go unsafe.Po
Kurtis,
This is what I'm trying to accomplish:
Start delve (dlv) with os/exec passing a set of []string os.Args as
--build-flags
Let's say I have this build arguments set: []string{"-gcflags", "-N -l"}
- How can I pass this to --build-flags in Delve? strings.Join(flags,
" ") is wrong.
- How c
42 matches
Mail list logo