World: r3wp
[Core] Discuss core issues
older newer | first last |
Gregg 9-May-2008 [10532] | A long time ago, I remember reading something where the author suggested, as a shared seed, using a substring of PI. |
Gabriele 10-May-2008 [10533x5] | a human picking chars "randomly" will most likely not be random. sadly, i guess we're not going to be able to do a test with a few million people to get a decent sample. |
about 2 ** 32, that's a limitation of *your* algorithm, not RANDOM. indeed, if you don't reset the seed each time, and use random/secure, you probably get all of the possible passwords (and very likely more than humans would pick). besides, it is not proven that random/seed only takes 32 bits of data when seeded with a date!. (C rand() is most likely 32 bit, but random/secure could be using more than that.) | |
if you feed a human a 32 bit int and ask him/her to get you back a password, and it has to give you the same password for the same int, then how many password would the user give you? | |
besides... neurons are know to only be able to fire or not to fire. they are digital, not analog. if the input is above the threashold, the neuron fires. otherwise it does not fire. | |
wave equations have nothing to do with the human brain as far as we know it. if you know more, you should publish an article somewhere, as that would be a breakthrough. | |
btiffin 10-May-2008 [10538] | A psych prof I knew, wrote papers on the quantum clock in our brains. Google "kristofferson professor rate of tone and brain clock" for some references to his research. Sorry for clogging Core. But yeah, his experiments concluded that we definetly think in "waves"; some events go undetected if they occur between 'brain ticks'. He couldn't explain the 'how or why', but he could measure the effect. |
eFishAnt 18-May-2008 [10539x2] | As better at REBOL I am getting, I am trying to find the trick to rename the title of the Console window itself. I am glad I can probe system, but I just haven't probed it in the right orafice... |
Right now it is "REBOL/View" on the console title bar. I know I'm gonna be embarrased when I find out what it is... | |
[unknown: 5] 18-May-2008 [10541] | I do that via winapi calls currently. |
Graham 18-May-2008 [10542] | I asked Carl years ago to allow us to change this within REBOL ... he agreed but has not done this. So, I too use Winapi calls. |
eFishAnt 18-May-2008 [10543] | shucks. |
Graham 18-May-2008 [10544x2] | win-lib: make object! [ user-lib: load/library %user32.dll SetWindowText: make routine! [ handle [integer!] Title [string!] return: [integer!] ] user-lib "SetWindowTextA" set 'WindowTitle func [ Title [string!] ] [ SetWindowText get-modes system/ports/system 'window Title ] ] |
Actually maybe it was Terry that wrote this .. can't recall now. | |
Oldes 19-May-2008 [10546] | Use Resource Hacker http://www.angusj.com/resourcehacker/to change the title and or icons. |
Robert 19-May-2008 [10547x2] | Is there a way to get MAX-INT from Rebol? |
I know it's 2 ** 31 - 1 but any other way? Is there an unsigned version as well? | |
Geomol 19-May-2008 [10549] | >> to integer! #7fffffff == 2147483647 No unsigned version directly. You might be able to make code, that can implement unsigned int. |
sqlab 19-May-2008 [10550] | Looks my solution for changing the name.) |
Graham 20-May-2008 [10551x2] | Google api client libraries ... http://code.google.com/apis/gdata/clientlibs.html |
No REBOL included of course | |
BrianH 20-May-2008 [10553] | Google is really specific about which languages it will support itself - they won't even let their employees use alternate languages for Google products. REBOL's niche is taken up by Python there. Nothing stopping you from cloning one of the official APIs for a third-party API though. |
Robert 24-May-2008 [10554] | Hi, how can I avoid to get back NONE for something like this: a: compose [ (if 0 > 1 ["b"]) ] I just want to get nothing back, like the parens were never there. |
Dockimbel 24-May-2008 [10555] | >> void: [ ] >> a: compose [ (either 0 > 1 ["b"][void]) ] == [ ] |
Robert 24-May-2008 [10556] | Ok... very tricky. ;-) |
Dockimbel 24-May-2008 [10557x2] | if you want to hide the "tricky part" : |
>> if*: func [cond body][either cond body [[ ]]] >> a: compose [ (if* 0 > 1 ["b"]) ] == [ ] | |
Henrik 24-May-2008 [10559] | >> a: compose [(either 0 > 1 ["b"][])] == [] |
[unknown: 5] 24-May-2008 [10560x2] | Does protect work inside an object's context? For example if i have a: context [b: 0] can I then protect 'b from being changed? |
I might be able to figure this out if I take a look at the protect-system. | |
ChristianE 24-May-2008 [10562] | In cases like this, Robert, I usually use somthing like >> pass: func [value] [any [value []]] which makes code somewhat readable >> a: compose [ (pass if 0 > 1 ["b"]) ] |
Dockimbel 24-May-2008 [10563] | Clean and simple solution. |
[unknown: 5] 24-May-2008 [10564] | a: compose [(pick [["b"][]] 0 > 1)] |
Graham 1-Jun-2008 [10565x2] | If I wish to compute a checksum on an image file, I can do this checksum read/binary %image.png but how do I get the same result when I have the image as image data ? eg. i: load %image.png and to compute the checksm on i ? |
guess I can't | |
Henrik 1-Jun-2008 [10567x2] | convert it to binary first |
or if you want to avoid loading the image twice: i: read/binary %image.png checksum i i: load i | |
Graham 1-Jun-2008 [10569] | Since I might be grabbing the image as jpg and then saving it to png, I guess I should save it to memory as binary and do the calculation that way. |
Will 1-Jun-2008 [10570x2] | I use these quite often: ifs: func [c b][either c [do b][""]] ;like if but return empty string ifb: func [c b][either c [do b][[]]] ;like if but return empty block |
my bad, thanks Dock, I can refactor to ifs: func [c b][either c b [""]] ;like if but return empty string ifb: func [c b][either c b [[]]] ;like if but return empty block so ifs is like your if* 8) | |
Josh 12-Jun-2008 [10572x2] | Which version of rebol allows for evaluation in paths? (i.e. block/(1+i): "hello" ) Or am I not remembering this correctly? |
Nevermind, I think I just had a typo in my code. :) | |
[unknown: 5] 14-Jun-2008 [10574x4] | What is the limitation on file size that REBOL 7.6 can handle? |
I'm assuming there must be a iimit that open/direct can't just mount any file size. I'm assuming that the limitation is roughly 2 Gigs. | |
I'm also assuming since a port/size is integer! that the file size can be no greater than 2099999999 bytes. | |
Since integers greater than that number cause errors. | |
[unknown: 5] 16-Jun-2008 [10578] | Ok, I checked for a file size limitation in REBOL but haven't found one. I noticed the documentation for open/direct for example says that /direct can be used for files of any size. I don't see how that can be if it is calculating the size as an integer and integer has a limitations. |
Geomol 16-Jun-2008 [10579] | Largest 32-bit signed int is 2 ** 31 - 1 = 2'147'483'647 If REBOL internally use 32-bit unsigned, it's 2 ** 32 - 1 = 4'294'967'295 If REBOL internally use 64-bit unsigned, it's 2 ** 64 - 1 ca. = 1.845E+19 |
[unknown: 5] 16-Jun-2008 [10580] | I'm actually running an experiment now. I'm going to write a file that will attempt to exceed those sizes. |
Geomol 16-Jun-2008 [10581] | :-) Be sure, you have enough HD space! |
older newer | first last |