Skip to content

Instantly share code, notes, and snippets.

## Questions on SPACES paths
Please answer with yes/or no
| | Stored as block? | Stored as name + size block? | Stored as path? | Stored as tree path? | Visualized as path? | Visualized as tree path? | returned as path by functions? | returned as tree path by functions? |
| ----------------------------------- | ---------------- | ---------------------------- | --------------- | -------------------- | ------------------- | ------------------------ | ------------------------------ | ----------------------------------- |
| /map facet | | | | | | | | |
| /parent facet | | | | | | |
This code:
view [
host [
vlist [
bt: button "Press meee I am space!"
gr: grid-view source= table-data2 size 400x300 on-created [probe gr save %new-mold.txt gr]
with [
@GiuseppeChillemi
GiuseppeChillemi / testing-find-methods.r
Last active August 23, 2022 17:05
Testing the speed of various methods
;Red []
Rebol []
find**: func [
data
column
value
/local
container
out-data
@GiuseppeChillemi
GiuseppeChillemi / sort-by-length
Last active August 19, 2022 19:19
Sort a series by the length of its elements, from smaller to bigger
;Red []
Rebol []
sort-by-length: func [
[catch]
"Sort a block by the length of its components from smaller to bigger"
data [block!] "Block of elements"
/safe "Elements type can be mixed"
/reverse "Reverse the order of sorting"
/local
@GiuseppeChillemi
GiuseppeChillemi / Test-DT-Position.r
Last active August 14, 2022 23:27
Test the difference of speed from having a datatype in a different position
;Red []
Rebol []
recycle/off
;This code is from Ashley Graham
platform?: case [
2 = system/version/1 ['Rebol]
not rebol ['Red]
system/product = 'atronix-view ['Atronix]
@GiuseppeChillemi
GiuseppeChillemi / test-getting.r
Last active August 15, 2022 00:09
Testing GETTIN Speeds (Now with 8 tests !!!)
;Red []
Rebol []
recycle/off
;This code is from Ashley Graham
platform?: case [
2 = system/version/1 ['Rebol]
not rebol ['Red]
system/product = 'atronix-view ['Atronix]
--== Red 0.6.4 ==--
Type HELP for starting information.
>> do %pp.r
actor/open: connection
init-odbc
OPEN-ENVIRONMENT [
SQLAllocHandle 0
henv/value = 2158376
SQLSetEnvAttr 0
@GiuseppeChillemi
GiuseppeChillemi / miniconsole.r
Last active July 11, 2022 23:32
Mini script to send a command to a server. It's COMMANDS object is used
do %../scripts/send-to.r
port-number: 55551
server-address: "localhost"
Forever [
prin "Insert a server command > " message: input
if message = "exit" [Print "!!! Exit Received, quitting !!!" break]
response: send-to server-address port-number message
print ""
@GiuseppeChillemi
GiuseppeChillemi / Test-Server.r
Last active July 11, 2022 23:34
An experimental server which waits and executes the Rebol commands it receives taking them from a command block
SERVER-DB: "myserver"
DB: "mydb"
port-number: 55551
server-address: "localhost"
;--- These are the commands we could execute
@GiuseppeChillemi
GiuseppeChillemi / send-to.r
Last active July 11, 2022 22:50
A function to send a command to a server
send-to: func [
"Send a message and returns the response. NONE if no response (TBD:)"
server-address "The address of the server"
port-number [integer!] "The remote port number"
message [String! block!] "The message to send"
/local
out-data ;"The return data"
connection
server