Skip to content

Instantly share code, notes, and snippets.

@tanakh
tanakh / gist:8750952
Created February 1, 2014 11:20
なぜ我々はHaskellを使うのか

スタートアップ企業 Silk が、Haskellを採用した理由。

http://engineering.silk.co/post/31920990633/why-we-use-haskell

As a newly started company, we have a lot of technical decisions to make. One of the important ones is the choice of a programming language. Since we’re building a web application, this goes for both the client (i.e. the web browser) and the server.

新しく始めた会社として、我々はたくさんの技術的決定を行わなければなりません。中でも重要なのは、プログラミング言語の選択です。我々はウェブアプリケーションを作っていたので、この選択がクライアント(Webブラウザなど)とサーバの両方で必要になります。

On the client, there wasn’t much discussion. Javascript is the only viable choice, unless you want to use Flash or similar plugin-based models. But on the server, we had more freedom. Popular choices for web applications are dynamically typed languages like Ruby, Python and PHP, and statically typed languages like Java and C#.

(ns polar-vortex
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(defn- setup []
(background 0)
(smooth)
(ellipse-mode :center)
@rosylilly
rosylilly / 00-actor.rb
Last active March 3, 2017 07:03
分かった気になる DCI 、ロミオとジュリエット編 Romeo & Juliette with DCI
# 役者クラス
#
# say: 役者は声を発する事ができる。
class Actor
def say(words)
puts words
end
end

By Saad Mousliki

御存知の通り、JavaScriptは数あるプログラミング言語のうちのひとつであり、モバイルのハイブリッドアプリ(PhoneGapやAppceleratorといった)や、サーバーサイド(NodeJSやWakanda)等の様々な所で実装されているWebの言語です。 また、Webブラウザにalertを出すところから、ロボットを動かす(nodebotやnodruinoを使って)ところまで様々なシーンで使われる言語となりました。 JavaScriptをマスターし、パフォーマンスの良いコードを生み出す開発者は市場で最も求められています。

@katzchang
katzchang / readme.md
Last active January 1, 2016 03:19
VOYAGE GROUPに転職して2年とちょっとが経ちました #vgadvent2013 @katzchang.gist

VOYAGE GROUPに転職して2年とちょっとが経ちました

2年経ったらなんとなくまとめる流れがあったので、それに習い、2年間を振り返ってみます。

adingo Fluct開発チーム

入社当時の配属先。当時は@ajiyoshiがリード、1ヶ月前に入社していた@brtriverがグリーンバンドをしていたのが印象的だった。

管理系はPHPで書かれており、まともに触るのは初。最初はWindows上でなんとかしようとしたが、すぐに諦めてUbuntu on VMWareにした。本番サーバはCentだったけど。「共通の開発環境」みたいなのを用意してくれていて、アプリケーションはそれぞれ独立していたがDBは共用していて(これもそのうち解消したはず)、隣の人のデータを壊したりしていた。まーそれでも、聞けば答えてくれる人たちが周りにいたので、とりあえず仕事をすることが出来た気がする。立ち上がりはかなりゆっくりで、初回のコミットは4週間後だった記憶がある。

@mohayonao
mohayonao / 00.md
Last active July 23, 2018 13:49
CoffeeCollider勉強会用の資料 http://goo.gl/Z2JmZ2

IDE

http://mohayonao.github.io/CoffeeCollider/

  • "Run" でコードを実行
  • "Stop" で停止
  • "Link" でコードをリンク化 (保存)
  • "Compile" コンパイル後のコード(JavaScript)を表示

IDEの機能

  • サンプルコード読み込み
@leque
leque / gist:8035729
Last active December 31, 2015 19:49

各言語のコレクション操作高階関数(メソッド、手続き)

Language
Common Lisp mapc mapcar find-if remove-if-not reduce reduce :from-end t some every
Scheme for-each map find filter fold, fold-left fold-right any, exists every, for-all
Haskell mapM_ map find filter foldl foldr any all
Caml Light do_list map - - it_list list_it exists for_all
OCaml iter map find filter, find_all fold_left fold_right exists for_all
F# iter map find filter fold foldBack exists forall
@dolpen
dolpen / Main.java
Last active December 31, 2015 16:59
絶対に許されない
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* 許せ
*
* 1版:適当探索
* 2版:IO改善
* 3版:最悪でない入力に対する探索打ち切り改善

Earlier, amidst many other tweets about a new css preprocessor, Myth, I tweeted "Avoid snake oil, people. It takes more than a pretty website and a good marketing message. You have to actually deliver code that works." to which @necolas replied "assume your peers have good intentions".

Absolutely. This is sound life advice. I endeavor to do this and the message I wanted to convey to everyone today could have been conveyed without resorting to using such negative phrases as "snake oil". So to the guys at Segment.io and especially to Ian Storm Taylor, I'd like to say I'm sorry. I was frustrated, but that doesn't excuse that tweet.

I'd like to talk briefly about why I was so frustrated.

Even people with great intentions can still do harm. Recently a nice guy decided he would give away a thousand dollars by ["making it rain" dollars at a mall](http://abclocal.go.com/kabc/sto

SQLインジェクション対策について

教育的な観点ではなく実務的な観点から、僕の考えをまとめてみる。UTF-8 を利用し、SET NAMES を利用していなくて mysql で、クライアントプリペアドステートメントなケースを想定している。

SQL インジェクションとは

$foo=$_POST[‘id’];
query(“SELECT * FROM foo WHERE id=$foo”);

のように外部からの文字列をそのまま使用してクエリを組みたてたときに、意図せぬ SQL を発行されてしまう脆弱性のことである。