« first day (2125 days earlier)      last day (1655 days later) » 

12:05 AM
@iArnold If you are feeling adventurous you might get the CMakeLists.txt to work. Shixin and I are using that on Windows.
 
 
6 hours later…
6:00 AM
What is the current thinking on CHANGE in PARSE?
red> parse blk: [a][change a (reduce [5 * 5])] blk
red> parse blk: [a][change 'a (reduce [5 * 5])] blk
 
; Brought to you by: try.rebol.nl
== [25]
 
>> parse blk: [a][change a (reduce [5 * 5])] blk
>> parse blk: [a][change 'a (reduce [5 * 5])] blk
 
; Brought to you by: try.rebol.nl
== [reduce [5 * 5]]
 
I guess it's revisiting the what's the role of parens in parse? question once again. The Red behaviour is useful though.
As in, I could use it now and the Rebol 3 behaviour is not useful.
; Ren/C
>> parse blk: [a][change 'a (reduce [5 * 5])] blk
== [reduce [5 * 5]]
 
 
5 hours later…
11:07 AM
Hi! I need to compare two file contents, possibly in a smart way. Any useful code?
 
 
3 hours later…
2:18 PM
@giuliolunati There's this: reb4.me/r/simplediff
I had some notes on it here also:
5
Q: Implementing Simple Diff in Rebol

rgchris I've taken a crack at implementing Simple Diff in Rebol (versions 2 and 3). Simple Diff works by finding the longest common sequence in two series, then recursively applies itself either side of this sequence until there is nothing further in common. It returns a block containing additions (+),...

 
2:37 PM
Hm, DIFF in the above example is my first function to fall foul of the switch from NONE -> UNSET function locals default in Ren/C!
Have to explicitly set run: none in the function.
 
3:22 PM
@rgchris More useful in that it's more expressive. I guess in ordinary Rebol you do have to deal with foo bar (baz mumble) frotz and not know if (baz mumble) is run and then result ignored, or if it's an argument to foo... or to bar. So one could just say that parse has the same ambiguity. But it still bugs me.
I do think get and set groups need to exist. Even just (word): value can be a bit nicer than set word value.
And if I follow through with the idea that (something evaluating to function) arg arg will have word-semantics and call the function with the args, then get-groups would be a requirement.
 
Updated SimpleDiff so as to work in Ren/C, Red (albeit you need an ASSERT function and it'll choke on dates), Rebol 3 and Rebol 2.
2
 
So if they exist anyway, then using get-groups in the parse dialect for things where it's an argument to the instruction to be used seems like it could be prudent.
 
@HostileFork If you follow that logic, could it also be possible to do: parse "A" [:("A")]
parse "3AAA" [copy num some digit :(to integer! num) "A"]
 
@rgchris Possibly. Though maybe that would be done with parse "A" [:["A"]], just to make a distinction.
And you would get an error if you tried :( ) and it wasn't an argument to an instruction.
But the principal concern is just the used result vs. the unused one, so, maybe it's not necessary to do that distinction.
 
4:21 PM
@HostileFork That notation is taken for set-paths. In fact, a set-path is what you are trying to achieve:
>> ctx: system/contexts/user eval-word: 'a ctx/(eval-word): 7 print mold a
 
; Brought to you by: try.rebol.nl
7
 
IMHO in Rebol it is intended that all binding be explicit.
 
@MarkI It's certain that there's some ambiguity, and I still am not entirely sure if I believe in set paths... I still wonder about the question of if / is a quoting operator that chains things, and if there's such a thing as a "sink" value. (a / b: thus being equivalent to a/b: in functionality) It is already the case that path parsing does a load and transformation of a block with get-words at the beginning or set-words at the end to make a get-path or set-path
But anyway, a set-group! is useful, however it is accomplished.
 
@HostileFork I can imagine scenarios where it can look useful. But you are just talking about an infix SET that evals quoted groupings on its left. Me personally, I wouldn't choose ":" as the name for that.
 
4:46 PM
@rgchris Very cool!
 
5:25 PM
@HostileFork With Cygwin or with MinGW?
 
@iArnold CMake can be used in Visual Studio 2015 with no cygwin/mingw on Windows.
My modern experience with Windows has made me feel, even more grumpy-old-man about it. Windows is very convoluted and it seems to just be getting worse.
I dislike Apple's cultural policies, but OS/X is more sane.
 
Not thinking about installing Visual Studio on that piece of Iron.
Apple and MS it is getting bitten by the cat or by the dog.
2
 
MinGW was, at one time, about as lightweight as I guess you could get.
Well, I guess there's OpenWatcom.
(And TCC, though there's no real optimizer)
 
 
1 hour later…
6:47 PM
@iArnold mingw if you only want build; cygwin if you want a linux-like command-line environment
@HostileFork in chain [:a :b] b must be 1-arity?
 
7:35 PM
@giuliolunati It must be able to be called with a single argument, yes. (So it could be variadic and willing to take one argument or many). If you have suggestions for how it might be creatively interpreted otherwise, let me know...
 
8:32 PM
@HostileFork aesthetic note: maybe better inverted order? (chain [:c :b :a] x y z) = (c b a x y z)
@HostileFork and if a, b, c are 2-arity (chain [:c :b :a ] w x y z) = (c b a w x y z) -- every function takes extra args from stack
 
8:59 PM
@giuliolunati Hm, you mean extra arguments taken from arguments as if it were called normally? e.g. chain [:add :subtract] 1 2 3 would be zero, because add 1 2 is 3 and subtract 3 3 is 0?
I wonder if that's more likely to be useful or confusing. The thought I had would be that CHAIN's argument would be some kind of dialect to make trickier handling clearer.
 
 
1 hour later…
10:08 PM
@HostileFork but if we change semantic, so that chain [:b :a] execute b after a, then chain [:add :subtract] 1 2 3 gives (1 - 2) + 3 => 0, same as add subtract 1 2 3. IMHO easier to understand and remember.
Also in 1-arity case: I wish chain[:negate :exp] 0 => -1, not 1
because negate exp 0 => -1
 
@giuliolunati I see your point. It actually does have to run backwards in the dispatch: github.com/metaeducation/ren-c/blob/master/src/core/…
 

« first day (2125 days earlier)      last day (1655 days later) »