Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-09-2012, 10:05 PM   #1
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
I've been looking at learning Go, google's programming language, and decided, "Hey wouldn't it be nice if could get Go binaries to run on the Kindle?"
Guess what. With a simple
Code:
export GOARCH=arm
export GOARM=5
export GOOS=linux
bash $go/src/make.bash
You produced go, gofmt, and godoc binaries that run on the kindle.
But wait! Trouble looms ahead. The backend ARMv5 compilers that were supposed to be built along with those shiny frontends didn't and probably wont get built until someone hooks a crosscompiler into the mix to cross compile 4 compilrs for go....
But, you can still crosscompile go binaires, much easier than crosscompiling other things. (from what ive seen here...)
With a simple (on the host, btw)
Code:
export GOARCH=arm
export GOOS=linux
export ARM=5
go build helloworld.go
You should end up with a nice shiny ARMv5 binary.

TLDR: crosscompiling Go binaries for the K3 and above is a breeze, however Go natively on the kindles may have to wait a little while...
(Feel free to correct glaring errors! did this from my kindle )

Last edited by qlob; 10-18-2012 at 02:39 PM.
qlob is offline   Reply With Quote
Old 10-09-2012, 10:18 PM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
jeebers that must have taken forever to type.
respect. OTG mini keyboards FTW!!!

Back on topic. Nice find mate!
twobob is offline   Reply With Quote
Old 10-09-2012, 10:20 PM   #3
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
nah, didnt take that long... it was between my posts in the bzflag/lbreakout thread... I would have used a legit keyboard... I wish i could help in some way with getting OTG ported...


EDIT: looks like the backend compilers have Makefiles... Would that help to make it easier to build to run natively on the Kindles?

Last edited by qlob; 10-09-2012 at 10:23 PM.
qlob is offline   Reply With Quote
Old 10-09-2012, 10:29 PM   #4
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Could ram makefiles through your own Cross Toolchain, or Buildroots, We don't have a native gcc yet... not for the 3 that I know of, but I do have the entire rest of the autotools suite so maybe soon
twobob is offline   Reply With Quote
Old 10-09-2012, 11:06 PM   #5
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
The gccgo front end for gcc (also part of the gcc-4.7 release):
http://golang.org/doc/install/gccgo
It is a long page, but worth reading from top to bottom before building.

Which is referenced on this page:
http://code.google.com/p/go/

For those running Ubuntu (and probably Debian):
sudo apt-get install gccgo

Which means it might be worth checking packages.debian.org for an armel binary.

Last edited by knc1; 10-09-2012 at 11:21 PM.
knc1 is offline   Reply With Quote
Old 10-10-2012, 01:16 AM   #6
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Go is really simple and expressive language with extensive standard library. It's worth learning (and takes not so much time to do it). Cross-compiling Go programs with Google's Go compiler is definitely a breeze as well as running cross-compiled binaries on target platform (as binaries are statically compiled).

Ha-ha, I didn't say anything new

Nice thread. Keep it up!
eureka is offline   Reply With Quote
Old 10-10-2012, 06:02 AM   #7
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Well, it does not take much time to learn, but it takes some coding to master it. It's a nice language and certainly worth the suggestion. Personally I am already using it on my Kindle - I use Han-Wen's go-fuse (https://github.com/hanwen/go-fuse) (the zipfs example project it comes with) to have some document containers on my kindle.
hawhill is offline   Reply With Quote
Old 10-10-2012, 06:14 AM   #8
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Personally, I'm only just past the Hello world stage, but I have found (with python) that I'm so used to this Kindle's keyboard and the keys used for symbols in myts, I'm the same speed, if not faster at writing code. plus when I'm working on a tough(at least for me...) problem, I can whip out my Kindle most anywhere to work on a problem in my spare time.

@eureka: thanks!
qlob is offline   Reply With Quote
Old 10-10-2012, 06:56 AM   #9
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by hawhill View Post
Well, it does not take much time to learn, but it takes some coding to master it. It's a nice language and certainly worth the suggestion. Personally I am already using it on my Kindle - I use Han-Wen's go-fuse (https://github.com/hanwen/go-fuse) (the zipfs example project it comes with) to have some document containers on my kindle.
Once upon a time, I suggested zipFS might be useful to Komic.
Perhaps this thread will open the door again to how this could be used to handle the (zip compressed archive) comic chapters.
knc1 is offline   Reply With Quote
Old 10-10-2012, 08:30 AM   #10
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I really tried with fuse-zip but I didn't managed to get a full working version for kindle!
The real problem is I don't know how to do it (the only way I know is the one I used to get unrar and this time it didn't work!).
silver18 is offline   Reply With Quote
Old 10-10-2012, 09:16 AM   #11
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by silver18 View Post
I really tried with fuse-zip but I didn't managed to get a full working version for kindle!
The real problem is I don't know how to do it (the only way I know is the one I used to get unrar and this time it didn't work!).
What is included in the set of examples of the project Hawhill referred to is not the same as the one you tried.

I only scanned through it, did not actually study it, but it is just a simplified example of using a zip archive as a (readonly) file system.

But the problem may still remain of how you could make use of it from within a WAF.
I honestly do not know if that could be done, even with this simplified example (which of course could be changed as required).
knc1 is offline   Reply With Quote
Old 10-10-2012, 09:22 AM   #12
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by knc1 View Post
What is included in the set of examples of the project Hawhill referred to is not the same as the one you tried.

I only scanned through it, did not actually study it, but it is just a simplified example of using a zip archive as a (readonly) file system.

But the problem may still remain of how you could make use of it from within a WAF.
I honestly do not know if that could be done, even with this simplified example (which of course could be changed as required).
ALERT, NOOB'S TALKING:

if it can mount zip archives and make them readonly just like folders, it could be used to mount *.zip archives in the Gallery folder before launching Komic.

The start script in Komic makes a list of every folder containing images in /mnt/us/Gallery and this means zip archives will be detected as folders.
Anyway, I don't know how to automagically () unmount zip archives when closing Komic.
silver18 is offline   Reply With Quote
Old 10-10-2012, 09:31 AM   #13
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Use a "lazy un-mount" command?

Issued *after* opening (making the mount "busy"), the system will pend the un-mount action until the mount point is no longer in use rather issue the error message of: "xyz busy".
knc1 is offline   Reply With Quote
Old 10-10-2012, 10:14 AM   #14
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Admittedly, I use launchpad sequences for mounting _and_ unmounting. It's a pretty manual approach. But mounting ZIPs is probably worth another thread, I did not want to drive this one away from its topic. My intention was to point to a use-case for using Go, and there might be numerous others.

E.g. the web server (and client!) framework that Go offers in its standard library is probably worth a mention. On the other hand, when it comes to UI stuff, Go comes pretty unprepared, especially with regard to the Kindle. In kindlepdfviewer, I started UI stuff from scratch (and others gladly helped a lot, so we have some pretty decent framework already). It's possible and it works, and replicating such a thing in Go would certainly be feasible, though some amount of work. But writing a UI framework probably is not something to start with when learning a new language like Go. Go really shines at the more bare-bone aspects, and I would be interested in what other people might use it for.
hawhill is offline   Reply With Quote
Old 10-13-2012, 10:29 AM   #15
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Just built go with the gcc from optware. Seems to be working perfectly. I will post my build when I get to a computer.
qlob is offline   Reply With Quote
Reply

Tags
golang


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What should I write next? mmessina Writers' Corner 7 05-24-2011 04:42 PM
I Write Like Moejoe Writers' Corner 15 07-30-2010 09:44 PM
Would you like to write with me? Elliot Writers' Corner 0 12-29-2009 12:09 PM
Write Fast, Write Slow? Moejoe Writers' Corner 14 03-25-2009 09:55 AM


All times are GMT -4. The time now is 07:36 PM.


MobileRead.com is a privately owned, operated and funded community.