Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - kanen

#31
newLISP in the real world / http Proxy Server
December 23, 2012, 12:25:23 PM
Has anyone written an http/web proxy server?



I'm playing around and want to see if I can make this work with Mozilla/Chrome/etc.



Norman? :)
#32
newLISP newS / Re: newLisp on Android
December 21, 2012, 09:42:51 PM
Quote from: "Lutz"Instructions and download are now online at newlisp.org too:



http://www.newlisp.org/code/ANDROID.html">http://www.newlisp.org/code/ANDROID.html


Small mistake:
kanen (~/Code/android-sdk/tools)$ ./emulator -avd TrustMe
Should be
kanen (~/Code/android-sdk/tools)$ ./emulator -avd MyEmulator
#33
newLISP newS / newLisp on Android
December 20, 2012, 11:23:37 PM
We have it working. It's stable.



It is missing (semaphore), which requires libraries that do not exist on Android. I'm attaching the full source, hoping Lutz will add everything necessary to make this work as part of the main newlisp download.



Steps to compile:



1. Download the android-ndk - http://developer.android.com/tools/sdk/ndk/index.html">http://developer.android.com/tools/sdk/ndk/index.html

2. Make sure your environment works (see above documentation) on your platform

3. Unpack and put newlisp-ndk in the android-ndk directory

4. Compile newlisp



kanen (~/Code/android-ndk)$ ./ndk-build -C newlisp-ndk/
make: Entering directory `/Users/kanen/Code/android-ndk/newlisp-ndk'
Compile thumb  : newlisp <= newlisp.c
Compile thumb  : newlisp <= nl-symbol.c
Compile thumb  : newlisp <= nl-math.c
Compile thumb  : newlisp <= nl-list.c
Compile thumb  : newlisp <= nl-liststr.c
Compile thumb  : newlisp <= nl-string.c
Compile thumb  : newlisp <= nl-sock.c
Compile thumb  : newlisp <= nl-import.c
Compile thumb  : newlisp <= nl-xml.c
Compile thumb  : newlisp <= nl-web.c
Compile thumb  : newlisp <= nl-matrix.c
Compile thumb  : newlisp <= nl-debug.c
Compile thumb  : newlisp <= pcre.c
Compile thumb  : newlisp <= nl-filesys.c
Executable     : newlisp
Install        : newlisp => libs/armeabi/newlisp
make: Leaving directory `/Users/kanen/Code/android-ndk/newlisp-ndk'


The binary gets put into libs/armeabi/newlisp. From there, you just have to build an Android emulator and you can copy newLisp over to it.



For that, you need the android-sdk - http://developer.android.com/sdk/index.html">http://developer.android.com/sdk/index.html



First, list the targets and find the armeabi version you want to use. I use Target 4, which isn't the most recent, but is the most widely deployed, at API level 15.



kanen (~/Code/android-sdk/tools)$ ./android list targets
Available Android targets:
id: 4 or "Google Inc.:Google APIs:15"
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Revision: 2
     Description: Android + Google APIs
     Based on Android 4.0.3 (API level 15)
     ABIs : armeabi-v7a


Now, generate an emulator from that target platform:
kanen (~/Code/android-sdk/tools)$ ./android create avd -n MyEmulator -t 4

Then, run the emulator:
kanen (~/Code/android-sdk/tools)$ ./emulator -avd MyEmulator

Attach a shell to the emulator:
kanen (~/Code/android-sdk/platform-tools)$ ./adb shell

Make sure everything's ok and create a directory for newLisp:

# mkdir /data/nl
# chmod 777 /data/nl
# exit


Copy newLisp to the emulator:

./adb push ~/Code/android-ndk/newlisp-ndk/libs/armeabi/newlisp /data/nl


Go back into the shell and run newLisp:
kanen (~/Code/android-sdk/platform-tools)$ ./adb shell
# cd /data
# cd nl
# ls
newlisp
# ./newlisp
newLISP v.10.4.5 on Linux IPv4/6, execute 'newlisp -h' for more info.

>


Enjoy newLisp on Android. You now have a world of mobile possibilities for our favorite scripting language.


[attachment=0]newlisp-ndk.tgz[/attachment]

I've also included a link to the newLisp on arm binary, if you don't want to compile all this and just want to push newLisp to your shiny Android device: https://dl.dropbox.com/u/602830/newlisp">https://dl.dropbox.com/u/602830/newlisp
#34
newLISP and the O.S. / Re: Port to Android wanted...
December 20, 2012, 10:52:06 PM
Already done.



I'll post the diffs and the makefile soon. We've had it working on several Android devices for over a week now.
#35
newLISP and the O.S. / Re: CGI input data disappearing
December 04, 2012, 05:25:53 PM
Thanks to Kirill, there's now a patch that also fixes this problem for web.lsp (part of artful-code).



You can always grab the latest version at:



https://github.com/kanendosei/artful-newlisp">//https://github.com/kanendosei/artful-newlisp
#36
newLISP in the real world / Sublime Text
November 15, 2012, 03:44:59 PM
[attachment=0]sublime_newlisp.png[/attachment]

I'm in love with Sublime Text 2. It has replaced vim, TextMate and BBEdit completely.



With the newLisp bundle & a few tweaks, it's pretty much perfect. Thanks to @curmullion for the syntax file. https://github.com/cormullion/newlisp-sublime-text-2-package">//https://github.com/cormullion/newlisp-sublime-text-2-package



http://www.nerdi.net/blog/2012/02/05/customize-your-sublime-text-2-configuration-for-awesome-coding/">//http://www.nerdi.net/blog/2012/02/05/customize-your-sublime-text-2-configuration-for-awesome-coding/



You also need this -- https://github.com/facelessuser/BracketHighlighter">//https://github.com/facelessuser/BracketHighlighter



And, you should learn a few shortcuts https://gist.github.com/1207002">//https://gist.github.com/1207002  (I'm in love with CMD+D when highlighting a word, for example -- or CMD+CTRL+G for the "whole scope").



See also:  CMD+,



(updated)
{
    "auto_complete": true,
    "close_windows_when_empty": false,
    "color_scheme": "Packages/Theme - Phoenix/Color Scheme/Tomorrow-Night.tmTheme",
    "draw_white_space": "selection",
    "find_selected_text": true,
    "fold_buttons": true,
    "font_face": "Inconsolata",
    "font_options": [ "subpixel_antialias" ],
    "font_size": 14.0,
    "highlight_line": true,
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true,
"save_on_focus_lost":true,
"tab_size": 2,
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "_build", "dist", "build", "site"]
}
#37
newLISP in the real world / Re: newlisp and openwrt
November 14, 2012, 03:49:55 PM
Actually, if you go to https://github.com/kanendosei/kane-box/tree/master/openwrt">https://github.com/kanendosei/kane-box/ ... er/openwrt">https://github.com/kanendosei/kane-box/tree/master/openwrt -- you will see a Makefile for OpenWRT which works and creates a semi-reasonable version of newLisp.



You just have to put the newlisp Makefile in the right place ( ~/openwrt/package/newlisp directory ) and it will grab and compile the proper source files (from kane-box.com, actually).  I don't have it working with 10.4.x of newLisp, but that can be done, if anyone needs it.


Quote from: "cormullion"
Quoteuser Kanen has some experience with OpenWrt systems


ah yes, I remember the https://github.com/kanendosei/kane-box">Kane box...
#38
I'm massively in favor of this.



Something that would allow newLisp install modules into the current "NEWLISPDIR" + /modules directory if they didn't already exist there.



While I'm wishing, I'd add versioning to the modules, so we know if one has been updated.
#39
Anyone ever get Blowfish working in crypto?
#40
Anyone have this working?



If not, I'm likely going to write a module, as I need this functionality.



It looks like it's possible to query DynamoDB through an http/https standard request - http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/MakingHTTPRequests.html">//http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/MakingHTTPRequests.html. This seems similar to CouchDB, which we already have working.
#41
newLISP and the O.S. / newLisp on Android (redux)
October 17, 2012, 11:37:40 AM
I am very interested in having newLisp running on Android (especially the mobile version). Ice Cream Sandwich or higher is fine.



Anyone made this work yet?



Let me know. I'd love to collaborate and/or figure out how to make it happen.
#42
Care to share?



Mine is old and crappy and doesn't support any of the new keywords or proper variable highlighting as part of its syntax. I've been sticking with TextMate because the newLisp language Bundle just works (and I can add words and fix it when it doesn't, without having to figure out Ph.D. level code writing).


Quote from: "cormullion"I'm using something based on this:



http://www.truerwords.net/articles/bbedit/codeless_language_module.html">//http://www.truerwords.net/articles/bbedit/codeless_language_module.html



but it does tend to grind to halt on bigger files.



You could check out Sublime Text too - there's more than a hint of Textmate to it.
#43
newLISP newS / Artful Code
April 30, 2012, 07:35:22 PM
As you likely already know, I'm hosting and supporting the "Artful Code" modules.



Recently, because of some security problems with github, the repository location has changed.



Please go to http://scruffythinking.com/artful">//http://ScruffyThinking.com/artful or visit the github page directly at https://github.com/kanendosei/artful-newlisp">//https://github.com/kanendosei/artful-newlisp if you are interested in the artful code modules.



If there are any bugs, problems, issues or updates, let me know.



Thanks.
#44
The title says it all.



I have a file called "foo"
foo
bar
baz
bif
doodle


> (length (parse (read-file "foo") "n"))
6
> (length (parse (read-file "foo") {n}))
1


What am I missing in this behavior?
#45
What code less module are you using in BBEdit for syntax highlighting?



I've tried to move to BBEdit for newLisp and I keep going back to TextMate for various reasons, not the least of which is auto-paren matching.