AltME: Rebol School

Messages

Arnold
I know nothing about it too, I have bought a set say 20 years ago, never played. Since Doc is now in China and I did a checkers game in Rebol before, it looked like a nice challenge doing it the Rebol way.
Reichart
Indeed, i was speaking to the UI.  Making it for example so that your IP pops up, and you can tell that IP to another computer.
I have been working on a "trick" to get through firewalls and get two clients talking "without" a thrid party server.
It would use a third party of course, it would just be ...........well, using a trick so no one needs to pay for it and it is fast.

Cyphre
I believe it is possible to do do NAT UDP hole puching uisng pure R2. Couple years ago I tried that  just for fun and it sort of worked, but I haven't made any deep tests after that.
Gabriele
yes, i was doing things like that while playing with Chord in 2004
Pekr
Reichart - back at the time, I created one script for my friend. He had some HW device, sending data, and wanted to store the data into files. So I created kind of multiserver, which is able to gather data from multiple clients, and store it in separate files. You can find it in Folders/pekr
Reichart
Richard, exactly!
Perk - cool, I will take a look at that.
Here is a note a friend of mine just posted:
"STEM, CS, and couples therapy (!) musings: I had a teacher once explain to me that learning a foreign language was a way of thinking differently.
I have always applied this to computer languages, too.
The past few weeks I've been relearning/finally understanding a language I was introduced to about a decade ago. In a way, the language itself isn't important, rather the shift in thinking required for me to produce code that worked the first or third time  is what I want to focus on.
The language is, I believe, my first functional language and I quickly learned that the techniques for picking up a new programming language that I have always used, would not work here. I kept encountering weird and inscrutable errors.
So I went back to square one again and again and again, reading the docs, looking at code, and finally opening my mind to what was being said instead of what I thought was being said.
It's a skill usable in all aspects of life, to listen rather than interpret or, worse, assume.
Couples therapy, alluded to earlier, is really shorthand for clear communication. It is so easy, when you have a close and long-term relationship with someone, to think you know what they are telling you, so much of couples therapy, IME, is about letting go of what you think your partner is saying and to listen to what your partner is saying instead. I am thinking that this programming languages metaphor may be helpful for various friends in their own clear communication challenges.
So, thank you Mr. Locke, for teaching me the importance of language and thought, and thank you Reichart, for being the final push I needed to jump back into Rebol and not only gain a really useful skill that I need now more than ever (application #3 is being written, this one is client/server  but also for this useful insight about communication, presumption, and partnership."
Pekr
Reichart - you might also look into Rebol wiki - there is a section called Other Sections, where TCP port related stuff is placed. There is a chapter called TCP port examples. Just not sure, if it works with latest of R3 releases though - http://www.rebol.net/wiki/Table_Of_Contents
Pekr
They guy put it all into a nice perspective. Good read!

Marco
Is there a way to reset the internal state(s) of R2 (clearing all new words and objects) so that it will be in the same state as if it were just started?
Arnold
I ran into this quite a few times. That would be very helpfull.
Gregg
What is the problem you're trying to solve Marco?

Gabriele
the old (~2000) rebol apache module did that. that's why QUERY on objects was introduced (QUERY on SYSTEM/WORDS then reset all changed words). I don't remember if librebol did that natively (i think so) or at the mezz level. i don't think there is an easy way to do it at the mezz level in the general case, however, it may be easy in your specific case.

Arnold
One of the things to consider is that you can theoretically redifine pretty much everything you have in Rebol. (In practise I tend not to redefine function that come with the system, but it can be done) Restarting Rebol is the only way to be sure all is back to normal/original state.

Geomol
To get around this, in many scripts I enclose all my code within:
context [
...
]
It solves many situations.
Henrik
Same here

Marco
The situation that happens to me is simply that after a while that I am writing something in the console or in my mini-edit-do.r I start to forget that I have (already) assigned values to a variable and things start to appear strange and so it takes a little to relize that those variables simply already have a value.

Geomol
In that situation, I quit and relaunch REBOL. I use a shell script to launch REBOL into the console. The script is:
cd /Users/john/rebol/view/
./rebol --noviewtop
Maybe it is possible to do something clever with the REBOL LAUNCH function!?
Gregg
LAUNCH (and RUN) were problematic in the past, but you can do the same thing with system/options/boot and CALL. One catch is if you may run encapped or not. A lesson for Redbol is making header info universally available for consistent access.

Marco
I am trying to write a function to replace find/any with parse and I have done this:
    find-any: func ["Finds a value in a series using wildcards and returns the series at the start of it."
        series [series!] value /local elem pos
        ][
        value: copy value
        while [find value "**"] [replace/all value "**" "*"]
        replace/all value "*" ":*:"
        replace/all value "?" ":?:"
        value: parse value ":"
        remove-each elem value ["" = elem]
        replace/all value "*" 'thru
        replace/all value "?" 'skip
        value: compose/deep [any [to (first value) pos: (value) to end | thru (first value)] ]
        either parse/all series value [pos][none]
    ]
Could you please give it a try and tell me if it works and how to improve it?
Gregg
Is your goal to emulate find/any's behavior, or more to learn parse? I have a LIKE? func that does similar pattern matching, generating parse rules from a simple pattern grammar. Replace is a concise, if not the most efficient, way to break things up, and you handle compressed * runs as well, whcih is nice.
It doesn't work if * is the first or last thing in your pattern.

Gabriele
I think it will also fail if your pattern has colons in it.

Last message posted 184 weeks ago.