work in progress.
@nikezono の読みながらメモ 兼 輪読会の補足資料.
私はペーペーの素人なのでおおいに誤りを含む. マサカリは歓迎
| class Value < Struct.new(:value) | |
| def reducible? | |
| return false | |
| end | |
| def to_s | |
| return value.to_s | |
| end | |
| def inspect |
| const fs = require('fs'); | |
| const FeedParser = require('feedparser'); | |
| const FILEPATH = process.argv[2]; | |
| if (!FILEPATH) { | |
| console.error('Invalid argument: must be node feed2scrapbox.js [FILEPATH]'); | |
| process.exit(1); | |
| } |
| # Node.js API | |
| path = require 'path' | |
| fs = require 'fs' | |
| # NPM modules | |
| express = require 'express' | |
| stream = require 'connect-stream' | |
| app = express() |
| /* | |
| * Copyright (C) 2008-2009 Google Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
| * use this file except in compliance with the License. You may obtain a copy of | |
| * the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| sample = require './sample.json' | |
| ### | |
| Bogosort | |
| 「無作為に数列を並べて、ソートができていれば終わり」 | |
| 停止性は無限の猿定理により保証される | |
| 無限の猿定理: | |
| ランダムに文字列を作り続ければ、 | |
| どんな文字列もいつかはできあがるという定理 | |
| ### |