The intention was never to document unknown Software. You just want to distract and saw chaos in the discussion.We'll provide an undocumented, nontrivial program, and you can slop out all the documentation you want.
#!/usr/opt/bin/tclsh
proc txl_strf {char str i} {
while {[set j [string first $char $str $i]] >= 0} {
set i [expr $j+1]
if {[string index $str [expr $j-1]] eq "\\"} {continue}
return $j}
return -1}
proc txl_procln {ln} {
set n 0
set i 0
while {[set j [txl_strf % $ln $i]] >= 0} {
puts -nonewline [string range $ln $i [expr $j-1]]
set i [expr $j+1]
set k [txl_strf / $ln $i]
if {$k < 0 || $k==$i} {incr i -1; break}
set c [string range $ln [expr $i+1] [expr $k-1]]
switch [string index $ln $i] {
\$ {incr n; uplevel #0 "puts -nonewline \[set \"$c\"\]"}
\\ {incr n; uplevel #0 $c}
default {incr i -1; break}}
set i [expr $k+1]}
puts [string range $ln $i end]
return $n}
proc txl_proctxt {file} {
global argv
set chan [open $file r]
set cod ""
set mod 0
while {[gets $chan ln] >= 0} {
if {[string range $ln 0 1] eq "%%"} {
set mod 1; append cod [string range $ln 2 end] \n
} else {
if {$mod} {set mod 0; uplevel #0 $cod; set cod ""}
txl_procln $ln}}
close $chan}
set txl_file [lindex $argv 0]
set txl_fileroot [file rootname $txl_file] ;# may be needed for creating files
txl_proctxt $txl_file
set commands. not that hard, and we're not going to put it into the slop machine to check; if it mattered to us, we'd debug it. spent 0 time guessing, took me less than 2 minutes. hth handThat is not true.the quality of that tcl suggests that you also prompted it out of chatgpt
I do not need to demonstrate it to you. I used it also for writing README files of SQL schemata and other tcl scripts, and it is a nice tool when one does not want to invest much time on such things. I can later improve the documentation manually.but instead of demonstrating that your system is able to produce good documentation for something nontrivial
Does it do something I can't use sed to change text? Not sure what it does, but I can readNow I challenge you. Read the script and tell me what it does and how much time you spend guessing.
puts -nonewline the point of the thread, your entire thesis, is that it's good at writing documentation. yet you won't demonstrate this? wild.I do not need to demonstrate it to you. I used it also for writing README files of SQL schemata and other tcl scripts, and it is a nice tool when one does not want to invest much time on such things. I can later improve the documentation manually.
the point of the thread, your entire thesis, is that it's good at writing documentation. yet you won't demonstrate this? wild.
Put it in an AI engine, it will get immediately what it does, perhaps with some imperfection, but it gets it.Does it do something I can't use sed to change text? Not sure what it does, but I can readputs -nonewline![]()
who are you again?Now that I am awake, would you care to compete against my ai in writing a doc system for c++? Because you won't win, in fact I am fairly confident its going to embarrass you.
I've never done anything with Tcl, but even I can tell your analysis of the provided code is dead wrong.not that hard
who are you again?
i wanted to learn whether or not this thing can, as claimed, be good at documentation.
Just try it with the script above. With grok, with google, with claude or any other AI engine. Try it as I wrote above before discussing, try it with your own programs. Try it! It is not difficult, only copy and paste, ask for a man page or a README.i wanted to learn whether or not this thing can, as claimed, be good at documentation.
we posted a clear and actionable challenge above, but, as mentioned, the response appears to be flames and insults. adios