LifeScript

From Esolang
Jump to: navigation, search

LifeScript is a kind-of-joke, (of course) unimplemented series of languages wrote by User:mechezz in 2010-2012. Typical LifeScript is basically a text document, looking like source code, which describes the actual activity of the editor.

LifeScripts have strict defined rules, usually borrow some elements from real programming languages, and add new. They're generally full of specific phrases (idioms). There is no manual to them (the documents are self-contained), so the understanding is hard, though mechezz plans to write an official document explaining some rules. There are at the time 10 documents, which also divide for sub-types (SchoolScript, CompScript - the latter for the actual state of computer)

It is possible to write a "compiler" translating these directives to plain English text, though it will require some coding and is now not planned.

Example 1

	{

l8p {for (Line) [active] +=1},

std comp, net, school,

SET VER 2A.0.rev2,
def.dev list=["lisc2"; "skext2"; "lisc4"],

def.comp.* feu=<"netbook"<-"w7starter",>
def.write feu=<"work"<-Mom>,

def.go feu=<"walk"<-fri1[,,4]->,>,
fri1 list=["Botpl"; "Marcin"; "Dawid"; "Nero"],
list subj=['historia'],

acting Mechu, Mom, fri1[,,4],

$when_>_=0/1/h,

#'script1'
%nover
%24510
%653

	SET DIR=\home\stdioPokój,
	LOAD DVC=TV.vxd STATE=TVN,
	LOAD DEC=lamp_s,


	(1o	is(Mechu) == dev(1)\ f_l8p=1 NEXT;
	 2o	->go(,)\GOTO 1o;
	 N
	(3o	-> comp#write(,)(,|school)\ END)

	pause

%748

	LOAD DEC=0,


	(5o	is(Mechu) ->> comp.inst(,|off2007)\;
	 51	[down|@5o]\;
	 52	?(@5o)\;
	 N
	 6o	THEE.|dev(1)\;
 	 7o	no(net.4chan)\LOOK 5o;
	 N
	 71	?comp.haz(,|Silverlight)\ END)

	pause

%847

	DVC=TV.vxd STATE=CSI,
	LOAD DEC=1,

	(9o	is(off2007) | comp.Inst [failed]\;
	1oo	BACK.is(Mechu) -> write#comp(,)(,|off97)\;
	1o1	is(@1oo) [annoying]\ END)

	go kill yourself lol.

}

CALL testbox [
		o1 OF FUT1.school.is(1) TRUE\;
		o2 FUT0.is(Mechu) -> write(homework,,))
             ]

Notes about example 1: l8p command is not a loop, it's actually a type of goto. At the first there are declared some tables - people, devices etc. present in the setting. %24510 is date, %748, %847 is encoded time. Every thought about the moment is written between ( ) after the time declaration. The rest is kind of more clear than in other lifescripts, for example line 71 means "why the f**k my computer has silverlight installed on it? END OF SECTION". FUT0 and FUT1 are future times, while the 0 is first and 1 is some time later.

Example 2

~p 'aw6cq2hpd/.ls'
~v '/v0/.4/-pr/eb/eth1'
~f 'mod_start_keycflcheck+mod_start_replace(mods_r[block;str;repl]))'
!@ 't/od/o/: d/ebug/, m/od writag/e /- d/on/'t t/ouch the structur/e/!' @!
Ą
so;#$Ą
Bload fkey.lsd phor 6;%w
      ¤d¥f.& &8+¥s¥t.& &11+¥do.& ph;%Ą
I4
esc /|/c/A;$w
pre /^/&/¤/¥;$w
bfo 2;$w
2¤u ^;$w
dde /D/E;$w
chkp /P->5;$Ą
stav [/cal]:D2:12/31;$w
^    [d¤t]:+:x2/60/&;$Ą
3¤c  [std:ppl]:-:E4u[[sh/c:dun]:-:^u[[^:/ent:s]:^^]]:*{8};$w
set  [/cal>[1>[22]]] phor P*-;$w
^    [>[¤3] ^4+;$w
^    [d¤t>[23>[¥>[¥6]]]] ^1;$w
     [>*^+([25>[17]])] +;$w
     [>*^+([¤1>[5]])] +;$w
     [[39>[54]]] ;$w
     [*^+([18>[6]])] ;$w
     [ppl:1K€>Ł€[/.'Ł€mhz'.//K¥/e/ch/ezzL€'./]€]v13+67e5o8+2K¤/om'.//KhumanL]+3K¤ar/ci/o'.//>^]v8+4Ksn/owy'.//Kd/ogL]v4+[dun:1Kdr/eamL:psv+2Kw¤it/eLv12+3K¤at/chLv3+4Kli/egL+5KflyL+6Klist/enLv1+7KthinkL+8K¥alkL+[/ent:1Kp/cL+2Kt/elL+3Kt/vL]]];$wĄ
act [P1] {
C€          €:4Ł/Aph/ex Twin'.//K/[/F/ormula/]L] } ;$w
Ć^   [+] {
C:4Ł/B/ogdan Ra/czynski'.//K/L¥wl¥¥dsL];
C31:1%sel[/.'su/ch/eL } ;$Ą
Ć
ĘC:5 {
F€C   €.want>:1;
F!!!
F:2>in(prio)>&-;
F}
Cd:Extsayce;
GC4:1 } ;$Ą
P3:¤u;$w#
+:¤o;#$Ą
mods_r[B;6;4]I
load fdo.lsd(9);%Ą
H    [] {
C:3Ł13th Str/e/et'.//K/CS/IL] } ;$w
HĘ
F:1.Tp;
!@ F:+:A/.'/c/ell'./A<in(ease)<&:A/.'¥/omp'./A; @!
F:+:2<in(ease)<&@-;
F}
C:3^^+(/.'/:NY'./)
G
+:u;$#

Notes about example 2: First few lines after comment define the behavior of the script, such as special characters used for escaping defined characters to simply write them (with ignoring their meaning - similar to escaping in php), characters used for indicating that a letter / a number / phrase has appeared in the line before / two lines before / in corresponding entry back in the same line - thus one can use just the character instead of whole phrase (for example: aaaaa aaaab = aaaaa 4¥b while 4¥ means that first four letters are repeated from earlier in this line). Next are defined some tables containing the entities active in the writer's surroundings. Capital letter in front of whole line, is a sign of abbrevation for this whole line under this letter. One can also make a shortcut between euro signs (C€ € in this program hides some spaces required for indenting under the letter C.) Then just write the capital letter instead of whole portion of code. That's why in the middle part (table [ppl] meaning people, actually humans and animals) you can see a flood of K and L letters, they just are hiding some characters building the table definition. On the very down is a part for thoughts of the writer, also with specific formatting. Also, $w and #w are actually needed for end of line/instruction, "so" is the start command, "su" is the end command. The "load" command is some standard definition part, it's hard to explain in a single wiki page.

More info to be added soon.

Links