Callbacks on ARM

98 views
Skip to first unread message

Alvaro GP

unread,
Nov 2, 2011, 9:18:29 AM11/2/11
to golan...@googlegroups.com
Hello!
If I'm not mistaken, callbacks haven't been implemented on ARM yet. Is it planned to implement this for Go v1? I ask this because I was thinking about making an OpenGL based GUI library for Android, since the regular GUI library is only exposed to Java  programmers (geez...). But I guess that I would need callbacks for that. If it isn't planned then no problem, I totally understand that the resources are limited. In that case I would just stick to the Windows port, which works great.

Congratulations on the awesome job that you are doing with the Go language. You are true heroes. It's a shame that Google isn't devoting more resources to this important project and instead they have all the money of the world to spend on failed experiments.

Archos

unread,
Nov 2, 2011, 9:37:38 AM11/2/11
to golang-nuts


On Nov 2, 1:18 pm, Alvaro GP <alvar...@gmail.com> wrote:
> Congratulations on the awesome job that you are doing with the Go language.
> You are true heroes. It's a shame that Google isn't devoting more resources
> to this important project and instead they have all the money of the world
> to spend on failed experiments.
I'm going to break a spear for Google; for an experiment goes well, in
the first you have to make many mistakes.

But I agree that Google should devore more resources to Go. I've in
mind projects that could help to developers to build into one only
plataform:

+ Parser for CSS3 and HTML5. Why don't use them to build too desktop
apps., the great advantage is that we would develop for one only
plataform so it would be very easy using almost the same code build
for a desktop/web application.

+ Canvas library. There is already a API to draw 2D (used for all
browsers). Then, why don't build a Canvas library to build about it
the widgets for the desktop apps.

The development for UI has grow up a lot of more than for desktop
apps, so could be used those APIs and languages.

+ Another point very interesting would be a VM for GO to be used in
browsers (at least in Firefox and Crome)

Alvaro GP

unread,
Nov 2, 2011, 11:13:57 AM11/2/11
to golan...@googlegroups.com
But the first two options require programming the whole UI of your applications in JavaScript, right?

Russ Cox

unread,
Nov 2, 2011, 12:41:48 PM11/2/11
to golan...@googlegroups.com
On Wed, Nov 2, 2011 at 09:18, Alvaro GP <alva...@gmail.com> wrote:
> If I'm not mistaken, callbacks haven't been implemented on ARM yet. Is it
> planned to implement this for Go v1?

I assume you mean cgo on arm.
It is not planned for Go 1, although it would certainly be
nice to have. If you or anyone else would like to have a
go, we're always happy to do code reviews.

Thanks.
Russ

Archos

unread,
Nov 2, 2011, 1:27:10 PM11/2/11
to golang-nuts
I mean about to build User Interfaces for desktops apps. using the
same technology than there is already exist for the web, (HTML5, CSS3,
canvas) but without JS. So, you're using a technology very mature,
allowing build both web and desktops apps. easily.

Once it's created a parser for CSS3 (or HTML5), then could be created
a compiler for that language so it will run faster in desktop.
Note that I'd in mind those projects but I've no time neither
resources like Google to get it by myself but it's a good idea.

Alvaro GP

unread,
Nov 2, 2011, 2:35:19 PM11/2/11
to golan...@googlegroups.com, r...@golang.org
Thanks Russ. I meant just callbacks, like in Windows, where you can do syscalls and callbacks directly, without cgo. I find this very useful and was wondering if it could be done on Linux/ARM easily.

I will see if I can do anything.

Thanks

Russ Cox

unread,
Nov 2, 2011, 2:59:55 PM11/2/11
to golan...@googlegroups.com
On Wed, Nov 2, 2011 at 14:35, Alvaro GP <alva...@gmail.com> wrote:
> Thanks Russ. I meant just callbacks, like in Windows, where you can do
> syscalls and callbacks directly, without cgo. I find this very useful and
> was wondering if it could be done on Linux/ARM easily.

That means cgo. Windows has a slightly different interface
for getting at system DLLs, because it is needed at such
a low level (package syscall), but it's still cgo.

Russ

Alvaro GP

unread,
Nov 2, 2011, 3:14:22 PM11/2/11
to golan...@googlegroups.com, r...@golang.org
Cool. One more question: Since cgo is working well on Linux/x86, how hard would it be to port that functionality to Linux/ARM? Would it be as simple as translating a bit of assembly or am I missing something?

Thanks

Russ Cox

unread,
Nov 2, 2011, 3:31:29 PM11/2/11
to golan...@googlegroups.com

http://golang.org/src/pkg/runtime/cgocall.c has details.
There's assembly involved but also linker changes.

Russ

Reply all
Reply to author
Forward
0 new messages