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

Pages: 1-

The Neko Programming Language

Name: Anonymous 2007-09-21 13:08 ID:g/XidkHY

http://nekovm.org/specs

Opinions, prog?

Name: Anonymous 2007-09-21 13:09 ID:Heaven

Crappy page design.

Name: Anonymous 2007-09-21 13:10 ID:Heaven

FUKKEN' SAGE'D :::::DDDDD

Name: Anonymous !uED3bNekO. 2007-09-21 13:13 ID:W5JXFx2D

nekovm doesn't have a C interface, it's good otherwise

Name: Anonymous 2007-09-21 13:18 ID:+pHu6x7i

HAI
BTW This is a BrainFuck interpreter written in LOLCode
BTW It accepts as input a BF program, followed by a "!", followed  by any input to the BF program.
BTW Since BrainFuck is turing-complete, this proves that LOLCode is too

I HAS A INSTRUCTIONS    BTW Array for BF instructions
I HAS A IPTR            BTW Pointer to first empty element in INSTRUCTIONS
LOL IPTR R 0
I HAS A LOOPZ            BTW Array of loop start/end addresses
I HAS A LOOPSTACKZ        BTW Loop stack for building the above two
I HAS A LSPTR            BTW Pointer to first empty element of LOOPSTACKZ
LOL LSPTR R 0

BTW Read in BF instructions, terminated with "!"
IM IN YR CODE
  GIMMEH LETTAR IPTR IN MAH INSTRUCTIONS
 
  IZ IPTR IN MAH INSTRUCTIONS LIEK "["?
    LOL LSPTR IN MAH LOOPSTACKZ R IPTR
    UPZ LSPTR!!
  KTHX
 
  IZ IPTR IN MAH INSTRUCTIONS LIEK "]"?
    I HAS A STARTPTR
    NERFZ LSPTR!!
    LOL STARTPTR R LSPTR IN MAH LOOPSTACKZ
    LOL STARTPTR IN MAH LOOPZ R IPTR
    LOL IPTR IN MAH LOOPZ R STARTPTR
  KTHX

  IZ IPTR IN MAH INSTRUCTIONS LIEK "!"?
    GTFO
  NOWAI
    UPZ IPTR!!
  KTHX   
KTHX

BTW Variables for BF's tape
I HAS A LTAPE
I HAS A RTAPE
I HAS A LPTR
LOL LPTR R 0
I HAS A RPTR
LOL RPTR R 0
I HAS A CELL
LOL CELL R 0

BTW Reset instruction pointer to start
LOL IPTR R 0

BTW Start interpreting
IM IN YR LOOP
  I HAS A THING
  LOL THING R IPTR IN MAH INSTRUCTIONS
 
  BTW Move tape head right
  IZ THING LIEK ">"?
    LOL LPTR IN MAH LTAPE R CELL
    UPZ LPTR!!
    IZ RPTR LIEK 0?
      LOL CELL R 0
    NOWAI
      NERFZ RPTR!!
      LOL CELL R RPTR IN MAH RTAPE
    KTHX
  KTHX
 
  BTW Move tape head left
  IZ THING LIEK "<"?
    LOL RPTR IN MAH RTAPE R CELL
    UPZ RPTR!!
    IZ LPTR LIEK 0?
      LOL CELL R 0
    NOWAI
      NERFZ LPTR!!
      LOL CELL R LPTR IN MAH LTAPE
    KTHX
  KTHX
 
  BTW Increment
  IZ THING LIEK "+"?
    UPZ CELL!!
  KTHX
 
  BTW Decrement
  IZ THING LIEK "-"?
    NERFZ CELL!!
  KTHX
 
  BTW Output produces numbers instead of ASCII characters
  IZ THING LIEK "."?
    VISIBLE CELL!
    VISIBLE " "!
  KTHX
 
  BTW Input doesn't work because we can't convert characters to integers
  BTW Oh well, it doesn't stop it being turing complete
 
  BTW Start of loop
  IZ THING LIEK "[" AND CELL LIEK 0?
    LOL IPTR R IPTR IN MAH LOOPZ
  KTHX
 
  BTW End of loop
  IZ THING LIEK "]" AND CELL NOT LIEK 0?
    LOL IPTR R IPTR IN MAH LOOPZ
  KTHX
 
  BTW End of program!
  IZ THING LIEK "!"?
    GTFO
  KTHX
 
  UPZ IPTR!!
KTHX
KTHXBYE

Name: Anonymous 2007-09-21 13:19 ID:Heaven

>>5
get the fuck out of /prog/

Name: !PHP/IwxiIg 2007-09-21 13:31 ID:Heaven

Since BrainFuck is turing-complete, this proves that LOLCode is too

Name: Anonymous 2007-09-21 13:34 ID:+pHu6x7i

>>6
^_^

Name: Die !j3F7LAm6DA 2007-09-21 13:37 ID:W5JXFx2D

>>8
weeaboo faggot

Name: I LAMBDA !ILaMBDaLpQ 2007-09-21 13:41 ID:W5JXFx2D

I LAMBDA

Name: Anonymous 2007-09-21 13:42 ID:+pHu6x7i

>>9
XD

Name: Anonymous 2007-09-21 13:44 ID:fJ6g/CY4

Let's judge it:

>> Every statement is also an expression
Win
>> Objects are some kind of optimized hashtables.
Win
>> a function is also a value
Win
>> strings are sequences of 8-bit bytes
FAIL FAIL FAIL FAIL FAIL :C
Stupid Americans
>> The length of a string is determined by the number of bytes in it, and not by the number of characters before the first \0.
This would be win, but after the previous failure, it's worthless
>> function ( parameters-names ) expr
Win
>> When a variable is not found in the local scope or in the local function environment, it is a global variable.
FAIL
Where's my lexical scoping?
Operation add ( + ) ... int and string: concat
FAIL FAIL FAIL FAIL FAIL :C
Stupid web designers

Evaluation interrupted: this language already exhausted its failpoints. It fails.

Failpoint count:
Faggot 8 bit strings: +40
Faggot lack of lexical scoping: +50
Faggot automatic string to int conversion: +20
Exceeding 100 failpoint points, language fails.


>>2
I like it.

Name: Anonymous 2007-09-21 13:46 ID:+pHu6x7i

>>12
that's cause you're a grand master faggot

Name: Anonymous 2007-09-21 14:07 ID:7U0J2QzI

Man, what a lame name. Yes, a language made by an obvious weeaboo faggot really makes me pay attention.

Also, as >>12 points out, what the hell is with the strings and scoping?

ANSWER: weeaboo faggot is a wimp. He doesn't want to deal with Unicode, and he's fucking terrified of having to implement closures (lexical scoping + first-class functions = closure).

I regret to inform that if you're not prepared to do a little hard work (and closures aren't hard work, haha), don't make a language meant for public consumption.

That is all.

Name: Anonymous 2007-09-21 14:24 ID:7U0J2QzI

I like the front page:

If you need to add a scripting language to your application, Neko provides one of the best tradeoffs available between simplicity, extensibility and speed.

No, dude. Lua does. It's simpler, faster and smaller than Neko. It's also more portable than Neko (using spare bits as opposed to tagging on values == a lot less portable, yo). Unlike Neko it has lexical scoping and the associated closures, plus it has coroutines, which are awesome.

The big problem with Lua is it takes being small and portable so seriously that it doesn't have any support for Unicode either. Ghey.

Name: Anonymous 2007-09-21 15:06 ID:Heaven

>>15
I agree with pretty much everything here.

It still annoys me that Lua has no socket functions in the standard lib.

Name: Anonymous 2007-09-21 23:13 ID:e4Z7ZqKW

LUA FUKKEN ROCKS
And the C API is really fine. None of that Py_DECREF faggotry. Just forgetting to pop values off the stack :).

Name: Anonymous 2007-09-21 23:48 ID:uB8bKkDQ

>>Faggot 8 bit strings: +40
What? Got UTF-8?

Name: Anonymous 2007-09-22 0:01 ID:RZv1kSj/

WE MUST HAVE ZE BINARY COMPATIBLE 128BIT STRINGERS

Name: Anonymous 2007-09-22 1:01 ID:SBMxZKPc

gay and slow version of pascal

Name: Anonymous 2007-09-22 1:12 ID:Tf2gUDy3

metalua.luaforge.net

Name: Anonymous 2007-09-22 5:45 ID:Heaven

The $s functions are shit.

Name: ​​​​​​​​​​ 2010-09-07 17:55

Name: Anonymous 2010-11-15 3:48

Name: Anonymous 2010-12-21 17:50

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