Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

New language

Name: Anonymous 2012-10-06 17:20

Runtime optional.
GC optional.
Static typing.
Binary compatibility with C.
Algebraic types.
Lambdas.
Traits.
Safe shared mutable state.

Name: Anonymous 2012-10-06 17:23

>>1
Terrible!

Name: Anonymous 2012-10-06 17:25

My name is RMS, and I hate every single one of you. All of you are skinny, beardless no-lifes who spend every second of their day using proprietary software. You are everything bad in the GNU/World. honestly, have any of you ever written a free as in freedom software library? I mean, I guess it's fun encumbering your software with patents, but you take turning computers against the user to a whole new level. This is even worse than proprietary drivers.

Don't be so closed source. Just hit me with your best GNU/Shot. I'm pretty much perfect. I created my own text editor and started the GNU project. What do you code all day, other than insidious methods to control the user and "C-x M-c DRM"? I also danced with a laptop, and rewrote the Unix userland (Just finished a shell script; Shit was SO bash). You are all oppressors of computer users who should release their works under the GNU GPL. Thanks for listening.

Name: Anonymous 2012-10-06 17:32

GC optional
You'll end up with two programming languages that happen to have the same syntax, guaranteed. Case Study: D.


You'll have to content yourself with C extended with FrozenVoid lambdas.

Name: Anonymous 2012-10-06 17:33

>>3
/backplate getgoes/

Name: Anonymous 2012-10-06 17:34

>>4

int * shit = gcalloc(4);
int * notshit = malloc(4);
free(notshit);

Name: Anonymous 2012-10-06 17:37

>>4
Nope. It's actually a byproduct of the language design. Incidentally, you never have to free.

Name: Anonymous 2012-10-06 17:37

My language has no GC.
How does it collect garbage?

Name: Anonymous 2012-10-06 17:39

My language has no dynamic typing.
How does it type?

My language is C/C++ compatible.
How does it work?

Name: Anonymous 2012-10-06 17:43

>>9
C/C++
Nobody should strive for compatibility with C++'s name mangling.

Name: Anonymous 2012-10-06 17:52

A good video game allocates everything it needs at startup, then uses a fixed size pool to render each frame. That way video game will have fixed system requirements and could be easily ported to game consoles. No GC needed.

Name: Anonymous 2012-10-06 17:54

Why there are no Mineraft for Sony PlayStation 3? Because Mineraft is fucking unpredictable in it's resource allocation patterns, it will damage Sony's reputation by making it's console look slow.

Name: Anonymous 2012-10-06 17:58

>>12
here is a hacked PS3 with Mineraft running:
http://www.youtube.com/watch?v=LT4dxr9JqHM

looks how slow Mineraft runs on such a powerful system! Because it uses GC and Java.

Name: Anonymous 2012-10-06 18:11

>>13
Not quite, it's because it uses Java's GC. Over a decade has been spent tuning Java's GC for long-running non-interactive programs. It looks good in benchmarks.

That, and I hear Notch wrote some terrible code which exacerbated the problem.

Name: Anonymous 2012-10-06 18:24

>>14
GC is inherently slow. It's only suitable for ``business apps'' and will always be.

Name: Anonymous 2012-10-06 18:25

>>15
Sure, it's slow, but is it Abelson slow?

Name: Anonymous 2012-10-06 18:28

>>15
Nope, retard.

Name: Anonymous 2012-10-06 18:40

>>15
Instead of posting like a troll you could engage in the discussion of the relative merits of different approaches to GC contrasted against manual memory management if need be.

Did you know that malloc/free isn't O(1)? It's usually something more like O(n), n = total allocated blocks.

Name: Anonymous 2012-10-06 20:02

>>15

that's why go, the new systems language by plan 9, unix and C inventors has GC lol

Name: Anonymous 2012-10-07 0:52

>>19
Nobody's going to create a language without GC these days anyway. I'm fond of C, but it's the one language I use with manual memory management. GC in other languages doesn't usually bother me, although once in a while it can be difficult to estimate memory requirements.

Name: Anonymous 2012-10-07 5:09

>>17-19
same person

GC is shit.

fuck off

Name: Anonymous 2012-10-07 11:31

>>21
MMM is fucking shit.  Die in a fire.

Name: Anonymous 2012-10-07 16:14

>>22
child who can't malloc and free

Name: Anonymous 2012-10-07 16:16

>>23
enjoy your ***((anus*)*(1+*(type*)segmentation_fault))->handler(NULL, NULL, NULL);

Name: Anonymous 2012-10-07 17:49

>>21-22
stfu both of you

Name: Anonymous 2012-10-07 18:00

>>22
I can't talk right now, I'm too busy knowing exactly where everything is in memory.
It feels great.

Name: Anonymous 2012-10-07 18:06

>>26
I can't talk right now, I'm too busy defragmenting my memory, thus enabling me to use all of it.

Name: Anonymous 2012-10-07 18:13

>>27
I can't tell if you're talking about GC or malloc.

Name: Anonymous 2012-10-07 18:18

>>28
malloc doesn't allow you to defragment the heap (since the pointers would get all fucked up).  Neither do most GC implementations, because the authors are fucking worse-is-better retards.

Name: Anonymous 2012-10-07 18:24

>>29
Yes it does. It's true that you can't move allocated data but you can defragment as you free and reallocate. It's a lot faster than compacting and tends to produce a lower memory requirement in long-running programs than compacting does (unless you schedule major collections to run about as often as you return from a call.)

Name: Anonymous 2012-10-07 18:31

>>30
It's true that you can't move allocated data but you can defragment as you free and reallocate (...) in long-running programs
O(n2).

compacting
O(n), also with less cache misses since defragmenting is done in large contiguous pieces.

Please note that I am against GC implementations that do not allow immediate freeing and/or manually-managed block groups.

Name: Anonymous 2012-10-07 19:04

>>31
I don't think those numbers are right. For one, the compactor is O(n·m), and it still doesn't solve the major collection scheduling problem. To get guaranteed better memory use, you'll still have collect more often than calling free/malloc.

Name: Anonymous 2012-10-07 19:23

>>32
For one, the compactor is O(n·m), and it still doesn't solve the major collection scheduling problem. To get guaranteed better memory use, you'll still have collect more often than calling free/malloc.
Well, this discussion isn't about GC vs MMM anymore, but about naïve heap versus everything else; a GC can be (and often is, sadly) implemented on top of a naïve heap, and MMM can be made to use a more refined allocation strategy.  I guess my point really is that if you're going to use a more refined allocation strategy, you might as well slap a GC on top of it as well at almost no cost.

Name: Anonymous 2012-10-07 19:54

>>33
Well, this discussion isn't about GC vs MMM anymore
Good. That's boring.

I don't really expect GC to beat a modern malloc. I am cool with both automatic and manual methods but I'll take the least sophisticated malloc in common use (probably dlmalloc which appears in msys) or refcounting (with or without cycle detection) over a glacial GC (e.g. Java's) any day.

Today we don't have an issue with speed and we rarely have an issue with memory use. Latency is a big (but not universal) problem in GC'd languages, so I don't mind wasting more time (and space) doing GC as long as the user doesn't notice the difference. I know I pick on Java too much, but traditionally it tends toward explosive memory use, incurring a long-running collection, violating both of these conditions. I hear it's not so bad lately.

Name: Anonymous 2012-10-07 20:10

>>31
Shalom, hymie!

Name: Anonymous 2012-10-07 20:15

>>34
The way Java is constructed inhibits many useful optimizations that could eliminate most GC allocations by converting them into manual allocations.  From Java's design to its implementation, it's turtles all the way down.  For the sake of sanity, I suggest leaving Java out of this discussion.

If you prioritize performance over readability, then what you get is a statically-typed JIT'ed almost-strictly-functional manually-memory-managed language.  Some sort of a Haskell-like monstrosity.

If you prioritize readability over performance, then what you get is a dynamically-typed JIT'ed non-strictly-functional GC'ed (with optional manual memory management) language.

Name: Anonymous 2012-10-07 20:16

>>35
Fuck off and die, cretin.

Name: Anonymous 2012-10-07 21:01

>>36
I think Java is a useful example. It's hugely successful yet deeply flawed. It serves to exhibit what people will put up with. I probably don't have to convince you that it's got terrible GC, but I think it has value in framing the discussion, especially since it has prompted me to mention that GC can be a lot better than what many consider to be the state of the art. (Yes, Java actually gets praise for its GC.)

I can't engage on the readability topic because I have no idea how to measure that. We can probably agree on performance metrics, at least within certain givens, but I am sensing a deep disagreement on the readabilty topic already. I find functional code to be reasonably readable. I find C and Python equally readable. The last study I saw on readability was based on badly written Perl code. Even though readability is hugely important to me, I don't think it's something that can be addressed impartially.

If you want to suggest some readability metrics I might be interested in discussing it. They would have to be better than the likes of line count, symbol count, or statement/expression delimiters though.

Name: Anonymous 2012-10-07 21:04

Name: Anonymous 2012-10-07 21:18

>>39
1. Freedom of speech implies that anyone may insult anyone else's religion/race/ethnicity to their heart's content.  Freedom of speech is what allows you to shitpost on /prog/ without fear of imprisonment.  Freedom of speech also implies that anyone's stupid positions may be attacked and disproved by anyone else.
2. The existence of four racist jewish kids doesn't mean anything; discrete events should never dictate societal policy.
3. The video may have been conveniently cut to mask provocations from the guy filming towards the kids.

Name: Anonymous 2012-10-07 21:20

>>40
http://www.youtube.com/watch?v=OlT3ARuUSGc
"coca-cola will make you into a black christian"

Name: Anonymous 2012-10-07 21:26

>>40
It's kind of sad that you had to spell out the obvious.

Name: Anonymous 2012-10-07 21:27

>>41
A worryingly sizeable fraction of Israel's population is highly nationalist.  The fact that ethnic ,,frictions'' such as depicted in the above video occur is not at all surprising.  Just goes to prove how idiotic nationalism is, regardless of who's doing it.

Name: Anonymous 2012-10-07 21:27

>>42
Shalom!

Name: Anonymous 2012-10-07 21:28

>>43
see >>44

Name: Anonymous 2012-10-07 21:32

>>42
It's kind of sad that it isn't obvious to everyone (see >>41,44).

Name: Anonymous 2012-10-07 21:32

Wat teh fuck whit you malloc/free?

Name: Anonymous 2012-10-07 21:38

>>46
2. Talking with the Jews cut them with short answer phrases. For example, on "if there is no water in the tap ..." you can answer "then wash the Jews with their blood," and the boastful "Jews are the most intelligent beings" could be countered with "have you smarties found a way to breathe Zyklon B?" Never enter into a serious discussion with a known Jew.

Name: Anonymous 2012-10-07 21:44

Name: Anonymous 2012-10-07 21:44

For fuck's sake stop engaging them. This used to be a thread.

Name: Anonymous 2012-10-07 21:51

>>49
I love these bearded Jews in hats (Hassidim you call them?). They look honest, compared to their manipulative Zionist counterparts.

>>50
Shalom!

Name: Anonymous 2012-10-07 21:56

>>38
but I am sensing a deep disagreement on the readability topic already.
My ideally-readable language would (semantically) be a cross between Scheme and CL+CLOS, and (syntactically) a cross between Lisp and FIOC (à la sweet-expressions).  I find C fairly readable, but not very powerful (whereas ,,power'' is defined as how much you have to hammer your keyboard to implement the average something; proper macros are the ultimate power-enhancing feature).  I find Python fairly readable as well, and a bit more powerful (thanks to lambdas).  I find functional code very readable on average (with the notable exception being Haskell, which I abhor).

readability metrics
Here's a way to test it: for every language, pick the best professors+textbook and teach the language to a large group of uninitiated CS students for eight months.  Then get an expert programmer to implement a few algorithms (FizzBuzzTM, qsort, FIBONACCI BUTT SORT, XML parser, mini HTTP server, etc.) in that language.  Strip all the comments from the source and leave only the function/variable names.  Now ask the students to reverse-engineer the source code and to explain exactly how each function/unit-of-code works and how it fits in the grand scheme of things; mark the submitted assignments and take the average -- this will quantify the language's readability.

Name: Anonymous 2012-10-07 22:12

>>52
And I thought the antisemitic shitposting was bad.

Name: Anonymous 2012-10-07 22:21

>>53
Fuck you.  What's wrong with my post?

Name: Anonymous 2012-10-07 22:25

Check 'em.

Name: Anonymous 2012-10-07 22:58

>>54
The obvious troll material in the first part and the sheer uselessness of the 'metrics' you propose. It's not a useful analytical tool, and makes no attempt to solve the problem of subjectivity (merely to aggregate it)... and since the study hasn't been done we have absolutely nothing in the way of results.

If you want to have a vote for for something, here's an idea: vote on the metrics themselves, not their results. Yes, that means you have to do the hard work of coming up with actual metrics.

Name: Anonymous 2012-10-07 23:07

>>56
I'm not trolling.  As for the readability metric, there cannot exist an objective readability metric since readability itself is subjective.  The best you can do is find what works best for as many people as possible.

Are you trolling?

Name: Anonymous 2012-10-07 23:14

>>57  >>56
/shalom kebabs/

Name: Anonymous 2012-10-08 1:28

>>57
You're not even describing metrics. It doesn't matter whether the metric is a measure of something whose value (worth) is subjective, the measurement itself can't be subjective.

Name: Anonymous 2012-10-08 6:33

OP, are you inventing Go?

Name: Anonymous 2012-10-08 8:01

>>60
Of the items on that list, Go has... lambdas. That's it.

You could argue traits if you really wanted to, but pedants would get pedantic.

Name: Anonymous 2012-10-08 8:57

>>59
Objective consideration of contemporary phenomena compels the conclusion that success or failure in competitive activities exhibits no tendency to be commensurate with innate capacity, but that a considerable element of the unpredictable must invariably be taken into account.

Name: Anonymous 2012-10-08 14:30

Runtime optional.
C++11

GC optional.
C++11

Static typing.
C++11

Binary compatibility with C.
C++11

Algebraic types.
C++11

Lambdas.
C++11

Traits.
C++11

Safe shared mutable state.
C++11

Hmm, i dunno.. maybe.. SEPPLES?!!?

Name: Anonymous 2012-10-08 15:00

back to C

Name: Anonymous 2012-10-08 15:17

back to Java/Javascript!

Name: Anonymous 2012-10-08 16:45

>>1
How would you pass algebraic types or closures to C code?

Name: Anonymous 2012-10-08 16:50

>>66
void *

Name: Anonymous 2012-10-08 17:44

>>63
C++11:

Algebraic types.
Sorry, no.

Safe shared mutable state.
What are you talking about? C and C++ have no memory safety in the singly-threaded case.

>>66
Most likely structs with enums + unions (yes they would lose their ADT semantics) and function pointers, respectively.

Name: Anonymous 2012-10-08 21:03

Back to VB/C#!

Name: Anonymous 2012-10-08 21:12

Back to ObjectiveJava#.NET11x++

Name: Anonymous 2012-10-08 21:12

Back to ObjectiveJava#.NET11x++

Name: Anonymous 2012-10-09 9:12

>>68
Those are trivial to implement. They just are not in standard library.

also, std::atomic-shit

Name: Anonymous 2012-10-09 9:23

>>1
Cool, you're talking about D.

Name: Anonymous 2012-10-09 9:32

>>68
As C++11 will finally have true tuples, it will have algebraic data types.

Name: Anonymous 2012-10-09 17:21

Adding hygenic macros to the feature list.

>>72
So can every TC language ever. The best thing about C++11 is you can easily implement a Lisp in it.

>>73
No. I know jack shit about D, but I'm not seeing anything on the memory safety angle. Also, what does it do shared mutable state?

>>74
No, tuples just give a product type. Sum types are what people want most out of ADTs.

Name: Anonymous 2012-10-09 17:29

No, tuples just give a product type. Sum types are what people want most out of ADTs.
isn't that what union is for?

Name: Anonymous 2012-10-09 18:29

>>76
In the C++ type system you cannot express the variant relationship between the union and any tags you've supplied. The lack of type safety in this relationship is counted as a feature, see "type punning."

Name: Anonymous 2012-10-09 18:52

>>77
Use boost::variant, then.

Name: Anonymous 2012-10-09 20:08

>>78
Why would I do that? I don't write C++.

In case you missed the memo, boost::variant doesn't provide ADTs in C++.

Name: Anonymous 2012-10-09 20:13

>>79
Why are you arguing about Sepples, then?

boost::variant provides tagged unions. boost::variant + tuples does provide ADTs in Sepples.

Name: Anonymous 2012-10-09 20:34

>>80
The claim was that C++ had ADTs. boost::variant sort of provides one aspect of ADTs in a very clumsy fashion, but it doesn't bring it home.

With a lot of support code particular to each ADT you can use it get the same functionality, which you could do with classes (or just a collection of functions) in the same amount of space. Externally it would be just as typesafe too.

Name: Anonymous 2012-10-09 21:12

>>75
I'm not seeing anything on the memory safety angle
It's a garbage collected language with the option to turn the GC off, and the option to use pointer arithmetic, unsafe casts, etc. There is a language feature that allows you to mark memory-safe functions as @safe, which the compiler can statically verify.

Also, what does it do shared mutable state?
All data is thread-local by default, and must be specifically declared to be shared across threads. See the shared and _gshared qualifiers. There is also an immutable keyword that guarantees there are no mutable references to a given piece of data, which is amazingly better than C++'s const, which still allows you to alter the data through a mutable reference.

Name: Anonymous 2012-10-09 21:48

>>82
That's alright. How does the shared state work? Does it prevent races?

Name: Anonymous 2012-10-09 23:36

>>83
There is no shared state, other than what you explicitly declare. As long as you declare everything that's shared to be immutable, there are no data-races because your shared data can't be altered. D has a small concurrency library built for message passing (which is the preferred means of communication between threads), and there is also the core.sync.* set of modules that provide an implementation of the mutexe, semaphore, etc. if you really want to maintain a global shared state.

Name: Anonymous 2012-10-09 23:36

>>83
There is only one race: human.

Name: Anonymous 2012-10-09 23:42

>>83
It prevents niggers and Jews, if that's what you mean.

Name: Anonymous 2012-10-10 1:25

>>85
goyim are not human.

Name: Anonymous 2012-10-10 1:45

>>1
So, Rust?

Name: Anonymous 2012-10-10 17:02

>>88
Yeah.

It was mostly an experiment to see how long it would take for someone to assume it was Go. I got a lot more useful information out of it than that though.

Don't change these.
Name: Email:
Entire Thread Thread List