Archived messages from: gitter.im/red/sandbox from year: 2017

geekyi
14:31Native windows touch keyboard emojis: 🙂😊😎 relatively new: 🤣👷🙇🙌

gltewalt
07:19/topic ???
geekyi
16:39@gltewalt this is a sandbox.. you can do anything here. Check out the gritter client by bolek

gltewalt
23:02###Ok
23:02~one
23:04'Tester'

gltewalt
05:28Can send images with this?
geekyi
05:40@gltewalt yes, Ctrl+Shift+M for markdown help
05:41Drag and drop, paste from clipboard also works for me too
gltewalt
05:41I'm on mobile currently
geekyi
05:42Ah then, I'm not sure.. mobile seems to be lacking in features I think. Which client?
07:06[click me](javascript:rickRoll() and [me](javascript:1+2)
gltewalt
07:16iOS app
07:17On my notifications it shows the rickroll link, though it doesn't show here

gltewalt
00:19[Title]VSCode Red(https://marketplace.visualstudio.com/items?itemName=red-auto.red)
00:22[title]ok[/title](http://localhost/)
00:23[title]Ham(https://marketplace.visualstudio.com/items?itemName=red-auto.red)
geekyi
03:54On browsers, there is a useful feature *Quote*, inside the the 3 dot options menu, on the right in every msg, like here -----> ---^
gltewalt
03:56Time to get on a browser
03:58All of my messaging is through an old swatch at the moment
geekyi
04:00:point_up: [January 24, 2017 5:19 AM](https://gitter.im/red/sandbox?at=58869d8711e7a7f61dd6d8e2) trying to test for bugs, or BB Code?
gltewalt
04:05Trying to do the bloody MD for a link, like you did for "click me"
geekyi
04:06[text](javascript:blah blah)
gltewalt
04:08Whitespace after [ ] ?
04:08[click it] (http://localhost/)
04:09Bah.... I'll get on a real computer in awhile
04:11[Go](javascript:alert("GO!");)
geekyi
20:14:point_up: [January 19, 2017 7:31 PM](https://gitter.im/red/sandbox?at=5880cdb0e836bf70106495b9)🤔is one of the more useful emoji I've been waiting for more widespread support :thought_balloon:

gltewalt
02:11https://dev.to/pavsaund/rituals-of-shaming-in-the-software-industry
greggirwin
04:07Good read. Thanks @gltewalt.

geekyi
14:58#testopic
gltewalt
18:33👍🏻

gltewalt
23:20Hack Brief: A Slack Bug Could Have Been Everyone’s Worst Office Nightmare - WIRED
https://apple.news/AA8u0GirtSiarKxcQWlzmvg

gltewalt
18:44http://www.theverge.com/2017/3/2/14792442/amazon-s3-outage-cause-typo-internet-server

geekyi
06:39At the time this happened, some of the avatars didn't display for me.. I was weirded out

gltewalt
20:46![Google logo](http://www.google.com/images/logo.gif "The Google logo")
20:48![Google logo](C:\Users\Old Man\Desktop\It_Built.gif "The Google logo")
20:50![Google logo](file:///C:\Users\Old Man\Desktop\It_Built.gif "Hmmm")

gltewalt
22:55Saw that john sonmez character at Boise Code Camp

gltewalt
06:39
ascii-talk: func [str [string!]][
    foreach c str [prin [to-integer c space]]
]
09:20foreach c [84 104 97 110 107 115] [prin to-char c]

gltewalt
22:02"Object-oriented design is the roman numerals of computing." - Rob Pike

gltewalt
05:48Can we send images?
geekyi
06:28@gltewalt cntrl + shift + m
06:29![]()
gltewalt
06:37Already closed the laptop down in disgust for the night. I think there's some weirdness going on with the Edit timer

gltewalt
21:59https://www.google.com/amp/s/www.wired.com/2017/04/arduinos-new-ceo-federico-musto-may-fabricated-academic-record/amp/

gltewalt
10:06Gahhh! ... toasted my lappy temporarily. Deleted my Linux partition, reclaimed the space with windows, and forgot to fix the boot loader before rebooting
greggirwin
16:58Oh no! I hate it when stuff like that happens.

gltewalt
00:42Fixed. They have 8GB USB at Walgreens marked down to 5 bucks right now - so I made a rescue image

geekyi

gltewalt
22:14https://developer.yahoo.com/yql/#js

gltewalt

rebolek
13:16test
14:14test
gltewalt
rebolek
14:19now bug
14:27how to trigger it...
14:27test
14:27test
gltewalt
14:46Have it give weather report via Yahoo Query Language
rebolek
14:49Hm, why not...do you have any link to documentation?
gltewalt
14:52https://developer.yahoo.com/yql/#js
14:53https://developer.yahoo.com/yql/guide/
15:00Weather for Nome, Alaska. Returned as json

https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22nome%2C%20ak%22)&format=json

geekyi
09:58 Adding to what I said above :point_up: [April 20, 2017 2:28 PM](https://gitter.im/red/red?at=58f87f2a881b89e1016a9d7b)
J has the most convenient style for [numeric constants](http://www.jsoftware.com/help/dictionary/dcons.htm)
(apart from using _ for negative numbers, which I'm indifferent about)
09:59Adding to what I said above :point_up: [April 20, 2017 2:28 PM](https://gitter.im/red/red?at=58f87f2a881b89e1016a9d7b) j
09:59> Adding to what I said above :point_up: [April 20, 2017 2:28 PM](https://gitter.im/red/red?at=58f87f2a881b89e1016a9d7b)
J has the most convenient style for [numeric constants](http://www.jsoftware.com/help/dictionary/dcons.htm)
10:00Adding to what I said above :point_up: [April 20, 2017 2:28 PM](https://gitter.im/red/red?at=58f87f2a881b89e1016a9d7b)
(apart from using _ for negative numbers, which I'm indifferent about)
10:00I think I broke the html parser..
10:01[![image.png](https://files.gitter.im/red/sandbox/EVLx/thumb/image.png)](https://files.gitter.im/red/sandbox/EVLx/image.png)
rebolek

gltewalt
17:18It's impossible to google for, or search YouTube for, this language. :smile:
http://iolanguage.org/index.html
17:19io <anything> returns a dense forest of unrelated trees
greggirwin

geekyi
01:39Oh, if you're trying it out, let me know @gltewalt maybe we can help each other. I was wondering, maybe we can do this like once a week? Try out a new language?
gltewalt
07:24 Could, but I won't get very far if it's switched up once a week. (Well, I probably won't get very far anyway lol)
07:24Haven't tried it yet - just looking
07:26I had just started into Elm for about two weeks when I came to Red. And I haven't been back.
I have Elixir vids and the Dave Thomas book, but haven't gotten around to it, cuz... redbol
07:27If you want to taste test stuff once a week - ok
geekyi
08:29@gltewalt
08:31Once a month maybe then? Actually, I want to try 7 languages in 7 weeks.. If the community work together, we could overcome hurdles faster..
09:54$$pi$$
09:54$$\pi$$
10:03 _ _
10:05test_this
thing _ again
10:06So caused by _underscores_ and perhaps some*other * stuff?
gltewalt
19:13Oh. What's in the 7 weeks book?
19:27Here's some blasphemy for you:
Block is a singleton containing a doubly linked list, a couple other special slots, and copied series traversal methods
20:48@geekyi if you buy me a used Mac mini we can explore Swift
geekyi
20:49@gltewalt what about me? :p
gltewalt
20:49You can buy yourself one too. That's fine.
geekyi
20:49Hehe
greggirwin
20:50@gltewalt , I have an oooooold mini here. If you promise to use it for the greater Red good, we can work something out.
gltewalt
20:52Hey... maybe try to make a mobile app via Visual Studio and Xamarin. Via Mac mini
20:53I think... you have to do final stage stuff into some sort of Mac with xamarin if you want an iOS app.
I'll have to look back into it
geekyi
20:53> Oh. What's in the 7 weeks book?

[Ruby Io Prolog Scala Erlang Clojure Haskell]
the sequel: [Lua Factor Elm Elixir Julia miniKanren Idris]
gltewalt
20:54First book might be fun
20:54I'm highly doubtful that I'm smart enough for Haskell though. :worried:
geekyi
20:54I know some of them already, and have downloaded and setup interpreters for most others
greggirwin
20:55I like to think I'm *too* smart for Haskell. ;^) Funny how some langs just won't click in my head.
geekyi
20:55Nonsense! Haskell is pretty simple. Just Monads might be a complicated way of describing a simple thing
gltewalt
20:55@greggirwin how cheaply would you sell the OLD one?
20:57I looked at monad a few times. I think it's just an "object". A funnel for all destructive things to happen in
greggirwin
20:58@gltewalt, we can talk about it.
gltewalt
20:58like a mini sandbox. I say object because it combines State and Functions
20:59The reason I started with Elm is because I think I'm not smart enough for Haskell :-D
geekyi
20:59You're correct, more or less. It's something you can use to manage *state* (among others), in a *pure functional world*
21:00Elm might be better, I don't know..
21:00The last 3 langs I mentioned is really interesting, I'm need to level up to those
gltewalt
21:01Julia, etc?
geekyi
21:01Yeah
greggirwin
21:01The closest thing to monads, that my brain doesn't choke on, is something like symbolic computing. The inner stuff doesn't have to know about the outer stuff, and can ignorantly take in and return stuff it doesn't really understand.
gltewalt
21:01Never heard of the other 2
geekyi
21:02minikanren is an alternative way to do prolog, Idris is a more advanced version of Haskell, related to Agda, Epigram and Coq
gltewalt
21:03Elixir will trip you on your face right out of the gate. (Well, trip most folks)
The way assignment is done is pattern matching
geekyi
21:04You can effectively divide all those into 3 families: Prolog, Lisp and Haskell (Logic, Symbolic, Functional)
gltewalt
21:05What's good from Elixir that Red could consider: bit fields are characters are strings.
"cat" would really be something like 000110100 under the hood
geekyi
21:06Julia is more data type oriented like Redbol tho, and Idris has what's called dependant types, and can prove math automatically
21:07@gltewalt I don't understand..
21:08> "cat" would really be something like 000110100 under the hood

How would that be different from Red? :smile:
gltewalt
21:08It's built up from the bit field "type". There really is no String. Or spoon
21:12I know 'under the hood' all computer talk is 0001101... lol
greggirwin
21:17
>> _1: charset "cd"
== make bitset! #{00000000000000000000000018}
>> _2: charset "ao"
== make bitset! #{0000000000000000000000004001}
>> _3: charset "tg"
== make bitset! #{000000000000000000000000010008}
>> rule: [_1 _2 _3]
== [_1 _2 _3]
>> parse "cat" rule
== true
>> parse "dog" rule
== true

:^)
gltewalt
21:19Mhmm. Imagine if string! Was bitset!
greggirwin
21:20You could build a lib like that.
21:20Not sure what the value is though.
gltewalt
21:34Value might be one old Mac Mini
greggirwin
gltewalt
21:34I'll put up the vids I have in a Dropbox, later - if you guys want to browse through and see
greggirwin
21:35Can you sum up what the big win is? What does it allow that we don't have now?
gltewalt
21:36What I find happening lately is that I have four or five ideas for Red projects and not enough time to dig into one and hack away. :smile:
21:37What we have now is -- your have to dig down to find the ascii value or the binary value, etc. The info is expressed directly over there and you "build up" to express strings and strings of different encodings, etc
greggirwin
21:39OK, maybe I do need more info. Not clicking.
21:39Concrete example?
gltewalt
21:51Driving around at the moment
22:57Check out data-types.mp4 (at the 1 minute 3 second mark), or binary.mp4

https://www.dropbox.com/sh/qok9nywvlum4fhb/AAA15d8vT6PAC54bTSSYcvFsa?dl=0

greggirwin
02:08That's just our binary! though, isn't it?
gltewalt
03:24Is it?
greggirwin
03:40
>> to binary! "Hello"
== #{48656C6C6F}
>> enbase/base "Hello" 2
== "0100100001100101011011000110110001101111"
gltewalt
03:42Sort of. If strings were binary!
greggirwin
03:43They are, encoding aside.
>> 2#{0100100001100101011011000110110001101111}
== #{48656C6C6F}
>> to string! 2#{0100100001100101011011000110110001101111}
== "Hello"
gltewalt
03:48Different type
greggirwin
03:50Yes. What I still don't know is what you can do with them in Elixir. What makes them cool or useful?
gltewalt
04:04Directly express binary stuff or text without jumping through type conversions.
TCP/IP packets, SYN flooding @geekyi, direct machine code if you feel like it I reckon. Bit fiddling. Pattern matching bits. Modem commands.
Since strings 'are' binaries it's one seamless thing, or blob of functionality.

Im sure Red covers all those bases - it's just a different approach. Libs built up on binary vs. many different types. It cuts out the need for a lot of conversion functions.

Or maybe... I'm just goofy
geekyi
04:12@gltewalt I'm not exactly sure how things are exactly represented in red. But in c and red/system too I believe, it's really quite close to the metal
greggirwin
04:12Do you have some examples?
geekyi
04:12I'll have to check it out myself.. I've understood more recently how binary works under the hood as I've been teaching myself assembly..
gltewalt
04:15http://www.zohaib.me/binary-pattern-matching-in-elixir/
geekyi
04:21I think we don't have binary pattern matching in red *yet* afaik, not sure tho
greggirwin
04:28Had to take a call, and juggling code bits too.
04:33Very helpful example. That would just be a dialect in Red.
gltewalt
04:38I don't have any personal fancy examples
04:40Seems like every time some 'thing' gets brought up, so far, a guru shows how it's easily modelled in Red.
greggirwin
04:41The difference is that Elixir seems to have a very union-like view of the data, where Red thinks in terms of distinct types as a key value proposition.
04:41A dialect is where you can hide those details, in a controlled way.
04:43And parse works on binary data just fine. Maybe Oldes or Bolek will jump in with examples. I have tinkerings somewhere, but don't think any of them are complete.
gltewalt
04:48Yep. Union like
05:08Wanna see an olllld (and technically incomplete) 99 Bottles of Beer, by me back in 2005 ? :smile:
05:08http://www.99-bottles-of-beer.net/language-ruby-670.html
05:12I laughed when I saw this Rebol example. Takes their own webpage of lyrics and gives it back to them. lol
http://www.99-bottles-of-beer.net/language-rebol-2432.html
05:16And this is my fav out of any I've yet seen:
http://www.99-bottles-of-beer.net/language-haskell-1070.html
greggirwin
05:16I wonder how I'd write mine today?
gltewalt
05:17How long had you been Reboling at that point?
greggirwin
05:17I found Rebol in 2001.
gltewalt
05:18We both submitted in 2005 :smile:
05:19I was living in Denver then
greggirwin
05:19I was sitting exactly where I am now.
05:19Low inertia. :^)
gltewalt
05:20I want to do entries for rosetta code, but embarrasingly... it's too confusing to make a submission, to me
05:21Or it was back when I mentioned it before and you helped me solve that one- then I got sidetracked and havent been back
05:23Hmmm... maybe submit a Red version? (99 bottles)
greggirwin
06:03No special case handling, but you get the idea.
sing: function [input][
	input: copy input
	n: orig-num: first input
	sing-verse: func [n][
		print [
			n =phrase "on the wall," n =phrase ".^/"
			"Take one down and pass it around," n - 1 =phrase "on the wall.^/"
		]
	]
	sing-last-verse: does [
		print [
			"No more" =phrase "on the wall, no more" =phrase ".^/"
			"Go to the store and buy some more," orig-num =phrase "on the wall."
		]
	]
	
	phrase: [copy =phrase to end]
	rule: [
		set n quote 0 phrase (sing-last-verse)
		| change set n integer! (n - 1) phrase (sing-verse n)
	]
	while [n > 0][parse input rule]
]
sing [99 bottles of beer]
sing [7 carafes of wine]
06:25Wait! I think I know Haskell now! ;^)
bottles: func [n][
    switch/default n [
        0 ["no more bottles"]
        1 ["1 bottle"]
    ][form reduce [n "bottles"]]
]

verse: func [n][
    either n = 0 [
    {No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.}
    ][
        form reduce [
            bottles n "of beer on the wall," bottles n "of beer.^/"
            "Take one down and pass it around," bottles (n - 1) "of beer on the wall.^/"
        ]
    ]
]

repeat i 100 [print verse 100 - i]
gltewalt
07:07I was just trying out case and some weird takes on the beer song - and... laptop ran out of juice
07:07Those are cool versions
20:08@greggirwin
decrement-count: does [count: count - 1]

choose-words: does [
    case [
        count > 1 ["bottles"]
        count = 1 ["bottle"]
        count < 1 ["no more bottles"] ;how do I use change to wipe out the 0 value ?
    ]
]

refrain: [count choose-words "of beer on the wall," count choose-words "of beer."
crlf "Take one down and pass it around," decrement-count choose-words "of beer on the wall."]

coda: {No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.}

count: 99
while [count > 0][
    print refrain
]
print coda
20:13And is there like a tertiary function that could be combined with pick?
pick ["bottles" "bottle" "no more bottles"]
20:18Ternary I meant lol
23:08
decrement: does [count: count - 1]
choose-words: does [case [count > 1 "bottles" count = 1 "bottle" count < 1 "no more bottles"]]

refrain: [count choose-words "of beer on the wall," count choose-words "of beer."
crlf "Take one down and pass it around," decrement choose-words "of beer on the wall."]

coda: {No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.}

count: 99
loop count [print refrain]
print coda
greggirwin
23:46Nice. Either is the common ternary function in Red. You want one more case than that. This isn't as nice as yours. Too tricky.
>> word-idx: does [any [attempt [index? find [0 1] count] 3]]
== func [][any [attempt [index? find [0 1] count] 3]]
>> count: 0 pick ["no more bottles" "bottle" "bottles"] word-idx
== "no more bottles"
>> count: 1 pick ["no more bottles" "bottle" "bottles"] word-idx
== "bottle"
>> count: 99 pick ["no more bottles" "bottle" "bottles"] word-idx
== "bottles"
gltewalt
23:55I just saw the nested either technique
23:56There's a problem in mine the count of 0 remains in the refrain
23:57song for all occasions lol

[count item preposition thing place "," count item preposition thing crlf action "," count item preposition thing place]

greggirwin
gltewalt
00:19Can I dig 0 out of there with change? Right now it prints "0 no more bottles..."
00:20Or maybe our good friend trim/with
geekyi
16:53 @gltewalt next?
gltewalt
18:02I dunno...
18:02
get-words: does [case [count > 1 "bottles" count = 1 "bottle" count < 1 "no more bottles"]]
dec-count: does [count: count - 1]

refrain: [count get-words "of beer on the wall," count get-words "of beer."
crlf "Take one down and pass it around," dec-count get-words "of beer on the wall."]

coda: {No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.}

count: 3
loop count [print refrain]
print coda
18:02maybe i'll post it in Help
18:05after it's done printing it's easy to chop the value out. poke refrain 9 ""
But it no worky during run time
greggirwin
18:29You're always including the result of dec-count.
18:29
get-words: does [case [count > 1 "bottles" count = 1 "bottle" count < 1 "no more bottles"]]
dec-count: does [count: count - 1]

refrain: [count get-words "of beer on the wall," count get-words "of beer."
crlf "Take one down and pass it around," either zero? dec-count [""][count] get-words "of beer on the wall."]

coda: {No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.}

count: 3
loop count [print refrain]
print coda
gltewalt
18:30Yeah. Chicken and egg problem though
greggirwin
18:31Not sure what you mean.
18:32Cleaner to take it OOB.
18:32
get-words: does [case [count > 1 "bottles" count = 1 "bottle" count < 1 "no more bottles"]]
dec-count: does [count: count - 1  either zero? count [""][count]]

refrain: [count get-words "of beer on the wall," count get-words "of beer."
crlf "Take one down and pass it around," dec-count get-words "of beer on the wall."]

coda: {No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.}

count: 3
loop count [print refrain]
print coda
gltewalt
18:32dec-count is a function, so it's after it gets evaluated that the 0 is a value in the block
greggirwin
18:33Well, this is the issue with code golf versus real code.
gltewalt
18:33I tried to work within the dec-count block but I couldn't figure it out lol
greggirwin
18:34
get-words: does [case [count > 1 "bottles" count = 1 "bottle" count < 1 "no more bottles"]]
dec-count: does [either zero? count: count - 1 [""][count]]

refrain: [count get-words "of beer on the wall," count get-words "of beer."
crlf "Take one down and pass it around," dec-count get-words "of beer on the wall."]

coda: {No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.}

count: 3
loop count [print refrain]
print coda

Cleaner still.
gltewalt
18:35dec-count: does [count: either count > 0 [count - 1] [count: ""]]
18:35That didnt work
greggirwin
18:35Of course not. You're changing count to "".
gltewalt
18:36Yeah, cuz I'm dumb
greggirwin
18:36If you never called that func again, you'd be OK.
gltewalt
18:36Cant compare a number to ""
greggirwin
18:36You just made a mistake. Dumb lasts longer.
gltewalt
18:37I remembered you showing me the conditional assignment before -- I was just getting it wrong
greggirwin
18:38Easy to do.
gltewalt
18:40And your final example is bending my brain a little
18:43Ok, it sank in
greggirwin
18:44:^) Have to go do some paying work now. :^(
gltewalt
18:44ok, have fun

gltewalt
06:01Who likes the matrix? (I wonder if draw could handle this)
https://youtu.be/S1TQCi9axzg

geekyi
04:36@gltewalt maybe with the new text-box rich-text object
04:40@gltewalt is dumb. 'TIL you could s/ stuff/ like this/
04:41 s/now smarter/now smarter
04:42:smile: unfortunately works with the last message only.. Now I can at least edit on mobile tho
gltewalt
04:47Mobile is still horrid
geekyi
09:33https://en.wikipedia.org/wiki/Refinement_%28computing%29#Refinement_types
09:35While researching, I realized there's another (actually similar) formal meaning to refinement in computing
greggirwin
15:49Nice find. Aligns with DbC.
gltewalt
22:43https://imgur.com/gallery/jeifK
22:44@geekyi Isn't that definition of Refinement like a Guard ?
22:45Can I use redbol refinements like guards?
22:46is /refinement just a convention or is / a switch in the func of func ?
geekyi
22:47@gltewalt In fact, that's how i understood them internally in my mind initially, but you know redbol /refinements are more flexible than that
22:49What's more interesting is refinement types, listed on the same page. You can use them for really cool things. That is one step on the way to dependent types
gltewalt
22:49It didn't dawn on me that they were guard-like
geekyi
22:51Maybe because of my haskell background :smile:
gltewalt
22:51Maybe throw that link and discussion into Red/Docs ?

geekyi
15:47@geekyi tests
9214
16:09https://gist.github.com/9214/90268a5f5e4fc8b17f04a765b1fd5a2a

gltewalt
01:34https://i.imgur.com/G6h6JxF.jpg

gltewalt
23:44https://www.codeproject.com/Articles/8128/Writing-Your-Own-GPS-Applications-Part-I

greggirwin
00:17"Commercial grade", "stripped of error handling for brevity". :^)
00:17Good link.
gltewalt
00:25Error handling is for chickens
greggirwin
01:37Is that a metaphor for Erlang processes running around without heads?
gltewalt
04:49lol, might be a good slogan for Ericsson

gltewalt
03:42
explode!: func [str [series!] /local coll][
    coll: copy []
    if not string? str [str: form str]
    foreach c str [append coll c space]
    return coll
]
03:52Pointless code play
>> x: explode! "The cat came back"
== [#"T" #"h" #"e" #" " #"c" #"a" #"t" #" " #"c" #"a" #"m" #"e" #" " ...
>> loop (length? x) [prin x/(random length? x)]
acct ee aabc emkb
rebolek
05:11foreach c str [append coll c space] <- space here does nothing
gltewalt
05:14It doesn't?
05:16Ah... artifact from first attempt that I didn't change/remove
05:35Thanks :+1:
zipteye:~/workspace $ ./red
--== Red 0.6.2 ==-- 
Type HELP for starting information. 

>> do %snippets.red
== func [coll [any-block!] type [datatype!]][parse coll [collect any [keep type | skip]]]
>> explode! "car"
== [#"c" #"a" #"r"]
>> explode! <one two skidoo>
== [#"<" #"o" #"n" #"e" #" " #"t" #"w" #"o" #" " #"s" #"k" #"i" #"d" #"o" #"o" #">"]
>> source explode!
explode!: func [str [series!] /local coll][coll: copy [] 
    if not string? str [str: form str] foreach c str [append coll c] return coll
]
>>
9214
05:40@gltewalt
>> explode!: function [str [series!]] [collect [foreach c form str [keep c]]]
== func [str [series!] /local c][collect [foreach c form str [keep c]]]
>> explode! "abracadabra!"
== [#"a" #"b" #"r" #"a" #"c" #"a" #"d" #"a" #"b" #"r" #"a" #"!"]
>> explode! "I'm a Scatman! Ski-Ba-Bop-Ba-Dop-Bop."
== [#"I" #"'" #"m" #" " #"a" #" " #"S" #"c" #"a" #"t" #"m" #"a" #"n" #"!" #" " #"S" #...
05:41maybe it could be done with split...
gltewalt
05:41cant split because what would be the delimiter?
05:42Looks like form isn't needed
9214
05:43split takes character! as a delimiter, but you can't make it split between characters.
gltewalt
05:44Yep. Thus, explode!
rebolek
05:44Maybe split should support none as delimiter to explode!?
gltewalt
05:44That would have been handy
05:53Can we petition for split to accept none?
rebolek
05:55@gltewalt That depends how much value it adds.
05:55What is block of chars good for?
gltewalt
05:57Not sure of the use cases, but I wanted to do it. Couldn't, so explode! happened. It's fun.
05:58I think I saw it in another language because strings were not a series, and it was used to traverse a string like an array
05:59It wasn't called explode!, but the idea was the same
06:01If you explode! a series, you can use path notation on all series -- that's one thing
9214
06:03
>> str: "abc"
== "abc"
>> str/1
== #"a"
>> str/2
== #"b"
gltewalt
06:03
>> s: @rebolek
== @rebolek
>> s/1
*** Script Error: cannot access 1 in path [script invalid-path]
*** Where: catch
>> s: explode! @rebolek
== [#"@" #"r" #"e" #"b" #"o" #"l" #"e" #"k"]
>> s/1
== #"@"
>>
06:04
>> series? s: @rebolek
== true
9214
06:04
>> s: @gltewalt
== @gltewalt
>> s: form @gltewalt
== "@gltewalt"
>> s/1
== #"@"
rebolek
06:04Actually, it works in Rebol, so I think Red should support it also:
>> a: ab@cd.ef
== ab@cd.ef
>> a/1
== #"a"
9214
06:06email! should be series! ?
gltewalt
06:06It's in the typeset
06:07*shrug*
9214
06:08
>> series? x: my@mail.com
== true
>> x/1
*** Script Error: cannot access 1 in path [script invalid-path]
*** Where: catch

then this is inconsistent behavior, I thought path notation should work on any series! value
gltewalt
06:08So path notation works on all series in Rebol?
9214
06:10
>> x: %file.foo
== %file.foo
>> x/1
== %file.foo/1
>> x/2
== %file.foo/2
>> x/3
== %file.foo/3
>> series? x
== true

huh?
06:11same with url!
rebolek
06:15That makes sense.
9214
06:15@rebolek you mean file! and url! cases?
rebolek
06:16@9214 file! and url!
9214
06:16ah, right
rebolek
06:16It is for things like
path: what-dir
foreach file read path [print path/:file]
gltewalt
06:18
>> series? x: <one two>
== true
>> x/1
== #"o"
06:25Can you access this?:
https://preview.c9users.io/zipteye/play_pen
rebolek
9214
gltewalt
06:27https://ide.c9.io/zipteye/play_pen
rebolek
06:28This one wants me to login.
gltewalt
06:29Does it have a github option?
06:29(Trying to figure out the sharing things)
9214
06:31there's github option, but it still requires signing with email and stuff :confused:
rebolek
06:31@gltewalt it does, but after using it, it wants me to create account.
gltewalt
06:31That's no good
rebolek
06:31I don't mind creating an account, but it wants my credit card info also.
9214
06:32:suspect:
gltewalt
06:32Don't worry about it, you dont have to
rebolek
06:33It cannot be skipped, so bad luck.
gltewalt
06:34I'm doing more reading
07:36Be back tomorrow to make more mistakes and break stuff :smile:
rebolek
07:37:fire:
gltewalt
23:22Looks like sharing can only be done between Cloud9 members now. And they make people sign up with CC info because someone was abusing all of their resources.

geekyi
19:16Oh man.. I should have signed up before :worried:
19:18@geekyi wonders if there's any way to optimize the sign up process.. And not get spam
gltewalt
21:48Optimise?
21:50I haven't gotten spam yet from it. Uncheck any "send me" boxes.
I put card info in there that's valid, but there's no money in the account. And it isn't set up to draw from any other accounts if it gets hit.
I wonder if a bogus but syntactically correct card entry would do?

9214
12:39Updated and tweaked my spoony script https://gist.github.com/9214/1dd30a88383a3e46edf45e33e9def3a7
gltewalt
22:30What is this?
https://imgur.com/gallery/Xwvb5

rebolek
05:08A computer from behind.
gltewalt
05:09Turns out it's a DisplayPort port
rebolek
05:12Yes, looks like one :)

gltewalt
22:29https://imgur.com/a/FdOnP

geekyi
12:09@gltewalt *Millenium Edition*. Or Fixed point attractor, aka self reference? :p
12:10"I am a strange loop"
9214
12:312deep4me :P
gltewalt

gltewalt
19:14“The best thing about a boolean is even if you are wrong, you are only off by a bit.”- Anonymous
greggirwin

gltewalt
02:06Isn't this terribly low?
https://imgur.com/a/Dghty
greggirwin
02:50Things are relative. 1 year of experience isn't much, and that's a decent amount of money. I'm often shocked at what the market will bear when it comes to what we do. Don't get me started. ;^)
rebolek
04:56Low? Wow.
gltewalt
05:34Depends on the region. Low for Silicon Valley or San Francisco
05:39I did some poking around
greggirwin
16:40Of course, those are some of the most expensive places to live. Hence, relative.
gltewalt
18:19Right below nampa

geekyi
08:15TIL: you can view and edit memory with process hacker 2
08:16@geekyi levels up twice :smile:
08:17On the other hand, most of my firefox addons have stopped working because of the webextension transition :worried:

gltewalt
05:18“For every complex problem, there is a solution that is simple, neat, and wrong.” - H.L Mencken

:smile:

gltewalt
02:59So there was this coding test - 5 exercises, 3 minutes or less on a timer for each - I didn't beat the timer on any of them.
🎉
greggirwin
04:51Coding isn't a race.
gltewalt
18:12@geekyi told me it was :sparkles:
greggirwin
19:04Send me a link. I'll likely be right behind you.

geekyi
03:38@gltewalt which one? :smile:
gltewalt
08:55I'll see if I can dig back and find the link.
17:38"The deletion distance between two strings is the minimum sum of ASCII values of characters that you need to delete in the two strings in order to have the same string. The deletion distance between "cat" and "at" is 99, because you can just delete the first character of cat and the ASCII value of 'c' is 99. The deletion distance between "cat" and "bat" is 98 + 99, because you need to delete the first character of both words. Of course, the deletion distance between two strings can't be greater than the sum of their total ASCII values, because you can always just delete both of the strings entirely.Implement an efficient function to find the deletion distance between two strings.You can refer to the Wikipedia article on the algorithm for edit distance if you want to. The algorithm there is not quite the same as the algorithm required here, but it's similar."
17:38do that in 3 minutes. And you have to use something other than a Redbol language.
17:39Oh, wait - that one was actually 5 minutes if I remember right
greggirwin
17:49Some kind of Genius test? I did an LCS differ in R2 many years ago, using reference material, and I would still have been light years behind their limit.
17:53Don't let the internet define your self-worth.

gltewalt
14:46This was brought up before somewhere - but... if this turns out to be as good as their pitch, would that be something ?
14:46http://www.luna-lang.org/
greggirwin
16:31Yes. If you get in on the private Alpha, let us know how it feels.

geekyi
10:40http://www.luna-lang.org/assets/images/profiling.png
10:41If it works like that, it would be awesome. Someone on hackernews mentioned they'd been waiting on this for a year before tho

gltewalt
23:48https://simpleprogrammer.com/2017/08/10/kotlin-future-android-development/?utm_source=drip&utm_medium=email&utm_campaign=weekly-roundup&utm_content=weekly-roundup-41

geekyi
18:16So.. who's watching the total solar eclipse?
9214
18:17lucky ones in USA :(
greggirwin
19:14I was outside. 99.5% coverage here they said. The sunlight through a tree created almost a pinhole camera effect on our deck, which was pretty cool. Not as totally dark as the one I saw in Germany almost 20 years ago. I'll watch videos later I'm sure.

gltewalt
00:31cool, looks like there's something like my explode! now
00:31
>> extract/into "Explosion" 1 a: [] 
== [#"E" #"x" #"p" #"l" #"o" #"s" #"i" #"o" #"n"]
>> a
== [#"E" #"x" #"p" #"l" #"o" #"s" #"i" #"o" #"n"]
>>
00:37I got to look a few times at the sun. It was kind of cool how the temperature seemed to drop and the crickets thought that night was coming.
01:59from lexer.red (this won't do):

ws-no-count: [(count?: no) ws (count?: yes)]
cs/8:  charset {[](){}"@:;}					;-- not-file-char
cs/23: charset {[](){}";}					;-- not-url-char

url-rule: [
			#":" not [not-url-char | ws-no-count | end]
			any [#"@" | #":" | ahead [not-file-char | ws-no-count] break | skip] e:
			(type: url! store stack do make-file)
		]
greggirwin
06:57We noticed the birds stopped singing, and the roosters crowed when the sun came back.
gltewalt
22:05How can I fix url? so it's a little more robust?
22:06It gets pretty complex, but IMO it has to be more comprehensive than #"@" | #":"
22:06https://en.wikipedia.org/wiki/URL#Syntax
22:10scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment]
22:10And which 'room' should I use to talk about this stuff?

greggirwin
06:24red/red should be fine for that.
06:27We can certainly make things more specific, though we should have a good reason to make each change. And ask if the goal of each datatype is to be a complete match for a W3C spec of the same name.

What is the specific problem you're hitting right now? (post in red/red to get more input)
06:28Ah, I see you did. :^\
gltewalt
16:53The problem is it only seems to check if a colon is present after a name, then declares it an URL
rebolek
16:55I'm fine with it, because it allows me to use Redis-like keys in form of this:is:key directly in Red ;)
greggirwin
16:57@gltewalt, the question is why that's a problem.
gltewalt
17:07It's a problem because you're testing for an URL with url? and cat:meow does not an URL make
rebolek
17:21Actually, when I look at scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment], then cat:meow is scheme cat and host meow, so it is valid URL.
gltewalt
17:23It could be a valid time, too. Have to check for more than one thing
17:24Or more than two things
rebolek
17:25It can't, it does not start with number.
gltewalt
17:25Just doesn't seem robust enough
toomasv
17:30
>> strange: cat:meow
== cat:meow
>> type? strange
== url!
>> strange: as email! strange
== cat:meow
>> type? strange
== email!
>> strange
== cat:meow
gltewalt
17:30Example: there are only a handful of schemes out in the world, so maybe do a quick check of those, followed by a colon
rebolek
17:32But then you can't introduce new ones.
gltewalt
17:32Sure you can
17:33Change your URL rule
toomasv
17:33Not so few: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
gltewalt
17:34URi is a bit different than checking for URL
17:35I guess I'm the only one who has an issue with it?
rebolek
17:42@gltewalt I just don't see where it can be a problem.
gltewalt
17:51https://youtu.be/lmuKsI5kcKw
greggirwin
18:24> Just doesn't seem robust enough

Not a terribly strong argument. :^)

1) Has it caused you an actual problem?
2) Is there a concrete case you can see where it will?

From RFC 3986:
> the URI syntax is a federated and extensible naming system wherein each scheme's specification may further restrict the syntax and semantics of identifiers using that scheme.

Per that spec ldap://[2001:db8::7]/c=GB?objectClass?one is a valid URL. Do we support that?

These are other examples, and *are* all valid in Red:
mailto:John.Doe@example.com
news:comp.infosystems.www.servers.unix
tel:+1-816-555-1212
telnet://192.0.2.16:80/
urn:oasis:names:specification:docbook:dtd:xml:4.1.2
18:25In cases like this, it really helps to have concrete examples of why something should change, and also how to do it.
18:27It can be *good* to match standards, but there is often also a high cost associated with it. There is also a lot of legacy design out there that doesn't need to be supported in literal form.
18:28e.g., the url above with brackets in it:
>> to url! "ldap://[2001:db8::7]/c=GB?objectClass?one"
== ldap://%5B2001:db8::7%5D/c=GB?objectClass?one
gltewalt
18:44we all know that cat:meow isn't an url.
No, I haven't had a problem yet, other than surprise.
Concrete case? I don't know. Most people will probably whip up their own parse solution if the want to look for urls, but if the do it in a non parse-fu way, theyre going to get false positives.
18:45and... what the heck?
>> type? a@:a@b
== @b
18:53equivalent of just typing @b
19:45(And I'm a pain in the butt and can't type words :smile: )
rebolek
19:50
>> b: [a@:a@b]
== [a@ :a @b]
>> foreach v b [print type? v]
email
get-word
email

Is this the ideal outcome? I don't know. Currently it works that way.
greggirwin
20:28> we all know that cat:meow isn't an url.

Not true. As Bolek pointed out, it's a valid URL according to RFC3986. Just because I don't have a cat scheme doesn't mean you don't. Checking a fixed list, and telling users to change the Red lexer to support new ones, seems like a very bad idea to me. Remember, URLs aren't only useful for known schemes and net access.
gltewalt
21:42I'm trying cat:meow in various web browser bars
greggirwin
22:36A valid URL, per the spec, doesn't mean it will work in a browser bar.
gltewalt
23:44I know I'm just doing it for fun. Maybe some weird eater egg is out there
23:57here's a few in firefox:

about:mozilla

about:robots

geekyi
06:37@gltewalt about:about
06:38All of them! Chrome is same, but also : chrome://about/
06:40Opera had the same last I checked, opera:
06:42Not sure, but iOS mght also have ://
07:21[interesting (a blank link)]()
07:22 [nested parens](\(\))
07:23[nested parens](\\)))
07:26[nested parens](http://www.a.co/blah_(um#41;)
07:29[nested parens](http://www.a.co/blah_(um%29)
9214
10:04Can someone brewed in cryptography help me to classify cipher algorithm?
* it's a block cipher (1 block = 6 bit);
* it's a hashing algorithm (i.e. data is encoded as a string and passed as a text for further data validation);
* it's reversible;
* it has two distinct functions:

1. first function recieves an array of 16 bytes (actually 4 dwords), roughly divides it into blocks, and re-arranges these blocks according to static lookup table, giving an array of 12 blocks (i.e. bytes with our 6 bits);
2. between 1st and 2nd functions there is a small intermezzo - 10 bit checksum is computed for an array of 12 blocks; first 4 bits are ORed into 12th block, other 6 bits constitute a new 13th block. 14, 15, 16 blocks are taken from 5th dword which weren't passed through first function. Overall it gives us 16 blocks total.
3. second function recieves 16-block array and has 3 rounds: first and second rounds perform bit swapping (i.e. swap i-th bit in n-th block with j-th bit in m-th block), thirds round perform bit flipping (i.e. flip i-th bit in n-th block). Indexes i, j, m and n are computed from a static vector of numbers (I named it [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector)). Some modular arithmetic is involved.

TL;DR I think that it's either a (rather simple) [sp-network](https://en.wikipedia.org/wiki/Substitution-permutation_network), or some transposition cipher.
* What are your thoughts?
11:03"re-arranging" in first function is something like "X block is 4 bits at Y1 offset in Z1 dword ORed with 2 bits at Y2 offset in Z2 dword"
greggirwin
16:08@9214, maybe post in a room with more people?
9214
16:08@greggirwin I don't think it's appropriate in any other room :D
16:09anyway, I think it's a transposition cipher, since first function cannot be considered a substitution in a strict sense

gltewalt
08:57According to the sp-network link, if you reverse your process and it decrypts, then it's a SPN.
"Decryption is done by simply reversing the process (using the inverses of the S-boxes and P-boxes and applying the round keys in reversed order)."
9214
09:48@gltewalt yes, that's how it works for P-box, but *substitution* in S-box implies that original data *is changed*, thereas in my case it's just transposed (permuted?) to match 6-bit block format. So it's kinda "take these bytes and put it here", not "substitute these bytes with this".
gltewalt
10:03Might be a good one for:

https://crypto.stackexchange.com/
9214
10:04nay, I don't want to register on SO for one question :grimacing:
gltewalt
10:24Login with google

geekyi
03:00@9214 isn't on stackoverflow? :o well, I could ask..
9214
03:27@geekyi that would be really nice! Though I already settled down with naming :)
geekyi
03:28@9214 naming? Ah you wanted to know this to name your function
03:34@9214 https://crypto.stackexchange.com/questions/51211/classify-a-block-cipher
04:22@9214 apparently you're missing a key, and therefore it's broken :p Any context?
04:44https://en.wikipedia.org/wiki/Sponge_function
>## Construction
A sponge function is built from three components:
* a state memory, ''S,'' containing ''b'' bits,
* a function, ''f'', of fixed length that permutes or transforms the state memory
* a padding function ''P''
04:44https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/SpongeConstruction.svg/600px-SpongeConstruction.svg.png
9214
07:30@geekyi cheers!
https://github.com/9214/daruma/blob/master/src/decoder.red
07:32key is an array of 8 prime numbers (I'm not sure, but maybe it should be called Initialization vector), subkeys for each round of permutation are obtained from this array with some simple modular arithmetic.
07:33@geekyi shameless plug regarding decoding algorithm https://9214.github.io/13#decoder
geekyi
07:34@9214 Shall I post your link in the question? :p
07:34Nice write up btw!
9214
07:35idk really, I don't like this kind of, ehm marketing is the right word I guess?
07:36if things will stuck and it still would be considered as broken - then yeah, post it
geekyi
07:38I don't feel like it's marketing, just giving question readers some context
9214
07:49btw, it's not sponge function, as it takes a _bitstream_, but in our case it's _blocks_
geekyi
07:59Sponge function I mentioned as a general abstract tool to think about cryptographic algorithms..
9214
08:02oh, silly me!
geekyi
09:46No, awesome write up!
greggirwin
18:07> swap [ (i % 6)-th bit in (2 * i + (i / 6) + 1)-th block with (i - 1)-th bit in (16)-th block ]

Nice!
9214
18:08:flushed:
greggirwin
18:09That's the kind of thing that makes Red special. It deserves a little article of its own.
9214
18:12if only we had reverse/skip, then reversing p-box for encoding/decoding is just a matter of
reverse/skip p-box 2
18:12or I could get rid of tag! indexes and loose clarity
18:13lookup-table could be writed down in some specific 2d dialect format
18:13https://docs.racket-lang.org/2d/index.html
toomasv
18:14@9214 What's wrong with my reverse/skip? :worried:
9214
18:15well, it's the one thing when you show the reader a one-liner and blow off everyone from their chairs and the other when you first define it :(
18:17@toomasv while you're here, could you give any insights on DSL/dialect developement? What to do, what to read, in which position to meditate, etc?
greggirwin
18:20@toomasv, one suggestion on your reverse is to name the arg for /skip to be size. That way it matches others with a skip refinement.
18:21Same for /part and length.
18:22OK, that's 2 suggestions.
toomasv
19:02@9214 My philosophy is "learning by doing". So, meditate on a domain, write down a bunch of sentences for operating in this domain, and try to match these sentences to red-like syntax. Then start to parse these sentences and throw in parens to manipulate structures on different conditions. Try, err, change, try, err :repeat: *ad nauseam* Ah, yes, I forgot **think**.
@greggirwin Thanks for suggestions! I think (oops!), for non-skip reversing I should use system/words reverse.
19:27@greggirwin Oops, system/words/reverse does not contain original reverse any more! :collision:
19:48Now mimicks the original reverse with pair and tuple also.

9214
08:59@toomasv that's what I intuitively lean to, a mix of bottom-up and top-down design, thanks!
greggirwin
17:55Nice enhancements @toomasv.
17:59Expected?
>> info/arg-num '+  ; `lit-word` with op!-s, otherwise either `word!` or `lit-word!`
*** Script Error: length? does not allow logic! for its series argument
*** Where: length?
*** Stack: info
18:00Usage typo: fn/ref-ypes should be fn/ref-types
18:02Good stuff. I have an old arity-of func, and help-ctx exports similar functionality via parse-func-spec. The joys of reflection.
toomasv
18:15@greggirwin Thanks! Corrected info/arg-num
9214
20:02Can you guys suggest some practical (and alive) concatenative language to learn, aside from obvious ones like Forth and Factor?
I lean towards Factor, but the fact that its developement was abandoned and absence of main leader and "vision" kinda puts me off.
20:05@geekyi any tips? I believe you played around with Factor a little.
20:35fuwah, it seems like 0.98 is coming closer than I expected!
https://github.com/factor/factor/issues/1857

geekyi
09:41@9214 sorry, was on a smallish vacation last few days
09:42Have you used Factor? GUI Works very well on windows still (built in documentation, debugger, etc), not so much on linux I think (but commandline worked last time I checked)
09:42I've not actually downloaded and tried many others as they aren't packaged very well, I'll search for some
9214
15:06@geekyi I've just become a Linux freshman a couple of days ago and played around with it - some libraries were missing and GUI listener refused to start, after some tweaking and fixing everything seems to Just Work (TM)
geekyi
16:47@9214 the built-in docs are really nice isn't it?
9214
16:48heck yes, I really wish Red could accommodate some of this ideas
geekyi
16:59:) Docs, like everything else, takes space tho
9214
17:01idk, caching, Carl's X-Internet idea, or just a viewer for a web copy
geekyi
17:01Some interesting stuff are:
- combinators (higher order functions like bi and variants)
- SYNTAX: ( factors version of macros/ dialecting)
9214
17:02I already saw combinators but haven't checked on parsing and metaprogramming yet
geekyi
17:03And debugging, altho verbose at times.. but I think that's due to the concatenative nature
gltewalt
17:04I see a pipeline operator in red/community... any particular reason to have a named func combined with the make op!, versus:
:> make op! func [x f [function! action! native!] [f x]
9214
17:05@gltewalt nope, no reason really
gltewalt
17:05Didn't know if it was a style thing that I was missing, or?
9214
17:06@gltewalt https://github.com/red/red/issues/2866
17:06I guess it's just easier for compiler to process
geekyi
17:08Also docs can alternatively be linked to online! : http://docs.factorcode.org/content/article-parsing-words.html
gltewalt
geekyi
17:10Also note, factor is missing a proper package manager, which is why I think it's so important for Red
9214
17:10@geekyi heavy stuff, I really would like to get my hands on it once I settle down with linux and emacs :baby_bottle:
gltewalt
17:11If you had a tough enough online doc spread, I don't see much danger in reading it in from the interweb. Except for those without net acess.
geekyi
17:12@gltewalt yep exactly.. it's a trade-off a lot of languages need to make
17:13In factor's case (and other smalltalk variants) I think it works really well because you have inter-links between docs without resorting to html
17:14I've tried Pharo last month.. can't help noticing the similarities there.. advantages of an image+vm system
17:14Red has it's own strengths tho, like more native integration
9214
17:15I believe it should be trivial to implement images, just to store system/words with binding information
gltewalt
17:21Funny
http://www.99-bottles-of-beer.net/language-rebol-2432.html
9214
17:22pure gold dust
greggirwin
19:25I looked at Pharo about a year ago. Reminded me a bit of Oberon, more than other Smalltalks. Just pulled it up, and also remembered the settings browser made me think of Frontier a bit. We can certainly build a windowing system, and a browser, as it has. The big thing is the structure of the content. The new text-box! style, and the new GUI console, will surely give us examples of how to do a lot of this.
20:03Pulled up Factor again here as well. Nice docs built in, yes. Big image though. I've only ever looked inside older, smaller Smalltalks, so I don't know where all the size comes from in the modern systems.

geekyi
05:15And harder to check why because image instead of file system..
> I don't know where all the size comes from in the modern systems.
greggirwin
14:25Yup.

9214
17:34how should I work with Rebol/View on Linux if ./rebol gives me:
** User Error: Bad face in screen pane!
** Near: size-text self

Related? [[1](https://stackoverflow.com/questions/24488331/how-to-start-the-rebol2-view-console-on-a-server#24496293)][[2](http://rebol.com/cgi-bin/blog.r?view=0545)]
17:39xvfb-run w/o --noinstall --noviewtop ain't do the trick
rebolek
17:52On which distro are you on?
9214
17:53@rebolek Mint 18.2
rebolek
17:58@9214 Hm, I may try on Mint, but not sooner than next week :(
9214
18:04tried to install MSfont package and Courier font, didn't worked :(
rebolek
18:06I will try on my elementary and let you know.
18:06It is also Ubuntu-based, so it should be similar
9214
18:08@rebolek thanks!
rebolek
18:23@9214 Hm, I get different error: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
9214
18:24perhaps I'll get it too once bad face error is bypassed :D
rebolek
18:25Certainly no, this is system error before Rebol even started :)
18:26This is 32 vs 64bit problem, but I have 32bit libraries installed :/
18:30@9214 see fonts info [here](https://killring.org/2012/12/16/developer-notebook-installing-rebol/)
9214
18:35ah, I already installed these fonts but missed "restart X" part
18:35tha-daaa!
18:35[![image.png](https://files.gitter.im/red/sandbox/ARsO/thumb/image.png)](https://files.gitter.im/red/sandbox/ARsO/image.png)
rebolek
18:36Cool! So you're more successful than me :D
18:55So I've got it running also now :)
greggirwin
20:12Yeah, the old issues were fonts, or trying to run View on a non-X enabled distro. Good work.

gltewalt
02:51@9214
https://imgur.com/a/8aT8N
02:53Would that be best in the official docs with tags (links) to descriptions, or in... something else?
greggirwin
05:12I did something similar some time back, and @toomasv did his very nice graphs. It would be good to have link targets if we want to put it in official docs.
9214
07:25it's in fact copypaste from @greggirwin :^)
07:27speaking of docs - are we talking about this particular graph or my entire grab bag of learning resources? Anyway, sure, should I migrate everything into separate wiki entry?
greggirwin
14:13:^) Have to think about docs. So much to do.
gltewalt
17:18That particular graph. Made into like a 'live document'. Maybe.
17:19You're context and scoping breakdown probably deserves to be in the docs

gltewalt
21:54Where can I see source code for Rebol3 apply? Haven't seen it with a search, though maybe if I searched on an actual computer..
21:58Should apply for Red only work on homogeneous data?
Should reducing a block before applying function be the default action? If so, how to handle unset?
22:00
simple-apply: func [fn blk][
    collect [foreach i blk [keep fn i]]
]

gltewalt
05:00It's actually map, but there's a map datatype so that probably rules out a function named map

rebolek
22:27In the Rebol/Core users guide, there is one example: [Buy 100 shares at $20.00 per share]
22:27Well, I've got this now :) [limit buy 0.3 QTUM at 0.037 ETH gtc order]
greggirwin

9214
22:55/play tada
22:55sigh, didn't worked
gltewalt
23:32destructuring-bind
http://www.gigamonkeys.com/book/beyond-lists-other-uses-for-cons-cells.html
greggirwin
23:42I did some R2 things along those lines, many moons ago, @gltewalt.
set...: func [ ; Inspired by Erlang's list model.
        "Like SET, but words block is dialected."
        words  [any-block!] "First refinement! gets remainder of series."
        series [series!] "Values to assign to words"
        /local word= rule= =word
    ][
        word=: [set =word word!]
        rule=: [
            any [
                set =word refinement! (set to word! =word series) to end
                | word= (
                    set =word pick series 1
                    series: next series
                )
            ]
        ]
        parse words rule=
    ]
    ;set... [a /__] [1 2 3 4 5]
    ;set... [a b /__] [1 2 3 4 5]
    ;set... [a b c] [5 6]
gltewalt
23:43thats cool :fire:
greggirwin
23:43And it looks like even more, though this is *completely* commented out in my old code, so likely written as a sketch and untested.
9214
23:43:new_moon_with_face: :full_moon_with_face:
greggirwin
23:43
;    destructure: func [
;        "Like SET, but words block is dialected."
;        series [series!] "Values to assign to words"
;        words  [any-block!] "Word '... gets remainder of series. Get-words get word in last object found and don't advance."
;        /rest '... [word!]
;        /local rule= word= =word ;obj-word= =obj-word w o
;    ][
;        word=: [set =word word!]
;        obj-word=: [set =obj-word get-word!]
;        rule=: [
;            ;some [
;                into rule=
;                | any [
;                    word= (
;                        set =word pick series 1
;                        series: next series
;                    )
;                    | obj-word= (
;                        w: to word! =obj-word
;                        o: pick series 1
;                        either object? o [set w o/:w] [set w o]
;                    )
;                ]
;            ;]
;            mark: 
;        ]
;        parse words rule=
;        either rest [set ... series] [series]
;    ]
;    destructure compose/deep [1 2 [3 context [x: 1  y: 2  d: 4  e: 5]]] [a b [c :d :e]]
23:43@9214, yes, but more of them.
9214
23:45:new_moon_with_face::new_moon::waxing_crescent_moon::first_quarter_moon::waxing_gibbous_moon::full_moon::full_moon_with_face:
gltewalt
23:49I think if we had control over how things were returned we could get a lot out of simple set [a b c] etc.... no ?0
23:50More return value control
greggirwin
23:53I will hazard a guess that everything you need is already there. But if you can show a concrete example of what you want to be different, that would help.
gltewalt
23:56In help room
9214
23:56@gltewalt why tweak set if you can enhance map..?
greggirwin
23:57My thought as well. I'm not clear on how it can know what you want in this case.
9214
23:58how set can it make [2 3 4 5] and [2 4 6 8] from [2 4 4 8]?
greggirwin
23:58Right.

greggirwin
00:00If you give it two blocks as the values, it will work, so it's the responsibility of map to do that.
9214
00:06I'll play a devil's advocate though :smiling_imp:
set: func [stuff][
    a: copy b: copy stuff
    
    a/2: a/2 - 1
    a/4: a/4 - 3
    b/3: b/3 + 2
    reduce [a b]
]
gltewalt
00:10If the words in the local block of map collected their values and the return was a block of blocks, then... ?
00:11It's on the edge of my vision
greggirwin
00:31It looks like you're conflating things. Map, in your example from red/help, doesn't know anything about [a b]. You need a different kind of function to do that, which you can build.
gltewalt
00:33I knew it wouldn't work - "doesn't know anything about [a b]" - but that's the simplest way I could think of to show what I was thinking
00:50I'll come back to this stuff at a later date
9214
08:35given Red nature, I guess you can return *unreduced* blocks and do something with them
greggirwin
17:35Yes, but the catch is that trying to do something like this makes you dependent on map always returning things in some known order. That may not always hold true. At least I don't think it's a hard requirement. Consider parallel maps.

gltewalt
06:05Is there a code-review or tongue-lashing room?
rebolek
10:02No, but everyone is happy to do code review in any room ;)
gltewalt
19:03Ok... (ready to cringe)
19:04Work in progress. PigLatin.

vowels: charset ["a" "e" "i" "o" "u" "A" "E" "I" "O" "U"]   ; "y" is a special case
punctuation: charset ["." "," ";" "?" "!" ]

has-puctuation?: func [str] [parse str [punctuation]]

starts-with-vowel?: func [str][parse to-string first str [vowels]]
 
get-match-pos: func [str cset][index? find str cset ]

;move-punctuation: func [str][
; need to grab punctuation and move it to the end of sentence, or end of word if single word
;    idx: get-match-pos str punctuation
;]

move-consonants: func [str][
    ; take consonants before first vowel, move them to the end of str
    idx: get-match-pos str vowels
    move/part str back tail str idx - 1
]

pigify: func [str][
    either starts-with-vowel? str [append str "yay"][move-consonants str append str "ay"]
]

txt: split "Let's test this thing out!" space
foreach i txt [print pigify i]

; forever [print pigify s: input]
19:25Before I get deep into it -- learning how to whip parts of series around, and what the best way might be
rebolek
19:35I got this, is it proper output?

et'sLay
esttay
isthay
ingthay
out!yay
9214
19:42@gltewalt my attempt (never played Pig Latin actually, looked up rules in wiki)
pigify: function [str][
    alphabet:   charset [#"a" - #"z" #"A" - #"Z"]
    vowels:     charset ["aeiou"]
    consonants: exclude alphabet vowels

    parse str [
        (match: copy "")
        remove copy match some consonants
    ]

    lowercase rejoin [str match "ay"]
]
rebolek
19:44@9214 :ok_hand:
9214
19:45oh, @rebolek's approvement :godmode:
gltewalt
19:47Yeah it's the proper output. The punctuation needs to be addressed and maybe capitalisation
19:48AND, the 800lb gorilla - syllable counting, if you want advanced piglatin
19:49like... carry would be arcay yray
19:49I probably won't mess with syllable counting though
19:51Really it's for the series manipulation experience
9214
19:53try to implement rotate with /right refinement
>> rotate [a b c] 2
== [c a b]
>> rotate/right [a b c] 1
== [c a b]
gltewalt
19:53@9214 lol, why did I think I had to seperate my vowels? Sometimes I'm not so sure about me....
19:55https://www.google.com/amp/m.wikihow.com/Speak-Pig-Latin%3famp=1
9214
20:05I think we have Pig Latin alternative called "brick language" (кирпичный язык) in Russia. :D

Each syllable in the word is doubled and consonants in doubled syllables are substituted with code letter к.
So, for example, hello is hekelloko and how do you do? is hokow doko youkyou doko? (not sure about you though).
20:07was popular in school and summer camps
20:07ah, sweet times :baby:
gltewalt
20:18In Russia, pig latins you
9214
20:20:pig:
gltewalt
20:21That would be more difficult, because syllable counting is hard. Or so they say.
9214
20:22start small and try to split up a word into syllables
gltewalt
20:26For English, it's a bit of a "yikes"
http://www.phonicsontheweb.com/syllables.php
9214
20:30indeed
20:30rough sketch
syllables: func [str][
    alphabet:   charset [#"a" - #"z" #"A" - #"Z"]
    vowels:     charset ["aeiou"]
    consonants: exclude alphabet vowels
    
    syllable: [
        0 1 consonants
        1 vowels
        0 1 consonants
    ]

    parse str [
        collect some keep syllable
    ]
]

probe syllables "watermelon"
20:33interesting parse challenge though
greggirwin
20:58@gltewalt, for these:
has-puctuation?: func [str] [parse str [punctuation]]
starts-with-vowel?: func [str][parse to-string first str [vowels]]

Find should be enough. Find/match for the starts-with-... functionality.
gltewalt
21:00Not beneficial to break things up into funcs?
greggirwin
21:01has-punctuation? doesn't seem to be used, but doesn't look like it works how you expect, unless you're parsing a single char to check for punc.
gltewalt
21:01It isn't used yet. Need to write the func
greggirwin
21:01You can still make funcs, just use find instead of parse. Parse is overkill, and doesn't add intent here IMO.
gltewalt
21:01Ahh, ok
9214
21:06could [this](https://gist.github.com/9214/b06fd40bf71d8990146d4ed46cef191d#file-pig-latin-red-L7) be simplified btw?
greggirwin
21:10vowels: charset "aeiouAEIOU"

Yours doesn't work as expected either. Uppercase mods vowels in place. You also need to use /case.

>> union "aeiou" "AEIOU"
== "aeiou"
>> union/case "aeiou" "AEIOU"
== "aeiouAEIOU"
9214
21:13@greggirwin surprisingly it works as it is
>> pigify "Anaphora"
== "anaphoraay"
21:15perhaps i can just parse lowercase str..? :smiling_imp:
greggirwin
21:16If you don't use parse/case they should be equivalent.
9214
21:17oh, indeed, I forgot that parse doesn't care about case by default
gltewalt
21:39I needed the true/false returned from parse. Doesn't look like find returns true/false
rebolek
21:40@gltewalt It returns value or none, that's good enough for most cases.
gltewalt
21:51? starts-with-vowel?: func [str][either find to-string first str vowels [true][false]]
9214
21:56@gltewalt find to-string first str vowels should do
21:58moreover, I don't think string! conversion is needed
21:58
text
>> v: charset "aeiou"
== make bitset! #{000000000000000000000000444104}
>> find v #"a"
== true
gltewalt
21:58Looking for true or false
9214
21:58well, find will return either true or false anyway, you don't need either to dispatch second time
gltewalt
21:59according to help it doesn't
9214
21:59@gltewalt remember that everything is true except false or none
22:01anyway, in your case find always will return either true or false because vowels is a bitset!
gltewalt
22:02
>> find vowels "cat"
== false
>> find vowels #"a"
== true
9214
22:02well, how can you search for string! in a bitset!?
22:04
text
>> if find "cat meow dog woof" "dog" [print "found!"]
found!
22:04
text
>> find "cat meow dog woof" "dog"
== "dog woof"
22:07oh, wait, it actually works, my bad
>> v: charset "cat"
== make bitset! #{000000000000000000000000500008}
>> find v "cat"
== true
gltewalt
22:08Now I'm frustrated. Just need a true or false if the first char in a string is a vowel
22:09
>> starts-with-vowel?: func [str][find to-string first str vowels]
== func [str][find to-string first str vowels]
>> starts-with-vowel? "ack"
== "a"
>> starts-with-vowel? "cat"
== none
9214
22:09and why you're frustrated if it works?
22:09none is falsey
gltewalt
22:10Thats why I added the either block
9214
22:10no, I meant that none is false
22:11> everything is true except false or none
gltewalt
22:11But starts-with-vowel? "ack" returns "a", not true
9214
22:11gosh, "a" is true too! :D
22:11> **everything** is true **except** false or none
gltewalt
22:12lol, ok but I wanted an explicit true or false. Is that bad? am I slow?
9214
22:12do you really want it?
22:12I mean, why?
gltewalt
22:13Because of pigify.
pigify: func [str][
    either starts-with-vowel? str [append str "yay"][move-consonants str append str "ay"]
]

9214
22:14@gltewalt and what's bad with pigify? either will dispatch as expected on string! or any other true-ish value
22:15anyway, you can explicitly convert result of find with to logic!
>> vowel?: func [c [char!]][find "aeiou" c]
== func [c [char!]][find "aeiou" c]
>> vowel-1st?: func [str][to logic! vowel? first str]
== func [str][to logic! vowel? first str]
>> vowel-1st? "cat"
== false
>> vowel-1st? "apple"
== true
gltewalt
22:15Yeah I guess it **does** work
22:16Sorry, I'm dense
9214
22:17nay, don't apologize for trying to learn something new
gltewalt
22:24Now to move the stupid punctuation from wherever it falls afer being pigified to the end of the sentence (or word)
9214
22:25hi, should be ihay, and not i,hay?
gltewalt
22:26Yeah. Some people choose to hyphenate, though
22:26i-hay
22:28close but no cigar...
>> b: "!bear"
== "!bear"
>> move to-string pick b idx tail b
== ""
>> b
== "!bear!"

geekyi
22:26All this should probably be in red/help :smile:
22:26So everyone can see
gltewalt
23:41I-hay,

greggirwin
19:29@gltewalt, instead of using first on your string, you can use find/match.
>> v: charset "aeiou"
== make bitset! #{000000000000000000000000444104}
>> find/match "cat" v
== none
>> find/match "alpaca" v
== "lpaca"
>> find/match at "cat" 2 v
== "t"

It may not always be as clear, from an intent standpoint, but that's a case-by-case call.
19:31Red hasn't included found? yet, and may not, but that's what Rebol used to coerce find results to logic.
found?: func [
    "Returns TRUE if value is not NONE."
    value
][
    not none? :value
]
19:31You can also just use to logic! directly.

gltewalt
16:40@9214 Looks like a basic rotate is as simple as this.
rotate: func [b [block!]][
    move back tail b head b
    head b
]
16:45
rotate: func [b [block!] count [integer!]][
    loop count [
        move back tail b head b
        head b
    ]
]
rebolek
16:49@gltewalt
>> rotate: func [block offset][head move/part block (length? block) - offset offset]
>> rotate [a b c d e f] 2
== [c d e f a b]
gltewalt
16:52Nice. But I don't quite understand that one. - offset offset ?
rebolek
16:54move/part takes three arguments, series, offset and length. So you can read it as move/part (block) ((length? block) - offset) (offset)
gltewalt
16:57Blows up on my Red version
>> rotate [a b c d e f] 2
*** Script Error: move does not allow integer! for its target argument
*** Where: move
*** Stack: rotate
16:59Red for Windows version 0.6.3 built 14-Sep-2017/13:15:36-06:00
rebolek
17:01@gltewalt Ah, sorry! I was in Rebol console :D move works different there.
gltewalt
17:01Ahh! pheww... I'm not going batty. (yet)
rebolek
gltewalt
17:10?

rotate: func [
    b     [block!]   "<-- It's a block"
    count [integer!] "Number of times to rotate"
    /left            "go back!"
    ][
        loop count [
        either left [head move head b back tail b][head move back tail b head b]
        ]
    ]
17:10probably horrible formatting (and jut playing around with string descriptions)
rebolek
17:13Instead of loop, you should use move/part.
gltewalt
17:27Like this? r: func [b count][head move/part back tail b head b count]
17:30oops that doesn't work
rebolek
17:31
== func [block count][move/part block tail block count]
>> rotate [a b c d e f] 2
== [c d e f a b]
17:31switch block and tail block for different direction
9214
17:43:alien:
rotate: func [
    series
    offset
    /right
    /local 
        len shift src dst part
][  
    len: length? series
    shift: offset % len
    set [src dst part] reduce pick [
        [(skip series len - shift) series offset]
        [series (tail series) shift]
    ] right

    move/part src dst part
    head series
]
17:44
text
>> rotate #{DEADBEEF} 2
== #{BEEFDEAD}
>> rotate/right [1 2 3 4] 3
== [2 3 4 1]
>> rotate [a b c d e f] 9
== [d e f a b c]
greggirwin
17:48In my old shift/rotate funcs, I made them move by 1 as a default, with a /part refinement.

@9214, you probably want /right before /local.
9214
17:48@greggirwin why?
17:49otherwise words from rotate/right call will be leaked?
greggirwin
17:49Convention.
9214
17:50ah, [conventions](https://www.youtube.com/watch?v=5g9zxduFtSM)... :crown:
greggirwin
17:50It *may* work, but I don't think it's guaranteed. Nenad would have to say if, by design, it will be supported.
17:51If it works, you can do what you want, but I've never seen anyone do it. :^) I was surprised it work at first glance.
rebolek
17:51It should work, /local is not different from other refinements
9214
17:57hm, optional leaking, that's interesting proposal
rebolek
17:59Do not forget /local is nothing special:
>> f: func [/local value][reduce [value]]
== func [/local value][reduce [value]]
>> f
== [none]
>> f/local 42
== [42]
gltewalt
18:43Network went down. On mobile now.
18:50Isn't the less variables (or words) the better?
toomasv
18:53Late arrival:
>> rotate: func [blk /part length /dir d][
    d: any [d 'l] 
    length: any [length 1] 
    either d = 'r [
        insert head blk take/last/part blk length head blk
    ][
        append blk take/part blk length
    ]
] 
== func [blk /part length /dir d][d: any [d 'l] length: any [length 1] either d = 'r [insert head blk take/last/part blk lengt...
>> b: #{DEADBEEF}
== #{DEADBEEF}
>> rotate b
== #{ADBEEFDE}
>> rotate/dir b 'r
== #{DEADBEEF}
>> rotate/dir/part b 'r 2
== #{BEEFDEAD}
>> b2: [1 2 3 4 5 6 7 8 9]
== [1 2 3 4 5 6 7 8 9]
>> rotate b2
== [2 3 4 5 6 7 8 9 1]
>> rotate/part b2 3
== [5 6 7 8 9 1 2 3 4]
>> rotate/part/dir b2 4 'l
== [9 1 2 3 4 5 6 7 8]
>> rotate/part/dir b2 4 'r
== [5 6 7 8 9 1 2 3 4]
>> rotate/part/dir b2 5 'l
== [1 2 3 4 5 6 7 8 9]
9214
18:53in theory, you can rewrite it with compose trickery and avoid using words and set
gltewalt
19:04Well what's the preference way or idiomatic way?
19:05Redbol cultural way?
9214
19:05why do you think that the more words the worse in a first place?
19:06I usually prefer clarity over clutter, even if it goes against some standarts
gltewalt
19:09Well, clutter for one I guess. Too many words and multiple uses of words could be considered clutter.
And as for right now, Red leaks a lot
19:10I guess it's lexical clutter vs. cognitive load. Or something like that.
9214
19:11so you'd rather use either right [take/part blah blah blah blah blah][take/part blah blah blah blah blah blah blah]?
gltewalt
19:12I don't know. I'm asking if there's a preferred community way.
9214
19:13it's a matter of taste I believe
19:26
text
rotate: function [series offset /local src dst part][
    ?: negative? offset 
    shift: offset: absolute offset % len: length? series
    
    set [src dst part] reduce pick [
        [series (tail series) shift]
        [(skip series len - shift) series offset]
    ] ?

    move/part src dst part
    head series
]

>> rotate [1 2 3 4 5] 1
== [5 1 2 3 4]
>> rotate [1 2 3 4 5] -1
== [2 3 4 5 1]
>> rotate [1 2 3 4 5] 6
== [5 1 2 3 4]
>> rotate [1 2 3 4 5] -6
== [2 3 4 5 1]
greggirwin
19:31@toomasv, here's a very old R2 version of mine:
rotate: func [
        "Rotate values in a series."
        series [series!]
        /left   "Rotate left (the default)"
        /right  "Rotate right"
        /part range [number!] "Rotate this many positions"  ; TBD series! support?
    ][
        range: any [all [range  range // length? series] 1]
        if any [empty? series  zero? range] [return series]
        either right [
            series: skip tail series negate range
            head insert head series take/part series range
        ][
            append series take/part series range
        ]
    ]

We are of one mind.
gltewalt
19:35Oh I didn't know you could make a /left or /right and have it the default. I figured you had to type rotate/left or rotate/right, and that rotate by itself would blow up
9214
19:39@gltewalt less wordy version
rotate: function [series offset][
    ?: negative? offset 
    shift: offset: absolute offset % len: length? series

    head do compose [
        move/part (
            pick [
                [series (tail series) shift]
                [(skip series len - shift) series offset]
            ] ?
        )
        series
    ]
]
gltewalt
19:39It's obvious now. But this morn was my first refinement
greggirwin
19:48It's all in how you structure the internal logic. I just supported /left, and do this other places too, so you can make your code more self-documenting.
toomasv
19:52@greggirwin Indeed :), but you have your bag of tricks!
greggirwin
19:54I love seeing all the different ways it can be done. And some things in my old bag still run!
gltewalt
20:04Yeah lots of things to consider
20:05@9214 I guess I don't like "less wordy version" as much
9214
20:09¯\_(ツ)_/¯
greggirwin
20:10Now, if we support negative offsets, *and* direction refinements, is it too confusing, from an interface perspective?
9214
20:11in that case refinements are just syntactic sugar to self-document code
greggirwin
20:11Have to think about what flexibility that might offer. My gut says to keep it simple.
9214
20:11I actually love an idea of "dummy" words
greggirwin
20:13@9214, I was think about whether rotate/right -5 is useful.
20:13I've used dummy words in a number of dialects.
9214
20:18@greggirwin I meant something like that
#local [
    #macro [lit-word!] func [s e][]
    probe 'dear 'Red 'please reverse [1 2 3] 'thanks 'in 'advance
]
20:20if only I could use
#macro `: :comment
and
`word
syntax, but this will work only with
`<some-series>
20:20jeez, how do I escape backticks here?
20:22done!
20:25@greggirwin and in your example refinement and offset sign could contradict each other, so something should take precedence
20:25or you can just absolute all offsets
greggirwin
20:26Right, so I think it's best to have one or the other.
9214
20:26could be interesting to support series/< or series/>>N support for rotating
20:27though I doubt that it can be implemented as macro
greggirwin
20:27I prefer refinements, but there may be an argument for negative offsets in some cases. e.g. a UI where a rotator lets a user select a start point by dragging.

>> would be shifting, wouldn't it?
9214
20:27only at lexer level
20:28well, yeah, I don't know if there's any special sign for rotating
greggirwin
20:29I don't think so. (>>)?
9214
20:30btw, no one told how clever I am when I showed this :(
https://gist.github.com/9214/c325d349195ba9054e18555ed51c9ed5
20:31though inner parsing loop could be refactored a little
20:31to use change instead
gltewalt
20:31Didn't you show that in the Red room? Not sure how many Lisp folks are in there.
greggirwin
20:32I'm not a Lisp guy, so I think I needed to digest it a bit, and have been short of time lately.
20:32It is *very* clever though.
gltewalt
20:34red/red room
20:35While I remember... this might be to your liking @9214
https://processing.org/
9214
20:36:point_right: https://gitter.im/red/red?at=599ddfe4a7b406262dbd5e4c
20:36I know about processing, though it's more @honix's stuff
20:37actually I want to try [Pure Data](http://puredata.info/) some time
20:52I've updated gist, will post in /lisp room shortly
gltewalt
21:41Can we call modules 'units'? The we could call the package manager thingy 'RUM' - Red Unit Manager.
Or redrum
21:42red reactive unit manager
9214
21:47Red Extension Disposer?
gltewalt
21:48Extension Dialect?

gltewalt
04:27Whatever happened to Nick Antonaccio?
20:09https://i.imgur.com/6odktvV.jpg
rebolek
20:15@9214 I've just seen something
9214
20:15@rebolek :eyes:
20:16no you don't! :shipit:
20:18@gltewalt so, what now, fizzbuzz contest?
gltewalt
20:25I'm going through rosettacode
rebolek
20:31@9214 maybe I just imagined it :cloud: :sleeping:
gltewalt
20:34?
;greatest element of a list
gel: func [list][last sort list]
rebolek
20:35I use it sometimes, but remember that sort modifies
gltewalt
20:38no max for Red yet?
9214
20:38
text
>> max 1 2
== 2
gltewalt
20:39Oh I guess I was typing help maximum
9214
20:39though I'm curious how it compares series!
20:44what are your thoughts about Covenant :alien:?
20:44just watched it and feel really bad taste in my mouth
gltewalt
20:45gel: func [list][last sort copy list]
20:46Haven't watched Covenant
9214
20:47better to rewatch Event Horizon and replay Dead Space though
gltewalt
20:47You should get an old PC copy of Blood Omen: The Legacy of Kain, and do some hackering. (Greatest video game of all time)
20:48I read the locker 13 thingy
9214
20:49lol, thanks, that thingy was more of a finding closure :D I tried to play Kain maybe 2 years ago, liked the setting but got really tired of level design and dropped
20:49couldn't find what to do next for like 1 hour
gltewalt
20:50I think we ended up cheating with some guys game guide many moons ago.
9214
20:51I really love original Painkiller though
gltewalt
20:51Best soundtrack and character acting ever, though
9214
20:51and Zanzarah
gltewalt
20:53Oh.. that looks good

geekyi
01:34> actually I want to try [Pure Data](http://puredata.info/) some time

@9214 me too! Also trying out vvvv. The later is interesting..
01:37> Whatever happened to Nick Antonaccio?

@gltewalt he's still active on his forums I guess? http://rebolforum.com
greggirwin
18:47I know Nick got busy with business things for a while, and probably still teaches guitar online. I imagine he'll show up again at some point. Red will revive interest from many old rebolers as time goes on.
geekyi
21:55https://www.youtube.com/watch?v=A9U5wK_boYM
22:22> slab of data I begin the painful process of trying to manually find where the function begins. I'm able to do this because I'm pretty familiar with x86 assembly and I can usually tell when something is real code or garbage. You'll get to this point with practice. Eventually I find what I'm pretty sure is the head of the function

- (4:15)
The most important part :worried: is... magic
greggirwin
23:02Ah, fun.

gltewalt
19:00http://nypost.com/2017/06/13/the-human-brain-sees-the-world-as-an-11-dimensional-multiverse/

geekyi
11:58The video in that article , altho slowly paced, is nice, especially at the end https://youtu.be/0TMeRdDEuIg?t=378
11:58Shows you the scale of things
9214
12:04could be a nice visualization for some flashcore track though
luis-rj
toomasv
15:26@geekyi Fascinating!
greggirwin
16:52Life is a hex-map game.
16:54https://www.youtube.com/watch?v=uaGEjrADGPA
geekyi
20:33Also from blue brain: https://www.youtube.com/watch?v=ZQTqvv6HHHY

gltewalt
22:33Is this ok?
contains?: func [
    {Searches for a value in block!
     Returns true and the index of the value if found.}
    block [block!]      "Block of values"
    value [any-type!]   "Value to check for"
    /local match
    ][
        match: find block value
        either none? match [false][reduce [true index? match]]
    ]
23:02Or call it 'has', and make it an op!
9214 has 'plan

gltewalt
00:14
has: make op! func [
    {Searches for a value in block!
     Returns true and the index of the value if found.}
    block [block!]      "Block of values"
    value [any-type!]   "Value to check for"
    /local match
    ][
        match: find block value
        either none? match [false][reduce [true index? match]]
    ]


>> gregg: [11 9 "s" #"z" 3.45 work]
== [11 9 "s" #"z" 3.45 work]
>> gregg has 'work
== [true 6]

greggirwin
06:19Has is already a standard function. You could use has?, but then it's not as nice as an op. The tricky thing is that you still don't have the ? predicate clue, so gregg has 'work sounds more like a prolog fact statement than a query.
geekyi
06:25The current has function seems very badly named for me. does/locals may have been better?
gltewalt
06:32contains? is ok. I was just trying some things.
06:33It doesn't have to be an op - I was stretching my baby wings a bit
06:48Yep, does/locals sounds good to me.
I didn't even know that there was a has - I've only used does and func
9214
09:05
text
has: make op! func [block value][
    attempt [index? find block value]
]
09:05
text
|9214|: [
    [dark thoughts]
    <cup of tea>
    some-work-to-do
    "The Haunting Past of Christoph de Babalon vol. III"
]
09:06
text
>> |9214| has 'some-work-to-do
== 3
>> |9214| has 'friends
== none
09:07_(:3」∠)_
09:08any value that is not none or false is true, so 3 is enough
09:10why op! doesn't allow to pass unevaluated operators?
>> bar: make op! func ['left 'right][]
== make op! [['left 'right]]
>> foo bar baz
*** Script Error: foo has no value
*** Where: bar
*** Stack:
rebolek
09:14A bug, probably?
9214
09:14will post in /bugs shortly then
greggirwin
16:53I don't use has a lot, but it's a holdover from R2 which is useful at times. I don't think adding a refinement to does will work well, because then locals arg will then come after the body arg.
16:55@9214, nice idea of a naming convention to play with for a dialect.
rebolek
17:20Right, has is leftover from R2. If we can find better use for word has (and I believe we can), than I vote for getting rid of it. I won’t miss it.

9214
16:05perhaps has should be auto-capturing version of does, the same way function is a "smarter" version of func?
16:06but then has is just an alias for context
greggirwin
17:37The function "name space" covers things well IMO:
func [] []		; declare params and locals
function [] []		; declare params, automatic local capturing
has  [] []		; declare locals, no params
does []			; no params, no locals

Has states the intent well, as long as you know it's a function creator. I've never had confusion over this myself. Proc generally means there's no return value, rather than no params, so doesn't seem any better. In order to get both meanings, we probably need a longer name, which then makes us look at what we gain.
gltewalt
17:47does-with
greggirwin
17:57Not bad.
gltewalt
23:03Which one of these is close to being right?
closure1: does [func ['f][bind/copy f system/words]]

closure2: does [func ['f][bind/copy body-of :f]]

closure3: does [func ['f][bind/copy (body-of :f) system/words]]

closure4: does [func ['f][bind/copy spec-of :f]]

closure5: does [func ['f][bind/copy (spec-of :f) system/words]]

gltewalt
02:35Grumble...
greggirwin
06:40From Doc, some time back:
closure: func [vars spec body][
	; Don't have to reuse 'spec name; just saves a word.
    bind (body-of spec: func spec body) (context vars)
    :spec
]

Though "being right" means first you have to say what the desired behavior is.
gltewalt
15:38In his example from red/red, I don't see how that can capture z: 1 as z is bound before closure is built
15:39z: 1 add2: closure [c] [[c + z]]
9214
15:41z is bound to it's current value (1) in current context (system/words), same for +, c is skipped because it's in spec block ([c])
gltewalt
15:44But I thought you wanted to "freeze" z, so that later z: 10 in global will have no effect
15:46Oh, and it looks like words-of isn't done yet.
9214
17:16@gltewalt re-read Nenad's messages - later we've figured out that this closure! implementation from R3 is broken
17:16so yeah, it should freeze z to 1, but it doesn't

toomasv
11:06Little fun with game-of life:
do https://tinyurl.com/y9mtqdqz

Just select "Random" for initial state and click ">". Or draw your own initial state and go. ([Gist](https://gist.github.com/toomasv/5cdec157a412364cdd30347e05e572bc) and [repo](https://github.com/toomasv/game-of-life))
greggirwin
18:09Nice @toomasv. If I let it run to a stale state, Reset doesn't seem to do anything. If I drag the main canvas, it is loose. Thought I could drag to draw the pattern, rather than clicking.
toomasv
18:20@greggirwin Thanks, Gregg, I'll try to improve this. Currently Reset only deletes history, so you can't navigate any more with + and -, and leaves the current state as new starting-point. To actually start over you have to choose Blank and then either click-in your new start-pattern or choose Random.
18:32Dragging and clicking--I'll meditate on this.

gltewalt
01:26
palindrome?: func [
    "Returns true if the value is a palindrome"
    value [string!]
    /local punctuation
][
    punctuation: {-:;.,?!#" "}
    equal? trim/with value punctuation reverse copy value
]

comment {
http://www.palindromelist.net/

>> palindrome? "A Santa at Nasa."
== true
>> palindrome? form [A Santa at Nasa.]
== true
>> palindrome? form 'taco-cat!
== true
}
02:37Basic level stuff - but I'm looking for style critique and such
toomasv
03:18@gltewalt Very nice! Adding few punctuation symbols (“”’'") would let identify even such palindromes from the list as:
>> palindrome? {Are we not pure? “No sir!” Panama’s moody Noriega brags. “It is garbage!” Irony dooms a man; a prisoner up to new era.}
== true

gltewalt
03:22That's true
03:22Also, I was thinking about allowing words and blocks but wasn't sure if it was appropriate
03:23Thanks for your input
toomasv
03:32One thing more - trying to identify palindromes with line breaks fails. I tried trim/with/lines but this didn't help (why?):
>> trim/with/lines {Are we not pure? “No sir!” Panama’s moody Noriega brags. “It is garbage!” ^/Irony dooms a man; a prisoner up to new era.} {-:;.,?!#" "“”’'"}
== {ArewenotpureNosirPanamasmoodyNoriegabragsItisgarbage^/Ironydoomsamanaprisoneruptonewera}

So, solution is to add line breaks (and tabs, line feeds etc) to punctuation:
punctuation: {-:;.,?!#" "“”’'"#"^/"#"^-"}
...
>> palindrome? {Are we not pure? ^- “No sir!” Panama’s moody Noriega brags. “It is garbage!” ^/Irony dooms a man; a prisoner up to new era.}
== true

03:35@gltewalt

>I was thinking about allowing words and blocks but wasn't sure if it was appropriate

I think it would be very much in the spirit of Red!
gltewalt
03:36Thanks, I didn't think about line break
03:38I initially tried charset for punctuation but it doesn't work with trim
toomasv
03:39Yes, help says it should be [char! string! integer!]
9214
04:23 trim/all/lines
gltewalt
04:34trim/all/lines mysteriously trims ! on my system
04:35oops, no it doesn't. I must have mucked something up
05:11
palindrome?: func [
    "Returns true if the value is a palindrome"
    value [string! any-word! block!]
    /local punctuation
][
    punctuation: {-:;.,?!#" "“”’'"#"^/"#"^-"}
    if not string? value [value: form value]
    equal? trim/with value punctuation reverse copy value
]
9214
05:20
text
>> palindrome? 111
*** Script Error: palindrome? does not allow integer! for its value argument
*** Where: palindrome?
*** Stack: palindrome?
gltewalt
05:22
palindrome?: func [
    "Returns true if the value is a palindrome"
    value 
    /local punctuation
][
    punctuation: {-:;.,?!#" "“”’'"#"^/"#"^-"}
    value: form value
    equal? trim/with value punctuation reverse copy value 
]
9214
05:30
text
>> palindrome? #{DEADBEEF EFBEADDE}
== false
gltewalt
05:33What would you suggest?
9214
05:36idk, palindrome clearly should work at least with series!, but some series are not symmetrical by their nature
05:52since you're relying on trim, and trim works only with strings, everything should be coerced to string!, form is good enough for that, but there will be edge cases
gltewalt
05:52yeah, like percent
05:57
>> palindrome? [( . Y . )]
== true
9214
05:59
text
>> palindrome? quote (_!_)
== true
gltewalt
06:01
>> palindrome? 111
== true
>> palindrome? 1.11
== true
>> palindrome? 11%
== false
9214
06:39
text
>> palindrome? [! []]
== true

gltewalt
02:30
; Determine if a string is numeric.
; Create a boolean function which takes in a string and tells whether it is a 
; numeric string (floating point and negative numbers included) in the syntax the 
; language uses for numeric literals or numbers converted from strings. 

numeric?: func [
    "Determines if string is numeric"
    string [string!]
][  
    either attempt [number? to-float string][true][false] 
]
02:47Going through basic level Rosetta Code.
Should there be some review process before submitting examples to web sites?
toomasv
06:10@gltewalt I would suggest
number? load string

This would catch all variants of numbers, scientific notation and percents included.
gltewalt
06:44Indeed. I initially had that, but decided to change it when I read this requirements part:
"in the syntax the language uses for numeric literals or numbers converted from strings"
06:44If you think load is ok, I'll change it back
toomasv
06:48I think 'load' checks "syntax the language uses". Maybe 'number? attempt [load string]' (sorry for formatting, on phone)
gltewalt
06:51:clap:
07:12
numeric?: func [
    "Returns true if arg is a numeric string"
    arg [string!]
][  
    number? attempt [load arg]
]
toomasv
08:58Seems good! :)

geekyi
03:13Where slack is better than gitter:
03:14[![image.png](https://files.gitter.im/geekyi/oQiM/thumb/image.png)](https://files.gitter.im/geekyi/oQiM/image.png)
03:14I've highlighted some things that are better there:
1. lightweight rooms - created when you first try to access it
2. threads - don't clutter up the ui, hidden by default
3. reactions
gltewalt
17:45Is there a scheme out there somewhere that uses [ ] instead of ( ) ?
9214
17:45@gltewalt what do you mean by "scheme"?
17:45usually parens are used to control evaluation order
gltewalt
17:46The language (or language spec) Scheme
9214
gltewalt
17:46Not red related
9214
17:47i think Racket/Clojure have square brackets in them
17:47and I believe in Racket they can be used everythere in place of ()
gltewalt
17:47Hmm, ok
9214
17:48and home-made dialects, tons of them
gltewalt
17:57This sight has even fringe kind-of languages, but no redbol to be found
:worried:

http://exercism.io/languages
9214
17:58@geekyi http://exercism.io/languages/factor/launch :)
gltewalt
18:15factor??

geekyi
02:34@9214 nice!
02:36Redbol should be there I guess
gltewalt
02:37requires a maintainer and a solution reviewer. From what I was reading.
geekyi
02:42@gltewalt
> Is there a scheme out there somewhere that uses [ ] instead of ( ) ?

I think the original lisp was like that.. Also, https://en.wikipedia.org/wiki/Dylan_(programming_language)
02:43Dylan is the lisp which has the word ordering closest to a Rebol I've found
02:45Wow, I've never heard of http://exercism.io/languages/lfe/about
02:45> Lisp Flavoured Erlang (AKA LFE) is a lisp syntax front-end to the Erlang compiler. Code produced with it is compatible with "normal" Erlang code. LFE is a (proper) Lisp based on the features and limitations of the Erlang VM
02:47https://en.wikipedia.org/wiki/LISP_2
9214
12:24Dumb question, but how this kind of references :point_up: [10 октября 2017 г., 22:58](https://gitter.im/red/sandbox?at=59dd0a35bac826f0545a16e7) look like for you guys? Are they in english or in russian? :D
rebolek
12:42russian
9214
12:42life will never be the same :(
rebolek
12:43why?
9214
12:43I thought gitter is smart enough and translates them automaticaly for every user depending on his location :D
rebolek
15:02:point_up: [12. říjen 2017 14:43](https://gitter.im/red/sandbox?at=59df637c614889d475a6755e)
15:02It pastes it as link text
9214
15:02dang
15:03I actually started to suspect when @Oldes posted such reference and it was in Czech
15:04well, turns out I'm bad at conspiracy :D
rebolek
Oldes
16:44Ah.. now I understand why there was so many russian links:) I was also wondering why gitter thinks that I'm from Russia
9214
16:45*cough* Russian mafia *cough* :shipit:
rebolek
17:05Have I been hacked? :fearful:
9214
17:36@rebolek [( ͡° ͜ʖ ͡°)](https://www.youtube.com/watch?v=dPWkNS5AMVM)
toomasv
18:16@9214 Настоящий артист!
gltewalt
18:23Do Rebol jobs exist ?
rebolek
18:31They do, or you can make new ones :)
greggirwin
19:09@gltewalt, Atronix was looking for someone, and my local client's product has historically been all Rebol. It's now JS, too, because...well. :^\
19:09On langs, Logo is the first square bracket lang I think of.
gltewalt
19:19JS is 'kind' of like a redbol cousin. But it gets annoying pretty quickly
19:27Wow, looking at logo examples - you can really see the Logo in Rebol
greggirwin
19:30@gltewalt, yep. For fun, look up the Brian Harvey series 'Computer Science Logo Style'.
9214
22:12ah, Redbol job, one could only dream
22:22@gltewalt [] speaking of - Factor them too have, wording weird some with also, Yoda's language programming choice it is Forth with together.
gltewalt
23:15Kind of made sense it did when it I looked at

geekyi
04:09[ quotes ] Factor in, somewhat like Rebol [ blocks ] and ' lit-word or quote word
04:10Rather, rebol has a lot of different mechanisms for that. Different way of thinking in syntax I guess..
04:12Lots of higher order functions, stuff like [bi](https://docs.factorcode.org/content/word-bi%2Ckernel.html) that even lisp doesn't have (applies to most concatenative languages). Only [j](http://code.jsoftware.com/wiki/NuVoc) is better
04:16[![image.png](https://files.gitter.im/red/sandbox/FTs3/thumb/image.png)](https://files.gitter.im/red/sandbox/FTs3/image.png)
04:19^- higher order functions are called conjunctions in j
04:20Actually, those are functions that take in functions as arguments and output functions
04:24Such types of functions are rare, you can only see them in concatenative and fp style languages, and things like mathematica
04:27A typical example of such a function is differentiation, which you can see in the picture above about Conjunctions
04:28Which is different from functions which are [data func] -> [data], like fold in haskell
04:31fold in j is / for example. Such classes of functions are called Adverbs, because they act on Verbs, which themselves is the terminology for functions in j (not a bad terminology might I add, with Noun for data)
04:32So, the function abstraction hierarchy is like that: Noun -> Verb -> Adverb -> Conjunction
04:341. Most programming languages are *Noun* focused languages, using *Verbs* at times. This is the mainstream object oriented languages
2. Functional languages focus on *Verbs* which act on *Nouns*, often using *Adverbs*
3. Function-level languages focus on composition, using *Adverbs* and *Conjunctions*
04:40When it comes to that level of abstraction tho, I feel it's still a bit immature. Mostly people do variations of compose. Only few have more useful stuff like *differentiation*, *function inverses*, etc.. built in
04:44Rebol is better than almost everything else at the syntax level (also with most types of data), but I feel it lacking at the type level (still, better than most which don't have types)
04:46I meant to write about HOF, but wanted to built a better picture of where it could fit in with the rest and didn't know where to get started. Well at least this is out there now :smile:
04:47Other stuff: Dependent types, categories
04:48[2-categories](https://ncatlab.org/nlab/show/2-category)
04:48> The notion of a 2-category generalizes that of category: a 2-category is a higher category, where on top of the objects and morphisms, there are also 2-morphisms
04:49Should I put this in the wiki?
gltewalt
04:54Still don't have traditional closure and HOF in Red. So far.
Stuff too far beyond that spooks me
04:56I know the gist of lisp / scheme, and I'm aware of ML-like pattern matching, but that's as far as it goes
9214
05:24I'd really like to see user-defined datatypes in Red
gltewalt
06:22Then maybe you should choose R/S for your low level thing
06:25So... if R/S is written in Red, how come he didn't just go with low level access in Red. Similar to inline ASM in the middle of a C program
9214
06:46@gltewalt Red is written in R/S and Rebol (for now), not the other way around
06:47and you can inline R/S with routines
06:49now J is also on my list
gltewalt
10:57"""
at some point, when the bootstrapping phase will be over, Red/System will be rewritten entirely in Red, giving an opportunity to fix and improve the design (also helped by several months of feedback from Red/System usage).
"""
9214
11:11R/S is written in Rebol, Red is written in Rebol and R/S, bootstrapped Red will be written in Red and in R/S, and R/S will be rewritten in bootstrapped Red.

geekyi
04:21When you don't know where you clicked to get the link from:
04:21https://www.youtube.com/watch?v=Cgs0F70c-I4
04:24This is much more interesting :smile: Data structure visualization: https://www.youtube.com/watch?v=KwZmAgAuIkY
9214
06:40@geekyi have you used J for large tabular-like data processing? With my recent fiasco with csv parsing I'm looking for good data-oriented alternatives :smile:
06:41and I'm interested in array-based languages in particular
07:53and how J is different from K?
gltewalt
07:58It's one earlier
9214
10:39Perhaps this isn't the right place to ask such questions, but this is a nice community of (mostly) reasonable people and I'm curious to hear your thoughts, so I'll proceed anyway.

My current day-to-day activity involves some programming-related tasks, mostly data crunching and parsing. This tasks are rather trivial when formulated, i.e. "you have this table, calculate X for each row and then do Y and Z" or "just get X from text files and put them in Y".

But, they usually are time constrained, i.e. I should do it *right now* or *ASAP* - and this constrains make me very uneasy, to the degree that I experience panic attack and feel like :shit: while staring and the screen for hours; apathy and passive-aggressive behavior emerges and I need either to take a nap or really long break to reset and feel like good version of myself again.

Another thing that makes me feel this way is the fact that sometimes such tasks require usage of terminology/methods/tooling with which I'm not familiar with and can't just get on a first pass. In other words, *I can't feel comfortable and do this tasks until I make sense out of it fully*, and I can't make sense out of it until I cram free time for self-studying at home, which I can't do on a daily basis because the only free time I have is between 10PM and and 9AM or on weekends.

**TL;DR**: when I have task at my hands which is either time constrained, or involves some unfamiliar methods/terminology/whatever, or both, I feel completely let down because: constrains make me unease, I can't proceed until I understand problem, data and domain "globally".

**On contrary**, when it comes to more *investigative/exploratory* and *analytical* tasks (e.g. "we have no :boom: idea what's going on, just fix this at your own pace and report back when you done" or "this doesn't make sense, can you make sense out of it and tell us what you think?" or "boy do you ever wondered how this thing works?"), which don't have strict time constrains and give me freedom to perform whichever way is suitable, I feel like at home and can do this stuff with pleasure.
I feel even more comfortable if task is "conceptual", i.e. if it's some well-defined problem domain in which I just need to dive deep, on my own, and for a long time, or if it's some terra incognita and *everyone (except me :smile: ) would feel uneasy if they'd be asked to go there and do something*.

So, **the questions is**: am I just some sissy or this is a valid personal (or maybe not personal but "stylistic" or whatever) problem which I should discuss with my "superiors"? I know my shortcomings and I know that I shouldn't push myself, otherwise both people and myself would get hurt. What would you suggest as an engineer and/or like-minded person?
10:51And **the best** tasks is the ones described above, but which I choose by myself instead of receiving from someone.
12:24and my god J is really nice so far
gltewalt
18:16Most humans react poorly to "figure this out and do it now", or, "we don't know what's going on, but sort this out right now".
18:18This business or office culture is probably the number one reason that MS Excel was invented
18:19Grab a copy of that, get familiar with formulas and macros, and you won't need languages. Can import CSV directly into excel.

Sounds like they should be using some database, but are not
18:31I'm suspicious of forall. For each is more accurate 'visitor pattern'. Might be faster
9214
18:48forall gives you series' index for free
gltewalt
18:49I already uncovered a set bug in it, so I'm leery
9214
18:51did anyone tried to build Rebol fuzzer in the past?
18:52i.e. generate random block of code, attempt it, check if result is the same as expected, if not - congrats you've found a bug
gltewalt
18:52Let us know if your work situation is a serious threat to your well being - being that it's Russia, I'm sure it's different than america or some other counties.
9214
18:53@gltewalt :D
18:53yeah, with bears on the streets and stuff
gltewalt
18:53No, with Putin goons
9214
18:53it's not a work though, just a research center where I pursue master's degree
gltewalt
18:54We hear scary stories
9214
18:55I don't really care about politics, haven't watch tv and news for years
gltewalt
18:57In Russia, Vector comma-separates you
18:57@greggirwin would probably know of fuzzer has been attempted in Rebol
19:00I worked in high pressure 'office' for 10 years. We only had excel, vba, vbscript, and activex to work with - eventually had an automated system going
9214
19:10@geekyi I don't get how *fork* expands to explicit *verb*, say, (+/%#) to (+/y)%(#y), I mean, are there any rules for that or is it just "hardcoded"?
19:13I read it like "apply monad #, then monad % and finally monad + with adverb /", but instead it's "monad #, then monad + with adverb /, then dyad %"
19:18ah! (+/%#) *is itself a dyad*! mah boi
19:20but how comes that it acts like a dyad if it writes like a monad..?
gltewalt
19:58"The symbol / is called "Insert", because in effect it inserts whatever function is on its left between each item of the list on its right. "
9214
19:59@gltewalt yeah, I know that, I just can't get how *trains* are formed, rules don't make any sense
gltewalt
19:59Just started going through book
9214
20:03"There are four basic schemes for trains of verbs"
(f g h) y    =    (f y) g (h y)       monadic fork 
         x (f g h) y    =  (x f y) g (x h y)     dyadic  fork
           (f g)   y    =       y  f (g y)       monadic hook 
         x (f g)   y    =       x  f (g y)       dyadic  hook
20:06see, (f g h) writes as a monadic verb, but acts as a dyad by "doubling" it's argument
20:06same for monadic hooks
20:16@gltewalt good news are - J have [ and ]
gltewalt
20:39oo, we need these for Red.
http://www.rebol.com/r3/docs/functions/dt.html
20:43swiped from R2 source:
delta-time: func [
    {Delta-time - returns the time it takes to evaluate the block.}
    block [block!] /local
    start
][
    start: now/precise
    do block
    difference now/precise start
]
20:44
>> b: append/dup make block! 10000 1 10000
== [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
>> delta-time [forall b [print first b]]
20:45== 0:00:00.361
Oldes
20:51In above the slowest part is the print.
20:52With conversion from integer to string.
greggirwin
21:32:point_up: [October 14, 2017 4:39 AM](https://gitter.im/red/sandbox?at=59e1e951bbbf9f1a385d923c) @9214, I have a show tonight, and have to run, but I think a lot of us are like that. Analysis Paralysis is a real thing, and I know *I* feel like I need to understand something completely, before trusting I can do it right, and well. Just because I *can* make something work correctly, doesn't mean I'm satisfied that the solution is the right one, or will last, be robust, etc. So there is anxiety when others say "it's fine" and let it go, because it seems to work OK at first.

You sound perfectly normal to me. :^)
21:34I haven't seen a fuzzer, but I want to build a system/tool/site that lets us generate "tests" asks for input like a CAPTCHA, and compares results with what is eval'd. This can not only uncover bugs, but design expectations.
gltewalt
21:36How can we translate R3's delta-profile to Red? Do we have to wait until stats is further developed?
geekyi
22:43I think @greggirwin's (and another, don't remember who now) updated timing functions are better
22:44Timing with runs
22:45Maybe invert it completely so you get something like runs/second
22:45Altho, delta-profile looks really nice
23:19@9214
> @geekyi have you used J for large tabular-like data processing? With my recent fiasco with csv parsing I'm looking for good data-oriented alternatives :smile:

J I usually use for quick calculations and plotting. It helps because less key strokes, fast startup, nice ui for reusing calculations, etc.
Not so good with it in parsing data. Either I don't know or it is hard.
I usually use something else (r is nice, also an array processing language and has a built-in library for parsing csv, but larger compared to redbol and j)
Often use redbol when I have to parse something (so much easier to understand and less buggy compared to regex!)

K is from a different person (tho I think there was history there, not sure)
I don't like it's syntax (J is cleaner for me)
And K's creator seem to invent another language every few years (Kx, Q, etc), but it could potential be better, I haven't really tried it
gltewalt
23:27https://imgur.com/a/rvYQg

geekyi
00:07@gltewalt source?
gltewalt
00:31Glassdoor
00:32https://www.atronixengineering.com/careers/#967195410
9214
05:18oh, I hacked Siemens PLCs and pentested SCADA during my bachelor's degree graduation project (or whatever it's called)
05:18interesting stuff
05:26@geekyi yeah, I thought about R too, but Python seems like a more reasonable alternative (I *hate* python, but as a tool for getting work done it's ok, and it's modern lingua franca anyway)
geekyi
05:27@9214 whatever works! :smile:
9214
05:27@geekyi thanks for insights! any tips regarding hooks and forks though?
geekyi
05:28R is nice, once you get past the weird syntax I guess.. lots of docs and libraries
05:28@9214 I thought you figured it out?
05:28:point_up: [October 15, 2017 1:03 AM](https://gitter.im/red/sandbox?at=59e26da4e44c43700a32c635)

> "There are four basic schemes for trains of verbs"
05:29That's it basically
9214
05:29@geekyi I figured out that they're sort of a idiomatic shortcuts, I know how I can use them, I don't get *why* they are formed the way they are formed
geekyi
05:29The idea is any binary function (dyad, taking 2 arguments) can be composed
05:30That you can break down any multi argument function into dyads..
05:30The monad / dyad dichotomy in J complicates everything I feel
9214
05:31why I write (f g h) y and it acts like (f y) g (h y)?
05:31yeah, I guess it's a shortcoming of sticking with limited ascii characters set
05:31intuitively I want to write y (f g h) y
05:32that way it looks like a dyad and acts like a dyad and everyones happy :smile:
05:33I just need some theory behind this kind of function composition and application
geekyi
05:34Some are adverbs which act on verbs
9214
05:35I know that, but in this case we have monad-dyad-monad combo
geekyi
05:36Monadic fork
05:36Does the diagrams in http://code.jsoftware.com/wiki/Vocabulary/fork ?
9214
05:39are they just "syntactic sugar" and "you see this - you rewrite it like that" **or** there're some theory behind such transformations?
geekyi
05:39
(f g h) y    =    (f y) g (h y)       monadic fork

y noun
f h monadic verb
g dyadic (ad)verb
9214
05:40I don't understand how monadic f and g could apply to the same argument at the same time if J have strict right to left evaluation order
geekyi
05:41@9214 yeah, it's "syntactic sugar" for composition of verbs, only in ()
05:41A lot of people do think it's a bit clunky..
9214
05:42welp, now I'm satisfied :+1:
geekyi
05:43So if you don't have it inside (f g h), e.g. f g h definitely behaves differently
05:43I may be wrong, but that's how I've thought of it..
9214
05:44yes, they produce different binary trees of function composition/application
06:00@geekyi
* *noun* is an array of any rank;
* *verb* is a function that acts on *nouns* and produces *nouns*, it's either *monadic* or *dyadic*, or both;
* *adverb* is a function that acts on *verbs* and produces new *verbs*, *adverb* is a *monad* that receives only leftmost argument;
* *conjunction* is a function that acts on *verbs* and produces new *verbs*, it's a *dyad*.
am I a good student or this is all (or in some parts) plain wrong?
geekyi
06:03@9214 In general, all *verbs* are both dyadic and monadic. SO when composing, sometimes you have to block the dyadic behavior to get the monadic behavior
06:04With cap [
9214
06:05poetry :wine_glass:
geekyi
06:06You're a good poet :wink:
9214
06:06@geekyi and how many dimensions J can support?
06:06and how one should reason about multi-dimensional arrays?
06:063d cube is okay, but tesseract...
geekyi
06:07@9214 It's just one dimensional arrays where you impose a dimension
06:07Shape is useful $
06:08Monad gets the shape, dyad sets the shape
06:09
2 3 4 $ i. 9
0 1 2 3
4 5 6 7
8 0 1 2

3 4 5 6
7 8 0 1
2 3 4 5
9214
06:09soon I'll be like [this guy](https://www.hillelwayne.com/post/handwriting-j/)
geekyi
06:092x3x4 array
9214
06:09uh-uh, 2 plains of 3 rows with 4 columns each
geekyi
06:10> 3d cube is okay, but tesseract...

In general, you don't think of higher dimensions, you think in slices of higher dimensions
06:10Can completely ignore it's a higher dimensional thing
9214
06:10and what if slice is a tesseract?
geekyi
06:11@9214 most operators in j are 1 dimensional (it's easier)
9214
06:11puny mortals :japanese_goblin:
geekyi
06:11Mostly rank 1 or infinity
06:12Hah.. well it's not geometry after all
06:12Even if it was..
06:14https://www.youtube.com/watch?v=zwAD6dRSVyI
9214
06:14oh, how http://miegakure.com/ is doing?
geekyi
06:15^- video **tl;dw** think in 1D for higher dimensions..
06:15Well, there are some android apps for 4D vis too..
06:16Remind me later when I get the time, gtg right now..
06:18http://marctenbosch.com/news/2015/12/how-do-you-even-develop-a-4d-game/
06:18> That's it! I got better at finding which dimensions to ignore over time.
06:19Looks interesting.. but no demo or download :worried:
9214
geekyi
06:21>This approach kind of breaks down a little bit when thinking of objects that change in all dimensions at once (such as duocylinders for example), but the general idea is the same: you can work with math without needing to see all of what it represents at once
06:22^- approx same thing in the video above.. visualizing all 10 dimensions at once with 1 dimension each
06:23Would be nice to have as a tool.. with *react* sliders :wink:
9214
geekyi
06:24If you need something that's working *right now*.. you can check out cluscript
06:25Great interface (but can be improved, someone posted a while ago in official red channel(?) about versor)
06:26Gitter really needs better search interface
9214
07:40http://code.jsoftware.com/wiki/Essays/Trains
15:42 @geekyi are J and/or K homoiconic btw? I know that K has some Scheme heritage, and already saw that it's possible to load arrays from strings and do boxing/unboxing in J. In other words, can this languages manipulate arrays which itself contain verbs, nouns and stuff (+ other scripts) and evaluate/apply them?

geekyi
10:21@9214 depends on your usage I guess.. I've not thought of it being homoiconic exactly
10:25http://www.jsoftware.com/help/dictionary/xmain.htm
10:26@9214 check in particular, http://www.jsoftware.com/help/dictionary/dx005.htm 5!:
9214
10:27@geekyi yes, looks like a can manipulate boxed values
geekyi
10:30@9214 also, I suppose you already know about [Dissect](http://code.jsoftware.com/wiki/Vocabulary/Dissect#Dissect)? Useful tool for debugging
9214
10:30:O oh wow
geekyi
10:31Install with j package manager
greggirwin
17:42Dissect looks very cool.
9214
17:47@greggirwin Join us!
greggirwin
17:56I've looked at J a few times, and it just hasn't clicked in my head. Maybe I'll reJoin in the future.

9214
08:00I'm in love
(*/)~>:i.9
1  2  3  4  5  6  7  8  9
2  4  6  8 10 12 14 16 18
3  6  9 12 15 18 21 24 27
4  8 12 16 20 24 28 32 36
5 10 15 20 25 30 35 40 45
6 12 18 24 30 36 42 48 54
7 14 21 28 35 42 49 56 63
8 16 24 32 40 48 56 64 72
9 18 27 36 45 54 63 72 81
08:01@geekyi are there any gitter/slack J communities by any chance?
08:01or should I stick with official mail list?
geekyi
08:03@9214 I don't know, never have been in any J communities, the mailing list is the place I'd found most activity in..
08:07Hope you don't go too far :p
08:08Hoping all this inspires you to implement higher order function primitives in Red :wink:
9214
08:08trying to follow "learn new PL every year" mantra
08:09Red surely will benefit from such "tabular-like" functions
08:09and Dissect!
geekyi
08:09Array processing really, multidimensional features!
08:10Yes! I only knew about Dissect fairly recently, after getting to know Red
greggirwin
17:22Dialect over @toomasv's matrix library?
9214
18:07@greggirwin AFAIK @toomasv's DSL is for working with 2d data only, right?
toomasv
18:09Thought about extending it to tensor algebra, but this is way above my head still :(
9214
18:10jeez :eyes:
toomasv
18:10Wat!?
greggirwin
18:11@9214, well, he's just getting started. :^)
9214
18:11@toomasv suddenly I feel myself even dumber :D
18:12trying to get DCT right now and it just doesn't click how every signal could be represented as a bunch of frequencies
toomasv
18:12Humm :question: :exclamation:
9214
18:13https://en.wikipedia.org/wiki/Discrete_cosine_transform

gltewalt
03:17Hmmmm... scheme to ASM
http://www.call-with-current-continuation.org/bones/
03:18@geekyi Geeky enough?
geekyi
09:31@gltewalt it is so bare*BONES* that you need a linker to make executables :p
09:32BUt truly x-platform like Red (mingw is optional) (but I guess that'd be true of most assembly code..)
09:33> mingw is optional

My strict test critea for x-platformness :p
16:09@9214 why not? :p the ![image](https://upload.wikimedia.org/wikipedia/commons/2/24/DCT-8x8.png) helped me quite a bit there
> @toomasv suddenly I feel myself even dumber :D
9214
16:10idk, it's just not intuitive for me
16:10http://resources.nerdfirst.net/dct
geekyi
16:11It works just like a bunch of pixels at an abstract enough level, and in other transforms, you can choose an arbitrary wavelet to represent your signal too!
9214
16:11I can get how we can add our weighted cosines and get original signal back, but I can't *see* how the hell I can decompose any signal into a bunch of cosines!
16:13I mean, when I see 42 I know that it's six 7 or seven 6
16:13but when I see some waveform it's not really obvious for me that it's, say, 3 cosines with such and such frequencies
16:14I don't really get what frequency means in this case, frequency of *what*?
16:15and am I right that any discrete signal is just an array of numbers?
geekyi
16:20@9214 everything is just ones and zero ;)
16:20The general transform is continuous and infinite
16:21Isn't it obvious from the website you linked?
> http://resources.nerdfirst.net/dct
16:22The top left corner is for the lowest frequencies, bottom right is for highest
9214
16:22yes, and combining them I can get any 8x8 image
geekyi
16:24The lowest possible frequency is the size of the image, so just a solid blob, the highest is the resolution of the image (approx)
16:25@9214 give me an example of what you can't decompose?
16:25Most images are too noisy to really decompose them..
16:26ANd compression gains are due to the lowest frequencies
9214
16:27I know that stuff :D again, I can't *just* see that "this signal is such and such cosines with such and such frequencies" just by looking at the plot or numbers or whatever
geekyi
16:31[![image.png](https://files.gitter.im/red/sandbox/wHT1/thumb/image.png)](https://files.gitter.im/red/sandbox/wHT1/image.png)
16:31@9214 I can't there either .. too noisy
9214
16:32oh, so we just puny humans and I'm a human too! :)
16:32that's a relieve
geekyi
16:34:point_up: [October 18, 2017 9:09 PM](https://gitter.im/red/sandbox?at=59e77cb4d6c36fca3169682d) these are the actual signals I can guess at easily
16:36Simplest black:
16:36[![image.png](https://files.gitter.im/red/sandbox/FSk4/thumb/image.png)](https://files.gitter.im/red/sandbox/FSk4/image.png)
16:392 coefficents and I'm already at my limit:
16:40[![image.png](https://files.gitter.im/red/sandbox/q6uJ/thumb/image.png)](https://files.gitter.im/red/sandbox/q6uJ/image.png)
16:40Corresponds to stacking 2 of those above images at their respective positions :point_up: [October 18, 2017 9:09 PM](https://gitter.im/red/sandbox?at=59e77cb4d6c36fca3169682d)
9214
17:14@geekyi still, can I represent discrete signal as J array? *wink-wink* ;)
gltewalt
18:31@geekyi There's also Chicken which either compiles to C which compiles to executable, or can inline C (and through C, inline assembly) in Chicken scheme
9214
18:32also Gerbil
gltewalt
18:33Everything other than redbol feels constricting now, though. Even lispy stuff.
It would probably be pretty similar if the parent block [ ] wasn't implied in red
9214
18:33@gltewalt you forgot about absence of scopes
gltewalt
18:34You'd have a boatload of [ ] in the source
18:35Yeah the scope thing is the biggest difference between redbol and anything else I've known about
18:39New mascot?
https://imgur.com/a/Ux3Mp

9214
17:26that moment then you realize that Fourier transform is all about [circumpuncts](https://gnosticwarrior.com/circumpunct.html)

geekyi
11:47@9214 btw j has package which interfaces to fftw
11:48math/fftw
rebolek
16:27Wow :) https://news.ycombinator.com/item?id=15515201
greggirwin
16:28Yeah. My son told me it was there. Not sure if I should say anything, as the page was clearly a playground, and incomplete.
rebolek
16:30I know. I wonder how the OP stumbled upon it. But it is nice to see interest in it :)
greggirwin
16:30Yes. I should probably comment to the effect of what I just said here.
rebolek
16:31Certainly. I left a comment there also, but your English writing skills are much better :)

geekyi
05:29:
• man
• person
• people
05:30:
• humane
• kernel
gltewalt
05:43https://github.com/red/red/wiki/REBOL-Core-Users-Guide:--A-walkthrough-with-Red
05:44Most of the way done. Takes a lot more time than I thought it would.
geekyi
05:48Nice work @gltewalt ! I've been reading those; can see the updates from the activity sidebar on the main channel
gltewalt
05:50I didn't think it was visible yet without the link
05:51Oh, it links :smile:
geekyi
05:52That makes me wonder tho, is the activity sidebar invisible for most people? :thought_balloon:
gltewalt
05:54I wouldn't think so, if they're in red/red. I have no special status and I see them.
geekyi
09:37Catchbook is really nice:
09:37[![image.png](https://files.gitter.im/red/sandbox/nvNJ/thumb/image.png)](https://files.gitter.im/red/sandbox/nvNJ/image.png)
11:20Forgot link: https://www.plm.automation.siemens.com/en/products/catchbook/
11:51A similar software, but for 3d http://solvespace.com/download.pl
11:52Similar in that the concepts are more about constraints first rather than dimensions and measures
11:52The dimensions can be very easily changed afterwards, even to the extent of modifying shapes
11:54Everything else is about points and beziers. These are about constrains like parallelism, equal lengths, mirror and symmetry, etc
11:55Solvespace is open source while the other requires a trial
9214
13:39@geekyi https://replika.ai/about/faq
13:39haven't checked mine in two weeks, I'm a bad parent :(
greggirwin
16:19Thanks for your work on that @gltewalt !
gltewalt
23:12I haven't had any experience to speak of with script headers, and calling from command line. I've done all of my experimenting in the repl except for when I used to build from source.
Shout I skip chapter 3?
23:13Or maybe see if someone else would do that section of the Guide walk through?

toomasv
15:57Some steps to [cryptarithm](https://gist.github.com/toomasv/c63e49e26d2cfb6032db9d0428029e3d) solving:
>> do %cryptarithm.red
>> solve/heuristics [SEND + MORE = MONEY][[M S] = [1 9]]
== [9567 + 1085 = 10652]
>> solve/heuristics [CLOCK + TICK + TOCK = PLANET][P = 1 T <> [0 4] C >= 2]
== [90593 + 9693 + 9593 = 109879]
>> solve/heuristics [YES + LETS + ALL + TRY + A + FUNNY = TEASER][T = 1 [Y L A F] > 0]; may take long
== [206 + 5016 + 355 + 142 + 3 + 97882 = 103604]

gltewalt
16:20That's neat. I can't believe I hadn't heard of it before now.
toomasv
17:10@gltewalt :open_mouth: Check the links in the end of my file.
greggirwin
18:23Really nice @toomasv. I like that you've made this accessible to people who might not know Red, while still including some things they have to understand, to get the details.
toomasv
19:46@greggirwin Thanks! Cleaned and updated it, added * and / ops. Can you give me advice how to keep letters from leaking into global context. I tried declaring them in context but they are still leaking.
gltewalt
19:54Is it the words in solve?
greggirwin
20:25@toomasv, you'll have to jump through a hoop or two. We can't yet extend contexts, except the global one, so you'll need to hide your words in an object you create dynamically (because you don't know what they'll be). Set, by default, sets words in the global context. You can use self, if you know the words, but that will limit you in this case. A is hidden here, but you have to know what it will be.
>> o: object [a: none  go: func [val][set in self 'a val]]
== make object! [
    a: none
    go: func [val][set in self 'a val]
]
>> o/go 1
== 1
>> probe o
make object! [
    a: 1
    go: func [val][set in self 'a val]
]

What you need to do is use inner objects for all the leaking word blocks you use set on. Maybe something like this:
obj-from-words: function [words [block!]][
    object append collect [
        foreach word words [keep to set-word! word]
    ] none
]

heur-obj: object [
    heur: none
    set-heur: func [spec [block!] "keys+vals" /local key val][
        heur: obj-from-words extract spec 2
        foreach [key val] spec [set in heur key val]
        heur
    ]
]
heur-obj/set-heur [a 1 b 2 c 3]
probe heur-obj
toomasv
20:27@gltewalt Yes, there are words in solve block. These are transformed into strings and every letter in string is made into word! in block ltrs and transformed into calculable formula (see calculation). Letters in this block are then appended to another block letters, made unique and later random values are attached to them until the calculation returns true.
20:29@greggirwin Thanks, I'll study this.
20:37@greggirwin But the following works too:
>> cx: context [
   a: b: none 
   letters: [a b] 
   set 'fun func [vals][set letters vals]
]
== make object! [
    a: none
    b: none
    letters: [a b]
]
>> fun [1 2]
== [1 2]
>> a
*** Script Error: a has no value
*** Where: catch
*** Stack:  

>> b
*** Script Error: b has no value
*** Where: catch
*** Stack:  

>> cx/a
== 1
>> cx/b
== 2

I don't understand why it doesn't work in my cryptarithm code.
greggirwin
21:22Because, in the above, letters is defined *inside* the context. Hence, that's where the words are bound.

toomasv
07:43@greggirwin True, and in my script I commented them out only because it didn't work. But now I solved the problem in [cryptarithm](https://gist.github.com/toomasv/c63e49e26d2cfb6032db9d0428029e3d) by bind (lines [30](https://gist.github.com/toomasv/c63e49e26d2cfb6032db9d0428029e3d#file-cryptarithm-red-L30) and [50](https://gist.github.com/toomasv/c63e49e26d2cfb6032db9d0428029e3d#file-cryptarithm-red-L50)). Thanks for your help!
greggirwin
16:30Looks like the letters also need to be singles, from your defs at the top of the context for those words. Good solution.
gltewalt
20:45@greggirwin ever thought about creating a local (or regional) meetup group for redbol?

greggirwin
02:32Nope. It would be just you and me, and I don't have time to push and organize something else.
02:36My time lately has been consumed by a show. I'm doing The Addams Family at Boise Little Theatre, if you have nothing else going on this weekend. We play Th/Fr/Sa.
gltewalt
02:51You think we are the only folks around here that dabble in redbol? Yeah
02:52I don't know where the "yeah" came from. Crazy phone
greggirwin
05:15:^) People are always nice when I talk about it, and I will push more once we get a few other things in place.
toomasv
12:01Added [alphametic](http://www.cadaeic.net/alphas.htm) function to [cryptarithm](https://gist.github.com/toomasv/c63e49e26d2cfb6032db9d0428029e3d):
>> alphametic/heuristics "Who is this idiot?" [[i t] = [1 9] W >= 2]
== [835 + 12 + 9312 = 10159]
>> solve/heuristics "Who is this idiot?" [[i t] = [1 9] W >= 2]
== [835 + 12 + 9312 = 10159]

Last word is the sum of all preceding ones.
Also added time-out check to not let bad heuristics to force shut-down of the console:
>> solve/heuristics "Saturn, Uranus, Neptune, Pluto: planets." [[s u n p] >= 1]
== {Time-out after 30 seconds! Try to improve heuristics.}
greggirwin
16:01Martin Gardner retires. Nice.
toomasv
16:59@greggirwin Old news! :smirk:
greggirwin
17:17LOL! Indeed.
toomasv
17:36LOLL! in Estonian is ДУРАК! in Russian :lollipop: :rage:
9214
17:41*bachelor* in Russian reads like *бакалавр*, and *бака* could be read as Japanese *バカ* (*fool*), and *лавр* sounds like *лавры*, or, in English, *laurels*. So, **laurels of fool**, this phrase kinda explains my feelings towards higher education in our country :P
toomasv
17:49I am afraid it is more or less the same in every country :sob:
9214
17:50this planet is doomed :earth_americas:
greggirwin
17:50Until our little crew can reach the Red Planet.
toomasv
17:50 :speak_no_evil:
9214
17:51:see_no_evil:
17:51@9214 c'mon Gregg
greggirwin
17:51Thinking about it...
17:51:headphones:
17:52Close enough? ;^)
toomasv
17:52 :love_letter: This would save the planet. Hmm.. I mean .. Red heart
.. Or .. may-be .. :balloon:
9214
21:15:japanese_ogre: :point_left: this

gltewalt
05:59I think if we extended compose to include string, it would be a good solution for those who want string interpolation. Or have a separate compose-string
greggirwin
17:12https://github.com/greggirwin/red-formatting/blob/master/formatting-functions.adoc#2-composite

Red [
	Author: "Gregg Irwin"
	Purpose: "COMPOSE for strings"
	Notes: {
		TBD: Security model for eval'ing expressions
	}
]

composite-ctx: context [

	eval: func [
		"Evaluate expr and return the result"
		expr [string!] "Valid Red, as a string expression"
		err-val "If not none, return this instead of formed error information, if eval fails"
		/local res
	][
		either error? set/any 'res try [do expr][
			any [err-val  form reduce [" *** Error:" res/id "Where:" expr "*** "]]
		][
			either unset? get/any 'res [""][:res]
		]
	]

	; Putting the colons on the outside gives you a clean paren expression
	; on the inside.
	expr-beg=: ":("
	expr-end=: "):"
	
	; One of the big questions is what to do if there are mismatched expr
	; markers. We can treat them as errors, or just pass through them, so
	; they will be visible in the output. We can support both behaviors
	; with a refinement, and then just have to choose the default.
	set 'composite func [
		"Replace :( ... ): sections in a string with their evaluated results."
		data [string! file! url!]
		/err-val e "Use instead of formed error info from eval error"
		/local expr
	][
		data: either string? data [copy data] [read data]	; Don't modify the input
		parse data [
			any [
				end break
				| change [expr-beg= copy expr to expr-end= expr-end=] (eval expr e)
				| expr-beg= to end
				| to expr-beg=
			]
		]
		data
	]

]
gltewalt
20:45Do you think compose-block could be mimicked in natives.reds to provide a native compose-string.
I read through some of the Red/System manual when I first started, but frankly it confuses me more than C does right now.
I haven't went back to learn it because there's so much to learn with just Red, and parse, and bind and context fiddling
20:45And View/Vid
20:46It's actually like learning 3 languages before you even get to Red/System
9214
20:47how would you determine what's composeable and what is not?
gltewalt
20:48Same as blocks with ( )
20:48The word compose would have to be present or your strings with parens would just be normal strings
9214
20:48and what if I don't want () to be composed?
gltewalt
20:49Don't use the word compose
9214
20:50to rephrase, what if I want to compose one () but not the other?
gltewalt
9214
20:50what's the escaping mechanism?
gltewalt
20:51Well I thought () would be enough, but I guess not
20:54How can you compose one () in block, not not any further () ?
9214
20:54
text
parse s: "1 + 2 = (1 + 2)" [
    some [
        to change copy match ["(" some [not ["(" | ")"] skip] ")"] (do load match) 
    |   end
    ]
]

probe s
20:55
text
>> compose [(quote (no don't touch me))]
== [(no don't touch me)]

toomasv
04:14Gregg has it this way:
>> composite "1 + 2 = :(1 + 2): (<- this is evaluated)"
== "1 + 2 = 3 (<- this is evaluated)"
9214
04:20and why not to allow user to specify this patterns himself?
gltewalt
06:02R3 has reword. Allows user to specify pattern.
You can see source reword in R3 repl but I didn't think "Ah, elegant!", at first read
06:03And R2 has something tied with tag! for templating but I can't remember what it's called right now
06:11Oh yeah.. build-markup
06:15I don't think it's needed, but there's opportunity to get something designed by users into the language, and if enough people want it....
dander
06:59I'm slowly working my way through problems on http://adventofcode.com (from last year). Lots of good parse challenges
toomasv
07:12@9214 You mean something like:
>> composite/escape {Some [probe "interesting"] Red expressions like 3 + 2 = [3 + 2]} ["[" "]"]
"interesting"
== "Some interesting Red expressions like 3 + 2 = 5"
>> composite/escape {Some (probe "curious") Red expressions like 3 + 2 = (3 + 2)} ["(" ")"]
"curious"
== "Some curious Red expressions like 3 + 2 = 5"
>> composite {Some :(probe "curious"): Red expressions like 3 + 2 = :(3 + 2):}
"curious"
== "Some curious Red expressions like 3 + 2 = 5"
>> composite/escape {Some (probe "curious") Red expressions like 3 + 2 = .(3 + 2).} "."
== {Some (probe "curious") Red expressions like 3 + 2 = 5}
>> composite/escape {Some eval(probe "curious")eval Red expressions like (3 + 2 = eval(3 + 2)eval)} "eval"
"curious"
== "Some curious Red expressions like (3 + 2 = 5)"
08:17@dander How far are you already?
dander
08:37@toomasv only day 7, but the puzzles are split into two parts for each day
08:40I had trouble doing day 5 with Red because of the lack of GC. It involves doing millions of hashing operations, and I wasn't sure how to manage the memory for it
9214
09:24@toomasv yes, precisely
09:39@dander the general advice is to allocate series with make and to reuse already existing series with /into refinements
toomasv
09:43@9214 Little changes to @greggirwin 's code:
composite-ctx: context [

    eval: func [
        "Evaluate expr and return the result"
        expr [string!] "Valid Red, as a string expression"
        err-val "If not none, return this instead of formed error information, if eval fails"
		/local res
    ][
        either error? set/any 'res try [do expr][
            any [err-val  form reduce [" *** Error:" res/id "Where:" expr "*** "]]
        ][
            either unset? get/any 'res [""][:res]
        ]
    ]

    ; One of the big questions is what to do if there are mismatched expr
    ; markers. We can treat them as errors, or just pass through them, so
    ; they will be visible in the output. We can support both behaviors
    ; with a refinement, and then just have to choose the default.
    set 'composite func [
        "Replace :( ... ): sections in a string with their evaluated results."
        data [string! file! url!]
        /err-val e "Use instead of formed error info from eval error"
        /escape esc
        /local expr expr-beg= expr-end=
    ][
		either escape [
			expr-beg=: either block? esc [esc/1][rejoin [esc "("]]
			expr-end=: either block? esc [esc/2][rejoin [")" esc]]
		][
		    ; Putting the colons on the outside gives you a clean paren expression
			; on the inside.
			expr-beg=: ":("
			expr-end=: "):"
		]

        data: either string? data [copy data] [read data]    ; Don't modify the input
        parse data [
            any [
                end break
                | change [expr-beg= copy expr to expr-end= expr-end=] (eval expr e)
                | expr-beg= to end
                | to expr-beg=
            ]
        ]
        data
    ]

]
15:49@dander Wheeuu! Did day 3 . Chasing the E.Bunny!
dander
17:03@9214 I was doing some of that, but some parts are harder than others. The particular case involved concatenating a string with an integer, hashing it, and checking the output. I got so far as reusing the input and output strings (and that seemed to work), but it was still allocating memory where I was joining the sample string to the int. I think it was maybe converting the int to a string, and needs to allocate a new string for that. I could have done something where I calculated out the text representation of the int and manually inserted it into the input string, but I felt like it was starting to be not-fun by that point. I dunno, maybe there was another way of doing it that I didn't think of, but the whole thing will be moot once GC arrives anyway
17:10@toomasv nice :)
greggirwin
19:22We can certainly extend composite to allow custom markers. I would probably call the refinement /with as that's a standard name for default overrides.
9214
20:05:( :(
20:06this marker is depressed because he knows that he'll be wiped out soon
gltewalt
21:25what are these for? compose*:
21:25Significance of *?
9214
21:25@gltewalt in codebase * is used for names that alias with high-level definitions
21:28or for low-level definitions that aren't supposed to be used directly
gltewalt
22:41
>> compose-string "(person) had a (size) (animal). It was (3 ** 3) ft. tall at the shoulders."
== {Mary had a Giant Goat . It was 27 ft. tall at the shoulders.}
geekyi
22:50> what are these for? compose*:

@gltewalt did you mean https://github.com/red/red/blob/75777037e17d7615f57d88ab4517c229f7d42497/runtime/natives.reds#L1019?
22:51That is the convention for writing Red runtime natives! in Red/System
gltewalt

gltewalt
00:08Would be pretty much a one-liner to compose string except for illegal word messing up load
00:09Maybe some formatting issues
toomasv
17:16@dander Whoooh! Day 5 was tough! Forced my machine to knees (or rather Red? Lot of silent shutdowns).
dander
20:34@toomasv too tough for me. Did you figure out how to manage the memory? Or save some state and resume it?
toomasv
20:38@dander I saved succeeding numbers, and on next try after shutdown continued frome these.
dander
20:40that makes sense. Do you think it was just related to memory use?
toomasv
20:47@dander I am pretty sure it is:
>> st: stats loop 100000 [checksum rejoin ["aagrtuei" 1] 'MD5] stats - st
== 20086784
dander
20:49I was doing something like that, and tried switching from rejoin to append to reuse the output string, but it seemed like there was still an allocation to convert 1 to "1"
20:50I didn't really think of saving the intermediate result
toomasv
21:01Well, considered limitations of memory, it seemed the only way to get further. But you are right, append works little better:
>> key: "aagrtuei" compare-times/count [[checksum rejoin [key 1000000] 'MD5][checksum append copy key 1000000 'MD5]] 100000 
Time         | Memory      | Code
0:00:00.231  | 12963840    | [checksum append copy key 1000000 'MD5]
0:00:00.335  | 20086784    | [checksum rejoin [key 1000000] 'MD5]

But, hmmm, how did you get your password?
gltewalt
22:28Handy for a Broken Time Machine game:
>> print random now
1-Feb-1755/1:37:12-04:45
dander
22:39@gltewalt haha!
22:40@toomasv I had gone a little further with the memory usage, but still couldn't solve it
>> key: make string! 100
== ""
>> append key "aagrtuei"
== "aagrtuei"
>> compare-times/count [
[        [checksum rejoin [key 1000000] 'MD5]
[        [checksum append copy key 1000000 'MD5]
[        [clear at key 9 checksum append key 1000000 'MD5]
[    ] 100000
Time         | Memory      | Code
0:00:00.269  | 15065088    | [checksum append copy key 1000000 'MD5]
0:00:00.288  | 7942144     | [clear at key 9 checksum append key 1000000 'MD5]
0:00:00.382  | 17985536    | [checksum rejoin [key 1000000] 'MD5]
22:42I ended up finishing it in C# in Linqpad
void Main()
{
	var outputs = new char[8] {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'};
	
	var str = "cxdnnyjw";

	var pws = Counter()
		.Select(i => HashAttempt(str, i))
		.Where(hash => hash.StartsWith("00000"))
		.Select(hash => hash[5])
		.Take(8);
		
	// part 1
	//Observable.ToObservable(pws).Dump();
	
	var hashes = Counter()
		.Select(i => HashAttempt(str, i))
		.Where(hash => hash.StartsWith("00000"))
		.GetEnumerator();
	
	// part 2
	while (outputs.Any(i => i == 'x'))
	{
		hashes.MoveNext();
		var hash = hashes.Current;
		
		int idx = hash[5] - '0';
		
		if (idx < 8 && outputs[idx] == 'x') outputs[idx] = hash[6];
		
		String.Join("", outputs).Dump(hash);
	}
}

MD5 md5 = MD5.Create();

IEnumerable<long> Counter()
{
	long i = 0;
	while(true) yield return i++;
}

string HashAttempt(string str, long i)
{
	var hashbytes = md5.ComputeHash(Encoding.UTF8.GetBytes(str + i));
	return String.Join("", hashbytes.Select(b => b.ToString("X2")));
}
9214
22:48:see_no_evil:
22:58:muscle: :star:
[![image.png](https://files.gitter.im/red/sandbox/2man/thumb/image.png)](https://files.gitter.im/red/sandbox/2man/image.png)

toomasv
05:43@dander Mamma mia! In Red it is pretty much one-liner. Clearing at 9 is as good as you can get, I think. Still checksum eats memory up.
05:47@9214 Do I read “gold star” on your black belt?!
9214
11:12@toomasv *one* gold star
toomasv
11:17@9214 :clap:
Could this memory-management be easily done in RS? How?
9214
11:18@toomasv just guessing, but can you guys check out simple-gc branch?
11:23https://github.com/red/red/blob/master/runtime/allocator.reds
11:23https://github.com/red/red/blob/simple-gc/runtime/collector.reds
gltewalt
20:28I think... there is a free memory function in R/S. But I need to double check.
And you can look at source sqrt for example of calling straight out Red/System
20:36Oh it's the stack
20:37
13.8 stack/free

Frees a storage space on stack (in stack slots unit). This is useful for manually controlling the release of a stack storage space allocated with system/stack/allocate, or from outside a function.

Syntax

system/stack/free <slots>

<slots>: expression returning an integer
Manual stack manipulations and exceptions
Current exceptions implementation (catch/throw) cannot mix with manual stack manipulations, therefore all allocated spaces on stack must be freed before entering a catch body block, or using a throw keyword.

13.9 pc

Retrieve the CPU program counter value.

9214
17:20@geekyi http://t3x.org/klong-stat/index.html well, I was onto something when started with J ;)
gltewalt
19:28So the fact that poke can only do one value at a time seems like a problem to me
19:29And why if it says "any-value" does it give a invalid value error if a char isn't used ?
greggirwin
19:34@gltewalt, why is that a problem? It's poking one value into the place of another.
gltewalt
20:26Inevitably a user will want to poke in multiple values in place of an old one - whether they actually need to or not.
20:28A 'newer' user
9214
20:29
text
>> blk: [1 2 3]
== [1 2 3]
>> also blk poke blk 2 [2 2 2]
== [1 [2 2 2] 3]
20:30do you expect [1 2 2 2 3] here?
gltewalt
9214
20:30but it's not the value (block), it's content of the value
gltewalt
20:31It will come up with strings more often, because people coming to redbol are usually coming from a string-centric world
9214
20:32I don't really like that attitude with "oh they coming from X we should do anything to please them"
gltewalt
20:33Not really 'do anything'. But they're going to see that there isn't a built in easy way to do it.
20:34The flip side of trying to cater to newbie expectations, is the old guard who know longer think like the newbies
9214
20:36although I can see that your point is valid, without poke I would go with change/part and it's too hairy for such simple task at hand
greggirwin
20:48> Inevitably a user will want to poke in multiple values in place of an old one - whether they actually need to or not.

People will want to do a lot of things. If they try something, and it doesn't work, the question is whether there's another way, or if a common need is made unreasonably difficult. If the answer is "Use this other function, and here's why...", and the benefit is a language that's more consistent and easy to reason about, I'm OK with that.
20:49I do love when I try something and it just works. But if it doesn't, and there's a good reason, I try to look beyond my immediate reaction that it's poor design.
9214
20:50@greggirwin how would you go with changing b in abc to, say, bb?
greggirwin
20:50That said, if you want the change, make a proposal. Provide examples of how the behavior will do all you want, without unintended consequences.
20:50@9214, change/part as you suggested.
20:52@gltewalt, in this case, think about what poke does. e.g., does it change the length of a series? No. It replaces one single value with another single value. What kind of values does a string series refer to? Hence...
9214
20:52
text
>> do also 's change/part at s: "abc" 2 "bb" 1
== "abbc"

versus
>> do also 's poke s: "abc" 2 "bb"

20:53yes, with your proposal string should automatically expand somehow or be reconstructed from scratch
gltewalt
21:07I should just stay away from this thing when I'm mobile. Now I can't even edit my typo.
dander
21:08Does it seem like change and replace have somewhat overlapping scopes? I'm not trying to imply that is bad, but I'm having some trouble figuring out their individual purposes. Is it just that replace implies a search pattern?
gltewalt
21:09It doesn't have to be poke, but one of change, replace, poke should probably make it straightforward.
9214
21:10@gltewalt even more straightforward?
>> replace "abc" "b" "bb"
== "abbc"
gltewalt
21:11and "abcdabc"?
21:11If you want to replace index 6?
9214
21:11
text
>> replace at x: "abcbd" 4 "b" "bb"
== "bbd"
>> x
== "abcbbd"
greggirwin
21:12@dander, replace has a difference meaning, because you're replacing by content, not position. It also has refinements that support that intent, which wouldn't apply in an index-based function like change.
gltewalt
21:12And if you want the last occurrence of "b" without having to know parse?
greggirwin
21:13@gltewalt find/last
9214
21:13@gltewalt are there any bits of parse in my examples?
gltewalt
21:14No, but help implies parse
9214
21:15in what place?
ARGUMENTS:
     series       [series!] "The series to be modified".
     pattern       "Specific value or parse rule pattern to match".
     value         "New value, replaces pattern in the series".

greggirwin
21:15@gltewalt, I don't know how it could be any more straight-forward but, as you noted, old timers can't see with fresh eyes. What we need are *concrete* examples of how *specific* changes in proposals make things better. In some cases, you'll get consensus without that, but if there's pushback, you need to defend your position.
gltewalt
21:15"Specific value or parse rule pattern to match".
9214
21:16@gltewalt "Specific value **or** parse rule pattern to match"
gltewalt
21:16find/last isn't a value to new eyes
9214
21:16there's a "specific value" part on the left side btw ;)
21:17and what is it, some fancy stuff for old farts like us? :older_man:
gltewalt
21:17Also, am I missing something with find/reverse, or does it just not work?
greggirwin
21:18OK, I'm missing something now. @gltewalt said:

> And if you want the last occurrence of "b" without having to know parse?

But you don't like find/last. How would *you* do it? Or, how do other langs do it, that is demonstrably better?
21:18Find/reverse should work. Do you have an example?
9214
21:19
text
>> x: skip "babccbab" 6
== "ab"
>> head x
== "babccbab"
>> x
== "ab"
>> find/reverse x "c"
== "cbab"
gltewalt
21:21it works - i just misread it
greggirwin
21:23@gltewalt, here's a suggestion. Use the Red/Help room more than this room. Others likely have the same questions, and more people will benefit. You'll also get more eyes on your questions.
9214
21:24don't hesistate to be a young opposition, grey roots should be weeded out! :older_man:
greggirwin
21:24@9214, do you mean me?
9214
21:25...and grey sprouts :baby:
gltewalt
21:26@greggirwin it isn't about find/last, it's more about the help text. But it could just be me - I could be weird
9214
21:26well, current documentation is a subject to change
greggirwin
21:26So suggest improvements, please.
gltewalt
21:26(I don't necessarily want a bunch of eyes on my griping :smile: )
9214
21:27I can agree that help messages were sometimes confusing when I started
gltewalt
21:28I will try to write my version of help for replace in a bit
greggirwin
21:28@gltewalt, I understand, but also understand that time we take here to answer, is only seen by a few, and the chat above related to poke/change/replace probably has helpful info that would be seen by more in other rooms.
21:29Actual griping we can keep here. :^)
9214
21:29@gltewalt idk, create anonymous twitter acc and post your exposures from it
gltewalt
21:29The changing of "abcdabc" to "abcdaxxc" actually came up in Help
9214
21:30we're already Bad and Impure anyway :^)
greggirwin
21:30@9214, I didn't know you knew me so well. :^)
9214
21:31:^) you're talking to a mirror dude :^)
greggirwin
21:31Or you're looking into a portal to the future.
9214
21:31how did you come up with :^) btw?
greggirwin
21:31I am your cautionary tale.
21:32It's an old emoticon, which gets around the gitter emoji subs. Plus, I have a big nose.
9214
21:32I saw that Volkerding uses it in Slackware release announcements :^)
greggirwin
21:32I'm from the ASCII past of BBSs and CompuServe.
gltewalt
21:34@dander provided one of the solutions
greggirwin
21:36@greggirwin thinks @9214 is now researching CompuServe and dial-up connections.
gltewalt
21:37and jumping around telenet pads
9214
21:37@9214 actually watches Trier's Antichrist
21:37@9214 and it's 2:30 AM at his place
21:41an awkward silence... :eyes:
gltewalt
21:42ok, I'll start with help poke in red/help
greggirwin
21:42Looking at compare-times, for improvements.
9214
greggirwin
21:43Since @toomasv added memory stats, it needs a new name.
9214
23:18I'm curious though, is R/S considered to be memory and type unsafe?
greggirwin
23:38Yes. Like C.

gltewalt
02:14red-racer?
02:15https://imgur.com/a/AdBE4
02:26compare-delta
dander
06:56compare-perf
06:56what kinds of improvements?
toomasv
09:00@dander @9214 How is going your quest in EBHQ? I just finished day8:
**  **** ***  *  * ***  **** ***    ** ***   *** 
*  * *    *  * *  * *  *    * *  *    * *  * *    
*  * ***  ***  *  * *  *   *  ***     * *  * *    
**** *    *  * *  * ***   *   *  *    * ***   **  
*  * *    *  * *  * *    *    *  * *  * *       * 
*  * *    ***   **  *    **** ***   **  *    ***
9214
09:09@toomasv still thinking on part 2 of day 1, memorizing all coordinates before intersection occurs seems like the only way?
toomasv
09:12@9214 That's what I did at least. Dirty but works.
9214
09:14the thing is that I found first intersection by searching 4 subsequent R or L, can't decide whenever it's cheating or not :D
toomasv
09:26Try, maybe it is correct. I inserted each visited position into a block and checked on each new step whether it is already there .
9214
09:27yup, same thoughts
14:56:godmode: :baby:
14:57[![image.png](https://files.gitter.im/red/sandbox/Yqhx/thumb/image.png)](https://files.gitter.im/red/sandbox/Yqhx/image.png)
greggirwin
15:52I suppose I'll have to check this out, once I catch up on...Hah! I make joke!
9214
16:07can someone share resources or insights on data-driven programming in Redbol?
16:09I'm thinking of organizing all essential data of my program as a bunch of tables (well, blocks), and then, using dialects, explaining transformations of that data either in plain English or in notation suitable for the data at hand
16:12or data itself could be the description (i.e. code) that could be fed into dialect
toomasv
16:53@9214 Hmmm, how about parse?
9214
16:55@toomasv :eyes:
16:55do I look like a :baby: for you?
16:57I meant that I'm not sure how I should organize all of this (in terms of modularity and code layout) and what should I take into account before starting?
toomasv
17:00@greggirwin Some tasks are quite challenging, so it'll definitely be fun.
@9214 No, more like :man:, and sometimes like :neckbeard:, or even :japanese_goblin:
Sorry, these are all too abstract questions for me. "Starting" what?
9214
17:02When it comes to designing a dialect or going with data-driven approach that I described above, what are the "best practices" and what questions should programmer ask himself on planning and designing phases? What to consider, what to double check, etc.
toomasv
17:06I'll come to your side of the question and will wait for someone to explain these things.
9214
17:07welp, now there're two of us :two_men_holding_hands:
toomasv
17:09Yep :question: :eyes:
9214
17:25@greggirwin excuse me sir, do you want to talk about Dialects? :man: :book:
19:39First question - when should one make a compiler or an interpreter for his dialect? Suppose I have something like add one and one which means 1 + 1 in plain Red. How to decide if I should evaluate it each time as it is (interpret) or to translate once into "low level" representation (compile), in our case 1 + 1, and process that representation instead?
rebolek
19:40That depends on your use case.
9214
19:41@rebolek it depends could be an answer to anything ;)
rebolek
19:41@9214 Right, it actually **is** answer to anything.
19:41But, writing interpreter is easier, I would say.
9214
19:42in my case I want to describe some spec in plain English, but can't decide if I should compile it to something more easy processable (with simple do) or interpret each time with parse, I'd go with "preprocess once and do later".
19:43but then I should write something like my-spec: preprocess [...] instead of just my-spec: [...]
rebolek
19:43Hm, in that case I agree that compiling is better approach.
9214
19:44And how can I make this preprocess function run only once?
19:44because, IIRC, on function call all other functions in its body will be evaluated
rebolek
19:45Because translating the specs into actual code sounds much more useful than "just" interpreting them.
9214
19:46okay, question about "run once" was rather stupid, I think I can figure this out :D
19:47now it boils down to readable description which should be preprocessed into Red code before script starts to run, and that's what macros do, right?
19:48but since current compiler macros relies on R2, it's quite limited, and I don't want use it, so, what should I do in that case?
rebolek
19:48Use interpreter macros?
9214
19:49@rebolek I tried, didn't worked
19:49or maybe I haven't tried enough :)
rebolek
19:50Hm. Then probably you need to write your own preprocessor. But you need to preprocess only your own dialect, right?
9214
19:50@rebolek yup
19:50but it feels like overengineering for one script
rebolek
19:50So it's basically just a dialect that will process your own rules and will spit out Red code.
9214
19:52@rebolek okay, thanks! And when it's more suitable to go with an interpreter?
rebolek
19:55deleted ;)
9214
19:55noted ;)
rebolek
19:58Well, I wrote interpeter for Lest (my templating engine), where the Lest source is actually "compiled" to HTML, but before it, it is interpreted using parse, not compiled to Red first and then to HTML. It makes sense for such immediate code, I guess.
19:59Actually, there is no hard border. If you look closely, what is interpreted and what is compiled gets very blurry, when we are not compiling to machine code but to other language in real time.
20:00Interpreting Lest works by rewriting original source, so it’s actually partially compiled. Or see math dialect for example.
9214
20:01I see, interesting
rebolek
20:02Is math interpreted or compiled?
9214
20:05I don't get why op is here if it's never used?
math: func [
    {Evaluates a block using math precedence rules, returning the last result} 
    body [block!] "Block to evaluate" 
    /safe "Returns NONE on error" 
    /local rule pos op sub end
][
    parse body: copy/deep body rule: [
        any [
            pos: ['* (op: 'multiply) | quote / (op: 'divide)] 
            [ahead sub: paren! (sub/1: math as block! sub/1) | skip] (
                end: skip pos: back pos 3 
                pos: change/only/part pos as paren! copy/part pos end end
            ) :pos 
            | into rule 
            | skip
        ]
    ] 
    either safe [attempt body] [do body]
]
rebolek
20:07@9214 good catch! I guess it is some leftover from older code. It runs fine without it.
9214
20:08and dialect itself seems unfinished, what about other math operators and their function equivalents?
rebolek
20:10Yes, it definitely is unfinished. It is good for some basic examples only, but that's not the point, I selected it as an example, because it is built in Red. The question is, if it's interpreter or compiler.
20:10I guess we should ask whoever wrote it if it will be updated, or if it’s abandoned.
9214
20:11parse part looks like a compiler, do part is an interpreter
rebolek
20:11Yes, that's my interpretation too.
20:12And you can certainly write a dialect that will work vice-versa.
20:13That will interpreted some parts to compile the result afterwards.
20:14So with such dynamic language, it’s hard to split it into two categories. That’s what I think.
20:15Other people may see it differently I believe.
9214
20:17I guess interpreter is needed when there're some parts that can be "deduced" only at run time
20:20I mean, interpreter is the one that does the job in one language and spits out the result in the same language, and compiler is the one that translates from one language to another, right?
rebolek
20:22Yes, I guess so.
9214
20:23who needs the dragon book when you have red/sandbox? :dragon:
rebolek

greggirwin
00:30I was most surprised, early in my Rebol career, when I wrote a few different versions of an FSM dialect. It got progressively less compile oriented, until it was all interpreted. I loved that result and it led me to accept that, because it's less work and less code to go wrong.
9214
00:33@greggirwin can you share different versions of this dialect?
00:34and what are advantages and disadvantages of compiled and interpreted dialects in your experience?
00:35or, as with code and data, there's no strict line between compiling and interpreting, just like @rebolek said?
00:39in my case it's not like I have well-defined problem domain, but rather a few chunks of data and description of its transformations, and I'd want to express all of this so that other people not familiar with Red or programming at all can read it and at least get the main gist
greggirwin
03:04@9214, I have the old stuff here, but will need time to organize and explain. Basically, I started with a simple func that took a block of states and events, permuted those, and generated a State Transition Table used to build a skeleton FSM object/context, which looked a lot like one you might write by hand. Eventually I removed the object and code generation part entirely, dispatching directly from the STT (as data).
03:11The dialect, e.g., for a turnstile FSM, looks like this:
sm: fsm/make-state-machine/with-stubs/trace 'locked [
    when locked
        coin causes [unlock thank-you] then unlocked
        pass causes alarm
    when unlocked
        coin causes thank-you
        pass causes lock then locked
        other causes other-event
    when testing
        coin causes coin-test
        pass causes pass-test
    when repairing
        coin ignore
        pass ignore
    when error
        other causes reset then locked
    otherwise
        reset then locked
        repair then repairing
        test then testing
        XXX causes exception then error
        YYY causes exception then error
        other causes cant-handle-it then dead
]
; Test runner
foreach event [coin pass xxx yyy repair test coin pass reset pass coin pass] [
    print rejoin [sm/state tab event]
    sm/send event
    print rejoin [tab sm/state]
]

/with-stubs generates placeholder funcs for the actions it finds.
03:12I also added standard enter/leave events for states, which auto-triggered.
03:13I should probably dust it off. :^)
dander
06:55@toomasv I've been really busy with family things and trying to have enough sleep, and I haven't made any more progress over the past several days. I currently have a solution for day 7 part one which satisfies the samples, but not the test input. So now I am feeling somewhat motivated to experiment with some parse debugging ideas...
9214
09:51@greggirwin I also had something in mind for FSM dialect, either visual-based (you know, drawing and viewing FSM diagrams) or the one that compiles down to Verilog code (similar to [this](https://github.com/sam-falvo/SMG) project)... or both
greggirwin
17:15I thought about a graphical approach as well, but haven't ever needed it. Higher on my list is a railroad diagram generator in Red, for parse rules.
17:15Generating other code is easy with Redbol. I've done a lot of that. iMatix was always inspirational in this regard as well.
9214
18:02Is there more general name for all of the stuff in [this](https://en.wikipedia.org/wiki/Template:Data) list? Data manipulation/processing?
greggirwin
18:09I just get a template page.
9214
18:10@greggirwin is there some kind of a table?
greggirwin
18:10Nope.
9214
18:10[![image.png](https://files.gitter.im/red/sandbox/mbcP/thumb/image.png)](https://files.gitter.im/red/sandbox/mbcP/image.png)
18:10welp
greggirwin
18:11Ah, I get it now. Wasn't reading the fine print.
18:13"Data Management and Processing" I imagine. That list covers a lot of ground.
9214
18:14@greggirwin :+1: thanks!
gltewalt
20:18$166 for "the dragon book"? Yikes.
greggirwin
20:31I have a copy here if you want to borrow it @gltewalt.
gltewalt
21:31Maybe I could. Makes me feel a little weird "borrowing" though
greggirwin
22:47Yeah, who would do that?

9214
09:21@gltewalt SICP is more helpful for starters (speaking from my experience though)

gltewalt
22:10Think I'll start Monday morning on a rouge lexer
9214
22:13@gltewalt they're using some hairy DSL with state machine and regexes all over the place, are you confident enough?
gltewalt
22:14Not totally, but I'll try.
22:15I can swipe needed refers from toomas :tongue:
22:15Needed regex
22:18Preliminary question though: should break predefined words up into categories or just make one big builtins block that contains all of Reds predefined words?
9214
22:27builtins
dander
23:26@gltewalt are you thinking about generating the list from Red itself? That might be nice because updating it for newer Red versions would just involve re-running the script. Starting with a builtins list seems easiest, and later if it is desirable, it could be broken into categories based on type or something

gltewalt
00:37I think I might try to copy the pygments lexer - though they have words broken down into categories. I'm not familiar at all with Python style regex stuff though
00:38Here's my quick start on Rouge. I probably wont be able to focus on it til monday morning though
00:38https://gist.github.com/gltewalt/9afccdb9c450395ff69fb8dab6bcc8f2
00:39@dander I grabbed the words from Red itself, yeah

gltewalt
00:05Grumble :angry:

https://imgur.com/a/9OPDc
00:10Looks like I'll have to get the cudgel out and "port" the pygments file
9214
01:56nice twitter
gltewalt
02:25VSCode is playing hell with formatting. Even after changing the files to 2 space tabs
03:05Twitter?
toomasv
17:50Some things are much easier solved by just looking at than programmatically:
┌                                         ┐
│ █ █   █ ██  ████████ █ █████   █  ██ ██ │
│█0 ██  ██ ██ █  █   ███ █     █     ██ ██│
│██  █ █ ██ █    ██   █  █ ████ ████   █  │
│ █  █ ██ ███████ █ █ ████ ██ ███   ██ █  │
│███ █   █  █    ██ █   █    █    █  █ █ █│
│███   █ █  █ ██    █   ██ █  ████ █   █  │
│ █ ██   █ ██ ████ ████  ██ █ █  ██ ██  ██│
│ █████  █     ███  █ █   █   █   ██████  │
│   ████ ███      █  ████ ██ ███ █  ██ ███│
│ █  ███ █████ █████ ██ ██ █  ██  █   █   │
│ ██  █    █ ███  ██   █ █  █ █ █  ██   ██│
│     █  █     █     █  █████ █  █ █ █████│
│ ██ ████ ████ █  █████ ██  █ ███  ███  ██│
│ ██ █  ███    ██ █  ██  █  ███ ███   █  █│
│ █  ██     ██ ██      █ █ █  █     █  █  │
│ ███ █ ██████ █████ █  ██ █  █ ███  █   █│
│    ██ ██  █      ██ █    █ ██   ███ ████│
│  █      █ █  ██ █ █  ██  █   ███  █ █  █│
│█  ██  █ █ █████ █ ████████████ ████     │
│███ ██   ███  █  ██    █  █    █  █████ █│
│█ █  ██ █     █ █ ████    █ ██        ██ │
│ ██████ █ ██  █  █  ███████ █████ ██ █ ██│
│ ██   █ █████ ██      █  █   █  ████ ██ █│
│  █ █      ██ █ ██  █  █ ██  █ █        █│
│  ██ █████ █  ██ ███ █ █  █ ██ █ ██  ██ █│
│   █ █  ██ ███ ██  ██  █ ██    ██ █████ █│
│█  █     ██   █ ██  █ ██   ██ █ ██   █   │
│███████    ██ ██ █ ██ █ ███ █ ██ █   █  █│
│█     █  █  █   ██ █  ███ █ █   ███ ████ │
│█ ██  ███ █   █    █     ██  ██  ██ █  █ │
│██████  ██ ██  ██ ██████ █ █   █ █  █  █ │
│   █ █ █ ██████ █  █  ██ ██ ████ ██████X█│
│██  ██ ██  ██ █ ██        ███  █   ██ █  │
│█ █      █  ███ █████ ██       █    ████ │
│█  ██  █  █  █    █ █████████ █████  ███ │
│███ ██  █  █ ██ █      █  ███ ██   █     │
│█ █  ███ █ ██ ██ █████     █     █ ████ █│
│ ████  █       ███  █ ███  █ ████   ███ █│
│ ██ █████  ██       █   █ ██    █        │
│   █  █ ██ ███  ██████  █   ██ ███  ██ ██│
│ █    █  █ ████ █  ████ ██████ █ █████   │
└                                         ┘

Can't remove space from between rows unfortunately. With this formatting, white cells are walls.
9214
23:29when one should generate data and when one should just hand-write it?

toomasv
04:12I guess there are several criteria. Do you mean theoretically in general, or in some more specific case?
9214
06:31Well, I know that it depends on use-case, I just not sure on which criteria to base my decisions.
06:42@9214 I'm*
greggirwin
17:02I think it's very personal, and depends on the scenario. I have done a lot of both, but don't have any hard and fast rules.

gltewalt
00:20Did it the bone-headed way, and it's still missing a few rules, but:
https://i.imgur.com/cOJx2hU.jpg
dander
03:38@gltewalt looks pretty nice for that sample
gltewalt
04:05Needs cleaned up. Consolidate a few things. Missing a few rules.
04:08Also, I need two good demos. A short one like the FizzBuzz sample, and a long one that uses as much of the language as possible.
04:09I avoided most of the DSL stuff. Went with simple.
07:22@toomasv Tried to use some of your patterns from your ACE contribution, but half the time the patterns need to be modified for Ruby. Which... is not a good time for me, as I dislike regex and have tried to avoid it.
I found this, which helps, but still not fun for me. http://rubular.com/
07:23Might be fun to make a VID app that looke like rubular, but for parse
rebolek
07:23That would be cool. I've been thinking about this, but do not have time to implement it.
toomasv
15:18@gltewalt You mean ‘parse’ to ‘regex’ translator?
rebolek
15:54@toomasv No, parse visualiser.
greggirwin
16:38Good work on that @gltewalt!

I've thought about the parse tool as well. With the callback feature, we can do a lot. Step tracing would be nice, and I think we can do that pretty easily. The trick, I think, is not to actually step trace, but to run the parse, using the callback to collect data which is then stepped through to show how it worked. There are obviously limits to that, but you're not going to use large inputs there. A parse+data debugger would be different.

gltewalt
03:06New gist. Properly formatted. Switched from VSCode to Atom.

https://gist.github.com/gltewalt/6afe7f96d6d433eb6e82d68e7417103e
03:13I think one or more of us could use the rubular layout as a starting point for the parse visualizer. I could probably stumble through creating the gui part as a view/vid learning project.
https://imgur.com/a/F7vXT
03:13parse editor/visualizer
geekyi
03:22https://distill.pub/2017/feature-visualization/
03:22Feature Visualization: How neural networks build up their understanding of image
gltewalt
03:33Can someone help me with my git mess?
geekyi
03:42@gltewalt git reflog -h
03:44git reset -h
03:44Basically, use git reflog to get something to reset to
03:45If you don't mind losing all the work done after a commit, git reset --hard
03:46Gtg, hope that helps
03:47If you're afraid to lose work, probably do a normal git reset
03:48But you won't really lose stuff unless you do git gc or something
gltewalt
04:23I nuked it and started a whole new fork and git repository. Worked out.
04:34And now we wait: https://imgur.com/SsPmvXu
greggirwin
16:33:point_up: [November 7, 2017 8:22 PM](https://gitter.im/red/sandbox?at=5a02786b976e63937e3e6f27) Thanks @geekyi. Going to have some strange dreams tonight.
dander
17:33Anyone tried GitKraken? I just found out about it. It seems like a very full featured graphical Git client
greggirwin
17:34I haven't, but that may be the best double-meaning name *ever*.
17:38Built on Electron. Let us know how it works if you try it.
dander
17:41😊I downloaded it, but I don't spend a ton of time using Git (pretty big download). Just wondering if other people are using it. My first impression is that it looks powerful and polished.
They have a 2-minute intro video here: https://blog.axosoft.com/gitkraken-tips/
greggirwin
19:20Electron == Big
rebolek
greggirwin
22:22Oh, the irony.

geekyi
05:35@dander I'm mainly using the built in github replacement *git-lens extension* in my ide *vs-code*
05:36A somewhat heavy editor (based on electron too), but not as slow as atom
9214
05:41http://scienceworld.wolfram.com/physics/ElectronMass.html
dander
05:42@geekyi thanks, I'll check out git-lens too. I like VS Code pretty well
gltewalt
19:23I just ditched vscode. It was playing hell with formatting across a couple different things. Could have been my ignorance but I got tired of it.
22:40Is redbol actually a shallow lake pretending to be a deep lake?
greggirwin
23:22Some people are just better swimmers.

gltewalt
09:00@toomasv
>> find/last [103 23 #"g" 56 11 #"8"] #"g"
== [#"g" 56 11 #"8"]
toomasv
09:01@gltewalt
>> find/last [103 23 #"g" 103 56 11 #"8"] #"g"
== [103 56 11 #"8"]

:worried:
gltewalt
09:02Hmmm
9214
13:47What's the difference between *bind* and *bound* in Redbol terminology?
13:48just past vs. present tense?
rebolek
9214
13:48:mortar_board:
rebolek
13:59bind - do binding, bound?- check binding
greggirwin
17:22Rebol bound? == Red context?
toomasv
17:24Beware, the dragon is loose:
Red []
dragon: func [n /local m k][
	m: -1 until [odd? k: n / (2 ** (m: m + 1))] 
	pick [90 -90] 0 = (k - 3 % 4)
]
n: 0
view [
	image 600x600 
	draw [pen red translate 350x450 line 0x0 10x0 translate 10x0]
	rate 60
	on-time [
		append face/draw compose [rotate (dragon n: n + 1) line 0x0 10x0 translate 10x0]
	]
]
greggirwin
17:26Nice! A Red Dragon is the best kind.
17:27This should go in the red/code demo repo. Under Showcase or Scripts.
toomasv
17:28@greggirwin OK, corrected color :)
greggirwin
17:29Well, he's wandered off my screen now. Better check behind my monitor for him.
toomasv
17:29I'll go chasing!
17:30The only stopping measure is this little cross on top-right :worried:
greggirwin
17:31So now we need a dragon catcher, which could be used for others too, where dynamic drawing is checked for position and reset when it goes off screen.
toomasv
17:43@greggirwin Right, let's keep hir in cage:
Red []
dragon: func [n /local m k][
	m: -1 until [odd? k: n / (2 ** (m: m + 1))] 
	pick [90 -90] 0 = (k - 3 % 4)
]
n: 0
view [
	image 600x600 
	draw [pen red translate 350x450 line 0x0 10x0 translate 10x0]
	rate 120
	on-time [
		append face/draw compose [rotate (dragon n: n + 1) line 0x0 10x0 translate 10x0]
		if n = 1880 [remove/part at face/draw 10 tail face/draw n: 0]
	]
]

greggirwin
17:45Woohoo! You caught a dragon by the tail.
toomasv
17:45 :dragon:
dander
20:12neat 🐉!

gltewalt
21:41I kind of wish I could just use html css for redbol gui
greggirwin
21:53Why is that?
gltewalt
21:54vid is ugly ugly
greggirwin
21:55You mean R2 VID or Red? Also, plain HTML is not all that fancy.
21:59Unstyled R2 VID was its own look, certainly, but you could also create styles. @rgchris was a master at this, and created some beautiful GUI styles.
gltewalt
22:06I'll look for his stuff
greggirwin
22:06Not sure what's public. When I worked with him on some things, it was all private.
22:08[![member-account.png](https://files.gitter.im/red/sandbox/2Gk7/thumb/member-account.png)](https://files.gitter.im/red/sandbox/2Gk7/member-account.png)
22:08There's one example.
22:09But it's all tradeoffs, right? Do you want HTML+CSS if it entails all the baggage that comes with them? And then having to write in (at least) 3 languages to create apps?
22:16Here's an app I did myself, lacking design skills of any kind.
22:16[![layout3.png](https://files.gitter.im/red/sandbox/sxXS/thumb/layout3.png)](https://files.gitter.im/red/sandbox/sxXS/layout3.png)
gltewalt
22:18What baggage for css + html?
22:18The examples aren't too bad
22:24I'm saying 'replace vid'. The option to use css + html would be cool, though.
22:24I'm *not* saying
greggirwin
22:28By baggage I mean things like SGML based syntax, the design never being intended for interactive UIs beyond hyperlinks and rendering structured documents, CSS looking nothing like HTML, the size of the engines behind them; things like that.
22:29*Why* would it be cool? That's what I don't get. We're trying to get *away* from that, I believe, for good reason. What makes it better?
gltewalt
22:29Size, definitely. For those that don't want bloat
22:30Why would it? Because you can do some beautiful things with it. Just as beautiful as winforms or apples thing (cocoa?), if not more so - and less complex than those
greggirwin
22:32So you want a non-native GUI system, that lets you use images and effects, not necessarily HTML and CSS as the mechanism, or do you want those because you know them?
22:33Maybe better to point me to beautiful examples you've built in HTML and CSS, to compare with how we might do them in a future Red GUI system.
gltewalt
22:34Not necessarily html css
greggirwin
22:36I can tell you, I'm not a beautiful GUI designer. Most of the time I focus on building things that work, and only the commercial products ever had concern for style of any kind. The in-house stuff, mostly plain VID (in Rebol projects) and I can't remember ever getting pushback on the look, only the functionality. If you're competing with "shiny", you do have to try to be shiny though.
gltewalt
22:43Gotta drive for a bit. Get back to you later

9214
00:05you want dedicated language(s) for GUI building, but then you dismiss VID (a language for GUI building)..?
gltewalt
00:08manipulate some sheep:
http://fff.cmiscm.com/#!/section/sheeps
00:08home page:
http://fff.cmiscm.com/#!/main
00:09The much simpler css I did is locked up by HP Enterprise. I don't work their anymore, and I didn't smuggle it out.
9214
00:20I imagine there would be a wrapper on top of VID (perhaps another dialect?) for non-native UI creation, 'cuz current approach with draw and styles isn't that straightforward
greggirwin
01:06Those sheep are adorable @gltewalt! Very cool. So, now we're talking about something, I think, very different than basic VID. Any idea, or way to easy see, all the code required to make that work?
gltewalt
01:30No, but I doubt it will ever be on the list for the red team
01:30It would be far down the road
01:31Some revamp of vid and draw?
greggirwin
01:33I think it would be ideal for a dialect unto itself.
gltewalt
01:33I wouldn't know where to start - yet
9214
01:36Visual **Interface** Dialect
gltewalt
05:07Anyone interested in a clojure book?
https://imgur.com/a/KtBmo
toomasv
06:06@gltewalt Beautiful stuff!
greggirwin
18:27I love books. Are these yours you're getting rid of @gltewalt ?
gltewalt
18:32Yeah - I have no use for the clojure book. Java, even indirectly, isn't my thing.
18:33I'll probably hold on to code complete. I never read 48 Laws of Power
greggirwin
18:33I'll take the Clojure book then. Someday I'll get rid of all the books I don't need, but I do like pulling stuff of the shelf while researching.
18:34I'll actually be out later today if you're going to be out. Otherwise we can schedule coffee time.
gltewalt
19:00I might be over in nampa this evening
greggirwin
20:35OK. We can wing it.
dander
22:12Regarding GitKraken, I don't have a lot of day-to-day Git usage, but I'm liking it for following the Red checkins. Its default interface is kind of like the [Github 'network' view](https://github.com/red/red/network), but faster, and easier to use. I agree the irony is pretty amusing.

gltewalt
21:42Latest commit for rouge was 28 days ago... so that's not very fun. Dunno what's going on with it.

gltewalt
07:13Any tips on this range function?
Gist with a comment: https://gist.github.com/gltewalt/bdc7847dceb8405e2d392a4a99c86fcc
rebolek
07:21
range: func [
	lower
	upper
	/step
		num
][
	unless step [num: either percent? lower [1%][1]]
	blk: reduce [lower]
	while [lower < upper][
		append blk probe lower: lower + num
	]
	if upper < last blk [remove back tail blk]
	blk
]

I did few changes, I check for step in the beginning instead in every step and I added check for out of range values, because of range 0% 10%.
gltewalt
07:23Did you see my note about percent? Questions about how to handle it
rebolek
07:24Yes, You should probably add a check if both values are of same type, something like unless equal? type? lower type? upper [cause-error 'what-is-that-crazy-syntax-omg]
gltewalt
07:27if /step, should I check if all three numbers are percent?
rebolek
07:30
bbrange: func [
	lower
	upper
	/step
		num
][
	unless step [num: either percent? lower [1%][1]]
	unless 1 = length? unique reduce [type? lower type? upper type? step][
		cause-error 'script 'invalid-type ["All values must be of same type"]
	]
	blk: reduce [lower]
	while [lower < upper][
		append blk lower: lower + num
	]
	if upper < last blk [remove back tail blk]
	blk
]
gltewalt
07:32Thanks @rebolek, you've given me a lot to study
rebolek
07:33@gltewalt you're welcome
07:34Anyway, this is probably worth mentioning:
>> x: 1% while [x < 10%][x: x + 1%]
>> x
== 11%
toomasv
07:34I get strange values:
>> range 0% 100%
1%
2%
[...]
38%
39.00000000000002%
40.00000000000002%
41.00000000000002%
42.00000000000002%
[...]
100%

rebolek
07:35Because they are floating-point numbers
07:35I believe there may be a bug filled for it
gltewalt
07:36I thought there was.
07:37Or maybe he just asked Qingtian to fix it
rebolek
07:38Yes, that's possible
toomasv
07:46Sorry, I had an old build. New one is OK.
@rebolek See it:
>> rangebb 1% 100%
*** Script Error: "All values must be of same type" type is not allowed here
*** Where: do
*** Stack: rangebb cause-error
rebolek
07:46I will never get the args for cause-error right
gltewalt
07:52Is take/last blk acceptable?
rebolek
07:52Yes, why not
gltewalt
07:53You used remove back tail blk, and I always figure you have a good reason for your choices
rebolek
07:54Oh, I see. In this case, they are equivalent, because we don’t care about return value.
toomasv
07:56
unless 1 = length? unique reduce [type? lower type? upper type? num][
rebolek
07:58yes?
toomasv
07:58Was ...type? step][
rebolek
07:58Ah, ok. Typo.
gltewalt
08:00Does type? all [lower upper step] work there?
I guess I can wait and experiment - on mobile now
toomasv
08:01Not step, num! And it will not work. Because all have types, but they need to be same.
gltewalt
08:05👌🏻
toomasv
08:09In case of type? all [lower upper num] you just get the type of the num
gltewalt
10:29cause-error 'script 'not-same-type []
greggirwin
17:26I really want 'what-is-that-crazy-syntax-omg as standard, and @rebolek, I also need 'incorrect-cause-error-usage.
rebolek
17:41I am really bad with cause-error, I always struggle to do it right and usually just print the error and break the program in other way to save my sanity.
toomasv
18:45@dander @9214 @greggirwin How is going your conquering of EBHQ?
9214
18:47@toomasv totally forgot about that, and really can't force myself to solve such made-up tasks that ain't helpful to others or doesn't have any real world impact :(
toomasv
18:48I thought these are somewhat cryptographically inclined
greggirwin
18:59Fell off my radar @toomasv . :^(
toomasv
19:03 :disappointed:
9214
19:05you probably want to start profile race with them? :car:

dander
04:04@toomasv I'm on day 8 now. I haven't really found enough spare evening time to play with them. I'm planning on using that one to learn about view/draw
toomasv
04:09@dander That was a nice one. I enjoyed it! Had to develop my matrix to solve it. Happy chasing!
@9214 Nope, I am far too slow and dumb for them :unamused:
17:10@gltewalt Simple range works great! But this doesn't feel good to me:
>> range/step 5 10 2
== [5 7 9 11]

Even more this:
>> range/step 5.1 10.0 4
== [5.1 9.1 13.1]

And what is this?:
>> range/step 5% 10% 4
== [5% 6% 7% 8% 9% 10% 11%]

Possibility to skip chars by step is great, but still overstepping the upper limit doesn't seem right:
>> range/step #"a" #"g" 4
== [#"a" #"e" #"i"]

Also interesting:
>> range/step #"a" #"g" #"b"
== [#"a" #"Ã"]

gltewalt
17:47I decided that allowing a step of any type allowed for interesting things
17:49But can easily be added to the type check
17:52And the decision is:
[5 7 9] vs [5 7 9 10]
18:10range/step #"a" #'g" #"b" is equivalent to range/step #"a" #"g" 98
18:14Should be a check that step isn't larger than upper
toomasv
18:33@gltewalt I would any time prefer [5 7 9] over [5 7 9 10] in case of range 5 10 2. Here we have lower limit with which we start, upper limit which we can't overstep and step of intervals. What's there to fuss about?
As about char! as a step, of cause it's char's int value, but is it desirable (or natural / sane) to let determine steps in char int values? (It might be interesting, though -- for programming geeks like us)
18:35And why is that?
>> range 1/10/2017 5/10/2017
*** Script Error: range does not allow date! for its lower argument

gltewalt
18:49Can't add 1 to date?
toomasv
18:59@gltewalt :point_up: [November 7, 2017 9:22 AM](https://gitter.im/red/sandbox?at=5a015f28614889d4754c2550)
Proof of concept:
Red []
view [
	below
	text "Parse expression:"
	_parse: field 500x30 [
		_res/data: parse _test/data _parse/data 
	]
	text "Test block or string:"
	_test: field 500x30 [
		_res/data: parse _test/data _parse/data 
	]
	text "Parse result:"
	_res: field 500x30
]

![block](http://toomas.vooglaid.ee/red/parse-viz1.png)
![block](http://toomas.vooglaid.ee/red/parse-viz2.png)
"Parse.." and "Test.." lines react on enter.
gltewalt
19:54Good start @toomasv
toomasv
21:10@gltewalt What?
>> range 5 10 2
== 2

gltewalt
21:11Hmmm
toomasv
gltewalt
21:11Maybe I should learn to use the test suite.
21:11Then you wouldn't have to be the tester :smile:
toomasv
gltewalt
21:14Probably mixed up an if and unless. I'll check in a few minutes
21:16Oh, you forgot the /step part, so it's the same as typing 5 10 2
toomasv
21:17 :flushed:
gltewalt
21:19Should I check for number of arguments supplied? Or is it possible
toomasv
21:19But:
>> range/step 5% 10% 1
*** Script Error: out of range or past end
[...]
>> range/step 5% 10% 1%
*** Script Error: out of range or past end
gltewalt
21:20First example should be, but the second... hmm
toomasv
21:20
>> range 5% 10%
== [5%]
gltewalt
22:56Dates are still a problem. Haven't figured it out yet

gltewalt
04:14I don't know why range/step with date! fails...
04:15https://gist.github.com/gltewalt/bdc7847dceb8405e2d392a4a99c86fcc
greggirwin
18:30I get errors with a few things, pulled from above.
18:30
*** Script Error: values must be of the same type
*** Where: do
*** Stack: range type-check-step cause-error  

>> range/step 5% 10% 4
*** Script Error: values must be of the same type
*** Where: do
*** Stack: range type-check-step cause-error  

>> range 5% 10%
== [5% 6% 7% 8% 9% 10%]
>> range 1-nov-2017 15-nov-2017
== [1-Nov-2017 2-Nov-2017 3-Nov-2017 4-Nov-2017 5-Nov-2017 6-Nov-2017 7-Nov-2017 8-Nov-2017 9-Nov-2017 10-Nov-2017 11...
>> range/step 1-nov-2017 30-nov-2017 7
*** Script Error: values must be of the same type
*** Where: do
*** Stack: range type-check-step cause-error
18:30Looks like dates without /step don't include the last value. Is that what you mean by "fails"?
18:33Your type checking could be just equal? type? lower type? upper, yes? Same-type? could be a good mezz.
rebolek
greggirwin
18:36Hmm. Date seems OK. I was looking at the wrong result in a test here.
18:37It would be helpful if you included some examples, giving us a concrete base for discussion.
18:44Looks like you override num if % is used: if percent? lower [num: to-percent .01]
>> range/step 5% 10% 4%
== [5% 6% 7% 8% 9% 10%]
18:57Style wise, @gltewalt, there are some things that I have to stop and think about when reading it. It looks like you're going for a declarative style, in some ways, which is fine. And some things are small. e.g. unless upper >= lower [bounds-err] could be if lower > upper [bounds-err], not to have shorter code, but to eliminate the implicit negation WRT the comparison. I'd have to look it up, but I recall some research into that, and reducing cognitive load in the kind and order of comparisons and branch logic.

The one I tripped over when reading it was while [(lower + num) <= upper][increment], because it reads like lower is fixed, but it's not, and increment has a double side effect. This is just at a first read though.
18:59I also don't see the use case for a char as the step value.
19:00Except that you have the type check in there, which forces you to use it for a char range.
9214
19:00@gltewalt just to point out - you left the guts wide open without enclosing all set-word!s in /local
greggirwin
19:47Good catch @9214.
gltewalt
19:57Rubocop tool used to yell at me for too high of density (can't remember what it's called)
20:03date/step date1 date2 2, throws error. date1 + 2 doesn't
20:04So you can have your main arguments like lower and upper, and also stick their names in /local ?
greggirwin
20:06lower and upper are fine, but increment, type-check, etc. will leak out.
20:07date/step throws an error because *you* throw the error by making the step type match the arg type. Maybe not a good design choice.
gltewalt
20:15Throws error without type check also
greggirwin
20:19Ah, because you're doing num > upper to compare an int to a date.
20:21Another design choice.
gltewalt
20:23I'm pretty bad at this lol :laughing:
20:38Could be equal? type? lower type? upper but what about more than two arguments?
20:39equal? all [ ] ?
rebolek
20:56
>> same-type?: func [series][1 = length? unique collect [forall series [keep type? first series]]]
== func [series][1 = length? unique collect [forall series [keep type? first series]]]
>> same-type? [1 2 3]
== true
>> same-type? [1 "2" 3.0]
== false
toomasv
21:16 @gltewalt But the first question is, why have they to be equal? Why not range from e.g. 3 to 12.5? Or from 99% to 1.3? Shouldn't this be the responsibility of user to check sanity of his program? Why to restrict it if Red can handle this?
gltewalt
21:22Well I thought it was you that didn't like the miss-matched types
toomasv
21:25Where? When? I looked at earlier messages, and didn't find such complaints
gltewalt
21:28> @gltewalt Simple range works great! But this doesn't feel good to me:
>> range/step 5 10 2
== [5 7 9 11]

Even more this:
>> range/step 5.1 10.0 4
== [5.1 9.1 13.1]

And what is this?:
>> range/step 5% 10% 4
== [5% 6% 7% 8% 9% 10% 11%]

Possibility to skip chars by step is great, but still overstepping the upper limit doesn't seem right:
>> range/step #"a" #"g" 4
== [#"a" #"e" #"i"]

Also interesting:
>> range/step #"a" #"g" #"b"
== [#"a" #"Ã"]

21:29I thought you wanted step to be of the same type
toomasv
21:31First four are complaints about overstepping the upper limit or wrong stepping, and the last one is not strictly a complaint. ;)
gltewalt
22:13except for the range/step 25-Oct-2017 25-Nov-2017 3 problem
22:37If you don't do something with percent 1 is 100%
22:57Same type simplifies comparing things
23:26As simplified as I can make it. (I think)
range: func [
    "Returns a range of numbers or chars from lower to upper"
    lower [number! char! date!] upper [number! char! date!] 
    /step "Increment range by step"
        num [number! char! date!]
    /rev "Returns range reversed"
    /local blk increment
][
    blk: reduce [lower]
    increment:  does [append blk lower: lower + num]
    check-bounds: func [val1 val2][
        if val1 > val2 [cause-error 'script 'past-end []]
    ]

    either step [check-bounds num upper][check-bounds lower upper num: 1]
    while [lower < upper][increment]
    either rev [reverse blk][blk]

    if upper < last blk [remove back tail blk]
    blk
]

toomasv
07:32@gltewalt So, how to increment dates with step?
>> 1-Jan-2017 + 2
== 3-Jan-2017
>> range/step 1-Jan-2017 5-Jan-2017 2
*** Script Error: cannot compare 2 with 5-Jan-2017

It's because of check-bounds num upper. I think it is better to let num be as big as user chooses. But if incrementing lower with this value oversteps upper the result is not included in range and that's it. Range will consist of only lower in this case.
9214
07:34what if I want to increment by month/year instead?
toomasv
07:35@9214
>> range'/step 1/1/1970 31/12/1970 [month + 1]
== [1-Jan-1970 1-Feb-1970 1-Mar-1970 1-Apr-1970 1-May-1970 1-Jun-1970 1-Jul-1970 1-Aug-1970 1-Sep-1970 1-Oct-1970 1-Nov-1970 1-Dec-1970]

And why not to let ranging over other scalars, like time, tuple, pair?
9214
07:36:point_up: same thoughts
toomasv
07:36https://gist.github.com/toomasv/0e3244375afbedce89b3719c8be7eac0
9214
07:36binary! maybe?
toomasv
07:40Yes, binary! might be interesting too
gltewalt
07:46I don't know what to do with date. I can't decide
9214
08:04let the user decide
toomasv
08:27I added [examples](https://gist.github.com/toomasv/0e3244375afbedce89b3719c8be7eac0)
13:35Added [/limit refinement and examples](https://gist.github.com/toomasv/0e3244375afbedce89b3719c8be7eac0)
geekyi
15:46Nice!
15:48P.S. my stylish script to enable *Gitter (gist) embed scroll*ing:
.chat-item__text .embed {
    overflow: auto
}
15:49[![image.png](https://files.gitter.im/red/sandbox/SbHB/thumb/image.png)](https://files.gitter.im/red/sandbox/SbHB/image.png)
15:53## A-D-E theory, Dynkin diagrams, and Coxeter groups
youtube [lecture 1](https://www.youtube.com/playlist?list=PL-XzhVrXIVeSVcV9iRJ4S9WAH1ryq4hTQ)
and [lecture 2](https://www.youtube.com/playlist?list=PL-XzhVrXIVeQ298S6uCyoDGWNActWwnzZ)
http://math.ucr.edu/home/baez/week230.html
https://unapologetic.wordpress.com/category/geometry/root-systems/
http://www-groups.mcs.st-andrews.ac.uk/~pjc/talks/boundaries/ade2.pdf
- source: https://news.ycombinator.com/item?id=15769511
9214
16:51@geekyi can you suggest some digestable matrix/vector theory stuff?
geekyi
16:51@9214 what are you looking for? :D
16:52Or rather, what is it you're finding hard to digest :p
16:55Matrix and vectors are just one way to represent *multi-dimensional systems of linear equations*
I was confused about why we use matrices until I grokked that
16:56Alternatively, which level of abstraction are you confused at?
17:00@9214 eigen vectors: http://setosa.io/ev/eigenvectors-and-eigenvalues/
17:02[github list](https://github.com/sp4ke/awesome-explorables#linear-algebra), http://ncase.me/matrix/ in particular
9214
17:14@geekyi well, I'm interested in, as you just said, multi-dimensional systems (J wannabe, ya know ;))
geekyi
17:20@9214 you need to be more specific and concrete :p try one thing at a time
17:21I'm a top-down learner, so I first try to understand the more abstract concepts, then slowly drill down to more concrete specifics
9214
17:21hmmm
geekyi
17:22You may be a bottom up one, and different?
9214
17:23@geekyi I always felt myself as the bottom up one, yup
gltewalt
18:48@toomasv I can barely grok your range function. Way over my head I guess
18:48Advanced alien intelligence
toomasv
19:57:alien:

gltewalt
08:04Getting up to speed with vid is not very smooth. But... making progress
08:04https://i.imgur.com/tPjg4eo.jpg
08:07I'd like to center all that for my next step, so that there is equal room on the left and right side
9214
15:03@gltewalt center-face
gltewalt
16:18:+1:

9214
10:18@toomasv https://adventofcode.com/2017
greggirwin
10:19AAAAaaaahhhh!
toomasv
10:20@9214 :+1: I have stuck on Day 19 of 2016

toomasv
11:13Day one done! :sunglasses:
greggirwin
19:45Done here as well.
toomasv
20:24@greggirwin :+1:
gltewalt
20:26https://i.imgur.com/oCvWTSr.jpg
20:26https://i.imgur.com/QceuPEd.jpg
20:27REBOL must have had some steam to it in 2000
greggirwin
21:07I found Rebol because the official guide was on the shelf at Barnes & Noble.
gltewalt
23:52Is it any good?

greggirwin
04:02You can look at mine to see if you want to get a copy.
05:09@toomasv, man, you really have to be on top of things to get a ranking, don't you?
toomasv
05:26@greggirwin I sleep still, when rankings are gathered :)
greggirwin
05:31Oh no! As soon as you finish one, the next one starts?
05:48Ah, just the second part of a puzzle. This game is confusing man. ;^)
gltewalt
05:50On the first day, shouldn't 1111 produce 2?
05:52And if circular, 3. (Or infinite loop)
greggirwin
05:54Nope, 4 is correct. 4 matches.
05:54If you're talking about part 1.
gltewalt
05:54Yeah
greggirwin
05:54I just learned there were 2 parts to each.
gltewalt
05:54That's two matches?
05:55ahhhh, I misread it...
greggirwin
05:55No, because [(1 1) 1 1] [1 (1 1) 1] [1 1 (1 1)] [1) 1 1 (1].
05:56Easy to misinterpret.
gltewalt
05:584 because the last matches the first?
greggirwin
05:58Correct.
gltewalt
06:19[2 1 1 2] would be 3?
06:39Like so? (probably deemed clunky ):
captcha: func [digits /local nums acc][
  nums: copy []
  acc: 0
  digits: mold digits
  forall digits [if (first digits) = (second digits) [append nums load to-string first digits]]
  if (first digits) = (last digits)[append nums load to-string last digits]
  foreach n nums [acc: acc + n]
  acc
]
toomasv
07:42@gltewalt Yes, but digits is string, why to ‘mold’ it? And you can do ‘acc’ without storing into ‘nums’. Sorry for formatting, on phone
gltewalt
07:43Yeah, I changed it
toomasv
07:50@greggirwin Yes, 2 tasks each day, with same data. Usually the second is harder.
gltewalt
08:03I'm stuck without my circular list. Can't find it at the moment.... I know we did little examples like that before
toomasv
09:03To get the digit to compare to current one you have to get index of your current position - 1, add half length to it, find remainder of its division to the length of data and add 1 to the result :)
dander
09:06just finished day 2 :)
toomasv
09:09:+1: Me too
dander
09:09for the comparison one, I used a second list index to compare with, started at the middle. Then at each iteration, nexted it, and reset it to head when it hit the tail?
09:11I don't know about you, but I feel like these puzzles really show me which mezzanine functions I can't live without
toomasv
09:14@dander Not to spoil others' fun let's compare privately.
13:09@gltewalt Any success?
gltewalt
18:37Haven't been able to get back to it yet @toomasv
18:38Day 1 part two
20:14Day 1 complete. :fire:
toomasv
20:26@gltewalt :clap:
gltewalt
20:31How do I flatten a block?
9214
20:35@toomasv :point_up: should dust-off his stuff
20:35https://gist.github.com/toomasv/f9730db91c365bf1ed94453028bfc1c0
toomasv
20:37:question:
gltewalt
20:42either that, or how to sum a nested block?
9214
20:43@gltewalt example?
gltewalt
20:46Day 2. Part one the answer is too low.
20:47
checksum: func [digits /local nums acc temp][
    nums: copy []
    acc: 0
    foreach d digits [
       temp: copy ""
       temp: sort to-string d
       append nums (load to-string last temp) - (load to-string first temp)
     ]
     foreach n nums [acc: acc + n]
     acc
  ]
20:48I feed it the puzzle input as a block
9214
20:48https://adventofcode.com/2017/day/2 ?
gltewalt
9214
20:51I can either show you my solution (if I come up with one) or help with sum a nested block part if you'd explain what you mean
gltewalt
20:54Ok I guess it isn't nested, but theres some zeros in there...
20:54
[2 8 7 7 4 8 8 3 3 8 4 2 6 2 1 4 2 8 3 1 8 2 3 1 2 6 9 3 2 9 3 4 3 4 7 4 5 3 7 2 8 7 3 6 4 3 2 9 8 4 7 7 5 8 1 5 5 1 5 4 1 8 6 6 9 5 8 6 8 3 9 4 6 8 2 4 6 3 3 5 5 9 6 8 2 4 7 4 6 3 9 4 3 6 7 4 5 2 6 8 6 2 8 8 8 7 2 4 1 8 6 2 9 8 1 5 7 8 8 4 7 6 7 1 7 6 8 4 2 7 7 4 7 4 3 3 7 3 3 3 8 8 6 8 4 4 4 5 3 7 2 5 1 6 4 5 4 4 5 5 2 3 3 4 2 1 7 2 1 8 4 4 4 3 7 2 5 6 4 5 7 2 2 3 4 8 7 6 7 1 2 4 6 6 9 2 7 6 8 1 5 3 4 2 4 6 7 4 8 5 6 8 9 6 4 8 7 7 7 3 3 8 6 6 8 7 5 6 3 4 2 6 0 6 1 0 7 1 7 2 4 3 6 6 5 4 8 6 5 6 2 6 7 7 7 4]
9214
20:55ehm, is that one row?
gltewalt
20:55Summing that it tells me the answer is too low
20:55No, that the difference of each row, appended to a block
9214
20:56ah, ok
20:56well, the typical accumulator is acc: 0 forall stuff [acc: acc + stuff/1]
20:58
text
input: split next {
    5 1 9 5
    7 5 3
    2 4 6 8
} newline

acc: 0
foreach row input [
    digits: sort load row
    acc: add acc subtract last digits first digits
]

probe acc
20:59occasionally solved 2/1 :eyes:
21:15@toomasv :alien:
ayy=: ((1 ":@:|.@:#~1 j. ])"0@:i.)
   ayy 10
1                  
0 1                
0 0 1              
0 0 0 1            
0 0 0 0 1          
0 0 0 0 0 1        
0 0 0 0 0 0 1      
0 0 0 0 0 0 0 1    
0 0 0 0 0 0 0 0 1  
0 0 0 0 0 0 0 0 0 1
toomasv
21:22@9214 :skull:
gltewalt
21:22Annnnnd log off... have to get ready to run around
9214
21:25@toomasv I guess that's fast and memory efficient
timespace=: 6!:2, 7!:2@]
   timespace 'ayy 10'
3.1e_5 6656
21:27in seconds and bytes
toomasv
21:27Sorry, @9214, too tired, don't understand anything. To bed!
9214
21:27:japanese_ogre: sleep well

greggirwin
04:05@9214, a J version of the past puzzle we did?
9214
04:07@greggirwin remember the "optimize the hell out of it" competition?
greggirwin
04:57Yes, that's the one I was thinking of.
gltewalt
07:16man, I can't do that advent stuff. stuck on 2/2 and looked at 3 and ...
toomasv
08:513/1 was easy. No programming. But I didn't figure out 3/2. Solved it manually.
11:35@gltewalt for each row as a reverse sorted block, for all tails of this block, try dividing the first element of the tail with each of the rest until reminder is zero. Add result of division to acc.
gltewalt
16:13I tried something like that last night but dug myself a hole. I'll try it again later today.
I kind of wanted to generate the spiral for 3
9214
16:21@gltewalt drop your code here for us to dissect if you want
toomasv
16:50@gltewalt In 3/1 you don’t have to generate the spiral. Consider square numbers in upper left and lower right corners of each square. How many steps from these to 1? How is it related to the root of the considered square number? What is closest square number to your input? How much does it differ from your input? So, how many steps it takes?
gltewalt
16:51Yeah but I wanted to figure out how to make a spiral
toomasv
16:53Ups, I thought you wanted to solve the problem :blush:
gltewalt
16:59Both, but it bothers me more that the spiral isn't easy to figure out
17:01To generate a {string} that is like their spiral.
17:02(Sidetracked)
19:023/1 done
19:03stuck on 2/2 and 3/2 of course. Part two's are harder
19:27I'll probably share 2/2 after I re write it. I deleted last night in a rage quit

toomasv
14:40Getting on day 2 solutions hard way
Red []
offset: 400x400
side-x: side-y: 25
size: as-pair side-x side-y
s: l: 0
col: 'red
f: make font! [name: "arial" size: 8]
lay: compose/deep [
	style box': base (size + 1) font f beige draw [box 0x0 (size)] 
]
repeat i 1000 [
	append lay compose [at (offset) box' (col) (to-string i)]
	if i = 1 [col: 'beige]
	l: l + 1
	offset: offset + case [
		(l = (4 * s)) or (s = 0) [s: s + 2 l: 0 25x0]
		l < s [0x-25]
		l < (2 * s) [-25x0]
		l < (3 * s) [0x25]
		l < (4 * s) [25x0]
	]
]
view lay

You only need big enough screen and can start counting the boxes :sweat_smile:
Interestingly, on W10, if you close the window, part of boxes still stay there!
greggirwin
16:48You mean Day 3 @toomasv ? I couldn't work on anything yesterday, so still need to tackle that one. Same result when closing the window. Closing it again really closes it. 948+ stay for me. If that's consistent, maybe it's something to note.
toomasv
17:45@greggirwin Ah, yes, confused by spirals. :sparkles:

greggirwin
03:24I came up with a fun way to tackle Day 3. SPOILER STARTS HERE!



A left-zero sniffing "turtle" walks outward in a spiral. When it gets to the target number, it takes the difference between the current position and the starting cell, which is a pair, and adds the x and y values together to find out how many steps away it is.



END OF SPOILER
03:24Dang. Gitter trims empty lines.
gltewalt
03:29I thought about making a spiral in view
03:34Using view compose was putting the next numbers after 1 in the top for some reason - after setting a start point with at
03:52Probably needed compose/deep
toomasv
04:08@gltewalt Did you add ‘at’ for each added element? @greggirwin Nice way! For 3/2 you though need a bit different approach ;)
gltewalt
04:20Yep. At wasn't working with compose
toomasv
04:22With my above code it works.
gltewalt
04:24view compose [ ]
04:25at (word)
04:29I'll do a small example in a little while
toomasv
04:30Seems to work well:
o1: 50x1 o2: 80x1 o3: 80x31 
view compose [
   style b: base 31x31 draw [box 0x0 30x30] 
   at (o1) b "1" at (o2) b "2" at (o3) b "3"]
gltewalt
04:47I'll show ya when I get a minute
05:49
x-pos: y-pos: 150
view compose [
  size 300x300
  backdrop linen
  at (to-pair x-pos y-pos) text "1" 
  at (to-pair x-pos y-pos + 10) text "2"
]
06:05Other snippets go according to plan.
init-pos: 200x200
run: does [ do reduce [init-pos: init-pos random/only [+ / -] random 60]]
view compose [
  size 800x600
  backdrop 153.0.0
  at (init-pos) btn: button 120x40 "Click Me" on-over [btn/offset: (run)]
]
greggirwin
06:29@toomasv, yes 3/2 added a bit of neighbor logic, which also works nicely with pairs.
06:29Not going to look at 5 tonight. Did 4 earlier, but too tired now.
toomasv
06:32@gltewalt You need to use either to-pair reduce [x-pos y-pos] or as-pair x-pos y-pos.
gltewalt
06:37Ah, ok
06:38Looks like this stuff has some errors in it?
https://ungaretti.gitbooks.io/red-language-notebook/content/gui-advanced-gui.html
06:42This has some problems:
Red [needs: 'view] 

v1: view/options/no-wait [
    backdrop blue
    button "unview blue"[unview v1]
    button "unview yellow" [unview v2]
    ]
    [offset: 30x100]        ;options
v2: view/options/no-wait [
    backdrop yellow 
    button "unview blue"[unview v1]
    button "unview yellow" [unview v2]
    ] 
    [offset: 400x100]       ;options
06:43I like his writing, but a few errors it looks like
9214
06:46why don't you give feedback to him?
gltewalt
06:47I will
9214
10:11It's been a year since I dedicated myself to Red and this chat :^)
toomasv
12:05:congratulations: @9214
greggirwin
14:13Time flies @9214. Congratulations on your first anniversary.
9214
14:13@greggirwin :older_man:
toomasv
17:04@greggirwin, your turtle-idea gave me inspiration to solve 3/2 programmatically, thanks!
greggirwin
18:28Cool. :^)

gltewalt
00:363/2 is a known formula thing
02:36Made it to 4/2
02:40Uh oh. "Valid passphrase must contain no two words that are anagrams of each other"
greggirwin
03:05Easier than you think, if you don't worry about actual permutations. i.e., how can you identify anagrams?
gltewalt
03:17Seems like I could sort each word of a phrase then use the technique that I used for part 1
03:18
; day 4 - part 1
total: 0
p: read/lines %pass.txt
foreach i p [if (split i space) = (unique split i space) [total: total + 1]]
03:18It's on the edge of my vision but I don't have anymore time to play until late tonight
03:24If it's an anagram it's the same letters right? (sort "abcde") = sort ("ecdab")
04:49Nope that won't work. Just read the description again (mobile)
greggirwin
05:04An anagram is the same letters, yes.
toomasv
15:40Unusually, 6/2 was a piece of cake after 6/1.
gltewalt
16:02How to make part 2 less disjointed?
; day 4 - part 1
total: 0
p: read/lines %pass.txt
foreach i p [if (split i space) = (unique split i space) [total: total + 1]]

; day 4 - part 2

total: 0
p: read/lines %pass.txt
new-p: copy []
foreach i p [append/only new-p split i space]
foreach i new-p [foreach words i [sort words]]
foreach i new-p [if i = (unique i) [total: total + 1]]
9214
16:27@gltewalt
input: read/lines %D04

day-4: function [input /part-2][
    total: 0
    probe get also 'total forall input [
        passphrase: split first input space
        if part-2 [forall passphrase [sort first passphrase]]
        if equal? passphrase unique passphrase [total: total + 1]
    ]
]

day-4 input
day-4/part-2 input
16:29essentially it's the same as part 1, only all words in a passphrase are sorted
gltewalt
16:29Right
16:31That's pretty nice.
16:32would probe also total ... be the same thing?
9214
16:32@gltewalt nope, total will evaluate to 0 in that case
16:34evaluate left argument (yield 0), evaluate right argument (yield total update), return left argument (0)
16:35in case with 'total left argument evaluates to total, then its value is updated, then total is returned and its value is accessed with get
gltewalt
toomasv
16:41@gltewalt My try:
foreach i p [
	foreach j words: split i space [sort j]
	if words = (unique words) [total: total + 1]
]
gltewalt
16:53:sparkles: beautiful
toomasv
17:13 :angel:

9214
15:24:alien: (@geekyi :v:)
([:([:":[:|.1#~1 j.])"0 i.) 5
1        
0 1      
0 0 1    
0 0 0 1  
0 0 0 0 1
   ([:,.([:([:<[:|.1{.~])"0[:>:i.)) 5
┌─────────┐
│1        │
├─────────┤
│0 1      │
├─────────┤
│0 0 1    │
├─────────┤
│0 0 0 1  │
├─────────┤
│0 0 0 0 1│
└─────────┘
   (,.@:((<@:|.@:(1{.~]))"0@:>:@:i.)) 5
┌─────────┐
│1        │
├─────────┤
│0 1      │
├─────────┤
│0 0 1    │
├─────────┤
│0 0 0 1  │
├─────────┤
│0 0 0 0 1│
└─────────┘
15:25I'm proud of a middle one because of its nice tree
([:,.([:([:<[:|.1{.~])"0[:>:i.))
  ┌─ [:                                
  ├─ ,.                                
  │    ┌─ [:                           
  │    │          ┌─ [:                
──┤    │          ├─ <                 
  │    │     ┌────┤    ┌─ [:           
  │    │     │    │    ├─ |.           
  │    │     │    └────┤    ┌─ 1       
  └────┼─ " ─┤         └────┼─ ~ ─── {.
       │     │              └─ ]       
       │     └─ 0                      
       │                               
       │     ┌─ [:                     
       └─────┼─ >:                     
             └─ i.
16:07https://www.youtube.com/watch?v=9xCJ3BCIudI
greggirwin
17:44@9214, once you get into J, does it read clearly to you?
17:44Or do you have to kind of tease it apart to understand what's going on? I know I've had to do that with dense Rebol code in the past.
9214
17:46@greggirwin surprisingly, yes, although tacit (aka point-free) style requires some serious effort
greggirwin
17:46I'll watch the talk later. Thanks!
9214
17:47I found that J encourages "active" reading, i.e. instead of just looking at the code you paste it into console and start to play around, separate different parts and draw tree diagrams like above
17:48and the interesting part that in the process you're learning new things not only about language, but data itself
greggirwin
17:49Right, that's the "teasing apart" bit I mentioned, where sometimes you can do it mentally, but other times you really need to examine the live animal.
9214
17:50say, the fact that pattern above is a "lower triangle" of identity matrix
=/~i.4
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
17:54reading code without console at hand requires some excessive [vocabulary](http://code.jsoftware.com/wiki/NuVoc) knowledge, it's a bit hard for me to memorize everything since English is not my native language, I wonder if every verb (i.e. function) could be visualized as some sort of pictogram
18:09s/excessive/extensive
18:12What are most fundamental and hard concepts which Redbol apprentice faces at the beginning of his journey? Definitional scoping, code is data, what else? It's hard for me to remember now :D
gltewalt
19:16Data structure that can parse itself
9214
19:16wat?
gltewalt
19:17lol
9214
19:17parse [][]?
gltewalt
19:19redbol. More like a self parsing data format. That has the illusion of a normal programming language
9214
19:20It's just that I feel knowledgeable enough and want to do some write up on one of the topics, but I'm not sure what should it be: handwaving with "oh Red is cool because X Y Z" or separated posts "X explained", "Understanding Y" and et cetera
19:21and I'm not sure that adding yet another tutorial/article to the already diverse chunk of documentation is a good idea
gltewalt
19:22Deep dive seems to be missing. There are a lot of "getting started" pages
9214
19:23by "self-parsing" you mean that code can process another code, correct?
19:23I can go with conceptual deep-dive, alas not a technical one :(
gltewalt
19:23yeah
9214
19:24@gltewalt https://en.wikipedia.org/wiki/Metaprogramming
gltewalt
19:24I'm not sure anyone can deep dive technically except for Carl and Nenad
greggirwin
19:30Reviewing existing resources and contributing elements or clarifications to those are helpful.

It is really hard to remember what it's like not to understand anything about Redbol langs once you get used to them. Maybe, like the curse of the monad, once you understand it, you lose the ability to explain it to others. :^) Or at least, you can't remember what it's like to be a beginner, which is why the view of new people is so valuable.
9214
19:32One thing that buzzes me is this: when word is bounded to a series, we can modify this series in-place, inside code itself, but when word is bounded to a scalar value, we can't do that.
blk: [1 2 3]
val: 4

append blk 5 ; in-place
add val 1    ; why not in-place?

19:32I know that under the hood it's stack vs. heap stuff, but are there any reasons for that, aside from implementation details?
gltewalt
19:364 value is immediately evaluated and atomic. blk value is a box that is deferred evaluation?
19:36resizable box
19:47Guessing that it's boxed vs unboxed
19:58Or... is it because word: is more like a place marker in code, and not a variable that references a memory location?
greggirwin
19:59add val 1 not changing the referred to value is simply a language design choice. If Red did that, how would you *avoid* mutating val? Copy val? But that leads to a lot of other changes under the hood as well. In this case, val is a normal word being evaluated, so add never sees it. It only sees the result. When blk is evaluated append sees the series, which it can modify in place. If you wanted, you could *probably* choose to have the add action also dispatch to the append behavior for blocks.
gltewalt
20:10I 'guess' my guesses were wrong
greggirwin
20:14All values in Red are boxed.
gltewalt
20:15Did Carl ever publish a white paper type of thing?
greggirwin
20:15Nope. Not AFAIK anyway. Never even an official spec of the language.
gltewalt
20:46So, I think I'll get back to advent this evening. Day 5.
Looking at the description is it: for offset n --> increment n by 1 --> move n - 1

greggirwin
21:48@9214, another element at play here *is* how datatypes store their values. Not exactly boxed vs unboxed, but some types can store the value entirely inside the type information struct. Others refer to data that is stored elsewhere. All datatypes have a 128 bit struct, and they all use the first 32 bits as a header. Beyond that, the other 96 bits are specific to each datatype. If a datatype has to deal with more than 96 bits of data, it *must* store it somewhere else. That, of course, affects performance and complexity.

gltewalt
06:05This is slowwwwww:
nums: load %reg.txt
count: temp: 0

while [not tail? nums][
    temp: nums/1
    either nums/1 >= 3 [nums/1: nums/1 - 1][nums/1: nums/1 + 1]
    unless tail? nums [nums: skip nums temp]
    count: count + 1
]
print count
greggirwin
07:15How slow is slow? How many block ops total?
gltewalt
08:12I dunno. Have to run your timey thing on it
toomasv
08:36I had 21'841'249 cycles. Several ops in each cycle - comparisons, increments, length measurments, skips - no wonder it takes some time.
gltewalt
08:48Big input
09:13Rebol2
== 0:00:52.654

Red
== 0:01:25.317
9214
10:21@greggirwin thanks for clarification
greggirwin
19:11On performance, a vector is a bit faster, but not massively so (~25% for me). You could also use temp in place of 3 nums/1 calls to see how much effect that has. Ultimately, Red is going to be slower for things like this, because everything is very high level.
19:39Just tested, and vector isn't any faster for this problem.
19:39Mine is really slow in any case, as I just wanted to get it right. :^)
19:41Need to make time to get back to things. Skipped a couple days now.
gltewalt
19:57That's all I've been doing - trying to get the answers right. I don't even make funcs for most of it
greggirwin
21:03Sounds like you still have a bug then, as their examples should work.
gltewalt
21:03I'm guessing that I'm wayyyy off checking for what is seen before
21:03Wrong answer with official input - but no infinite loop
21:08Probably two things wrong. Where I increment cycles and where or how I test for a repeat pattern
9214
21:53@gltewalt are you comparing banks with a snapshot of a previous state of banks?
21:54if so, re-read the task and example
21:55you need to check if current configuration already appeared *in all previous states*
22:08occasionally solved Day 6 :shipit:
22:14do you guys save your solutions somewhere?
gltewalt
22:30Oh. Yeah I was
23:10Since it's Christmas party night, I guess I'll have to wait awhile to fix it
greggirwin
23:39I haven't posted my solutions anywhere. We could collect them though, for fun. Then I'd have to clean mine up though. ;^)
9214
23:39so far I thoroughly enjoying Day 8
23:40Red is really suitable for such task
greggirwin
23:42Guess I should look at 7 so I can get to 8!
9214
23:44:godmode:
23:44[![image.png](https://files.gitter.im/red/sandbox/qrt2/thumb/image.png)](https://files.gitter.im/red/sandbox/qrt2/image.png)
greggirwin
23:46Go 9214, go!

toomasv
04:29@9214 :+1: Yes, D8 was very Reddish to do, especially after the discussion of inc functions. 15-16 LoC. Good idea about saving solutions somewhere. I would enjoy learning from your tricks, guys.
dander
06:35I've been saving all of mine, though I'm still on day 3 of this season (this week has been very busy, and I'm trying to get enough sleep). 8 of them from the last season. I really like these problems for exploring Red, because they are difficult enough to stretch a bit and explore new areas, but not so big to be overwhelming
9214
08:30@toomasv since you've mentioned inc, I guess our solutions are quite similar (combination of parse, string transformation, loading and a couple of user-defined functions)
toomasv
11:26@9214 Nope, I didn’t use parse, neither string manipulation.
9214
11:27@toomasv hmmm
11:29and how did you implemented inc and dec operators, managed non-existent registers?
toomasv
11:40I used my own ‘inc’, later changed to @dander’s. But basically, in ‘until’ loop till ‘tail?’, “took” 3 into prg , skipped 4, “inserted/only” somewhat manipulated prg,and “did” it. ;)
9214
11:41> I didn’t use ... string manipulation
@
> somewhat manipulated

:japanese_goblin:
toomasv
11:42Block
9214
11:43:angel: ah ok
11:44still, what about non-existent registers?
11:44say, when you encounter ab for the first time
toomasv
11:44They were initialised to 0 in until loop
11:47I.e. whole input block was first changed into Red code, then ‘do’-ed
9214
11:47then maybe my solution is slightly over-engineered, now I think that I solved it this way only because defining grammars in parse is pure fun
11:52https://gist.github.com/9214/766efd750382a030c2b706c12aec27c0
toomasv
12:00Mamma mia! Impressive! I’ll put up mine when at computer
12:54https://gist.github.com/toomasv/90ac7ff36cc570b8b3b3d68bf1fbdc6e
12:59Could have won 1 line by making inc and dec op!s.
9214
13:03oh, move usage, that's neat!
13:04@9214 makes a mark in a "list of nifty tricks to remember" list
toomasv
13:07Actually, tried now to make inc into op! and didn't succeed :(
9214
13:08@toomasv op! doesn't allow quoted arguments, that's why I asked about implementation later
toomasv
13:08I see, thanks!
13:10dec: func ['value step][set value (get value) + negate step] is stupid.
Should be dec: func ['value step][set value (get value) - step]
9214
13:13well, it reminded me to try to see things from different perspective, so, not that stupid
toomasv
15:09Bragging: 10 LoC today
9214
15:10you can always squeeze it down to 1 if you want :eyes:
toomasv
15:14Yes, but they are more-or-less logically spread out
15:1719 when quite strict
15:26Down to 7/14.
greggirwin
19:36I won't peek at your Day 8 solutions until I do my own, but now I want to see them!

@dander, I agree that they are fun. Since I can't compete on time, I enjoy thinking about them in different ways. e.g., for Day 7, you can easily trim commas and then load the input and make blocks for processing. Maybe I can do part 2 today.
9214
19:38@greggirwin on a first sight that was my thought too (about trimming commas and loading)

gltewalt
07:31Day 7. But this might be as far as I can go. I don't really have experience with tree and graph stuff
9214
14:28@gltewalt you don't need to build a graph for the first part
greggirwin
18:18@9214, indeed. I didn't.
gltewalt
21:03I read ahead a few. Looks like 9/1 wouldn't be hard at all if you transform { } to [ ], trim out , and use tag! to look for garbage
9214
21:07@gltewalt it's not that simple with garbage
gltewalt
21:23Close enough that I have an idea what to do. I don't have that with 7/1
toomasv
21:30D9 is really simple with string parse.
9214
21:30@gltewalt you have a set of names of all programs, and a set of names of programs to which someone points to. No one points to the bottom program. How can you find its name?
gltewalt
21:33If his name isn't in set of names to which someone points to?
9214
gltewalt
21:34use difference?
9214
21:34yes!
gltewalt
21:34Woohoo
9214
21:34or exclude
gltewalt
21:37:+1:

greggirwin
04:14Secrets revealed! :^)
gltewalt
05:09Do you guy transform the data and then work on the challenges, or just load it and work on the raw stuff?
05:13@9214 How about writing a parse article? You could go deep and still make it accessible
05:30Hmm, Christmas present?
https://www.amazon.com/gp/aw/d/0262036630?psc=1
9214
06:57@gltewalt I have 2 major topics in mind: definitional scoping and parse, but they can be mashed together in a more long, less detailed post of handwaving and conceptual rambling.
07:02but again, writing separate piece of documentation smells badly to me
07:32@gltewalt :point_up: [ it depends](https://gitter.im/red/sandbox?at=5a2e1318540c78242dac3917)
toomasv
08:00I ‘load’ or ‘read’ the input and depending on task, start to transform or use it. Never transforming manually. Well, I did it once in the beginning, and decided not to do it again.
gltewalt
11:49@9214 well, there's only parse introduction link under Documentation on red-lang
11:52You guys could add to https://github.com/red/red/wiki/REBOL-Core-Users-Guide:--A-walkthrough-with-Red
11:53Or correct it where needed
toomasv
15:0410/2 needed quite tricky logic on "circular blocks", eh?
And it would be very interesting to share solutions on d11 hexagonal grid.
greggirwin
17:51@gltewalt, I set up a few loader funcs to help with some inputs. Others are easy to just load directly. I'm falling behind now, with other things taking priority. :^(
toomasv
18:25@greggirwin Understood, duty calls.

gltewalt
03:11I think parse doc is needed more than any other doc
9214
06:10@gltewalt can you tell me what in your opinion is missing or unclear in existent documentation and what would you like to see?
06:22can't decide if such doc should be a separate post in a personal blog (yeah I want to please my ego) or a github-wiki-based entry :confused:
gltewalt
06:56Blog.
9214
06:56why?
gltewalt
06:57It's better for you. And will possibly capture those outside of Red world
9214
06:57so it should be aimed at a wide audience and newcomers, hmm
gltewalt
06:58And can put the blog link on the wiki.
9214
06:58@gltewalt so, what would you like to see in such parse article?
06:59and what feels challenging enough that you having hard time to dig into it on your own?
gltewalt
07:01Could do a multi part blog. Beginner friendly, and deeper dive.
I like the style of that Michael Sydenham blog, but he doesn't cover very much
07:03For my brain I like lots of small examples.
Task or Concept -> example, Task or Concept, example ... repeat
9214
07:04@gltewalt yeah, I would like to come up with some tongue-in-cheek (but practical) exercises/examples
07:09guess I'll start to make a draft in my spare time
gltewalt
07:09Task categories with different Kung fu moves.
Or you could even go through the red-lang parse intro and give examples for each entry in the table that follows
"The following keywords are currently available in Red's Parse implementation. They can be composed together freely."
9214
07:10@gltewalt yes, tables and summaries for sure, I already have a bunch of undocumented (i.e. not described in red-lang parse article) keywords in my pocket (keep pick/ collect after / change)
gltewalt
07:11If you make it how you like to learn things, it will probably be good
07:12Good blog gives you a chance to appear in HN
9214
07:13it's not about be, but about language adoption
07:37ew, s/be/me

toomasv
15:23[unicode.red](https://gist.github.com/toomasv/e819fa2452f38a15cea6e20182ab9309) Fetch range.red
do %unicode.red
unicode/chart 'ascii

ft: make font! [name: "Consolas" size: 144] 
view compose/deep [base 160x160 draw [font ft text 1x1 (to-string to-char 129318)]]
greggirwin
19:41Wow! That's fantastic @toomasv !
toomasv
20:17 :abcd: :bowtie:

gltewalt
03:37 How do we do PR again? (from git command line)
03:38Or do we have to click the button on the Red github page?
9214
03:48on github
greggirwin
03:49https://git-scm.com/docs/git-request-pull, but normally I push to my fork and do the PR from there in the GUI. If you use Tortoise, you can also do it when pushing with that.
gltewalt
03:49I did push to fork and used the gui. And crossed my fingers.
greggirwin
04:03I see your PR but, like I have often done in the past, you have a whole bunch of unrelated commits in there. They won't accept a PR with 115 changed files for a minor spelling correction. More than once I've gotten things into a state where it was easier just to make a clean clone of the official Red repo and start fresh.
04:04I can close that PR for you if you want.
gltewalt
04:04ok, I guess I can make a fresh clone
greggirwin
04:06You can play with various git commands to try and clean it up, but I usually just make matters worse when I do that. :^)
gltewalt
04:20Do I need to delete my fork too?

geekyi
13:42@gltewalt pull-request is a github thing. Gitlab's name for it is merge-request. The name says it all, it is a request for another person to git pull (or more often, git merge)
13:43I usually use git sync instead of git pull, git push
13:44Also, if it's a minor edit to a single file, I usually do it on github's website, where it takes care of all the logic
14:53:point_up: [December 7, 2017 8:24 PM](https://gitter.im/red/sandbox?at=5a295d22ba39a53f1a308178) @9214 :smile:
gltewalt
20:05Merge makes more sense
20:06And you’re not really pulling anything, your asking the main branch to pull in your stuff. So you’re pushing to it Or merging
greggirwin
20:29You've pushed to your fork, yes, then ask for a pull because you don't have rights to push to the other repo. Or you have a process in place that *nobody* can push to the repo, because someone always has to approve other people's work.
gltewalt
21:22Which would be a good idea with me lurking around ;-)
greggirwin
21:23And me.
gltewalt
21:23Command line is easy enough for me - it’s a matter of reps. I don’t do it enough to remember

gltewalt
23:30:facepunch:

9214
12:06:eyes:
12:06[![image.png](https://files.gitter.im/red/sandbox/WH8l/thumb/image.png)](https://files.gitter.im/red/sandbox/WH8l/image.png)
rebolek
12:09It was longer version of this
https://twitter.com/hostilefork/status/945455027874705408
gltewalt
18:15And this
18:15https://imgur.com/a/EwPPb
18:19Why would he have deleted it himself? Seems to have no problem leaving things up elsewhere
18:20(Deleted the red page comment himself)
9214
18:25write something yourself, then delete it, then publicly insist that it wasn't you but moderator who has something against you and that everyone is bad and conspiracy is everythere :shipit:
rebolek
18:35Let's just ignore negative stuff. It's better for everyone.
9214
18:36:sparkles: :star2: :rainbow: stay positive :rainbow: :star2: :sparkles:
18:38gonna play Doom 3 then, mostly to enjoy sound design :feelsgood:
rebolek
gltewalt
21:03What if numbers were series
rebolek
21:04What is series were numbers

greggirwin
06:15How do you mean @gltewalt ?
gltewalt
06:16If 1234 could be treated as [1 2 3 4]
06:171234/2: + 7 => 1934
06:18:scream:
greggirwin
06:19What would be the purpose? In any case, you could create a dialect to do it, or get close.
06:20Basically, you have to treat the number as a series of char! digits in some base, which kills performance for actual numerical work.
gltewalt
06:20I'm not sure the purpose, but it would allow for some really weird stuff. Our number system is 'kind of' a series from right to left
greggirwin
06:21Then we can also say any value should be a series, because that's how we represent them all, yes?
gltewalt
greggirwin
06:22What then happens with pair! values? i.e., how do you address their parts versus their digits?
gltewalt
06:23What do you mean parts?
greggirwin
06:23
>> p: 100x200
== 100x200
>> p/1
== 100
gltewalt
06:24same as [1 0 0]x[2 0 0]
06:24p/1/1
06:24p/only
06:25p/1 could be head
greggirwin
06:25I encourage you to try it as an experiment. :^)
gltewalt
06:25Oh, you wan't me to go mad? :smile:
greggirwin
06:25Too late for that. ;^)
gltewalt
06:26:laughing:
06:34perilous...
>> the-deep: make bitset! [#"0" - #"9"]
== make bitset! #{000000000000FFC0}
>> to-integer to-binary the-deep
== 0
>> the-deep/1: true
== true
>> to-integer to-binary the-deep
== 1073741824
06:36I don't really understand that, but I'm sure it is too perilous
19:25Holy crap, a couple rooms are flooded
greggirwin
19:34I'm drowning too.
19:36Really exciting though, and maybe @rebolek can mine stats with gritter that Doc can use when promoting Red during the upcoming events.
rebolek
19:39@greggirwin I'm reading D3 docs right now, hopefully should have some examples tonight.
gltewalt
19:40Might be time to consolidate documentation type stuff
19:42I have most of the differences with Red and the Rebol/Core chapters (not all chapters). Maybe a few of us could double check my examples and assertions and 'paraphrase' the Core guide. To make a Red Core guide
19:42I'm not sure of the legalities though
greggirwin
19:43I have notes for a Red Core Guide here, but we do want to be careful because Carl was very clear that he didn't want others reusing his hard-wrought documentation.
rebolek
19:49D3 fortunately supports dates in form of 1-Apr-17 so exporting stats to CSV would be easy peasy. The hard question is **what** stats to export? I have sooo much data...
20:07So let's start with something trivial, like number of messages per room.
20:25But first I need to solve some mold quirks, omg
20:25why can't things just work
gltewalt
21:00What data would you look for?
rebolek
21:01That's the question, I have **all** data :)
21:03Posts per day/month, post per user, issues mentioned in posts, links, code samples, questions, ...
gltewalt
21:05How about separating pre Christmas @names from the new participants?
21:06like a memoization table
21:06Then you could chart newcomer activity separate from overall activity
21:09It will lose some context if you’re mining subject because conversation will be one sided, but it could pinpoint new activity
rebolek
21:17Separation by date is easy.
21:18I have first graph ready.
21:19I just need to get my FTP credentials, I had stored them in Firezilla that stopped working with recent Firefox update :)
9214
21:32what are the most common questions (obvious), most active users (are all in this room), income of newcomers after each announcement
gltewalt
23:24make-dir in Red is exactly the same code as make-dir in rebol2, except that Red uses cause-error and rebol has its make error!
23:24Is that a legal issue?
23:25Rebol: return make error! reduce ['access 'cannot-open path]
Red: cause-error 'access 'cannot-open path
rebolek
23:30cause-error calls make error!, see the source
gltewalt
23:51I was just wondering about the identical code though
rebolek
23:52Oh, I see.

gltewalt
01:18If one of you can get a little time, skimming through my walkthrough to make sure it's kosher would be a great help
01:43So, this is kind of neat:
view [b: button "Press" [?? b]]
greggirwin
03:21@gltewalt, time is tight lately, but I'll try.
03:25@9214, "Can I write a webserver with it?", "How do I make it work in the browser?", "Why no GUI on Linux?"
gltewalt
03:34It won’t compile with Linux. “?”
03:43(the i386 stuff, even though it mentions it on the downloads page)
05:21Any idears why my web-cam image saver thingy only captures an image intermittently?
Other captures are all black
greggirwin
06:53I think you're the webcam pioneer at this point.

gltewalt
19:10@9214 can I legally get tons of money?
9214
19:10sure, work hard and incorporate Red in your company/startup/whatever
gltewalt
19:15That’s for you QA bag.

gltewalt
greggirwin
toomasv
09:00@gltewalt Might be me - very practical theoretician recently poofed into programmer :relieved:
greggirwin
17:22"Practical theoretician". I like it.