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

Symta v0.2

Name: Anonymous 2012-12-08 11:36

Ok. I put out the second release of Symta: http://sym.at.ua/load

Also the SymCraft/LispCraft sources are under 1100 lines (http://sym.at.ua/photo), including UI and a simple AI.

Name: Anonymous 2012-12-13 13:54

And how is symta better than the alternatives?

Name: Anonymous 2012-12-13 13:55

This site is dedicated to Symta - new Lisp-like language with succinct syntax.
succinct syntax

I don't think you know what succinct means, Symta guy.

Name: Anonymous 2012-12-13 13:55

>>121
It's cuter.

Name: Anonymous 2012-12-13 14:00

>>120
Ah yes, I forgot about that. I personally like to use uppercase letters for variables I'm going to iterate over. Like X for a list and x for elements in the list.

Name: Anonymous 2012-12-13 14:22

your modified tutorial is pretty incomprehensible. i don't know much lisp though.

Name: Anonymous 2012-12-13 14:30

>>121
There are alternatives for Symta?

Name: Anonymous 2012-12-13 15:29

>>125
Sorry, I'm terrible at writing anything or communicating any information to others. That is why I'm still unemployed at my 30 years.

>>122>>121
Symta:

<[X@Xs]=[@Xs,r X]>


C/C++:

char * reverse(const char * in, char * out, size_t out_len){
    out[out_len - 1] = 0;
    int i = 0;
    while(!(out[out_len - 1 - i] = in_str[i]))
        ++i;
    return &(out[out_len - 1 - i]);
}


Symta:

get FileName |c:[T:@4.utf8 L:@4.ul D:@L.y @Xs] [[T D] @Xs,r]


C/C++:

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

typedef struct chunk {
  uint8_t Tag[5];
  uint32_t Len;
  uint8_t *Data;
  struct chunk *Next;
} chunk;

chunk *loadChunks(char *FileName) {
  int I, L;
  uint8_t *D, *P, *E;
  chunk *C=0, *T, *N;
  FILE *F = fopen(FileName, "r");
  fseek(F, 0, SEEK_END);
  L = ftell(F);
  D = P = (uint8_t *)malloc(L);
  E = P+L;
  fseek(F, 0, SEEK_SET);
  fread(D, 1, L, F);
  fclose(F);

  while (P < E) {
    T = (chunk *)malloc(sizeof(chunk));
    memcpy(T->Tag, P, 4);
    T->Tag[4] = 0;
    P += 4;
    T->Len = *(uint32_t *)P;
    P += 4;
    T->Data = (uint8_t *)malloc(T->Len);
    memcpy(T->Data, P, T->Len);
    P += T->Len;
    T->Next = C;
    C = T;
  }

  for (T = 0; C; C = N) {
    N = C->Next;
    C->Next = T;
    T = C;
  }

  free(D);
  return T;
}

Name: Anonymous 2012-12-13 15:57

I can't get symta to compile easily and I'm too lazy to go check what the issue is.

Name: Anonymous 2012-12-13 16:18

>>128
Yeah. It's hard to compile any Lisp code.

Name: Anonymous 2012-12-13 17:05

>>127
you said you were 27.

Name: Anonymous 2012-12-13 17:13

>>130
Anyway, I'm older than you, boy.

Name: Anonymous 2012-12-13 17:28

>>131
im a girl :~) you silly goy~~

Name: Anonymous 2012-12-13 17:28

>>132
* guy

Name: Anonymous 2012-12-13 17:30

>>132
transgender girl is still a boy.

Name: Anonymous 2012-12-13 17:30

>>133

**girl

Name: Anonymous 2012-12-13 17:30

>>134
born girl is still a girl.

Name: Anonymous 2012-12-13 17:31

the mythical female-programmer

Name: Anonymous 2012-12-13 17:34

btw im a girl

Name: Anonymous 2012-12-13 17:34

>>137
Erika exists, and I have the PROOF.

Name: Anonymous 2012-12-13 17:35

>>139
prove it.

Name: Anonymous 2012-12-13 17:51

Erika exists, you may know her under the pseudonym of ``Leah''.

Name: Anonymous 2012-12-13 17:55

>>141
prove it.

Name: Anonymous 2012-12-13 17:56

>>139
Of course He exists.

Name: Anonymous 2012-12-13 17:57

I'm doing a new random map generator, so I rewrote simplex noise function from JS...

Symta:

noise X Y Z
= dot:<G X Y Z = G,0*X + G,1*Y + G,2*Z>
= mix:<A B T = (1.0-T)*A + T*B>
= fade:<T = T*T*T*(T*(T*6.0-15.0)+10.0)>
= FX:X,floor = FY:Y,floor = FZ:Z,floor // Find unit grid cell containing point
= !X-FX = !Y-FY = !Z-FZ // Get relative xyz coordinates of point within that cell
// Wrap the integer cells at 255 (smaller integer period can be introduced here)
= and !FX 255 = and !FY 255 = and !FZ 255
// Calculate a set of eight hashed gradient indices
= GI000: mod Perm,(FX+Perm,(FY+Perm,(FZ))) 12
= GI001: mod Perm,(FX+Perm,(FY+Perm,(FZ+1))) 12
= GI010: mod Perm,(FX+Perm,(FY+1+Perm,(FZ))) 12
= GI011: mod Perm,(FX+Perm,(FY+1+Perm,(FZ+1))) 12
= GI100: mod Perm,(FX+1+Perm,(FY+Perm,(FZ))) 12
= GI101: mod Perm,(FX+1+Perm,(FY+Perm,(FZ+1))) 12
= GI110: mod Perm,(FX+1+Perm,(FY+1+Perm,(FZ))) 12
= GI111: mod Perm,(FX+1+Perm,(FY+1+Perm,(FZ+1))) 12
// Calculate noise contributions from each of the eight corners
= N000: dot Grad3,GI000 X   Y   Z
= N100: dot Grad3,GI100 X-1 Y   Z
= N010: dot Grad3,GI010 X   Y-1 Z
= N110: dot Grad3,GI110 X-1 Y-1 Z
= N001: dot Grad3,GI001 X   Y   Z-1
= N101: dot Grad3,GI101 X-1 Y   Z-1
= N011: dot Grad3,GI011 X   Y-1 Z-1
= N111: dot Grad3,GI111 X-1 Y-1 Z-1
// Compute the fade curve value for each of x, y, z
= U:X,fade = V:Y,fade = W:Z,fade
// Interpolate along x the contributions from each of the corners
= NX00: mix N000 N100 U
= NX01: mix N001 N101 U
= NX10: mix N010 N110 U
= NX11: mix N011 N111 U
// Interpolate the four results along y
= NXY0: mix NX00 NX10 V
= NXY1: mix NX01 NX11 V
// Interpolate the two last results along z
= NXYZ: mix NXY0 NXY1 W
= NXYZ+0.5


JavaScript:

ClassicalNoise.prototype.dot = function(g, x, y, z) {
    return g[0]*x + g[1]*y + g[2]*z;
};

ClassicalNoise.prototype.mix = function(a, b, t) {
    return (1.0-t)*a + t*b;
};

ClassicalNoise.prototype.fade = function(t) {
    return t*t*t*(t*(t*6.0-15.0)+10.0);
};

  // Classic Perlin noise, 3D version
ClassicalNoise.prototype.noise = function(x, y, z) {
  // Find unit grid cell containing point
  var X = Math.floor(x);
  var Y = Math.floor(y);
  var Z = Math.floor(z);

  // Get relative xyz coordinates of point within that cell
  x = x - X;
  y = y - Y;
  z = z - Z;

  // Wrap the integer cells at 255 (smaller integer period can be introduced here)
  X = X & 255;
  Y = Y & 255;
  Z = Z & 255;

  // Calculate a set of eight hashed gradient indices
  var gi000 = this.perm[X+this.perm[Y+this.perm[Z]]] % 12;
  var gi001 = this.perm[X+this.perm[Y+this.perm[Z+1]]] % 12;
  var gi010 = this.perm[X+this.perm[Y+1+this.perm[Z]]] % 12;
  var gi011 = this.perm[X+this.perm[Y+1+this.perm[Z+1]]] % 12;
  var gi100 = this.perm[X+1+this.perm[Y+this.perm[Z]]] % 12;
  var gi101 = this.perm[X+1+this.perm[Y+this.perm[Z+1]]] % 12;
  var gi110 = this.perm[X+1+this.perm[Y+1+this.perm[Z]]] % 12;
  var gi111 = this.perm[X+1+this.perm[Y+1+this.perm[Z+1]]] % 12;

  // The gradients of each corner are now:
  // g000 = grad3[gi000];
  // g001 = grad3[gi001];
  // g010 = grad3[gi010];
  // g011 = grad3[gi011];
  // g100 = grad3[gi100];
  // g101 = grad3[gi101];
  // g110 = grad3[gi110];
  // g111 = grad3[gi111];
  // Calculate noise contributions from each of the eight corners
  var n000= this.dot(this.grad3[gi000], x, y, z);
  var n100= this.dot(this.grad3[gi100], x-1, y, z);
  var n010= this.dot(this.grad3[gi010], x, y-1, z);
  var n110= this.dot(this.grad3[gi110], x-1, y-1, z);
  var n001= this.dot(this.grad3[gi001], x, y, z-1);
  var n101= this.dot(this.grad3[gi101], x-1, y, z-1);
  var n011= this.dot(this.grad3[gi011], x, y-1, z-1);
  var n111= this.dot(this.grad3[gi111], x-1, y-1, z-1);
  // Compute the fade curve value for each of x, y, z
  var u = this.fade(x);
  var v = this.fade(y);
  var w = this.fade(z);
   // Interpolate along x the contributions from each of the corners
  var nx00 = this.mix(n000, n100, u);
  var nx01 = this.mix(n001, n101, u);
  var nx10 = this.mix(n010, n110, u);
  var nx11 = this.mix(n011, n111, u);
  // Interpolate the four results along y
  var nxy0 = this.mix(nx00, nx10, v);
  var nxy1 = this.mix(nx01, nx11, v);
  // Interpolate the two last results along z
  var nxyz = this.mix(nxy0, nxy1, w);

  return nxyz;
};

Name: Anonymous 2012-12-13 17:59

>>142
Erika = ``Leah''[1]

[1] Gerald Jay Sussman. Terrible! Gossips. pp 420. February 2007.

Name: Anonymous 2012-12-13 18:41

>>144
I wish I had your work ethic.

Name: Anonymous 2012-12-13 18:58

>>146
I've no work ethic.

Name: Anonymous 2012-12-13 19:02

>>147
Let's bomb ourselves for good, Ahmed.

Name: Anonymous 2012-12-13 19:44

symta confirmed for imaginary

Name: Anonymous 2012-12-13 19:45

>>149
This is as real as it gets, Shlomo.

Name: Anonymous 2012-12-13 19:46

>>150
symta is fake, its all a lie. the code doesnt compile,.

Name: Anonymous 2012-12-13 19:48

symta confirmed for goyim conspiracy. an attempt to con the gullible.

Name: Anonymous 2012-12-13 19:54

>>151-152
Shalom!

Name: Anonymous 2012-12-13 19:54

>>152
The kike is right, Symta compiler where?

Name: Anonymous 2012-12-13 19:59

czech um

Name: Anonymous 2012-12-13 20:13

>>150,152-155
Go away.

Name: Anonymous 2012-12-13 20:19

>>156
Pprrrrpffffrrppfff!

Name: Anonymous 2012-12-13 20:21

>>157
NO THANK YOU

Name: Anonymous 2012-12-14 2:53

So.
Has someone tried Symta?

Name: Anonymous 2012-12-14 3:59

I heard it only runs on emacs? WTF man? Build a proper interpreter, it's not that hard!

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