A Lisp based programming language I'm creating(github.com)
github.com
A Lisp based programming language I'm creating
https://github.com/rogcg/pixel
8 comments
I'm looking at Prog1.px et. al. If you format your Lisp code this way, the Lisp community is not likely to take your project very seriously.
I suspect you're missing the point. He's writing Algol-ish code using Lisp syntax/data structures. The formatting is to emphasize this fact.
Thus, if I understand correctly, he wants to allow us to write & think about the code much as we might handle C code, while still having Lisp-style code-as-data power & flexibility available to us.
Or maybe not. Just guessing.
Thus, if I understand correctly, he wants to allow us to write & think about the code much as we might handle C code, while still having Lisp-style code-as-data power & flexibility available to us.
Or maybe not. Just guessing.
I'm actually making a prediction, and not a judgement. Nobody would say I'm a member of the Lisp community, whatever that might mean. But I have seen people get landed on pretty viciously for this kind of formatting before, and if you want participation from a community you should abide the community's standards, even if they are irrational.
Even if the point is to write Algolish code, formatting it like this is likely to earn scorn rather than appreciation.
Even if the point is to write Algolish code, formatting it like this is likely to earn scorn rather than appreciation.
On the other hand, if you want participation from the Algol-descendant community, who frequently scorn the Lisp community's formatting, that may be exactly the right decision to make to get them familiar with Lisp-like syntax and worry about teaching them the more standard Lisp-community formatting conventions later.
That's a really good point.
> and if you want participation from a community you should abide the community's standards, even if they are irrational.
I don't think he's going to get much participation from the lisp community, but then again, everybody else is a much bigger community. So who knows, maybe the power of lisp combined with a non-lispy syntax is a balloon that can fly.
I don't think he's going to get much participation from the lisp community, but then again, everybody else is a much bigger community. So who knows, maybe the power of lisp combined with a non-lispy syntax is a balloon that can fly.
> So who knows, maybe the power of lisp combined with a non-lispy syntax is a balloon that can fly.
Sounds like Apple's old language Dylan, and perhaps the Julia language: http://www.johnmyleswhite.com/notebook/2012/03/31/julia-i-lo...
Sounds like Apple's old language Dylan, and perhaps the Julia language: http://www.johnmyleswhite.com/notebook/2012/03/31/julia-i-lo...
You are totally right! That's what I meant!
If you add significant white space while keeping the prefix notation, it kinda looks like python.
https://gist.github.com/2401588
https://gist.github.com/2401588
This has been noted before. I have seen a couple proposals to add significant whitespace to Scheme which I can't remember the details for offhand, and I believe was also the basis for the Pliant language's syntax.
One such proposal that I like is "sweet-expressions" at http://www.dwheeler.com/readable/. That page also has a rudimentary set of implementations for some Lisp dialects, including Scheme. It's too bad that new Lisp dialects never seem to take notice of these features.
Also, quick links for others looking for Pliant:
Pliant syntax docs: http://hc.fullpliant.org/doc/language/syntax
Pliant language docs: http://hc.fullpliant.org/doc/
Also, quick links for others looking for Pliant:
Pliant syntax docs: http://hc.fullpliant.org/doc/language/syntax
Pliant language docs: http://hc.fullpliant.org/doc/
I liked your demonstration. A mix of python and Lisp syntax doesn't sound bad.
I also toyed with my own Lisp[1] a few weeks ago, after being inspired by Peter Norvig's Lispy[2].
It's an interpreter though, and written in C++. I mixed together features from different languages (eager/lazy evaluation, call-by-value/reference, macros). It was very instructive and a lot of fun!
[1] https://github.com/apresta/lime
[2] http://norvig.com/lispy.html
[1] https://github.com/apresta/lime
[2] http://norvig.com/lispy.html
Well. This language seems to be senseless. It looks like all those parenthesis are there to make language look like Lisp. Well, I'd grade Lispness of this code as totaly non-Lisp like. Far more interesting would be atempt to create C-looking functional language that could look like that:
I didn't read your code carefully, but "endles" elsif chains looks terrible and I think there shouldn't be stuff like that in tutorial project. Moreover I believe java isn't good tool for that purpouse( another nobody seems to teach ). I'd use flex and bison or perl if you realy want to implement lexical analisis yourself..
define( fact, ( n ), function(
cond( ( n = 0 || n = 1, 1 )
( n > 1, n * fact(n-1) )
)
)
print( fact( 5 ) )
I think I'd try to program in language like that. Lisp way of thinking, but parenthesis are bit more helpful and there are "normaly" used operators which makes language bit more readable.
Your project looks like another purely academic example. I think purely academic examples sucks because don't teach people to do what is actualy needed.I didn't read your code carefully, but "endles" elsif chains looks terrible and I think there shouldn't be stuff like that in tutorial project. Moreover I believe java isn't good tool for that purpouse( another nobody seems to teach ). I'd use flex and bison or perl if you realy want to implement lexical analisis yourself..
Well, explaining your point of view - the parenthesis aren't there only to make the language look like lisp - I used it for its syntax and for delimit the scopes.
Now, about the "else if", I also felt bad about it, and I'm thinking about a changing for it, I'm still working on it, as in a lot of features. If you want to add some feature or change something, please feel free and do it - just show your purpose before do anything, so we might discuss how it will work .
And yes, I started this project while on university, and I don't think it sucks, because my intention is not to create a new technology - at first instance - but help people who want to learn how to write a programming language (as you can read on the README file), whatever comes to this project (bad or good), it will be well accepted for learning.
I also agree with you that Java is not the best tool for implement such thing, and I was thinking about rewriting it to C++ or Python.
Now, about the "else if", I also felt bad about it, and I'm thinking about a changing for it, I'm still working on it, as in a lot of features. If you want to add some feature or change something, please feel free and do it - just show your purpose before do anything, so we might discuss how it will work .
And yes, I started this project while on university, and I don't think it sucks, because my intention is not to create a new technology - at first instance - but help people who want to learn how to write a programming language (as you can read on the README file), whatever comes to this project (bad or good), it will be well accepted for learning.
I also agree with you that Java is not the best tool for implement such thing, and I was thinking about rewriting it to C++ or Python.
Take a look at Epoch[1]. It’s written by an acquaintance of mine, Mike Lewis, and I’ve watched it mature over the years from a mere forum thread into a fairly robust language. Unfortunately he tends to be quite busy, so development is slow, albeit constant. Still, the design is solid.
[1] http://code.google.com/p/epoch-language/
[1] http://code.google.com/p/epoch-language/
Could be better, could be worse. The implementation definitely needs a bit of love, yet I think this project could turn out to be rather useful. I guess I see it not as a low-level Lisp, but as a Lispy high-level assembly. Applying Lisp macros to assembly generation seems like a pretty natural thing, similar to Forth in a way. Instead of trying to make high-level stuff efficient, just make low-level stuff easy.
Neat! I just started playing around with the implementation of another Lisp-inspired language I've been thinking about for a while now (https://github.com/gliese1337/vernal-lang); I suspect this could turn out to be a really useful reference for implementing the compiler (not to mention inspiring me to steal features).
Just pointing out that this is pretty much the dead centre of the Hacker News interest group - if you join the dots.
This is all about the combination of
(a) the 0x10c compiler writing http://0x10c.com/ (assembler project), (had many hacker news posts) and
(b) Abdulaziz Ghuloum's An Incremental Approach to Compiler Construction http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf (which has had about two separate Hacker News posts):
This is all about the combination of
(a) the 0x10c compiler writing http://0x10c.com/ (assembler project), (had many hacker news posts) and
(b) Abdulaziz Ghuloum's An Incremental Approach to Compiler Construction http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf (which has had about two separate Hacker News posts):
This is similar to something that I've been working on called sxc (S-Expression C). I'm not sure what language he's writing it in, but without a powerful macro language that can manipulate the s-expressions/lists the lisp syntax is just cosmetic.
IMO, I believe that for a good programming language to exist, the power is on its grammar. Of course we can choose the wisest syntaxes, and the best technologies to build it, but the kernel of the language is on its grammar.
That's my opinion.
That's my opinion.