1. Re: EUPHORIA Digest - 17 Jun 1998 to 18 Jun 1998 (#1998-32)
- Posted by Andy Kurnia <akur at DELOS.COM> Jun 19, 1998
- 496 views
At 12:00 AM 6/19/98 -0400, Automatic digest processor wrote: >Date: Thu, 18 Jun 1998 09:22:52 -0500 >From: Terry Constant <constant at FLASH.NET> >Subject: Re: EUPHORIA Digest - 16 Jun 1998 to 17 Jun 1998 (#1998-31) > >> Yes, run it under exw. > >I failed to specify that I am running this program in Dos32. If I run it >... >I am assuming from the responses I have gotten that is not a way in >Dos32. I know that Robert has plans to include full long file name >support in Dos32. I hope it is soon. If only you could call win32 dlls from ex.exe... then you can use GetFullPathName. (I think) it's a #71?? function as well. Not sure about the AL though. Another way, of course, is to read the directory structure in low level (you know, allocate, poke, call, free) and obtain the data. Or you can look for dir95 in the archives, but I'm not sure. >Thank for your response. You're welcome. >Date: Thu, 18 Jun 1998 13:36:52 -0400 >From: Robert Craig <rds at EMAIL.MSN.COM> >Subject: Re: EUPHORIA Digest - 16 Jun 1998 to 17 Jun 1998 (#1998-31) > >Can anyone describe to me an application that >requires more than 12 files open at the same time? > >The only one I ever thought of was a merge/sort application Another would be a very complicated process, and you want to debug it, and you want each variable's history (it changes to this, then to that, then to whatever, then ...) be "tee"'d to its own filename, and you have more than 12 variables to log, then you need to have N "w"-open files... Seriously, Rob, I don't like knowing that Euphoria imposes a limit on something that theoritically does not need to be limited (in C you would use FILE *, which costs 4 [8?] bytes each until they really are used, and isn't that so in Watcom? You can also use FILE ** and have the list grow and shrink...). Not that I don't like to be warned, I do, but I wonder why. >Date: Thu, 18 Jun 1998 21:43:05 -0400 >From: "Wallace B. Riley" <wryly at MINDSPRING.COM> >Subject: More bugs > >The Euphoria version has a bug that I know about but haven't tried yet to >eradicate. If the prime factorization of a number has some factors repeated >(e.g. 60 = {2,2,3,5}) this program won't repeat them. This other bug about >no output seems to be more serious. > >If you still want to see the Euphoria version, I'll send it. It has 151 >lines at present, including some extras thrown in to help while debugging, >and some sections that haven't been debugged yet. I would like to see *your* Euphoria version. From my understanding what you need is just: -- untested code function primefactors(integer p) -- assume p >= 2 or it'll bomb sequence t integer i t = {} i = 2 while p > 1 do while remainder(p, i) = 0 do t = t & i p = p / i end while i = i + 1 end while return t end function ? primefactors(60) -- should print {2,2,3,5} >>>It gets and confirms the password >>>It performs calculations on the password (adding the ASCII values up >>>and such and a little bit more) to get a number. >>>Seeds the randomizer to the number (set_rand(number)) >>>Takes each character in the file, and adds a random number between 1 >>>and 255 to it and puts it into the output file. (or subtracts in >>>decryption) > >Date: Thu, 18 Jun 1998 23:16:41 -0400 >From: Alan Tu <ATU5713 at COMPUSERVE.COM> >Subject: Re: Data Encryption > >Is there any way to tell? If you get the same password and perform the same calculation you will get the same seed. With the same seed you will get the same sequence of the random number. In other words, it will no longer be random. The random number generator normally works because of the random seed. Btw the random number is (said above to be) between 1 and 255 so you won't get a 0