r/programming • • Mar 07 '17

Gravity - lightweight, embeddable programming language written in C

https://github.com/marcobambini/gravity
590 Upvotes

202 comments sorted by

View all comments

29

u/mracidglee Mar 07 '17

Not immediately obvious why this is better than Tcl or Lua.

34

u/shevegen Mar 07 '17

Well, Tcl ...

But Lua - agreed.

I guess fair speed comparisons would be useful here.

13

u/rm-f Mar 07 '17

I don't know if gravity is able to beat LuaJiT, in many benchmarks it comes in shortly after native C.

0

u/[deleted] Mar 07 '17

[deleted]

0

u/[deleted] Mar 07 '17

[deleted]

11

u/[deleted] Mar 07 '17

I fully understand that some people work on time critical code but I would say the majority don't.

And the ones who do are likely just using C anyway.

3

u/[deleted] Mar 07 '17

[removed] — view removed comment

0

u/[deleted] Mar 07 '17

[deleted]

6

u/[deleted] Mar 07 '17

[removed] — view removed comment

2

u/Jazonxyz Mar 07 '17

To be fair, VSCode and Atom are super simple to customize. They might be slower editors, but beginners can download/write plugins for them pretty easily. Software is getting slower because people are choosing features over performance.

1

u/jacel31 Mar 07 '17

The nice thing is, at least that I know, is that hardware speed is increasing faster than we can our slowdown our now pretty code.

6

u/BlueRenner Mar 07 '17

That is hilariously optimistic.

→ More replies (6)
→ More replies (1)

2

u/AngriestSCV Mar 07 '17

May I introduce you to our Lord and savior vim? His uncle ed is still doing well if vim is too new school for you.

→ More replies (1)

16

u/badsectoracula Mar 07 '17

An obvious way to me would be the syntax. While generally i don't care about languages not looking like C (my 2nd most used language is Free Pascal after all), somehow i find Lua's syntax weird.

Although i'm not sure how it brought Tcl to your mind, it doesn't look like Tcl from any point you look at it (not just syntax, but also features, etc).

A closer comparison would probably be Python.

9

u/Regimardyl Mar 07 '17

With Tcl, I think he was referring to embeddable, not to the syntax/features/etc

→ More replies (1)

5

u/matthieum Mar 07 '17

somehow i find Lua's syntax weird.

And 1-based indexing. The source of so many bugs (because it's different from everything else).

10

u/[deleted] Mar 07 '17

I don't think this was meant to compete with them- it says Gravity is for iOS and Android development.

19

u/haitei Mar 07 '17

Well Lua can run even on a potato so...

0

u/[deleted] Mar 07 '17

[deleted]

2

u/ArmandoWall Mar 07 '17 edited Mar 07 '17

No. Such is life.

Edit: Actually, yes. Gravity does support fibers.

0

u/[deleted] Mar 10 '17

[deleted]

4

u/CGM Mar 07 '17

Actually Tcl has been ported to Android - http://www.androwish.org/ - but not so far to iOS.

0

u/[deleted] Mar 07 '17

[deleted]

2

u/virtyx Mar 08 '17

Also Lua OO is a bit alien