Xojo Alternatives for Cross-Platform Development

Hi Tim, thanks for the tipp, looks promising.

I like to use “Whats your sign” from Patrick Wardle and can see, that the Lazarus-Installer is not signed, nor is it notarized.

best
Thomas

Many people are not signing their Software. You can use it or leave it. You can build by self and sign. There are many ways.

1 Like

If you like Object Pascal and .Net, then PascalABC.Net is a possibility.

Thanks - Object Pascal looks interesting but apparently runs on MacOS only under Mono - which adds a layer of future compatibility uncertainty.

Overall looks like PureBasic is probably the best fit for my overall use case.

1 Like

I have a license to PureBasic myself. I find it’s a great tool for simple console/utility types of applications. If you are planning on having a Windows or Mac desktop app or need a web application - it is not the best tool for that - in my experience.

My preference for desktop or mobile is Delphi but from what @thorstenstueker posts about Java that sounds like a much better toolchain for mutli-platform apps than PureBasic. My 2 cents on the topic.

1 Like

I’ve been messing with PureBasic for about 3-4 years now off and on. PureBasic is a great language and ecosystem and can make some very tight executables. But there are some interesting design choices like the inability to initialize an array like FreeBasic, Pascal or even C:

Dim myArray(3) As integer = { 10, 20, 30, 40 } .

Out of the box, PureBasic can only add one element at a time.

Dim Array.i(3)

Array(0) = 10
Array(1) = 20
Array(2) = 30
Array(3) = 40

But there are some custom code you can create. Because PureBasic uses the dot notation for type annotation such as myNum1.f, the backslash is used instead to access field members of a structure which can be odd for some.

Structure Student
  fname.s
  lname.s
  age.i
  gpa.f
EndStructure

Define.Student student1

student1\fname = "Gary"
student1\lname = "Smith"
student1\age = 25
student1\gpa = 3.5

Which leads to the use of pointer dereferencing which relies on a Structure. The * symbol is not a separate token in PureBasic. So * is always part of the identifier’s name. *ptr is not the same as ptr. So one cannot derefence with the * token. So an alternate syntax had to be developed, the use of a Structure. So the backslash character \i would be considered a 'dereference operator ’ equivalent. In this trivial example (PureBasic has a built-in Swap function):

EnableExplicit

OpenConsole()

Procedure swapByPtr(*x.Integer, *y.Integer) ; pointers are of type Integer structure 
  Protected Temp.i
  Temp = *x\i
  *x\i = *y\i
  *y\i = Temp
EndProcedure

;============= MAIN =============;

Define.i a = 10, b = 3

PrintN("Before swap: ")
PrintN("a = " + a)
PrintN("b = " + b)

swapByPtr(@a, @b). ; address of operator is same as Object Pascal

PrintN("After swap: ")
PrintN("a = " + a)
PrintN("b = " + b)

Repeat: Until Inkey() = #ESC$

If you look up the structures under the Structure Viewer in PureBasic, you will see all the types defined like so:

Structure Integer
    i.i
EndStructure

Structure Float
    f.f
EndStructure

When I asked some of the more experience developers about initializing an array like so:

Dim temp(4) As Double = {97.2, 38.4, 5.8, 118.7, 74.6} // FreeBasic

These two solutions were presented, both of which requires low-level constructs, ! is used to include inline assembly (or C code) in PureBasic. :

Structure pStaticArray
  ar.i[0]
EndStructure

Global *ptr.pStaticArray

!static integer tar[]={1,2,3,4,5,6,7,8,9,10};
!p_ptr = &tar[0];

For a = 0 To 9
  Debug *ptr\ar[a]
Next

;or like this with a dynamic array but you need to copy the memory  
Global Dim foo.i(100)
CopyMemory(*ptr,@foo(0),10*SizeOf(Integer)); 

For a = 0 To 9 
  Debug foo(a) 
Next   

And …

len = (?ddataend-?ddata)/SizeOf(double)
Dim a.d(len)

Restore ddata
For i = 1 To len
  Read.d a.d
  a(i) = a.d
Next

DataSection
  ddata:
    Data.d 2.15,2.5,13.5,15.2,5.16,9,18,25.2,6.7
  ddataend: 
EndDataSection

For i = 1 To len
  Debug a(i)
Next

In PureBasic, the ? symbol is used to get the address of a label in the data section. It effectively acts as a pointer to the location in memory where the data associated with the label is stored. This is particularly useful for calculating the size of data blocks or for directly accessing data stored in the DataSection.

I’m still learning the language myself, but to really use PureBasic to the fullest requires some knowledge of pointers. So, knowing some C and low-level constructs really helps a lot. :sunglasses:

2 Likes

If you’re going to go with PureBasic, I would look into two 3rd party tools for GUI development for PureBasic both of which are reasonably priced.

IceDesign

PureVision
sst1

2 Likes

@chikega Thank you - interesting that PureVision can also export to Spiderbasic which may be convenient

1 Like

Indeed, I have that add-on and it works well :sunglasses:

Unfortunately, neither of them works on Mac.

1 Like

The only one from all platforms for all platforms including web and mobile is java

1 Like

That’s what i love about Java I can run decades old code using an old framework ‘awt’ and it will still compile and run. :nerd_face:

True but you also can change to swing,use flatlaf look and feel and have a new application.

1 Like

I love the FlatAf look in NetBeans … you have to wonder what ‘af’ stands for :laughing:

lol :joy: yep

Typically it means “As Fuck”

Well, I can write 8th code that looks and works identically on most platforms and without downloading and using any external frameworks and libraries not bundled with 8th.

Leak in ecosystem. Not helpful for me.

Leak? I don’t understand what you mean?

There is nearly no ecosystem. That’s what I mean. Writing in 8th is a good hobby. But nobody can sell commercial applications based on 8th. And there is nearly no ecosystem around the language. So using it makes headaches for me.

1 Like