Results 1 to 10 of 33

Thread: Gumberoo - Making a new learning language intepreter using FPC

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by SilverWarior View Post
    Pardon me. It seems I misunderstood your intention. I got a feling that you intend to make completly new programing language from scratch.
    It is... but it's an interpreted one like PHP, Python, Perl, ROM Basic, Javascript, (and if you don't buy into this virtual machine BS, Java), etc -- instead of a compiled one. At this point being 'truly original' is a joke (given 90% of programming languages are just C rehashed -- see Java and PHP) but there are some ways to make things simpler.

    A lot of the choices come from Python and Ruby without the parts to me are either needlessly complex, pointless, or annoying. (annoying? Elif much?!?).

    Quote Originally Posted by SilverWarior View Post
    BTW how come you have decided to not include support for pointers? I do understand that for beginner they might seem verry complicated, but when you learn working with them then you realize that they can be verry powerful if used corectly.
    First, as you said it is a complicated concept; one I really wasn't able to grasp until Junior high and I was pretty up on the take for this sort of stuff. (given I'd written my first business app in diBol at 13)

    But more importantly, given the other stuff I've omitted, what purpose would they serve? There's no direct memory access, no complex data structures like record or userland objects, arrays are (hopefully) going to automatically be dynamic (since I'll be using "array of" with setlength on the back end)... Pointers for the sake of having pointers is... pointless.

    Plenty of real world deployment languages get along just fine without them. PHP doesn't have pointers... Java doesn't have them; they have handles which will work much akin to my 'createxxxxx' methods...

    They're an advanced concept best left to an intermediate or higher language, not a elementary one.

    Though I've been beating myself up over including/not including all sorts of things like pointers the past week and a half since I started this project on a cocktail napkin during a "brainstorming luncheon". I keep having to remind myself "don't make it any more complicated than a 1980's ROM Basic, just let it do more"

    Which means no scope, no pointers, no user functions, no typecasting of numerics, no complex data structures.
    Last edited by deathshadow; 16-04-2012 at 12:25 PM.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

  2. #2
    Don't beat yourself up, stick to your guns!

  3. #3
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    I have to be honest though. Pointers are somewhat of a double edged sword, used correctly they can create some absolutely marvelous and innovative code, especiall in an OOP context. However, the down side is that they can also create an absolute hell of debugging as in my case, I often find myself referring to 'runlevels'. In other words, an array of procedures, sometimes 2D, which the program can modify on the fly to change its behaviour when conditions are met. However, due to the generic context of many of these procedure the error with a memory address is not so useful - its not the actual procedure that was at fault as the code there was working just a minute ago - but rather, a pointer has moved to the wrong procedure/variable and fed the wrong array into the wrong procedure or something.

    I guess what I'm getting at, is that although GDB can point to your code being faulty, pointers are more of a higher level 'logic' problem. I can definitely see why its a good idea to keep people whom are new to code away from such nasties, however I would recommend something similar to pointers as when they eventually become more adept at programming, they will inevitably want to create more complex programs and experiment with that concept - something all to present in the real world. Perhaps implementing something similar to pointers, but under a more structured context would be a good idea in that case?
    Just my 2 cents... Great work anyhow.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  4. #4
    Quote Originally Posted by code_glitch View Post
    I guess what I'm getting at, is that although GDB can point to your code being faulty, pointers are more of a higher level 'logic' problem.
    Which is why with my primary target being pre-teens down to third or fourth grade, they have no place.

    Quote Originally Posted by code_glitch View Post
    I can definitely see why its a good idea to keep people whom are new to code away from such nasties, however I would recommend something similar to pointers as when they eventually become more adept at programming, they will inevitably want to create more complex programs and experiment with that concept - something all to present in the real world. Perhaps implementing something similar to pointers, but under a more structured context would be a good idea in that case?
    To me that's time for them to move on to a real programming language -- like pascal or C.

    A lot of people seem to like to use the training wheels analogy; but usually you give them a tricycle or big wheels long before you give them a real bike even with training wheels. I don't see a lot of adults or even teenagers riding around on big wheels. You might have alphabet blocks as a toddler, doesn't mean you're still using them in Elementary school.

    I'm thinking Duplo, not Lego Technix. I'm thinking Erector Set, not Arc Welder. I'm thinking alphabet blocks, not Merriam-Websters.

    Oddly, across the various places I'm discussing this that seems to be the hardest point to drive home and/or that people aren't understanding. (this forum so far has been the most accepting of the concepts)- Hoping that will get better when I have a real website written up with the various points and information broken into pieces and dumbed down -- as opposed to forum rants the illiterates who make up modern society piss and moan about. Oh noes, wall of text -- AAAH!!! God forbid people be expected to read anything anymore.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

  5. #5
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I had a thought. You said that pointers was something that you didn't get until junior high right? Well why bother putting them in for the first version? When I first learned to program I started with only the functions I needed to do some of the interesting things then eventually I learned more to become a better programmer. So why not take that approach?

    Start with the basic concepts and lessons, then make a second version OR a "Novice" or "Advanced" edition to teach the second set of concepts that you would learn later on. These editions would compliment each other as people learning the advanced stuff would still be familiar with the language enough that moving onto more complex concepts would be smoother that way.

    If this is a project that you wish to put up as a teaching tool of sorts it's best to start with the beginning and then move upward into the next step one at a time. You could even do a 3rd edition that went on to teach the basics of OOP.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #6
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Thats an interesting way of putting will. My only potential worry about that is code maintenance - you'd have to fix bugs across each version... Unless, you had it fixed so you had a line like:
    set language mode advanced
    at the start, kind of like {$Mode ObjFpc}, the interpreter would know to switch out of 'easy' mode with more functions, pointers and etc...

    Having said that, though, deathshadow - whats your take on scratch? Personally I actively persecute it... But thats just me
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  7. #7
    Quote Originally Posted by code_glitch View Post
    Having said that, though, deathshadow - whats your take on scratch? Personally I actively persecute it... But thats just me
    It's actually something I looked at during my whirlwind tour of "wow these suck". It's too gimmicky, their website seems to be just thrown together any old way to the point I couldn't even figure out where the actual instructions for using it or doing anything in it actually are, and I didn't see any results built in it that were particularly blowing my skirt up.

    Though much of that is just the technology it's based on. Flash can be very powerful, but to compile to actionscript, which is basically what it does... well... the net result leaves a lot to be desired... Crappy user input handling, oddball flickers of simple things like sprite movement... and that's before we talk the "IDE".

    Which I naturally hate for the goofy illegible color contrasts -- but to be fair, I can't stand illegible acid trip of color syntax highlighting either; it's one of the first things I disable in any editor. (part of why I use Flo's Notepad2 as my primary). I didn't like it when Borland added it to TP4, I've not seen it improve in usefulness since; making giant colored boxes with text that doesn't line up in a clear manner with all sorts of pointless useless extra wording? I'll pass.

    In a lot of ways SCRATCH reminds me of Logo -- you can't actually seem to make anything useful with it; and when the results are NOT as good as ROM Basic programs were on a TI-99/4a on a multi-ghz computer using a API that DOES have hardware acceleration... you've got problems.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

  8. #8
    Didn't had enough time to read this whole wall of text, but so far seems very nice. I laughed a bit since I haven't visited the forums for a few weeks and I began writing my own interpreter... and now bah! someone else is doing it too. Keep up your work and good luck.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •