Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: One-line Quine anyone?

From: g:santilli:tiscalinet:it at: 24-Nov-2002 16:11

Hi SunandaDH, On Sunday, November 24, 2002, 11:23:22 AM, you wrote: Sac> So, combining two recent threads, a one-line quine would be neat, as would a Sac> quine that displays its source in a pop-up window. My attempts have been a Sac> little pathetic -- so I'm not even going to list them. But I know lots of Sac> people on this list can do better. This is not one-line, but takes the suggestion from Volker... You can edit it, update it, and save it... not only the GUI, but the whole script, with the GUI being updated in real time. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: REBOL [ Title: "Evolving Script" Date: 24-Nov-2002/16:07:40+1:00 Name: none Version: 1.6.0 File: %evoscript.r Home: none Author: "Gabriele Santilli" Owner: none Rights: none Needs: [view 1.2.8] Tabs: none Usage: none Purpose: "To make the definitive quine!" Comment: "This can be addictive. You have been warned." History: [not yet implemented] Language: "English" Type: 'Script Content: true Layout: [ Do [trebuchet: [name: "Trebuchet MS" size: 14]] Style Button Btn font trebuchet font-size 16 bold -1x28 Banner center 600 font trebuchet font-size 38 bold yellow "The REBOL evolving script" Text right 600 font trebuchet font-size 16 "by Gabriele Santilli" Pad -10 Text right 600 font trebuchet italic "(original idea by Baron R.K. Von Wolfsheild)" Text 600 font trebuchet {Maybe I'm just crazy, but this is so much fun! It is amazing to see how easy I can be amazed by these short things... I wonder if any other language could do this in so few lines of code, and with this readability...} Across a: Area para [] font trebuchet 583x300 system/script/header/content Pad -8 Scroller 17x300 [ tsize: size-text a a/para/scroll/y: 280 - tsize/y * face/data show a ] Return Button "Update Layout" 255.200.50 [ attempt [ attempt [ set reduce [in system/script 'header 'content] load/header/next a/text system/script/header/date: now system/script/header/version: system/script/header/version + 0.1.0 system/script/header/content: join "REBOL " [ find mold make system/script/header [content: true] "[" content ] ] lay2: system/words/layout system/script/header/layout lay/pane: lay2/pane lay/size: lay2/size show lay lay/text: system/script/header/title lay/changes: 'text show lay ] ] Button "Copy Script" [ write clipboard:// system/script/header/content ] Button "Save Script" 50.240.100 [ write system/script/header/file system/script/header/content ] ] ] system/view/window-feel/detect: func [face event] [ if event/type = 'scroll-line [ a/para/scroll/y: event/offset/y * -15 + a/para/scroll/y show a ] event ] view lay: layout system/script/header/layout