|  10-09-2012, 10:05 PM | #1 | 
| Official Lurker            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 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 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. | 
|   |   | 
|  10-09-2012, 10:18 PM | #2 | 
| ( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr            Posts: 6,586 Karma: 6299993 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! | 
|   |   | 
| Advert | |
|  | 
|  10-09-2012, 10:20 PM | #3 | 
| Official Lurker            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. | 
|   |   | 
|  10-09-2012, 10:29 PM | #4 | 
| ( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr            Posts: 6,586 Karma: 6299993 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
		 | 
|   |   | 
|  10-09-2012, 11:06 PM | #5 | 
| Going Viral            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. | 
|   |   | 
| Advert | |
|  | 
|  10-10-2012, 01:16 AM | #6 | 
| but forgot what it's like            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! | 
|   |   | 
|  10-10-2012, 06:02 AM | #7 | 
| Wizard            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.
		 | 
|   |   | 
|  10-10-2012, 06:14 AM | #8 | 
| Official Lurker            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! | 
|   |   | 
|  10-10-2012, 06:56 AM | #9 | |
| Going Viral            Posts: 17,212 Karma: 18210809 Join Date: Feb 2012 Location: Central Texas Device: No K1, PW2, KV, KOA | Quote: 
 Perhaps this thread will open the door again to how this could be used to handle the (zip compressed archive) comic chapters. | |
|   |   | 
|  10-10-2012, 08:30 AM | #10 | 
| THE NOOB            Posts: 708 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!). | 
|   |   | 
|  10-10-2012, 09:16 AM | #11 | |
| Going Viral            Posts: 17,212 Karma: 18210809 Join Date: Feb 2012 Location: Central Texas Device: No K1, PW2, KV, KOA | Quote: 
 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). | |
|   |   | 
|  10-10-2012, 09:22 AM | #12 | |
| THE NOOB            Posts: 708 Karma: 1545649 Join Date: Jan 2012 Location: Italy Device: Kindle Touch 5.3.2 | Quote: 
 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. | |
|   |   | 
|  10-10-2012, 09:31 AM | #13 | 
| Going Viral            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". | 
|   |   | 
|  10-10-2012, 10:14 AM | #14 | 
| Wizard            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. | 
|   |   | 
|  10-13-2012, 10:29 AM | #15 | 
| Official Lurker            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.
		 | 
|   |   | 
|  | 
| Tags | 
| golang | 
| Thread Tools | Search this Thread | 
| 
 | 
|  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 |