Updated 2017-12-12 01:55:51 by sergiol

I am Sérgio Loureiro, the sergiol from tkchat and freenode's tcl channel.

Interests:

  • To add UDP sockets to the core. i am beginning my experimentations for that;
  • To create a windowframe widget for MDI interfaces;
  • To collaborate with danielk1977 for adding javascript to tkhtml control;
  • To make the radiobuttons have a selectbackgroundcolor in optionadd command;
  • Girls :P ... and so many more.

I started the wiki page of slogan for people to give some suggestions.

Page on Ubuntu.

(2016-12-18) Just did the TASTE keyboard code golf on http://codegolf.stackexchange.com/questions/103033/a-keyboard-so-real-you-can-almost-taste-it/103544#103544

Tried to reduce code size having a over the top
lassign

for shortening builtin function calls as one-letters, but code became longer! GRRRR...

I welcome any person to improve it the live collaboration on http://rextester.com/live/TXXTC91739 and tell it on my answer's comments.

<LAM 20-12-2016>

What about this?:
regsub -all {[^\n|]} [set b [string map {|||| |||  $ "BS   " % "TAB  " & "CAPS  " ? "ENTER" * "SHIFT   "} [regsub -all {(\S)} "`1234567890-=$\n%QWERTYUIOP\[\]\\\n&ASDFGHJKL;'?\n*ZXCVBNM,./*" {||\1 ||}]]] _ f
set h [string map {\\ _ / _ | \ } [set g [string map {||_ |/_  _|| _\\|} [string map {||| \\|/} $f]]]]
foreach j {h b f g} { set $j "[split [set $j] \n]" }
foreach  x $h y $b z $f w $g {puts "$x\n$y\n$z\n$w" }

Snippet to print info vars' contents:
lmap c [info vars] {
    if {[array exists $c]} {
        puts \n\n$c
        parray $c
    } else {
        puts $c:\ [set $c]
    }
}

ak - 2017-05-03 17:02:48

For curiosity, why lmap instead of foreach ? Here lmap collects
[llength [info vars]]

empty strings into a list which is then discarded. Because the puts and parray print to stdout, and havbe an empty string as return value. foreach OTOH will collect nothing, saving the bits of memory.

Because I usually do Code-golf using Tcl, where it matters how much I can shrink the source code. lmap has a lesser extent than foreach in the code. You can see my activity on https://codegolf.stackexchange.com/users/29325/sergiol where almost all answers I posted used Tcl.

ak - 2017-05-08 20:17:09

I see, optimization for code-size, whereas I looked for / optimized for performance, in broadest strokes. Valid points each. Thank you.

sergiol - 2017-12-12 01:46

I think I discovered how to fix the problem of -outlinestipple not working for rectangle and ovals when creating them on Windows. The fix was done on version 8.6.7: tkWinDraw.c

As it will be very first contribution on the Tcl/Tk own's source code, I am not so sure and I would like to ask for code review!