This file contains 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 | |
] | |
nb: 500 | |
list: [] | |
make-dir folder: %images-test/ | |
loop nb [ | |
append list img: make image! as-pair 100 + random 300 100 + random 300 |
This file contains 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
// generated from https://chatgpt.com/canvas/shared/67afab561d4c8191bbb497e5cef5147b | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <math.h> | |
#define ULP_TOLERANCE 10 | |
int float_almost_equal(float a, float b) { |
This file contains 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
root: 5185/7876, runs: 133, mem: 25173016 => 20056768, mark: 6.3ms, sweep: 4.0ms | |
root: 5185/7876, runs: 134, mem: 25147196 => 20068176, mark: 6.0ms, sweep: 4.0ms | |
root: 5185/7876, runs: 135, mem: 25160776 => 19639592, mark: 5.4ms, sweep: 3.5ms | |
root: 5185/7876, runs: 136, mem: 25169800 | |
*** Runtime Error 1: access violation | |
*** in file: /C/dev/Red/runtime/hashtable.reds | |
*** at line: 578 | |
*** | |
*** --Frame-- --Code-- --Call-- | |
*** 0105A990h 0042FE5Dh red/_hashtable/mark 274556F0h |
This file contains 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
root: 5185/7876, runs: 161, mem: 31529432 => 10521672, mark: 3.0ms, sweep: 18.0ms | |
root: 5185/7876, runs: 162, mem: 12969668 => 11115736, mark: 5.7ms, sweep: 2.0ms | |
root: 5185/7876, runs: 163, mem: 15180164 => 11257156, mark: 4.0ms, sweep: 3.0ms | |
root: 5185/7876, runs: 164, mem: 53216424 => 12400444, mark: 6.7ms, sweep: 30.8ms | |
root: 5185/7876, runs: 165, mem: 16780072 | |
*** Runtime Error 1: access violation | |
*** in file: /C/dev/Red/runtime/collector.reds | |
*** at line: 324 | |
*** | |
*** --Frame-- --Code-- --Call-- |
This file contains 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] | |
scroll-max: 100 | |
start-pos: 0 | |
view [ | |
size 200x200 | |
backdrop cyan | |
p: panel 100x100 [button "ok"] | |
do [start-pos: p/offset/y] ;-- saves initial position |
This file contains 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 [] | |
count: function [][ | |
list: [native! 0 action! 0 op! 0 function! 0 routine! 0] | |
foreach w words-of system/words [ | |
if pos: find list type?/word get/any w [pos/2: pos/2 + 1] | |
] | |
list | |
] |
This file contains 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 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 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 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: { |
NewerOlder