Let's write β

プログラミング中にできたことか、思ったこととか

2012-03-01から1ヶ月間の記事一覧

Githubでリポジトリに関心がある人の言語の傾向をみる。

require 'octokit' #Get infomation by user def user_languages(userName) repositories = Octokit.repositories(userName) langarray = repositories.collect {|repo| repo.fetch("language")} return langarray end def repo_watchers(repoName) watchers…

CLで指定バイトでバイナリデータ出力

ちょっとバイナリストリームとたわむれる必要がありまして、 数値を指定したbyteで入出力する必要がありました (defun read-bytes (in number-of-bytes &key (big-endian nil)) (if big-endian (loop for idx downfrom (1- number-of-bytes) downto 0 sum (*…

Juliaでマルチラインコメント

コメントってけっこうマルチラインで書きたいですよね。 でもどういうスタイルにするかは、まぁjuliaで討論中のようです。 とりあえずマクロで代用しておきましょう。 macro comment(exprs) end @comment begin function sayHello() println("Hello,world") …