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
| #include "stdafx.h" | |
| #include <Windows.h> | |
| int (*foo)(int) = NULL; | |
| int _tmain(int argc, _TCHAR* argv[]) | |
| { | |
| HMODULE handle = LoadLibraryA("temp.dll"); | |
| printf("error: %i\n", GetLastError()); | |
| printf("hModule: %i\n", handle); |
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
| REBOL [ | |
| Author: "Nenad Rakocevic" | |
| Date: 04/03/2013 | |
| Purpose: { | |
| Show how to achieve R2 source rewriting suitable for evaluation | |
| using R3 interpreter. | |
| } | |
| ] | |
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
| REBOL [ | |
| Author: "Nenad Rakocevic" | |
| Date: 04/03/2013 | |
| Purpose: { | |
| Show how to achieve R2 source rewriting suitable for evaluation | |
| using R3 interpreter. | |
| } | |
| Note: "Use it from %Red/ folder" | |
| ] |
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
| ELF Header: | |
| Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 | |
| Class: ELF32 | |
| Data: 2's complement, little endian | |
| Version: 1 (current) | |
| OS/ABI: UNIX - System V | |
| ABI Version: 0 | |
| Type: DYN (Shared object file) | |
| Machine: ARM | |
| Version: 0x1 |
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/System [] | |
| int-to-float: func [ | |
| n [integer!] | |
| return: [float!] | |
| /local sign shifts less? z | |
| ][ | |
| sign: 0 | |
| shifts: 0 | |
| less?: true |
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 [ | |
| Author: "Nenad Rakocevic" | |
| Date: 29/11/2013 | |
| ] | |
| bf: function [prog [string!]][ | |
| size: 30000 | |
| cells: make string! size | |
| append/dup cells null size |
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 [ | |
| Author: "Nenad Rakocevic" | |
| Date: 06/12/2013 | |
| Note: { | |
| This short Red program demonstrates the use of dynamically built Parse rules. | |
| It parses an imaginary external DSL with variables, and detects if a variable has | |
| been used before been properly declared and initialized. | |
| The detection works by comparing found variables against a list of declared | |
| variables. The list starts empty, and it grows as new variables are collected. |
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/System [] | |
| utf8-to-codepoint: func [ ; yields an integer >= 0 and < 1114112, or -1 | |
| u [c-string!] ; should have length 1 to 4 | |
| /local b1 b2 b3 b4 | |
| ][ | |
| either 1 = length? u | |
| [ | |
| b1: as-integer u/1 | |
| either b1 < 128 [ |
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: "JSON parser" | |
| File: %json.red | |
| Author: "Nenad Rakocevic" | |
| License: "BSD-3 - https://github.com/red/red/blob/master/BSD-3-License.txt" | |
| ] | |
| json: context [ | |
| quoted-char: charset {"\/bfnrt} | |
| exponent: charset "eE" |