Ok, then: Obfuscation anyone? - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QbasicNews.Com (http://qbasicnews.com/newforum/forum-3.html) +--- Forum: Challenges (http://qbasicnews.com/newforum/forum-10.html) +--- Thread: Ok, then: Obfuscation anyone? (/thread-371.html) Pages:
1
2
|
Ok, then: Obfuscation anyone? - Agamemnus - 03-07-2003 Ok, you asked for it: The eight-line iterative quicksort (minus the array creation and printing). Code: 'initialize an array. ph34r mY l33t c0|)iNG 5KiLL5! :rotfl: :rotfl: Same quicksort, slight modification - Agamemnus - 03-07-2003 I thought this might be more useful for anyone actually wanting to use this. (It IS 5 times faster in QB than recursive quicksort..) It preserves the identity of each number. Both the value of each array index and the index itself is swapped. Code: 'initialize an array. Ok, then: Obfuscation anyone? - Agamemnus - 03-15-2003 I killed this Forum, didn't I? :normal: Ok, then: Obfuscation anyone? - toonski84 - 03-15-2003 *shoots agamemnus* fair game! i dont know, maybe this would be more popular if we when the abc routine and made a bunch of challenges with no time limit. then people could work on whatever they liked. i recall neozone's always doing well, and it had a monthly call to programming arms, so that might be a good route too. i like the former method better though. we'll see. i'll play with some obsu-whatever code, but i might just end up turning in one of my real programs whatever. a fun challenge i once say was some guy on the chat room giving out c programs where it took an input and did a simple task, but you had to guess the input that would crash the program. it's easier to do that in c because there arent so many babysitting safeguards like there are in qb but it could be worth a try if anyone can come up with any... Ok, then: Obfuscation anyone? - someone42 - 03-26-2003 How about this for a challenge: Design a program which performs a trivial task, but which people have to guess what it does *without* actually running it. And just to stop cheaters from simply running it, you also have to explain how the program does it and why it's so hard to read. Ok, then: Obfuscation anyone? - BlueKeyboard - 03-26-2003 Hmmm... :???:. Code: A% = 26 * 5 / 10: B% = &H9FFF: SCREEN A%: DEF SEG = B% + 1: DO WHILE NOT C& = ((7999.375) * 8) + 5: D& = (COS(270) * 4) - SIN(180) + SIN(180): POKE C&, D&: C& = C& + (2 - ((2 * 2) - 3)): LOOP Ok, then: Obfuscation anyone? - Joakim - 03-27-2003 A% = 26 * 5 / 10 ' A% = 26 * 1/2 ' A% = 13 B% = &H9FFF SCREEN A% ' SCREEN 13 DEF SEG = B% + 1 ' B% + 1 = &H9FFF + 1 = &HA000, screen 13 segment. DO WHILE NOT C& = ( (7999.375) * 8 ) + 5 ' 7999.375 * 8 = 6395 ' 63995 + 5 = 64000, number of pixels in screen 13, 320x200. D& = (COS(270) * 4) - SIN(180) + SIN(180) ' COS(270) = .98. COS(270) * 4 = 3.94, or 4 as integer. ' SIN(180) + SIN(180) = 0, 3.94 + 0 = 3.94. POKE C&, D& ' C& = offset, D& = 3.94, which is interpreted as 4, red, ' since POKE takes integer arguements. C& = C& + (2 - ((2 * 2) - 3)) ' 2 * 2 = 4 ' 4 - 3 = 1 ' 2 - 1 = 1 ' C& = C& + 1 LOOP So it sets screen 13, points to video memory, loops thru every pixel and plots a red dot, making all the screen red. There you go Ok, then: Obfuscation anyone? - BlueKeyboard - 03-27-2003 Great . Ok, then: Obfuscation anyone? - BlueKeyboard - 03-27-2003 Here's a more difficult one ...:roll:. Code: SCREEN &HF - 2 Ok, then: Obfuscation anyone? - Neo - 03-31-2003 You wanna have an obfuscating one? :-D HAR 13h++ |