Literature Review with Tinderbox

Thank you very much for your kind words, I hope it will be worth your time!
Arek

No worries and no disrespect to a such a lovely document you’ve so kindly shared with us. The function aspect only occurred to whilst asweriing @TomD 's question. Being new, functions aren’t yet a familiar sight or obvious choice. Certainly, there’s no requirement to use them. :slight_smile:

Thanks again for sharing a really interesting file with the community and for all the descriptive info.

1 Like

Yes, they are pretty new, I haven’t got used to them. But you’re right about the pros of using them, so I updated the file. :wink:
Thanks for the time you spent looking into it!

Hummm… I think there might be a bug in the new code…
Ex: when I link the Claim: antisocial behaviors spread from bad actors to other users via norm-setting ->Informs → Question: Are bans an effective way to mitigate antisocial behavior online forums?

…the badge does not change.

Here is my file:

Discourse_Graph_v.0.2 copy.tbx (6.8 MB)

It could be I am missing something… perhaps I do not fully understand the way it works. This could be.

Tom

Well that was a head scratcher. I went back and forth on the code, but it appears to be an (unintentional!) error in the source doc,

when I paste the code of ‘fClaimEdict’ into BBEdit, the line breaks disappear:

Thanks to BBEdit’s character palette, the odd ‘invisible’ character symbol that look like a pipe (|) is actually Unicode #2028 the ‘line separator’. Clearly this is making Tinderbox hang. If I change these mystery characters to proper line breaks and paste back the code, the Tinderbox works OK.

I guess @ShiJianhui used some external code editor to lay out the code and it uses #2028.

I found few code code errors in checking things in file version #2 that I’ll try and post later when I get a spare moment. I suspect most result in the desired/expected outcome, but only by accident. More later.

Yes, I will have a look at the code again.

That’s truly something I would never guess could happen… The only one external code editor I have been using while writing code for this TBX project was BBedit’s CLM for Tinderbox, and maybe Apple Notes… hard to say because it have taken me some time to code it before posting here.

I would be enormously grateful! I have next to nothing (action) coding experience, so every suggestion is very much appreciated!

1 Like

Another issue I am noting… if you change your Research question in the Display Attribute dropdown for the Synthesis Map, nothing changes. Even if you change tabs, the expectation, I think is that the new question would be visible. My expectation could be wrong…

You might want to test the Synthesis map under a new question.

Tom

I’d agree! I’ve never seen this before. :open_mouth:

FWIW, what made me suspicious of invisible characters was that the comments in your function were the wrong colour, in Tinderbox, but comments I added were grey. Thus the test with BBEdit.

Here is a version of the TBX with strange line breaks fixed. I’ve also supplied alternate version of some edict functions using variables avoiding the needs for $MySetA, etc. The calling edicts use the original function, the alternate is there as an example (these functions use a ‘2’ appended to the name e.g. fClaimEdict2().

I’ve also made functions for the link actions. If you want to use the functions replace the current link action code with a call to the appropriate function. An added benefit of the function is you get syntax checking/colouring unlike in the Link Inspector’s action code box.

For some reason the Library container in you file’s ‘Hints’ wasn’t setting the ‘Action’ prototype for new children so I fixed that action too.

In fClaimEdict, you have this test:

if($ClaimInformsQuestionID!=;){

IOW, this query which doesn’t make sense:

$ClaimInformsQuestionID!=;

Queries don’t use semi-colons, so I assume you are trying to set is the set attribute ClaimInformsQuestionID has any content. You could check either of:

$ClaimInformsQuestionID!="";
// or better
$ClaimInformsQuestionID.count>0;

I’ve used the latter in the uploaded file: Discourse_Graph_v.0.2-ed.tbx (7.0 MB)

Thanks for all your feedback and help with fixing broken code!
I feel a bit embarrassed of not making sure everything works 100 % fine before sharing with the rest of the community, but on the other hand, maybe I could never be sure of that, and so never share anything…never mind, thanks again for help! :wink:

Thanks for the feedback! I will look into it

3 Likes

No sir, never feel embarrassed for trying. This was much better than I could have ever done!

I am proud of you and glad you shared it at this stage. It completely opened my eyes in this new direction. Job well done… Onwards!

Tom

2 Likes

Thanks for your kind words!

It seems to be a bigger issue than I thought. I will have a look at it tomorrow morning :wink:

3 Likes

No need for embarrassment. Your code wasn’t ‘broken’ but rather hit by one of the more obscure line-break glitches I’ve come across and ironically only because you generously picked up on the idea of migrating code into functions. My input was really only some polish for edge cases.

You should take heart from the genuine notes of thanks for the community here. It’s always a joy when someone takes the time to share such a built-out example and to give notes on use. Really nice to see hyperbolic mode being given a role, too.

4 Likes

I will, thank you!

I think I’m onto something, but can’t figure out one thing (that I’m aware of). ‘Synthesis Map’ agent seems to work as intended, with one exception - some notes are somehow resistant to agent’s $OnAdd action, i.e. they don’t get linked as I want them to. In the screenshot below, there are 5 notes in red frames that should, but are not, connected to notes pointed by arrows.


I don’t see what makes them so special. Any help will be very appreciated!
TBX file:
Discourse_Graph_v.0.2.6.tbx (7.0 MB)

$OnAdd action:


  if($ClaimInformsQuestionID){
    $ClaimInformsQuestionID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Informs");
    };
  };
  if($EvidenceOpposesClaimID){
    $EvidenceOpposesClaimID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Opposes");
    };
  };
  if($EvidenceSupportsClaimID){
    $EvidenceSupportsClaimID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Supports");
    };
  };
  if($ClaimOpposesClaimID){
    $ClaimOpposesClaimID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Opposes");
    };
  };
  if($ClaimSupportsClaimID){
    $ClaimSupportsClaimID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Supports");
    };
  };

}; // end function

Thanks!
Arek

One point that is probably not your problem, but might be useful to address at some point.

  1. Rather than testing
$Name(parent)=="Synthesis Map"

consider using inside(/path/to/Synthesis Map). The latter is potentially more efficient, and has some advantages for the semantics of aliases.

Also (from brief scan-not time to test ATM) the Synthesis Map agent is off, so the agent action won’t be firing. If Evidence 6’s ‘Opposes’ link was added after the item was added to the agent map, I don’t think we expect the agent action (IOW, the agent OnAdd equivalent) to fire until the agent is active again.

If you don’t want agent update’s to re-organise the agent map, see Re-arrangeable Agent Maps.

I think you are acting accordingly but I’d note to be aware aliases may have different basic (i.e. note-to-note) links than their original.

Thanks!

This is really helpful and intriguing, Arek. Thank you for sharing your extensive work and process with us.

Marianne

I wonder if a tag or two could help to keep this post from getting lost? I see there’s one for “templates”–maybe also “case study”? (I’m the last person to suggest tags: I have far too many overlapping ones in my own work!)

1 Like

Hey there, couple

BTW, I looked at a few of your functions. I see that you’ve named them an “edict,” “rule,” or “action.”

I fear this might confuse some people. Functions are action codes that can be used as edicts, rules or actions; they need to be specifically named in this way.

Also, you have several note names with the term “linked.” I would expect these actions to perform link operations when in fact, they do not. They are simply provided associates by basing values from one note to another.

1 Like

I added a couple of tags to the thread, but good ideas can get lost in tags just as with anything else.

I strongly suggest for anyone interested in a given post or thread, that the “bookmark” feature in Discourse is excellent.

Click the three dots in the tools at the bottom of a post, and then click the bookmark icon

You’ll have several options -– choose a reminder or choose “none needed” to make a permanent bookmark for yourself.

When you want to find your bookmarked topic, click your person-icon and choose the bookmark icon again.

4 Likes