[go-nuts] Re: How long should the profiles be to use with Profile-Guided Optimization (PGO)?

2024-01-23 Thread 'qiulaidongfeng' via golang-nuts
In my experience, if defult.pgo shows hot path.   30s can have a good 
optimization.

On Monday, January 22, 2024 at 11:21:51 PM UTC+8 Agustin Horacio Urquiza 
Toledo wrote:

> Hello,
>
> I am trying to use PGO in my project and I would like to know how well it 
> works. I have collected 10 minutes of CPU profiling data from production. 
> Is this enough? I’m asking because it’s very difficult to change my code in 
> production and I want to be sure that my code, compiled with PGO, was 
> sufficient to see an improvement.
>
> Could someone please help me? I can’t find this information anywhere.
>
> Thanks,
> Agustin
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/dc7dbbdf-11c2-474c-a4aa-637e33a81b4an%40googlegroups.com.


Re: [go-nuts] Re: Good examples of Go back ends?

2024-01-23 Thread Steven Hartland
It's high level, but there's some good stuff mentioned in
https://github.com/avelino/awesome-go

On Mon, 22 Jan 2024 at 15:23, george looshch 
wrote:

> hi Jason,
>
> thanks a million for pointing out the vagueness of my question! English
> isn’t my mother tongue so now i see where you’re coming from
>
> what i meant was examples of real-world web server with routing,
> authentication, DB, etc.
>
> curated lists have libraries and frameworks, what i’m looking for is
> examples of usages these libraries and frameworks in production. Search on
> github didn’t yield any good results, unfortunately
>
> On Monday, January 22, 2024 at 2:13:17 PM UTC Jason E. Aten wrote:
>
>> This question is too vague.
>>
>> You are likely to get more helpful answers if you specify what kind of
>> "backend" you are looking for.  As it is, we can only guess.
>>
>> Do you want backends that are web servers? (see the standard library
>> net/http or the caddy web server)  Is it a backend for iOS iPhone Apps? For
>> Android Apps? That respond to a specific kind of RPC such as gRPC? That
>> simply access a database?...  A relational database? A non-relational
>> database (graph?, vector?, full-text search?)
>>
>> Pocketbase is a backend mentioned recently on hackernews, that is written
>> in Go and seems to do alot.  Perhaps it is similar to firebase, just going
>> by the name. I have not used it myself.  I cannot say whether it is a "good
>> example" or not, because I've not used it, and similarly this is too vague
>> a criteria (good at what?)
>>
>> https://github.com/pocketbase/pocketbase
>>
>> Generally, go over to github and search for the kind of backend you want,
>> and select those projects that are written in Go on the left side filter
>> click-boxes.  You could also look at the curated lists of Go libraries such
>> as https://awesome-go.com/
>>
>> On Sunday, January 21, 2024 at 4:57:42 PM UTC+1 george looshch wrote:
>>
>> hi!
>> can i please ask if someone knows good examples of back ends written in
>> Go? If not good, just production code would be great as well!
>> thanks in advance and have a great rest of the weekend!
>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/bcb429bb-4cfb-4421-be4e-b1ffbcd5e228n%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA38peZRPyhoJ0pL8bdQQdv2Sz2sofWgNJUWJan6gVQuhhd8wg%40mail.gmail.com.


[go-nuts] runtime: idea for usse Bump-pointer allocation

2024-01-23 Thread 'qiulaidongfeng' via golang-nuts
See https://github.com/golang/go/issues/51317#issuecomment-1905287203
Bump-pointer allocation is an interesting direction to explore.
I will describe, in a bottom-up way, an idea for implementing Bump-pointer 
allocation.
On each P or M, there is a P or M exclusive bumpPtr, and runtime.malloc 
prioritizes using P or M exclusive bumpPtr to allocate memory. The 
allocation method is to prepare memory blocks for each type to be 
allocated, or to prepare memory blocks for non pointer types of the same 
size and for each pointer type separately. An offset from 0 is used to move 
the pointer to allocate a go value.
The cost of allocating memory in this way becomes mostly a map query (based 
on the https://gitee.com/qiulaidongfeng/arena Based on my experience, there 
is a very low Alloc cost for a map query, as well as a few if judgments and 
additions. No synchronization is required.
If a bumpPtr exclusive to P or M requires memory blocks, the source of 
those blocks is determined by the implementation.
This can be used to better understand the idea:
https://github.com/qiulaidongfeng/go/commit/b149195ce0533834479e7a9b04a87de2bbeba0f0
Note that this submission is only for understanding the idea and does not 
even pass the test.
I don't plan to continue researching this idea in the near future, because 
https://gitee.com/qiulaidongfeng/arena Try again 
https://github.com/golang/go/issues/51317#issuecomment-1905560437
The optimization mentioned is enough for me.
I make this idea public. If anyone is interested in this idea, hopefully 
this will help.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/eab8a246-c377-4011-b692-0b73ca9a39e0n%40googlegroups.com.


[go-nuts] Re: Good examples of Go back ends?

2024-01-23 Thread george looshch
hey Abu,

thanks, looks interesting!

On Tuesday, January 23, 2024 at 1:25:17 AM UTC Abu Zakaria wrote:

Hi George,

I highly suggest you check out the Fiber web framework. You will find the 
framework interesting.
This repo has a list of many examples using Fiber – 
https://github.com/gofiber/recipes
Scroll through the repository, and you will most likely find what you are 
looking for.

On Monday, January 22, 2024 at 9:22:51 PM UTC+6 george looshch wrote:

hi Jason,

thanks a million for pointing out the vagueness of my question! English 
isn’t my mother tongue so now i see where you’re coming from

what i meant was examples of real-world web server with routing, 
authentication, DB, etc.

curated lists have libraries and frameworks, what i’m looking for is 
examples of usages these libraries and frameworks in production. Search on 
github didn’t yield any good results, unfortunately

On Monday, January 22, 2024 at 2:13:17 PM UTC Jason E. Aten wrote:

This question is too vague.

You are likely to get more helpful answers if you specify what kind of 
"backend" you are looking for.  As it is, we can only guess.  

Do you want backends that are web servers? (see the standard library 
net/http or the caddy web server)  Is it a backend for iOS iPhone Apps? For 
Android Apps? That respond to a specific kind of RPC such as gRPC? That 
simply access a database?...  A relational database? A non-relational 
database (graph?, vector?, full-text search?) 

Pocketbase is a backend mentioned recently on hackernews, that is written 
in Go and seems to do alot.  Perhaps it is similar to firebase, just going 
by the name. I have not used it myself.  I cannot say whether it is a "good 
example" or not, because I've not used it, and similarly this is too vague 
a criteria (good at what?)

https://github.com/pocketbase/pocketbase

Generally, go over to github and search for the kind of backend you want, 
and select those projects that are written in Go on the left side filter 
click-boxes.  You could also look at the curated lists of Go libraries such 
as https://awesome-go.com/

On Sunday, January 21, 2024 at 4:57:42 PM UTC+1 george looshch wrote:

hi!
can i please ask if someone knows good examples of back ends written in Go? 
If not good, just production code would be great as well!
thanks in advance and have a great rest of the weekend!

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/d2cb1d83-7a7b-4455-8943-b74a97d376d7n%40googlegroups.com.


Re: [go-nuts] Re: Good examples of Go back ends?

2024-01-23 Thread george looshch
hi Steven,

thanks for the link! As was noted previously, i did a terrible job at 
expressing my question initially; what i really meant was examples of 
real-world web server with routing, authentication, DB, etc.

On Tuesday, January 23, 2024 at 1:56:04 PM UTC Steven Hartland wrote:

> It's high level, but there's some good stuff mentioned in 
> https://github.com/avelino/awesome-go
>
> On Mon, 22 Jan 2024 at 15:23, george looshch  wrote:
>
>> hi Jason,
>>
>> thanks a million for pointing out the vagueness of my question! English 
>> isn’t my mother tongue so now i see where you’re coming from
>>
>> what i meant was examples of real-world web server with routing, 
>> authentication, DB, etc.
>>
>> curated lists have libraries and frameworks, what i’m looking for is 
>> examples of usages these libraries and frameworks in production. Search on 
>> github didn’t yield any good results, unfortunately
>>
>> On Monday, January 22, 2024 at 2:13:17 PM UTC Jason E. Aten wrote:
>>
>>> This question is too vague.
>>>
>>> You are likely to get more helpful answers if you specify what kind of 
>>> "backend" you are looking for.  As it is, we can only guess.  
>>>
>>> Do you want backends that are web servers? (see the standard library 
>>> net/http or the caddy web server)  Is it a backend for iOS iPhone Apps? For 
>>> Android Apps? That respond to a specific kind of RPC such as gRPC? That 
>>> simply access a database?...  A relational database? A non-relational 
>>> database (graph?, vector?, full-text search?) 
>>>
>>> Pocketbase is a backend mentioned recently on hackernews, that is 
>>> written in Go and seems to do alot.  Perhaps it is similar to firebase, 
>>> just going by the name. I have not used it myself.  I cannot say whether it 
>>> is a "good example" or not, because I've not used it, and similarly this is 
>>> too vague a criteria (good at what?)
>>>
>>> https://github.com/pocketbase/pocketbase
>>>
>>> Generally, go over to github and search for the kind of backend you 
>>> want, and select those projects that are written in Go on the left side 
>>> filter click-boxes.  You could also look at the curated lists of Go 
>>> libraries such as https://awesome-go.com/
>>>
>>> On Sunday, January 21, 2024 at 4:57:42 PM UTC+1 george looshch wrote:
>>>
>>> hi!
>>> can i please ask if someone knows good examples of back ends written in 
>>> Go? If not good, just production code would be great as well!
>>> thanks in advance and have a great rest of the weekend!
>>>
>>> -- 
>>
> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/bcb429bb-4cfb-4421-be4e-b1ffbcd5e228n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e599b59d-316b-4baa-aab1-fb1c458deaf0n%40googlegroups.com.


Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2024-01-23 Thread Konstantin Ivaschenko
@Jan You haven't thought of a good way to do it?

суббота, 4 ноября 2023 г. в 05:23:51 UTC+3, Luke Crook: 

> For Windows, could you package and distribute the prebuilt binaries using 
> an MSI file? (https://nsis.sourceforge.io/Main_Page)
>
>
>
> On Fri, Nov 3, 2023 at 12:10 PM Robert Engels  
> wrote:
>
>> Better to rewrite the native portions in Go. 
>>
>> If you’re not going to do that, just give instructions on how to build 
>> and let the app builder figure out how to package it. 
>>
>> On Nov 3, 2023, at 1:47 PM, Jason E. Aten  wrote:
>>
>> 
>> It is still rough around lots of edges, but you are wanting to write your 
>> own deployment system, you might find in https://nixos.org/ some 
>> inspiration.
>>
>> It generalizes the idea of cryptographic hashed based dependency 
>> management to, well, everything.
>>
>> Sadly not that easy to use; it may be harsh to inflict on end users.  But 
>> it tackles the reproducibility issue (it works on my machine! but not 
>> yours?) head on.
>> You might profitably write some glue between Go and Nix that provides a 
>> nice end user experience.
>>
>> On Friday, November 3, 2023 at 5:23:21 PM UTC Jan wrote:
>>
>>> That works if what I'm doing is a end product (a server or something). 
>>> But what I'm doing is in itself a library. Imagine if every library offers 
>>> a docker/VM image, how is the end-user supposed to merge those docker 
>>> images ? The docker is also not a viable/ergonomic solution in my case. I 
>>> mean ... actually I do offer a docker for one of my projects 
>>> , along with 
>>> Jupyter, a Tutorial and demo. But generically, it is a library, and I would 
>>> like it to be easily `go get`able. Or at most with one simple/standard step.
>>>
>>> Yes, I hear you with respect to unnecessary extra dependencies (X11) -- 
>>> at least make them optional, right ? But In my case the dependencies are 
>>> essential, and the docker doesn't really solve the problem...  But also I'm 
>>> running out of hope that there would be anything to solve it, I'm almost 
>>> thinking I should write something myself.
>>>
>>>
>>> On Thursday, November 2, 2023 at 11:54:01 PM UTC+1 Jason E. Aten wrote:
>>>
 What I would do for that case would be to deliver the users a either a 
 VM image (heavy), or a docker container (lighter) with batteries included 
 inside. 

 There is often little need to write a docker file unless you really 
 want. Just get everything working inside docker and "docker commit" it to 
 an image. I do this often for projects that need python/R + 100s of 
 libraries.  Its really the only sane way to deliver sprawling dependencies 
 that assume they can write all over the filesystem.  

 One hint: I recently did this for code that wanted to output graphics, 
 and that needed X11 (or Xvfb), and that wanted systemd, which is available 
 in docker but used to be discouraged so is not available in many base 
 images. So I would recommend starting an docker image that already 
 supports 
 systemd and X11, if graphics (or x11vnc, say) is ever going to be desired. 
 Its a pain to add after the fact. Podman claims to be useful for this, but 
 I found in immature and not really production ready when trying to run it 
 on blah standard Ubuntu 22.

 On Wednesday, November 1, 2023 at 9:08:51 PM UTC Jan wrote:

> Thanks @Jason, but the point was exactly not need to do anything 
> extra: no manual unzipping of a file, or manual Makefile/Magefile.
>
> Let's say project in Go links some 30 external modules, 5 of them have 
> their own specific steps that need to be read, understood and and run to 
> install them ... very quickly the user just gives up from 
> installing/compiling the thing, with good reason ... 
>
> The Go toolset solves that beautifully for Go only projects. But at 
> least in my line of work, that's not feasible, I need to interface with 
> libraries that in turn require other libraries in C++ (OpenXLA/llvm for 
> JIT), Rust (HuggingFace Tokenizer), C (Gtk), etc.
>
> cheers
>
>
>
>
> On Monday, October 30, 2023 at 7:42:19 PM UTC+1 Jason E. Aten wrote:
>
>> > including the `.a` (static libraries) in the Github just got to its 
>> limit (100Mb)
>>
>> I have used bzip2 to compress libraries that are too big for Github. 
>> If that gets them under the limit, then great. 
>> Just provide installation instructions or a Makefile target that 
>> decompresses them once checked out.
>>
>> (Or xz? Apparently it can compress more than bzip2; but I have no 
>> experience with it. https://en.wikipedia.org/wiki/XZ_Utils )
>>
> -- 
>> 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,

[go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread 'Karolina GORNA' via golang-nuts
Hi everyone,

I would like to build my Go program and to reverse-engineer it. I would 
find it easier to build it without the runtime and to statically analyse 
only the binary of the program.

Is it possible and if yes, how please ?

Thank you for your time.
-- 

Les informations contenues dans ce message électronique ainsi que celles 
contenues dans les documents attachés sont strictement confidentielles et 
sont destinées à l'usage exclusif du (des) destinataire(s) nommé(s).
Toute 
divulgation, distribution ou reproduction, même partielle, en est 
strictement interdite sauf autorisation écrite et expresse de l’émetteur.
Si vous recevez ce message par erreur, veuillez le notifier immédiatement à 
son émetteur par retour, et le détruire ainsi que tous les documents qui y 
sont attachés.


The information contained in this email and in any 
document enclosed is strictly confidential and is intended solely for the 
use of the individual or entity to which it is addressed.
Partial or total 
disclosure, distribution or reproduction of its contents is strictly 
prohibited unless expressly approved in writing by the sender.
If you have 
received this communication in error, please notify us immediately by 
responding to this email, and then delete the message and its attached 
files from your system.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com.


[go-nuts] How to control the way a type is printed out

2024-01-23 Thread notevenhere
I have some types defined within their respective packages deep inside my 
project folder structure.

I create nested instances of these classes and print out their types in 
turn.

These can be seen in the following playground code:

https://go.dev/play/p/Juh7-IndBli

Running the code, one gets 

*beta.Beta[*play.ground/structs/alpha.Alpha[float64],*play.ground/structs/alpha.Alpha[string]]
 

*alpha.Alpha[*play.ground/structs/beta.Beta[*play.ground/structs/alpha.Alpha[float64],*play.ground/structs/alpha.Alpha[string]]]

If one inspects these types, they will realize that although the outer type 
is presented without writing out its full path, the inner types are fully 
qualified type paths.

The problem I am facing is that when I try to write tests of examples that 
involve some related nested type, I need to type in the full path of the 
type otherwise if I refactor the project's folder structure, the tests will 
fail simply because the fully qualified paths to the types has changed but 
nothing is actually wrong with the code.

So, my question is, how to get eg

*beta.Beta[*alpha.Alpha[float64], *alpha.Alpha[string]] 

and 

*alpha.Alpha[*beta.Beta[*alpha.Alpha[float64],*alpha.Alpha[string]]]

instead of what I actually get?

My first guess was to use regex's but it feels unnecessarily verbose. 
Hoping there's something else I'm missing.

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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ae2d2621-b312-4066-9fdd-aaebdbb14622n%40googlegroups.com.


[go-nuts] Re: How long should the profiles be to use with Profile-Guided Optimization (PGO)?

2024-01-23 Thread Agustin Horacio Urquiza Toledo

Great, I will try with 5 minutes just in case given that the compilation 
overhead is null. But I have observed that the profiles converge on the hot 
paths and not exist difference between 2 and 5 minutes.

Thanks.
El Tuesday, January 23, 2024 a la(s) 5:13:52 AM UTC-3, qiulaidongfeng 
escribió:

> In my experience, if defult.pgo shows hot path.   30s can have a good 
> optimization.
>
> On Monday, January 22, 2024 at 11:21:51 PM UTC+8 Agustin Horacio Urquiza 
> Toledo wrote:
>
>> Hello,
>>
>> I am trying to use PGO in my project and I would like to know how well it 
>> works. I have collected 10 minutes of CPU profiling data from production. 
>> Is this enough? I’m asking because it’s very difficult to change my code in 
>> production and I want to be sure that my code, compiled with PGO, was 
>> sufficient to see an improvement.
>>
>> Could someone please help me? I can’t find this information anywhere.
>>
>> Thanks,
>> Agustin
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ca7d36ee-d1ad-4cee-ba68-132a8438571dn%40googlegroups.com.


Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Def Ceb
No, this is not possible. This is the case for practically every other 
language, even C. Unless you intend on inspecting assembly text instead 
of a real working binary.
The symbol table + debug symbols built into the binary by default should 
make finding the `main.main` function trivial with just about any 
reverse engineering tool.


'Karolina GORNA' via golang-nuts:

Hi everyone,

I would like to build my Go program and to reverse-engineer it. I would 
find it easier to build it without the runtime and to statically analyse 
only the binary of the program.


Is it possible and if yes, how please ?

Thank you for your time.

Les informations contenues dans ce message électronique ainsi que celles 
contenues dans les documents attachés sont strictement confidentielles 
et sont destinées à l'usage exclusif du (des) destinataire(s) nommé(s).
Toute divulgation, distribution ou reproduction, même partielle, en est 
strictement interdite sauf autorisation écrite et expresse de l’émetteur.
Si vous recevez ce message par erreur, veuillez le notifier 
immédiatement à son émetteur par retour, et le détruire ainsi que tous 
les documents qui y sont attachés.


The information contained in this email and in any document enclosed is 
strictly confidential and is intended solely for the use of the 
individual or entity to which it is addressed.
Partial or total disclosure, distribution or reproduction of its 
contents is strictly prohibited unless expressly approved in writing by 
the sender.
If you have received this communication in error, please notify us 
immediately by responding to this email, and then delete the message and 
its attached files from your system.



--
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 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com .


--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a7746ded-49cb-4a8c-aa00-e2bb8676b23a%40gmail.com.


Re: [go-nuts] How to control the way a type is printed out

2024-01-23 Thread Def Ceb
Is there any particular reason to compare with %T fmt.Sprintf(?) values 
in the first place? If not, then you could just use type assertions. And 
 the reflect package if really needed.


notevenhere:
I have some types defined within their respective packages deep inside 
my project folder structure.


I create nested instances of these classes and print out their types in 
turn.


These can be seen in the following playground code:

https://go.dev/play/p/Juh7-IndBli

Running the code, one gets

*beta.Beta[*play.ground/structs/alpha.Alpha[float64],*play.ground/structs/alpha.Alpha[string]]

*alpha.Alpha[*play.ground/structs/beta.Beta[*play.ground/structs/alpha.Alpha[float64],*play.ground/structs/alpha.Alpha[string]]]

If one inspects these types, they will realize that although the outer 
type is presented without writing out its full path, the inner types are 
fully qualified type paths.


The problem I am facing is that when I try to write tests of examples 
that involve some related nested type, I need to type in the full path 
of the type otherwise if I refactor the project's folder structure, the 
tests will fail simply because the fully qualified paths to the types 
has changed but nothing is actually wrong with the code.


So, my question is, how to get eg

*beta.Beta[*alpha.Alpha[float64], *alpha.Alpha[string]]

and

*alpha.Alpha[*beta.Beta[*alpha.Alpha[float64],*alpha.Alpha[string]]]

instead of what I actually get?

My first guess was to use regex's but it feels unnecessarily verbose. 
Hoping there's something else I'm missing.


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 golang-nuts+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ae2d2621-b312-4066-9fdd-aaebdbb14622n%40googlegroups.com .


--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/83f3eec8-e29a-4a99-be72-e858e83ac455%40gmail.com.


Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Raffaele Sena
Well, if it's a package/module you could build it as a library archive (go
build -buildmode=archive) and then disassemble/decompile the library.


On Tue, Jan 23, 2024 at 3:18 PM Def Ceb  wrote:

> No, this is not possible. This is the case for practically every other
> language, even C. Unless you intend on inspecting assembly text instead
> of a real working binary.
> The symbol table + debug symbols built into the binary by default should
> make finding the `main.main` function trivial with just about any
> reverse engineering tool.
>
> 'Karolina GORNA' via golang-nuts:
> > Hi everyone,
> >
> > I would like to build my Go program and to reverse-engineer it. I would
> > find it easier to build it without the runtime and to statically analyse
> > only the binary of the program.
> >
> > Is it possible and if yes, how please ?
> >
> > Thank you for your time.
> > 
> > Les informations contenues dans ce message électronique ainsi que celles
> > contenues dans les documents attachés sont strictement confidentielles
> > et sont destinées à l'usage exclusif du (des) destinataire(s) nommé(s).
> > Toute divulgation, distribution ou reproduction, même partielle, en est
> > strictement interdite sauf autorisation écrite et expresse de l’émetteur.
> > Si vous recevez ce message par erreur, veuillez le notifier
> > immédiatement à son émetteur par retour, et le détruire ainsi que tous
> > les documents qui y sont attachés.
> >
> > The information contained in this email and in any document enclosed is
> > strictly confidential and is intended solely for the use of the
> > individual or entity to which it is addressed.
> > Partial or total disclosure, distribution or reproduction of its
> > contents is strictly prohibited unless expressly approved in writing by
> > the sender.
> > If you have received this communication in error, please notify us
> > immediately by responding to this email, and then delete the message and
> > its attached files from your system.
> > 
> >
> > --
> > 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
> > .
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com
> <
> https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/a7746ded-49cb-4a8c-aa00-e2bb8676b23a%40gmail.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANKfucabsHWfxsMhcnPvVFhs3ePYNLH%2BNe6G0VsJQ%2BGXNyEnzA%40mail.gmail.com.


Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Def Ceb
Interesting proposition, though from what I can tell, you're just going 
to end up with goobj files, a somewhat obscure internal format of the 
compiler, rather than a more typical object file format.


Raffaele Sena:
Well, if it's a package/module you could build it as a library archive 
(go build -buildmode=archive) and then disassemble/decompile the library.



On Tue, Jan 23, 2024 at 3:18 PM Def Ceb > wrote:


No, this is not possible. This is the case for practically every other
language, even C. Unless you intend on inspecting assembly text instead
of a real working binary.
The symbol table + debug symbols built into the binary by default
should
make finding the `main.main` function trivial with just about any
reverse engineering tool.

'Karolina GORNA' via golang-nuts:
 > Hi everyone,
 >
 > I would like to build my Go program and to reverse-engineer it. I
would
 > find it easier to build it without the runtime and to statically
analyse
 > only the binary of the program.
 >
 > Is it possible and if yes, how please ?
 >
 > Thank you for your time.
 >

 > Les informations contenues dans ce message électronique ainsi que
celles
 > contenues dans les documents attachés sont strictement
confidentielles
 > et sont destinées à l'usage exclusif du (des) destinataire(s)
nommé(s).
 > Toute divulgation, distribution ou reproduction, même partielle,
en est
 > strictement interdite sauf autorisation écrite et expresse de
l’émetteur.
 > Si vous recevez ce message par erreur, veuillez le notifier
 > immédiatement à son émetteur par retour, et le détruire ainsi que
tous
 > les documents qui y sont attachés.
 >
 > The information contained in this email and in any document
enclosed is
 > strictly confidential and is intended solely for the use of the
 > individual or entity to which it is addressed.
 > Partial or total disclosure, distribution or reproduction of its
 > contents is strictly prohibited unless expressly approved in
writing by
 > the sender.
 > If you have received this communication in error, please notify us
 > immediately by responding to this email, and then delete the
message and
 > its attached files from your system.
 >

 >
 > --
 > 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

 > >.
 > To view this discussion on the web visit
 >

https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com 

 
>.

-- 
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
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/golang-nuts/a7746ded-49cb-4a8c-aa00-e2bb8676b23a%40gmail.com
 
.



--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f35bfc30-c54d-4d03-b1dd-09dd4ea4f45f%40gmail.com.


Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Raffaele Sena
Yes, but there are tools to access the object files. I.e. you can do "go
tool objdump module.a" and get the assembly for your module.


On Tue, Jan 23, 2024 at 4:14 PM Def Ceb  wrote:

> Interesting proposition, though from what I can tell, you're just going
> to end up with goobj files, a somewhat obscure internal format of the
> compiler, rather than a more typical object file format.
>
> Raffaele Sena:
> > Well, if it's a package/module you could build it as a library archive
> > (go build -buildmode=archive) and then disassemble/decompile the library.
> >
> >
> > On Tue, Jan 23, 2024 at 3:18 PM Def Ceb  > > wrote:
> >
> > No, this is not possible. This is the case for practically every
> other
> > language, even C. Unless you intend on inspecting assembly text
> instead
> > of a real working binary.
> > The symbol table + debug symbols built into the binary by default
> > should
> > make finding the `main.main` function trivial with just about any
> > reverse engineering tool.
> >
> > 'Karolina GORNA' via golang-nuts:
> >  > Hi everyone,
> >  >
> >  > I would like to build my Go program and to reverse-engineer it. I
> > would
> >  > find it easier to build it without the runtime and to statically
> > analyse
> >  > only the binary of the program.
> >  >
> >  > Is it possible and if yes, how please ?
> >  >
> >  > Thank you for your time.
> >  >
> >
>  
> >  > Les informations contenues dans ce message électronique ainsi que
> > celles
> >  > contenues dans les documents attachés sont strictement
> > confidentielles
> >  > et sont destinées à l'usage exclusif du (des) destinataire(s)
> > nommé(s).
> >  > Toute divulgation, distribution ou reproduction, même partielle,
> > en est
> >  > strictement interdite sauf autorisation écrite et expresse de
> > l’émetteur.
> >  > Si vous recevez ce message par erreur, veuillez le notifier
> >  > immédiatement à son émetteur par retour, et le détruire ainsi que
> > tous
> >  > les documents qui y sont attachés.
> >  >
> >  > The information contained in this email and in any document
> > enclosed is
> >  > strictly confidential and is intended solely for the use of the
> >  > individual or entity to which it is addressed.
> >  > Partial or total disclosure, distribution or reproduction of its
> >  > contents is strictly prohibited unless expressly approved in
> > writing by
> >  > the sender.
> >  > If you have received this communication in error, please notify us
> >  > immediately by responding to this email, and then delete the
> > message and
> >  > its attached files from your system.
> >  >
> >
>  
> >  >
> >  > --
> >  > 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
> > 
> >  >  > >.
> >  > To view this discussion on the web visit
> >  >
> >
> https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com
> <
> https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com>
> <
> https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com?utm_medium=email&utm_source=footer
> <
> https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com?utm_medium=email&utm_source=footer
> >>.
> >
> > --
> > 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
> > .
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/golang-nuts/a7746ded-49cb-4a8c-aa00-e2bb8676b23a%40gmail.com
> <
> https://groups.google.com/d/msgid/golang-nuts/a7746ded-49cb-4a8c-aa00-e2bb8676b23a%40gmail.com
> >.
> >
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANKfucame_mkBpvGf_3iH7cwr_8NeBh7BdbD43-JGooxZcfzTg%40mail.gmail.com.


Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Def Ceb

Ah, true.
Though you'd be limited to analyzing the assembly text instead of a 
binary. And RE typically involves tools that work on binaries rather 
than pre-compilation assembly in a text file.
Unless there's some way to convert this assembly into a working 
stand-alone .o/.obj file which could be analyzed with typical reverse 
engineering tools, then for the purposes of learning how to reverse 
engineer binaries, I'd stick to full binaries. With debug info as 
training wheels to start off with.


Raffaele Sena:
Yes, but there are tools to access the object files. I.e. you can do "go 
tool objdump module.a" and get the assembly for your module.



On Tue, Jan 23, 2024 at 4:14 PM Def Ceb > wrote:


Interesting proposition, though from what I can tell, you're just going
to end up with goobj files, a somewhat obscure internal format of the
compiler, rather than a more typical object file format.

Raffaele Sena:
 > Well, if it's a package/module you could build it as a library
archive
 > (go build -buildmode=archive) and then disassemble/decompile the
library.
 >
 >
 > On Tue, Jan 23, 2024 at 3:18 PM Def Ceb mailto:mikk.mar...@gmail.com>
 > >> wrote:
 >
 >     No, this is not possible. This is the case for practically
every other
 >     language, even C. Unless you intend on inspecting assembly
text instead
 >     of a real working binary.
 >     The symbol table + debug symbols built into the binary by default
 >     should
 >     make finding the `main.main` function trivial with just about any
 >     reverse engineering tool.
 >
 >     'Karolina GORNA' via golang-nuts:
 >      > Hi everyone,
 >      >
 >      > I would like to build my Go program and to
reverse-engineer it. I
 >     would
 >      > find it easier to build it without the runtime and to
statically
 >     analyse
 >      > only the binary of the program.
 >      >
 >      > Is it possible and if yes, how please ?
 >      >
 >      > Thank you for your time.
 >      >
 >   
  

 >      > Les informations contenues dans ce message électronique
ainsi que
 >     celles
 >      > contenues dans les documents attachés sont strictement
 >     confidentielles
 >      > et sont destinées à l'usage exclusif du (des) destinataire(s)
 >     nommé(s).
 >      > Toute divulgation, distribution ou reproduction, même
partielle,
 >     en est
 >      > strictement interdite sauf autorisation écrite et expresse de
 >     l’émetteur.
 >      > Si vous recevez ce message par erreur, veuillez le notifier
 >      > immédiatement à son émetteur par retour, et le détruire
ainsi que
 >     tous
 >      > les documents qui y sont attachés.
 >      >
 >      > The information contained in this email and in any document
 >     enclosed is
 >      > strictly confidential and is intended solely for the use
of the
 >      > individual or entity to which it is addressed.
 >      > Partial or total disclosure, distribution or reproduction
of its
 >      > contents is strictly prohibited unless expressly approved in
 >     writing by
 >      > the sender.
 >      > If you have received this communication in error, please
notify us
 >      > immediately by responding to this email, and then delete the
 >     message and
 >      > its attached files from your system.
 >      >
 >   
  

 >      >
 >      > --
 >      > 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

 >     >
 >      > 
 >     >>.
 >      > To view this discussion on the web visit
 >      >
 >
https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com 
 


Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Jaon Dorb
نعم 


في الأربعاء، 24 يناير 2024 في تمام الساعة 2:50:40 ص UTC+3، كتب Raffaele 
Sena رسالة نصها:

Well, if it's a package/module you could build it as a library archive (go 
build -buildmode=archive) and then disassemble/decompile the library.


On Tue, Jan 23, 2024 at 3:18 PM Def Ceb  wrote:

No, this is not possible. This is the case for practically every other 
language, even C. Unless you intend on inspecting assembly text instead 
of a real working binary.
The symbol table + debug symbols built into the binary by default should 
make finding the `main.main` function trivial with just about any 
reverse engineering tool.

'Karolina GORNA' via golang-nuts:
> Hi everyone,
> 
> I would like to build my Go program and to reverse-engineer it. I would 
> find it easier to build it without the runtime and to statically analyse 
> only the binary of the program.
> 
> Is it possible and if yes, how please ?
> 
> Thank you for your time.
> 
> Les informations contenues dans ce message électronique ainsi que celles 
> contenues dans les documents attachés sont strictement confidentielles 
> et sont destinées à l'usage exclusif du (des) destinataire(s) nommé(s).
> Toute divulgation, distribution ou reproduction, même partielle, en est 
> strictement interdite sauf autorisation écrite et expresse de l’émetteur.
> Si vous recevez ce message par erreur, veuillez le notifier 
> immédiatement à son émetteur par retour, et le détruire ainsi que tous 
> les documents qui y sont attachés.
> 
> The information contained in this email and in any document enclosed is 
> strictly confidential and is intended solely for the use of the 
> individual or entity to which it is addressed.
> Partial or total disclosure, distribution or reproduction of its 
> contents is strictly prohibited unless expressly approved in writing by 
> the sender.
> If you have received this communication in error, please notify us 
> immediately by responding to this email, and then delete the message and 
> its attached files from your system.
> 
> 
> -- 
> 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...@googlegroups.com 
> .
> To view this discussion on the web visit 
> 
https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com
 
<
https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com?utm_medium=email&utm_source=footer
>.

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a7746ded-49cb-4a8c-aa00-e2bb8676b23a%40gmail.com
.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/dfaf2a2b-1240-4b68-bd10-e7dd05af6742n%40googlegroups.com.