Search found 104 matches

by Magialisk
16 Apr 2014 00:18
Forum: DOS Batch Forum
Topic: problem with set and multi-line comment in macros
Replies: 7
Views: 7081

Re: problem with set and nul

Ed I don't understand the problem you're trying to solve. When it sees the data as a stream you have to escape it: set var=set /a ?=^1<nul set var Of course you knew this, which is why I'm not sure where the question is You said you don't want to include any text other than intended in the set, so t...
by Magialisk
13 Apr 2014 23:11
Forum: DOS Batch Forum
Topic: Random number diff from cmd line vs double click
Replies: 17
Views: 16189

Re: Random number diff from cmd line vs double click

Back in my cryptography threads I wrote my own random number generator because the trouble with %random% is that it cannot be directly seeded. Sure, people like Dave have gone to great lengths to explain how %random% derives it's seed based on the system clock, etc. but if you can't force it to use ...
by Magialisk
02 Dec 2013 20:49
Forum: DOS Batch Forum
Topic: text msg encrypter
Replies: 5
Views: 5176

Re: text msg encrypter

I can't believe I forgot about dbenham's adventure game! When I first saw the way he self-encrypted his code and did on-the-fly decryption at run-time I thought it was no kidding one of the most clever batch ideas I'd seen. Just for fun I thought I'd poke at it and see if I could decipher it, and un...
by Magialisk
02 Dec 2013 17:27
Forum: DOS Batch Forum
Topic: text msg encrypter
Replies: 5
Views: 5176

Re: text msg encrypter

There's an existing (incomplete) thread on encoding strings here: http://www.dostips.com/forum/viewtopic.php?f=3&t=4579. The first several posts on that thread are essentially the same technique as penpen suggested. Obviously that technique is not secure (not sure if you care?) as anyone can rig...
by Magialisk
28 Nov 2013 22:50
Forum: DOS Batch Forum
Topic: Help with this code to run on multiprocesses
Replies: 27
Views: 21614

Re: Help with this code to run on multiprocesses

Just to confirm your findings, 5-6 fps @ 25% usage on my quad core at home. Well done!

I'm guessing the second fan is helping keep the processor cooler so it can run faster :D
by Magialisk
27 Nov 2013 23:26
Forum: DOS Batch Forum
Topic: Setting a variable from an entire txt file
Replies: 15
Views: 12275

Re: Setting a variable from an entire txt file

I've been writing bat scripts for myself and my job. It took awhile, but I'm finally getting the hang of it, and now I've really got a nerdy passion for it. When I create them for my job however, I really try to dumb it down. I have found out from past experience that dumbing it down normally makes...
by Magialisk
27 Nov 2013 18:50
Forum: DOS Batch Forum
Topic: Setting a variable from an entire txt file
Replies: 15
Views: 12275

Re: Setting a variable from an entire txt file

Antonio beat me to it. I've used an array technique to hold lines of a file in "one" variable before and it worked well enough for me. Easy to iterate over or later extract "line 7" for example, but its not explicitly what you asked for. Like penpen and foxidrive mentioned, if yo...
by Magialisk
27 Nov 2013 18:45
Forum: DOS Batch Forum
Topic: Help with this code to run on multiprocesses
Replies: 27
Views: 21614

Re: Help with this code to run on multiprocesses

That version is the fastest yet Aacini, over 2 fps and only 6-7% CPU usage on the work machine. Not bad at all, especially for a single process. PS - Is "... if it would take less, then it would show..." correctly written? Made perfect sense to me. I also think your change to two degrees p...
by Magialisk
27 Nov 2013 11:02
Forum: DOS Batch Forum
Topic: Multi-process Advanced Encryption Standard (AES)
Replies: 51
Views: 50962

Re: Multi-process Advanced Encryption Standard (AES)

At 500 ms the usage of cpu is very low (measured on my machine 3.2%). at 1000ms use 1.7% ( this value is measured) at 2000ms use 1.0% about (this value is measured) This is exactly the type of data I needed, thank you very much for providing it. Because CPU usage is so low even at 500ms delay, ther...
by Magialisk
26 Nov 2013 17:00
Forum: DOS Batch Forum
Topic: Multi-process Advanced Encryption Standard (AES)
Replies: 51
Views: 50962

Re: Multi-process Advanced Encryption Standard (AES)

einstein thanks for the clarification. I'm still trying to digest your changes since the logical flow of the loops is different I need to make sure I understand the new flow. It took me a while to redesign my algorithms to combine the Sub and Shift, and combine Mix and XOR. Now I have to understand ...
by Magialisk
26 Nov 2013 13:40
Forum: DOS Batch Forum
Topic: Help with this code to run on multiprocesses
Replies: 27
Views: 21614

Re: Help with this code to run on multiprocesses

einstein, I tested with the ping delay in the above code and unfortunately results are the same as AES - in other words no improvement, in general slight to negligible decrease in performance. The problem is that you personally are testing on only a single processor, so if that processor is "bu...
by Magialisk
26 Nov 2013 13:25
Forum: DOS Batch Forum
Topic: Multi-process Advanced Encryption Standard (AES)
Replies: 51
Views: 50962

Re: Multi-process Advanced Encryption Standard (AES)

I probably should have put some more explanation here when I uploaded the new code. The ping delay you added to the "wait" function is exactly why that subroutine exists at all, instead of just being inline code in the main function. In my experiments, on my two machines, adding a ping del...
by Magialisk
26 Nov 2013 10:23
Forum: DOS Batch Forum
Topic: Help with this code to run on multiprocesses
Replies: 27
Views: 21614

Re: Help with this code to run on multiprocesses

Nice update Aacini, unfortunately it runs less spectacularly on the 12-thread CPU than I'd expect In fact, from what I can see this operation doesn't scale very well to multiprocessing. At least not using the approach/algorithm in your code, and I can't imagine any better approach/algorithm to handl...
by Magialisk
26 Nov 2013 10:12
Forum: DOS Batch Forum
Topic: Multi-process Advanced Encryption Standard (AES)
Replies: 51
Views: 50962

Re: Multi-process Advanced Encryption Standard (AES)

I was all ready to post a reply contradicting your finding, because I tested it myself in single-thread operation, but then I realized what you were actually saying. If you're running on a PC that only *has* a single CPU core, numCPU will in fact get set to zero by the machine's own count, not the u...
by Magialisk
25 Nov 2013 23:52
Forum: DOS Batch Forum
Topic: Help with this code to run on multiprocesses
Replies: 27
Views: 21614

Re: Help with this code to run on multiprocesses

Antonio, maybe it's just personal preference but I much prefer your second version that does the "framebuffer" display technique instead of the original line by line output version. Granted the line by line version runs faster overall, but the image it produces is not as appealing (to me)....