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:
Anonymous2008-10-15 17:24
C with Monads.
Name:
Anonymous2008-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:
Anonymous2008-10-15 17:34
make sure it doesn't have FORCED INDENTATION OF THE CODE
a very common beginner's mistake...
Name:
Anonymous2008-10-15 18:12
make sure it has FORCED INDENTATION OF THE CODE
a very common beginner's wish..
Name:
Anonymous2008-10-15 19:07
common beginner's wish
wait! you mean people actually wantFIOC???
wtf is the world coming to?
Name:
Anonymous2008-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.
>>17
I'm not convinced that HQ9+ is Touring complete.
Name:
Anonymous2008-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:
Anonymous2008-10-16 10:59
Write a Ruby clone that isn't damn useless.
Name:
Anonymous2008-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:
Anonymous2008-10-16 14:38
>>20
>Ruby clone
>not damn useless
DOES NOT COMPUTE
Name:
Anonymous2008-10-16 17:19
PRORGAMMING BLAMGBLUGAGESSSSS LAMBDA
Name:
Anonymous2008-10-17 1:27
>>1
Make a virtual machine that runs your own high level instruction set.
Name:
Anonymous2008-10-17 2:21
Make it support lazy evaluation and lazy programming
>>25
you mean like some sort of weird mixture of haskell and perl like perl 6?
Name:
Anonymous2008-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.
>>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:
Anonymous2008-10-17 3:57
Since when is LISP lazy?
Name:
Anonymous2008-10-17 4:31
>>29
Lazy programming, not lazy programming languages.
Name:
Anonymous2008-10-17 13:46
>>28
Are you nuts, nobody writes in Perl, lazily or otherwise.
Name:
Anonymous2008-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:
Anonymous2008-10-17 14:22
>>32
one word, FORCED INDENTATION OF THE CODE,
thread over
>>32
I have no problem with the ``IOC'' part the problem is the ``F'' part
Name:
Anonymous2008-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:
Anonymous2008-10-17 14:44
>>35
Please review >>10. The indentation is not forced.
Name:
Anonymous2008-10-17 23:20
>>35
I hate how we're forced to declare C variables before we can use it. I hate FDOV.