![]() |
![]() |
#1 |
May 2003
2×3×72 Posts |
![]()
I'm having a really hard time getting the batch processing to work in yafu. Any suggestions? Already tried the docfile method, but maybe I'm misunderstanding it. Any help would be appreciated.
Thanks Thom |
![]() |
![]() |
![]() |
#2 | |
"Ben"
Feb 2007
22·941 Posts |
![]() Quote:
With these contents in a batchfile called worktodo.bat Code:
factor(rand(60)) siqs(rsa(200)) ecm(rsa(256),100) factor(rand(80)) Code:
yafu-64k-x64.exe -batchfile worktodo.bat -threads 4 -v Code:
10^53+53 10^59+59 10^61+61 Code:
yafu-64k-x64.exe "siqs(@)" -batchfile worktodo.bat Last fiddled with by bsquared on 2011-03-11 at 02:50 Reason: repeated redundant question... |
|
![]() |
![]() |
![]() |
#3 |
May 2003
2·3·72 Posts |
![]()
Thanks bsquared,
I figured it out -- I was trying to run the command from within yafu. Once I ran it outside yafu, things went fine. Batches are now running on two computers. |
![]() |
![]() |
![]() |
#4 |
Romulan Interpreter
"name field"
Jun 2011
Thailand
24×643 Posts |
![]()
hi b2, just discovered yafu few days ago, and I think this is a brilliant toy! Congratulations, and keep up the good work!
My question would be if there are any chances we run some "loops" (repeat, while, do, for) in yafu, or if there is any chance to use an "if". Well, the "if" is not really necessary, as it can be simulated by some calculus (like "b=a*expression1+(1-a)*expression2" where a is a precomputed expression that takes values in (0, 1), or so), but the loops would be a really kick on! For example I would like to give to yafu something to do in 3 lines of input, like: Code:
a=<init_expression> b=<init_counter> while (b!=0) do (a=<complicate_expression>; b=<simple_expression>) Code:
a=<init_expression> b=<init_counter> echo off //or "noecho" while (b!=0) do (a=<complicate_expression>; b=<simple_expression>) echo on //or just echo, print, etc a //this to show the result Anyhow, this is a brilliant program, with or without it. GL there and happy factoring! |
![]() |
![]() |
![]() |
#5 | |
"Ben"
Feb 2007
376410 Posts |
![]() Quote:
I've thought about doing what you're asking for before, but as of now I don't have any plans to work on it. I think it would be a fun challenge, but there are other factorization improvements I'd like to get done first. If I had more time... Thanks for the suggestion, and I'm glad you like the tool! |
|
![]() |
![]() |
![]() |
#6 | |
Mar 2006
Germany
305310 Posts |
![]() Quote:
Code:
@echo off set /a b=10 :begin <do what ever you want> set /a b=%b%-1 if %b% NEQ 0 goto begin |
|
![]() |
![]() |
![]() |
#7 |
Romulan Interpreter
"name field"
Jun 2011
Thailand
24×643 Posts |
![]()
yes, but you can't pass the variables (dos strings are limited, and files are out of discussion, as being bloody slow!)
just imagine you want to find the order of 3 in 2^x-1 (at least 4 decimal digits in x), with the "snail" algorithm like Code:
a=3 b=1 m=2^x-1 //some known x, precalculated, not a variable noecho while a!=1 { a=(3*a)%m b=b+1 } echo b Code:
b=0 t=1 do with noecho { t=t+p while !(t&1) //binary AND, check if t is even { t>>=1 //divide t by 2 b++ } } until t=1 echo b In this cases there is impossible to transfer the parameter "t", or "a" to dos/win and back, you deal with strings of hundreds/thousands characters that can't be stored in environment variables, letting apart the extreme low speed of transferring or printing them at each step. Let's say that the motivation behind this request is the fact that a guy like me could believe he have found some much faster way to do the things above ![]() Last fiddled with by LaurV on 2011-06-12 at 11:55 |
![]() |
![]() |
![]() |
#8 |
Tribal Bullet
Oct 2004
1101111011012 Posts |
![]()
In that case the best approach (though it would be staggering amounts of work) would be to integrate YAFU into a much larger computational package like PARI or Sage. Sage at least is geared to streamline the process of integrating the code of others, plus it has a huge developer community.
|
![]() |
![]() |
![]() |
#9 | |
Dec 2010
Monticello
5·359 Posts |
![]() Quote:
Let's assume you want to run a bunch of cases, and Yafu will do something that takes a few seconds each time it is given a command line. Then the overhead of perl (which is interpreted) and the system call will be quite small compared to the running time of yafu. Perl is a complete programming language, with all the ifs, do's, whiles, and data structures you might want. Perl, for what it is worth, seems to be written to minimize the time spent by the programmer writing the program. All the "natural" (common) datastructures like lists and hashes are built into the language, and variables hold strings that might be interpreted as numbers. Want multiple return values from a function? Just have it return a list of length 2, and write (modulus, exponent) = function(whatever) Good luck, let us know how it goes. |
|
![]() |
![]() |
![]() |
#10 | |
"Ben"
Feb 2007
22·941 Posts |
![]() Quote:
YAFU's arbitrary integer arithmetic isn't anything special anyway. If you wanted to design a loop to factor some custom sequence of integers, then maybe having those constructs within YAFU would be beneficial. But on the other hand, it would be almost as easy to generate a list with some other tool and feed it to YAFU via a batchfile. |
|
![]() |
![]() |
![]() |
#11 | |
Romulan Interpreter
"name field"
Jun 2011
Thailand
24×643 Posts |
![]() Quote:
Anyhow, I still like yafu, with no loops and with its... how did you said? "ordinary math" and "nothing special anyway". It is the bloodiest fastest thing I ever saw of this type for what I need to do (and believe me, I tested it!). Lots of congrats for it! |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running YAFU via Aliqueit doesn't find yafu.ini | EdH | YAFU | 8 | 2018-03-14 17:22 |
Batch jobs using AWS Batch | GP2 | Cloud Computing | 1 | 2016-12-07 11:31 |
14e batch of WU's | pinhodecarlos | NFS@Home | 25 | 2015-07-25 17:50 |
Got first batch of TF to 75 | Chuck | GPU to 72 | 23 | 2015-05-10 20:34 |
Running YAFU | lorgix | YAFU | 9 | 2012-03-28 03:37 |