Boriels ZX Compiler

24

Comments

  • edited October 2012
    guesser wrote: »
    When you use PHP for what it was intended it's fine.

    Wonder what that might be... Surely not writing complex web applications? :)

    Patrik
  • edited October 2012
    Patrik Rak wrote: »
    Wonder what that might be... Surely not writing complex web applications? :)
    Extracting vast sums of money from big corporates?
  • edited October 2012
    RobeeeJay wrote: »
    , I never quite understood why FORTH was going to take over the world either
    simple: FORTH is sexy.
  • edited October 2012
    Patrik Rak wrote: »
    not writing complex web applications

    Exactly.
  • edited October 2012
    RobeeeJay wrote: »
    I never quite understood why FORTH was going to take over the world either.

    Yoda likes it because it makes sense to him.

    (Also just because he just likes to use the forth)
  • LCDLCD
    edited October 2012
    Many thanks LCD. It was your latest effort that inspired me to get to grips with this compiler. I'm also rather intimidated by what you've achieved!

    Thank you! Now, then the purpose was archived ;)
  • edited October 2012
    na_th_an wrote: »
    I can't understand why you see the difference between this:
    ...
    and this

    About 38 extra unnecessary characters? :)

    ccowley wrote: »
    Extracting vast sums of money from big corporates?

    Big corporates usually insist on .NET. I'm not even going to start on what I hate about .NET and C#.

    Dunny wrote: »
    Pascal's syntax is pretty much identical to C, And Delphi is comparable to C++ for object-orientation. The only real difference is that Pascal doesn't require header files which I would be very surprised to hear an argument for.

    A colon for an assignment operator? Words instead of braces? Near identical? :o The header files comment makes me suspect you've never compiled an application outside of a GUI. Not even going to rise to the rest of your post, you talk as if I insulted your first born. :)

    guesser wrote: »
    That's nonsense. If you only care what the computer does, it doesn't make any difference what language you write the code in.

    If you care how the computer does it then shirley you should be coding everything in asm, or at least writing your own compiler.

    It makes every difference what language you write it in. Different languages are suited to different things. Some stuff is ideal for a perl script (no I'm not a fan, but I respect it), and my friend is always on about weird stuff you can do in Ruby that sounds interesting, if not my cup of tea.

    I can't think of a better language atm for event driven programming than Javascript, and I wouldn't want to write an application in anything but C or C++.

    I remember the days when debugging C meant viewing your source code alongside the resulting compiled machine language, programmers these days seem so detached from the CPU.

    There is a website dedicated to people who don't care how the computer does it, it's called The Daily WTF. :)


    But if I haven't said enough to continue flaming, never forget the acronym, Beginner's All-purpose Symbolic Instruction Code.


    Now if you'll excuse me, I'm off to write my next website in a PROPER language... best suited to graphics.

    It's called LOGO.
  • edited October 2012
    RobeeeJay wrote: »
    It makes every difference what language you write it in.

    It doesn't. Not if you're going to then feed it into a compiler.

    It would be entirely conceivable to write a compiler that takes C and generates functionally identical BASIC. Of course there's no reason at all why anyone would do such a silly thing except to prove a point
  • edited October 2012
    RobeeeJay wrote: »
    But if I haven't said enough to continue flaming, never forget the acronym, Beginner's All-purpose Symbolic Instruction Code.

    Beginner's All-purpose Symbolic Instruction Code.

    ;)
  • edited October 2012
    RobeeeJay wrote: »
    I'm not even going to start on what I hate about .NET and C#.
    TFFT.
  • What have I done! I only started this thread to ask for help!
  • edited October 2012
    guesser wrote: »
    It doesn't. Not if you're going to then feed it into a compiler.

    It would be entirely conceivable to write a compiler that takes C and generates functionally identical BASIC. Of course there's no reason at all why anyone would do such a silly thing except to prove a point

    Your argument only holds water if all languages have exactly the same features, they don't. Do you think someone could rewrite the MAME source code in ZX BASIC? :)

    What have I done! I only started this thread to ask for help!

    Sorry, my fault, completely my fault!

    All I said was BASIC sucked.
  • edited October 2012
    guesser wrote: »
    It doesn't. Not if you're going to then feed it into a compiler.

    It would be entirely conceivable to write a compiler that takes C and generates functionally identical BASIC. Of course there's no reason at all why anyone would do such a silly thing except to prove a point

    sure: domain specific languages are such useless syntax sugar, at the end, everything is only electric charge hardly recognized from background noise ;)

    For example, i would never touch C/C++ when writting simple gui app :)
  • edited October 2012
    RobeeeJay wrote: »
    Your argument only holds water if all languages have exactly the same features
    Nonsense. That shows how little you understand computer science.
    RobeeeJay wrote: »
    Do you think someone could rewrite the MAME source code in ZX BASIC? :)

    Yes. Just not on a spectrum.
  • edited October 2012
    RobeeeJay wrote: »
    Do you think someone could rewrite the MAME source code in ZX BASIC? :)
    Yes. All that's required is a language that has the capability of setting pixels in a bitmapped display arbitrarily, making arbitrary sound output, and reading from an input device such as a keyboard or joystick. ZX BASIC has all of these capabilities.

    You wouldn't be guilty of mistaking a language specification for a particular implementation, or with the limitations of the hardware it's running on would you? Surely not, a man of your considerable experience and knowledge?

    You buffoon.
  • edited October 2012
    What have I done! I only started this thread to ask for help!

    Welcome to the flame war hijack!

    I hope my tutorial that I linked helped. Source code for the game it describes in available on WOS with the whole game too. For what it's worth.
  • edited October 2012
    na_th_an wrote: »
    And my code is alsways beautiful :D

    OK then. Let's see you write it beautifully in Malbolge. :smile:
  • edited October 2012
    But Malbolge is not turing complete! That makes Malbolge code beautiful by itself, no matter what you do.

    Right now the only reason why BASIC supposedly sucks (and Pascal) is 'cause it uses more characters than C.

    GREAT reason :lol:
    What have I done! I only started this thread to ask for help!

    WOS in all its glory! :D
  • edited October 2012
    RobeeeJay wrote: »
    ...Do you think someone could rewrite the MAME source code in ZX BASIC?...

    Dunny can do it in SpecOS during one of his numerous daily coffee breaks icon14.gif
  • Gedlion wrote: »
    Welcome to the flame war hijack!

    I hope my tutorial that I linked helped. Source code for the game it describes in available on WOS with the whole game too. For what it's worth.

    Yes, that's exactly what I needed. Thanks!
  • edited October 2012
    ccowley wrote: »
    Yes. All that's required is a language that has the capability of setting pixels in a bitmapped display arbitrarily, making arbitrary sound output, and reading from an input device such as a keyboard or joystick. ZX BASIC has all of these capabilities.

    You wouldn't be guilty of mistaking a language specification for a particular implementation, or with the limitations of the hardware it's running on would you? Surely not, a man of your considerable experience and knowledge?

    You buffoon.

    You wouldn't be guilty of mistaking a single arcade emulator with a mammoth code base that incorporates heavy template usage and object oriented hierarchy?

    Surely not, because that would be buffoonery! Or at least require downloading and looking at the MAME source code.

    guesser wrote: »
    Yes. Just not on a spectrum.

    I never said on a Spectrum. See previous answer.

    na_th_an wrote: »
    Right now the only reason why BASIC supposedly sucks (and Pascal) is 'cause it uses more characters than C.

    GREAT reason :lol:

    You asked what the difference between those two functions where, so I said. I gave reasons why I thought BASIC sucked before.

    Perhaps I should have added "A load more typing for no benefit" to the list as well?

    The example you gave was nicely indented, other than you being a neat coder (which is a good thing obviously) I'm not entirely sure what it is supposed to demonstrate, other than BASIC requires more typing to do the same thing. :/
  • edited October 2012
    It was a direct reply to your "show me beautiful code in BASIC". I was trying to demonstrate that you can create equally beautiful code in any language as long as you are clean, tidy, and know what you are doing. I was trying to demonstrate, besides, that all structured languages suck (or rock) exactly the same. It's all just a matter of a different syntax.

    Unless we are talking about different things when we say "beautiful code". For me, beautiful code is a code which is efficient and easy to read and maintain.

    There are languages which syntax has been established earlier so it has became standard, of course.

    Every language serves a purpose and has strong and weak points. Somebody who is going to code a complex engine for an Interactive Fiction game, for example, may say that C sucks 'cause it has so limmited built in support for string slicing. If I were to code an adventure game for the ZX Spectrum, I guess I'd pick the ZX BASIC compiler rather than z88dk or sdcc. Because it would make life easier for me.

    Many years ago, while I was at college, I coded some CGI applications using Microsoft QuickBasic just to show it was possible. Of course, there are much better languages for CGI applications. Every language was designed for a purpose. If that purpose doesn't meet your requirements, that doesn't mean such language sucks.

    Somebody learning the basics would enjoy BASIC way more than Javascript 'cause he or she would get into it way faster. BASIC got me into computers, you know. I strongly doubt that at age 10 I would have been able to actually code games which actually worked in any other language.

    Dyjkstra also said that babble about "GOTO considered harmful". He may have made important contributions to computer science and great algorithms, but he quite easy to misquote. If he really meant what you tried to express, I beg your pardon, but it's the most incredible foolishness I've read in many time. It took me a week to learn structured programming, and BASIC wasn't a weight. On the contrary, it made me easier to understand the new concepts - I understood the correct, structured program flow way faster thant those of my pals who didn't know BASIC (or any other language). Also, the guys who maintain the Linux kernel seem to have paid little attention to the "GOTO considered harmful" idea.

    Besides, speaking of typing in excess, I think Java wins hands down :)

    You don't like BASIC, that's great. I don't like Ruby on Rails. But, again, claiming that a language "sucks" shows a very limmited viewpoint. I'm sure that Ruby on Rails is awesome for some application I haven't found yet.
  • edited October 2012
    RobeeeJay wrote: »
    A colon for an assignment operator? Words instead of braces? Near identical? :o The header files comment makes me suspect you've never compiled an application outside of a GUI. Not even going to rise to the rest of your post, you talk as if I insulted your first born. :)

    You did insult my first born, you ignorant clod!

    The fact that Pascal uses words instead of braces doesn't change the function of those syntax elements. The colon as an assignment operator makes as much sense as the equivalent in C.

    As for "never compiled outside a GUI", I'd point you to the games and emulators I've ported to the Pandora, working with gEdit in a terminal in Debian :-p

    D.
  • edited October 2012
    RobeeeJay wrote: »
    You wouldn't be guilty of mistaking a single arcade emulator with a mammoth code base that incorporates heavy template usage and object oriented hierarchy?
    You really are an idiot. x86 and ARM assembler isn't object orientated, and doesn't have any concept of code templates, yet somebody has managed to write a programs to translate that source code you're talking about into those formats (things called compilers). You think it would be any more complicated to convert it to an arbitrary other language?
    Surely not, because that would be buffoonery! Or at least require downloading and looking at the MAME source code.
    You, Sir, haven't the faintest idea what you're talking about I'm afraid.
  • LCDLCD
    edited October 2012
    RobeeeJay wrote: »
    Sorry, my fault, completely my fault!

    All I said was BASIC sucked.

    So why did you that?

    Please show us your wonderful Speccy works before further discussion to judge your capabilities.

    There are no bad programming languages, just bad programmers.
    ;)
  • edited October 2012
    na_th_an wrote: »
    II was trying to demonstrate, besides, that all structured languages suck (or rock) exactly the same. It's all just a matter of a different syntax.

    Well, that's not entirely true. Syntax is not everything. Some languages have builtin features which don't have equivalents in other languages. Take for example Ruby's fibres or closures. That's something which doesn't translate as easily like the trivial example you gave (Turing completeness arguments aside).
    You don't like BASIC, that's great. I don't like Ruby on Rails. But, again, claiming that a language "sucks" shows a very limmited viewpoint. I'm sure that Ruby on Rails is awesome for some application I haven't found yet.

    I would just like to point out that Ruby and Ruby on Rails are two different things. I for example like the first one but can't stand the other.

    Patrik
  • edited October 2012
    LCD wrote: »
    There are no bad programming languages, just bad programmers.
    ;)

    Well, personally I think that there is something bad to be found in each language. Some are just less bad than the others. :)

    Patrik
  • edited October 2012
    na_th_an wrote: »
    Unless we are talking about different things when we say "beautiful code". For me, beautiful code is a code which is efficient and easy to read and maintain.

    I think we do have different definitions of beautiful code. To me, that's a function, it does nothing very interesting or eloquently. It solves no problem in a clever way.

    Using this forum as an example, someone posts a bit of assembly to do something, then a day later there are countless revisions by other people, some of which have what I consider to be very beautiful solutions to do the same thing in less time, or space.

    A great class hierarchy that just perfectly encapsulates the form it is representing, is beautiful code, as I see it. Also some clever way of doing something which makes it easy to maintain can be beautiful.

    na_th_an wrote: »
    may say that C sucks 'cause it has so limmited built in support for string slicing.

    I thought the standard C lib had plenty of string slicing operations? I appreciate that the compilers you mentioned will have very cut down libraries due to memory and cpu constraints.

    na_th_an wrote: »
    Somebody learning the basics would enjoy BASIC way more than Javascript 'cause he or she would get into it way faster. BASIC got me into computers, you know. I strongly doubt that at age 10 I would have been able to actually code games which actually worked in any other language.

    It was BASIC on the Spectrum at 10 that did it for me too. But I think the issue here is our choices then were built in BASIC or nothing. I rapidly moved onto ASM but I still used BASIC on the Speccy, then the BBC and even Amiga.

    Now we have web browsers which can do some really funky things, it's a whole new wonderful playground for kids to learn in. The only real problem is they aren't confronted by it like we were, so most don't.

    Back when we were kids we HAD to at least learn enough BASIC to load a game from tape. And then we had loads of magazines that encouraged us to do more.

    It's interesting that Raspberry Pi decided to push Python as the new language for kids to learn and not BASIC. But then Python doesn't have the endless variations that BASIC does.

    What would be good is if modern browsers took the console/debugger and made it a fully blown IDE to develop web applications in. Then encouraged people to notice it was all there.

    na_th_an wrote: »
    Dyjkstra also said that babble about "GOTO considered harmful". He may have made important contributions to computer science and great algorithms, but he quite easy to misquote. If he really meant what you tried to express, I beg your pardon, but it's the most incredible foolishness I've read in many time. It took me a week to learn structured programming, and BASIC wasn't a weight. On the contrary, it made me easier to understand the new concepts - I understood the correct, structured program flow way faster thant those of my pals who didn't know BASIC (or any other language). Also, the guys who maintain the Linux kernel seem to have paid little attention to the "GOTO considered harmful" idea.

    I did say he was a bit OTT. :)

    I do think GOTO is bad in general, like global variables are bad in general. That isn't to say using them in a linux kernel in some situations might not be a bad idea, because ultimately the kernel is more about speed than anything else. I find generally it is a substitute for well written logic, and it's a maintenance nightmare.

    You also have to look at the time period in which he said that. I don't think learning BASIC is a burden, just a waste of time, you may as well learn something which has concepts that translate better to other languages.

    I also suspect the reason you understood things with other languages quicker was... you. Because I spent years programming in BASIC on various machines, until I started to learn C/C++ and that was a real culture shock!

    na_th_an wrote: »
    You don't like BASIC, that's great. I don't like Ruby on Rails. But, again, claiming that a language "sucks" shows a very limmited viewpoint. I'm sure that Ruby on Rails is awesome for some application I haven't found yet.

    There are lots of languages I don't like, I dislike C#, Ruby, Perl to name a few. But I don't believe they suck, as much as I hate them. I have no opinion on Python as I haven't used it.

    But I believe BASIC sucks, it's just a bad language to me. I know that it's an option for old 8-bit computers for some jobs, I'm not saying nobody should use it and anyone who uses it is an idiot.

    I'm just saying it sucks, and it teaches bad practises and has bad structure.

    Obviously we have to agree to disagree. And I admit part of my hatred towards it has come from having to maintain VB applications in the past.

    I have many such scars over the years, another big one was developing for 16-bit Windows and dealing with near/far pointers that would wrap around randomly for a laugh.

    ccowley wrote: »
    You really are an idiot. x86 and ARM assembler isn't object orientated, and doesn't have any concept of code templates, yet somebody has managed to write a programs to translate that source code you're talking about into those formats (things called compilers). You think it would be any more complicated to convert it to an arbitrary other language?

    I must be for attempting to argue with statements like that.

    LCD wrote: »
    Please show us your wonderful Speccy works before further discussion to judge your capabilities.

    Please demonstrate that you are qualified to judge such works before further discussion on the matter.
  • edited October 2012
    RobeeeJay wrote: »
    I must be for attempting to argue with statements like that.
    You haven't attempted to argue against it though, have you? You have ignored it, after claiming it's impossible to do a machine translation from one language to another if one language supports object orientation and code templates, and the other doesn't.

    As Guesser said earlier:-
    Nonsense. That shows how little you understand computer science.

    And you either don't have the knowledge, or you don't have the balls, to admit you've been caught out talking gibberish.
  • edited October 2012
    RobeeeJay wrote: »
    Please demonstrate that you are qualified to judge such works before further discussion on the matter.

    You first...
Sign In or Register to comment.