Skip to content

Instantly share code, notes, and snippets.

View serialhex's full-sized avatar
😸
Pondering language design...

serialhex

😸
Pondering language design...
View GitHub Profile
rg11, long arg12, long arg13, long arg14)
{
VALUE retval, proto, proc, obj;
VALUE argv[15];
int argc;
long buff[15];
buff[0] = arg0;
buff[1] = arg1;
buff[2] = arg2;
LINKFLAGS_NARRAY=`ruby "$TMPRUBY" 2>/dev/null`
echocheck "Ruby NArray Developer Files"
echo cc_check
echo $INCLUDES_RUBY
echo $LINKFLAGS_RUBY
echo $LINKFLAGS_NARRAY
if cc_check $INCLUDES_RUBY $LINKFLAGS_RUBY $LINKFLAGS_NARRAY
then
echores "yes"
test_ruby_narray()
{
if test "$_ruby" = yes
then
cat >$TMPRUBY << EOF
require('rubygems') if RUBY_VERSION < "1.9"
require 'narray'
puts NArray[[1, 0, 0], [0, 1, 2]]
EOF
echocheck "Ruby NArray"
@serialhex
serialhex / trancekoder.rb
Created August 9, 2011 03:40
RTFKODE!!!
#!/usr/bin/env ruby
# serialhex's awesome quick-and-dirty python-to-ruby trancekoder of indomnitable awesomeness!!
#
# use: for quickly trancekoding python source into ruby source...
# in the context of shogun anyway, it's probably not going to work too well with projects of any *real* size
# (plus, i'm hardcoding a number of things, so tough noogies!)
#
# anyway, this should be pretty interesting, as i imagine there will be a *lot* of regexes & stuff i haven't played with much before... so lets see how bad i break things!!!
# this was trancekoded by the awesome trancekoder
require 'narray'
require 'modshogun'
require 'load'
require 'pp'
strings=['hey','guys','i','am','a','string']
parameter_list=[[strings]]
@serialhex
serialhex / rbgtkinits.c
Created September 10, 2011 15:30
file for ashbb
extern void Init_gtk_gdk_gc();
extern void Init_gtk_treemodel();
extern void Init_gtk_accel_group();
extern void Init_gtk_entry();
extern void Init_gtk_textview();
extern void Init_gtk_fontbutton();
extern void Init_gtk_progress_bar();
extern void Init_gtk_gdk_pangorenderer();
extern void Init_gtk_gdk_colormap();
extern void Init_gtk_recent_manager();
/* John J. Scuteri 9/13/2011
BCS 230 Foundations of Computer Programming
Assignment # 4 Paint Job Estimation */
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
Error detected while loading xmonad configuration file: /home/serialhex/.xmonad/xmonad.hs
xmonad.hs:19:28:
No instance for (LayoutClass Circle a0)
arising from a use of `|||'
Possible fix:
add an instance declaration for (LayoutClass Circle a0)
In the second argument of `(|||)', namely
`Circle ||| tabbed shrinkText defaultTheme ||| Accordion'
In the expression:
@serialhex
serialhex / surreal.hs
Created April 20, 2012 00:18
the beginnings of surreal numbers using haskell...
--import Data.Set (Set)
import qualified Data.Set as Set
--Forms
--A form is a pair of sets of surreal numbers, called its left set and its right set. A form with left set L and right set R is written { L | R }. When L and R are given as lists of elements, the braces around them are omitted.
--Either or both of the left and right set of a form may be the empty set. The form { { } | { } } with both left and right set empty is also written { | }.
data l `Surreal` r = Zero
| (l `Surreal` Set.empty) `Surreal` (Set.empty `Surreal` r)
deriving (Show)
@serialhex
serialhex / gist:2759111
Created May 20, 2012 18:46
installing happstack-lite... *now* it works!
╭─serialhex@multi-hex ~/src/edekatun/yesod_lern/yosog ‹ruby-1.9.3› ‹master*›
╰─$ cabal install happstack-light
cabal: There is no package named 'happstack-light'.
You may need to run 'cabal update' to get the latest list of available
packages.
╭─serialhex@multi-hex ~/src/edekatun/yesod_lern/yosog ‹ruby-1.9.3› ‹master*›
╰─$ cabal update 1 ↵
Downloading the latest package list from hackage.haskell.org
╭─serialhex@multi-hex ~/src/edekatun/yesod_lern/yosog ‹ruby-1.9.3› ‹master*›
╰─$ cabal install happstack-light