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
/* demo.c -- | |
Compile with: | |
gcc -Wall -std=c11 -lm -o demo demo.c | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> |
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
;;; case-star.chez -- | |
;; | |
;;Copyright (C) 2010-2017 Marco Maggi <marco.maggi-ipsu@poste.it> | |
;; | |
;;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 the | |
;;following conditions: |
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
;;; | |
;;;Part of: Marco's Gists | |
;;;Contents: A rough demo of using coroutines with Vicare Scheme. | |
;;;Date: Sat Jan 17, 2015 | |
;;; | |
;;;Abstract | |
;;; | |
;;; This script shows how to run coroutines and how to implement: a PARALLEL | |
;;; syntax which is syntactic sugar to evaluate coroutines; a MONITOR syntax that | |
;;; allows only a maximum number of coroutines to enter a critical section of |
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
/* Demo for Libiconv. A simple example to demonstrate the use of | |
"UCS-4-INTERNAL": convert a string in UTF-8 encoding to an array of | |
integers representing Unicode code points. To compile the program | |
with Libiconv on a GNU+Linux system: | |
$ gcc -o iconv-demo iconv-demo.c -l iconv | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
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
/* An untested example of using the Expat library with GBK encoding: | |
read an XML document from stdin and exit. Libiconv is used to | |
perform the actual conversion from GBK to UTF-8. On a GNU+Linux | |
system compile it with: | |
$ gcc -Wall -o expat-gbk-demo expat-gbk-demo.c -liconv -lexpat | |
A useless XML test file follows: | |
<?xml version='1.0' encoding='GBK'?> |
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
;;; Based on the following post: | |
;;; http://groups.google.com/group/comp.lang.scheme/browse_thread/thread/78170599ca8be8f6# | |
#!r6rs | |
(import (rnrs)) | |
(define (Cholesky:decomp P) | |
(Cholesky:make-square | |
(let iter ((i 0) (j 0) (L '())) | |
(if (>= i (length P)) |