C sucks (RANT ALERT)

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

we all know that purebasic will rule the world in 10-15 years ehehe. 8)

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Irene
Enthusiast
Enthusiast
Posts: 461
Joined: Thu Oct 04, 2007 12:41 pm

Post by Irene »

Vin wrote:That sounds pretty cool, Irene, but...

Consider these things when labeling a language a systems development language: Can you create a bootable OS with it alone? Can you use it for Emedded Systems? Does it produce fast, small compact code that require minimal RAM and CPU usage? I'm not saying poorly written C++ can't take up all the RAM and CPU usage available but I am talking about ability. For example, C\C++ would be used for developing embedded systems (like a car computer or a cell phone) where RAM and CPU speed is highly limited. I wouldn't label Fortran as being able to fulfill all those needs. This doesn't mean a language can't be used for directly accessing hardware. PureBasic can do this.
Well the GCFortran project is pretty old but it was possible to write a bootable OS for the Nintendo GameCube with it. I don't think it could be used on embedded systems but that is mainly because my goal was to do something else. The GCFortran compiler compiled fast and small executables. I was even able to make a import game enabler with only 70 lines of code and a executable size of 15Kb making it possible to be incorporated into Mentalcube's Cobra BIOS too for the ViperGC. ^o^
Vin
User
User
Posts: 22
Joined: Thu Oct 04, 2007 8:35 pm
Location: USA

Post by Vin »

Irene, that's pretty geeky for a beautiful Korean girl living in Finland. :shock: 8)
Irene
Enthusiast
Enthusiast
Posts: 461
Joined: Thu Oct 04, 2007 12:41 pm

Post by Irene »

Vin wrote:Irene, that's pretty geeky for a beautiful Korean girl living in Finland. :shock: 8)
I warned you guys! ^o^

Design and perfection is amongst others in top priority but so is my coding hobby ^_^
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

Fortran is often used for maths & scientific operations. I like diversity :)
Irene
Enthusiast
Enthusiast
Posts: 461
Joined: Thu Oct 04, 2007 12:41 pm

Post by Irene »

djes wrote:Fortran is often used for maths & scientific operations. I like diversity :)
Me too ^o^
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Irene wrote:
Trond wrote:
Vin wrote:C and C++ are still the languages of choice for system's applications (inc. OS development) and embedded systems.
I wouldn't call it the language of "choice" because there's really no other choices if you want to do those things... :)
Sure there are. Me and some friends (mostly guys if you're curious ^o^) ported GNU Fortran to the Nintendo GameCube way back in 2002 or so.. It wasn't pretty usable but we did get a fully functional SD card manager done to be used in conjuction with an SD Gecko. O_O

PS: Do I sound too geeky here? I hope not ^_^
Aww, I forgot Fortran. But at the time C became popular Fortran 77 was still the version in use, which uses a fixed column formatting. No wonder why C became popular.
Sebe
Enthusiast
Enthusiast
Posts: 160
Joined: Sun Dec 19, 2004 10:55 pm
Location: Munich
Contact:

Post by Sebe »

C is cool and I like it very much. C++ is crap and imho ObjC is the better OOP approach to C. :?
Still, I mainly do C this days because the only OS you can really code apps and stuff with ObjC is Mac OS X 8)
hardfalcon
User
User
Posts: 89
Joined: Fri Apr 29, 2005 3:03 pm
Location: Luxembourg
Contact:

Post by hardfalcon »

Hmmm, PureBasic is a damn fine language considering that you get very small, fairly optimized and pretty fast executables with only very little source code you have to type (How much code would it take to open write a program with just a simple bloody window and a button gadget in C or C++?).
But when it comes to *really* limited devices (for example our graphical calculator at school, a Texas Instruments Voyage 200, 12Mhz Motorola 68k CPU, only a few hundred kbytes of available RAM), a language like PureBasic simply can't optimize the program enough for you. You reach a point where you got to write code which is more low level but also more optimized bothin matters of speed and size than an automism provided by a compiler could ever do. Thats why the V200 homebrew is developed either in C (and compiled with the V200 port of gcc), or even written in plain 68k assembly.
"And God caused a deep sleep to fall upon Adam, and he slept: and he took one of his ribs, and closed up the flesh instead thereof; And the spare rib, which God had taken from man, made he a woman, and brought her unto the man"
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Well you can't compare Purebasic to C or C++, the part of Purebasic that is comparable is only very small and in this area C/C++/ObjC have many advantages too. Purebasic is more like a framework, consider that technically could also be used by C or C++.
If you want to compare Purebasic to C++ or C you will have to compare it to library and framework systems for exampel you could compare Purebasic with Qt4, or with Gtk/Glib, under Windows the situation is a little bit different ebcause only few people program on bare WinAPI (which itself is pretty old and clumsy).
chen
Enthusiast
Enthusiast
Posts: 338
Joined: Fri Dec 23, 2005 2:20 pm
Location: Quebec, Canada
Contact:

Post by chen »

Irene wrote:Me and some friends (mostly guys if you're curious ^o^) ported GNU Fortran to the Nintendo GameCube way back in 2002 or so.. It wasn't pretty usable but we did get a fully functional SD card manager done to be used in conjuction with an SD Gecko. O_O

PS: Do I sound too geeky here? I hope not ^_^
Then, you were 13 years old!!!.... Awesome!!!... and that age I only
wanted to play soccer with my friends :lol:
Irene
Enthusiast
Enthusiast
Posts: 461
Joined: Thu Oct 04, 2007 12:41 pm

Post by Irene »

chen wrote:
Irene wrote:Me and some friends (mostly guys if you're curious ^o^) ported GNU Fortran to the Nintendo GameCube way back in 2002 or so.. It wasn't pretty usable but we did get a fully functional SD card manager done to be used in conjuction with an SD Gecko. O_O

PS: Do I sound too geeky here? I hope not ^_^
Then, you were 13 years old!!!.... Awesome!!!... and that age I only
wanted to play soccer with my friends :lol:
Hahaha ^o^

The guys where then 15-17 years old, so they're now about 20 years old ^_^
My part in that project was to develop the interface to the manager, the guys did the I/O stuff ^o^
Ollivier
Enthusiast
Enthusiast
Posts: 281
Joined: Mon Jul 23, 2007 8:30 pm
Location: FR

Post by Ollivier »

r_hyde wrote:
Trond wrote:But you don't need Peek/Poke. Just use a variable called *Pointer.LONG. *Pointer is the pointer and *Pointer\l is the value.
Wow, how'd I ever miss that? That'll sure come in handy!
(page 2, excuse me...)
An example of application I posted for tinman, not using peek and poke

Code: Select all

; By Ollivier 
Structure PITCH 
      X.L[1024] 
EndStructure 

Structure BUFFER 
      Y.PITCH[768] 
EndStructure      

InitSprite() 
InitKeyboard() 
InitMouse() 
Dim _Cos(511) 
Dim _Sin(511) 
For i = 0 To 511 
      Angle.F = i * #PI / 256.0 
      _Cos(i) = Cos(Angle) * 200.0 
      _Sin(i) = Sin(Angle) * 200.0      
Next 

Dim *Buff(1) 

OpenScreen(1024, 768, 32, "") 

      StartDrawing(ScreenOutput() ) 
            *Buff(0) = DrawingBuffer() 
      StopDrawing() 
      FlipBuffers() 
      
      StartDrawing(ScreenOutput() ) 
            *Buff(1) = DrawingBuffer() 
      StopDrawing() 
            
      CX = 512 
      CY = 384 
      Repeat 
            Delay(20) 
            ExamineMouse() 
            MDX = MouseDeltaX() 
            MDY = MouseDeltaY() 
            If MDX Or MDY Or 1 
                  CX + MDX 
                  CY + MDY 
                  ClearScreen(0) 
                  StartDrawing(ScreenOutput() ) 
                        FlipBuffer = 1 - FlipBuffer 
                        *Buffer.BUFFER = *Buff(FlipBuffer) 
                        For i = 0 To 255 
                              p = i 
                              p + n 
                              p & 511 
                              For j = 0 To 511 - 7 Step 8 
                                    k = j 
                                    k + m 
                                    X = CX + _Cos(p) 
                                    Y = CY + _Sin(p) 
                                    X + _Cos(k) >> 1                                    
                                    Y + _Sin(k) >> 1 
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
                                    X & 1023 ; Sécurity #1 
                                    If (Y <= 767) And (Y => 0) ; Security #2 
                                          *Buffer\Y[Y]\X[X] = $FFFFFF ; =Plot/Point 
                                    EndIf 
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
                              Next 
                        Next 
                        m + 1 
                        m & 7 
                        n - 1 
                        n & 511 
                  StopDrawing()  
                  FlipBuffers()                
            EndIf 
            ExamineKeyboard() 
      Until KeyboardPushed(#PB_Key_Escape) 
CloseScreen() 
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

C Sucks is the next generation of C ... C, C++, Csucks.
Dare2 cut down to size
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Rapidly followed by 'C stinks' !

:)

Hang on a minute I like C !
I may look like a mule, but I'm not a complete ass.
Post Reply