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

Pages: 1-

Language Hype

Name: Anonymous 2010-12-15 17:51

It's an unknown fact that most GNU utils written in C never free up the memory they allocate, which usually results in memory leaks.

You may wonder, why? It's because C lacks RAII.

Same goes for D; although D does have RAII, its Garbage Collector creates memory leaks by allocating and never freeing ridicolously large memory chunks.

This code allocates 41,688 bytes, and never frees it:

import tango.io.Stdout;

void main(char[][] args)
{
    Stdout("Hello World!").newline();
}


Imagine the memory chunk allocated by the GC for a ``bigger'' application.

Yet D & C folks claim to be better than C++...

Name: Anonymous 2010-12-15 17:55

An unknown fact, is it? Well how do you know it then, mister smartypants?

Name: LISPPER !Dee.heHMhc 2010-12-15 17:57

>>1
tango
Please, use D2.
You may wonder, why?
Because GNU utils is made of crap.
because C lacks RAII.
It's so hard to put an object_destroy(); at the end of the scope.
Yet D & C folks claim to be better than C++...
Because they are.


Also, LISP.

Name: Anonymous 2010-12-15 18:01

This code allocates [seemingly absurd chunk of memory]
I wonder why...
import
Oh right.

Imagine the memory chunk allocated by the GC for a ``bigger'' application.
Why the faggot qu--oh I see, ``bigger'', eh? ;) As in, no more than about 40KB bigger? I forget how GC works.

Name: Anonymous 2010-12-15 18:04

It's all better than Java...what kind of faggot codes a game in Java? RUNS LIKE SHIT

Name: Anonymous 2010-12-15 18:07

>>2
Valgrind.

>>3
It's so hard to put an object_destroy(); at the end of the scope.
You obviously don't understand RAII.

>>4
Why the faggot qu--oh I see, ``bigger'', eh? ;) As in, no more than about 40KB bigger? I forget how GC works.
Because there is no such thing as 'big, noteworthy D application'... well, except the DMD compiler itself. Yes, D is a sad clownlanguage like that.

Name: Anonymous 2010-12-15 20:20

RAII
(define malloc
  ; get malloc through ffi
  (lambda (size)
    (display "malloc'ed ")
    (display size)
    (display " bytes")
    (newline)
    (lambda ()
      size)))

(define free
  ; get free through ffi
  (lambda (ptr)
    (display "freed ")
    (display (ptr))
    (display " bytes")
    (newline)))
   

(define-syntax with-malloc
  (syntax-rules ()
    ((with-malloc ((ptr args ...) ...) b ...)
     (let ((ptr (malloc args ...)) ...)
       b ...
       (begin
         (free ptr) ...)))))


> (with-malloc ((p 256)
              (t 64)
              (r 65536))
   ; play with the pointers
   (+ (p) (t) (r)))
malloc'ed 256 bytes
malloc'ed 64 bytes
malloc'ed 65536 bytes
freed 256 bytes
freed 64 bytes
freed 65536 bytes
>


LOL WATCH ME I'M SO SEPPLES

Name: Anonymous 2010-12-15 20:50

What's with all this "[u]because[/i] C lacks RAII" business?

I think >>1 is even more confused than >>3 is.

Name: Anonymous 2010-12-15 22:12

>>8
I sense a lack of [i][u][o]BBCODE M[sup]A[sup]STERY[/o][/u][/i]

Name: Anonymous 2010-12-15 22:13

>>9
ah fuck.

Name: Anonymous 2010-12-15 22:16

Object Oriented is a Sexual Preference

Name: Anonymous 2010-12-15 22:55

>>11
PREFER MY ANUS! but be gentle, please.

Name: Anonymous 2010-12-16 1:40

>>10
Irony!

Name: Anonymous 2010-12-16 6:11

>>9-10
laughingirls.jpg

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