r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Red] Red language group

Dockimbel
6-Sep-2011
[3147]
Let me know what you think about this solution.
Kaj
6-Sep-2011
[3148x3]
Great, I'll try it
What I'm a bit worried about, though, is binary compatibility. How 
are the values of type IDs determined?
I suppose they shift when the program uses different aliases. That's 
no problem for monolithic programs, but it would be when you try 
to define an interface to a library or other subsystem
Dockimbel
6-Sep-2011
[3151]
They are source-specific, they represent the order of each alias 
definition encountered by the compiler.
Kaj
6-Sep-2011
[3152]
Yes, so they're not suitable for standard interfaces
Dockimbel
6-Sep-2011
[3153x2]
Anyway, whatever value is attributed it should be transparent to 
users.
As long you as you use system/alias/ path accessors.
Kaj
6-Sep-2011
[3155]
That's source compatibility, not binary compatibility
Dockimbel
6-Sep-2011
[3156x2]
The value are calculated at compilation-time.
values
Kaj
6-Sep-2011
[3158]
If I ask GTK to determine an object's type, it takes care that it 
works across versions of the GTK library. You can't use these aliases 
to build such a library
Dockimbel
6-Sep-2011
[3159]
You can't build libraries yet in Red/System anyway.
Kaj
6-Sep-2011
[3160]
Sure, but we will in the future. In other words, we need some sort 
of ReBin standard
Dockimbel
6-Sep-2011
[3161]
We'll deal with that when library generation will be possible. Until 
that, the current solution should be enough.
Kaj
6-Sep-2011
[3162]
OK
SFarber
6-Sep-2011
[3163]
If Carl should decide not to continue developing rebol is there anyone 
else who could take it over?
Henrik
6-Sep-2011
[3164]
Sure, but I doubt that would happen, since Carl is not likely to 
hand his baby over to someone else.
SFarber
6-Sep-2011
[3165]
SO why the mysterious behavior?
Henrik
6-Sep-2011
[3166x2]
Carl is very busy with another project.
(let's move to REBOL3 group)
SFarber
6-Sep-2011
[3168x2]
I'm trying to make a decision about which language to learn for my 
own use.
OK see you on REBOL3
Kaj
6-Sep-2011
[3170x2]
Help! The current Red is incapable of compiling anything:
Compiling /resources/Red/tests/empty.reds ...

*** Compiler Internal Error: Script Error : Cannot use path on none! 
value 
*** Where: build-debug-lines 
*** Near:  [records: job/debug-info/lines/records 
files: job/debug-info/lines/files 
rec-size:
]
Dockimbel
6-Sep-2011
[3172x3]
Strange...I ran the whole tests suite, as usual, without any issue 
before committing.
Simple scripts are compiling OK for Linux too.
Testing from Linux, the tests are not passing.
Andreas
6-Sep-2011
[3175x2]
hmm, nope. seems there's a bug in my debug fix
Fix pushed. Sorry for the mess.
Kaj
6-Sep-2011
[3177]
No problem, thanks
Dockimbel
6-Sep-2011
[3178]
Thanks Andreas.
Kaj
7-Sep-2011
[3179]
Can't test the new struct detection due to a new bug
Dockimbel
7-Sep-2011
[3180x2]
It will be very hard to fix if there's no way for me to reproduce 
the issue.
The code part where the compiler script breaks is not related to 
function return values, but only to function arguments code generation.
Kaj
7-Sep-2011
[3182]
It's a Heisenbug, so I'll check in the broken code
Dockimbel
7-Sep-2011
[3183x2]
I have posted debugging instructions in the ticket comments.
It might be caused by a uncaught wrong definition in your imports, 
that is messing up the imported function arguments parsing code.
Kaj
7-Sep-2011
[3185x3]
It's in Fossil now
I didn't change the imports, only the type definition
Got closer, will change the bug description
GrahamC
7-Sep-2011
[3188]
If it's heisenberg, that means it still might work some of the time?
Kaj
7-Sep-2011
[3189]
Yes, when you're not using it :-)
Dockimbel
7-Sep-2011
[3190]
Wave function collapsed, cat saved, bug fixed.
Kaj
7-Sep-2011
[3191x6]
Eh, the cat survived?
Added Hello World examples to the GTK repository
Here's the simplest:
Red/System [ ]

#include %GTK.reds

gtk-begin
gtk-view window label "Hello, Red/System GTK+ world!"
Here is how that is customarily written in other bindings in other 
languages:
Red/System [ ]

#include %GTK.reds

argc-reference: declare integer-reference!
argv-reference: declare handle-reference!
argc-reference/value: system/args-count
argv-reference/value: as-handle system/args-list

_gtk-begin argc-reference argv-reference

_window: gtk-new-window gtk-window-top-level
_label: as gtk-widget! 0

either as-logic _window [
	_label: gtk-new-label "Good riddens!"

	either as-logic _label [
		gtk-append-container  as gtk-container! _window  _label
	][
		print "Failed to create label.^/"
	]


 g-connect-signal  as-handle _window  "destroy"  as-integer :gtk-quit 
  none
	gtk-show-all _window
	gtk-do-events
][
	print "Failed to create window.^/"
]