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

#1
OK - Thanks,  you are right,  Google ;)   I just found this on github:



https://github.com/ryuo/newlisp-serial-port">//https://github.com/ryuo/newlisp-serial-port



An on the newLISP  site  under modules : http://www.newlisp.org/modules/">//http://www.newlisp.org/modules/
#2
I am wondering how to  communicate via the serial port  under Windows7.   Has someone a tipp ?
#3
You have  3 and a half slots per word.  So up to 4 commands per word .  There is also a  micronext command, with it you can make a loop within one word  and  other nice Features.. with some outer nodes you can make simple Interfaces to different memories,  I currently use the serial Interface,  one word are 3 bytes .... Here is the  most important document about it - 10 pages - everything you need is in it, quite dense :

http://www.greenarraychips.com/home/documents/greg/DB001-110412-F18A.pdf">//http://www.greenarraychips.com/home/documents/greg/DB001-110412-F18A.pdf



You are right,  I'll soak it in ..   you'll see my small steps in my blog  http://www.forthseen.de">//http://www.ForthSeen.de, (  this blog-generator is also written  in newLISP .. )



I know the ultratechnology page, maybe we should download everything  and mirror it.



I think the combination of newLISP and the GA144 is a thrilling mixture,  both are in there way powerful and minimalistic.



 I am trying the  big array idea !
#4
The nodes  talk via  the  I/O  ports to each other,  by Default a middle node listens to his 4 neighbours,  if  one of the 4 writes something it starts working.



Let's take the datastack and the push and pop command - that'll be the most used .  Top of stack is  "T"  , second is "S" and than the inner 8 words   DS 1 ... 8.

Everything works as you expect, but  DS is a ring buffer,  If you push in more than 8 words , the first will get lost, thats clear, but if you pop out somethingout, the last entry gets the popped value, too.



This is my first solution:


( define ( DSpush x )
  ( push S DS -1 )
  ( pop DS )
  ( set 'S T 'T x ))  

( define ( DSpop )
  ( set 'x T 'T S )
  ( set 'S ( pop DS -1 ) )
  ( push S DS )
  x )


I'll think about an  Array solution, too.  I'll get a lot of indizes.



What about an object oriented solution ?
#5
I am testing and learning all about the  Greenarrays  GA144 chip ,  a multicore processor with 144 very simple 32 bit processors, optimized for FORTH, Chuck Moores design - really minimalistic.  



I first have made a disassembler, about one page of code, which is  quite good : http://www.forthseen.de">//http://www.ForthSeen.de, see the section NewLisp.  ( The experts are usually able to shrink my code another 30%  .. ) .



Now I'm trying to write a Simulator for the GA144. For one processor it works quite good, now I'm thinking how to make  144 of them in parallel, and what might be the best  data structures in newLISP.  



This is the structure of one  processor:
; g8.lsp 19.October.2014 19:00

; test settings
( set 'DS '( 1 2 3 4 5 6 7 8 ))   ; data stack
( set 'RS '( 11 12 13 14 15 16 17 18 )) ; return stack
( set 'S 9 'T 10 'R 19 'P 0 'A 0 'B 0 'ALU 0 'EXT 0 'CY 0  )  ; registers
( set 'RAM ( array 64 '( 0 ) ))  ; RAM 64 words  each 18 bits
( set 'ROM ( array 64 '( 0 ) ))  ; ROM 64 words dto.
( set 'IO  '( (0x15D "io" 0x15555 )  ; IO-section
  (0x141 "data" 0 ) (0x145 "---u" 0 ) (0x175 "--l-" 0 ) (0x165 "--lu" 0 )
  (0x115 "-d--" 0 ) (0x105 "-d-u" 0 ) (0x135 "-dl-" 0 ) (0x125 "-dlu" 0 )
  (0x1D5 "r---" 0 ) (0x1C5 "r--u" 0 ) (0x1F5 "r-l-" 0 ) (0x1E5 "r-lu" 0 )
  (0x195 "rd--" 0 ) (0x185 "rd-u" 0 ) (0x1B5 "rdl-" 0 ) (0x1A5 "rdlu" 0 ) ))

The GA144  and FORTH are  working mainly on a data-stack, a lot of pushing and poping which is easy in newLISP. But what about 144 such parts

 - different context's ?

 - a big Array ?

 - big lists of list ..
#6
newLISP in the real world / Re: Searching in lists
January 23, 2013, 10:13:19 PM
Thanks Ricky !



It seems that in  Wordpress 3.xx it is correct and the problem is only with the  older versions 2.9x



Currently I'm struggeling with some regex functions to replace the image and video-links.  More after solving that ..
#7
newLISP in the real world / Re: Searching in lists
January 12, 2013, 03:38:48 AM
With  Wordpress 3.x everything works fine.   With 2.x  I had to delete all "youtube videos" , because the output of xml-parse  was "nil" due to "not well formed XML", to analyze it I opened the xml-file with my firefox-browser, there you get detailed informations about the errors ,  I had to throw out links like this:
<wp:postmeta>
<wp:meta_key>_oembed_f109b1315b82821c5f7d1d98a3530231</wp:meta_key>
<wp:meta_value><iframe width="500" height="375" src="http://www.youtube.com/embed/kKH77hfWYPU?fs=1&feature=oembed" frameborder="0" allowfullscreen></iframe></wp:meta_value>
</wp:postmeta>


btw:  newLISPs is great ,  Ricky's few lines transformed my 600kb big xml-file, in no-time into a post-list of 359kB !
#8
newLISP in the real world / Re: Searching in lists
January 10, 2013, 10:10:27 PM
Thanks Ricky !! I like the "Lego" style .

Thats exactly what I wanted,  in the end all wordpress-posts  should be in Cormullions  nldb.lsp database.

So that I can translate a wordpress-blog in the static blog with ZZBlogX .



Many thanks to all.  Hope I can show you the final result soon.
#9
newLISP in the real world / Re: Searching in lists
January 10, 2013, 10:52:35 AM
Ricky's code works fine.  I've got all titles out of a  600kb textfile in a blink.



Now I want  to get the  post-content  marked as  <content:encoded> ,  I changed "title" to "content:encoded" and tested evey kind and combination of "*"  nothing worked. Maybe I couldn't find out the right pattern or it doesn't work .  Here one sample-post in xml :


<item>
<title>TEST</title>
<link>http://www.obeabe.de/?p=1090</link>
<pubDate>Thu, 10 Jan 2013 18:38:16 +0000</pubDate>
<dc:creator><![CDATA[Didi]]></dc:creator>

<category><![CDATA[Allgemein]]></category>

<category domain="category" nicename="allgemein"><![CDATA[Allgemein]]></category>

<guid isPermaLink="false">http://www.obeabe.de/?p=1090</guid>
<description></description>
<content:encoded><![CDATA[Testpost Testpost]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>1090</wp:post_id>
<wp:post_date>2013-01-10 18:38:16</wp:post_date>
<wp:post_date_gmt>2013-01-10 18:38:16</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name>test</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<wp:postmeta>
<wp:meta_key>_edit_lock</wp:meta_key>
<wp:meta_value>1357843097</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value>1</wp:meta_value>
</wp:postmeta>
</item>


The result should be "Testpost Testpost" .  Maybe someone has an idea.
#10
newLISP in the real world / Re: Searching in lists
January 09, 2013, 10:19:09 PM
Thanks Ricky - that's really awesome -  nearly can't wait till the evening to test it !
#11
newLISP in the real world / Re: Searching in lists
January 09, 2013, 01:19:28 PM
The wikibook shows exactly what I'm looking for.

I try to adapt that for wordpress.  I'll be back after everything works



this works now, too - but not elegant :( do-while (find "title" outlist)
  ( set 'i  ( find "title" outlist ))
  ( set 'outlist ( i outlist))
  ( pop outlist )
  ( push (pop outlist) title-list ))


( outlist is the cleaned and flatned parsed xml  -  title-list it the list of titles I looked for.  )
#12
newLISP in the real world / Searching in lists
January 08, 2013, 10:16:07 PM
I want to import data directly from Wordpress to my ZZBlogX.  I can export data as XML-Files.  I've parsed it with xml-parse and filtered out unnecessary things.  Now I have the problem to seek through the file  for eg.   to  look for "title" and then get the next element which is the title to make a title-list.  


( do-while (find "title" outlist)
  ( set 'i  ( find "title" outlist ))
  ( set 'outlist ( i outlist))
  ( push (pop outlist) title-list )
)


That doesn't work .  Would it be better to work with  slice  eg.  get the index of the element and make an new list with slice ?
#13
Thank you for your Tipps, I made an update:



ZZBlogX New Version

Updated to newLIPS Version 10.4.5

Updated to nldb.lsp from Cormullion @version 2010-01-14 14:57:28



@Cormullion

First it didn't work with the new nldb, I had to change this functions:
( select-rows 'myBlog '(= xdate 'datevalue)'( titel mtext mdate mcat ))))
( select-rows 'myBlog '( find xcat 'mcat)'( datevalue ) 'datevalue '> ))
to
( select-rows 'myBlog '(= xdate datevalue)'( titel mtext mdate mcat ))))
( select-rows 'myBlog '( find xcat mcat)'( datevalue ) 'datevalue '> ))

That means I had to remove one quote '  before datevalue and mcat
#14
Hi Ricky and Cormullion,



thankyou very much for looking at the program on different platforms - and the tipps what to change for that.



Cormullion,  I use nldb since 4 years in my ShortNotizer-program nearly every day and so far it worked without problems, so I am quite confident that there is no problem but  I'll make a new release with the newLISP  10.4.5   and  with the new nldb.lsp from github.



PS:

Blog-X  means Blog-Generator  

ZZ is in german a shortcut for "ziemlich zuegig"  what means  "quite speedy"  :)
#15
I wrote another  newLISP programm -  " ZZBlogX – A Static Blog Generator"



ZZBlogX generates dozens of blog like html-pages in a second. I wrote this program as an easier and more flexible replacement for my Wordpress blogs. In contrast to eg. Wordpress the pages are 'static' that means you do not need a database on your webspace and the pages are loading faster.



The only thing what you have to do, is to store your articles as simple text files. In the next article "Quick Start" you'll find all you need for a first try.



ZZBlogX is an easy to use, very small and fast "textbased static blog generator" , currently only for Windows, written in the funtastic "newLISP" programming language and it's Opensource.



ZZBlogX ...



    reads the "settings.lsp" file

    reads your text files for example "01.txt" "02.txt" and so on.

    takes the first line as headline

    takes the last line as categories separated by commas

    takes the text between first and last line as the article

    takes the file-date as the post date (alternatives possible)

    generates a temporary database

    sorts all articles by time

    generates a main-page "index.html"

    if necessary "index1.html" "index2.html" ..

    generates a side-page for each category with at least 2 articles

    inserts possible links to previous and next pages

    inserts possible links to all category start pages



More about it  here :        http://www.zzblogx.com">//http://www.ZZBlogX.com



PS:  This ZZBlogX-Website is generated by ZZBlogX



PPS:  Happy New Year to all !