Pages: « 1 2 3 4 5 6 7 8 9 10 11 »
  Print  
Author Topic: Anaphase  (Read 23011 times)
Offline (Female) serprex
Reply #75 Posted on: April 05, 2010, 03:53:51 PM
Smooth ER
Developer
Joined: Apr 2008
Posts: 106

View Profile WWW
http://coq.inria.fr/stdlib
Click a few links, you'll see some Coq code. This isn't the language suited for implementing Enigma
Logged
Offline (Male) RetroX
Reply #76 Posted on: April 05, 2010, 04:13:39 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
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?
« Last Edit: April 05, 2010, 04:18:43 PM by RetroX » Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) luiscubal
Reply #77 Posted on: April 05, 2010, 04:28:54 PM
Member
Joined: Jun 2009
Posts: 452

View Profile Email
@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:
Quote
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?
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?
« Last Edit: April 05, 2010, 04:32:51 PM by luiscubal » Logged
Offline (Unknown gender) freezway
Reply #78 Posted on: April 05, 2010, 05:06:34 PM

Member
Joined: Dec 2009
Posts: 220

View Profile
@josh: ur image link is broken
Logged
if you drop a cat with buttered toast strapped to its back, which side lands down?
joshdreamland: our languages are based on the idea that it's going to end up FUBAR
/kick retep998
Offline (Male) Rusky
Reply #79 Posted on: April 05, 2010, 06:25:17 PM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
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/++.
Logged
Offline (Unknown gender) Micah
Reply #80 Posted on: April 05, 2010, 06:34:40 PM

Resident Troll
Joined: May 2008
Posts: 129

View Profile
@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.
« Last Edit: April 05, 2010, 06:41:11 PM by miky » Logged
Offline (Unknown gender) The 11th plague of Egypt
Reply #81 Posted on: April 06, 2010, 06:47:33 AM
Member
Joined: Dec 2009
Posts: 276

View Profile
There is an off-topic section for this kind of discussions.

I wonder if these people code as much as they debate.
Logged
Offline (Male) kkg
Reply #82 Posted on: April 06, 2010, 10:28:16 PM

Member
Location: Australia
Joined: Nov 2009
Posts: 84
MSN Messenger - kamikazigames@gmail.com
View Profile Email
VISUAL BASIC IS THE BEST LANGUAGE LOLOLOLOLLOL


...
Logged
PC: Core i7-2600 @ 3.8ghz | 4x 4gb G.Skill RipjawZ DDR3-2000 | GTX580 | Win7 x64
Time is the greatest teacher, however it kills every single one of its pupils.
Offline (Unknown gender) The 11th plague of Egypt
Reply #83 Posted on: April 07, 2010, 06:39:11 AM
Member
Joined: Dec 2009
Posts: 276

View Profile
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?
Logged
Offline (Male) Josh @ Dreamland
Reply #84 Posted on: April 07, 2010, 07:53:13 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) MrJackSparrow2
Reply #85 Posted on: April 09, 2010, 10:43:13 AM
Member
Joined: Apr 2008
Posts: 35

View Profile Email
Any news from the Devs? Josh, Ism?
Logged
Offline (Male) Josh @ Dreamland
Reply #86 Posted on: April 09, 2010, 01:06:49 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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.

Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Female) IsmAvatar
Reply #87 Posted on: April 09, 2010, 01:48:11 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
JNA is LGPL.

Also, what's so wrong with our code editor anyways?
Logged
Offline (Unknown gender) The 11th plague of Egypt
Reply #88 Posted on: April 09, 2010, 01:58:26 PM
Member
Joined: Dec 2009
Posts: 276

View Profile
You can write a code editor in a day? :o
Logged
Offline (Female) IsmAvatar
Reply #89 Posted on: April 09, 2010, 02:16:10 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
Yes.

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