I'm making a new language. I think I have already fixed most of design flaws, but I need to check it first before writing a real interpreter.
Post your code snippets, I will translate them to my lang and we will decide whether they are beautiful enough.
Name:
Anonymous2012-11-30 13:59
Translate this!
gui D = M:[0 0] = C:\point = Exit:ø = FI:<E=ø> = FP:[0 0] = LI:<E=ø> = LCT:0
= Pop:ø = G:gfx 1 1 = R:o
render:<= R:D'render = {F:R.proxy = {G'w≤≥R'w |v G'h≤≥R'h = !G: gfx R'w R'h}
= F 0 0 G = !R:G
;√ = !R:R'copy}
= C,cursor,<C:y = P:M-C'hs = R.blit @P C
= {FG:Pop |a Pop'render = R.blit @(P-[0 FG'h]) FG}
>
= {Exit=ø;R}>
itemAt:<M P W = {F:W.items = F,c | fnd:[R I] inRect R M
| <[[X Y @_] I] = itemAt M-[X Y] P+[X Y] I; _=[P W]>
;√ = [P W]}>
exit:<R=!Exit:[R]>
input:<Es = SGUI:GUI = !GUI:Me = T:time,c,flt = Ts:Timers = !Timers:ø
= !Ts | filter:[I N F] {T≤N=[I N F]; F,c=[I time,c,flt+I F]} = [@Ts @!Timers]
= [NP NW]: itemAt M [0 0] D = NI:{NW.input;<E=ø>} = !Pop:{F:NW.popup=F,c}
= !C: {F:NW.cursor=F,c} |v \point
= Es | e <[N S]
= {N,<\mice_move = !M:S = NI [N S S-NP] = √> |a n (ptrEq LI NI)
//= pp [NW {F:NW.items=F,c}]
= LI [\mice_over ø M] = !LI:NI = LI [\mice_over √ M]
;N,<\mice_left;\mice_right> |a S
= {ptrEq FI NI =
;√ = FI [\focus ø M-FP] = !FI:NI = !FP:NP
= FI [\focus √ M-FP]}
= {T-LCT≤1/4 = FI [“double_$(d 5 N)” √ M-FP]} = !LCT:T}
= FI [N S M-FP]>
= !GUI:SGUI = Me>
= sdl (R.input ? |h render) = Exit,0