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
// Hello world with Zig and notcurses | |
// | |
// Fedora 35 Worstation | |
// Zig 0.9.0-dev.1798+0f63f3eeb | |
// notcurses 2.4.9 | |
// (1) Install notcurses dev library. | |
// | |
// $ sudo dnf install notcurses-devel | |
// |
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
" Vim syntax file | |
" | |
" Language: Kit | |
" Maintainer: MIURA Masahiro <[email protected]> | |
" Last Change: 2018-10-30 | |
" License: GNU Lesser General Public License, version 3 | |
if exists("b:current_syntax") | |
finish |
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
% cat src/test.kit | |
rules AddOne { | |
(ADD_ONE(${x: Int})) => x + 1; | |
} | |
using rules AddOne; | |
function main() { | |
var foo = ADD_ONE(42_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
#!/bin/sh | |
#!/bin/zsh -x | |
# flac_renamer.sh - Renames FLAC files by tracknumbers. | |
# | |
# usage: | |
# $ ./flac_renamer.sh *.flac | |
# : e.g. MyArtist-MyTitle.flac is renamed to 01.flac | |
FLAC_FILES="$@" |
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
数式の文字列を eval できる言語ならどれでも大差なく解けそうなもの。 | |
というわけで Pure (http://purelang.bitbucket.org/) で解いてみた。 | |
#!/usr/bin/pure | |
using system; // for 'puts' | |
add100 acc 9 | |
= puts acc if eval acc == 100; | |
= _ otherwise; |
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
on Fedora 20 x86_64, after setting all FALCON_BUILD_* to OFF in ccmake | |
% git log -1 HEAD | cat | |
commit 5c5ca3d39db30c22a4218bea40a45d2f94465f2d | |
Author: Giancarlo Niccolai <[email protected]> | |
Date: Wed Dec 3 00:05:30 2014 +0100 | |
Fixed compilation on FreeBSD 10.1 64Bit - Clang | |
% | |
% ninja-build -k 1000 |
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
// simple HTTP client, based on | |
// https://mail.mozilla.org/pipermail/rust-dev/2013-August/005117.html | |
// | |
// Note: Envvar RUST_NEWRT=1 is required to compile and run this. | |
use std::rt::io::net::ip::{Ipv4Addr, SocketAddr}; | |
use std::rt::io::net::tcp::TcpStream; | |
use std::rt::io::{Reader, Writer}; | |
use std::str; |
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
#!/usr/bin/python | |
def main(): | |
gcCount = 0 | |
atCount = 0 | |
with open("Homo_sapiens.GRCh37.67.dna_rm.chromosome.Y.fa", "r") as f: | |
for line in f: | |
if not line.startswith('>'): | |
# gcCount += line.count('G') + line.count('C') | |
# atCount += line.count('A') + line.count('T') |
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
#!/usr/local/dart/dart-sdk/bin/dart | |
// gc.dart | |
// cf. http://saml.rilspace.org/moar-languagez-gc-content-in-python-d-fpc-c-and-c | |
import 'dart:io'; | |
import 'dart:async'; | |
main() | |
{ |
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
% gdb ./falcon | |
GNU gdb (GDB) Fedora (7.5.1-38.fc18) | |
Copyright (C) 2012 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-redhat-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... |
NewerOlder