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
# Draw a crab in Perl/Tk. Public domain, see | |
# https://creativecommons.org/publicdomain/zero/1.0/ | |
use strict; | |
use warnings; | |
# ColorChoice is a composite widget (a kind of mega-widget) with | |
# buttons to choose red, green, or blue. It always starts on red. | |
# When the user changes the color, this widget calls its -command. | |
package ColorChoice; |
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
#include <ruby.h> | |
static void | |
deli_mark(void *ptr) | |
{ | |
rb_gc_mark((VALUE)ptr); | |
} | |
static const rb_data_type_t deli_type = { | |
"Type", |
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
#include <err.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
int signo; | |
int code; | |
int sigerrno; | |
pid_t pid; | |
uid_t uid; |
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
require 'benchmark' | |
require 'carray' | |
require 'etc' | |
Ractor.new {} # show "warning: Ractor is experimental..." | |
puts "Making an Array of Floats..." | |
array = 10_000_000.times.map{500 * rand} | |
array1, array2, array3 = nil | |
nproc = Etc.nprocessors | |
Benchmark.bmbm do |x| | |
x.report("Float#to_i") {array1 = array.map &:to_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
# primes2.pl by kernigh | |
# | |
# This solves https://github.com/PlummersSoftwareLLC/Primes in Perl | |
# using a vec string. It is slower than solution_1/primes.pl which | |
# uses an array: 7 iterations for primes2.pl versus 13 iterations for | |
# solution_1 on the same cpu. | |
# | |
# This primes2.pl is a translation from PrimeCPP.cpp, but without the | |
# count_primes method, and is "under BSD-new/BSD-3 or a more | |
# permissive license" (quoting CONTRIBUTING.md). |
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
[ using 1143760 bytes of bsd ELF symbol table ] | |
console out [ATY,Jasper_A] console in [keyboard]USB and ADB found, using ADB | |
using parent ATY,JasperParent:: memaddr b8000000, size 8000000 : consaddr b8008000 : ioaddr b0020000, size 20000: width 1280 linebytes 1280 height 854 depth 8 | |
Copyright (c) 1982, 1986, 1989, 1991, 1993 | |
The Regents of the University of California. All rights reserved. | |
Copyright (c) 1995-2020 OpenBSD. All rights reserved. https://www.OpenBSD.org | |
OpenBSD 6.7-current (GENERIC) #9: Sat May 30 23:07:42 EDT 2020 | |
kernigh@wisconsin.my.domain:/sys/arch/macppc/compile/GENERIC | |
real mem = 1073741824 (1024MB) |
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
/* | |
* $ cc -O2 -o timefill timefill.c | |
* Add -DUSE_ASM for PowerPC asm. | |
* | |
* George Koehler modified this file on 2020-05-02. License is at | |
* https://github.com/milkytracker/MilkyTracker/blob/v1.02.00/COPYING | |
* | |
* This is a benchmark of PowerPC asm versus C for OpenBSD. It | |
* assumes clang or gcc. It might work on other BSDs and Linux, but | |
* you might need to provide timespecsub(3) if it is missing. |
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
[ 51.654] (--) no aperture driver access: only wsfb driver useable | |
[ 53.028] (--) Using wscons driver on /dev/ttyC4 | |
[ 53.426] | |
X.Org X Server 1.20.5 | |
X Protocol Version 11, Revision 0 | |
[ 53.426] Build Operating System: OpenBSD 6.6 macppc | |
[ 53.427] Current Operating System: OpenBSD ghostborough.my.domain 6.6 GENERIC#631 macppc | |
[ 53.428] Build Date: 04 December 2019 04:23:41PM | |
[ 53.428] | |
[ 53.428] Current version of pixman: 0.38.4 |
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
[ 10093.090] (WW) checkDevMem: failed to open /dev/xf86 and /dev/mem | |
(Operation not permitted) | |
Check that you have set 'machdep.allowaperture=1' | |
in /etc/sysctl.conf and reboot your machine | |
refer to xf86(4) for details | |
[ 10093.090] linear framebuffer access unavailable | |
[ 10093.099] (--) Using wscons driver on /dev/ttyC4 | |
[ 10093.136] | |
X.Org X Server 1.20.5 | |
X Protocol Version 11, Revision 0 |
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
[ 60.705] (--) no aperture driver access: only wsfb driver useable | |
[ 62.207] (--) Using wscons driver on /dev/ttyC4 | |
[ 62.469] | |
X.Org X Server 1.19.6 | |
Release Date: 2017-12-20 | |
[ 62.469] X Protocol Version 11, Revision 0 | |
[ 62.469] Build Operating System: OpenBSD 6.4 macppc | |
[ 62.469] Current Operating System: OpenBSD ghostborough.my.domain 6.4 GENERIC#188 macppc | |
[ 62.470] Build Date: 29 August 2018 03:36:30PM | |
[ 62.470] |
NewerOlder