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

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 301 end: 400]

world-name: r4wp

Group: #Red ... Red language group [web-public]
Pekr:
9-May-2012
Doc, in an Ann-reply channel, you mentioned, that first alpha of 
Red might be out this month. Could you elaborate a bit, what extent 
will it cover?
Pekr:
22-May-2012
Sent another donation, to make life in a programmer's cave a bit 
easier :-)
DocKimbel:
23-May-2012
Maarten: yes, but they are two show-stoppers for that, firstly you 
need to be based in USA, secondly you need to get a big enough user 
base.
DocKimbel:
23-May-2012
Pekr: I will write a blog entry that will give more details once 
I publish the new commits.
GrahamC:
30-May-2012
Any updates on a date for Red ( not system ) ?
Marco:
3-Jun-2012
@DocLimbel Is there a way to speed updates? Could you ask for some 
specific functions or some other piece of code to be developed ?
Pekr:
3-Jun-2012
Marco - I think that what we are waiting for is a significant part 
of work being done to see first draft or RED alpha, including compiler. 
Those things might take some time. I believe that once published, 
we will see more regular updates again. Just my opinion of course 
...
Kaj:
3-Jun-2012
It's usually much easier for a primary author if contributors take 
on tasks that are isolated from the central core. There is huge opportunity 
for such contributions in a platform type work. Why don't you pick 
some library or library binding to write that interests you?
Arnold:
4-Jun-2012
I don't know what you mean by that. A library or library-binding 
that is interesting to me? Okay let's say I find it important to 
use Red as I do with REBOL on my Apache driven website (no option 
to choose the server with my webhostingservice) to process rebol 
scripts and rsp scripts. I think there is a world of Red users to 
be won if Red could do this, at least we would be able to run Red/Redsp 
scripts on the apacheservers potential customers will have their 
websites hosted on, if you still can follow, they may not be too 
enthousiast changing websitehosting services only because we have 
some fun Rebol/Red scripting to offer. So where would I start?
Pekr:
4-Jun-2012
Red is compiled, it is not a convenient solution imo to work with 
CGI imo ...
Pekr:
4-Jun-2012
Arnold - I think, that right now, we have to wait. There's only a 
Red/System low level (VM) language RED will compile to. You can do 
some library binding using Red/System. What you most probably will 
want to program in, though, is Red itself. Doc is working on it ...
Arnold:
4-Jun-2012
I guess so. I see it like a compiled Red compiler deciding if the 
called script has already been compiled, if so the script is executed, 
but if no match is found b'tween the compiled script and source it 
will be (re)compiled and then executed.
Kaj:
4-Jun-2012
But there you go: using Red on Apache is a very concrete and interesting 
task
Kaj:
4-Jun-2012
You'll have to research the CGI interface a bit and maybe make it 
like the REBOL one. It's quite simple: you need standard output, 
which is just printing, standard input, and reading environment variables
Kaj:
4-Jun-2012
Moving up, you could write a FastCGI server that would solve that 
problem and would also be more performant
Kaj:
4-Jun-2012
Another option would be writing an Apache module in Red/System. I 
think that would require producing a plug-in as a shared library. 
The Red/System linker can't do that yet, so that would be another 
one to wait for
Kaj:
4-Jun-2012
I think the FastCGI server is doable now. Instead of writing a complete 
one, you could probably also find a library written in C and bind 
to it
Kaj:
4-Jun-2012
If you want RSP templating with that, you'd have to port one of the 
REBOL versions to Red. If you want it to be close to the REBOL version, 
you'd have to wait for Red for that, but you could also write a simpler 
version in Red/System
DocKimbel:
6-Jun-2012
@Graham and others: I should have wrote you earlier about what I 
am currently doing instead of leaving you with no info, sorry for 
that, I was very busy these last weeks, with both real life events 
(good ones ;-)) and a new customer from which I accepted a short-term 
job to help pay the bills. The contributions I've received so far 
*are* helpful and I can't thank enough all the people that made donations! 
But their are not enough to cover all my expenses here, if I could 
get 3-4 times more from donations, that would be perfect, but as 
long as the userbase won't be larger I think that it won't be  possible.


So I've accepted a short contract (til end of june) to build a trading 
bot generator with a visual editor (GUI in View) that emits MQ4 language 
source code for feeding the Metatrader4 application. Of course, I'm 
building it in REBOL (Red not ready yet for that). The plan was to 
work part-time on it and part-time on Red, but these last two weeks 
I had to work almost only on that project. I still have a few days 
of intensive work on it, then I'll switch to part-time.


I have quite a lot of code to commit (the Red compiler), but I'll 
wait to finish first the internal modifications in Red/System (to 
ease the integration with Red) before publishing it.
Pekr:
7-Jun-2012
Doc - thanks for posting a status update - that's what we asked for 
- being informed, no push on you to hurry the release. This is exactly 
what we expected from Carl, kind of honest message to the few in 
community, describing the reality. The worst thing is information 
embargo.
Pekr:
7-Jun-2012
I hope we will gain more ppl looking into Red, I am warming up with 
BeagleBone, so I hope we can show something to the community in half 
a year. But right now, even my priorities are shifted - LED screen 
business, marketing company, photo studio, etc ...
Henrik:
7-Jun-2012
I've tried donating a couple of times, but Paypal won't let me. I'm 
a bit weary of using bank transfers.
Endo:
7-Jun-2012
Doc: Sometimes working on a project is good, your brain still thinks 
on Red in background I'm sure, so short breaks are not bad, they 
make your ideas more mature. Thanks for sharing the status.
DocKimbel:
7-Jun-2012
Pekr: right, 400 EUR/month would be enough. 


I believe that the Raspberry pi board has a huge potential, we should 
try our best to support it and build tools for it in Red.
Endo:
7-Jun-2012
Each sunday?? I able to do it here once or twice a year! jealous 
:(
Arnold:
7-Jun-2012
I somehow had the idea you lived in/near Paris. I must relocate you 
elsewhere, mountains nearby and cost of living only 400 euro's a 
month. (including the ski-pass in the winter sure thing) :-)
Jerry:
11-Jun-2012
I made a donation to Red Project via PayPal, and 10% (50 Euro) of 
my payment was missing (excluding any fees). I made a phone call 
to PayPal to find out why they "swallowed" my money, They checked 
the records and told me indeed 10% was gone, and they were not sure 
why. They gonna investigate it and give the the answer. Well, How 
luck I am that I check with Doc, or the money is just gone. Shame 
on PayPal.
DocKimbel:
12-Jun-2012
Quite incredible that they can loose money like that during a transfer...
Pekr:
12-Jun-2012
Hmm, then I hope Doc, that you always receive 50 EUR, when I send 
the donation? I would be surprised, if it was lower amount of money, 
and would have to use wire-transfer instead of the PayPal in such 
a case ...
DocKimbel:
14-Jun-2012
An FPU-emulation should be available anyway, but might require a 
different calling convention than the one used by ARM port of Red/System 
currently.
DocKimbel:
14-Jun-2012
I guess we would need a new compilation flag to choose between differents 
ABI.
Janko:
14-Jun-2012
Hi, I am looking into OAuth. I see (and thank you a lot for this!) 
that Chriss Ross Gill created OAuth client part in the twitter library: 
http://reb4.me/r/twitter.html, I am reading into it, but does he 
or anyone else know how much additional work would be needed to do 
the rebol OAuth server part ?
Kaj:
14-Jun-2012
There's already a switch in the C library binding from atexit to 
__cxa_atexit for Syllable. I vaguely remember the problem was indeed 
also reported for other systems on ARM platforms. I can switch it 
for ARM as well as long as we don't have more specific info
DocKimbel:
14-Jun-2012
I remember that Andreas should have made an entry in the bugtracker 
to describe a semantic issue with callbacks that could lead to crashes 
if the programmer was not very careful, but I can't find it. I guess 
I should dig out my IRC logs.
Pekr:
14-Jun-2012
Doc - I might have idea of how you will aproach port model in Red. 
What about events? Carl said, R3 had fast implementation, but we 
also looked into libraries like liboop, libevent, etc. What is the 
plan in that regard? I expect you created Red because you envisioned 
the concurrency is a must? I hope that RED will be a killer in fast 
event handling and concurrency :-)
DocKimbel:
14-Jun-2012
Well, we need to integrate an R3-like async port/event system with 
multithreading (both internal threads and OS threads), that's the 
real challenge. So port! might be implemented as a sub-class of actor! 
(basically a message-based object). This is still rought as I haven't 
worked on the details of ports and actors yet. I'm not sure that 
using an external library for that very sensitive part would be a 
good idea, because we probably only need a tiny subset of the features 
provided by those libs and we need a perfect integration with the 
rest of the runtime/language. You can count of me to implement the 
solution that will give us the best performances, as this is a critical 
feature for being able to implement state-of-the-art servers...and 
you know that we want a very fast Cheyenne v2. ;-)
Pekr:
14-Jun-2012
Those libraries might be good for inspiration - their code is MIT/BSD, 
cross-platform, documented limitations, etc. But I agree. I simply 
want event port being just another kind of ports, funcitoning as 
a kind of seris - lookup, traversla, sort, filtering, etc :-)
DocKimbel:
14-Jun-2012
Protothreads is an interesting minimalistic approach to cooperative 
concurrency, but probably too limited for implementing something 
like task! or actor! BTW, I'm not sure if task! will be required 
in Red, in R3, it starts a new OS thread IIRC, although, I might 
use it to spawn a new process instead, as threads management will 
be covered by actors.
DocKimbel:
14-Jun-2012
I simply want event port being just another kind of ports, funcitoning 
as a kind of seris
 

Hasn't that model been abandoned in R3?
Kaj:
14-Jun-2012

I simply want event port being just another kind of ports, funcitoning 
as a kind of seris" 

Hasn't that model been abandoned in R3?"
Gerard:
14-Jun-2012
Hi Doc, check for a new donation from me through PayPal.  I could 
afford 100 Euros this time. Hope it will help you a bit more.
Gerard:
14-Jun-2012
Recently tried to run the Hello World on my Android based Galaxy 
Samsung Tab 10 but after seeing the "executing ..." msg. Nothing 
appeared. I will try to look at what could be done but I suspect 
I also have to first learn a bit more about Android and my machine 
to help ... I'm very patient and began to read about the ARM. and 
Android itself. What an evolving world we live in ...
BrianH:
15-Jun-2012
You can make a port work a lot like a series, and you mostly did 
with the virtual block scheme. FOREACH and PARSE not working on ports 
can be a bit annoying, but they would only work on a subset of the 
port types that either work like series or (theoretically) like files 
(like open/direct file ports in R2).
Gerard:
15-Jun-2012
@Doc: Seem there is a new update for my system. I will first download 
and install it and I'll retry later the Red/system app in Native 
mode.
DocKimbel:
15-Jun-2012
Flattr: yes, and I have received at least one donation on it, but 
can't retrieve it unless I accept to pay a monthly fee. I understand 
the logic behind it, but don't find it very handy.
DocKimbel:
15-Jun-2012
Have a look at these ones:
- http://static.red-lang.org/red-system-specs.html#section-1

- slides 7 to 13 in my SFD presentation: http://www.red-lang.org/2011/09/red-at-software-freedom-day-2011.html
Gerard:
15-Jun-2012
@Doc : No better success even if running from NativeEXE.apk version 
0.5 and Android version 3.2 - will continue to read before being 
able to investigate myself what could be done - Please don't loose 
your time on this case for now - You have much better  to do ... 
even if it's annoying a bit. I don't despair but I really can't be 
useful to you for now... my understanding of the inner working of 
this stuff exceeds my current capabilities !
Andreas:
17-Jun-2012
a "hello world!" written in and compiled by red/system running on 
a raspberry pi:

[pi-:-raspberrypi]:~$ ./hello-reds.arm 
hello from red/system!

([pi-:-raspberrypi]:~$ uname -a

Linux raspberrypi 3.1.9+ #90 Wed Apr 18 18:23:05 BST 2012 armv6l 
GNU/Linux)
Evgeniy Philippov:
22-Jun-2012
It would be interesting for RED to be a strict superset of REBOL...
Kaj:
22-Jun-2012
You're right: as a compiler, it can't be
DocKimbel:
27-Jun-2012
Evgeniy: I am not sure if a strict superset of REBOL is doable in 
Red without introducing some important runtime overhead, making the 
compilation approach much less efficient, so less useful. I'll try 
to push it as far as possible and will stop when we loose too much 
performances.
DocKimbel:
27-Jun-2012
Unfortunately yes, but it should end in about ten days, so I could 
finally get back to the interesting stuff. I'm becoming an MQL4 language 
expert now, and I really don't like that (even if it can make me 
see some interesting niche opportunities for a Red dialect). ;-)
Pekr:
27-Jun-2012
Well, as for dialects, I still can see PARSE as a secret weapon. 
Hopefully Red gets to R3 or Topaz level, as far as parsing goes. 
We could create some dialects for niches, I think ppl would see the 
advantage ...
PeterWood:
28-Jun-2012
I haven't found away to pre-allocate memory for a c-string! in Red/System 
except by initialising a string.
DocKimbel:
29-Jun-2012
You need to make a type casting: as byte-ptr! <variable>
DocKimbel:
29-Jun-2012
byte-ptr! is just a macro for [pointer! [byte!]] which is a bit more 
generic type than c-string!
DocKimbel:
29-Jun-2012
The get-word! syntax for integer! variables hasn't been implemented 
yet. So currently, the only way (AFAIR) is to wrap your integer! 
in a struct! (as you would do in REBOL).
GiuseppeC:
5-Jul-2012
Hi Doc,

   I have found the time to view the documentation of RED/System on 
   your site.

   Red/system brings the expressiveness of REBOL in a low level language.

   I see there is no object orientation capabilities into this language. 
   Is it planned ? Otherwise, as a programmer, why you dont find it 
   usefull ?
Endo:
5-Jul-2012
I think it is planned for Red as Red/System is a low level system 
language.
GiuseppeC:
5-Jul-2012
Endo, I know it will be available in Red as it will inherit many 
REBOL features.

My question is for curiosity. Why a programmer chose to not put into 
his low level language OOP features like in C++ (I am not talink 
about full OOP but a basic subset)
Is this OOP really crap ?
Endo:
5-Jul-2012
OS APIs and systems don't need that feature. And C++ is not that 
low-level, as you need to use C if you want to use WinAPIs or kernel 
functions.
OOP is a high level feature and no use in low level APIs.
Endo:
5-Jul-2012
I don't think it is useful for Red/System, look at Kaj's bindings, 
its all system structures, API calls, enumerations and a few functions.

When we have Red we (or someone) can write wrappers in Red, so "normal" 
users will not need to use Red/System.

And there is no use series etc. kind of high level features in bindings/API/kernel 
calls.
DocKimbel:
5-Jul-2012
No object! nor series! support planned for Red/System, remember that's 
supposed to be just a low-level dialect callable from Red meant for 
system programming. However, as Peter mentioned, it will be possible 
to access Red values and actions (mainly series and I/O actions) 
from Red/System when deeper interfacing with Red is needed.


OOP is just not necessary to Red/System, only code and data encapsulation 
is IMO worth adding in the form of a module system. I'm not a big 
fan of intensive use of OOP, as done in C++ or Java (or I'm probably 
just repelled by class-based OOP). I find prototype-based OOP (REBOL, 
Javascript,...) much more appealing and will support it in Red.
GiuseppeC:
5-Jul-2012
Hi Doc,
   I have started the topic just to read your opinion.

   I also have a question. Rebol has manual delegation. Some find useful 
   to have automatic delegation. Which is your opinion about this for 
   RED  ?
DocKimbel:
5-Jul-2012
By "automatic delegation" do you mean implementing a class-based 
object system? I thought about adding a class! datatype to Red at 
the beginning, but I'm really not convince that would be a wise move.
GiuseppeC:
5-Jul-2012
Doc, I mean calling a method when a value inside an object is set 
or read.
DocKimbel:
5-Jul-2012
Right, yes, that's a feature I was planning to have in Red (didn't 
know that it was called formally "automatic delegation").
DocKimbel:
5-Jul-2012
A good and non-ambiguous syntax would be needed for that though.
Kaj:
5-Jul-2012
I thought about implementing some basic series functions in Red/System, 
but they would be primitive and hardly used once the Red memory manager 
is available. There could still be a place for them in low level 
coding, but right now it doesn't justify the effort for me
BrianH:
5-Jul-2012
Giuseppe, those are called properties. The getter/setter functions 
you often find in GUIs are basically the same thing, but properties 
hide that in regular assignment syntax. We don't need getter properties 
in REBOL-like languages because we don't use parentheses to call 
functions, but setter functions appearing to be assignment statements 
might appeal to some.


I've had a lot of experience with properties in languages like Delphi; 
most of the popular languages that currently have property support, 
either in syntax or as a convention, are derived from Delphi. It 
makes code a little easier to write, and a lot harder to debug. The 
main advantage to implementing them in Red or R3 would be to make 
it easier to interoperate with .NET or COM objects.


Automatic delegation is something else. With automatic delegation, 
you automatically forward a method call from one object to another, 
just by declaring it as such. That doesn't really work in REBOL-style 
direct-bound functions because we don't have an implicit self parameter 
(we have self, but it's not a parameter). Red would need to have 
a completely different function binding model for that kind of thing 
to work; which it would likely have anyways, due to it being compiled 
rather than interpreted.
DocKimbel:
10-Jul-2012
Structs are always passed and manipulated by reference. You should 
be able to return struct! (unless there's a bug).
Rebolek:
10-Jul-2012
This code:

return-struct: func [
	return: [struct!]
][
	s: declare struct! [
		a [integer!]
	]
	s/a: 1
	s
 ]


returns error in compilation:  invalid definition for function return-struct: 
[struct!]
DocKimbel:
10-Jul-2012
should be: func [ return: [struct! [a [integer!]]] ]
PeterWood:
11-Jul-2012
Why the difference? Shouldn't W and X be same as V is same as P/VALUE? 
  I checekd that v = p/value so it would appear to be the type casting 
that is the problem. I checekd the spec and casting a byte! to and 
integer! should be okay. So it seems like it is a bug.
Rebolek:
11-Jul-2012
f: func [
	val	[integer!]
	return:	[struct! [value [integer!]]]
	/local s
][
	s: declare struct! [value [integer!]]
	s/value: val
	s
]

s1: f 1
print ["s1/value:" s1/value lf]
s2: f 10
print ["s1/value:" s1/value lf]

; --- outputs:

C:\code\Red\red-system\builds>test
s1/value:1
s1/value:10


After setting S2 value, S1 is changed. Why? Is it a bug?
PeterWood:
11-Jul-2012
I don't think it's a bug. s is a local (static) variable in function 
'f. f returns a reference to s. So if you change the contants of 
s/value, all references to s will now refer to its new value.
PeterWood:
11-Jul-2012
Once the Red memory manager is available it may well be possible 
to use it to allocate struct! in a function but then there is the 
problem of how to release the memory later.


From a memory mangement point of view, it seems easiest not to allocate 
variables inside functions to be returned to the calling program/function.
Kaj:
11-Jul-2012
There's no problem in allocating memory to return from a function, 
but you have to use ALLOCATE and later FREE it
Kaj:
11-Jul-2012
You should check the allocation for being a null pointer, though
Ladislav:
12-Jul-2012
aha, sorry, this is a Red group...
Kaj:
12-Jul-2012
Sounds like a bug, although the program is overly complex
DocKimbel:
15-Jul-2012
Rebolek: I've pushed a fix for your issue (Intel CPU). I'm looking 
on the other issue you had with ARMv5TE.
DocKimbel:
15-Jul-2012
I've located the cause of bug #220, you should have a fix when you'll 
wake up. ;-)
Rebolek:
18-Jul-2012
Can anybody check this code? https://gist.github.com/3135678

It's not a bug, but I wonder why the obviously more complex sine-osc 
is cca 50% faster than square-osc. These are the results I get on 
my machine:

sine-osc time:  1068
square-osc time:  1790
PeterWood:
18-Jul-2012
If I remember correctly, the Windows clock function is a bit different 
from the LibC one.
Group: Databases ... group to discuss various database issues and drivers [web-public]
Pekr:
11-Nov-2012
I think, that your script is wrongly constructed! What you seem to 
do is to just print a form, which then gets delivered to user's browser 
screen. But at that time, there is no value yet. You should study, 
how to do CGI in REBOL. You need a separate html form, then you need 
to read CGI values and store them in a DB ...
Pekr:
11-Nov-2012
plese study following link - on the right side, there is a link, 
of how to process forms using REBOL: http://www.rebol.com/docs/cgi1.html
Pekr:
11-Nov-2012
then you pick a value and save it ...
Pekr:
11-Nov-2012
there are two things - 1) you have to write a form, basically a html 
file, with fields, etc., and submit button, linking it to your cgi 
script 2) you have to write a CGI script, being able to read submitted 
values ...
Arnold:
11-Nov-2012
You first check that the value is acceptable for what can be expected. 
This is to prevent SQL injections and other malicious input from 
hackers/innocent users and monkeys using your application. Than you 
insert a SQL command to insert or update  the mysql database just 
like you did when you did with your select statement before.

 mijnquery: "INSERT INTO cms_artikel (titel, tagregel, sectie, toegevoegd, 
 artikel_tekst) VALUES ('"

 mijnquery: append mijnquery rejoin [titel "', '" tagregel "', '" 
 desectie "', '" toegevoegd "', '" artikel-tekst "')"]
 insert db mijnquery

 The names after INTO are the fieldnames of the table cms_artikel 
 the ones after VALUES are the REBOL variables that get replaced by 
 their values
Arnold:
11-Nov-2012
Yes. Do a probe of the query to see if it generates the sql you expected.
Ladislav:
11-Nov-2012
Any one knows how can we save value from the form into database?
 - sure, Pekr told you how to do it.


Your problem is that you do not do what Pekr told you to do. First, 
you need to create the form. Check: Do you really have the form?

Second, you need to create a CGI script (this is not the form from 
the first point, the form from the first point is not a CGI script). 
Check: do you really have a CGI script ?


Pekr told you that the example you posted was neither the form, nor 
the CGI script.
Ladislav:
11-Nov-2012
One more note: your problem is much more elementary than handling 
the database. Before writing data to the database you need to have 
a script accepting (decoding) the data obtained from the form.
Pekr:
12-Nov-2012
Ladislav - thank you. It is apparent, that what afsanehsamim is missing 
is the basic knowledge of how webserver stuff works between the client 
and the server. Examples at rebol.com are pretty straightforward. 
The only chance is to really create a simple example for him ...
Pekr:
12-Nov-2012
Create 2 files. Call the first one e.g. cgi-test.html, and upload 
it to your server. The only thing you have to change is the link 
to your .cgi script in there:

<HTML>
<TITLE>Simple Web Form</TITLE>
<BODY>
<b>Simple Web Form</b><p>
<FORM ACTION="http://www.xidys.com/cgi-bin/cgi-test.cgi">
<INPUT TYPE="TEXT" NAME="Field" SIZE="25"><BR>
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Submit">
</FORM>
</BODY>
</HTML>



Create a second file, called cgi-test.cgi (it has to align to how 
you name it in the above source file). Upload it to your cgi working 
directory. Remember to change the first line to contain the path, 
where your REBOL executable is placed:

#!/usr/local/bin/rebcmd -sqc

REBOL []

print join "Content-type: text/plain" newline
start: now/time/precise

submitted: decode-cgi read-cgi
values: construct submitted

prin "Submitted: " print mold submitted
prin "values: " print mold values
prin "values/field: " print mold values/field

print now/time/precise - start
print newline
 

Now go to your URL, and try to submit some values. You can test it 
on my site at: http://www.xidys.com/cgi-test.html
Endo:
16-Nov-2012
do you mean saving result to a file?
it is just a block, you can simple SAVE %file.r RESULT
Endo:
16-Nov-2012
use a normal INSERT query.
insert db-port "INSERT INTO table (colA, colB) VALUES (1,2)" 
or 

insert db-port ["INSERT INTO table (colA, colB) VALUES (?,?)" 1 2]
afsanehsamim:
16-Nov-2012
Endo  values should get from form ,it is a big problem till now that 
no one could underestand ...
Endo:
16-Nov-2012
how does it matter where the values come from? it is a totally different 
issue.
try reading
http://www.rebol.com/docs/cgi1.html
http://www.rebol.com/docs/cgi2.html
http://www.rebol.com/docs/cgi-bbs.html
TomBon:
16-Nov-2012
if so, you have to add your mysql connection parameters to your script., 
open a mysql port and do an sql insert to your table.
301 / 64608123[4] 56...643644645646647