Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 26 15:21

    dockimbel on IO

    FIX: invalid arguments list to … FIX: URL links erroring out in … Merge branch 'master' into IO (compare)

  • Nov 26 14:41

    dockimbel on master

    FIX: URL links erroring out in … (compare)

  • Nov 26 12:23

    dockimbel on master

    FIX: invalid arguments list to … (compare)

  • Nov 25 18:17

    dockimbel on IO

    FIX: on-deep-change event firin… FIX: on-deep-change triggering … CI: update some actions. and 55 more (compare)

  • Nov 25 18:07

    dockimbel on IO

    FIX: on-deep-change triggering … CI: update some actions. FIX: removes leftover code. Th… and 47 more (compare)

  • Nov 25 18:06
    dockimbel commented #77
  • Nov 25 18:00
    hiiamboris commented #77
  • Nov 25 17:56
    dockimbel commented #77
  • Nov 25 17:15
    hiiamboris edited #77
  • Nov 25 17:05

    dockimbel on master

    FEAT: adds support for REFLECT … (compare)

  • Nov 25 16:53

    dockimbel on master

    FIX: on-deep-change event firin… FIX: on-deep-change triggering … Merge branch 'master' into on-d… and 20 more (compare)

  • Nov 25 16:26

    dockimbel on on-deep-fixes

    FIX: removes leftover debugging… FIX: issue #5241 (Rounding erro… FIX: better default height for … and 2 more (compare)

  • Nov 25 16:13
    dockimbel closed #4166
  • Nov 25 15:34
    dockimbel commented #4166
  • Nov 24 19:13

    dockimbel on on-deep-fixes

    TESTS: adjusts test results for… (compare)

  • Nov 24 14:57
    hiiamboris labeled #5245
  • Nov 24 14:57
    hiiamboris labeled #5245
  • Nov 24 14:57
    hiiamboris opened #5245
  • Nov 24 04:37
    qtxie closed #5244
  • Nov 24 04:37
    qtxie labeled #5244
Nenad Rakocevic
@dockimbel

@gltewalt

I think we need this: http://www.rebol.com/r3/docs/functions/title-of.html

Why?

Nenad Rakocevic
@dockimbel

@zinid

Yeah, but duck typing is a real problem, I full of this in Erlang and Python

There is no duck typing in your code example or the code version Peter posted above. Peter just set the word now in global context to 2, so that the conditional expression then returns true.

Nenad Rakocevic
@dockimbel
@maximvl Here is a "capture by reference" closures generator. I think it should also "reset" the external words to their initial values on each call of the closure.
Evgeny Khramtsov
@zinid
Boleslav Březovský
@rebolek
@zinid There can't be only 5 Red repos when I alone have six of them ;)
Nenad Rakocevic
@dockimbel
@zinid I count about 24 there: https://github.com/trending/red
Evgeny Khramtsov
@zinid
@rebolek that's strange I got only 5, whatever
seems like a problem in github search
Nenad Rakocevic
@dockimbel
@zinid You query returns 15 results here. Seems github searching feature is really flawed.
Evgeny Khramtsov
@zinid
yep
Boleslav Březovský
@rebolek
well, we have Github API (both REST and GraphQL), so we can build or own search functions :)
Nenad Rakocevic
@dockimbel
@rebolek Could it be possible to build a good Gitter searching tool? (because the existing search field on Gitter is really a joke)
Boleslav Březovský
@rebolek
@dockimbel Of course, there are basic search tools in gitter-tools that work much better (over downloaded data) than Gitter search. There's just no GUI for it yet, I will try to add it, when I've got some time.
Nenad Rakocevic
@dockimbel

@dockimbel

@maximvl Here is a "capture by reference" closures generator.

Sorry, I meant "capture by value".

Vladimir Vasilyev
@9214
@rgchris cheers!

Could it be possible to build a good Gitter searching tool?

oh god yes please

François Jouen
@ldci
Hi, RedCV library is updated for Red 0.6.3 here: https://github.com/ldci/redCV
Maxim Velesyuk
@maximvl
@dockimbel in this example I would expect state to flip it's value:
>> x: closure [z /local state] [ probe state: not state z + y ]
== func [z /local state][probe state: not state z + y]
>> x 1
true
== 6
>> x 2
true
== 7
>> x 3
true
== 8
otherwise looks very good
BeardPower
@BeardPower
Does anyone know, if q-plot was already ported to Red or if there is another plot/chart lib for Red?
Boleslav Březovský
@rebolek
@BeardPower I have one, but it is unreleased currently.
BeardPower
@BeardPower
@rebolek Nice. A port or a different lib? Are you planning to release it?
Boleslav Březovský
@rebolek
@BeardPower yes, I want to release it together with text-table, once GC is ready. It is not a port, it is written from scratch for Red.
Maxim Velesyuk
@maximvl
@dockimbel forget my example, it's not relevant
it's good enough:
>> adder: func [x] [ closure [y] [ x + y ]]
== func [x][closure [y] [x + y]]
>> adder-2: adder 2
== func [y][x + y]
>> adder-2 3
== 5
>> adder-2 4
== 6
>> adder-2 5
== 7
>> adder-5: adder 5
== func [y][x + y]
>> adder-5 1
== 6
>> adder-5 3
== 8
>> adder-2 5
== 7
I was thinking about having state in a local context, where in lisps I would use let, but in Red it's just a context :D
Maxim Velesyuk
@maximvl
>> myf: select context [state: off f: closure [x] [ probe state: not state x ] ] 'f
== func [x][probe state: not state x]
>> myf 1
true
== 1
>> myf 2
false
== 2
>> myf 3
true
== 3
but the way contexts work this will work with just any function
suddenly things are quite simple
Vladimir Vasilyev
@9214
@maximvl why use select?
>> myf: context [state: off f: closure [x][probe state: not state x] return :f]
== func [x][probe state: not state x]
>> myf 1
true
== 1
>> myf 2
false
== 2
Maxim Velesyuk
@maximvl
hm
because I see context as an object which has only fields inside
can you actually write any kind of code there?
Vladimir Vasilyev
@9214
spec is evaluated before actual object is constructed
Maxim Velesyuk
@maximvl
>> context [x: 5 return 2 + x]
== 7
is it ok to do things like this?
is return somehow special or how does it work?
this is an interesting feature, but I need some clarification on details :D
I have a feeling that return, break, continue and others work somehow differently in Red
Boleslav Březovský
@rebolek
@maximvl That’s interesting, I would have expected error here. However you can have code in context definition:
>> context [x: 5 print 2 + x]
7
== make object! [
    x: 5
]
Maxim Velesyuk
@maximvl
in "regular" language semantics I would expect the following code to return 7
z: func [] [ context [x: 5 return 2 + x ]  100]
z
while in Red it's 100
meaning return doesn't return from z but from something else
PeterWAWood
@PeterWAWood
I think it is a bug in the context function, a type of Red Injection attack.
>> make object! [x: 5 return x + 2]
*** Throw Error: return or exit not in function
*** Where: return
*** Stack:  

>> context [x: 5 return 2 + x]
== 7
>>
Vladimir Vasilyev
@9214
>> z: func [] [return context [x: 5 return 2 + x ] 100]
== func [][return context [x: 5 return 2 + x] 100]
>> z
== 7
@PeterWAWood so you say that I used injection attack in my code? :O
here, if some field in constructed object is none, I return none instead of that object
oh, but turns out it doesn't work with make reactor! :D
PeterWAWood
@PeterWAWood
Rebol ignores a call of return in a context arg.
>> o: context [x: 5 return 2 + x]
>> context [x: 5 return 2 + x]                               
>> probe o
make object! [
    x: 5
]