[go-nuts] modules (Go 1.11) and plugins

2018-11-18 Thread Basile Starynkevitch
ot;) and phdl.Lookup("Bar") to get pointer to function (closures) and use them. So what are the concrete commands to build the plugin /tmp/basileplugin.so and my main program? Regards. -- Basile Starynkevitch http://starynkevitch.net/Basile/ Bourg La Reine, France -- You received this

[go-nuts] cryptic multiple roots error (in relation to plugins, -buildmode=shared, -linkshared)

2017-04-02 Thread Basile Starynkevitch
id the *multiple roots* message). What would be the prefered place of the generated blue1.go etc... (In monimelt, the Og source files are extracted and computed from some Sqlite database, but that is an implementation detail I can master). So both monimelt and the generated pink & blue are a

Re: [go-nuts] Re: package, files at build (in relation to plugins, -linkshared, -buildmode=shared, ....)

2017-04-01 Thread Basile Starynkevitch
On Saturday, April 1, 2017 at 6:38:23 PM UTC+2, Basile Starynkevitch wrote: > Is there a way to understand where the mandatory > go install -buildmode=shared std > is installing its stuff? > > Is there a way to check that the above command has been previously and > succe

Re: [go-nuts] Re: package, files at build (in relation to plugins, -linkshared, -buildmode=shared, ....)

2017-04-01 Thread Basile Starynkevitch
On Saturday, April 1, 2017 at 2:59:16 AM UTC+2, Ian Lance Taylor wrote: > > On Fri, Mar 31, 2017 at 9:28 AM, Basile Starynkevitch > > wrote: > > > > On Friday, March 31, 2017 at 4:14:19 PM UTC+2, Ian Lance Taylor wrote: > >> > >> On Fri,

[go-nuts] Re: package, files at build (in relation to plugins, -linkshared, -buildmode=shared, ....)

2017-03-31 Thread Basile Starynkevitch
On Friday, March 31, 2017 at 6:28:40 PM UTC+2, Basile Starynkevitch wrote: > > I'm still really confused by getting quite often a very cryptic message: > > multiple roots /home/basile/go/pkg/linux_amd64 & > /usr/lib/go-1.8/pkg/linux_amd64_dynlink > > the funny t

[go-nuts] Re: package, files at build (in relation to plugins, -linkshared, -buildmode=shared, ....)

2017-03-31 Thread Basile Starynkevitch
On Friday, March 31, 2017 at 4:14:19 PM UTC+2, Ian Lance Taylor wrote: > > On Fri, Mar 31, 2017 at 6:49 AM, Ian Lance Taylor > wrote: > > > > It depends. The main command that generates output is `go install`, > > and it stores the output under $GOROOT/pkg. > > Whoops, I meant $GOPATH/pkg.

[go-nuts] Re: Go -> C++ transpiler idea: Miracle child or horrible abomination?

2017-03-31 Thread Basile Starynkevitch
ed to budget nearly ten years of work. Are you sure it is worth the trouble? Cheers. Basile Starynkevitch <http://starynkevitch.net/Basile/> (France). -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] package, files at build (in relation to plugins, -linkshared, -buildmode=shared, ....)

2017-03-31 Thread Basile Starynkevitch
if so needed, to describe in every detail what I have tried in my monimelt <https://github.com/bstarynk/monimelt> project (on Github). If you are in France, in the Paris region, I can even go to your place with my laptop (But the people I have met at the recent Go meetup in Paris are

Re: [go-nuts] Re: plugins (Go 1.8) and packages

2017-03-28 Thread Basile Starynkevitch
On Wednesday, March 22, 2017 at 11:00:24 PM UTC+1, Ian Lance Taylor wrote: > > On Wed, Mar 22, 2017 at 3:06 AM, Basile Starynkevitch > > wrote: > > > > First, is Svetlin's golang-sharing-libraries tutorial still exactly > correct > > for Go1.8 s

[go-nuts] Re: plugins (Go 1.8) and packages

2017-03-22 Thread Basile Starynkevitch
hat explanation too short (what happens if by mistake a previous package was compiled twice, both with -buildmode=shared & -buildmode=default and what happens if two weeks ago I have compiled my purple package -in some *older* version- with -buildmode=default and today I am compiling it -an

[go-nuts] Re: plugins (Go 1.8) and packages

2017-03-20 Thread Basile Starynkevitch
On Monday, March 20, 2017 at 8:36:04 AM UTC+1, Basile Starynkevitch wrote: > *Plugins and packages in Go* > > The *package* concept is a core concept of Go since every source file belongs > to some package (with main being a special case) and often imports several > other ones

Re: [go-nuts] []byte to func

2017-03-20 Thread Basile Starynkevitch
s.google.com/forum/#!topic/golang-nuts/IKh1BqrNoxI> (you probably don't want the plugin to incorporate all the packages of the main program that it is using). It would be nice if some Go plugin guru could explain more how to do that. Cheers -- Basile Starynkevitch <http://starynke

[go-nuts] plugins (Go 1.8) and packages

2017-03-20 Thread Basile Starynkevitch
ns) at runtime and compile and load them (I followed the same idea in GCC MELT <http://gcc-melt.org/>). BTW, I am interested in reading some white paper about the precise semantics of packages, and how the Go compiler works internally. Cheers -- Basile Starynkevitch <http://starynkev

[go-nuts] watchpoint on "private" variables with Gdb

2017-03-11 Thread Basile Starynkevitch
Hello all, I'm debugging the 5d6c770eb29ae0a33 commit of my monimelt program on github. I don't understand very well how init functions work (and I probably don't unde

Re: [go-nuts] Re: gwenn/gosqlite, go1.8, runtime error: cgo argument has Go pointer to Go pointer

2017-03-08 Thread Basile Starynkevitch
On Wednesday, March 8, 2017 at 9:40:05 PM UTC+1, Ian Lance Taylor wrote: > > On Wed, Mar 8, 2017 at 11:34 AM, Basile Starynkevitch > > wrote: > > > > On Wednesday, March 8, 2017 at 8:24:26 PM UTC+1, Ian Lance Taylor wrote: > >> > >> On Wed, Ma

Re: [go-nuts] Re: gwenn/gosqlite, go1.8, runtime error: cgo argument has Go pointer to Go pointer

2017-03-08 Thread Basile Starynkevitch
On Wednesday, March 8, 2017 at 8:24:26 PM UTC+1, Ian Lance Taylor wrote: > > On Wed, Mar 8, 2017 at 7:54 AM, Basile Starynkevitch > > wrote: > I don't have any particular recommendations but I believe that > github.com/mattn/go-sqlite3 works correctly with cgo. I know

Re: [go-nuts] Re: gwenn/gosqlite, go1.8, runtime error: cgo argument has Go pointer to Go pointer

2017-03-08 Thread Basile Starynkevitch
On Wednesday, March 8, 2017 at 5:09:06 PM UTC+1, Konstantin Khomoutov wrote: > > So if you're not really tied to SQLite as such (and picked it merely > because you're familiar with it or because it's a sane go-to choice for > single-file structured data persistence solution) other pure-Go > s

[go-nuts] Re: gwenn/gosqlite, go1.8, runtime error: cgo argument has Go pointer to Go pointer

2017-03-08 Thread Basile Starynkevitch
On Wednesday, March 8, 2017 at 2:23:12 PM UTC+1, Tamás Gulácsi wrote: > > It's quite straightforward: gwenn/gosqlite has an error, by passing a Go > pointer to the C side. This check is in effect since Go1.6. > > You should try to refresh your gosqlite library, or find a better > maintained one

[go-nuts] gwenn/gosqlite, go1.8, runtime error: cgo argument has Go pointer to Go pointer

2017-03-08 Thread Basile Starynkevitch
Hello list, It is about my (github-ed) monimelt (MELT monitor, in early pre-alpha stage) specifically about its commit 44434cd991c which has some README.md

[go-nuts] Re: encoding an integral float like 1.0 as "1.0" in JSON (not "1"), and other JSON questions

2017-03-02 Thread Basile Starynkevitch
Thanks for all for the help. I managed to commit 4da8b9c7a7d7822ca1e45ce660 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group a

[go-nuts] Re: Go 1.8 compiler SEGV - issue #19323

2017-03-02 Thread Basile Starynkevitch
On Tuesday, February 28, 2017 at 8:46:47 PM UTC+1, Basile Starynkevitch wrote: > > Hello All, > > I'm still a newbie, and I managed to crash the Go 1.8 compiler > (Linux/amd64/Debian/Sid). Probably I have some mistake in my own code (but > I am not expecting it to SEGV

[go-nuts] decoding various JSON in specific way (according to first JSON name)

2017-03-02 Thread Basile Starynkevitch
ds). It is strange that not every JSON token is actually publicly visible (colons and commas are not). Of course the actual case is a bit more complex (and not exactly what I am explaining above, which is just a simplified example). See my commit c8a9212eccbdf2 <https://github.com/bstarynk/monime

Re: [go-nuts] encoding an integral float like 1.0 as "1.0" in JSON (not "1"), and other JSON questions

2017-03-02 Thread Basile Starynkevitch
On Thursday, March 2, 2017 at 12:01:49 PM UTC+1, Jakob Borg wrote: > > > On 2 Mar 2017, at 18:29, Basile Starynkevitch > wrote: > > I would like that second line to be at least json_emit buf: -1.0 because > I need to separate objvalmo.FloatV from objvalmo.IntV types >

[go-nuts] encoding an integral float like 1.0 as "1.0" in JSON (not "1"), and other JSON questions

2017-03-02 Thread Basile Starynkevitch
Hello All, This could be related to issue #6384 I want to JSON encode a float64 point number always as a JSON float, so 1.0 should be encoded as 1.0 not as 1 because at decoding time I want to distinguish them. Conceptually, I am persisting in JSON fo

Re: [go-nuts] plugin questions....

2017-02-28 Thread Basile Starynkevitch
On Wednesday, March 1, 2017 at 7:17:42 AM UTC+1, Ian Lance Taylor wrote: > > On Tue, Feb 28, 2017 at 12:44 PM, Basile Starynkevitch > > wrote: > > Can the packages defined in one plugin be visible from plugins loaded > > afterwards? I'm thinking of a dlope

Re: [go-nuts] plugin questions....

2017-02-28 Thread Basile Starynkevitch
On Tuesday, February 28, 2017 at 10:16:27 PM UTC+1, Ian Lance Taylor wrote: > > On Tue, Feb 28, 2017 at 12:44 PM, Basile Starynkevitch > > wrote: > > > > A few questions and wishes about plugins (Go1.8 Linux/amd64) > > Sorry, but you need to indicate

[go-nuts] plugin questions....

2017-02-28 Thread Basile Starynkevitch
.3.html> available in Go? I would like, given a pointer, to get the name of the function at the same address (but I guess there could be issues with closures). Is there any name mangling <https://en.wikipedia.org/wiki/Name_mangling> issues the user of Go plugins should be aware of?

[go-nuts] Go 1.8 compiler SEGV - issue #19323

2017-02-28 Thread Basile Starynkevitch
ete enough? For some reason, I might have not been able to upload the faulty program (a quite small one). To help Go maintainers, I have attached it here. Regards -- Basile Starynkevitch (France) http://starynkevitch.net/Basile/ -- You received this message because you are subscribed to the Goo

[go-nuts] Re: File organization in a github-ed Go project

2017-02-28 Thread Basile Starynkevitch
On Monday, February 27, 2017 at 3:18:18 PM UTC+1, Basile Starynkevitch wrote: > > > > On Monday, February 27, 2017 at 3:02:24 PM UTC+1, C Banning wrote: >> >> Try organizing your project as: >> >> monimelt >> >> src >> >> cmd (or &quo

[go-nuts] Re: File organization in a github-ed Go project

2017-02-27 Thread Basile Starynkevitch
to use long paths in import directives? Would that allow me to code import "serialmo" instead of import "github.com/bstarynk/monimelt/serialmo" in my file objvalmo.go (to ease the forking of my github project)? Regards -- Basile Starynkevitch <http://starynkevitch.net/Ba

Re: [go-nuts] Re: weak hash for (MongoDb like) data server

2017-02-27 Thread Basile Starynkevitch
5df2885c> so I hope to have understood your advice correctly. Regards. Basile Starynkevitch -- 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-n

[go-nuts] File organization in a github-ed Go project

2017-02-27 Thread Basile Starynkevitch
y his own one in every package path like "github.com/bstarynk/monimelt/serial" I tried (and I would prefer) to code serialmo "../serial" but that does not work. I'm certainly doing things very wrong. What did I missed? I'm using the go tool to compile stuff. Th

[go-nuts] Re: weak hash for (MongoDb like) data server

2017-02-15 Thread Basile Starynkevitch
On Thursday, February 16, 2017 at 6:42:05 AM UTC+1, Basile Starynkevitch wrote: > > > > On Wednesday, February 15, 2017 at 9:01:58 PM UTC+1, Tamás Gulácsi wrote: > > >> Why do you need this? >> You want the GC do the housekeeping for you, but I'm sure you

[go-nuts] Re: weak hash for (MongoDb like) data server

2017-02-15 Thread Basile Starynkevitch
On Wednesday, February 15, 2017 at 9:01:58 PM UTC+1, Tamás Gulácsi wrote: > Why do you need this? > You want the GC do the housekeeping for you, but I'm sure you won't be > happy with the result, as the GC's policy differs from what you await... > What make you believe I won't be happy with

[go-nuts] weak hash for (MongoDb like) data server

2017-02-14 Thread Basile Starynkevitch
rhaps to Q2 before that Q3. I might have as additional wish the ability to dynamically load some plugin which would represent an additional kind of value (think of floating point, or bignums, etc...) Thanks for reading. Regards. PS. Most important question is Q1. -- Basile Starynkevitch h