Skip to content

Instantly share code, notes, and snippets.

View rebolek's full-sized avatar

Boleslav Březovský rebolek

  • 03:26 (UTC +02:00)
View GitHub Profile
@rebolek
rebolek / Mach-O.r2
Created March 31, 2011 18:45
Experimental Mach-O emmiter
REBOL [
Title: "Red/System Mach-O format emitter"
Author: "Nenad Rakocevic"
File: %Mach-O.r
Rights: "Copyright (C) 2011 Nenad Rakocevic. All rights reserved."
License: "BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt"
]
context [
defs: [
@rebolek
rebolek / math-speed.reds
Created July 18, 2012 11:22
Check speed of math operations
Red/System[]
#include %C-library.reds
sine-osc: func [
x [float!] ; 0..1
return: [float!] ; -1..1
/local
y [float!]
][
REBOL []
;print ""
stylize [
dragger: box [
facets: [
init-size: 100x100
max-size: 100x100
]
@rebolek
rebolek / gist:5717776
Created June 5, 2013 22:14
Output of %async-test.r3
OPEN port
ASYNC
false
==TCP-event: lookup
==TCP-event: connect
==TCP-event: wrote
==TCP-event: read
..Read 5 bytes
>>
@rebolek
rebolek / timer.r3
Created June 18, 2013 20:44
Timer example
REBOL[]
n: now/time/precise
i: 0
view [
b: button "test" on-init [
do-actor/style face 'on-init arg 'button
set-timer/repeat [
++ i
REBOL []
awake-handler: funct [
event
/local port
][
port: event/port
switch/default probe event/type [
lookup [
open port
combine: func [
"Reduces and joins a block of values."
block [block!] "Values to reduce and join"
] [
if empty? block: reduce block [return block]
remove-each value block [none? value]
append either series? first block [copy first block] [
form first block
] next block
]
REBOL[]
do %load-gui.reb
page: to string! read http://www.goodreads.com/quotes
quotes: copy []
parse page [
some [
thru "“" copy value to "”" (append quotes value)
]
Red [
Title: "Sintezar PM-102 - Phase Manipulation Digital Sintesizer"
Name: 'PM-102
Version: 0.4.0
Needs: 'View
; Date: 25-11-2015
File: %pm-102.red
Author: "Boleslav Březovský"
; Email: rebolek@gmail.com
]
@rebolek
rebolek / Livecode enhanced
Created October 3, 2016 08:48 — forked from DideC/Livecode enhanced
Based on Dockimbel VID livecode, this is a little more advanced version where you can define Red's values used by the VID code. The window is resizable and there is spliters to rearange space.
Red [
Title: "Simple GUI livecoding demo"
Author: "Nenad Rakocevic / Didier Cadieu"
File: %livecode.red
Version: 1.2.0
Needs: 'View
Usage: {
Type VID code in the bottom right area, you will see the resulting GUI components
rendered live on the left side and fully functional (events/actors/reactors working live).
The top right area let you define Red's values to be used in your VID code, even functions or anything.