Discussion:
wily 4 Haskell...
(too old to reply)
n***@gmail.com
2015-02-05 12:38:36 UTC
Permalink
Being able to read & 'hear' a new-language is much cheaper than
<rearranging the neurons in your brain> to speak & write new-languages.
--
That's why 90% of the population followed Micro$oft:
Once the initial effort investment was done, they couldn't afford
new costs; and a F/B-like wave of unoriginal thinkers was spawned.
--
It seems that Haskell is an astounding computer-language/tool.
But can we afford to rearrange-brain-neurons AGAIN ?!
Computer [and natural] languages' syntax are mostly just ad-hoc,
waste of effort. That's why menu-based utilities are so efficient:
you just 'recognise', instead of needing to *remember* details.
Also syntax-coloring-editors save wasted learning effort.
--
The unix-family provides tools for those who want to be free from
following-the-herd. `wily` was spawned from the original designers
of unix, after they progressed from unix to plan9 - which I can't 'afford'.
--
Since my brain-neurons were already rearranged for Oberon [which
influenced plan9], wily is very efficient for me.
--
Yesterday, I built & tested *this* for a minimal-PASCAL [recursive descent
compatible language].
Oberon/wily don't: write & read messsages to the little-man-in-the-box.
You watch the screen and control the system via the 3-button-mouse.
So the sample code below is not typed in: it's just kluxed on the screen.

Imagine 'evolving' a program in the language: HUMAN
you klux: HUMAN
and you see: MODULE name; body ; 4-limbs ; head END name.

You don't need to remember the ad-hoc spelling & punctuation.

then you klux: body
see: MODULE name;
respiritorySystem;
digestiveSystem;
circulatorySystem;
4-limbs ; head END name.

BTW, I'm just making this up, while I write.
But below is the actual code, and results for <PASCAL>.
The trick is that wily `executes the sed-in-place/one-line-script`
which replaces/[expands] eg:
body
by/[into]:
respiritorySystem;
digestiveSystem;
circulatorySystem;
====================
OK, I can't see how to replace live-on-the-screen
"body", with the <4 lines>. Oberon could do that.
But I just need 2 klux, after each <expansion>, to
1. delete-from-screen: the old version;
2. display updated version.
==
Next post gives the 4 [so far] 1-linescripts [which get extra line: cat SIP],
to run in console-mode [no X], where you just paste "body" from your
latest expansion, to execute "./body"....etc.

== Chris Glur.

Computing is not about computers; it's about human cognition.
n***@gmail.com
2015-02-09 18:26:32 UTC
Permalink
Post by n***@gmail.com
Being able to read & 'hear' a new-language is much cheaper than
<rearranging the neurons in your brain> to speak & write new-languages.
-- snip --
=== Here's the system & full description & test log ===
Using wily: [see below HOW2 use a mouse and CLI system]
Start <-- copy START textFile to SIP
REPEAT
wilyLoad SIP
wilyExecute HotLink;
wilyDelete SIP
UNTILdone .
---------------- Start gives me:
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ ProcDcl }
BEGIN StmLst
END Mid.
---------------- ProcDcl gives me:
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ PROC Pid;
DecLst BEGIN StmLst END Pid; }
BEGIN StmLst
END Mid.
---------------- StmLst gives me:
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ PROC Pid;
DecLst BEGIN
Asgn V:=X;
While Bool Do;
IfThenElse END Pid; }
BEGIN
Asgn V:=X;
While Bool Do;
IfThenElse
END Mid.
---------------- DecLst gives me: <- In Proc.
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ PROC Pid;
CONST <CLst>;
VAR <VLst>;
{ ProcDcl } BEGIN
Asgn V:=X;
While Bool Do;
IfThenElse END Pid; }
BEGIN
Asgn V:=X;
While Bool Do;
IfThenElse
END Mid.
--------------- ..etc.
Yes, when there are multiple <identiacally ID-ed hot-links>
they all get expanded. So delete some before [or later] the
expansion/S.

The above was generated by [slhdlhdlhd] 1+3*3=10 mouse-klux;
without looking away from the screen, to the keybrd.

Aviators call it: 'heads up flying '.

So you haven't got wily or plan9:acme or ETHOberon?
Then you can just eg. mouse-copy: StmLst
and paste it to the CLI to get:
./StmLst
which means you can do this without X11, too.
=========================
Here's the full system. So start writing a Haskell version,
unless you can rather write one *IN* Haskell !!

-rwxr-xr-x 1 root root 98 2015-02-09 17:53 DecLst
-rwxr-xr-x 1 root root 67 2015-02-09 17:53 ProcDcl
-rw-r--r-- 1 root root 211 2015-02-09 17:34 SIP
-rw-r--r-- 1 root root 77 2015-02-09 17:07 START
-rwxr-xr-x 1 root root 54 2015-02-09 17:04 Start
-rwxr-xr-x 1 root root 115 2015-02-09 17:53 StmLst

--- DecLst
sed -i 's/DecLst/CONST <CLst>;\n VAR <VLst>;\n { ProcDcl }/' SIP

# ; <- belongs to Lower-blok
--- ProcDcl
sed -i 's/ProcDcl/PROC Pid;\n DecLst BEGIN StmLst END Pid;/' SIP
--- START
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ ProcDcl }
BEGIN StmLst
END Mid.
--- Start
cp START SIP

# Initialise File: SIP from File: START
--- StmLst
sed -i 's/StmLst/\n Asgn V:=X;\n While Bool Do;\n IfThenElse/' SIP

# StmLstS in MAIN & all PROCs will be updated!
---

Next post will be my attempt to evolve a similar Haskell-helper/menu,
and I'll EXPECT some assistance.

== TIA

Loading...