• Hello everyone,

    We're happy to announce that our forum is back online! We needed to take some time off to discuss and decide on how to handle sensitive topics in our community.

    The team has posted an in-depth comment regarding a recent incident and our stance on politics and sexuality in our forum. We also added a dedicated paragraph about this in the forum guidelines. This is part of our commitment to maintain a welcoming and inclusive environment for all our users. Your understanding and continued support in building a creative and respectful community are highly appreciated.

    Thank you, the CX Dev-Team

News Getting Cerberus X Off the Ground - I'm Now All In to Help It Succeed!

Yes, and you can also do:
Code:
Enumerate
STATE_MENU,
STATE_GETREADY,
STATE_GAME,
STATE_GAMEOVER
That and the "missing" End keyword was something that made the syntax look a bit out of place to me.
 
Enums as a type, like in Pascal, so that you can check the allowed bounds and use it in a case statement:
Here is an example:
Code:
IndexFormat = (
   IDXFMT_16 = GL_UNSIGNED_SHORT,
   IDXFMT_32 = GL_UNSIGNED_INT   );
...
 idxFmt: IndexFormat;
...
 idxFmt := GL_BYTE; <= compilation error!!!
Something similar seems to be implemented in "monkey2"

And function pointers are very necessary.
Now we have to do ugly things:
Code:
Class callback
    method call()
end
...
class SomeClass
   field func: callback
...
   method someFunction(c:callback)...
Brrrr!!!

Also needed: threads (safe within the standard library), a cross-platform UI library, 3D graphics library (is not very necessary), and an advanced code editor.
This is probably all that I need to be happy.

At one time I wanted to transfer mojoX from Monkey2. But Creator of Monkey2 was clearly very passionate about functional programming and lambda expressions and everything else. Therefore, after some time, my brain generated a critical error and the project was abandoned.
 
Last edited:
Whoa! I didn't know about enumerate either, I was adding tons of Consts inside classes :)
 
Thoughts about Cerberus may be a little late.
Many of the concepts built into the language seem incomplete to me: for example, there are generics for classes, but there are no generics for functions.
In general, generics are very sad, I would like to write it like this:
Code:
class T3d <T>
  field x: T
  field y: T
  field z: T
  alias r = x
  alias g = y
  alias b = z

  method New(aX:T,aY:T,aZ:T)
    x = aX
    y = aX
    z = aX
  end
...
end

alias int3d = T3d<int> ' integer vector
alias float3d = T3d<float> ' float vector
alias Trgb = T3d<byte> ' RGB color

vec: int3d = new(1,2,3)
...

What is the difference with extensions - when inheriting classes, the constructor is not inherited and that’s right! But for generics, the alias mechanism would be very convenient. A class alias has all the functions of the class as they are.
As you understand, next I will need functors, operator overloading, etc., I probably need to be more modest. 🙄
f operator overloading is on the roadmap, I encourage not doing it in like C++ (as part of a class). The correct way to implement it as a separate object is:
Code:
Operator<some symbols>(some params)
...
end

Operator<+>( parameter1: int3d, parameter2: Int3d, result: int3d)
...
end
Operator<*>(parameter1: int3d, parameter2: Int3d, result: int3d) 'vector multiplication
...
end
Operator<^>(parameter1: int3d, parameter2: Int3d, result: int) 'dot product
...
end

On the one hand, it would be nice to revise the language, but on the other hand, keep it simple, because you can easily get Monkey2, which I think is extremely unfortunate.

And lastly, in my opinion, case-sensitive syntax for a language rooted in the BASIC tradition is not authentic!!! This is the thing that I personally always trip over.
 
The language is more rooted in Java, according to its creator.
 
Well, if I didn't knew about enumerators, maybe there is something else I don't know - so excuse me from asking this: Is it possible to have something like GSA, but made in Cerberus-X?

What I mostly miss from Javascript, that would be a necessity for a lib like that, is being able to do something like this:

tween(MyObject, { x: 100, y:100, alpha: 0.5, rotation: 45, duration: 5, ease:"elastic" });

Is this possible in Cerberus? To pass a generic object to a function and an arbitrary number of parameters on that object?
 
Regarding the object, yes possible. I would use Object as a type and cast it in the receiving function. About parameters, no. You could pass it as a string and parse that. Usually interpreted languages have this feature, or?
 
I was thinking about making a profit with Cerberus. Although I really like the environment and the language, I'm honestly skeptical about the financial prospects. If this were '13 and not '23, I would be trying to pick up the pieces of the blitzmax community. Personally, I plunged into this world in 2007 and it was a golden time! I don’t know why Mark ruined everything. :(
 
I don’t know why Mark ruined everything.
Think that had something to do with that he wasn't making any money with this own business, had numerous complaints from the users of the software for various reasons and ended up getting a job with a software company, which I would assume would have it in their contract about not doing any kind of work that would conflict with their own business in any form or manor.
 
Perhaps it was so.

But I want to give an example of C++ - absolutely terrible in terms of syntax, not obvious and difficult to develop, and simply not my favorite programming language, to put it mildly.
He has a guardian angel in Bjarne Stroustrup, and that is why he is fantastically successful! Bjarne said: “From the moment the language became public knowledge, it ceased to belong to me.” (I can’t vouch for the accuracy of the quote.) Indeed, C++ does not impose any restrictions on you other than responsibility for your code. It doesn't force a single design like Go, doesn't tie language semantics to syntax like Python, and doesn't treat the programmer like an idiot like Rust. In it, you can incorrectly write a program that works correctly, or correctly write a program that works incorrectly - a hymn to anarchism in the IT environment. Stoustrup never dispersed his community of followers or deleted forums. And he never indicated - now we will throw out these outdated concepts and create a new, good, brilliant language, twice as good as the old one (with some stupid name like “platypus8”).
And, as far as I know, Bjarne is a wealthy man, although he did not sell compilers.
Although in some interviews he complained about his users. However, he also said: if they are unhappy with something, then they know and, most importantly, USE my language. (quote not exact).
 
Last edited:
Will Cerberus work well with Mint? I've got amazing results with Parrot Security OS (KDE / Plasma) but I'd like to try Mint now..

Setting up Cerberus on Parrot Security was a breeze you just install the necessary files it aws a one liner in the prompt and then you unzip the folder from the download section and your done. I had to change one graphics setting adjustment made the it perfectly smooth.

I'm hoping at least one or all of Min'ts flavours will be equally simple.
 
I think I tried the Cinnamon version once and it was as simple as you said. Ubuntu and Mint is mentioned in the setup thread for Linux by @dawlane.
 
I think my Release build machine uses Mint Cinnamon
 
When it comes to Linux desktop environments. You should select which one to use based on the systems hardware and what you intend to to use it for. It's no good trying to use a memory hog desktop environment on a system with less than 8GB and shared video memory and expect it to compile something like the LLVM tool chain without issues.
 
When it comes to Linux desktop environments. You should select which one to use based on the systems hardware and what you intend to to use it for. It's no good trying to use a memory hog desktop environment on a system with less than 8GB and shared video memory and expect it to compile something like the LLVM tool chain without issues.
I have 4GB and and an i5 but I will proablay start with Cinnamon and try them in descending order bc I really love Cinnamon.
 
I have good experience working with mint 21 cinnamon, the only thing I needed was to install the qt libraries.
 
I remembered something else! We need reasonable support for multidimensional arrays!
I once had to initialize a dynamic array of dynamic arrays of objects, it was a syntax pain. That day my sense of beauty died.

Now Cerberus discards functions that are not used in the code, simply does not compile them, and accordingly does not find errors in them. When a new project is written and written sequentially, this is not a problem, but when I tried to port MojoX, I had a large base of ready-made but not working code, I planned to first do a “draft” translation and then write tests. Incorrect library code was simply discarded and I was faced with the fact that I had to cover every little detail, literally every method, with tests. Compilation mode without optimizations is also needed.
 
Last edited:
I remembered something else! We need reasonable support for multidimensional arrays!
I once had to initialize a dynamic array of dynamic arrays of objects, it was a syntax pain. That day my sense of beauty died.

Now Cerberus discards functions that are not used in the code, simply does not compile them, and accordingly does not find errors in them. When a new project is written and written sequentially, this is not a problem, but when I tried to port MojoX, I had a large base of ready-made but not working code, I planned to first do a “draft” translation and then write tests. Incorrect library code was simply discarded and I was faced with the fact that I had to cover every little detail, literally every method, with tests. Compilation mode without optimizations is also needed.
Regarding removal of unused code. Use Reflection during the development. This has helped me big time during the development of my frameworks. This way I was able to detect errors like this. Same goes for using Strict.
 
After your advice. I blew the dust off an abandoned MojoX port.
Hm...This really helped, thanks.
If I have the strength and tenacity to finish this, I will post it here. :)
 
Unfortunately, this does not completely solve the problem.
Let me give you an example:
The View class is the base class for all MojoX widgets
I process the file using regular expressions to save myself the most difficult chore.
Here's the code:
Code:
    Property Offset:Vec2i()
        Return _offset
    Setter( offset:Vec2i )
        If offset=_offset Return
        _offset=offset
    End
It turns into this:
Code:
    Method Offset:Vec2i() Property
        Return _offset
    End
    Method offset:Void(param:Vec2i) Property
        If offset=_offset Return
        _offset = offset
    End
There is an error here, but my regular expressions are already on the verge of my understanding, so I don’t complicate them even more. It should be:
Code:
    Method Offset:Void(offset:Vec2i) Property
Then I added view.cxs to the beginning:
Code:
Strict
#REFLECTION_FILTER="view*"

Import reflection
...
and somewhere I write:
Code:
     local v: View = New View
Generally speaking, it should not compile because the local variable "offset" does not exist in the method and the type Vec2i is not defined. But it compiles. Maybe I need to subtract the list of methods? I haven't tried this yet.

Of course, I understand that the problem is specific, but if I could quickly go through the error locations...

The more I work on this library, the more outrage grows, it is all filled with completely empty service logic, getters, setters... Some non-obvious properties like: "text gravity" What does it mean? All problem-oriented code is concentrated in the Mojo part without X. It has to be pulled up and coordinated with Cerberus Mojo.
At first glance it seemed simple and elegant to me.
Phew, I complained and I felt better. 🥴
 
Last edited:
Back
Top Bottom