This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [] | |
| detect: function [ | |
| event [word!] | |
| code [any-block! none!] | |
| offset [integer!] | |
| value [any-type!] | |
| ref [any-type!] | |
| frame [pair!] | |
| ][ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * PROLOG: when entering a function. | |
| * EPILOG: when exiting a function. | |
| * ENTER: when a block is about to be evaluated. | |
| * EXIT: when current evaluated block's end has been reached. | |
| * OPEN: when a new function (any-function!) call is pushed on stack and a new stack frame is opened. | |
| * RETURN: when a function call has returned and its stack frame has been closed. | |
| * FETCH: a value is read from the input block to be evaluated. | |
| * PUSH: a value has been pushed on the stack. | |
| * SET: a set-word is set to a value. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [ | |
| Purpose: { | |
| Red generator for encoded messaged as in: | |
| http://www.rebol.com/oneliners.html#section-17 | |
| } | |
| ] | |
| gen-hack: function [secret [string!]][ | |
| ;-- First build a list of integers from 1 to the last index of the secret string | |
| table: collect [repeat i len: length? secret [keep i]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [ | |
| Needs: View | |
| Title: "red-box" | |
| Author: "Huang Yongzhao" | |
| File: %redbox.red | |
| Tabs: 4 | |
| Version: "Alpha" | |
| Purpose: "Famous BoxWorld! game ported to red" | |
| Rights: "Copyright (C) 2015-2018 Red Foundation. All rights reserved." | |
| License: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [ | |
| Title: "Lines of code statistics from Red files" | |
| Author: "Nenad Rakocevic" | |
| File: %rloc.reds | |
| Tabs: 4 | |
| Purpose: { | |
| Counts the number of files, lines of code and inline comments in Red/Rebol files, across folders, | |
| filtering files using a list of suffixes and excluding files from a given list of subfolders. | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [ | |
| Purpose: "PoC script for checking if brackets/parens are matching in a Red file" | |
| ] | |
| check-brackets: function [file [file!]][ | |
| line: 1 | |
| stack: clear [] | |
| skip-chars: complement charset "[]()^/" | |
| parse read file [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Verifying my identity on Peepeth.com 0x1e33e78b9fc22c63740b0ed0cd441acbac5109f2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [] | |
| get-arguments: routine [ | |
| /local | |
| list [red-block!] | |
| s [red-value!] | |
| t [red-value!] | |
| top | |
| ][ | |
| top: stack/ctop - 3 ;-- might need adjustments depending on interpreted vs compiled code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [ | |
| Note: "from: https://gitter.im/red/red/gui-branch?at=5afc55a05a1d895fae45588e" | |
| ] | |
| view [ | |
| area 200x100 focus wrap | |
| at 10x10 base 255.255.255.254 200x100 all-over | |
| draw [line-width 20 pen 200.50.50.200] | |
| on-down [repend face/draw ['line event/offset event/offset]] | |
| on-over [if event/down? [change back tail face/draw event/offset]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [ | |
| Title: "256-bit unsigned integer library" | |
| Author: "Nenad Rakocevic" | |
| File: %int256.red | |
| Tabs: 4 | |
| Rights: "Copyright (C) 2018 Red Foundation. All rights reserved." | |
| License: { | |
| Distributed under the Boost Software License, Version 1.0. | |
| See https://github.com/red/red/blob/master/BSL-License.txt | |
| } |