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 - hilti

#1
Anything else we might add? / Lisp badge
January 11, 2019, 02:15:01 AM
Happy New Year everyone! This is a nice project:



http://www.technoblogy.com/show?2AEE">//http://www.technoblogy.com/show?2AEE
#2
Thank you for the update, Lutz!



Unfortunately I've not programmed using newLISP for a long time: after founding my company AppTruck I had to focus on app development, especially for iOS.



But I've plans for rewriting Dragonfly and adapt some widely used modern technologies, e.g. easier API definitions, doing requests/responses with JSON, a simple key/value storage like Firebase.
#3
newLISP newS / Re: Book about Fuzzy Logic in newLISP
November 13, 2015, 05:07:46 AM
Great! newLISP rocks :-)
#4
That's an interesting approach.

http://ceramic.github.io">//http://ceramic.github.io



Discussion on HackerNews over here

https://news.ycombinator.com/item?id=9877314">//https://news.ycombinator.com/item?id=9877314
#5
QuoteWhen people have problems, its often the port used. Currently on 10.6.2, 2000 and 2001 are used, and that may be your problem.


This was my problem when trying to load newLISP-GS in a company network environment. They blocked a lot of ports and newLISP-GS couldn't start up. Took me an hour to figure out, because I was thinking about Java updates and not blocked network ports.
#6
Hi!



Maybe this help's, if someone needs to send data in CSV format to a browser.

In this example a Dragonfly Route "http://www.mysite.com/csvexport">www.mysite.com/csvexport" is called, a SQLite dump is produced on the fly and send out to the browser.



I needed this quick workaround in an Admin-Interface.



Cheers

Marc





(new Resource 'Resource.Csvexport)
(context 'Resource.Csvexport)

(define (Resource.Csvexport:Resource.Csvexport)
(catch-all)
)

(define (catch-all action)
(Response:header "Content-Description" "File Transfer")
(Response:header "Content-Type" "text/csv")
(Response:header "Content-Disposition" "attachment; filename=out.csv")
(Response:header "Pragma" "public")
(Response:header "Expires" "0")

(change-dir (append DF_SELF_DIR))
(change-dir "..")
(change-dir "databases")

;; Now we're running sqlite3 binary directly on the server ...
(setq cmd-dump {sqlite3 -header -csv -separator ';' db.sqlite "select * from data;" > out.csv})
(exec cmd-dump)

;; Sending it out ...
(print (read-file "out.csv"))
)

(context MAIN)
#7
Quotewhat happened to http://www.rundragonfly.com">http://www.rundragonfly.com?


I just quit a lot of rare used domains including this one. I'll put the Dragonfly Example Site under my current main domain uberberg.com.



Or just Google "dragonfly example-site" (https://www.google.de/#q=dragonfly+example-site&start=10">//https://www.google.de/#q=dragonfly+example-site&start=10) to find some Dragonfly users ;-)





Update:

It's here: http://dragonfly.uberberg.com">//http://dragonfly.uberberg.com
#8
Hi Ghyll!



Welcome to the newLISP world! Any questions are great and will help others learning.



First questions:

1. Why are You using .nhtml as extension for the views - just use .html and Dragonfly will execute it

2. Working with forms is easier via resources (http://dragonfly.neocortex.io/dragonfly_routes">//http://dragonfly.neocortex.io/dragonfly_routes)



If You'd like just sent me the code as a ZIP and I'll help You out.



Greetings from Germany

Marc
#9
Quote from: "mcc" is *very* nice since anything else Lisplike failed

on my Arietta


Look's like an impressive small hardware. How's the performance?



Cheers

Marc
#10
newLISP newS / Re: newLISP stable release 10.6.2
January 22, 2015, 09:09:11 PM
Thank You Lutz from Germany :-)
#11
I don't get it ... since two hours I'm trying to train some website data, but don't get the expected results.

(bayes-query) returns 0.5 or 1



I'm using the complex pattern in (parse) to split up german texts, too.



Here's my code:


(setq textdata "Now think about your brain. It's a long running program running on very complex and error prone hardware. How does your brain keep itself sane over time? The answer may be found in something we spend a third of our lives doing. Sleep.")

(setq text (parse (lower-case textdata) "[^a-z0-9äöüß]+" 0))
(bayes-train text 'DICT)
(bayes-query (parse (lower-case "dsd skjsd ksdjkds sdkj") "[^a-z0-9äöüß]+" 0) 'DICT)


And the result


"Now think about your brain. It226128153s a long running program running on very complex and error prone hardware. How does your brain keep itself sane over time? The answer may be found in something we spend a third of our lives doing. Sleep."
("now" "think" "about" "your" "brain" "it" "s" "a" "long" "running" "program" "running"
 "on" "very" "complex" "and" "error" "prone" "hardware" "how" "does" "your" "brain"
 "keep" "itself" "sane" "over" "time" "the" "answer" "may" "be" "found" "in" "something"
 "we" "spend" "a" "third" "of" "our" "lives" "doing" "sleep" "")
(45)
(0.5)


I'm expecting 0, because this phrase doesn't exist in my training data.



Am I missing some switch?
#12
newLISP newS / Re: newLISP in a browser
January 04, 2014, 12:14:07 PM
QuotePs: thanks for the great examples Marc. Do you also get this "undefined" message HPW is talking about? And what browser version do you run?


Yes, I do.



I'm running on OSX Mavericks



1. Safari 7.01

2. Chrome 31.0.1650.63





P.S. Reddit seems to be interested, because I get some load on my server ...

http://www.reddit.com/r/lisp">//http://www.reddit.com/r/lisp
#13
newLISP newS / Re: newLISP in a browser
January 04, 2014, 10:32:10 AM
(eval-string-js) is very cool!



Just played around with it:



(setq number (eval-string-js "window.prompt('Enter a number to divide by 2:','')"))
(setq result (div (int number) 2))
(setq alert (append "alert(" (string result) ")"))
(eval-string-js alert)


Getting the browser window height or width is easy now.



(eval-string-js "$(window).height();")
(eval-string-js "$(window).width();")


I do my best in making the Browser-IDE more advanced.
#14
newLISP newS / Re: newLISP in a browser
January 04, 2014, 06:01:22 AM
Quote from: "Lutz"
- Improve the editor using JavaScript from other projects which do editor syntax highlighting like http://jsfiddle.net/">http://jsfiddle.net/ , http://ace.c9.io/#nav=about">http://ace.c9.io/#nav=about (comes with embedding instructions!) and many others. JavaScript is the only language builtin to the browser and with Document Object Model integration. So using jQuery, Bootstrap, etc. would be a natural thing.




OK...this result was one hour of work :-) -> http://newlisp.neocortex.io/">http://newlisp.neocortex.io/

If my kids would let me do some more hacking, this IDE could be very nice.



I just combined Bootstrap, some custom CSS and CodeMirror.



Cheers

Marc
#15
newLISP Graphics & Sound / Re: HTML Tag functions?
December 15, 2013, 03:17:18 AM
I like this approach, available on Github


Quote
HTML Domain Specific Language (DSL) for newLISP

———————————————————————————————————————————————



The idea is to be able to write newlisp code as if you were writing HTML,

avoiding the use of template tags.



So instead of writing:



<html lang="en">

   <head>

      <title><% (print "This is my title") %></title>

   </head>

</html>



Were you have to use an opening <% and a closing %> each time you need to

insert newlisp code, you write:



(html "lang=en"

   (head ""

      (title "" "This is my title")))



And everything is newlisp code.



To achieve this every HTML5 tag has it's counterpart function.



Every function needs at least one parameter for the inner code, hence the empty

strings in the example above. Also they can have any number of parameters

after, which are considered to be the code or text between opening and closing

tag.



Further parameters are concatenated to second one.



Every function returns a string with the computed html code.


https://github.com/conan-lugmen/newlisp-hin">//https://github.com/conan-lugmen/newlisp-hin