Page 1 of 2 [ 22 posts ]  Go to page 1, 2  Next

LjSpike
Pileated woodpecker
Pileated woodpecker

User avatar

Joined: 23 Dec 2016
Age: 23
Gender: Male
Posts: 188
Location: About 55° N, 3° W

05 Jan 2017, 1:47 pm

I'd actually begun once before, but found I ran out of time (+most ventures which I do completely solo I just end up never finishing, the slight fear that someone might get a bit annoyed if I abandon a project randomly can be quite motivating and in the end, quite nice and useful).

Anyway, the title does sum it up quite well, just writing a programming language. The two following reasons:
1) The major reason - For the sake of it, I mean, with the right tools I'm sure it'd be a rather enjoyable experience
2) NT's are bad at making programming languages (generally). I've only come across two programming languages I've truly liked, the language the Godot Engine (game engine) uses, although I never managed to get far with it. I admired it but it was a bit too tricky for me. The other language is an unnamed little language used for the DNA of the little artificial lifeforms in Darwinbots 2 simulations. I did learn a good chunk of it, and although its not necessarily totally user friendly at first, it is a beautiful and powerful language, even if its applications are heavily limited.


If I get a few people feeling up to the challenge, I'll either try to learn how to use git and github (perhaps even get one of you to train me on the basics of it), or I'll use google docs, or I'll just look for something else which supports collaborations. (Or I'll use some numerous mix of the above?)


Hopefully we'll be able to get something small done first, like mathematical operations with variables perhaps, and then move on to some bigger stuff :P


_________________
Why not visit my blog over here!
-------------------
RDOS Aspie Quiz
Neurodiverse (Aspie) score: 162 of 200
Neurotypical (non-autistic) score: 52 of 200
LINK: http://www.rdos.net/eng/poly10a.php?p1= ... =66&p10=74
-------------------
Score breakdown for RAADS-R
Total: 185.0 | Language: 17.0 | Social Relatedness: 90.0 | Sensory/Motor 45.0 | Circumscribed Interests: 33.0
LINK: http://www.aspietests.org/raads/questions.php


saxgeek
Veteran
Veteran

Joined: 18 Jul 2015
Age: 28
Gender: Male
Posts: 730

05 Jan 2017, 7:15 pm

What type of programming language are you looking for? To actually be able to use the language, you'd need to implement a compiler or interpreter for it, but I don't really have much experience in that field.

I once thought about making a better version of C. I like the language, but there are some things I'd change. For example, I'd make all non-local variables static, unless declared with the "export" keyword, make "char" unsigned by default, have bitfields that are actually bitfields, use native support for utf8, a more powerful preprocessor that handles variadic macros better, incbin support for including binary files, make octal numbers prefixed with 0o instead of 0, replace the logical operators with keywords (can be already achieved with macros), have a constexpr similar to C++, make the type conversion system actually consistent, introduce some optional pointer checking and array bounds checking at runtime to help debugging, and eliminate "implementation defined" behavior.



LjSpike
Pileated woodpecker
Pileated woodpecker

User avatar

Joined: 23 Dec 2016
Age: 23
Gender: Male
Posts: 188
Location: About 55° N, 3° W

06 Jan 2017, 11:19 am

saxgeek wrote:
What type of programming language are you looking for? To actually be able to use the language, you'd need to implement a compiler or interpreter for it, but I don't really have much experience in that field.

I once thought about making a better version of C. I like the language, but there are some things I'd change. For example, I'd make all non-local variables static, unless declared with the "export" keyword, make "char" unsigned by default, have bitfields that are actually bitfields, use native support for utf8, a more powerful preprocessor that handles variadic macros better, incbin support for including binary files, make octal numbers prefixed with 0o instead of 0, replace the logical operators with keywords (can be already achieved with macros), have a constexpr similar to C++, make the type conversion system actually consistent, introduce some optional pointer checking and array bounds checking at runtime to help debugging, and eliminate "implementation defined" behavior.


Well, One major thing would be to allow more choice with the user as to how dynamically/statically typed they want it to be. This could fairly easily be achieved in many aspects, as languages with very dynamic typing like python have benefits, but sometimes a static one can be more useful, or a mix of both in a single program, so it'd mean only one language would have to be learnt & used then. Aside from that, I'm not sure I have an overall goal, it'd just be nice to make a programming language, if other people like it, or if its better than some other language, then that's cool, but just making one would be pretty cool. As far as writing the compiler/interpreter, I did believe I'd got to beginning to write one in my previous attempt, but the files are buried somewhere I cannot find. There are tutorials and so forth dotted in some corners of the internet on how to create compilers and interpreters...It'll no doubt still be a challenge, but worthwhile things are always a challenge.

Interestingly, a significant amount of people don't like C. Perhaps contributing to the success of D and Java along with other languages. I personally don't particularly like Java, it just seems a bit, overly complex at times.

Anyway, there are some little used features odd little programming languages have which could be included. It'd be interesting to see if a language could support both normal and spaghetti formats, perhaps by utilising all the normal commands of a language, but also pulling in the "goto" command from spaghetti. It could allow for some condensing of programs then too.

I suspect as well that for storing really long numbers, one could adjust the placing of the d.p. quite efficiently with metadata allowing for a more generalised precision datatype.


_________________
Why not visit my blog over here!
-------------------
RDOS Aspie Quiz
Neurodiverse (Aspie) score: 162 of 200
Neurotypical (non-autistic) score: 52 of 200
LINK: http://www.rdos.net/eng/poly10a.php?p1= ... =66&p10=74
-------------------
Score breakdown for RAADS-R
Total: 185.0 | Language: 17.0 | Social Relatedness: 90.0 | Sensory/Motor 45.0 | Circumscribed Interests: 33.0
LINK: http://www.aspietests.org/raads/questions.php


GaiaXIX
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 5 Jan 2017
Gender: Female
Posts: 27
Location: FRANCE

07 Jan 2017, 3:28 am

Nice project but, I think you already know that, it will be very long you can trust me on that point I am just now writing an interpreter for haskell for a university project. But I am lucky that I just have the interpreter and a little of the grammar to do because normally (if I was planning to do something like you) I would have to of course write the grammar and then the parser and the type checker and finally the interpreter and honestly I am glad someone did it for me but I admit if I thought at the beginning it will be boring, at the end it is quite fun.

So the process normally is:
Lexer -> parser -> type checker ->interpreter

Hope you will do it is great to have diversity in programming language.

And for the interpreter you should use the result of your parser (which should be a tree of your program) which have an entry point (the main for exemple) and from there you have to analyse you tree to give "an evaluation" of the entry point. This is not very difficult but extremly long


_________________
Asperger, Asexual, Vegetarian. Boring tiercé.


LjSpike
Pileated woodpecker
Pileated woodpecker

User avatar

Joined: 23 Dec 2016
Age: 23
Gender: Male
Posts: 188
Location: About 55° N, 3° W

07 Jan 2017, 6:42 pm

GaiaXIX wrote:
Nice project but, I think you already know that, it will be very long you can trust me on that point I am just now writing an interpreter for haskell for a university project. But I am lucky that I just have the interpreter and a little of the grammar to do because normally (if I was planning to do something like you) I would have to of course write the grammar and then the parser and the type checker and finally the interpreter and honestly I am glad someone did it for me but I admit if I thought at the beginning it will be boring, at the end it is quite fun.

So the process normally is:
Lexer -> parser -> type checker ->interpreter

Hope you will do it is great to have diversity in programming language.

And for the interpreter you should use the result of your parser (which should be a tree of your program) which have an entry point (the main for exemple) and from there you have to analyse you tree to give "an evaluation" of the entry point. This is not very difficult but extremly long


Well, either interpreter or compiler, or both. I know its a long project, hence why I'm not going to try to do it solo yet, and am seeing if others feel up to helping.


_________________
Why not visit my blog over here!
-------------------
RDOS Aspie Quiz
Neurodiverse (Aspie) score: 162 of 200
Neurotypical (non-autistic) score: 52 of 200
LINK: http://www.rdos.net/eng/poly10a.php?p1= ... =66&p10=74
-------------------
Score breakdown for RAADS-R
Total: 185.0 | Language: 17.0 | Social Relatedness: 90.0 | Sensory/Motor 45.0 | Circumscribed Interests: 33.0
LINK: http://www.aspietests.org/raads/questions.php


GaiaXIX
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 5 Jan 2017
Gender: Female
Posts: 27
Location: FRANCE

07 Jan 2017, 11:17 pm

I wish I have time for personal project....


But the only thing I can do is give you my literature reference if it is any help

Aho, Lam, Sethi & Ullman
Compilers Principles, Techniques & Tools Second edition, Pearson/Addison Wesley 2007 (the famous dragon book)

Implementing Programming Languages
An Introduction to Compilers and Interpreters
by Aarne Ranta, with an appendix coauthored by Markus Forsberg (the book the students use at my university, written by the head teacher)


_________________
Asperger, Asexual, Vegetarian. Boring tiercé.


LjSpike
Pileated woodpecker
Pileated woodpecker

User avatar

Joined: 23 Dec 2016
Age: 23
Gender: Male
Posts: 188
Location: About 55° N, 3° W

08 Jan 2017, 10:28 am

GaiaXIX wrote:
I wish I have time for personal project....


But the only thing I can do is give you my literature reference if it is any help

Aho, Lam, Sethi & Ullman
Compilers Principles, Techniques & Tools Second edition, Pearson/Addison Wesley 2007 (the famous dragon book)

Implementing Programming Languages
An Introduction to Compilers and Interpreters
by Aarne Ranta, with an appendix coauthored by Markus Forsberg (the book the students use at my university, written by the head teacher)


I will very probably utilise the dragon book. If/When the project gets off the ground, I'll let you know via a message, and I might occasionally send a message or such if I've got a query if that is alright?


_________________
Why not visit my blog over here!
-------------------
RDOS Aspie Quiz
Neurodiverse (Aspie) score: 162 of 200
Neurotypical (non-autistic) score: 52 of 200
LINK: http://www.rdos.net/eng/poly10a.php?p1= ... =66&p10=74
-------------------
Score breakdown for RAADS-R
Total: 185.0 | Language: 17.0 | Social Relatedness: 90.0 | Sensory/Motor 45.0 | Circumscribed Interests: 33.0
LINK: http://www.aspietests.org/raads/questions.php


GaiaXIX
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 5 Jan 2017
Gender: Female
Posts: 27
Location: FRANCE

08 Jan 2017, 11:41 am

Sure I will do my best to help


_________________
Asperger, Asexual, Vegetarian. Boring tiercé.


saxgeek
Veteran
Veteran

Joined: 18 Jul 2015
Age: 28
Gender: Male
Posts: 730

09 Jan 2017, 4:00 pm

There are tools like yacc and flex which can generate lexer and parser code for a specified grammar. That might help with the implementation.



GaiaXIX
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 5 Jan 2017
Gender: Female
Posts: 27
Location: FRANCE

09 Jan 2017, 6:48 pm

Yes yo are right but from my knowledge it works for BNF.

Quote:
The code generated by BNFC is processed by other tools:
• Lex (Alex for Haskell, JLex for Java, Flex for C)
• Yacc (Happy for Haskell, Cup for Java, Bison for C)


But there is also research projects from universities doing lexer, parser and even part as type checker and/or interpreter which is very useful (and free). I know my university has developed something like that but I am not sure it works for all grammars. I cannot tell what exists because this is not exactly my domain but I am sure with research on the internet you will be able to find something like that if you search for "converters"


_________________
Asperger, Asexual, Vegetarian. Boring tiercé.


LjSpike
Pileated woodpecker
Pileated woodpecker

User avatar

Joined: 23 Dec 2016
Age: 23
Gender: Male
Posts: 188
Location: About 55° N, 3° W

10 Jan 2017, 11:15 am

GaiaXIX wrote:
Yes yo are right but from my knowledge it works for BNF.

Quote:
The code generated by BNFC is processed by other tools:
• Lex (Alex for Haskell, JLex for Java, Flex for C)
• Yacc (Happy for Haskell, Cup for Java, Bison for C)


But there is also research projects from universities doing lexer, parser and even part as type checker and/or interpreter which is very useful (and free). I know my university has developed something like that but I am not sure it works for all grammars. I cannot tell what exists because this is not exactly my domain but I am sure with research on the internet you will be able to find something like that if you search for "converters"


Well thats one approach, to throw it into another high-level language. I suspect that'd end up creating more problems then it might solve in the long run, unless you were to use a language of near identical structure to them...


_________________
Why not visit my blog over here!
-------------------
RDOS Aspie Quiz
Neurodiverse (Aspie) score: 162 of 200
Neurotypical (non-autistic) score: 52 of 200
LINK: http://www.rdos.net/eng/poly10a.php?p1= ... =66&p10=74
-------------------
Score breakdown for RAADS-R
Total: 185.0 | Language: 17.0 | Social Relatedness: 90.0 | Sensory/Motor 45.0 | Circumscribed Interests: 33.0
LINK: http://www.aspietests.org/raads/questions.php


BaalChatzaf
Veteran
Veteran

User avatar

Joined: 11 Mar 2008
Gender: Male
Posts: 1,050
Location: Monroe Twp. NJ

18 Jan 2017, 4:36 pm

why do we need a YAPL (Yet Another Programming Language)?


_________________
Socrates' Last Words: I drank what!! !?????


LjSpike
Pileated woodpecker
Pileated woodpecker

User avatar

Joined: 23 Dec 2016
Age: 23
Gender: Male
Posts: 188
Location: About 55° N, 3° W

19 Jan 2017, 1:25 pm

BaalChatzaf wrote:
why do we need a YAPL (Yet Another Programming Language)?

Well, we don't "need" one, to the extent that the world will still spin without one, but why not? It'd be interesting to make one, and perhaps it might happen to be better than some other ones.

Using that sort of mentality though, means nothing progresses, the guys that made the car, the plane, the boat, they could've gone, "why do we need yet another mode of transportation". They didn't actually need a car, or a plane, but they decided, to do it still, and shaped our world for years to come.


_________________
Why not visit my blog over here!
-------------------
RDOS Aspie Quiz
Neurodiverse (Aspie) score: 162 of 200
Neurotypical (non-autistic) score: 52 of 200
LINK: http://www.rdos.net/eng/poly10a.php?p1= ... =66&p10=74
-------------------
Score breakdown for RAADS-R
Total: 185.0 | Language: 17.0 | Social Relatedness: 90.0 | Sensory/Motor 45.0 | Circumscribed Interests: 33.0
LINK: http://www.aspietests.org/raads/questions.php


kicker
Velociraptor
Velociraptor

User avatar

Joined: 10 Oct 2013
Age: 45
Gender: Male
Posts: 467
Location: Atalnta, Ga

19 Jan 2017, 3:26 pm

I have a few questions.

Do you have a specific domain you were thinking of writing for? Please be specific.

Do you have an idea of the platform and architecture you will want to initially write for? Again please be specific.

Do you have a framework written out that describes your lexical and syntax? If so do you have a document you can put online to show it?

Is this a high level language or a low level language?

Will your language use classes or just methods?

Will it be open source? If not, what terms will it be distributed under? If it's commercial, what are the terms of the partnership?

These are just a few questions that anyone worth any merit will ask you before agreeing to help. It would be advisable, if you haven't already, to really define what it is you want to accomplish in detail. General statements of "a programming language" doesn't describe what you want to do.



LjSpike
Pileated woodpecker
Pileated woodpecker

User avatar

Joined: 23 Dec 2016
Age: 23
Gender: Male
Posts: 188
Location: About 55° N, 3° W

20 Jan 2017, 4:25 pm

kicker wrote:
I have a few questions.

Do you have a specific domain you were thinking of writing for? Please be specific.

Do you have an idea of the platform and architecture you will want to initially write for? Again please be specific.

Do you have a framework written out that describes your lexical and syntax? If so do you have a document you can put online to show it?

Is this a high level language or a low level language?

Will your language use classes or just methods?

Will it be open source? If not, what terms will it be distributed under? If it's commercial, what are the terms of the partnership?

These are just a few questions that anyone worth any merit will ask you before agreeing to help. It would be advisable, if you haven't already, to really define what it is you want to accomplish in detail. General statements of "a programming language" doesn't describe what you want to do.


Domain would perhaps hopefully cover general applications and general mathematics, perhaps it could expand into further fields, perhaps simple 2D gameplay even, but that'd be further on in the future I expect.
It'll need to be able to run on Windows 10, potentially again, it could expand into further fields. I haven't really looking into architecture yet, although that is obviously an important consideration I'd have to take into account if/when I start. No written out things yet, as it could be a while till I get started, as nobody else really has shown equal interest in writing a programming language. I like elements of some lower-level languages, however overall I'd say it'd be a high level language. It'd probably be only a handful of elements from low-level languages I'd grab. I suspect it may use both classes and methods, although the exact implementation of them depends on many factors (including, I suppose, how object-orientated it is in the end). I'm almost certain it'd be open source. As with many other parts though, I wouldn't rule out other avenues yet, however it wouldn't be heavily limited under restrictive terms. It'd be nice to see people being able to use it, rather than attempting to squeeze cash out of people from this little venture.

I know, I seem pretty indecisive at the moment. Its early days though, and there is still a long road ahead of me till I get anywhere near a finished language. Additionally, the exact nature of the language will depend on who gets on board, different people will have different viewpoints and different experiences and expertise. They may well notice a better route to go down (hence why I'm still holding off beginning). Additionally, although it sounds counter-productive, I don't believe thinking about all the little details at the beginning is the best way to go about it. Just a general idea of why I want to do it, and roughly what I want to achieve, the technical bits can then be adopted into the project along the way.

I can say on thing for certain though, it won't be like Java or a good few of the C languages. Those languages I do believe are quite inefficient and can be unnecessarily complex at times, although some people must like them, for them to have been as successful as they have been. I suspect within the realms of making general programs, a language far simpler then them could be developed, which potentially (depending on what you consider "simpler") to be, could make a faster more efficient language. If it ventures into the world of creating games, I do suspect it can still be simpler then the big players (at least in most areas of it). I'd also suspect that it could be far more adaptable than many other languages. Just from a fairly fundamental perspective, computers are computers. Sure, the power of them changes, but they all run off essentially the same system, and the same machine code, binary. A high level language could therefore at least be able to adapt to perform many tasks and still perform them efficiently, whereas a fair chunk of languages seem to be restrictive in what they can do, or how they can do it, for example, a lot of languages are very fixed in being either very dynamically typed, or very statically typed, but I don't see a reason why control over how dynamically/statically typed the program is, can be handed over to the user. It wouldn't sit in the very very far end of static typing though, as arrays that don't scale are a nightmare, and so can be other aspects of the really static languages. It might take some form of duck typing into the language, or similar practices. Its something that'd have to be worked out a bit later on perhaps, because duck typing could lead to more bugs and errors, or harder to solve bugs and errors... Thats another part actually that'd be nice to tackle, a lot of errors across all of computing are terribly uninformative and can be quite tricky to solve at times. Some simply go to the extent to just say "oh somethings wrong in the ten thousand line program, why not check it line by line, good luck!". Error messages should be informative, and be fairly easy to understand. Just returning some random 15 digit code which can't be copied directly isn't helping anyone, whereas giving perhaps the error code, and a message which sums up the error to a fair extent in nice plain English, is far more productive.

Furthermore, just as a note to anyone venturing onto this thread, if you choose to say you'll help out, that doesn't lock you in, if you join but then decide you need to step back indefinitely to divert your time to other things, feel free. It's simply a nice little project I was hoping a few of us might be able to get together to work on.


_________________
Why not visit my blog over here!
-------------------
RDOS Aspie Quiz
Neurodiverse (Aspie) score: 162 of 200
Neurotypical (non-autistic) score: 52 of 200
LINK: http://www.rdos.net/eng/poly10a.php?p1= ... =66&p10=74
-------------------
Score breakdown for RAADS-R
Total: 185.0 | Language: 17.0 | Social Relatedness: 90.0 | Sensory/Motor 45.0 | Circumscribed Interests: 33.0
LINK: http://www.aspietests.org/raads/questions.php


kicker
Velociraptor
Velociraptor

User avatar

Joined: 10 Oct 2013
Age: 45
Gender: Male
Posts: 467
Location: Atalnta, Ga

20 Jan 2017, 5:56 pm

You're right it is really indecisive sounding.

If you don't have a clear vision of what you want, don't you think that it will be even more difficult to create? That it will be buggy?

You may want to try to find a project to join and get some experience as to what it takes to start from scratch. There are plenty of open source projects out there that would be ecstatic to have the help.