Skip to content

Instantly share code, notes, and snippets.

View sdogruyol's full-sized avatar
⚡
Building gcry - the next GC for Crystal

Serdar Dogruyol - Sedo セド sdogruyol

⚡
Building gcry - the next GC for Crystal
View GitHub Profile
@pine
pine / AdventCalendar_Crystal_20151215.md
Last active December 16, 2015 12:16
『 東京 Crystal 勉強会 #3 in 恵比寿 』 を開催します!!!!

🎉🎉🎉 東京 Crystal 勉強会 #3 を開催します 🎉🎉🎉

この記事は Crystal Advent Calendar 2015 の 15 日目の記事です

昨日は Kemal の開発者である sdogruyol さんの記事でした。
今日は、私 pine613 が次の Crystal 勉強会の告知記事を書きます!

💎 TL;DR

  • 2016年1月22日 (金) に Cookpad さんで開催決定
@sdogruyol
sdogruyol / RailsMysqlExisting.md
Last active December 16, 2015 18:19
Rails 3.2 Connection To Existing Mysql DB

Install Active Record Mysql Bindings

gem install activerecord-mysql2-adapter

Add mysql2 to your .Gemfile

gem 'mysql2'

Configure your DB Settings in config/database.yml

development:
    adapter: mysql2
    encoding: utf8
    database: mysql_db_name

pool: 5

@vigo
vigo / tr-developer-podcasts.md
Last active June 9, 2017 11:11
Türkçe Developer PodCast'leri

Türkçe Developer PodCast’leri

devPod

[Web][1a] - [iTunes][1b]

webBox5

[Web][2a] - [iTunes][2b]

@ysbaddaden
ysbaddaden / MT.md
Last active October 30, 2018 15:31

Crystal MTs (Multi Threaded schedulers)

Goals:

  • developers must only care about fibers and channels;
  • crystal runtime should start 1 upto N threads;
  • each thread can take & resume any fiber in the loop;
  • channels as user-code sync primitives;
  • also propose fiber-aware mutex/monitors;
  • additional sync primitives (e.g. IO events, ...)
@jamesob
jamesob / nodejs-question.md
Last active January 26, 2019 22:50
An open question (rant) about node.js

Most developers would agree that, all other things being equal, a synchronous program is easier to work with than an asynchronous one. The logic for this is pretty clear: one flow of execution is easier for the human mind to simulate than n concurrent flows.

After doing two small projects in node.js (one of which is here -- ready for the blinding flurry of criticism), there's one question that I can't shake: if asynchronicity is an optimization (that is, a complexity introduced for the sake of performance), why would people, a priori, turn to a framework that imposes it for everything? If asynchronous code is harder to reason about, why would we elect to live in a world where it is the default?

It could be argued pretty well that the browser is a domain that inherently lends itself to an async model, but I'd be very curious to hear a defense of "async-first" thinking for problems that are typically solved on the server-side. When working with node, I've noticed

Node.js Resources

What is node.js?

Node.js is just JavaScript running on the server side. That's it. That's all there is to it.

Express

  • Express Docs, if you want to get started and already know JavaScript this is the place to be
@nhoffmann
nhoffmann / deploy.rb
Created April 3, 2012 14:07
Capistrano recipe for deploying static content.
set :application, "My Static Content"
set :servername, 'test.example.com'
# no git? simply deploy a directory
set :scm, :none
set :repository, "." # the directory to deploy
# using git? deploy from local git repository
# set :scm, :git
# set :repository, 'file//.' # path to local git repository
@costajob
costajob / fact.cr
Last active September 20, 2022 21:15
Factorial implementation using Big numbers in Ruby, GO and Crystal
require "big_int"
def fact(n)
return 1 if n == 0
n * fact(n - 1)
end
n = BigInt.new(ARGV[0])
puts fact(n)
@costajob
costajob / http_cluster.cr
Last active November 24, 2022 09:09
Barebones HTTP server cluster in Crystal lang
require "http/server"
module HTTPCluster
struct Worker
def initialize(@pid : Int32, @master : Int32)
end
def call(port)
yield(port)
end
@killercup
killercup / Readme.md
Last active August 26, 2023 23:14
Convert The Rust Programming Language to Epub