Skip to content

Instantly share code, notes, and snippets.

$ FOO='() { bla; }' bash
$ echo "$FOO"
$ exit
$ FOO='() { bla; }' dash
$ echo "$FOO"
() { bla; }
$
dfsch_object_t *dfsch_car(dfsch_object_t * pair)
{
dfsch_object_t *p =
((((((size_t) ((pair))) & 0x07) == 0x02)
|| ((((size_t) ((pair))) & 0x03) ==
0x03)) ? (pair) : dfsch_assert_instance((pair),
(&dfsch_pair_type)));
return ((((((size_t) (p)) & 0x03) ==
0x03) ? ((dfsch_pair_t
*) (((((size_t)
char* dfsch_get_next_symbol(dfsch_symbol_iter_t **iter){ // deep magic
if (*iter == NULL){
*iter = GC_MALLOC(sizeof(dfsch_symbol_iter_t));
(*iter)->bucket = 0;
(*iter)->item = global_symbol_hash[(*iter)->bucket];
}
while ((*iter)->bucket < HASH_SIZE){
if (!(*iter)->item){
(*iter)->bucket ++;
(*iter)->item = global_symbol_hash[(*iter)->bucket];
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
#include <string.h>
(define (get-object-documentation object)
(cond
((instance? object <function>)
(slot-ref object 'documentation))
((instance? object <form>)
(slot-ref object 'documentation))
((instance? object <macro>)
(get-object-documentation (slot-ref object 'procedure)))
(else "Unknown object")))
#!/usr/bin/env dfsch-repl
;;; ublog - incredibly stupid blog engine
;;; Copyright (c) 2009 Ales Hakl
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining
;;; a copy of this software and associated documentation files (the
;;; "Software"), to deal in the Software without restriction, including
;;; without limitation the rights to use, copy, modify, merge, publish,
;;; distribute, sublicense, and/or sell copies of the Software, and to
;;; permit persons to whom the Software is furnished to do so, subject to
1b6ba: 48 8b 54 24 38 mov 0x38(%rsp),%rdx
1b6bf: 48 8b 44 24 40 mov 0x40(%rsp),%rax
1b6c4: 48 89 42 30 mov %rax,0x30(%rdx)
1b6c8: 48 8b 44 24 48 mov 0x48(%rsp),%rax
1b6cd: 48 89 42 48 mov %rax,0x48(%rdx)
1b6d1: 48 8b 44 24 50 mov 0x50(%rsp),%rax
1b6d6: 48 89 42 50 mov %rax,0x50(%rdx)
1b6da: 48 8b 44 24 58 mov 0x58(%rsp),%rax
1b6df: 48 89 42 58 mov %rax,0x58(%rdx)
1b6e3: 48 8b 54 24 30 mov 0x30(%rsp),%rdx
dfsch_object_t* dfsch_cdr(dfsch_object_t* pair){
return (((((size_t)(((((((size_t)((pair))) & 0x02) == 0x02)) ? (pair) : dfsch_assert_instance((pair), (&dfsch_pair_type))))) & 0x03) == 0x03) ? (((dfsch_object_t**)(((size_t)(((((((size_t)((pair))) & 0x02) == 0x02)) ? (pair) : dfsch_assert_instance((pair), (&dfsch_pair_type))))) & ~0x03))[1] == ((dfsch_object_t*)((size_t) -1)) ? ((dfsch_object_t**)(((size_t)(((((((size_t)((pair))) & 0x02) == 0x02)) ? (pair) : dfsch_assert_instance((pair), (&dfsch_pair_type))))) & ~0x03))[2] : (dfsch_object_t*)(((dfsch_object_t**)(((((((size_t)((pair))) & 0x02) == 0x02)) ? (pair) : dfsch_assert_instance((pair), (&dfsch_pair_type)))))+1)): (((dfsch_pair_t*)(((size_t)(((((((size_t)((pair))) & 0x02) == 0x02)) ? (pair) : dfsch_assert_instance((pair), (&dfsch_pair_type))))) & (((((size_t)(((((((size_t)((pair))) & 0x02) == 0x02)) ? (pair) : dfsch_assert_instance((pair), (&dfsch_pair_type))))) & 0x03) == 0x03) ? ~0x03L : ~0x07L)))->cdr));
}
(define (split-list lyst n)
(let ((result (make-vector 3)))
(vector-set! result 0 lyst)
(let loop ((i n))
(unless (null? lyst)
(if (= i 1)
(let ((tmp lyst))
(set! lyst (cdr lyst))
(set-cdr! tmp ()))
(begin
dfsch_object_t* dfsch_sort_list(dfsch_object_t* list,
dfsch_object_t* comp){
size_t k = 1;
dfsch_object_t* p = list;
size_t p_s;
dfsch_object_t* q;
size_t q_s;
dfsch_object_t* l;
dfsch_object_t* lt;
int nmerges;