Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:19
    @PeterWAWood banned @TimeSeriesLord
  • Aug 13 2016 03:23
    @PeterWAWood banned @Vexercizer
amreus
@amreus
This message was deleted
rebred
@rebred
@amreus yes I was trying to avoid doing all these steps to remove 4 chars at the tail of a string !
nedzadarek
@nedzadarek
@rebred to be precise, remove and some other functions works from the current position, e.g. s: "abcdef" (s2: at s 2) (remove/part s2 3) probe s ; "aef"... but Vladimir already posted you link about this.
rebred
@rebred
str: "this is $ simple test"
find/tail str "$"
== " simple test"
is there a way instead of getting the string on the right of the $ I can get the string on the left ?
Vladimir Vasilyev
@9214
You're already getting the string on the right.
rebred
@rebred
yes sorry @9214
Vladimir Vasilyev
@9214
Why then do you use /tail refinement?
rebred
@rebred
str: "this is $ simple test"
find str "$"
== "$ simple test"
rebred
@rebred
I see there is a SQLite binding
is there an example on how to use and configure it ?
Vladimir Vasilyev
@9214
@rebred if you'd look at this repository more closely, you'd notice that it contains 3 testing examples.
rebred
@rebred
@9214 thank you
GiuseppeChillemi
@GiuseppeChillemi
@rebred also you could use Munge.
But only on Windows Platform.
Sunnypt
@Sunnypt
how can I see what is new in each latest build of Red - I download every new build but struggle to know what's new.
Gregg Irwin
@greggirwin
We have https://progress.red-lang.org/, to summarize changes, but it's not the same as a changelog, which we hope to do more consistently in the future.
And, again, a huge thanks to @x8x for making that progress page. It's fantastic.
Sunnypt
@Sunnypt
ok, sorry - just wanted to know about new things as they are introduced
Sunnypt
@Sunnypt
i meant new functions, actions etc.
Gregg Irwin
@greggirwin
Yes, that's what a changelog will help with.
Sunnypt
@Sunnypt
thanks - so at the moment new builds appear, but who knows what new features they hold ?
Sunnypt
@Sunnypt
yes , sorry - just keen to know what's new
nedzadarek
@nedzadarek

If I have a block! I can retrieve value by:

  • integer! -> arr: [11 22 33] arr/1; 11
  • word! -> arr: [a 1 b 2] arr/b; 2
  • paren! -> result of the paren! can be: any-word (same as word!), integer (see above), other value (select arr 'a)

Do I miss something?

Gregg Irwin
@greggirwin
@Sunnypt you need to monitor the progress page or commits. We include big notes with big releases and blog announcements, which we hope to do much more frequently. New docs efforts ramping up as well.
@nedzadarek correct. See https://doc.red-lang.org/en/datatypes/path.html for more details. Paren values in paths are currently supported, and can be useful, but that design decision isn't frozen.
dsunanda
@dsunanda
@Sunnypt I have a toy utility that can uncover many of the differences between versions of R2, R3 and Red. Here's an example of what has changed as NATIVEs, ACTIONs and FUNCTIONs between the original 0.6.3 release of Red, and last week click here to download - you'll need to unzip.
But as Gregg says, it is generally better to track progress by what has been reported as an intentional change - rather than just by spotting what is different.
Toomas Vooglaid
@toomasv

@nedzadarek There is one more accessor: set-word!

c: [a: 1 b: 2 (y 5) 6]
y: 'a
c/:y
;== 1
y: quote (y 5)
c/:y   ; But this gets the evaluated result of parens, which is 5, so 5th element
;== (y 5)
c/(y)  ; This selects as `select/only`
;== 6

Consider also this

c: [a: 1 b: 2 (y 5) 6 x 3 x: 4]
y: quote x:
;== x:
c/:y ; Selects first x 
;== 3
c/(y) ; Also selects first x
;== 3
select/same c quote x: ; Only this selects exactly
;== 4
select/same c y
;== 4
Toomas Vooglaid
@toomasv
Er .. get-word! :flushed:
Toomas Vooglaid
@toomasv
Also
c: [a: 1 b: 2 (y 5) 6]
y: quote (quote (y 5))
c/:y
;== 6
c/(quote (y 5))
;== 6
; But
c/(y)
;== none
c/((y 5))
;== (y 5)
Semseddin Moldibi
@endo64
Good explanations @toomasv thanks!
nedzadarek
@nedzadarek

@greggirwin @toomasv thank you.

@toomasv right, I forgot about get words. Also good point about:

y: quote (y 5)
c/:y   ; But this gets the evaluated result of parens, which is 5, so 5th element
;== (y 5)
c/(y)  ; This selects as `select/only`
;== 6

I have not used get words with parens. I thought that everything is passed "as-is" (integer as integer, block as block etc). I mean you set some selector (for example: selector: 42) and you want to select value from collection based on that value not something evaluated or changed (only exception is any-word are treated the same). One reason to use one or another syntax (arr/:a vs arr/(a)).

Toomas Vooglaid
@toomasv
@endo64 @nedzadarek :+1:
Oldes Huhuman
@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?

Gregg Irwin
@greggirwin
@toomasv, great detailed notes. Worth a wiki page, or additions to official docs. Thoughts @gltewalt ?
Alan Macleod
@fergus4
I know network stuff is barely touched but is there a way to get local ip like in rebol : "system/network/host-address"
Boleslav Březovský
@rebolek
@fergus4 that's not possible yet AFAIK, but you use some free service, like
parse read https://ipfacts.info/ [thru "<h2>My IP Address" thru <p> copy ip to space] load ip
Greg T
@gltewalt
@greggirwin I think, start with Wiki Notes until further rumination
How to fold it into official docs calls for some more thinking. A wiki entry will preserve @toomasv content until there is a plan.
Gregg Irwin
@greggirwin
:+1:
nedzadarek
@nedzadarek
In the red/rep there are 30 issues but only 4 adocs. Should I just make an issue, and if we discus pros & cons of this, and we agree on something, I should make an adoc?
Gregg Irwin
@greggirwin
It should be done as a REP %.adoc. The issues were ported out of the main repo, just so they didn't get lost. The REP needs to lay out the enhancement in detail, rather than design-by-chat.
Semseddin Moldibi
@endo64
@rebolek It will not give you the local IP address.
read http://ident.me also gives you the non-local IP.
On windows, this will give the local IPv4 address
call/output "ipconfig" s: make string! 255
to tuple! copy/part pos: find/tail find s "IPv4 Address" ": " find pos "^/"
; == 192.168.0.16
nedzadarek
@nedzadarek
I see.
rebred
@rebred
a CGI script works fine when using red-063 but when I use red-13nov18-7404492a it hangs and doesn't run
Boleslav Březovský
@rebolek
@rebred what CGI script.
rebred
@rebred
#!/Library/WebServer/Documents/red-063
Red[]
print "Content-type: text/html^/"
print now/time
Boleslav Březovský
@rebolek
hm strange. Not sure why this shouldn't work