Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get CPU Temperature Statistics

29 views
Skip to first unread message

Cecil Westerhof

unread,
Dec 20, 2017, 5:14:07 AM12/20/17
to
I posted an article on the wiki:
Get CPU Temperature Statistics
http://wiki.tcl.tk/49319

I am interested what you think about it. And if I should post in a
different way: let me know.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Erik Leunissen

unread,
Dec 20, 2017, 1:52:18 PM12/20/17
to
On 20/12/17 11:09, Cecil Westerhof wrote:
> I posted an article on the wiki:
> Get CPU Temperature Statistics
> http://wiki.tcl.tk/49319
>
> I am interested what you think about it. And if I should post in a
> different way: let me know.
>

I, for one, believe it is a really interesting purpose/application for
the Tcl/Tk language, certainly worth publishing onto the wiki. I at
least, and probably most people to whom you're publishing, would like to
see *the code work*.

Precisely that would be, for the more experienced Tcl/Tk users, the real
gain/advantage/usefulness/profit/... , and the incentive to provide
feedback to you about your code.

(The) one thing blocking this ultimate mutual profit is that your
readers cannot make the code work because they cannot see what's inside
[getDB] (since they do not have access to your file
/usr/local/share/tcltk/utilities.tcl).

Still interested ... ,
Sincerely,
Erik Leunissen
--
elns@ nl | Merge the left part of these two lines into one,
xs4all. | respecting a character's position in a line.

Cecil Westerhof

unread,
Dec 20, 2017, 2:44:06 PM12/20/17
to
Erik Leunissen <lo...@the.footer.invalid> writes:

> On 20/12/17 11:09, Cecil Westerhof wrote:
>> I posted an article on the wiki:
>> Get CPU Temperature Statistics
>> http://wiki.tcl.tk/49319
>>
>> I am interested what you think about it. And if I should post in a
>> different way: let me know.
>>
>
> I, for one, believe it is a really interesting purpose/application for
> the Tcl/Tk language, certainly worth publishing onto the wiki. I at
> least, and probably most people to whom you're publishing, would like to
> see *the code work*.

That is good to hear (or actually read).


> Precisely that would be, for the more experienced Tcl/Tk users, the real
> gain/advantage/usefulness/profit/... , and the incentive to provide
> feedback to you about your code.
>
> (The) one thing blocking this ultimate mutual profit is that your
> readers cannot make the code work because they cannot see what's inside
> [getDB] (since they do not have access to your file
> /usr/local/share/tcltk/utilities.tcl).

It is just opening a database connection and setting the timeout. ;-)

The proc:
proc getDB {} {
if {${::argc} != 1} {
error [format "ERROR: %s DATABASE" [getScriptName]]
}
sqlite db [lindex ${::argv} 0]
db timeout [expr {10 * 1000}]
}

But then you also want getScriptName:
proc getScriptName {} {
file tail ${::argv0}
}


I will publish my utilitys.tcl on GitHub. And I will share the systemd
service and databease.

Rich

unread,
Dec 20, 2017, 3:41:05 PM12/20/17
to
Cecil Westerhof <Ce...@decebal.nl> wrote:
> Erik Leunissen <lo...@the.footer.invalid> writes:
>
>> On 20/12/17 11:09, Cecil Westerhof wrote:
>>> I posted an article on the wiki:
>>> Get CPU Temperature Statistics
>>> http://wiki.tcl.tk/49319
>>>
>>> I am interested what you think about it. And if I should post in a
>>> different way: let me know.
>>
>> I, for one, believe it is a really interesting purpose/application
>> for the Tcl/Tk language, certainly worth publishing onto the wiki.
>> I at least, and probably most people to whom you're publishing,
>> would like to see *the code work*.
>
> That is good to hear (or actually read).
>
>> (The) one thing blocking this ultimate mutual profit is that your
>> readers cannot make the code work because they cannot see what's
>> inside [getDB] (since they do not have access to your file
>> /usr/local/share/tcltk/utilities.tcl).
>
> It is just opening a database connection and setting the timeout. ;-)
>
>
> I will publish my utilitys.tcl on GitHub. And I will share the
> systemd service and databease.

I think Erik's point is that the code block on the wiki would be much
improved if it was self contained, exclusive of standard base modules,
and standard tcllib or tklib modules, or other well known modules (i.e..
sqlite, listbox, etc.).

I.e., try to make the wiki code blocks as close to a copy/paste/run
cycle from the wiki as possible.

For yours, this might mean including a stubbed out getdb proc that
really does nothing, but explains the intended DB format to be used,
and a stubbed out db eval that returns a couple lines of static data to
let the rest work.

That second one is more difficult, so another possibility might be to
take a sql dump of a small db and post it as well, instructing a reader
to use it to init a fake db to use to see the code itself work.

Cecil Westerhof

unread,
Dec 20, 2017, 4:44:06 PM12/20/17
to
I will look into it.
0 new messages