red 0.5
ldci22-Dec-2014/23:30:14+1:00
Red est passé en version 0.5 avec le support des objets!
Bonne nouvelle pour cette fin d/année. Le support du GUI est pour bientôt. Bravo Nenad
GreG23-Dec-2014/0:20:57+1:00
Une longue route avant de pouvoir livrer cette 0.5,
Merci et Bravo Nenad!

http://www.red-lang.org/2014/12/050-objects-support.html

ldci26-Dec-2014/15:43:44+1:00
Salut à tous
J'ai profité de Noël pour jouer un peu avec les objets sous Red 0.5. Je voulais voir si les routines qui font appel à du code Red/System peuvent être utilisées comme méthodes dans les objets.
Bonne nouvelle, c'est possible, mais ce n'est pas direct. Je m'explique: on ne peut pas appeler DIRECTEMENT une routine dans le corps de l'objet ,mais on doit faire appel à une fonction qui elle même fait appel à la routine. Je pense que Nenad sera amené à modifier ce type d'appel en deux temps, mais même comme ça c'est génial pour créer de superbes objets qui exposent que quelques méthodes simples en cachant le détail de l'implémentation.
Voici un simple exemple (commenté) qui permet d'intégrer des fonctions opencv dans un objet red.

Red [
	Title:		"OpenCV Camera Test with objects"
	Author:		"F. Jouen"
	Rights:		"Copyright (c) 2014 F. Jouen. All rights reserved."
	License:     	"BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt"
]

; we use some Red/System code to access opencv as external lib

#system [
	#include %../opencv249.reds ; to access opencv 2.4.9 lib
	; the functions we need
	#import [
		highgui cdecl [
			cvCreateCameraCapture: "cvCreateCameraCapture" [
				index           [integer!]
				return:         [byte-ptr!] ;an implicit pointer in Red     
			]
			
			cvCreateFileCapture: "cvCreateFileCapture" [
				filename        [c-string!]
				return:         [byte-ptr!]
	] 
			cvNamedWindow: "cvNamedWindow" [
				name 	[c-string!]
				flags 	[integer!]
			return: [integer!]
			]
		
			cvShowImage:"cvShowImage" [
				name            [c-string!]
				image           [byte-ptr!] ; 
			]
		
			cvWaitKey: "cvWaitKey" [
				delay           [integer!]
				return:         [integer!]
			]
			
			cvQueryFrame: "cvQueryFrame" [
				capture         [byte-ptr!]
				return:         [byte-ptr!]
			]
		]
	]
	
]

; create red routines calling Red/System code

createCam: routine [device [integer!] return: [integer!]] [
  cvNamedWindow "Test Window" 1
  capture: cvCreateCameraCapture device
  either (capture <> null) [return 1][return 0]
]

createMovie: routine [device [integer!] return: [integer!]] [
  cvNamedWindow "Test Window" 1
  capture: cvCreateCameraCapture device
  either (capture <> null) [return 1][return 0]
]


render: routine [return: [integer!]] [
	image: cvQueryFrame capture
	cvShowImage "Test Window" image
	rep: cvWaitKey 40
	rep
]


; now create an object with 2 methods that call red/S routines


videoCapture: object [
   open: func [device] [
	if type? device = integer! [createCam device]
	if type? device = string! [createMovie device]
   ]
   read: does [render]
]


videoCapture/open 0  ; access to default camera
rep: 0
until [
	rep: videoCapture/read ; read images from camera until esc key
rep = escape
]



Cool
DocKimbel30-Dec-2014/11:49:23+1:00
Merci !

L'appel direct de routines dans les objets n'a pas encore été implémenté, çà nécessite également de supporter les routines dans les "appels dynamiques" (http://www.red-lang.org/2014/12/objects-implementation-notes.html). J'espère pouvoir l'intégrer dans une des prochaines versions mineures.
wet_wet_wet30-Dec-2014/14:46:58+1:00
I went to the red site after seeing this 0.5 release, and posted my comments 2 days ago. but it looks like they blocked it. may be related to peter's note.

This is roughly what I posted on http://www.red-lang.org/2014/12/objects-implementation-notes.html#comment-form. Hopefully htis one is not going to be censored as well

It was along hte same lines, though i don't remember the exact wording I used. Are we seeing the signs of some burgeoning dictatorship ?


---- beginning of posting on red site

Great work guys !!! (the red team)
would the shadow objects still work after you remove the dependency on rebol ?

as far as I know, on the roadmap, the goal was to bootstrap with RED in hte future.


Peter,

I don't think it's a good idea to prevent people to post anonymously, they should have the choice to decide what they post as. By analogy , just like people have the choice to use Rebol vs RED or to drink Coke rather than Pepsi.

you cannot force people to pick one thing over another thing. It's up to them to make up their mind.


---- end of posting on red site.
DocKimbel9-Jan-2015/16:32:41+1:00
@wet_wet_wet Sorry if your message got blocked. We recently had to face some people attempting to troll in the comments using anonymous posting, so we had to take measures to avoid wasting our (limited and precious) time. Peter suggested blocking anonymous posts from now on, in order to reduce inappropriate posts as much as possible. We really don't have the time to deal with all the trollers online. All comments are welcome as long as they are on-topic and stated in a civilized manner. I won't allow the Red blog to host any flame war or trolling messages, there's enough space on the vast Internet for that already. We'll move to a new platform for the web site and the blog (in the next weeks/months) so we'll re-examine how to properly handle comments again.

About your question: sure, it will work and even better, because the compiler will be written in Red directly (and we'll be able to use the same binding method), so it will be a perfect match between the source code objects and the shadow objects in memory. Moreover, with the JIT-compiler, we won't need shadow objects anymore, but simply use the real ones, as the compilation process will be done at run-time, with all the live environment available to the compiler.
wet_wet_wet18-Jan-2015/16:43+1:00
ok DocKimbel. thanks for the clarification about the "posting comments". It would be good if your new platform/site will provide an option to register, just like this rebelbb.

I personally don't like cross linking my other ids from other sites.

thanks also for the shadow objects clarification.
ldci15-Mar-2015/23:26:05+1:00
La version 0.51 est disponible avec une nouvelle console!
GreG16-Mar-2015/9:26:12+1:00
Détails de cette release à lire ici:
http://www.red-lang.org/2015/03/051-new-console-and-errors-support.html

Avec:
- New console engine
- Errors support
- SORT action
- New datatypes (typeset + vector)
- Runtime type checking support
- Red/System improvements

Beaucoup de choses pour une version qui parait mineure au vu du 0.5.1 !
ldci20-Mar-2015/9:47:22+1:00
Bonjour à tous
Les libs opencv et GLFW fonctionnent parfaitement bien avec Red 0.51.
A +
ldci5-Apr-2015/19:02:02+2:00
Une nouvelle version 0.52 qui ajoute la gestion des caractères uppercase and lowercase et implémente le type hash!
Red avance à grand pas vers la version 1.0
ldci26-Apr-2015/18:57:54+2:00
Red 0.5.3 has been released bringing faster compilation times and extended support of the vector! datatype.

The full announcement can be read at http://www.red-lang.org
PierreCh8-May-2015/0:03:32+2:00
Bonjour à tous,
Je reprends pied, après pas mal d'absences déconnectées.
Merci pour le suivi et les infos. Ça fourmille du côté de chez Red, à ce que je vois: un grand bravo à Nenad ainsi qu'aux autres contributeurs (peut-être un peu moins célèbres)!
Je vais vite faire un git pull et tenter de voir ce que cela donne.

Au point de vue documentation, où en sont les choses? J'ai jeté un œil, en suivant une bête logique paysanne, du côté de http://www.red-lang.org/p/documentation.html
J'y lis: "...so the Rebol documentation can be used for learning Red until we get our own one..."

Serait-il temps de commencer à la rédiger, cette documentation spécifique à Red? Ne serait-ce que pour mieux accueillir les nouveaux arrivants, qu'ils ne soient pas d'emblée noyés dans des hyperliens divergeant de partout.
à moins que cette RedDoc n'existe quelque part ailleurs; auquel cas, il conviendrait de la référencer sur http://www.red-lang.org/p/documentation.html, à mon très humble avis.

S'il est question de rédiger de la doc, étant donné que je me mets le pied à l'étrier de Red, je pourrais me charger de tâches de rédaction, je sens que ça peut être à ma portée, ainsi que compatible avec mon emploi du temps (chaotique).
Si ma mémoire est bonne, j'avais scribouillé un embryon de guide de démarrage pour le débutant. J'en ai oublié où c'était.

Je vais tâcher de lire la mailing-list de Red: 2755 messages non lus!... Au moins, ici, c'est plus calme!... ;o)

à+
Pierre
JJV8-May-2015/20:29:09+2:00
@PierreCh +1

JJV

Login required to Post.


Powered by RebelBB and REBOL 2.7.8.4.2