SlideShare a Scribd company logo
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの原理原則
Work
C#
Unity
Private
http://neue.cc/
@neuecc
using C
in 8 years
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの原理原則
What?
Why?
How?
Codeplex Era
というものがありました。
産廃
#1 2009-04-04
http://linqjs.codeplex.com/
LINQってJavaScriptでもできそうだね
やるからには勝ちたい #勝ちとは
LINQってJavaScriptでもできそうだね
やるからには勝ちたい #勝ちとは
Pros
Cons
#2 2009-10-29
http://linqcomparer.codeplex.com/
source.Distinct(x => x.Age);
小さくっても全然良い
class EqualityComparer<T> : IEqualityComparer<T>
{
readonly Func<T, T, bool> equals;
readonly Func<T, int> getHashCode;
public EqualityComparer(Func<T, T, bool> equals, Func<T, int> getHashCode)
{
this.equals = equals;
this.getHashCode = getHashCode;
}
public bool Equals(T x, T y)
{
return equals(x, y);
}
public int GetHashCode(T obj)
{
return getHashCode(obj);
}
#3 2010-04-07
http://dbexecutor.codeplex.com/
#3 2010-04-07
http://dbexecutor.codeplex.com/
// (object x) => (object)((T)x).name
static Func<object, object> CreateGetValue(Type type, string name)
{
var x = Expression.Parameter(typeof(object), "x");
var func = Expression.Lambda<Func<object, object>>(
Expression.Convert(
Expression.PropertyOrField(
type.IsValueType ? Expression.Unbox(x, type) : Expression.Convert(x, type),
name),
typeof(object)),
x);
return func.Compile();
}
#4 2010-04-30
http://dynamicjson.codeplex.com/
// Parse (JsonString to DynamicJson)
var json = DynamicJson.Parse(@“
{
""foo"":""json"",
""bar"":100,
""nest"":
{
""foobar"":true
}
}");
// "Json" - dynamic(string)
var r1 = json.foo;
// 100 - dynamic(double)
var r2 = json.bar;
// true - dynamic(bool)
var r3 = json.nest.foobar;
#4 2010-04-30
http://dynamicjson.codeplex.com/
// Parse (JsonString to DynamicJson)
var json = DynamicJson.Parse(@“
{
""foo"":""json"",
""bar"":100,
""nest"":
{
""foobar"":true
}
}");
// "Json" - dynamic(string)
var r1 = json.foo;
// 100 - dynamic(double)
var r2 = json.bar;
// true - dynamic(bool)
var r3 = json.nest.foobar;
public class DynamicObject : IDynamicMetaObjectProvider
{
public virtual IEnumerable<string> GetDynamicMemberNames();
public virtual DynamicMetaObject GetMetaObject(Expression parameter);
public virtual bool TryBinaryOperation(BinaryOperationBinder binder, object arg, out object
public virtual bool TryConvert(ConvertBinder binder, out object result);
public virtual bool TryCreateInstance(CreateInstanceBinder binder, object[] args, out objec
public virtual bool TryDeleteIndex(DeleteIndexBinder binder, object[] indexes);
public virtual bool TryDeleteMember(DeleteMemberBinder binder);
public virtual bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
public virtual bool TryGetMember(GetMemberBinder binder, out object result);
public virtual bool TryInvoke(InvokeBinder binder, object[] args, out object result);
public virtual bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object re
public virtual bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value);
public virtual bool TrySetMember(SetMemberBinder binder, object value);
public virtual bool TryUnaryOperation(UnaryOperationBinder binder, out object result);
}
#5 2010-07-15
http://xstreamingreader.codeplex.com/
#6 2010-09-12
http://reactiveoauth.codeplex.com/
#7 2011-02-22
https://chainingassertion.codeplex.com/
https://github.com/neuecc/ChainingAssertion
BDD, assertThat, fluent interface...
ユニットテストへの思索を深める
#8 2011-10-17
http://reactiveproperty.codeplex.com/
https://github.com/runceel/ReactiveProperty
実装は単純、思想は深遠
#9 2012-02-18
http://implicitquerystring.codeplex.com/
int x = Request.QueryString.ParseValue("hoge");
DateTime y = Request.QueryString.ParseValue("huga");
public struct ConvertableString
{
readonly string value;
public ConvertableString(string value)
{
this.value = value;
}
public static implicit operator Boolean(ConvertableString self)
{
return Boolean.Parse(self.value);
}
public static implicit operator Int32(ConvertableString self)
{
return Int32.Parse(self.value);
}
// ...
}
#10 2012-04-02
http://hashmapper.codeplex.com/
GitHub Era
#11 2012-12-03
https://github.com/neuecc/MemcachedTranscoder
「サイズ」と「速度」
圧縮とフォーマットは別
バージョニングとダンプ耐性も大事
#12 2013-02-27
https://github.com/neuecc/AsyncOAuth
ライブラリのためのasync/await
#13 2013-04-05
https://github.com/neuecc/CloudStructures
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの原理原則
#14 2013-12-06
https://github.com/neuecc/OwinRequestScopeContext
CallContext #とは
#15 2013-12-08
https://github.com/neuecc/Owin.RedisSession
#16 2013-12-23
https://github.com/neuecc/LightNode
public class My : LightNodeContract
{
public string Echo(string x)
{
return x;
}
public Task<int> Sum(int x, int? y, int z = 1000)
{
return Task.Run(() => x + y.Value + z);
}
}
DLL is IDL(Interface definition language)
#17 2013-12-23
https://github.com/neuecc/RespClient
public enum RespType : byte
{
SimpleStrings = (byte)'+',
Erorrs = (byte)'-',
Integers = (byte)':',
BulkStrings = (byte)'$',
Arrays = (byte)'*'
}
#18 2014-05-28
https://github.com/neuecc/UniRx
(.NET関連で)GitHub Starを尺度にすると
サポートは丁寧に。
#19 2014-09-24
https://github.com/neuecc/LINQ-to-BigQuery
Not IQueryable
#20 2014-10-28
https://github.com/neuecc/LINQ-to-GameObject-for-Unity
List<T>.Enumerator構造体
再帰イテレーター is Evil
IEnumerable<GameObject> Descendants(GameObject root)
{
yield return root;
foreach (Transform item in root.transform)
{
foreach (var child in Descendants(item.gameObject))
{
yield return child.gameObject;
}
}
}
#21 2015-01-14
https://github.com/neuecc/Open-on-GitHub
#22 2015-03-30
https://github.com/neuecc/NotifyPropertyChangedGenerator
#23 2015-11-03
https://github.com/neuecc/EtwStream
テキストログ #とは
ログのパフォーマンス
#24 2016-03-18
https://github.com/neuecc/SerializableDictionary
#25 2012-05-23
https://github.com/neuecc/MarkdownGenerator
#26 2016-05-31
https://github.com/neuecc/PhotonWire
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの原理原則
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの原理原則
#27 2016-06-07
https://github.com/neuecc/ObserveEveryValueChanged
public partial class MainWindow : Window
{
this.ObserveEveryValueChanged(x => x.Width);
this.ObserveEveryValueChanged(x => x.Height);
}
TBD
Reactive, ReImplemented Motion Library
Infinitely Fast Serializer for C#
デシリアライズ速度
無限大高速な、新シリアライザ+フォーマット
Next Generation has come
Next Generation has come
Conclusion
linq.js, UniRx, LINQ to GameObject, LINQ to BigQuery
LINQとは何であるかの掲示
ChainingAssertion
流れるようなインターフェイスや英語的なるものへの反逆
ReactiveProperty
MVVMへの異質なアプローチ
NotifyPropertyChangedGenerator
Roslyn時代のコーディング手法
LightNode, PhotonWire
現代的な観点でのRPCの再評価
ライブラリは思想の塊であり、
言葉だけよりも、むしろずっと
流暢に語ってくれる
言葉に、より強い証明、よ
り強力な説得力をもたらす
経験値を貯めよう
小さなライブラリでの経験が、大きなライブラリに繋がる
特別なものは必要ない(本当に新規のアイディアなど存在しない、
LINQですら古来の関数型言語からの援用なのだから!)
人に見せるものを意識する
自分のために作ってるんだし、ではなく意識したパッケージング
コードの書き方、見せ方、ウリを作るための機能の取捨、他人に
使ってもらうことを意識するとだいぶ違ってくる
機会はそんなに多くない!(8年間で、ある意味「たった」30回)
なので、一つ一つの機会を大事にして欲しい

More Related Content

PDF
ZeroFormatter/MagicOnion - Fastest C# Serializer/gRPC based C# RPC
PDF
ZeroFormatterに見るC#で最速のシリアライザを作成する100億の方法
PDF
NextGen Server/Client Architecture - gRPC + Unity + C#
PDF
Observable Everywhere - Rxの原則とUniRxにみるデータソースの見つけ方
PDF
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能
PDF
【Unite Tokyo 2019】Understanding C# Struct All Things
PDF
UniRx - Reactive Extensions for Unity
PDF
The History of LINQ
ZeroFormatter/MagicOnion - Fastest C# Serializer/gRPC based C# RPC
ZeroFormatterに見るC#で最速のシリアライザを作成する100億の方法
NextGen Server/Client Architecture - gRPC + Unity + C#
Observable Everywhere - Rxの原則とUniRxにみるデータソースの見つけ方
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能
【Unite Tokyo 2019】Understanding C# Struct All Things
UniRx - Reactive Extensions for Unity
The History of LINQ

What's hot (20)

PDF
History & Practices for UniRx UniRxの歴史、或いは開発(中)タイトルの用例と落とし穴の回避法
PDF
A Framework for LightUp Applications of Grani
PDF
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
PDF
Mono is Dead
PDF
Hello Dark-Side C# (Part. 1)
PPTX
C# 8.0 非同期ストリーム
PDF
An Internal of LINQ to Objects
PDF
The Usage and Patterns of MagicOnion
PPTX
RuntimeUnitTestToolkit for Unity
PDF
動的なILの生成と編集
PDF
The History of Reactive Extensions
PDF
How to Make Own Framework built on OWIN
PDF
AWS + Windows(C#)で構築する.NET最先端技術によるハイパフォーマンスウェブアプリケーション開発実践
PDF
Photon Server Deep Dive - PhotonWireの実装から見つめるPhotonServerの基礎と応用
PDF
Metaprogramming Universe in C# - 実例に見るILからRoslynまでの活用例
PDF
Inside FastEnum
PDF
Introduction to NotifyPropertyChangedGenerator
PDF
.NET最先端技術によるハイパフォーマンスウェブアプリケーション
PDF
linq.js - Linq to Objects for JavaScript
PDF
基礎からのCode Contracts
History & Practices for UniRx UniRxの歴史、或いは開発(中)タイトルの用例と落とし穴の回避法
A Framework for LightUp Applications of Grani
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
Mono is Dead
Hello Dark-Side C# (Part. 1)
C# 8.0 非同期ストリーム
An Internal of LINQ to Objects
The Usage and Patterns of MagicOnion
RuntimeUnitTestToolkit for Unity
動的なILの生成と編集
The History of Reactive Extensions
How to Make Own Framework built on OWIN
AWS + Windows(C#)で構築する.NET最先端技術によるハイパフォーマンスウェブアプリケーション開発実践
Photon Server Deep Dive - PhotonWireの実装から見つめるPhotonServerの基礎と応用
Metaprogramming Universe in C# - 実例に見るILからRoslynまでの活用例
Inside FastEnum
Introduction to NotifyPropertyChangedGenerator
.NET最先端技術によるハイパフォーマンスウェブアプリケーション
linq.js - Linq to Objects for JavaScript
基礎からのCode Contracts
Ad

Viewers also liked (19)

PPTX
Clash of Oni Online - VR Multiplay Sword Action
PDF
【Unite 2017 Tokyo】「黒騎士と白の魔王」にみるC#で統一したサーバー/クライアント開発と現実的なUniRx使いこなし術
PDF
DeclarativeSql
PDF
How to make the Fastest C# Serializer, In the case of ZeroFormatter
PPTX
RuntimeUnitTestToolkit for Unity(English)
PPTX
開発キックオフ時にマネージャが行うべき11のこと ~Visual Studio Online & TFS 使い始めと HOME 画面の構成
PDF
[data analytics showcase] A12: データに隠された課題、ちゃんと見えていますか? by Tableau Japan 株式会社 ...
PDF
「ずいぶんとダサいライティングを使っているのね」〜UniRxを用いた物理ベースライティング制御〜
PDF
Xamarin 概要 @ 「Xamarin」って何? Wエバンジェリストによる特濃「Xamarin」勉強会 Rev2
PDF
Interactive UI with UniRx
PPTX
若輩エンジニアから見たUniRxを利用したゲーム開発
PPTX
はじめてのUniRx
PDF
Binary Reading in C#
KEY
ノンデザイナーのための配色理論
PPT
色彩センスのいらない配色講座
PDF
見やすいプレゼン資料の作り方 - リニューアル増量版
PDF
C#次世代非同期処理概観 - Task vs Reactive Extensions
PDF
PyQtではじめるGUIプログラミング
PDF
History & Practices for UniRx(EN)
Clash of Oni Online - VR Multiplay Sword Action
【Unite 2017 Tokyo】「黒騎士と白の魔王」にみるC#で統一したサーバー/クライアント開発と現実的なUniRx使いこなし術
DeclarativeSql
How to make the Fastest C# Serializer, In the case of ZeroFormatter
RuntimeUnitTestToolkit for Unity(English)
開発キックオフ時にマネージャが行うべき11のこと ~Visual Studio Online & TFS 使い始めと HOME 画面の構成
[data analytics showcase] A12: データに隠された課題、ちゃんと見えていますか? by Tableau Japan 株式会社 ...
「ずいぶんとダサいライティングを使っているのね」〜UniRxを用いた物理ベースライティング制御〜
Xamarin 概要 @ 「Xamarin」って何? Wエバンジェリストによる特濃「Xamarin」勉強会 Rev2
Interactive UI with UniRx
若輩エンジニアから見たUniRxを利用したゲーム開発
はじめてのUniRx
Binary Reading in C#
ノンデザイナーのための配色理論
色彩センスのいらない配色講座
見やすいプレゼン資料の作り方 - リニューアル増量版
C#次世代非同期処理概観 - Task vs Reactive Extensions
PyQtではじめるGUIプログラミング
History & Practices for UniRx(EN)
Ad

Similar to What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの原理原則 (20)

PDF
LINQ in Unity
PDF
CEDEC 2018 最速のC#の書き方 - C#大統一理論へ向けて性能的課題を払拭する
PPTX
Visual Studio による開発環境・プログラミングの進化
PPTX
C#メタプログラミング概略 in 2021
PPTX
C# 式木 (Expression Tree) ~ LINQをより深く理解するために ~
PDF
Linq To Fun
PPTX
メタな感じのプログラミング(プロ生 + わんくま 071118)
PDF
基礎から見直す ASP.NET MVC の単体テスト自動化方法 ~ Windows Azure 関連もあるかも~
PPTX
Deep Dive C# 6.0
PDF
[TL06] 日本の第一人者が C# の現状と今後を徹底解説! 「この素晴らしい C# に祝福を!」
PDF
Tddbc岡山LT
PDF
MlnagoyaRx
PDF
VS勉強会 .NET Framework 入門
PDF
テスト駆動開発の進化
PDF
C#勉強会 ~ C#9の新機能 ~
PPTX
Visual Studio 2008による 開発環境・プログラミングの進化
PPTX
C#/.NETがやっていること 第二版
PDF
Why Reactive Matters #ScalaMatsuri
PDF
Eclipse PDT + MakeGoodによるPHPコードのテスト
PDF
MlnagoyaRx02
LINQ in Unity
CEDEC 2018 最速のC#の書き方 - C#大統一理論へ向けて性能的課題を払拭する
Visual Studio による開発環境・プログラミングの進化
C#メタプログラミング概略 in 2021
C# 式木 (Expression Tree) ~ LINQをより深く理解するために ~
Linq To Fun
メタな感じのプログラミング(プロ生 + わんくま 071118)
基礎から見直す ASP.NET MVC の単体テスト自動化方法 ~ Windows Azure 関連もあるかも~
Deep Dive C# 6.0
[TL06] 日本の第一人者が C# の現状と今後を徹底解説! 「この素晴らしい C# に祝福を!」
Tddbc岡山LT
MlnagoyaRx
VS勉強会 .NET Framework 入門
テスト駆動開発の進化
C#勉強会 ~ C#9の新機能 ~
Visual Studio 2008による 開発環境・プログラミングの進化
C#/.NETがやっていること 第二版
Why Reactive Matters #ScalaMatsuri
Eclipse PDT + MakeGoodによるPHPコードのテスト
MlnagoyaRx02

More from Yoshifumi Kawai (12)

PDF
A quick tour of the Cysharp OSS
PDF
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
PDF
Building the Game Server both API and Realtime via c#
PDF
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現
PDF
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー
PDF
Implements OpenTelemetry Collector in DotNet
PDF
Deep Dive async/await in Unity with UniTask(EN)
PDF
True Cloud Native Batch Workflow for .NET with MicroBatchFramework
PDF
Memory Management of C# with Unity Native Collections
PDF
Deep Dive async/await in Unity with UniTask(UniRx.Async)
PDF
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...
PDF
LINQPad with LINQ to BigQuery - Desktop Client for BigQuery
A quick tour of the Cysharp OSS
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
Building the Game Server both API and Realtime via c#
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー
Implements OpenTelemetry Collector in DotNet
Deep Dive async/await in Unity with UniTask(EN)
True Cloud Native Batch Workflow for .NET with MicroBatchFramework
Memory Management of C# with Unity Native Collections
Deep Dive async/await in Unity with UniTask(UniRx.Async)
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...
LINQPad with LINQ to BigQuery - Desktop Client for BigQuery

What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの原理原則