Some? I've only heard of Freepascal, Scheme and Erlang, and that's just names, I have no idea what they are (though I do know lua is inspired by Scheme)rude wrote:Some of them I've never heard of.
Hate: In love with C
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Hate: In love with C
Yes C is awesome (especially C++).
Re: Hate: In love with C
C++, on the hand, I don't like. It's not even remotely as elegant as C or Lua.
Re: Hate: In love with C
Sounded like that was your plan, sorry if I misunderstood. But I would absolutely love to see Ruby. Try Ruby in your browser if you really wanna fiddle with it (this is directed at anyone and everyone, not rude specifically): http://tryruby.hobix.com/rude wrote:Whoa, whoa. I like C. C is awesome.
A lot of Ruby fans here, eh? I've never used it or seen any code. Read a bit about it just now and its semantics seems pretty nice, but its syntax will take some getting used to.
Xcmd: "gut Lua"? Blasphemy!
I've heard of all but Vala and Seed7. I've also heard of Yak, Forth, Pascal, Lisp, Perl, PHP and many others. I've personally sat down and used Pascal, Perl, PHP, Lua, BASIC (many many variations), Java, C, C++, C#, Objective C, Ruby, Python, HyperTalk and many others.rude wrote:Wow. I've never used any of those. Some of them I've never heard of.sauer2 wrote: Vala, Seed7, Objektpascal (Gnu/Freepascal), Oberon, Modula3 ,Scheme, Eiffel ,Erlang
We don't borrow, we don't read, we don't rent, we don't lease, we take the minds!
Re: Hate: In love with C
Let me explain:Wow. I've never used any of those. Some of them I've never heard of.
-Vala is a Gnome project, its aims to bring proper object orientation to GObject. Its syntax should be similar like C# and Java.
The Vala compiler translates its code to C.
-Scheme is the second big lisp dialect.
-Erlang is a (interpreted?) script language used by telecomunication systems.
-Eiffel is try to make a sane OO language.
-Object Pascal... ...is the object orientated, more powerful implementation of Pascal by Delphi and FPC, maybe also by GNU Pascal (not too sure).
-Modula 3 and Oberon are successors of Pascal. They are strong typing languages, syntax is similar to Pascal.
Referring to C:
C might be a good tool for realtime/hardware programming, but while pointers and other strange but efficient methods are good for those things, they suck because of their complexity and unreadability for rapid developement, game scripting and every day's programming.
C++ is imo a bloated oo version of C, but it still doesn't have the improvements from C99. It may take years, until the compilers implement the coming, improved C++ standard.
So it is up to your decision and i don't want to bother you with this neither stop you from programming this, but i think, there are reasons someone shouldn't use C for all tasks.
EDIT: All in all, i guess it would be cool for programmers of the above named languages to find out, that their knowledge has another use. That's the reason for suggesting them.
best regards,
Sauer2
EDIT2: http://seed7.sourceforge.net/faq.htm
Last edited by sauer2 on Mon Jun 01, 2009 11:19 am, edited 1 time in total.
Re: Hate: In love with C
So how's this for a messed up idea... something of a love-hate relationship:
integrate the tcc code into the love ensemble to allow on-the-fly compilation of lua modules written in c.
The point? If you have a part of your project that is time critical (and you have the c skillz) you could use this to put select parts into c in a dynamic and relatively platform independent way.
Of course, almost all the lua modules I've written are just wrapping an external library for png, threading, etc and that kind of use doesn't really fit the love/portability model so I can't see myself actually using this kind of feature/bug.
integrate the tcc code into the love ensemble to allow on-the-fly compilation of lua modules written in c.
Code: Select all
mymodule=love.build('myluamodle.c')
require mymodule
Of course, almost all the lua modules I've written are just wrapping an external library for png, threading, etc and that kind of use doesn't really fit the love/portability model so I can't see myself actually using this kind of feature/bug.
Re: Hate: In love with C
Write a tool that reads each C function you wrote and generate C binding code. =D Basically just need to determine argument and return types ...
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Hate: In love with C
FYI that's exactly what luatcc does.
Re: Hate: In love with C
Hmm, if we can optionally use C in our love projects that'd be great! So I can implement my pushMatrix, popMatrix, transform functions in C instead and it'll be faster!bartbes wrote:FYI that's exactly what luatcc does.
(Or we could just bind those functions too, but thats for another day, the point is, we can re-write bottleneck lua code in C and speed things up. )
Re: Hate: In love with C
Erlang is compiled to byte code and runs on a virtual machine, like lua. There is a native code compiler as well (HiPE) which transparently runs native code. It's a general purpose programming language with quite wonderful concurrency programming properties.sauer2 wrote:-Erlang is a (interpreted?) script language used by telecomunication systems.
Re: Hate: In love with C
I know what you mean. C++ can seem like an inharmonious clusterfuck of paradigms. However, inheritance is critical (in LÖVE), and I would hate to implement that in pure C (I've seen it. It's not pretty).appleide wrote:C++, on the hand, I don't like. It's not even remotely as elegant as C or Lua.
Keep the champagne unpopped for now. We might be able to use some gimped version of C, but we will not be able to access rendering functions (for instance from OpenGL), nor functions in love.graphics, love.audio, etc.appleide wrote:Hmm, if we can optionally use C in our love projects that'd be great!
Here is what I would like to see:
Code: Select all
vb = love.graphics.newVertexBuffer( ... )
code = [[
int updatevb(lua_State * L)
{
lovec_vertex * vb = (lovec_vertex *)lua_tolightuserdata(L, 1);
int size = lua_tointeger(L, 2);
float dt = (float)lua_tonumber(L, 3)
/* Do fast things to vertex buffer */
return 0;
}
]]
love.native.compile(code)
updatevb = love.native.getSymbol("updatevb")
-- In update:
updatevb(vb:cptr(), vb:size(), dt)
-- In draw:
love.graphics.draw(vb, ... )
Who is online
Users browsing this forum: Google [Bot] and 4 guests