Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 20 22:59
    @dockimbel banned @SmackMacDougal
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:19
    @PeterWAWood banned @TimeSeriesLord
  • Aug 13 2016 03:23
    @PeterWAWood banned @Vexercizer
GiuseppeChillemi
@GiuseppeChillemi
@toomasv
nedzadarek
@nedzadarek
@toomasv clever! You are using positioned image. I thought new console allows this.
Toomas Vooglaid
@toomasv
@GiuseppeChillemi Drawing area is same size with area.
I think this can be made resizable too if needed.
rpherman
@rpherman
@9214 I assumed the implementation of blockchain in RED in order to do RED token/ether contracts? Wasn't that the gist of the last update about the Nov 22 blogpost on RedCON and Ethereum DevCon 4? Is this a separate fork?
rpherman
@rpherman
I am not able to get any of the redCV samples working, and I have posted specifics here. I think it may be my confusion with Red/System and Red. The instructions for redCV are sparse. Can anyone clarify what I need to do right after downloading the redCV repository? Do I need to compile one or more things with Red or Red/System before compiling one of the samples? Sorry, but it's not clear, at least to me. I really like Red, and all other demos/samples work great for me, but I have not touched Red/System yet. Thank you.
Ungaretti
@Ungaretti
@rpherman I run into the same problem a while ago. I'm not on my own computer right now, so I'll tell you what I remember: First, I had to compile with -r option, although redCV docs mentions -u option for a first compiling. Then, inside the example source, there is a line that sets the path to redCV, I had to change it to point to the folder where I kept the redCV scripts and folders that I downloaded from github.
GiuseppeChillemi
@GiuseppeChillemi
Switch considers - 'word - equal to - word -
and - 'word - different from - 'word -
Red []

switch 'mydata [
    'mydata [print ["'mydata"]]
    'myuniverse [print ["'myuniverse"]]

]

switch 'mydata [
    mydata [print ["mydata"]]
    myuniverse [print ["myuniverse"]]

]
Pardon, I made a mistake
No, no mistake, it is the correct example
Result is
mydata
>>
Expected: 'mydata
Toomas Vooglaid
@toomasv
@GiuseppeChillemi
>> switch to-lit-word 'mydata [
    'mydata [print "yesss!"] 
     mydata [print "nooo!"]
]
yesss!
>> switch quote 'mydata [
    'mydata [print "yesss!"] 
     mydata [print "nooo!"]
]
yesss!
GiuseppeChillemi
@GiuseppeChillemi
Isn't 'mydata already a litword ?
Toomas Vooglaid
@toomasv
'mydata is evaluated to mydata
GiuseppeChillemi
@GiuseppeChillemi
Is it different from REBOL or I have never well understood this concept ?
also, which is the return value of a switch block once one of its cases has been executed ? I thought it was the return value of the block but It isn't.
Toomas Vooglaid
@toomasv
REBOL:
>> switch quote 'myword [
    'myword [print "'myword"] 
     myword [print "myword"]
]
'myword
>> switch 'myword [
    'myword [print "'myword"] 
     myword [print "myword"]
]
myword
Return value is what returns from selected block or none if nothing is selected or no return if block is selected but doesn't return anything, e.g.:
>> switch 'my [my []]
>>
GiuseppeChillemi
@GiuseppeChillemi
I have an object with a function with which as switch statement inside, and it is exectued as last step from multiple functions calls. Without using a temporary return value of the switch is UNSET.
*temporary return word
Toomas Vooglaid
@toomasv
Hard to say anything without seeing the code.
GiuseppeChillemi
@GiuseppeChillemi
Yes, I know but code is very draft, long and messy....
I will clean it up and extract the relevant parts
Vladimir Vasilyev
@9214
@rpherman frankly, I have no idea what you're talking about. What blockchain implementation? You mean C3 dialect? It's in development.
spTorin
@spTorin
Anyone send messages in telegram in red script? Some example?
Boleslav Březovský
@rebolek
@spTorin Somebody wrote Telegram bot in Red, I hope I can find a link.
spTorin
@spTorin
@rebolek Tnx, already make post in telegram.
First wrote wrong "Content-Type"
spTorin
@spTorin
If needed example:
probe write/info https://api.telegram.org/botXXX:YYY/sendMessage [
    POST
    [Content-Type: "Content-Type: application/x-www-form-urlencoded"]
    "chat_id=-XXX&text=message_here!"
]
Boleslav Březovský
@rebolek
Nice, that's very easy.
viayuve
@viayuve
how to convert 20181207082400 to 2018-12-07 08:24:00.000 decimal to date time
Boleslav Březovský
@rebolek
@viayuve
>> value: "20181207082400"
== "20181207082400"
>> spec: [year 4 month 2 day 2 hour 2 minute 2 second 2]
== [year 4 month 2 day 2 hour 2 minute 2 second 2]
>> date: now
== 10-Dec-2018/13:14:21+01:00
>> foreach [acc len] spec [date/:acc: load take/part value len]
== 0
>> date
== 7-Dec-2018/8:24:00+01:00
viayuve
@viayuve
Thank you @rebolek but that does not work for me. I need "2018-12-07 08:24:00.000" As date to put in my sql insert statement.
Boleslav Březovský
@rebolek
Ah, sorry, I thought you need Red date. Well turning it into different string is even easier.
viayuve
@viayuve
?? 4 hrs in still could not figure out how not brilliant you know
Boleslav Březovský
@rebolek
>> spec: [year 4 #"-" month 2 #"-" day 2 space hour 2 #":" minute 2 #":" second 2 dot]
== [year 4 #"-" month 2 #"-" day 2 space hour 2 #":" minute 2 #":" second 2 dot]
>> value: "20181207082400"
== "20181207082400"
>> rejoin collect [foreach [acc len delim] spec [keep take/part value len keep delim]]
== "2018-12-07 08:24:00."
I leave adding 000 up to you, that's really easy to figure out :)
viayuve
@viayuve
thanks done updated 230 insert statements you are very good at parsing data.
Boleslav Březovský
@rebolek
:smile:
viayuve
@viayuve
when I click on close, program should minimise (hide) in system tray how??
nedzadarek
@nedzadarek

@viayuve If you mean that when you click X(close), program goes into system tray, then an answer is no.

If you want to hide program to the system tray when you click X (close) then:
I am not sure if it is possible to use tray but you can prevent window from closing (and other events) by using insert-event-func.

Nenad Rakocevic
@dockimbel

@Oldes

In Rebol2 & Rebol3:

c: [a: 1 b: 2 (y 5) 6]
y: quote (y 5)
c/(y) ;== 6
c/:y  ;== 6

@dockimbel is difference with Red by design?

That looks like a bug to me. It works fine when compiled, so it's an interpreter issue.

Nenad Rakocevic
@dockimbel
I have opened an issue for it: red/red#3645
Alexander Baggett
@AlexanderBaggett
okay, noob question here, how do I use reference other red files in a program?
nedzadarek
@nedzadarek
@AlexanderBaggett do %file
Alexander Baggett
@AlexanderBaggett
@nedzadarek , Thanks a bunch. Will give it a try. Let you know if I have any questions.
Toomas Vooglaid
@toomasv
@AlexanderBaggett Or #include %file if you are going to compile it.
Rudolf Meijer
@meijeru
In fact, #include is more flexible, since it is handled like do by the interpreter.
Palaing
@Palaing
looking for a way to use Red scripts as CGI in Apache. I understand it's not possible yet to access GET or POST data; am I wrong ? any workaround ?
GalenIvanov
@GalenIvanov
Hi, I downloaded red-064 for WIndows on my office computer. After starting it compiled the compression library and the Red GUI console. Unfortunately it doesn't start the GUI console. I checked in Program Data/Red and there is gui-console-2018-11-22-8164.exe, as well as crush-2018-11-22-8164.dll and console-cfg.red.
Win 8 Pro on HP EliteDesk 701 G1 SFF (AMD A8-6500B, AMD Radeon HD 8570D, 4 GB RAM) - red-063 runs here smoothly.
I tried red-064 at home on my Asus K550J laptop with Win 8.1 and it worked without any problems. the GUI console opens. I'll appreciate any suggestions how to solve the problem. Thanks!