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

FUCKING PROGRAMMING LANGUAGES

Name: Anonymous 2008-10-15 17:14

Now, I'm taking a programming languages, and as a project we're going to make our own programming language - and in a complete strike of unimaginativeness, everyone is writing out shitty c and java clones - even though it needs to be a very simple pet language capable of doing only the very fundamental. I've been planning on going basic style with fancy functional additions, but that sounded retarded when I verbalized it, so I'm reduced to begging /prog/ for advice.

Name: Anonymous 2008-10-15 17:24

C with Monads.

Name: Anonymous 2008-10-15 17:29

Just make another Lisp dialect with some half-baked feature to set it apart. You can even write it in Lisp.

Name: Anonymous 2008-10-15 17:34

make sure it doesn't have FORCED INDENTATION OF THE CODE

a very common beginner's mistake...

Name: Anonymous 2008-10-15 18:12

make sure it has FORCED INDENTATION OF THE CODE

a very common beginner's wish..

Name: Anonymous 2008-10-15 19:07

common beginner's wish

wait! you mean people actually want FIOC???

wtf is the world coming to?

Name: Anonymous 2008-10-15 19:27

>>6
People say that FIOC sucks, but given the choice in HASKELL, they still use it. It's all about having an alternative.

Name: Anonymous 2008-10-15 19:46

>>7
Python has an alternative too.

Name: Anonymous 2008-10-15 19:50

>>8
Does he?

Name: Anonymous 2008-10-15 19:57

>>9
def penis():
    hurr();\
 durr();\
   hurf();\
  durf()


Alternatively, from __future__ import braces.

Name: Anonymous 2008-10-15 20:24

Do python sans FIOC.

Name: Anonymous 2008-10-15 21:29

Do a stack language, they're dead easy.

Name: Anonymous 2008-10-15 22:21

>>2
Also, lazily evaluated C

Name: Anonymous 2008-10-16 1:36


func (f"")(String $s) {
    return File::open($s);
}
{lambda} = \ $a { puts $a; }
foreach f"/etc/passwd" \ $i, $line {
    lambda $line->explode(':')[1] if $i % 2 == 0;
}

Name: Anonymous 2008-10-16 4:30

http://www.thinkartlab.com/pkl/media/SUSHIS_LOGICS.pdf

even though it needs to be a very simple pet language capable of doing only the very fundamental

Write a minimal Turing-complete language.

Name: Anonymous 2008-10-16 4:41

Write a minimal Turing-complete language.
something like this?
http://barker.linguistics.fas.nyu.edu/Stuff/Iota/

Name: Anonymous 2008-10-16 7:50

Take some cues from The Ultimate Language hq9+:

http://www.cliff.biffle.org/esoterica/hq9plus.html

Name: Anonymous 2008-10-16 7:58

>>17
I'm not convinced that HQ9+ is Touring complete.

Name: Anonymous 2008-10-16 10:10

Hmm apparently it only needs to be capable of propositional calculus, input-output, loops etc.

So I'll just go for a shittier BASIC - only with lambdas.

Name: Anonymous 2008-10-16 10:59

Write a Ruby clone that isn't damn useless.

Name: Anonymous 2008-10-16 14:25

use warnings;use strict;$/=$b;@_=map" bottle$_ of beer",s=>'';map/h/i?print
"Hello, World!\n":/../?bless[]:/9/?map{$a=$_[$_<2],print"$_$a on the wall,
$_$a,\ntake one down and pass it around,\n",$_-1,"$_[$_==2] on the wall.\n
"}reverse$...99:/q/i?print$b:/\+/?$^A++:2,($b=<>)=~/\+\+|./g# HQ9++ in Perl

Name: Anonymous 2008-10-16 14:38

>>20
>Ruby clone
>not damn useless
DOES NOT COMPUTE

Name: Anonymous 2008-10-16 17:19

PRORGAMMING BLAMGBLUGAGESSSSS LAMBDA

Name: Anonymous 2008-10-17 1:27

>>1
Make a virtual machine that runs your own high level instruction set.

Name: Anonymous 2008-10-17 2:21

Make it support lazy evaluation and lazy programming

Name: Anonymous 2008-10-17 2:24

>>25
you mean like some sort of weird mixture of haskell and perl like perl 6?

Name: Anonymous 2008-10-17 2:44

>>26
Lazy programming is a novel technique employed primarily by LISP hackers.  With lazy programming a program is not written but merely declared so; actual creation of the program is done after a first request for evaluation, which never comes, so the program is never written.  This saves LISP hackers a lot of time which can be spent in effective trolling.

Name: Anonymous 2008-10-17 2:59

>>27
lazy programming is basically what you described, except that actual creation of the program (which never happens) is in perl instead of lisp.

Name: Anonymous 2008-10-17 3:57

Since when is LISP lazy?

Name: Anonymous 2008-10-17 4:31

>>29
Lazy programming, not lazy programming languages.

Name: Anonymous 2008-10-17 13:46

>>28
Are you nuts, nobody writes in Perl, lazily or otherwise.

Name: Anonymous 2008-10-17 13:57

What is the actual problem with FIOC? Is there anyone who has used it for a considerable period of time and still sees it as a bad feature? I had an irrational dislike of it before I actually started using it, but now I wish more languages would embrace it.

Name: Anonymous 2008-10-17 14:22

>>32
one word,
FORCED INDENTATION OF THE CODE,
thread over

Name: Anonymous 2008-10-17 14:23

>>1
Does it have to be touring-complete?

Name: Anonymous 2008-10-17 14:25

>>32
I have no problem with the ``IOC'' part the problem is the ``F'' part

Name: Anonymous 2008-10-17 14:35

Writing your own language is the most fun you can possibly have.

Use bison and flex for parsing (unless you're making something like a lisp).

Make it compile "bytecode" for a simplistic VM. You might find "threaded code" is even simpler than "bytecode", YMMV.

As for the language, how about something strictly functional, but no lazy evaluation or strict types? You will have to implement tail recursion (which shouldn't be too hard), and real closures (which might be a bit harder; you'll certainly have to completely understand lexical scoping first).

Name: Anonymous 2008-10-17 14:44

>>35
Please review >>10. The indentation is not forced.

Name: Anonymous 2008-10-17 23:20

>>35
I hate how we're forced to declare C variables before we can use it. I hate FDOV.

Name: Anonymous 2008-10-18 1:24

>>38
You idiot.

Name: Anonymous 2008-10-18 2:57

Write your compiler in Prolog.  Seriously, it's the easiest way.

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