[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - need help understanding letex

need help understanding letex

Q&A's, tips, howto's

need help understanding letex

Postby ghyll » Sun Dec 21, 2014 7:14 am

Last edited by ghyll on Sun Dec 21, 2014 10:49 pm, edited 1 time in total.
ghyll
 
Posts: 14
Joined: Mon Jul 14, 2014 1:15 am

Re: need help understanding letex

Postby ghyll » Sun Dec 21, 2014 7:35 am

Last edited by ghyll on Sun Dec 21, 2014 10:50 pm, edited 2 times in total.
ghyll
 
Posts: 14
Joined: Mon Jul 14, 2014 1:15 am

Re: need help understanding letex

Postby Lutz » Sun Dec 21, 2014 5:50 pm

Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: need help understanding letex

Postby ghyll » Mon Dec 22, 2014 1:27 am

I’m new to programming, so I don’t know how one programs in Scheme or other traditional LISP implementations.

Thanks for the help with streams! Using contexts with push/pop seems like a much easier way to manage the streams than trying to manipulate letex and expand for each function.

I’d still like to understand and master letex. I was told the error message is because I’m using letex incorrectly in my `product-stream-Reuler` function (included in my original question). It seems (from the error message) that still I don’t quite understand it. I’ve read the manual and the wikibooks, and spent time playing around with the code, and no lightbulbs are going off. Am I using the wrong syntax? Am I using the correct syntax incorrectly? Or is that specific error message due to a problem somewhere else in my code?
ghyll
 
Posts: 14
Joined: Mon Jul 14, 2014 1:15 am

Re: need help understanding letex

Postby ralph.ronnquist » Mon Dec 22, 2014 2:28 am

Or maybe you're using too many single-quotes in that function?
ralph.ronnquist
 
Posts: 216
Joined: Mon Jun 02, 2014 1:40 am
Location: Melbourne, Australia

Re: need help understanding letex

Postby ghyll » Mon Dec 22, 2014 7:28 pm

Were you referring to a specific part?

Without the single quotes, the newLISP interpreter tries to evaluate the streams using implicit indexing. This doesn't work, because (for example) there is no 998th list item in `(998 (lambda () (enum-interval-descending (- 998 1) 100)))`

http://www.newlisp.org/downloads/newlis ... rest_slice

I''ll run through the code again to make sure all of the quotes are necessary. Thanks for the suggestion.
ghyll
 
Posts: 14
Joined: Mon Jul 14, 2014 1:15 am

Re: need help understanding letex

Postby ralph.ronnquist » Tue Dec 23, 2014 12:42 am

I can't say I've gone too deep into the code, and generally as always, it's better to follow Lutz' advice. It just looked to me like there where all too many single quotes in the function; e.g. the sub expression (product-stream (num-stream 'a1) 's2) will eventually invoke the product-stream function with the second argument being the symbol s2, which then, in that function, is assigned to be the value of s2. This (unless the first argument is an empty stream) results in empty-stream? being called with a symbol whose value is a symbol (namely s2) as argument, and thus, the primitive empty? is called with that symbol as argument. Which was the basis for my rather off-handed remark.
ralph.ronnquist
 
Posts: 216
Joined: Mon Jun 02, 2014 1:40 am
Location: Melbourne, Australia

Re: need help understanding letex

Postby itistoday » Wed Dec 24, 2014 2:29 am

Get your groove on.
itistoday
 
Posts: 413
Joined: Sun Dec 02, 2007 5:10 pm
Location: I'm sitting right next to you. :)


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests