Activity for slander

  • slander slander modified a comment on discussion Help

    Thanks Gary! I did not mean to make your life more difficult. fact-slot-value looks definitely nice-enough to me. A thought. Might you (ab)use the template notation a bit in deffunctions, perhaps like this? (deffunction Ttot ((?a T)) ... ) ugh, no that's a lot of parens. Oh well, THANKS!

  • slander slander posted a comment on discussion Help

    Thanks Gary! I did not mean to make your life more difficult. fact-slot-value looks definitely nice-enough to me. A thought. Might you (ab)use the template notation a bit in deffunctions, perhaps like this? (deffunction Ttot ((?a T)) ) ugh, no that's a lot of parens. Oh well, THANKS!

  • slander slander posted a comment on discussion Help

    I can see from the CLIPS parser and manual that this does not work because T is not a <regular-parameter> nor a <wildcard-parameter>. CLIPS> ( deftemplate T (slot x) (slot y) ) CLIPS> ( deffunction Ttot (?a) (return (+ ?a:x ?a:y)) ) [PRCCODE3] Undefined variable ?a:x referenced in deffunction. My question is: I have a template, and I want to define a function that is something-like a method (?) for it. How should I express this idea in the most CLIPS-native way? for now, I am doing something like...

  • slander slander posted a comment on discussion Help

    Oh ick. You are Gary Riley, whose goblin-laden book is perched to the left of my keyboard as I struggle with my middle-aged brain and CLIPS, and now I feel like a complete idiot. THANKS FOR THE BOOK, Gary, IT IS TERRIFIC https://www.kobo.com/au/en/ebook/adventures-in-rule-based-programming

  • slander slander modified a comment on discussion Help

    Thinking, I could/should compile such a thing, but it is not where I wanteed to go today. Instead, and noting that the system command writes a file, that I then read, I thought: Why not use a pipe through awk to reformat the TSV to rules? We are out in unix land after all. This horrorshow ensued: # TSVtoRules.awk # convert a (ms-sql sourced) TSV into CLIPS rules BEGIN { cf = "" FS="\t" OFS=") (" # paren space paren } (NR==1) { deftemplateFile = "deftemplate-" factName factsFile = "facts-" factName...

  • slander slander modified a comment on discussion Help

    Thinking, I could/shoul compile such a thing, but it is not where I wanteed to go today. Instead, and noting that the system command writes a file, that I then read, I thought: Why not use a pipe through awk to reformat the TSV to rules? We are out in unix land afterall. # TSVtoRules.awk # convert a (ms-sql sourced) TSV into CLIPS rules BEGIN { cf = "" FS="\t" OFS=") (" # paren space paren } (NR==1) { for(i=1; i < NF; i++) fieldName[i] = $i } (NR!=1) { #strip out quotes, paired quotes and other things...

  • slander slander posted a comment on discussion Help

    Thinking, I could/shoul compile such a thing, but it is not where I wanteed to go today. Instead, and noting that the system command writes a file, that I then read, I thought: Why not use a pipe through awk to reformat the TSV to rules? We are out in unix land afterall. # TSVtoRules.awk # convert a (ms-sql sourced) TSV into CLIPS rules BEGIN { cf = "" FS="\t" OFS=") (" # paren space paren } (NR==1) { for(i=1; i < NF; i++) fieldName[i] = $i } (NR!=1) { #strip out quotes, paired quotes and other things...

  • slander slander modified a comment on discussion Help

    I am trying to reason about data that come from a SQL database. The code to get the facts begins a little like this: (deffunction getData () (system "isql ADB -x0x09 -b -c -n username password < getSlots.sql > slots.tsv") (open "slots.tsv" slots "r") (bind ?L (readline slots)) (while (neq ?L EOF) (bind ?L (readline slots)) (printout t ?L crlf) ) (close slots) ) (I am aiming to explode$ rather than printout in there, and I'm not sure how to explode using tab characters - but I am having fun working...

  • slander slander modified a comment on discussion Help

    I am trying to reason about data that come from a SQL database. The code to get the facts begins a little like this: (deffunction getData () (system "isql ADB -x0x09 -b -c -n username password < getSlots.sql > slots.tsv") (open "slots.tsv" slots "r") (bind ?L (readline slots)) (while (neq ?L EOF) (bind ?L (readline slots)) (printout t ?L crlf) ) (close slots) ) (I am aiming to explode$ rather than printout in there, but I am not sure how to explode using tab characters - but I am having fun working...

  • slander slander posted a comment on discussion Help

    I am trying to reason about data that come from a SQL database. The code to get the facts begins a little like this: (deffunction getData () (system "isql ADB -x0x09 -b -c -n <sername password < getSlots.sql > slots.tsv") (open "slots.tsv" slots "r") (bind ?L (readline slots)) (while (neq ?L EOF) (bind ?L (readline slots)) (printout t ?L crlf) ) (close slots) ) (I am aiming to explode$ rather than printout in there, but I am not sure how to explode using tab characters - but I am having fun working...

  • slander slander posted a comment on discussion Help

    In case anyone else get here. The place where the intermediate file is written is the/a problem. Options or the config file allow it to be either in "Sam as database's" or "Other". Check if that location has moved, changed, or has different permissions than it used to have. Small request: Perhaps instead of the error saying "Unable ... intermediate ... file." it could say "Unable ... intermediate ... file. (path/fname)".

  • slander slander posted a comment on ticket #454

    Thanks Rony Yes. I will build it. There is a 'things are broken' warning on the outside...

  • slander slander created ticket #454

    Sid dependency thing

1