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

oct challenge !

Name: Anonymous 2013-02-17 5:33

implement a -flexible- interpreter ? ( being able to modify 'target' code while running? (lispy =) )

Name: Anonymous 2013-02-17 5:45

*begins Project Livewire*

Name: Anonymous 2013-02-17 8:11

...So, what does lisp excel at? What could be better? [besides the ((+ 1 2)) syntax.. // it's gone ;]
Also, just any comments / suggestions ? Bad idea to implement a scripted interpreter on top of an interpreted language? (probably why lisp dies..?)

Name: Anonymous 2013-02-17 8:29

ITT: A thread where a guy just waffles with no idea what he's on about.

Name: Anonymous 2013-02-17 8:44

er, loading scripts is going to be a pain... but once loaded up not so bad / only mod-able ones need to be loaded.. static scripts being (probably heaps) faster
the heart needs to be an eval call + soft-code stack.. dynamic loops (changing inner loop code inside/executing that loop) probably not impossible, maybe even necessary at times..? (cringe)

Name: Anonymous 2013-02-17 8:57

could use a fast loader... but the code ends up bulky like this


# Created by Octave 3.2.4, Sun Feb 17 xx:xx:xx 2013 xxx Standard Time <unknown@unknown>
# name: a
# type: cell
# rows: 1
# columns: 2
# name: <cell-element>
# type: string
# elements: 1
# length: 6
i = 0;

# name: <cell-element>
# type: string
# elements: 1
# length: 4
i++;

Name: Anonymous 2013-02-17 22:10

come on lispers... there must be a good way to do dynamic loops..
static ones are as simple as appending a string, eg. eval('for(iter=1:10); fprintf("aa\n"); endfor;');

Name: Anonymous 2013-02-17 22:25

you are fucking retarded.

Name: Anonymous 2013-02-17 23:39

Name: Anonymous 2013-02-17 23:46

>>1
"modifying running code" is just a matter of calling eval.

>>7
Sorry. I dont know what are "dynamic loops" and I'm messing with Symta. So here is how new Symta:

point X Y = <x = X
            ;y = Y
            ;metric = X^2+Y^2 sqrt
            ;`+` P = point P.x+X P.y+Y
            >


compares to C/C++:

class point {
private:
  int X;
  int Y;
public:
  point (int XX, int YY) { X=XX; Y=YY; }
  int x () { return X; }
  int y () { return Y; }
  metric () { return sqrt(X^2+Y^2); }
  point operator + (P) { return pow(P.x(),2)+pow(P.y(),2); }
};


and these lowercase letters would be now just syms, so <X.odd=say X is odd; X.even=say X is even> would work

Name: Anonymous 2013-02-17 23:47

I fucking hate this poster. He makes every thread he posts in terrible.

Name: Anonymous 2013-02-17 23:51

>>11
You're just jealous that you didn't make Symta. Nice Dubs!

Name: Anonymous 2013-02-17 23:51

So, say i'm on the first iter of a loop, should the current iter be mod-able? or only the next? What if i want to mod the third iter from the first? Store on the first, and modify on the second?

Name: Anonymous 2013-02-17 23:57

Name: Anonymous 2013-02-18 0:00

>>14
I <3 Symta

Name: Anonymous 2013-02-18 0:02

>>10 looks interesting.. your using < and > like { and } ?, with semicolon still breaking up lines of code..?

A dynamic loop might start off being

for(iter = 1:10)
i++;
endfor;

for one (the first) iter, but then with the right inner loop code, may change into something else entirely... or that's the basic idea anyway

Name: Anonymous 2013-02-18 0:06

>>16
How is a dynamic loop different from using a mutable closure as the predicate?

Name: Anonymous 2013-02-18 0:07

>>16
semicolon still breaking up lines of code..?
No. They separate method declarations.

>>16
may change into something else entirely... or that's the basic idea anyway
I dont get it. Just use continuations or something, if you want to change loop.

Name: Anonymous 2013-02-18 0:12

hey symta guy, how's mom doing? how's dad doing?

Name: Anonymous 2013-02-18 0:31

eh, i dunno mutable closures / continuations...

say you have a lisp program, made of four lines

wwww
xxx
yyy
zzzz

it can insert a new line jjjj between xxx and yyy, but how does it do this (codewise)?

Name: Anonymous 2013-02-18 0:34

>>20
Something with delimited continuations?

Name: Anonymous 2013-02-18 0:54

>>21 yeh i'm not sure.. lisp programs are supposed to be lists themselves, so inserting an instruction like that should be more or less trivial (in lisp).. I think i'll just have to think some more =)

Name: Anonymous 2013-02-18 0:59

>>19
Dunno. They're busy.

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