• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[#Red] Red language group

DocKimbel
18-Jul-2012
[724]
Do you run Windows virtualized?
Rebolek
18-Jul-2012
[725]
No
DocKimbel
18-Jul-2012
[726]
I had a quick look at the code paths of both generated `square-osc` 
and `sin-osc` functions, all seems fine. But I do concurr that the 
results are not intuitive. I guess that the relative performances 
in such case are just too hardware-dependent.
Rebolek
18-Jul-2012
[727]
Probably yes.
DocKimbel
21-Jul-2012
[728]
Rebolek: issue #221 has been fixed.
Rebolek
22-Jul-2012
[729x5]
Doc, I can still reproduce it with this code:

x: 0.0
x: either x > 0.0 [x][0.0 - x]
print [x lf]

If I assign the result to 'y instead of 'x, it works.
Ah, that's not the reason. It happens when the condition is FALSE 
and FALSE block ends with expession.So the above code works for x 
= 1.0
When I change order, the code works:

x: 0.0
x: either x <= 0.0 [0.0 - x][x]
print [x lf]
But this also throws 11: float stack check error when used in function:

fabs: func [x [float!] return: [float!] ][
	either x < 0.0 [0.0 - x][x]
]
print [fabs -3.14 lf]
Final workaround :)

fabs: func [
	x			[float!]
	return:	[float!]
][
	x: either x < 0.0 [0.0 - x][x]
	x
]
print [fabs -3.14 lf]
DocKimbel
22-Jul-2012
[734x2]
Thanks, I will debug that tonight.
Issue fixed.
Rebolek
24-Jul-2012
[736]
It's fixed but this fix brings another 9: float invalid operation 
problem that wasn't present in last version. I'll post an example 
once I separate the problem.
DocKimbel
24-Jul-2012
[737x3]
I guess I should have added a few more unit tests from those tickets.
For people wondering what I was working on these last couple of month, 
here's a screenshot of the customer app I'm finishing now: http://sidl.fr/tmp/generator01.png


It's a visual editor for trading strategies that emits MQL4 code 
for Metatrader-based solutions (FOREX trading). The tree is editable 
and redraws itself automatically (no need to drag all the nodes around 
manually). This app also relies on an intermediary DSL for serializing 
the strategy on disk or before compiling it to MQL4. Here's an extract 
from the corresponding dialect representation of the tree from screenshot: 

start on 1 
if 1 buy 5 take 10 stop 10 on-profit [
    buy 6 take 10 stop 10 on-profit [
        buy 10 take 10 stop 10 loop
    ]
] on-loss [
    sell 7 take 10 stop 10 on-profit [
        buy 4 take 10 stop 10 loop
    ]
] 


All is done in REBOL/View 2.7.6 (to avoid CALL bug in 2.7.8) and 
all the source code is 47KB (25KB for the custom styles and VID events 
callbacks).


I'm at 99% completion of that app, so I've resume the work on Red 
since a couple of days.
(CALL is required for this app to invoke the MQL4 to EX4 native compiler)
Pekr
24-Jul-2012
[740x3]
Really nice :-)
Hopefully you got also refreshed, and got some new ideas for RED 
:-)
e.g. that native RED GUI would be handy, one day :-)
DocKimbel
24-Jul-2012
[743x3]
Certainly! But I must admit that I have hesitated in the beginning 
between HTML5 and VID for the GUI.
I chosed VID only because I knew I could do it faster than messing 
around with HTML/JS libs and intricacies. I was just a bit concerned 
about hitting some performance walls or native bugs I couldn't workaround. 
Fortunately, all went well.
*chose
Janko
24-Jul-2012
[746]
wow, looks really nice. I was never good with R gui's so I have no 
idea how you made those custom components
Rebolek
24-Jul-2012
[747]
Reaaly nice, Doc! btw see issue #222. This one is bit harder to trigger 
:)
DocKimbel
24-Jul-2012
[748]
Janko: it's not difficult, maybe the VID docs are just lacking some 
simple HOW-TO for that?
Janko
24-Jul-2012
[749x2]
I don't know. Please don't be bogged down by things like gui in Red 
too fast! You first have to make a langauge / a platform that others 
(we) can use and build upon and add libs when we need them. And for 
all the love to VID and like, my oppinion is still that usability 
matters the most and it's hard to beat usability (all the little 
conventions) with non-native GUI-s. Or big delevoloped libraries 
that emaulate them well enough (Qt, GTK, ...)
(I mean "we" add libs when we need them, not you when we need them 
;))
DocKimbel
24-Jul-2012
[751x2]
Priorities haven't changed, of course getting the core part done 
first is still the main goal. ;-)
I've pushed the enhanced get-word syntax support, so it's now possible 
to get a pointer on integer!, byte!, float! and float32! variables 
(without having to wrap them in a struct!). For example:

	s: declare int-ptr!
	a: 123
	s: :a
	print s/value		;-- will output 123


I will add the ARM backend support for that and update the documentation 
tonight.
Janko
24-Jul-2012
[753]
OT: Did I see right on FB that you moved to Montenegro? If you are 
passing Slovenia at any time you could present Red at it's biggest 
CyberCenter / Hackerspace ... Kiberpipa (and/or Hekovnik) if you 
wisted to. basically if you do let me know (they don't operate in 
the summer though) http://www.kiberpipa.org/en/
Rebolek
24-Jul-2012
[754]
Wow, great update! Will really simplify things!
DocKimbel
24-Jul-2012
[755]
Janko: right, I live in Podgorica now. I will check the kiberpipa 
site.
Rebolek
24-Jul-2012
[756x3]
Also, #222 seems gone with this update.
or not...
see comment in #222 and also see #223 for another variant of this 
problem.
Gregg
24-Jul-2012
[759]
Thanks for the update Doc!
Arnold
24-Jul-2012
[760]
Vid frees you from the browser and its limitations. If REBOL only 
had a HTML interface I would have dropped the language without further 
hesitation.
Kaj
24-Jul-2012
[761]
You would have missed great batch and server programming :-)
MaxV
25-Jul-2012
[762x2]
Did you installed the Rebol plug-in in your browser? Look at  http://www.maxvessi.net/rebsite/plugin/index.html
You don't need HTML!!!!
Pekr
25-Jul-2012
[764x2]
old version, not secure, etc. R3 in the browser would be cool. But 
future of plugins is questionable in general imo. Adobe stops support 
for Flash for mobile devices, no new versions. Silverlight is on 
hold mostly too. Everybody turns to HTML5 ...
As for Janko's message - I am not suggesting changing priorirites 
too. GUI can wait imo, we need Red first :-)
MaxV
25-Jul-2012
[766]
Ok, but Rebol is better than html5. You write your script and it 
works on MacOS, Windows, Linux, in a browser. "write once and use 
it every where" better than Java.
Pekr
25-Jul-2012
[767]
of course, better than JAVA. But generally it does not work in a 
browser - you still need a plugin for each platform. Don't forget 
mobile devices, etc. But - that is a bit offtopic here in a RED group
Henrik
25-Jul-2012
[768]
We shouldn't forget the idea of ReBrowse, which is Carl's idea of 
a browser written in R3 and is mean to replace the Viewtop. It's 
true that it doesn't run inside other browsers or leverages HTML, 
but it will still be a great technology demonstration of what a webbrowser 
should be.
Pekr
25-Jul-2012
[769]
yes, and it would be cool to run rebrowser in real browser. Remember 
- making a NS plugin is wrapping something like 20 function calls? 
Not a problem for C skilled coder. I am even willing to start a bounty 
for that :-) But - first things first - R3 has to have a future first, 
so waiting for Carl's next step ...
Henrik
25-Jul-2012
[770]
I have personally entirely different ideas for using Red as a basis 
for a new kind of desktop, but I'm not sure if I'm skilled enough 
to build it. We'll see.
GrahamC
25-Jul-2012
[771]
for most purposes HTML5 will be good enough for desktop applications. 
 And that's all it needs.
Kaj
25-Jul-2012
[772]
Does #221 change #192?
DocKimbel
25-Jul-2012
[773]
No, it's not the same issue.