[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/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/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 - error
Page 1 of 1

error

PostPosted: Tue Oct 21, 2003 3:50 pm
by eddier

PostPosted: Tue Oct 21, 2003 10:11 pm
by Lutz

PostPosted: Tue Oct 21, 2003 10:40 pm
by Lutz

PostPosted: Tue Oct 21, 2003 11:07 pm
by Lutz

PostPosted: Wed Oct 22, 2003 1:37 pm
by eddier
That must have been it. I played with the code a while and then started from scratch and everything worked fine the second time around.

I usually don't miss parenthesis since emacs highlights them as you type them.

I'm trying to convert some outdated python code to lisp to tally the results of our surveys. New survey changes broke the old code. An interpreter like lisp is ideal for throwing in conditionals to break out data by fields. However, keeping tallies in lists of lists of lists is a bit harder than I thought it would be. This part was easier in python (a[i][j] += 1) vs ??? That's why I'm creating all those variables. Some of them are counts and others are lists of strings (comments). If you know an easier method, I'm game :)

The Vice President has given the go ahead for a cgi program and surveys on the Web next time around. We will have a codes to make sure people have filled out a survey and also not allow them to take a survey twice. The hard part is to convince them the surveys are still anonymous.

Eddie

PostPosted: Wed Oct 22, 2003 2:20 pm
by Lutz
With only a few hundred variables to update you could try association lists and do something like the following:

(set 'lst '((a 1)(b 2)(c 3)))
(replace-assoc 'b lst (list 'b (+ 1 (last $0)))) => ((a 1)(b 3)(c 3))
lst => ((a 1)(b 3)(c 3))

Or work with the plain list of values:

(set 'lst '(1 2 3 4))
(replace-nth 1 lst (+ $0 1)) => '(1 3 3 4)
lst => '(1 3 3 4)

The symbol stuff will probably be faster on bigger arrays, you might encapsulate the symbol-mangling stuff in some functions, like shown in 'array.lsp' in the distribution, but for more dimensions: like

(inc-array MyArray 1 4 2 value) ;; same as: MyArray[1][4][2] += value

Lutz

PostPosted: Wed Oct 22, 2003 2:39 pm
by eddier
Thanks for the ideas

(inc-array MyArray 1 4 2 value) ;; same as: MyArray[1][4][2] += value

I will create a function inc-array as this will clean upthings considerably.

After carefully reviewing the number of surveys I have, the plain list of values may be the best solution. Just read one survey at a time and a have a list for each question in the survey.

My inc-array will then be just
(inc-array q1 pos value)

PostPosted: Wed Oct 22, 2003 2:55 pm
by eddier

PostPosted: Thu Oct 23, 2003 2:16 pm
by Lutz

PostPosted: Thu Oct 23, 2003 4:13 pm
by eddier
How are you going to know if expr is not an index in
(set array myarray 2 4 3 expr)

expr might be an integer.

Taking after
a[i][j] = r
and
r = a[i][j]

Maybe
(set[] myarray Index_ list expr)
(get[] myarray index_list)

or
(array myarray index_list) => gets the value at index list
(array myarray index_list expr) => puts the value at index list

What do you think?

Eddie

PostPosted: Thu Oct 23, 2003 4:28 pm
by eddier
I just realized that you can tell if something is an expression because it is the last argument in the list.

Eddie