October 16, 2021, 22:24:14

Author Topic: Best language to settle with  (Read 2347 times)

Offline Kryzon

  • Sr. Member
  • ****
  • Posts: 278
Re: Best language to settle with
« Reply #30 on: September 03, 2021, 19:19:23 »
On desktop platforms, as far as I know, LuaJIT compiles down to machine code (so truly a binary executable, like C).

Edit: hm, but it's not all of the code. Some parts might remain interpreted if they do some specific things that I don't remember.

Offline Pfaber11

  • Hero Member
  • *****
  • Posts: 814
  • Bonjour
Re: Best language to settle with
« Reply #31 on: September 04, 2021, 17:09:59 »
Lua does look pretty good and with jit is quite fast . Had a look at it myself , failed to get the jit part working at the moment .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen.

Offline Kryzon

  • Sr. Member
  • ****
  • Posts: 278
Re: Best language to settle with
« Reply #32 on: September 05, 2021, 05:59:22 »
There's some convenient binaries over at the LuaPower project: https://github.com/luapower/luajit/tree/master/bin 
But if you use a game engine like Love2D, LuaJIT comes embedded in the engine runtime.

Edit: I use the Windows binary from LuaPower as a simple shell, to try on some Lua formulas and one-liners.
« Last Edit: September 05, 2021, 06:01:21 by Kryzon »

Offline Pfaber11

  • Hero Member
  • *****
  • Posts: 814
  • Bonjour
Re: Best language to settle with
« Reply #33 on: September 05, 2021, 12:28:34 »
I ended up going with zerobrane which uses Luajit by default as it's internal engine. I noticed lua works with Raylib as well .
 Lua may end up as my goto language . If and when I get to the same skill level as I'm at with AGK I'll make an evaluation , early days yet but it does look promising . Good day
« Last Edit: September 05, 2021, 12:37:38 by Pfaber11 »
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen.

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 816
Re: Best language to settle with
« Reply #34 on: September 05, 2021, 12:45:30 »
Quote
I ended up going with zerobrane which uses Luajit by default as it's internal engine.

Again, something using LuaJit is just for its own workflow/engine.

ZeroBane (Editor) uses LuaJit for its own plugins/functionality. If you code with ZeroBane for some engine  (raylib, Löve, Defold, Gideros Mobile, etc. ) that doesn't mean that this engine uses LuaJit automatically.

Offline Kryzon

  • Sr. Member
  • ****
  • Posts: 278
Re: Best language to settle with
« Reply #35 on: September 07, 2021, 09:30:32 »
Defold, Gideros Mobile
Wow, didn't know of those ones. Thanks!

Edit: looking at some itch.io games, Defold is so lightweight, damn.
« Last Edit: September 07, 2021, 09:38:20 by Kryzon »

Offline Pfaber11

  • Hero Member
  • *****
  • Posts: 814
  • Bonjour
Re: Best language to settle with
« Reply #36 on: September 09, 2021, 23:55:02 »
I've just spent the last 2 days trying how to get lua to make an exe which I have had a bit of success with . the problem is it will only produce one file at a time which really isn't enough . still at least i have an idea of how it's done now . Tried loads of IDE's and text editors and the only one I like is zerobrane . I did take another look at python too and really can't get on with it . Got to sort the exe thing out though I really felt like ripping my hair out but at least I found something that works although not ideal. As far as it goes it really is pretty good to use . If anybody has a solution to the one file thing please let me know .
 well thats it after spending about 3 days trying to produce a working exe on Lua I'm chucking in the towel. It's back to AGK full time unless I find a language that is procedural and I can work with and is semi professional and is a good allrounder.
The syntax of Lua is very nice but I find the problem of producing a reliable exe a bit of a swine , it's probably easy and I'm just not getting it but I ran across a few posts of people having difficulties in that area too. Anyway it's back to the serious business of writing games.
 Have a nice evening .
 
« Last Edit: September 10, 2021, 22:22:08 by Pfaber11 »
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen.

Offline Kryzon

  • Sr. Member
  • ****
  • Posts: 278
Re: Best language to settle with
« Reply #37 on: September 11, 2021, 07:19:31 »
@Pfaber11 If you don't have a toolkit that handles deployment for you (eg. Defold), then you'll have to do it manually. According to the LuaJIT documentation, you're supposed to:
A) Compile your .lua scripts down to native bytecode/object files.
B) Have a C program that can invoke the Lua interpreter.
B) Link your C program together with the object files from step A.

A few resources on the topic:
- https://williamaadams.wordpress.com/2013/03/13/is-that-cool-or-what-embedding-luajit-bytecode/
- https://stackoverflow.com/questions/19416981/running-luajit-object-file-from-c
- https://github.com/jirutka/luapak

Step A could benefit from some automation, I think that's what the Makefile recipe system is for: set it up once and let it handle building your program automatically. This tool seems to be made for this: https://github.com/jirutka/luapak

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal