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 - Robert Gorenc

#1
Nice!! I like this project! ;-)

I'm sure, it will be very interesting for all beginners like me!
#2
newLISP and the O.S. / Re: Benchmarking newLISP
September 24, 2010, 12:13:08 PM
30.64 on Pentium 90, running DamnSmallLinux (old gran'pa is still running :-) )

and

1.36 Pentium 4, 2Ghz running Ubuntu 9.04
#3
thanx for invitation, i'm planning to come!
#4
thanx,

something similar was my idea, but I need read and write access, so my doubt is open two pipes, one for reading and one for writing, or one with r/w......

something like:

(set 'hin (open "/dev/ttyUSB0" "r"))

    (read hin buff 40)

    (close hin)

and

(set 'hout (open "/dev/ttyUSB0" "w"))

    (write-buffer hin buff )

    (close hout)



or

(set 'hndl (open "/dev/ttyUSB0" "u"))

    (write-buffer hndl buff)

    (read hndl buff 40)

    (close hndl))



I will try what is better working for me.

(exit)
#5
Hi Fritz,

do you have same success in writing to serial port?

I also would like to talk to uC with forth on board via serial port from Linux.

I didn't jet try, maybe this weekend....
#6
so, how did you collect this data, manually or use some nl script?

What is this symbol E if formula y=2E+.... and what is R^2??

It was long ago when I worked with math..... :-)
#7
is it Kazimir's first Forum theorem? :-)
#8
thanks Lutz,

that is what I need!
#9
Well, someone, perhaps Peter, mentioned in older posts, so I wanted to try it because under windows spawn is not working. It can be downloaded from his site.

I don't think that this is not working because of some different behaving function, I can't properly start another newlisp -e via process.....

But biger problem for me is that (process {newlisp -e "(+1 2)"}) is not working, it gives error message mentioned on my previous post.

Simply I tried to use idea from Peter's winfork, to start other newlisp process, copy environment, but is not working this way.

I tried other combination, to start via process newlisp -c waiting on some port, then send source code and execute required function and this works fine, but is not easy to use it like fork or spawn.

I need it because I want to run several things in parallel, to get some http pages from slow data generating web server and i'm stuck on this poor windows xp os...
#10
Hi,

I was searching for forking possibility on windows and found winfork, but it seems that is not working:

the response from newlisp is:

>(winfork '(+ 1 2))

1832

>

ERR: missing parenthesis : "...(silent  



After looking in source and little debuging, also found that simple process invocation

> (process  {newlisp -e "(+ 1 2)"})

1868

>

ERR: string token too long : "(+"



also generate error????

Is this bug or feature? :-) or I'm doing something wrong. I'm using newlisp v.10.1.5 and v.10.1.6 and on both version is same.

So I think there is no problem in winfork....

On Linux everything is working fine, process invocation is working, but there I prefer spawn....



bye,

Robert
#11
newLISP in the real world / Re: post-url question
October 28, 2009, 06:50:18 AM
Thanks Lutz,

Actually, user and psswd encription was not problem. But after Your message, I looked again in my header in post-url and found if remove second pair of rn, than post-url works as expected!!!

the working method is now:

(post-url "http://ip.addr/cli/cgi-bin/exe.pl">http://ip.addr/cli/cgi-bin/exe.pl"

"ne_name=msc1&task_type=TASK&ug_name=rgorenc&NEInputMethod=ViaNEName&Dang_Task=ON&taskname=statssp&method=inside" "" 10000 "Authorization: Basic encripted user-psswdrn" ) !!



thanks again,

Robert
#12
newLISP in the real world / post-url question
October 28, 2009, 02:44:13 AM
dear all,

I'm new to this forum and Lisp also, I would like to send greetings to all!

I have a question about configuring header and parameters send in post-url.



when sending (post-url "http://ip.addr/cli/cgi-bin/exe.pl">http://ip.addr/cli/cgi-bin/exe.pl"

"param1=v1&param2=v2&param3=v3" "text/plain" 5000 "Content-Length: 50rnAuthorization: Basic encripted-user-psswdrnrn" )



in wireshark it looks very strange:

first packet:

POST /cli/cgi-bin/exe.pl HTTP/1.1rn

   Request Method: POST

   Request URI: /cli/cgi-bin/exe.pl

   Request Version: HTTP/1.1

   

second:

Hypertext Transfer Protocol

    Host: 10.243.117.12rn

    Content-Length: 50

    Authorization: Basic encrypted-user-psswdrn

    rn

    Data (50 bytes)



0000  43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 63 6c 6f 73   Connection: clos

0010  65 0d 0a 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a   e..Content-type:

0020  20 0d 0a 43 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74    ..Content-lengt

0030  68 3a                                             h:

        Data: 436F6E6E656374696F6E3A20636C6F73650D0A436F6E7465...

Hypertext Transfer Protocol

    Data (119 bytes)



0000  20 31 31 31 0d 0a 0d 0a 6e 65 5f 6e 61 6d 65 3d    111....ne_name=

0010  6d 73 63 31 26 74 61 73 6b 5f 74 79 70 65 3d 54   msc1&task_type=T

...

0060  65 3d 73 74 61 74 73 73 70 26 6d 65 74 68 6f 64   e=statssp&method

0070  3d 69 6e 73 69 64 65                                         =inside

        Data: 203131310D0A0D0A6E655F6E616D653D6D73633126746173...

       

and there is response from server something like wrong user authorisation or similar...

If I omit in header part Content-Length, then server return error that content length is missing.



I would like to get something like this:

Hypertext Transfer Protocol

    POST http://10.243.117.12/cli/cgi-bin/exe.pl">http://10.243.117.12/cli/cgi-bin/exe.pl HTTP/1.1rn

        Request Method: POST

        Request URI: http://10.243.117.12/cli/cgi-bin/exe.pl">http://10.243.117.12/cli/cgi-bin/exe.pl

        Request Version: HTTP/1.1

    Host: 10.243.117.12rn

    Accept-Encoding: identityrn

    Content-Length: 111

    Authorization: Basic cmdvcmVuYzo3R2VsaXB0ZXI3rn

    rn

folowed with:

Hypertext Transfer Protocol

    Data (111 bytes)



0000  6e 65 5f 6e 61 6d 65 3d 4d 53 43 31 26 74 61 73   ne_name=MSC1&tas

0010  6b 5f 74 79 70 65 3d 54 41 53 4b 26 75 67 5f 6e   k_type=TASK&ug_n

...

0060  70 26 6d 65 74 68 6f 64 3d 69 6e 73 69 64 65      p&method=inside

        Data: 6E655F6E616D653D4D534331267461736B5F747970653D54...

and after that is correct answer from server.



in python this can be done with request("POST", "http://ip.addr/cli/cgi-bin/exe.pl">http://ip.addr/cli/cgi-bin/exe.pl", params, headers)

describing params and headers as necessary.

Is it possible to get something like this with post-url?



Robert