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 [ | |
| Date: 4-Sep-2019 | |
| Description: {Mouse sensitive zooming function} | |
| Author: "Toomas Vooglaid" | |
| Licence: "Public domain" | |
| ] | |
| zooming: function [face event][ | |
| ;face's draw-block needs to have matrix defined | |
| mx: face/draw/matrix |
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 [ | |
| Date: 16-Aug-2019 | |
| See: {[August 15, 2019 9:56 PM](https://gitter.im/red/red?at=5d55aacd4e17537f5239de0c) forward} | |
| Description: {Combined from @grggirwin's and @dockimbel's with some spice} | |
| ] | |
| gen-hack2: function [ | |
| {Generates randomly suffled copy of the argument and the seed to get it stright} | |
| secret [any-string! any-block! binary!] | |
| ][ | |
| random/seed stats |
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: "Shooting" | |
| Description: "Exercise with parametrized curve" | |
| Date: 2019-08-10 | |
| Author: "Toomas Vooglaid" | |
| Licence: "Public domain" | |
| Usage: { | |
| To load and orient the weapon - drag point. | |
| To relocate the target - drag target. | |
| To relocate weapon - ctrl-drag it (cannon relocates horizontally on dragging). |
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 [ | |
| Description: "Prisoner's dilemma tournament" | |
| Date: 3-Aug-2019 | |
| Author: "Toomas Vooglaid" | |
| Licence: "Public domain" | |
| ] | |
| ;set [R P T S] [-1 -3 0 -6] ; One turn (original) | |
| set [R P T S] [3 1 5 0] | |
| choose: func [A B][reduce case [ | |
| all [A B] [[R R]] ;A and B [[R R]] |
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 [ | |
| Date: 28-July-2019 | |
| Notes: {Click on window to add flies} | |
| ] | |
| bb: [] fc: target: none | |
| web: load %web.png | |
| set-step: func [face][as-pair | |
| face/extra/speed * (cosine face/extra/dir) | |
| face/extra/speed * (sine face/extra/dir) | |
| ] |
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 [ | |
| Description: {Ray casting exercise} | |
| Needs: View | |
| Date: 25-July-2019 | |
| Inspiration: https://github.com/krisajenkins/elm-rays | |
| Tutorial: https://ncase.me/sight-and-light/ | |
| Redporter: "Toomas Vooglaid" | |
| Licence: "Public domain" | |
| ] | |
| ; To change into plain light instead of radial |
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 [ | |
| Description: {Dragn'drop into panel} | |
| Date: 14-July-2019 | |
| ] | |
| context [ | |
| hop: false | |
| pan: pane: ofs: none | |
| view [ | |
| base loose | |
| on-down [move find pane: face/parent/pane face tail pane] |
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: "Array func diagram" | |
| Date: 9-Jul-2019 | |
| Needs: View | |
| Author: "Toomas Vooglaid" | |
| Uses: https://github.com/toomasv/diagram/blob/master/diagram-style.red | |
| ] | |
| do %diagram-style.red | |
| view dia [ | |
| title "Gregg's array func" |
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 [ | |
| Date: 2019-07-06 | |
| Author: "Toomas Vooglaid" | |
| Motivation: https://gitter.im/red/help?at=5d20178fc5f3c329aef31f43 | |
| ] | |
| includes?: func [ | |
| "Check if first argument contains any of second argument" | |
| a [series!] | |
| b [any-type!] | |
| ][ |
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 [ | |
| Description: {Attempt to implement @GiuseppeChillemi's "path dialect"} | |
| Date: 22-Jun-2019 | |
| Author: "Toomas Vooglaid" | |
| ] | |
| system/lexer/pre-load: func [src][ | |
| chr: complement charset {/[ "#} | |
| path: [some chr #"/" some chr] | |
| mpath: [path change #"[" "/(" to #"]" change skip #")" any [#"/" mpath]] | |