Abridged summary of comp.lang.tcl@googlegroups.com - 37 updates in 9 topics

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Abridged summary of comp.lang.tcl@googlegroups.com - 37 updates in 9 topics

comp.lang.tcl mailing list
Cecil Westerhof <[hidden email]>: May 30 10:15PM +0200

When looking at:
http://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/uuid/uuid.html
 
I read:
::uuid::uuid generate
 
Creates a type 4 uuid by MD5 hashing a number of ...more
Rich <[hidden email]>: May 30 09:00PM


> I see:
> A version 4 UUID is randomly generated.
 
> Is the description wrong, or is the implementation wrong?
 
Well, your url is to the "documentation", so at least the documentation ...more
Brad Lanam <[hidden email]>: May 30 02:26PM -0700

On Wednesday, May 30, 2018 at 2:00:22 PM UTC-7, Rich wrote:
> looking for (or if it thinks it can't find ifconfig) then an error is
> generated. Apparently Slackware's ifconfig outputs something ...more
Cecil Westerhof <[hidden email]>: May 31 05:26AM +0200

>> different than what the Tcllib version was written to expect.
 
> Hmmm....and there's now a Linux system that does not have 'ifconfig', instead
> using /bin/ip. So that will fail on some ...more
Harald Oehlmann <[hidden email]>: May 31 06:47AM +0200

Am 31.05.2018 um 05:26 schrieb Cecil Westerhof:
 
>> Hmmm....and there's now a Linux system that does not have 'ifconfig', instead
>> using /bin/ip. So that will fail on some systems.
...more
joheid <[hidden email]>: May 31 02:12AM -0700

Wouldn't it be better to fix/improve the tcllib-version?
kind regards
joachim
...more
Cecil Westerhof <[hidden email]>: May 31 12:37PM +0200


> Wouldn't it be better to fix/improve the tcllib-version?
> kind regards
 
Probably. But I am not a tcl maintainer, just a newby (at tcl). And I
want it now. ;-) And I already have it.
...more
Cecil Westerhof <[hidden email]>: May 31 05:10PM +0200


>> Hmmm....and there's now a Linux system that does not have 'ifconfig', instead
>> using /bin/ip. So that will fail on some systems.
 
> I think I write my own version for Linux then. ;-)
...more
Rich <[hidden email]>: May 31 03:39PM


>> I think I write my own version for Linux then. ;-)
 
> Here it is:
> http://wiki.tcl.tk/55346
 
That's a lot of overkill when for a type 4 UUID you need to:
 
1) pull 128 bits of data from ...more
Hypnotoad <[hidden email]>: May 31 09:09AM -0700

On Thursday, May 31, 2018 at 11:39:08 AM UTC-4, Rich wrote:
> 3) set the variant bits to whichever variant you want to use
 
> And both of those "sets" can be done by bit masking the byte containing ...more
Hypnotoad <[hidden email]>: May 31 09:22AM -0700

On Thursday, May 31, 2018 at 11:39:08 AM UTC-4, Rich wrote:
> 3) set the variant bits to whichever variant you want to use
 
> And both of those "sets" can be done by bit masking the byte containing ...more
[hidden email]: May 31 12:59PM -0700

On Thursday, May 31, 2018 at 9:09:22 AM UTC-7, Hypnotoad wrote:
 
> Tcllib maintainer for the module here. And I'm the schmuck who thought {exec ifconfig} was portable enough for everyone. ...more
Cecil Westerhof <[hidden email]>: May 31 08:52AM +0200

I am going to write a function to generate an UUID on Linux. For this
I need to generate random integers. At the moment I have the
following:
proc getRandomLnx {{secure False}} { ...more
Cecil Westerhof <[hidden email]>: May 31 11:41AM +0200


> For the moment 32 bits is good enough. But probably a good idea to add
> a parameter that I want a 63 bits version instead of a 32 bits
> version.
 
I made it and 64 bits instead of 63 bits: ...more
Rich <[hidden email]>: May 31 11:30AM

> } else {
> set randFile /dev/urandom
> }
 
This is unnecessary, just use /dev/urandom
(https://www.2uo.de/myths-about-urandom/). The Linux manpage is ...more
Cecil Westerhof <[hidden email]>: May 31 02:25PM +0200

> 'random' will block when its 'estimate' of entropy is too low (and this
> is simply a black magic 'estimate' without much foundation in
> reality).
 
That is why default secure is False. ...more
Cecil Westerhof <[hidden email]>: May 31 02:52PM +0200


> In which case, look at the w or W conversion available from binary
> scan.
 
Where do I information about the different formats? I found the
letters (except w), but did not find a description ...more
Cecil Westerhof <[hidden email]>: May 31 03:00PM +0200

>> version instead of a 32 bits version.
 
> In which case, look at the w or W conversion available from binary
> scan.
 
I changed it to:
proc getRandomIntLnx {{secure False} {longVersion ...more
Cecil Westerhof <[hidden email]>: May 31 04:31PM +0200


> For the moment 32 bits is good enough. But probably a good idea to add
> a parameter that I want a 63 bits version instead of a 32 bits
> version.
 
I created a page about this: ...more
Rich <[hidden email]>: May 31 02:59PM


> That is why default secure is False. I do not want to block, but when
> the randomness is really important (encryption, passwords, ?) I go
> for random with secure is True.
 
...more
Rich <[hidden email]>: May 31 03:00PM


> binary scan ${random} Wu randomI; puts $randomI -> 17771342103208076902
 
> 17771342103208076902 - -675401970501474714 = 18446744073709551616 = 2 ^ 64
> So the unsigned bit works correct.
...more
Rich <[hidden email]>: May 31 03:06PM

> http://wiki.tcl.tk/55342
 
> I renamed the proc to getRandomIntNix and there is also a proc called
> getRandomIntInRangeNix.
 
Here:
 
expr {${random} % ${modulo} + ${min}}
...more
Cecil Westerhof <[hidden email]>: May 31 08:07PM +0200

> occurrence than the rest. Therefore, a biased output.
 
> Note that this may not matter for your uses, but for some situations it
> can matter significantly (crypto being one of those areas).
...more
Cecil Westerhof <[hidden email]>: May 31 05:09PM +0200

Because the UUID on a *NIX system is not really random and some other
problems, I created a proc to get an UUID (type4) on a *NIX system:
http://wiki.tcl.tk/55346
 
--
Cecil Westerhof ...more
Cecil Westerhof <[hidden email]>: May 31 04:29PM +0200

I created a page about random integers on *NIX systems:
http://wiki.tcl.tk/55342
 
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
...more
[hidden email]: May 31 06:18AM -0700

girls dating near me
 
...more
[hidden email]: May 31 06:13AM -0700

girls dating near me
 
...more
Aldo Buratti <[hidden email]>: May 30 01:33PM -0700

# It doesn't work!
set a "one two"
set b "three four"
lassign "$a $b" b a
puts $a ;# -> one
puts $b ;# -> two
 
# The correct way is:
set a "one two"
set b "three four" ...more
Rich <[hidden email]>: May 30 08:45PM

> thinking about using:
> lassign "$a $b" b a
 
> Is that the correct way, or is there a better way?
 
No, that will fail in various weird and sundry ways the moment either
of a or b contain ...more
Cecil Westerhof <[hidden email]>: May 30 09:39PM +0200

At a certain point I have to switch the values of two variables. I was
thinking about using:
lassign "$a $b" b a
 
Is that the correct way, or is there a better way?
 
--
Cecil Westerhof ...more
Cecil Westerhof <[hidden email]>: May 31 06:00AM +0200

> lassign [list $a $b] b a
> # but I think that a simple swap with a temporary var be far more efficient
> set _tmp $a ; set a $b ; set b $_tmp ; unset _tmp
 
In my case both contain an ...more
Gerald Lester <[hidden email]>: May 30 11:56PM -0500

On 05/30/2018 11:00 PM, Cecil Westerhof wrote:
> 0.6074245 microseconds per iteration, while the swap version takes
> 0.7931169 microseconds per iteration. So I go for the correct lassign ...more
"Donal K. Fellows" <[hidden email]>: May 31 06:38AM +0100

On 31/05/2018 05:56, Gerald Lester wrote:
>   1) Wrap each of them in a procedure
>   2) Call each of the procedures once
>   3) Do the time on a call to the procedure
 
I'd expect the ...more
Cecil Westerhof <[hidden email]>: May 31 08:45AM +0200

> 1) Wrap each of them in a procedure
> 2) Call each of the procedures once
> 3) Do the time on a call to the procedure
 
I will do that.
 
 
> This will force the code to be byte compiled ...more
[hidden email]: May 30 09:15PM -0700

Looking married women
...more
[hidden email]: May 30 10:11PM -0700

> I want married men
 
hello there
...more
[hidden email]: May 30 09:15PM -0700

Find girls online
...more
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].