Beef Lang on Pyra


pmprog

DNF (Did Not Finish)
Joined
Apr 25, 2011
Messages
4,150
I became aware of the Beef language the other day. Love the concept of a more C# style language without the runtime overhead.
Hoping to get my teeth stuck in a bit over the lockdown, but would also be interested to know if it's potentially usable on the pyra?


Edit: Well, so far, the windows installer worked on my Win 10 NUC, but it crashed after install on Win7, and building from code didn't seem to give errors, but also didn't seem to give me any executables, only libraries. And building on a Linux laptop has failed twice now...
 
Last edited:
interesting. Nice that it has these pragma's to tweak the binary. Now in the past, when a company had software that was recompiled with the new MSCC, they could release a "newer version" that was "faster"... by basically trusting the new compiler (to let -o3 do it's thing). Manual tweaking looks like better control, but in the end is more tedious to get a faster speed.
You can also shoot yourself in the foot, unlike, say, Rust. But tbh, I always do that, and I put a bandage on my foot. So not a problem.
However, it's not the language, but the libraries that make the language, and you can bind to other things, nice, but meh. You would need another compiler to change the libs, then go back to beef to link to them.
for games, where you would have to create your own interface to those libs. (Beefy2D not ready). Core is minimalistic.
Also, the bindings to the Windows API have been done smaller and tighter, for example AutoIT3 has that nailed size over performance.
Also like the fact that you can have embedded beef sourcecode as a plug-in to your code, that dynamically compiles. Just not sure if you need the whole language compiler to do this when you release, say a game where the interactions can be changed using "Runtime code compilation" (basically, a script you can manually change, then run the game and have it do other things). For what I do understand, it can do what Python does, break the program into a console, and play around with variables and functions, then continue running without having to restart.... but only from their IDE. Which is Windows only.
It has a nice feel: lamda's, private/protected/public object members like Perl6 and Functions where you can state at the function if the returned variable is a reference, mutable or static... neat.
It has multithreading, which separate it from toy languages (with atomicity! Sounds very good).

As for usability, it has a Linux port, and I'm almost sure the IDE does not work on Linux (but the core does), as it is not touted. And the IDE really makes this language, without it... it's just another obscure language. As the external libraries make the 80%, you would have to only use libs that are compilable on all platforms... So a game that uses windows API and ActiveX to draw the screen... does not compile under Linux.


Also I think I found an error in their documentation:


Code:
void TupleSwitch()
{
    let tup = (x: 10, y: 20, str:"Abc");

    switch (tup)
    {
    case (0, 0, let drawStr):
        DrawAtOrigin(drawStr);
    case (var drawX, var drawY, let drawStr):
        /* Since drawX and drawY are 'var' the are mutable, whereas drawStr is immutable */
        drawX += 10;
        drawY += 20;
        Draw(x, y, drawStr); // I think this is Draw(drawX, drawY, drawStr); or maybe Draw(tup.x, tup.y, tup.str); but not this.
    }
}
 
Last edited:
SDL2 is already (partially?) wrapped, but yeah, i know what you mean about the having libraries.

Didn't realise the IDE was Windows only... Not that I could compile these things anyway despite having all the requirements and it's just a single script file to run...
 
Back
Top