Pages: 1 2 3 4 5 6 7 8 9 10 11
Author Topic: Anaphase  (775,973 Views)
Offline (Unknown gender) serprex

Smooth ER
Developer
Joined: Apr 2008
Posts: 106
View profile WWW
Reply #75 Posted on: April 05, 2010, 08:53:51 PM
http://coq.inria.fr/stdlib
Click a few links, you'll see some Coq code. This isn't the language suited for implementing Enigma
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #76 Posted on: April 05, 2010, 09:13:39 PM
I haven't read all of this, but what the hell happened in the last few hours.

C/C++ is a better language.  If you want to make loads of standard libraries in C++ for GC, pointer allocation, etc., that's fine with me.  In fact, I'd love that.

But forcing people to use them in the language is a completely terrible and bad thing to do.

You can't use the argument "IT'S JUST BETTER WITH JAVA" because it's not.  Yes, some Java APIs are better than what C++ has.  It does not mean that Java is a better language.

If the APIs aren't used by everyone, that means that they're obviously not good enough.  How many people use WinAPI?  How many Unix APIs have XLib as a base?
Offline (Unknown gender) luiscubal

Member
Joined: Jun 2009
Posts: 452
View profile
Reply #77 Posted on: April 05, 2010, 09:28:54 PM
@seprex
Coq looks math. It could be considered at most functional programming, while C++(and Java too, by the way) is imperative.
GML is imperative too, making its implementation(or, should I say, translation) easier in C++ than in Coq.
Rusky already said that a modification to the C compiler would possibly work.

@RetroX
Here was I thinking that the flamewar was over. My mistake, sorry.

C/C++ is not a better language. It is different. Which is why you have so much trouble accepting Java and C#.
Pointer allocation is called malloc, calloc or new. It already exists in C++ and is widely used.
There is also GC for C++(see Boehm's, for example). However, they are imperfect. Far worse than GCs for GC-designed languages like Java.
Sure, C++ can have lots of things, but with each layer of abstraction you add, the syntax gets uglier and the language more complex. Java does the opposite. It adds those features and *still* has a simpler syntax. Java assumes everybody wants GC and turns out they were right for a HUGE percentage of all cases.

Now, to put this in a way you understand:
Java is a better language. If you want to make loads of standard libraries in Java for non-GC memory, pointer management, etc., that's fine with me. In fact, I'd love that.
But forcing people to use them(pointers, non-GC memory) in the language is a completely terrible and bad thing to do.

You can't use the argument "IT'S JUST BETTER WITH C++" because it's not. Yes, some C++ APIs are better than what Java has. It does not mean that C++ is a better language.

If the APIs are duplicated every day with no interoperability, that means they're obviously not standard enough.

---
Now that I put this out.
The above example is just to prove RetroX that his arguments can be used against him.
I don't consider Java to be absolutely better than C++ the way RetroX seems to think C++ is absolutely better than Java.
I certainly wouldn't care about a non-GC memory/pointer manipulation Java library(JNI-based, I guess).
C++ APIs are available in quantity, but that means fragmentation. Java includes lots of things in the standard library in a (partially successful) attempt to avoid that problem.
For the record, I don't consider Java to be the best language ever. I consider C# to be the best language, although I dislike GUI C# library inconsistent because it's the same problem C++ has. So the thing I hate most in C# happens to be a "feature" of C++? Neat, huh?

EDIT:
QuoteIf the APIs aren't used by everyone, that means that they're obviously not good enough.  How many people use WinAPI?  How many Unix APIs have XLib as a base?
I actually missed that flaw. C++ APIs aren't used by everyone. The "not good enough" is obviously a C++ problem, not a Java problem(since everybody uses java.lang). So you just attacked your own language.
Exactly what are you trying to prove with the WinAPI/Xlib argument?
Offline (Unknown gender) freezway

Member
Joined: Jan 2010
Posts: 220
View profile
Reply #78 Posted on: April 05, 2010, 10:06:34 PM
@josh: ur image link is broken
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #79 Posted on: April 05, 2010, 11:25:17 PM
Coq is not the only dependently typed language or way to implement dependent typing. As I said, you could add dependent typing to C.

@RetroX: No, C/++ is not a better language. GC and the safer memory design in Java/C# would require language-level changes before working in C/++. Java/C# doesn't require you to use the standard libraries either, any more than you're required to use your OS's API. Personally, I think Java is a worse language overall compared to C/++. What I'm saying is that it has several aspects where it is better, and some of those are impossible in C/++.
Offline (Unknown gender) Micah

Resident Troll
Joined: Jun 2008
Posts: 128
View profile
Reply #80 Posted on: April 05, 2010, 11:34:40 PM
@serprex: Coq is not really what Rusky is talking about. It has dependent typing, but it's more of a theorem prover than a programming language. You could easily put dependent typing in a normal imperative programming language.

@RetroX, luiscubal: Java and C# are loads better than C++ for anything that's not low-level, but they're not nearly high-level enough. Basically, I would never choose them unless there were some library (e.g. XNA) on the frameworks around which they're built that wasn't anywhere else. Given the choice between them and C++, I would choose them every time, unless I needed to do something which actually needed pointers and manual memory management, in which case most of the abstractions with which C++ provides you would be stupid to use.
Offline (Unknown gender) The 11th plague of Egypt

Member
Joined: Dec 2009
Posts: 274
View profile
Reply #81 Posted on: April 06, 2010, 11:47:33 AM
There is an off-topic section for this kind of discussions.

I wonder if these people code as much as they debate.
Offline (Unknown gender) kkg

Member
Joined: Nov 2009
Posts: 84
View profile
Reply #82 Posted on: April 07, 2010, 03:28:16 AM
VISUAL BASIC IS THE BEST LANGUAGE LOLOLOLOLLOL


...
Offline (Unknown gender) The 11th plague of Egypt

Member
Joined: Dec 2009
Posts: 274
View profile
Reply #83 Posted on: April 07, 2010, 11:39:11 AM
A quick question. It just came to my hear that you can deallocate a whole array in GM using the var trick

var A;
A[100]=0

Will it deallocate the whole array in Enigma too?
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #84 Posted on: April 07, 2010, 12:53:13 PM
A[100]=0 isn't anything special.

In GM, a map is used for array indexes, as far as I can discern.
A[100] creates a single new node in the map, and does some rearranging to improve lookup time later.

In ENIGMA, A[100] = 0 will in fact /allocate/ an array of that size for you to use, and will set the 100th element to zero.

I was considering adding a var::drop() or array_free(var& x) to take care of that in ENIGMA.
As far as I know, you can't deallocate an array in GM, except temporaries. Which are automatically freed at the end of the code.
Offline (Unknown gender) MrJackSparrow2

Member
Joined: Apr 2008
Posts: 35
View profile
Reply #85 Posted on: April 09, 2010, 03:43:13 PM
Any news from the Devs? Josh, Ism?
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #86 Posted on: April 09, 2010, 06:06:49 PM
Quite a bit. ENIGMA finally stops segfaulting if it fails to load, as Ism just stops calling it if it returns nonzero. LGM will only show ENIGMA if it succeeds.
Also, it now works from platform to platform, right off the bat, provided only that it can find a version of the GCC. If it can't, Ism will ask for it.
I'm not sure about including JNA with the repository; I've no idea on its license (though I can't imagine it would forbid doing so), and Ism didn't include it...

If you check out the SVN and run a game with ENIGMA, right now, it will write all the files needed for compile, but it won't call GCC as I'm swapping out R3's system for Make. Furthermore, I'm swapping out R3's variable initializer for a less dated equivalent; this one will more accurately detect scoping now that we're mostly C++ compliant. The SVN repo will make you declare your variables until I keep track of used, undeclared ones as well as the declared ones. (This will be fixed first, probably).

Ism doesn't yet keep track of whitespace. She'll be working on that. LGM's code editor sucks. I'll be taking an attempt at coding a better one today, I believe.

Offline (Unknown gender) IsmAvatar

LateralGM Developer
LGM Developer
Joined: Apr 2008
Posts: 877
View profile
Reply #87 Posted on: April 09, 2010, 06:48:11 PM
JNA is LGPL.

Also, what's so wrong with our code editor anyways?
Offline (Unknown gender) The 11th plague of Egypt

Member
Joined: Dec 2009
Posts: 274
View profile
Reply #88 Posted on: April 09, 2010, 06:58:26 PM
You can write a code editor in a day? :o
Offline (Unknown gender) IsmAvatar

LateralGM Developer
LGM Developer
Joined: Apr 2008
Posts: 877
View profile
Reply #89 Posted on: April 09, 2010, 07:16:10 PM
Yes.

{
JTextArea a = new JTextArea();
add(a);
}
Pages: 1 2 3 4 5 6 7 8 9 10 11