Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

J-expressions make Javascript the acceptable Lisp

Name: Anonymous 2016-11-25 13:12

The consistent implementation of key enumeration order of objects in Javascript engines allows us to write specifications of composeable computations using generic JSON-serializable notation that we can call “J-expressions”.

{opname: main_parameter,
keyword1: value1,
keyword2: value2,
...}


J-expressions, in combination with functions that implement what the operation named opname is supposed to do, are then a systematic way to approach DSL construction within Javascript. The notation is as expressive as s-expressions.

Name: Anonymous 2016-12-06 8:52

>>33
XML can represent any tree structure so obviously it can represent any Lisp program. this doesn't mean XML makes Java the acceptable Lisp. with some creative thinking, you can also use it to represent programs in other languages:

<preprocessor>
<include>stdio.h</include>
<define name="ANUS">10</define>
</preprocessor>

<function name="enterprise" ret="void">
<declare type="int">i</declare>
<for>
<init>i = 0</init>
<condition>i &lt; ANUS</condition>
<increment>i++</increment>
<loop-body>
<function-call name="printf" arg1="XML makes Java the acceptable C \n" />
</loop-body>
</for>
</function>

<function name="main" ret="int" arg1="argc" arg1-type="int" arg2="argv" arg2-type="char**">
<function-call name="enterprise" />
<return>0</return>
</function>


or maybe this:

<class name="Main">
<public>
<constructor>
<var class = "ConcreteEnterpriseFactory">
<name>x</name>
<assign>new /org/progrider/bbs/ConcreteEnterpriseFactory</assign>
</var>
<call-method>
x/build/haxMyAnus
</call-method>
</constructor>
</public>
</class>

<class name="AbstractEnterpriseFactory">
<public>
<method name="build" ret="EnterpriseInterface">
<return>/org/progrider/bbs/AbstractEnterpriseFactory/build_internal</return>
</method>
</public>
<private>
<method name="build_internal">
<return />
</method>
</private>
</class>

<class name="ConcreteEnterpriseFactory" extends="AsbtractEnterpriseFactory">
<private>
<method name="build_internal" ret="EnterpriseInterface">
<return>
<new>/org/progrider/bbs/EnterpriseClass</new>
</return>
</method>
</private>
</class>

<class name="EnterpriseInterface">
<public>
<static>
<method name="haxMyAnus" ret="void" />
</static>
</public>
</class>

<class name="EnterpriseClass" implements="EnterpriseInterface">
<public>
<constructor>
<assign value="XML makes Java the acceptable Java">enterprise-variable</assign>
</constructor>
<static>
<method name="haxMyAnus" ret="void" />
<call-method arg1=etnerprise-variable>/System/out/println</call-method>
</method>
</static>
</public>
<private>
<slot class="String">
<name>enterprise-variable</name>
</slot>
</private>
</class>


this doesn't make it any less horrible though. just because you can doesn't mean you should

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List