Work
C#
Unity
Private
http://neue.cc/
@neuecc
using C
in 8 years
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
#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
#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回)
なので、一つ一つの機会を大事にして欲しい

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