Notices


Reply
Thread Tools
Posts: 29 | Thanked: 22 times | Joined on Mar 2010
#11
Originally Posted by Mentalist Traceur View Post
I have scripts that automatically move all the significantly-sized files from them if you'd like. (although I think I have the standard 'include' directory symlinked to /opt by default as part of a different, stuff-that's-on-the-N900-by-default optification script)
Thanks for the offer - I ended up waiting it out. This may be handy in the future - I'll keep it in mind (rarely need to build from source on my n900). Thanks

Had to rebuild from /, because my SDCard was fat and couldn't execute or (after remounting with umask) support symlinks.

The binary seems to work ok for simple scripts, but has an issue with some NPM packages... may be related to SD issue above - think I'll try formatting as ext3
 
Posts: 5 | Thanked: 7 times | Joined on Oct 2012 @ Lummen (Belgium)
#12
This is how I compiled nodejs: http://krispypen.github.com/blog/201...for-your-n900/

I did a super-easy performance test on the N900:

for loop from 0 to 100000000 doing a + b each time:

nodejs:
Code:
console.log("start");
var a = 0;
for(var i = 0; i < 100000000; i++) {
  a = a + i;
  a = a - i;
}
console.log("ok");
startup time node: 1s
for loop time: 2,5s

python:
Code:
print "start"
a = 0
for x in range (0, 100000000):
	a = a + x;
	a = a - x;
print "ok"
startup time: 0.2s
for loop time: 620s
 

The Following 6 Users Say Thank You to Kris Pypen For This Useful Post:
Posts: 29 | Thanked: 22 times | Joined on Mar 2010
#13
Thanks Kris, wish I had your guide to follow when I started out :-)

Hopefully this will fix some of the issues I'm seeing in my haqq'd together build.

Are you able to build Twitter Bootrap ok with it? http://twitter.github.com/bootstrap/ (less + some others)
 
Posts: 5 | Thanked: 7 times | Joined on Oct 2012 @ Lummen (Belgium)
#14
Originally Posted by nermaljcat View Post
Are you able to build Twitter Bootrap ok with it? http://twitter.github.com/bootstrap/ (less + some others)
Are you trying to build https://github.com/twitter/bootstrap/zipball/master ? Or are your trying to do "npm install twitter-bootstrap" ?
 
Posts: 5 | Thanked: 7 times | Joined on Oct 2012 @ Lummen (Belgium)
#15
I created a github repository where we can put some testing snippets: https://github.com/krispypen/NodeJSForMaemoSnippets
I already made a working snippet for creating a call and sending an sms
 

The Following User Says Thank You to Kris Pypen For This Useful Post:
Posts: 959 | Thanked: 3,427 times | Joined on Apr 2012
#16
Any chance someone could package this up and put it in extras-devel?
 

The Following 4 Users Say Thank You to taixzo For This Useful Post:
Posts: 5 | Thanked: 7 times | Joined on Oct 2012 @ Lummen (Belgium)
#17
AapoRantalainen told me 3 days ago that he's trying to do it. I'm not yet familliar with packaging. I created a zip file with the compiled node and npm in it, so maybe this can help you at the moment. https://github.com/krispypen/NodeJSF.../master/binary
 
Posts: 29 | Thanked: 22 times | Joined on Mar 2010
#18
Originally Posted by Kris Pypen View Post
Are you trying to build https://github.com/twitter/bootstrap/zipball/master ? Or are your trying to do "npm install twitter-bootstrap" ?
Trying to build from source. I think my local build is a bit flaky.
 
Posts: 839 | Thanked: 3,386 times | Joined on Mar 2009
#19
nodejs (0.8.12) on the extras-devel. Fully optified. Run
Code:
/opt/node/bin/node
npm is working, usage example
Code:
/opt/node/bin/npm install socket.io
(Seems npm needs gcc installed as well. Run on directory where you have write access. Tested only on ext2 filesystem.)

There are little bit hacking (=packeting magic) because autobuilders 'python' is python2.3 and it really needs python2.5. (Documentation says it needs python2.6?).

-----
[EDIT]
This is list of upstream bugs affecting Maemo5. Whoever makes next release should check results of these:
https://github.com/joyent/node/issues/2210 : consistently use #!/usr/bin/env python in gyp (maybe)
https://github.com/joyent/node/issues/4076 : simplejson (for python2.5) and LINK=g++ (as flock fails)
https://github.com/joyent/node/issues/4142 : arm_neon (deps/v8/build/common.gypi)
https://github.com/joyent/node/issues/4144 : only --without-snapshot works

This might be useful note too:
Code:
export PYTHON=python2.5
#export PYTHON=python2.7
$PYTHON ./configure
------
Central place for N900 snippets is very good idea, please use it and share your creations.

Last edited by AapoRantalainen; 2012-10-17 at 04:07. Reason: 0.8.12, list of upstream bugs
 

The Following 5 Users Say Thank You to AapoRantalainen For This Useful Post:
Posts: 839 | Thanked: 3,386 times | Joined on Mar 2009
#20
Simple www-server for testing nodejs: https://github.com/krispypen/NodeJSF.../www-server.js

Serves static html, css, js, png, jpg, jpeg-files.
Default port is 9002.
Uses socket.io.
 

The Following 2 Users Say Thank You to AapoRantalainen For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 17:02.