Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 01 2018 17:34
    @greggirwin banned @BIjeuca_twitter
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:20
    @PeterWAWood banned @TimeSeriesLord
hiiamboris
@hiiamboris
@ams02468 CudaText (cross-platform)
I dropped Sublime for it's too hard to extend, and decided against UltraEdit for it's too sluggish for my taste.
ams0_0
@ams02468
10q 4 the answers you gave, very helpful
GaryMiller
@GaryMiller
Notepad++
dsunanda
@dsunanda
Also using Notepad++ .... Recently changed from Programmer's Notepad because it is getting a bit crufty with UNICODE support.
Both have syntax coloring for Rebol (and therefore Red) which is nice.
Jose Luis
@planetsizecpu
Notepad++ + @Ungaretti 's pluggin
ams0_0
@ams02468
Hi, is there a command to show numbers smaller than one number, something like a countdown?
dsunanda
@dsunanda
You could adapt something like this:
 num: 7 repeat n num [print num - n]
6
5
4
3
2
1
0
ams0_0
@ams02468
thx @dsunanda
ams0_0
@ams02468
hey guys why the output of this code is none ?
z: [ 1 2 3 4 5]

a: 1

print z/a
Toomas Vooglaid
@toomasv
@ams02468 z/:a or z/(a)
ams0_0
@ams02468
thx @toomasv
Toomas Vooglaid
@toomasv
:+1:
ams0_0
@ams02468
Hello . there is way to convert the output of code to the string again ?
print checksum "test" 'MD5
dsunanda
@dsunanda
@ams02468 There's not supposed to be :). The point of hashes is that they are a one-way secure function.
MD5 though is so badly broken, that a search on the internet is often all you need:
https://md5.gromweb.com/?md5=098f6bcd4621d373cade4e832627b4f6
test
ams0_0
@ams02468
I wanted to know if red has sup reverse function? anyway thanks @dsunanda
Fabiano Rezende
@fabianorezende26_gitlab
Is red a language from the lisp family?
dsunanda
@dsunanda
Joe Marshall thought so: http://ll1.ai.mit.edu/marshall.html
Respectech
@Respectech
Carl told me that Lisp was one of the inspirations for Rebol. However, there were some things in Lisp that he didn't like, so he only took the parts of Lisp that he liked.
Smalltalk and C are other inspirations for Rebol.
(If I remember correctly from my conversations with Carl when I worked for him over 20 years ago)
Gregg Irwin
@greggirwin
Redbol langs inherit from Lisp, Forth, and Logo (Lisp without parens effectively), and prototype object design from Self.
Respectech
@Respectech
Gregg obviously has a much better handle on where Rebol got some of its inspirations from.
Thanks for the clarification, Gregg.
Fabiano Rezende
@fabianorezende26_gitlab
yeah i can see forth in it but there seems to be a bit of awk in it : )
Gregg Irwin
@greggirwin
Not really. No automatic line processing, field splitting, or pattern-action core. I do have a rawk dialect built for R2 however, so it's applicable to that space, and others in shell-world. I hoped we'd get to build a reddy-box and other things along those lines someday.
WayneCui
@WayneCui
Hello guys, any way to change a timestamp value to a date! value? eg. 894621091000 => 1998-05-08 09:51:31
WayneCui
@WayneCui
from-timestamp: func [ ts ][
    days: to-integer round/down ts / 1000 / 3600 / 24
    seconds: round/down mod (ts / 1000) (3600 * 24)
    return (1970-01-01 + days) + (00:00:00 + seconds)
]

print  from-timestamp 894621091000
just wrote a function, is there any better ways?
ne1uno
@ne1uno
this used to work? way off now. 1-Jan-1970 + to time! 894621091000
WayneCui
@WayneCui
1-Jan-1970 + to time! 894621091   
== 8-May-1998/9:51:31
@ne1uno Thanks for reply, it works, just change millisecond to second ;-)
ne1uno
@ne1uno
👍
ne1uno
@ne1uno
the other way, to float! difference to date! 8-5-1998/09:51:31 1-Jan-1970 from an @x8x post
WayneCui
@WayneCui
👍
Nenad Rakocevic
@dockimbel
See documentation:
>> to-date 894621091
== 8-May-1998/9:51:31
François Jouen
@ldci
image.png
A simple way to create nice forms: use zenity inside your Red code :)
zenity runs under Linux, MacOS and Windows. See https://gitlab.gnome.org/GNOME/zenity
Gregg Irwin
@greggirwin
@ldci nice reminder. Zenity has come up before.
WayneCui
@WayneCui
@dockimbel Thanks Doc, my CLI is too old. It works with a new version
WayneCui
@WayneCui
Red []

from-timestamp: func [ ts ][
   return 1970-01-01 + to time! round/down ts / 1000 
]

hessian-proxy: make object! [

    run: func[ method ][
        data: rejoin [to-binary "c^A^@m" (at to-binary length? method 7) to-binary method to-binary "z"]
        result: write http://hessian.caucho.com/test/test compose [
            post [
                Host: "hessian.caucho.com"
                Content-type: "application/x-hessian"
                Accept-Encoding: "identity"
                User-Agent: "rebol-hessian/0.0.1"
                Accept-Charset: "*"
            ]
            (data)
        ]

        print to-binary result
        probe from-timestamp to-integer copy/part at result 5 8
    ]
]

hessian-proxy/run "replyDate_1"
image.png
>rebol3 hessian-red.red
#{72010064000000D04B9284B87A}
8-May-1998/9:51:31

> red-latest hessian-red.red 
#{
72010066530004636F64655300154E6F537563684D6574686F64457863657074
696F6E5300076D65737361676553002B54686520736572766963652068617320
6E6F206D6574686F64206E616D65643A20706C79446174655F317A7A7A
}
*** Script Error: cannot MAKE/TO integer! from: "S^@^DcodeS"
*** Where: to
*** Near : probe from-timestamp to-integer copy/part 
*** Stack: run probe from-timestamp to-integer
WayneCui
@WayneCui
Hello, I am working on a hessian client project,sending/receiving binary data over HTTP. It seems there is something not working well about Red HTTP
ne1uno
@ne1uno
{r^A^@fS^@^DcodeS^@^UNoSuchMethodExceptionS^@^GmessageS^@+The service has no method named: plyDate_1zzz}
ne1uno
@ne1uno
@WayneCui, at maybe needs series!? try something like (to binary! at form to-hex length? method 8)
WayneCui
@WayneCui
Thanks @ne1uno , I know what's wrong
WayneCui
@WayneCui
request is correct, another error
WayneCui
@WayneCui
#{6301006D000B7265706C79446174655F317A}
*** Access Error: invalid UTF-8 encoding: #{D04B9284}
*** Where: write
*** Near : result: write http://hessian.caucho.com/ 
*** Stack: run