| |
| |
| |
|
Page: 1 2
Comments:
<0> dumdidum <1> th3dge? <2> is there any way to just completely declare a variable global, without adding global bleh to each proc <3> Reference it using :: Like $::bleh <4> its so cold <5> I get this error when trying to import a namespace... <5> Tcl error [::rss-synd::pubFeeds]: can't read "nick": no such variable <5> even though $nick is set in the pubFeeds <5> I have exported the namespace using "namespace export pubFeeds" <5> and imported it using... namespace import [[namespace current]::pubFeeds $nick] <5> is that wrong? <5> oops, missed the "eggtcl chan, I'll paste it there instead... <4> yo <4> I'm trying to create a representing number using a string as input, something like a hash but smaller and using only numbers .. anyone can think of a reliable way, avoid duplicates so to speak <1> say WHAT!? <6> 100101110001
<4> too long <4> lol <4> hest: say I input "boobies are nice" it returns 134 <4> maybe some smart algorythm <6> well, u cant transform 134 into boobies <6> are nice <4> I know <4> it will only represent <7> mmm boobies <4> just one way is fine <4> lol <4> I could do it in a sleasy way <4> crc32 it <4> and grab all numbers from that <4> lol <4> but dont think thats very reliable <6> nop <6> there's 36 different letters and numbers in a crc32 string <6> so u can make it with numbers :) <4> hex value of a crc32 hash has 8 chars <6> you can also use bitmasking <6> its in hex right ? <4> what do you mean <6> cause i was just thinking the whole alphabet <4> bitmasking <6> that might be a lil hard to use tho, since u can do it where u know which letters something contains, but not how many, nor their palce :) <1> well <1> cant you do ascii-values? <4> hmm you just gave me an idea though <6> was thinking something similar heidel <6> hest <1> ya <4> yeah true but first <4> thats not really reliable if you just count em <4> I think <4> second <1> extract ASCII-value of each char, and multiply/add them <4> the number gets too large, when you add em up <1> ok, then add a divisor <4> ya <4> I could do <4> ascii value / (place of char in string * x) <4> this adds a char limit though <4> something in that direction <6> the question is how reliable it is <4> ya true <1> it wouldn't be very reliable ;> <1> what you gonna use it for, faggot? <6> well, using crc and md5 on a file isnt really reliable either :) <4> ya cuz abc will have same value as bca <6> and dont use / <6> that'd cause decimals <4> ya <6> scan ? <8> scan -> http://www.tcl.tk/man/tcl8.4/TclCmd/scan.htm <9> scan -> http://Tcl.Tk/man/tcl8.5/TclCmd/scan.htm <1> format %d "this is a test" <1> ;format %d "this is a test" <9> hest: #1251 (283 clicks) Tcl error: expected integer but got "this is a test" <1> man, i **** with format <1> format ?
<8> format -> http://www.tcl.tk/man/tcl8.4/TclCmd/format.htm <0> uh <9> format -> http://Tcl.Tk/man/tcl8.5/TclCmd/format.htm <9> hest: #1253 (143 clicks) Tcl: ? <6> ;format %i "this is a test" <9> BL4DE: #1255 (307 clicks) Tcl error: expected integer but got "this is a test" <0> (th3dge) ya cuz abc will have same value as bca <- i vote this one for the stupiest comment of the day award <6> ;format %c "t" <9> BL4DE: #1257 (264 clicks) Tcl error: expected integer but got "t" <0> you want scan blade <0> scan ? <8> scan -> http://www.tcl.tk/man/tcl8.4/TclCmd/scan.htm <9> scan -> http://Tcl.Tk/man/tcl8.5/TclCmd/scan.htm <6> ; scan %c t <9> BL4DE: #1260 (147 clicks) Tcl: <6> [20:34:09] <@BL4DE> scan ? <4> it will gotisch <6> i know, just wondered if it worked with format too ;) <4> negro <4> ;p <0> ;md5 <9> __Gotisch: #1266 (295 clicks) Tcl error: wrong # args: should be "md5 string" <6> ; scan %c t test; puts $test <9> BL4DE: #1267 (278 clicks) Tcl error: variable is not ***igned by any conversion specifiers <0> ;if {[md5 abc] != [md5 bca]} { return "right th3dge..." } <9> __Gotisch: #1268 (469 clicks) Tcl: right th3dge... <4> did someone drop md5, no I dont think someone did .. uh oh <0> yes someone did <0> (@BL4DE) well, using crc and md5 on a file isnt really reliable either :) <6> im way ahead of ALL of ya <4> not regarding conversation being active at that very moment <4> we were talking about ascii values of individual characters <4> adding them up <6> so u want to first take crc and then use that to make the value ? :)= <0> ;::crc::crc32 "i doubt the bot has this" <9> __Gotisch: #1277 (2293 clicks) Tcl error: invalid command name "::crc::crc32" <6> cause im pretty sure i said that, just not adding up, but converting them so u can recreate the real crc <4> I lost it too <4> and I'm the one who asked about it <4> can you imagine <1> i never did kow <1> know <4> oh how I wish I was the treasure that you've been looking for <6> so we're helping u with something u dont know what u're gonna use for <10> there are tons on different hashing methods depending on what type of data you have and what you're checking for <4> well what did you mean with the last "helping" statement? <1> ill put it for you simple, th3dge: you're an ungrateful bastard <10> for example checksum algoritms like crc32 are only used to check for unintentional altering since they're so simple to circumvent <4> well Pixelz, say I'm trying to create an unique identification number, using a maximum of around 3 to 4 numbers <4> from a string <10> is your string only numbers? <4> it doesnt have to be <7> how long could the string be? <4> 100% reliable <4> but some reliablity I will take <4> :) <4> around 20 to 30 chars <4> well say around 4 <4> 40 <10> why does the identification number has to be so short? <1> you can do string length <4> its being using in an URL <4> used * <4> hest: not reliable at all <4> lol <1> cuz th3dge doesnt know how to count to more than 999 <10> hmm <4> lol <7> well <10> then why only numbers? <1> cuz he's dyslexic as well <4> thats my first option <4> LOL
Return to
#tcl or Go to some related
logs:
#computers #beginner taking expired tylenol #microsoft midget tossing bachelor party #gentoo #politics hp compaq dx2000 sucks 10053 mirc zion problem #debian
|
|