Page 2 of 6

Posted: Tue Nov 15, 2005 3:28 am
by dagcrack
WHY IS PEOPLE GETTING SO OFFTOPIC LATELY? IS IT ALL MY FAULT? TELL ME, YOU TELL ME!

Posted: Tue Nov 15, 2005 9:59 am
by Psychophanta
dagcrack wrote:WHY IS PEOPLE GETTING SO OFFTOPIC LATELY? IS IT ALL MY FAULT? TELL ME, YOU TELL ME!
Tssshh... They are deeply bored waiting for 4.0 :P

Posted: Tue Nov 15, 2005 10:10 am
by Num3
I CAN SEE QUADS ....


Image

Posted: Tue Nov 15, 2005 4:13 pm
by thefool
haha:D

Posted: Tue Nov 15, 2005 7:59 pm
by va!n
just modified the variable type list a little bit in the overview ... thanks for this to dr.dri ;) hope its ok for all...!?

Re: Wishlist for PureBasic v4.0 - Overview

Posted: Tue Nov 15, 2005 11:10 pm
by fsw
If you look at my post:
viewtopic.php?t=15479&highlight=freebasic
you will see another small list.

Anyway, to my small list the following should be added:
profiling
unicode strings (and all functions for it...)
with... end with (somewhere I read Fred is working on this)
classes (well not the whole sheebang like in real oop languages, but at least the following):

Code: Select all

; build some classes...
Class MyClass1
   attribute1.l           ;properties should always be private, access only inside the class
   
   Method setAttribute1(value.l)
      *this\attribute1 = value   ; \ for accessing properties, like normal structures
   EndMethod
   
   Method.l getAttribute1()
      MethodReturn *this\attribute1
   EndMethod
EndClass

Class MyClass2 Extends MyClass1
   attribute2.l
   
   Method setAttribute2(value.l)
      *this\attribute2 = value
   EndMethod
   
   Method.l getAttribute2()
      MethodReturn *this\attribute2
   EndMethod
EndClass

; here starts the main code...
NewObject *obj.MyClass2

*obj->setAttribute1(1)  ; -> for accessing methods
*obj->setAttribute2(2)
Debug Str(*obj->getAttribute1()) + " / " + Str(*obj->getAttribute2())
*obj->destruct()  ; actually the destructor could be called automatically when app ends

End 
this would simplify the code, and make it more readdable.

I know there is didelphodon's precompiler and it seems to work great, but it's better if this functionality is inside the compiler.

BTW: IMHO all the other fancy OOP stuff is actually not needed because it overcomplicates things too much. Also no need for "design by contract" etc.

Re: Wishlist for PureBasic v4.0 - Overview

Posted: Wed Nov 16, 2005 12:55 am
by akee

Code: Select all

  var.b    ;  8 bits int
  var.w    ; 16 bits int
  var.l    ; 32 bits int
  var.q    ; 64 bits int
  
  var.ub   ;  8 bits unsigned int
  var.uw   ; 16 bits unsigned int
  var.ul   ; 32 bits unsigned int
  var.uq   ; 64 bits unsigned int
  
  var.f    ; 32 bits float
  var.d    ; 64 bits float 
  var.ld   ; 80 bit float (long double)   <--- for the huge scientific applications ;)
  
  var.s    ; ansi string  / character (maybe var.c !?)
  var.u    ; unicode string / character 
 

Posted: Wed Nov 16, 2005 9:33 am
by Psychophanta
fsw, and Didelphodon,
no needed new words.
NewObject, Method and EndMethod is a surplus commands to do the stuff.
Objects are datatypes indeed. It is matter of the programmer to know and define what is a 'only data' structure and 'data & code' structure.
'Class' is Structure, and 'EndClass' is EndStructure. That's how i would do it at the moment if i was Fred. :)

Code: Select all

; build some classes... 
Structure MyClass1 
   attribute1.l           ;properties should always be private, access only inside the class 
    
   Procedure setAttribute1(value.l) 
      *this\attribute1 = value   ; \ for accessing properties, like normal structures 
   EndProcedure 
    
   Procedure.l getAttribute1() 
      ProcedureReturn *this\attribute1 
   EndProcedure 
EndStructure 

Structure MyClass2 Extends MyClass1 
   attribute2.l 
    
   Procedure setAttribute2(value.l) 
      *this\attribute2 = value 
   EndProcedure 
    
   Procedure.l getAttribute2() 
      ProcedureReturn *this\attribute2 
   EndProcedure 
EndStructure 

; here starts the main code... 
obj.MyClass2

obj\setAttribute1(1)  ; -> for accessing methods 
obj\setAttribute2(2) 
Debug Str(obj\getAttribute1()) + " / " + Str(obj\getAttribute2()) 
End

Posted: Wed Nov 16, 2005 7:45 pm
by va!n
@fsw:
seems to me like in latest blitz on pc...

@Psychophanta:
Let us wait if someone else is replying to the discused ways ;-) Maybe Fred, may tell us something to this? (Fred? :-)

Posted: Wed Nov 16, 2005 7:50 pm
by DarkDragon
Crosscompiling: Compiling Linux executables on Windows(so I just need to run my emulator when I wanna try it out).

Posted: Wed Nov 16, 2005 10:41 pm
by Shannara
DarkDragon wrote:Crosscompiling: Compiling Linux executables on Windows(so I just need to run my emulator when I wanna try it out).
This was already promised to be in version 4.0, via recent interview. Look at the interview thread found @ viewtopic.php?t=17324&highlight=interview and my reply. There is to be crossplatform compiling in 4.0. As stated in the interview, it's already there ... but unfortunately, it's not enabled for us users yet.

Posted: Thu Nov 17, 2005 7:19 am
by nco2k
but guys, please dont talk about a wishlist for v4.0 anymore, its more a wishlist for v4.x

c ya,
nco2k

Posted: Fri Nov 18, 2005 12:36 pm
by Nik
When 4.0 will have most libriaries thread safe one (String doesn't count^^) Would be the coolest to be Thread safe, that is network it would be ideal to be able to listen with one thread per connection maybe something like thsi

Code: Select all

Procedure MyListener(ConnectionId.l)
Protected End.l
Repeat
  Select Dataavailable(ConnectionID.l)
  Case 2
   ;Receive it
  Case 0
   delay(1)
  Case 4
   End.l=1
   ;Kill this Thread
  Endselect
Until End.l=1
Endprocedure


InitNetwork()
Id.l=StartServer(#PB_Any,Port.l)

NetEvent.l=NetworkServerEvent(Id.l) ; We want to be able to use more than one server a time
Select NetEvent.l
Case 0
 Delay(1)
Case 1
 Creathread(MyListener(),NetworkclientID()
EndSelect
Maybe there are better ways to do it but you get the point. It also would
allow the old system but with the ability to Thread like in other languages.

Re: Wishlist for PureBasic v4.0 - Overview

Posted: Mon Nov 21, 2005 8:01 am
by Tranquil
akee wrote:

Code: Select all

  var.b    ;  8 bits int
  var.w    ; 16 bits int
  var.l    ; 32 bits int
  var.q    ; 64 bits int
  
  var.ub   ;  8 bits unsigned int
  var.uw   ; 16 bits unsigned int
  var.ul   ; 32 bits unsigned int
  var.uq   ; 64 bits unsigned int
  
  var.f    ; 32 bits float
  var.d    ; 64 bits float 
  var.ld   ; 80 bit float (long double)   <--- for the huge scientific applications ;)
  
  var.s    ; ansi string  / character (maybe var.c !?)
  var.u    ; unicode string / character 
 
:lol: YES! Thats the way - oho oho - I LIKE IT! oho oho...

Posted: Mon Nov 21, 2005 10:24 pm
by va!n
What do you think about descripted idea for next version (maybe for v4 too!?) Would be very nice...

Code: Select all

OpenScreen(lWidth, lHeight, lDepth, cTitle$, [#Flags])

Possible Flags:
  #PB_DoubleBuffering
  #PB_TribleBuffering
  #PB_AlphaBlending
  #PB_CopyBuffer
  #PB_AntiAliasing
  #PB_AntiAliasing2
  #PB_AntiAliasing3
  #PB_AntiAliasing4
  #PB_Software
A command for using any kind of ColorFilters (R,G,B,A) for any 2D / 3D Sprites...!!! having only one original colored sprite and change its R,G,B,A values and display it in this colors... so you can draw one sprite object in different colors x times at once to the screen!

Code: Select all

SpriteColorFilter(#Sprite,RGBA($00,$00,$FF,$FF))   ; for example... This would be very very helpfull for a lot of cheating stuff...