Jump to content

Recommended Posts

Good discussion. I do understand MrFish's feelings. We are talking about the edge of a compromise. I implemented a seamlessly integrated assembler, without an assembly keyword, but then I still had to wrap it with unsafe!!! to guard safety. I didn't like that, either, it's a compromise for the goal of a modern, safe language.

 

If you absolutely hate to have unsafe!!! in your code, it's easy to move it to the compiler command line. But the point of unsafe!!! and overflow (and unbounded!!!) is that you can use them locally, to disable safety checks in very specific pieces of code, while the language keeps guarding the rest of the program. They are the opposite of stopping you to do things: they enable you to do everything you want. As long as the container you chose to work in allows it. You are still guarded by the operating system you chose, by the safeguards in the processor you chose, by the network you chose to connect to, and perhaps by an emulator you are using.

 

Languages and operating systems have been converging, and a modern language is one of the containers you work in. On 8-bit, languages only enable you to do things, they hardly guide and guard you. Most programmers can't handle that freedom and how spartan it is. That's why already on 8-bit, BASIC became the most popular language, and why on modern systems, IDE's are now considered indispensable.

 

If it were only for 8-bit, one would leave out safety without thinking. But I need more. I could target only the five or so currently relevant platforms, as most languages do. Then I would only generate LLVM code and no C, which would simplify things a lot, but then we would have no new Atari language.

 

I have a tendency towards all-encompassing goals, and projects with all-encompassing goals tend to be hard to explain. People tend to want something specific. If you want a restricted goal, then you can consider the goal of this language to be what I need the rest of my life. ?

 

I touched on this in my introduction. After a decade of learning the ropes on Atari, I was forced to move to PC to make a living. I hated it and had to abandon everything I had built up. I want it back, for personal reasons that you will understand. I coped by writing an Atari emulator. Atari fell apart. I was still glad I never moved to ST, or Amiga, or Acorn Archimedes, because all that fell apart, too. PC was uninspiring hardware, but at least it kept developing. Now to find some somewhat inspiring software on it. All the inspiring alternative operating systems for it fell apart, because the companies went bankrupt or decided to abandon them.

 

Then the Internet became important. It was spartan and unguiding and unguarded. How to find some somewhat inspiring software on it? I became a Lotus Notes consultant and developer. It was an all-encompassing networking system, with an integrated programming environment, inspired by the old Plato system that is now on Atari after half a century. It was hard to explain compared to the Internet, because it did everything, and in an integrated way. IBM bought it for billions, and MS tried and failed for decades to duplicate it, until they hired Ray Ozzie, its creator. It was great for all of that, but when I made larger programs on the platform, I ran into walls because it still wasn't generic enough, and I did get carpal tunnel syndrome from system administration. The Internet eventually superceded it. Last week I read that IBM sold it off a few years ago. I haven't been able to access my old databases for some two decades.

 

Then Linux made open source important, offering a way to survive outside companies and dabble with the code. 8-Bit is spartan out of necessity, but Linux is unhelpful and unguiding without need. It was supposed to be a programmer's heaven, but it was so hard that all my time went into system administration and I didn't get to programming. I hated it, but at least it kept developing. I decided to go to the heart of open source and do something about it. I joined the Syllable operating system project and was asked to join the core team. I am now still officially the project leader, but there is no project anymore. It's not dead, because it's open source, but it is in deep sleep. It was measurably orders of magnitude superior to Linux, being a spiritual successor to Amiga OS and BeOS, but it also had lots of deficiencies that held it back. We had plans for fixing them and worked on them, but we ran into walls that were too hard to break down.

 

Meanwhile I was trying to use REBOL. Carl had announced it as the language he needed to write to be able to write a successor to Amiga OS. Everyone expected something like BeOS, but it turned out the new OS was an Internet platform not unlike Lotus Notes. I saw that it fixed the problems with Lotus Notes, so I migrated. I wanted to use REBOL in Syllable, but couldn't, because it was closed source. As I told earlier, this was eventually resolved, but too late.

 

Then Red came, and I joined the project. It promised to solve all REBOL's problems, but we're a decade further now, and it didn't. It solved a few of REBOL's problems, but has many new ones of its own. There are fundamental and practical causes for that. A fundamental issue is that of meta language. REBOL claims to be its own meta language: that it is written in itself. This is true for the higher levels, but the interpreters for all three REBOL versions were written in C. Red improves this by introducing Red/System, a C-level language with REBOL syntax. That was nice at first, but it doesn't solve the platform being torn between the two. Red/System looks like REBOL, but the semantic model is too hard for most programmers.

 

In the first months of my project, I still thought it would be necessary to define both a high-level and a low-level language to eventually write the language more or less in itself, but I didn't like it. I knew that languages such as ML and Scheme can have very good performance and high-level features within one language, so I wanted to try how far I could get. During the project, most seeming contradictions between high-level and low-level dissolved, and I designed solutions for a few remaining problems. unsafe!!!, overflow and unbounded!!! are such solutions. They prevent the much bigger problem of needing two languages.

 

I need to fix all these problems. A fundamental nature of them is that there is not one solution to them. I want to create that myself. There is a demand for this. C is still very popular, eventhough it is ancient and low-level and spartan and ugly and unsafe, because at least it is universal. So what you can expect from this language is attempts to solve all these issues in a higher-level way in one platform, and after three and a half decades, I now have the conviction that I will succeed. It comes down to collapsing all the complexity that keeps accumulating in our industry and in our systems into much simpler forms, and this can only be done with a holistic view.

 

REBOL had similar goals. It is a deep language that is very capable, but a lot of effort went into designing it with a smooth learning curve. It is easy to get started with small examples, but like a foreign human language, it takes a lot of time to really master it. To make things simpler, it needs to be different from other languages, and this turned out to be a stumbling block for existing programmers. You need to be willing to learn something different, and then it will enable you to write more complex programs than you would otherwise have taken on, and to be much more productive. This may not go very far for programs running on 8-bit, but my language is currently a cross-compiler written in REBOL 3, and this has allowed it to stay much simpler than I ever thought possible.

 

REBOL brought many innovations, but the main one is dialecting. The language is designed to be able to write custom languages in it, and that's what I'm using. It is an alternative to structuring programs with object orientation. This is somewhat of the holy grail of computer science. Domain-specific languages (DSL's) are considered to be very useful, but hard to implement, so there aren't that many. REBOL makes them much easier to implement, and once you are used to that, you see that they can be used everywhere.

 

Not sure how this followed from the unsafe!!! discussion. I guess it's chaos theory. :-D

  • Like 6
Link to comment
Share on other sites

15 hours ago, MrFish said:

So, it's inherently childish and/or laughable to question any practice that's been around for X number of years?

Questioning, no, but calling them childish or laughable is uncalled for IMHO, hence the comment. And it's especially relevant the last, say, ten years.

 

But let's get on with the topic of this thread ;)

 

Edited by ivop
Link to comment
Share on other sites

6 hours ago, TGB1718 said:

3. Again as I already said, it's almost meaningless to me. (maybe I'm stuck with the tried and tested languages :) ) 

Yes, switching programming paradigm is intimidating at first, but, for example, some problems are easier to express in a functional language than in a procedural language. Learning a new, totally different language, really improves your thinking about problems. It even benefits your programming in your "old" language :)

Edited by ivop
  • Like 3
Link to comment
Share on other sites

What I liked about Rebol was that Carl Sassenrath supported the Amiga, and I had an Amiga.  I could use an Amiga at home, a PC at work.

Although, ultimately the Amiga version lacked the features of the PC version.  For example, if I recall correctly Rebol/Command had ODBC connectivity.

 

I suppose this isn't all that long ago, somehow this already seems like a nostalgic classic discussion.

 

Sassenrath is well known and loved here, so I don't have to convince anyone he is a highly intelligent and conceptual thinker.  I loved reading his posts about the concept of dialecting and how data, metadata, and code could be merged.  Although Carl talked about dialects and languages almost synonymously, in human languages, they aren't the same concept.   In human languages, dialect differences are minor and easily overcome, but language barriers are major.   If all you have is a dialect difference, you've got virtually nothing to solve.  More difficult challenges lie in language differences.  You might read left to right someone else top to bottom.  You might use latin characters, someone else cyrillic or sanscrit.  I totally loved mixing and matching communication concepts from the real world and programming, but Rebol didn't handle any of the big challenges, didn't try to do that.

 

In many ways it felt like Tcl and accomplished the same things.  So, why do I love it here - cause Tcl is also great, rebol is great.  Getting any of that goodness on the Atari is insane, I love it.

 

  • Like 1
Link to comment
Share on other sites

29 minutes ago, Dmitry said:

In human languages, dialect differences are minor and easily overcome, but language barriers are major.

That reminds me of a story I once heard. You can apparently draw a straight line from the coast of Belgium to Moscow, and on that line, everybody not more than 10km apart can understand eachother. From Stockholm to Rome or Madrid, that doesn't work, because of the Romance language barrier.

 

44 minutes ago, Dmitry said:

You might use latin characters, someone else cyrillic or sanscrit.

I'm really glad that we mostly use Arabic Numerals around the world, and not, say, Roman Numerals. What have they done for us anyway?

 

43 minutes ago, Dmitry said:

In many ways it felt like Tcl and accomplished the same things.

I loved Tcl/Tk back in the day! You could literally build your GUI interactively, like a Logo turtle with widgets :) 

Link to comment
Share on other sites

@ivop

 

 

Quote

That reminds me of a story I once heard. You can apparently draw a straight line from the coast of Belgium to Moscow, and on that line, everybody not more than 10km apart can understand eachother. From Stockholm to Rome or Madrid, that doesn't work, because of the Romance language barrier.

 

It's an interesting idea.    Well my experience is not in the direct line from Belgium to Moscow, so I cannot speak to that.   But as a native english speaker that learned "conversational" Russian, and also lived in Ukraine for a short time - apparently Ukraine would be south of that line, but anyway, it might be similar as I think about it.

 

Basically I never met a Ukrainian that couldn't understand Russian, but Russians for the most part, don't understand Ukrainian.   Still,  people along the border with Russia on the Ukrainian side tend to speak Russian...so if you cross the border from Donetsk into Russia (not recommended, of course, ha), the 10 km rule is not violated.  Similarly a lot of folks from Lviv could understand polish.  

 

 

 

 

Link to comment
Share on other sites

Hello guys

 

It is my impression that most people in the western part of Europe (Nato countries) learned English as a second language (except for the English of course ;-) ) and most people in the east (Warsaw pact) learned Russian.

 

BTW I'm living in the Dutch province of Limburg.  Way back when Eric Gerets was still a professional soccer player and later trainer, you could sometimes hear him speak in dialect.  He's from the Belgian province of Limburg (We share a flag and an anthem) and speaks almost the same dialect as I do.  Moving to the other side, we have Germany.  Just across the border the dialect is almost the same as that of people here.  They even have the same grammatical oddities.  And not to long ago, I heard somebody from Ethiopia who moved to Northern Germany at a young age, speak the dialect from the north of Germany.  I almost understood everything.

 

BTW from here to for instance Hamburg is just over 500 km.  From Germany to Belgium via the narrowest part of my province is only 6 km.  :-)

 

Sincerely

 

Mathy

 

Edited by Mathy
  • Like 1
Link to comment
Share on other sites

Mixed assembly


Like in PL65, assembly instructions can be freely intermixed with the language, as long as they're marked as unsafe. I think this is one of the reasons why I never understood why we can't have it all. :-D

unsafe!!! [
    constant reference volatile byte! [
        ; OS

        RTCLOK3= ~14

        ; ANTIC

        COLPF2=  ~D018
        WSYNC=   ~D40A
        VCOUNT
    ]

    forever [
        LDA VCOUNT
        CLC
        ADC RTCLOK3
        ASL-A
        STA WSYNC
        STA COLPF2
    ]
]


This enables the same philosophy as stated by PL65: you can develop and prototype a program more productively in the high-level language, and when parts turn out to be too slow, you only need to rewrite those parts in assembly, in the same environment, without using a separate assembler. Or you can use it to learn assembly step by step, in a friendlier environment.

  • Like 1
Link to comment
Share on other sites

4 minutes ago, Kaj de Vos said:

Using just BYTE would conflict with using that as a variable name, so I think the ! distinction is a good convention.

Regarding unsafe!!!, I agree that the exclamation marks help. But byte! ? A language always has reserved words that cannot be used as a variable name. But I guess it's just getting used to, similar to using ~ for hexadecimal :)

Link to comment
Share on other sites

Yes, it's another one of those compromises. REBOL wants to be close to English, so using sigils that are not in human language is ugly, but they do serve a purpose. REBOL has many types, and my language even more, so there would be many words that would be overridden by using the same name for a variable. This is annoying in practice, and sensitive to bugs, so there are several places where my language avoids that by extending words.

 

It would also be possible to extend all type names with -type. That would be readable for beginners, but with a little experience one would quickly tire of it. REBOL also wants to be concise, so the shortest words that convey the meaning are preferred. REBOL programmers are used to the ! convention and comfortable with it.

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
On 1/10/2021 at 3:39 PM, Kaj de Vos said:

 I became a Lotus Notes consultant and developer. It was an all-encompassing networking system, with an integrated programming environment, inspired by the old Plato system that is now on Atari after half a century. It was hard to explain compared to the Internet, because it did everything, and in an integrated way. IBM bought it for billions, and MS tried and failed for decades to duplicate it, until they hired Ray Ozzie, its creator. It was great for all of that, but when I made larger programs on the platform, I ran into walls because it still wasn't generic enough, and I did get carpal tunnel syndrome from system administration. The Internet eventually superceded it. Last week I read that IBM sold it off a few years ago. I haven't been able to access my old databases for some two decades.

 

Good luck with your new language. I used Lotus Notes as my main email program for a couple of years. I moved there from Eudora (don't remember the reason), must have been around 1997. IIRC it was available free of charge for private use, maybe to give it more foothold. I always imagined I could program it to use the database functionality as well but never got my head wrapped around that. Except for dBase/Clipper I stopped programming after leaving the 8-bits behind. Part of that was due to less computer time with a girlfriend, part of that due to a lack of tutorial articles in magazines.

  • Like 1
Link to comment
Share on other sites

Cool, and thanks! Notes was my mail program, too, and I ran the server, as well. For programming it, compared to Atari, you had to switch to event-based GUI programming. Like REBOL later, it was a relatively easy development environment because of its built-in functional scripting language. They called that a Rapid Application Development system then. But it wasn't generic enough, so it had too many limitations. Later, they added a BASIC language like Visual Basic for the generic parts of larger applications. That wasn't as concise to write, and now you had to use two languages. The Internet became popular, and Notes database applications needed to be served as web sites. The web wasn't designed for that, and at the time the only way to program it generically was to load a Java plug-in. So Java was added to Notes, and now you had to use three different languages and paradigms...

 

Since then, we've had a decade or two that the web could only really be programmed with JavaScript, forcing almost everyone to learn and use it. JavaScript wasn't designed for anything else, but since everybody had to use it, it was also shoehorned into servers. But since a short few years, other languages can be compiled to WebAssembly, the generic successor to the Java plug-in. I have a proof-of-concept WebAssembly backend to my compiler, so you will be able to use the same language for Atari, web client and PC server.

Link to comment
Share on other sites

  • 1 month later...

Hello, mystery!

 

I have been setting up a download server for the project. Here is Hello World from above:

 

https://language.meta.frl/examples/platforms/Atari/8-bit/HELLO.XEX

 

I am building it up custom. The files are served to you by the language itself.

 

I have a question. This being computers, even Hello World is unreliable. I can run it on DOS 2.5 and on Atari800 with SpartaDOS 2.3. On Atari800 it crashes with MyDOS and SpartaDOS 1.1. (I did choose an elevated start address to support SpartaDOS 1.1.) On Altirra, both SpartaDOS 1.1 and 2.3 produce an error instead of loading it, but no crashes. On Altirra with MyDOS, no crash and no error, but the text doesn't seem to be output, although it's hard to tell with the redrawing of the DOS menu.

 

Does anyone here know what could cause these behaviours?

 

The source and generated code are dead simple:

print/line "Hello, world!"
000000r 1               S0001:

000000r 1  48 65 6C 6C  .byte $48,$65,$6C,$6C,$6F,$2C,$20,$77,$6F,$72,$6C,$64,$21,$00

000004r 1  6F 2C 20 77  

000008r 1  6F 72 6C 64  



000000r 1               

000000r 1  A9 rr        lda     #<(S0001)

000002r 1  A2 rr        ldx     #>(S0001)

000004r 1  4C rr rr      jmp     _puts

However, CC65 generates a lot of boilerplate code around this. It seems most likely to me that the problems are in there.

 

I am disappointed that this out-of-control complexity has found its way into Atari 8-bit. Eventually this will need to be solved with a native Atari backend, but for now, I need to develop the cross-platform C generator.

Link to comment
Share on other sites

where's the 'main' and how does this compare with say the C64? If using the cc65 suite to target that platform then what's different?

 

A simple check with this 'app' placed on and run from MyDOS 4.53/4 works ok.

cl65 -t atari -O -Wl "-D__RESERVED_MEMORY__=8196" --listing test.lst --static-locals test.c -o test.xex

 

e.g. from the listing

000000r 1               .segment    "RODATA"
000000r 1               
000000r 1               L0003:
000000r 1  48 65 6C 6C      .byte    $48,$65,$6C,$6C,$6F,$20,$57,$6F,$72,$6C,$64,$21,$00
000004r 1  6F 20 57 6F  
000008r 1  72 6C 64 21  
00000Dr 1               
00000Dr 1               ; ---------------------------------------------------------------
00000Dr 1               ; void __near__ main (void)
00000Dr 1               ; ---------------------------------------------------------------
00000Dr 1               
00000Dr 1               .segment    "CODE"
000000r 1               
000000r 1               .proc    _main: near
000000r 1               
000000r 1               .segment    "CODE"
000000r 1               
000000r 1  A9 rr            lda     #<(L0003)
000002r 1  A2 rr            ldx     #>(L0003)
000004r 1  4C rr rr         jmp     _puts
000007r 1               
000007r 1               .endproc

So not too far off

test.zip

Edited by Wrathchild
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...