サクサク読よめて、アプリ限定げんていの機能きのうも多数たすう!
トップへ戻もどる
TGS2024
neue.cc
.NET 9 AlternateLookup によるC# 13時代じだいのUTF8文字もじ列れつの高速こうそくなDictionary参照さんしょう 2024-08-29 .NET 9 から辞書じしょ系けいのクラス、Dictionary, ConcurrentDictionary, HashSet, FrozenDictionary, FrozenSetに GetAlternateLookup<TKey, TValue, TAlternate>() というメソッドが追加ついかされました。今いままでDictionaryの操作そうさはTKey経由けいゆでしかできませんでした。それは当あたり前まえ、なのですが、困こまるのが文字もじ列れつキーで、これはstringでも操作そうさしたいし、ReadOnlySpan<char>でも操作そうさしたくなります。今いままではReadOnlySpan<char>しか手元てもとにない場合ばあいはToStringでstring化かが必須ひっすでした、ただたんにDictionaryの
Microsoft MVP for Developer Technologies(.NET)を再さい々々々々々々々々々々々々受賞じゅしょうしました 2024-07-11 Microsoft MVPは一いち年ねんごとに再さい審査しんさされるのですが、今年ことしも更新こうしんしました。2011年ねんから初はじめて14回かい目めということで、長ながい!のですが、引ひき続つづきC#の最前線さいぜんせんに立たち続つづけられていると思おもいます。以下いか、審査しんさ用よう書類しょるいに出だした、審査しんさ期間きかんでの実績じっせき一覧いちらんです。 OSS New MagicPhysX .NET PhysX 5 binding to all platforms(win, osx, linux) for 3D engine, deep learning, dedicated server of gaming. PrivateProxy Source Generator and .NET 8 UnsafeAccessor based high-p
ConsoleAppFramework v5 - ゼロオーバーヘッド・Native AOT対応たいおうのC#用ようCLIフレームワーク 2024-06-13 ConsoleAppFrameworkの完全かんぜんに新あたらしいバージョンをリリースしました。完全かんぜんに設計せっけいしなおして実装じっそうも完全かんぜんに作つくり直なおされた、何なにもかもが新あたらしいフレームワークになっています。設計せっけい指針ししんとして「Zero Dependency, Zero Overhead, Zero Reflection, Zero Allocation, AOT Safe」を掲かかげ、もちろん、他たを圧倒的あっとうてきに引ひき離はなすパフォーマンスを実現じつげんしています。 これはコールドスタートアップ・ウォームアップなしでのベンチマークとなっていて、CLIアプリケーションでの実際じっさいでの利用りように最もっとも即そくしたものだと考かんがえています。System.CommandLineと比較ひかくすれば280倍ばい!メモリアロケーション量りょうもほかのフレ
R3のコードから見みるC#パフォーマンス最適さいてき化か技法ぎほう実例じつれいとTimeProviderについて 2024-05-01 4/27に大阪おおさかで開催かいさいされたC#パフォーマンス勉強べんきょう会かいで「R3のコードから見みる実践じっせんLINQ実装じっそう最適さいてき化か・コンカレントプログラミング実例じつれい」という題だいでセッションしてきました! タイトル的てきにあまりLINQでもコンカレントでもなかったかな、とは思おもいますが、R3を題材だいざいに、具体ぐたい的てきなコードをもとにした最適さいてき化か技法ぎほうの紹介しょうかいという点てんでは面白おもしろみはあったのではないかと思おもいます。 Rxの定義ていぎ R3は、やや挑発ちょうはつ的てきな内容ないようを掲かかげていることもあり、R3は「Rxではない」みたいなことを言いわれることもあります。なるほど!では、そもそも何なにをもってRxと呼よぶのか、呼よべるのか。私わたしは「Push型がたでLINQ風ふうのオペレーターが適用てきようできればRx」というぐらいの温度おんど感かんで考かんがえています。もちろん、R3はそれを満みたしています。 mutable st
Redis互換ごかんの超ちょう高速こうそくインメモリデータストア「Garnet」にC# CustomCommandを実装じっそうしてコマンドを拡張かくちょうする 2024-03-19 MicrosoftからIntroducing Garnet – an open-source, next-generation, faster cache-store for accelerating applications and servicesという記事きじが今日きょう公開こうかいされて、Garnetという新あたらしいインメモリデータストアがOSSとして公開こうかいされました。Microsoft ResearchでFASTERを手掛てがけていたチームによるもので、FASTERはC#実装じっそうの高速こうそくなキーバリューストアでした。今回こんかいのGarnetはその発展形はってんけいのようなもので、FASTERベースのストレージと、Redis互換ごかんのプロトコルによる、インメモリデータストアになっています。詳くわしく
Claudia - Anthropic ClaudeのC# SDKと現代げんだい的てきなC#によるウェブAPIクライアントの作つくり方かた 2024-03-18 AI関連かんれん、競合きょうごうは現あらわれども、性能せいのう的てきにやはりOpenAI一いち強きょうなのかなぁというところに現あらわれたAnthropic Claude 3は、確たしかに明あきらかに性能せいのうがいい、GPT-4を凌駕りょうがしている……!というわけで大おおいに気きに入いった(ついでに最近さいきんのOpenAIのムーブが気きに入いらない)ので、C#で使つかい倒たおしていきたい!そこで、まずはSDKがないので非公式ひこうしきSDKを作つくりました。こないだまでプレビュー版ばんを流ながしていたのですが、今回こんかいv1.0.0として出だします。ライブラリ名めいは、Claudeだから、Claudiaです!.NET全般ぜんぱんで使つかえるのと、Unity(Runtime/Editor双方そうほう)でも動作どうさ確認かくにんをしているので、アイディア次第しだいで色々いろいろ活用かつようできると思おもいます。 GitHub - Cyshar
R3 - C#用ようのReactive Extensionsの新あたらしい現代げんだい的てき再さい実装じっそう 2024-02-27 先日せんじつ、新あたらしいC#用ようのReactive Extensionsの実装じっそうとしてR3を正式せいしき公開こうかいしました!R3はRx for .NETを第だい一いち世代せだい、UniRxを第だい二に世代せだいとした場合ばあいの、第だい三さん世代せだいのRxという意味いみで命名めいめいしています。Rxとしてのコア部分ぶぶん(ほぼdotnet/reactiveと同様どうよう)は.NET共通きょうつうのライブラリとして提供ていきょうし、各かくプラットフォーム特とく化かのカスタムスケジューラーやオペレーターは別べつライブラリに分わけるという形かたちにより、全すべての.NETプラットフォーム向むけのコアライブラリと、各種かくしゅフレームワーク Unity, Godot, Avalonia, WPF, WinForms, WinUI3, Stride, LogicLooper, MAUI, MonoGame 向むけの拡張かくちょうライブラリを提供ていきょうしています。 GitH
.NETプロジェクトとUnityプロジェクトのソースコード共有きょうゆう最新さいしん手法しゅほう 2024-01-15 MagicOnionのv6が先日せんじつリリースされました。 メジャーバージョンアップとして大おおきな違ちがいは、Cysharp/YetAnotherHttpHandlerを正式せいしきリリースし、これを通信つうしん層そうの標準ひょうじゅんライブラリ化かしました。インストール手順てじゅんも複雑ふくざつで、サポートも切きれていたgRPC C-Coreとはさようならです。正式せいしきリリースにあたってプレビューに存在そんざいしていたクラッシュ問題もんだいなどが解消かいしょうされています。 もう一ひとつはクライアント生成せいせいにおいてコマンドラインツールが削除さくじょされ、Source Generatorベースになりました。 [MagicOnionClientGeneration(typeof(MyApp.Shared.Services.IGreeterService))] partial class MagicOnio
ZLogger v2 による .NET 8活用かつよう事例じれい と Unity C# 11対応たいおうの紹介しょうかい 2023-12-19 C#用ようの新あたらしい超ちょう高速こうそく&低ていアロケーションの.NET用ようロギングライブラリ、ZLogger v2を公開こうかいしました。v1からは何なにもかもを完全かんぜんに作つくり替かえた、最新さいしんのC#に合あわせた新しん設計せっけいになっています。対応たいおうプラットフォームは.NET 8が最良さいりょうですが .NET Standard 2.0 以上いじょう、また Unity 2022.2 以上いじょうにも対応たいおうしています。.NET / Unityどちらもテキストメッセージと構造こうぞう化かログの両方りょうほうに対応たいおうしています。 Cysharp/ZLogger 新しん設計せっけいのキーポイントはString Interpolationの全面ぜんめん採用さいようによるクリーンなシンタックスとパフォーマンスの両立りょうりつです。 logger.ZLogInformation($"Hello my name is {name}, {ag
他た言語げんごがメインの場合ばあいのRustの活用かつよう法ほう - csbindgenによるC# x Rust FFI実践じっせん事例じれい 2023-10-23 Rust.Tokyo 2023というRustのカンファレンスで、「他た言語げんごがメインの場合ばあいのRustの活用かつよう法ほう - csbindgenによるC# x Rust FFI実践じっせん事例じれい」と題だいしてcsbindgen周まわりの話はなしをしてきました。 タイトルが若干じゃっかんかなり回まわりっくどい雰囲気ふんいきになってしまいましたが、Rustのカンファレンスということで、あまりC#に寄より過すぎないように、という意識いしきがあったのですが、どうでしょう……? 会場かいじょうでの質問しつもん含ふくめて何なん点てんかフォローアップを。 FFIとパフォーマンス Rustは速はやい!FFIは速はやい!ということが常つねに当あてはまるわけでもなく、例たとえばGoのcgoはかなり遅おそいという話はなしがあったりします。Why cgo is slow @ CapitalGo 2018。このことは直じき
UTF8文字もじ列れつ生成せいせいを最適さいてき化かするライブラリ Utf8StringInterpolation を公開こうかいしました 2023-10-13 Utf8StringInterpolationという新あたらしいライブラリを公開こうかいしました!UTF8文字もじ列れつの生成せいせいと書かき込こみに特とく化かしていて、動作どうさをカスタマイズした文字もじ列れつ補間ほかん式しきによるC#コンパイラの機能きのうを活用かつようした生成せいせいと、StringBuilder的てきな連続れんぞく的てきな書かき込こみの両方りょうほうをサポートします。 Cysharp/Utf8StringInterpolation 基本きほん的てきな流ながれはこんな感かんじで、Stringを生成せいせいするのと同おなじように、UTF8を生成せいせい/書かき込こみできます。 using Utf8StringInterpolation; // Create UTF8 encoded string directly(without encoding). byte[] utf8 = Utf8String
PrivateProxyというライブラリを公開こうかいしました。つまるところ、privateフィールド/プロパティ/メソッドにアクセスするライブラリなのですが、.NET 8 のUnsafeAccessorという新しん機能きのうを活用かつようすることでNo Reflection、ハイパフォーマンス、AOTセーフになっています。 Cysharp/PrivateProxy もちろん .NET 8 でしか動うごきません!ので、.NET 8が正式せいしきリリースされた頃ころに思おもい出だして使つかってみてください。エクストリームな人ひとは今いますぐ試ためしましょう。 雰囲気ふんいきとしては、privateメンバーにアクセスしたい型がたがあったとして、[GeneratePrivateProxy(type)]をつけた型かたを用意よういします。 using PrivateProxy; public class Sample { int _field1; int PrivateAdd(int
Cysharpから(主おもに)Unity用ようのHTTP/2, gRPC, MagicOnion用ようの通信つうしんネットワーククライアントを公開こうかいしました。実装じっそう者しゃは週刊しゅうかん.NET情報じょうほう配信はいしんWeekRef.NETを運営うんえいしている@mayukiさんです。 Cysharp/YetAnotherHttpHandler 何故なぜこれが必要ひつようなのかの背景はいけい情報じょうほうとしては、Synamon’s Engineer blog - Unityでもgrpc-dotnetを使つかったgRPCがしたい が詳くわしいのですが、まず、.NETには2つのgRPC実装じっそうがあります。googleが提供ていきょうしてきたgRPCのネイティブバインディングのGrpc.Core(C-Core)と、Microsoftが提供ていきょうしているPure C#実装じっそうのgrpc-dotnet。現在げんざい.NETのgRPCはサーバーもクライアントも完全かんぜんにPure C#実装じっそうのほうに寄よっていて、MagicOnionもサー
MagicPhysXというライブラリを新あたらしく公開こうかいしました!.NETで物理ぶつりエンジンを動うごかすというもので、その名なの通とおり、NVIDIA PhysX のC#バインディングとなっています。 Cysharp/MagicPhysX 使つかい道みちとしては GUIアプリケーションの3D部分ぶぶん 自作じさくゲームエンジンへの物理ぶつりエンジン組くみ込こみ ディープラーニングのためのシミュレーション リアルタイム通信つうしんにおけるサーバーサイド物理ぶつり といったことが考かんがえられます。 .NET用ようのPhysXバインディングは他ほかにも存在そんざいしますが、C++/CLIでバインディングを生成せいせいしている都合つごう上じょうWindowsでしか動うごかせなかったり、バージョンが最新さいしんではない4.xベースだったりしますが、MagicPhysXは最新さいしんのPhysX 5ベースで、かつ、Windows, MacOS, Linuxの全すべてで動うごきます!(win-x64, osx-x64, osx-arm
ネイティブコードとC#を透過とうか的てきに接続せつぞくするために、RustのFFIからC#のDllImportコードを自動じどう生成せいせいするライブラリを作成さくせいし、公開こうかいしました。Cysharp初はつのRustライブラリです!先週せんしゅうにプレビューを出だしていましたが、しっかりした機能きのう強化きょうかとReadMeの充実じゅうじつをして正式せいしき公開こうかい、です! Cysharp/csbindgen crates.io/crates/csbindgen めちゃくちゃスムーズにネイティブコードがC#から呼よべるようになります。すごい簡単かんたんに。超ちょう便利べんり。こりゃもうばんばんネイティブコード書かきたくなりますね……!ただし書かくコードはRustのみ対応たいおうです。いや、別べつにRustでいいでしょ、Rustはいいぞ……! しかしまず前提ぜんていとして言いっておくと、ネイティブコードは別べつに偉えらくもなければ、必かならず速はやいというわけでもないので、極力きょくりょく書かくのはやめましょう。C#で書かくべき、です。高速こうそくなコードが欲ほしければ
ついこないだのStructureOfArraysGenerator - C#でSoAを簡単かんたんに利用りようするためのSource Generatorは、SoAになってるとSIMDを適用てきようしやすいよ、という話はなしだったのですが、そもそもSIMD手書てがきはカジュアルにやらないし、気合きあい入いれてSIMD書かくシチュエーションなら構造こうぞうも気合きあい入いれて専用せんように設計せっけいするよなぁ。と、なると、カジュアルにSIMD使つかえるライブラリが必要ひつようで、まぁLINQですね、と。 Cysharp/SimdLinq これを入いれると別べつにSoA関係かんけいなく、SIMDが適用てきようできる状態じょうたい(例たとえばint[]にSum)だと、自動的じどうてきにSIMDが適用てきようされるようになります。そして、実際じっさいめちゃくちゃ速はやい。 SIMDとLINQの組くみ合あわせが威力いりょくを発揮はっきするというのは、別べつに新あたらしいことではなく、そもそも .NET 7でもPerformance Improvements in .NET
最近さいきんはSource Generatorブームが続つづいていて、去年きょねん末まつに2022年ねんのC# (Incremental) Source Generator開発かいはつ手法しゅほうという記事きじを出だしましたが、まずは今年ことし第だい一いち弾だんのSource Generatorライブラリです。 github.com/Cysharp/StructureOfArraysGenerator これは何なにかというと、structure of arrays(SoA)を使つかいやすくするためのコードを生成せいせいするというものです。まずそもそもSoAですが、WikipediaのAoS and SoAという記事きじによるところ(日本語にほんご版ばんはない)、CPUキャッシュを有効ゆうこう活用かつようしたりSIMDを適用てきようさせやすくなる構造こうぞうだよ、と。通常つうじょうC#の配列はいれつはarray of structures(AoS)になります。 上うえの通常つうじょうの配列はいれつがAoSでXYZXYZXYZXYZといったように並ならんでいる構造こうぞうで
このブログでもSource GeneratorやAnalyzerの開発かいはつ手法しゅほうに関かんしては定期ていき的てきに触ふれてきていて、新しんしめだと 2020/12/15 - UnitGenerator - C# 9.0 SourceGeneratorによるValueObjectパターンの自動じどう実装じっそうとSourceGenerator実装じっそうTips 2021/05/07 - 2021年ねんのC# Roslyn Analyzerの開発かいはつ手法しゅほう、或あるいはUnityでの利用りよう法ほう という記事きじを出だしていますが、今回こんかい MemoryPack の実装じっそうで比較的ひかくてき大だい規模きぼにSource Generatorを使つかってみたことで、より実践じっせん的てきなノウハウが手てに入はいりました。また、開発かいはつ環境かんきょうも年々ねんねん良よくなっていることや、Unityのサポート状じょう況きょうも強化きょうかされているので、状況じょうきょうを一いち通とおりまとめてみようと思おもいました。Source Generatorは非常ひじょうに強力きょうりょくで、今後こんご必須ひっすの開発かいはつ技法ぎほうになるので
と題だいして、.NET Conf 2022 Recap Event Tokyo というイベントで話はなしてきました。 今回こんかいは久々ひさびさの(数すう年ねんぶりの!)オフライン登壇とうだんイベントということで、なんだか新鮮しんせんな気分きぶんで、そして実際じっさい、オンライン登壇とうだんよりも目めの前まえにオーディエンスがいたほうがいいなぁという思おもいを新あらたに。事前じぜんレコーディングやオンライン登壇とうだんだと、どうしてもライブ感かんのない、冷さめた感かんじになっちゃうな、と。セッション単体たんたいの完成かんせい度どで言いったら何なん度ども取とり直なおして完璧かんぺきに仕上しあげた事前じぜん録画ろくがのほうがいい、かもしれませんが、でもそういうもんじゃあないかなあ、と。スタジオアルバムとライブアルバムみたいなもんですね。そしてスタジオアルバムに相当そうとうするのは念入ねんいりに書かかれたブログ記事きじとかだったりするので、事前じぜん録画ろくがのセッションって、なんか中途半端ちゅうとはんぱに感かんじてしまったりはしますね。スタジオライブみたいな。あれってなんかいまいちじゃないですか、そうい
MemoryPackという、C#に特とく化かすることで従来じゅうらいのシリアライザーとは比較ひかくにならないほどのパフォーマンスを発揮はっきする新あたらしいシリアライザーを新あたらしく開発かいはつしました。 高速こうそくなバイナリシリアライザーである MessagePack for C# と比較ひかくしても、通常つうじょうのオブジェクトでも数すう倍ばい、データが最適さいてきな場合ばあいは50~100倍ばいほどのパフォーマンスにもなります。System.Text.Jsonとでは全まったく比較ひかくになりません。当初とうしょは .NET 7 限定げんていとしてリリースしましたが、現在げんざいは .NET Standard 2.1(.NET 5, 6)やUnity、そしてTypeScriptにも対応たいおうしています。 シリアライザーのパフォーマンスは「データフォーマットの仕様しよう」と「各かく言語げんごにおける実装じっそう」の両輪りょうりんで成なり立たっています。例たとえば、一般いっぱん的てきにはバイナリフォーマットのほうがテキストフォーマット(JSONとか)よりも有利ゆうりですが、バイナリ
async/awaitの鬼門きもんの一ひとつとして、適切てきせつなキャンセル処理しょりが挙あげられます。別べつに基本きほん的てきにはそんな難むずかしいことではなく、CancellationTokenSourceを作つくる、CanellationTokenを渡わたす、OperationCanceledExceptionをハンドリングする。というだけの話はなしです。けれど、Tokenに手動しゅどうでコールバックをRegisterしたときとか、渡わたす口くちが空あいてないものに無理むりやりなんとかするときとか、タイムアウトに使つかった場合ばあいの始末しまつとか、ちょっと気きの利きいた処理しょりをしたいような場面ばめんもあり、そうした時ときにどうすれば良よいのか悩なやむこともあります。 こういうのはパターンと対応たいおうさえ覚おぼえてしまえばいい話はなしでもあるので、今回こんかいはAlterNatsの実装じっそう時じに直面ちょくめんしたパターンから、「外部がいぶキャンセル・タイムアウト・大元おおもとのDispose」が複ふく合あわされた状況じょうきょうでの処理しょりの記述きじゅつ方法ほうほうと、適切てきせつな例外れいがい処理しょり、そして最さい
タイトルはここぞとばかりに全ぜん盛もりにしてみました!今回こんかいNATSの.NETクライアント実装じっそうとしてAlterNatsというライブラリを新あたらしく作成さくせいし、公開こうかいしました。 github - Cysharp/AlterNats 公式こうしきの既存きそんクライアントの3倍ばい以上いじょう、StackExchange.RedisのPubSubと比較ひかくして5倍ばい以上いじょう高速こうそくであり、通常つうじょうのPubSubメソッドは全すべてゼロアロケーションです。 そもそもNATSとはなんぞやか、というと、クラウドネイティブなPubSubのミドルウェアです。Cloud Native Computing Foundationのincubating projectなので、それなりの知名度ちめいどと実績じっせきはあります。 PubSubというと、特とくにC#だとRedisのPubSub機能きのうで行おこなうのが、StackExchange.Redisという実績じっせきあるライブラリもあるし、AWSやAzure、GCP
Cygamesから4/1にリリースされたプリコネ!グランドマスターズのサーバーサイドとインフラ開発かいはつをCysharpが開発かいはつ協力きょうりょくしました。リアルタイム通信つうしんを含ふくむオートバトラー系けいのゲームです。 Cysharpはサーバー側がわのアーキテクチャ設計せっけいと基盤きばん実装じっそう、クラウドインフラ構築こうちく、一部いちぶサーバーロジック実装じっそうを担にないました。リアルタイム通信つうしん部分ぶぶんだけではなくてAPIサーバーからマッチメイキング、インフラまで、構成こうせいされるあらゆる要素ようそがC#で作つくられています! クライアント (Unity) API サーバー(MagicOnion) バトルエンジンサーバー (リアルタイム通信つうしん; MagicOnion, LogicLooper) マッチメイキングサーバー (リアルタイム通信つうしん; MagicOnion) バッチ(ConsoleAppFramework) デバッグ機能きのうサーバー (Web; Blazor) 管理かんり画面がめんサーバー (W
と、いうものをリリースしました。Web UIとなるDFrame.Controllerと、負荷ふかテストシナリオをC#で書かくDFrame.Workerの組くみ合あわせで成なり立たっていて、DFrame.Workerをウェブ上じょうのクラスターに配置はいちすることで(Controllerと接続せつぞくするただの常駐じょうちゅうアプリなので、配置はいち先さきはオンプレでもVMでもコンテナでもKuberenetesでもなんでもいい)、1から数すう千せんのワーカーが連動れんどうして、大量たいりょうのリクエストを発生はっせいさせます。また、テストシナリオをプレーンなC#で記述きじゅつできるということは、HTTP/1だけではなく、あらゆる種類しゅるいの通信つうしんをカバーできます。WebSocket、HTTP/2、gRPC、MagicOnion、あるいはPhotonや自作じさくのTCPトランスポート、更さらにはRedisやデータベースなどが対象たいしょうになります。 DFrame.Workerは通常つうじょうの.NETの他ほかに、Unityにも対たい
T valueから URLエンコードされたクエリストリング、またはx-www-form-urlencodedなHttpContentを生成せいせいする、つまりはウェブ(HTTP/1)リクエスト用ようのシリアライザを作つくりました。 github.com/Cysharp/WebSerializer クエリストリングの生成せいせい、意外いがいと面倒めんどうくさいな!と。(C#用ようの)専用せんようのSDKが存在そんざいしないWeb APIの場合ばあいは、自分じぶんでURL組くみ立たてたりFormUrlEncodedContentを組くみ立たてたりしますが、数かずが多おおいとまぁ面倒めんどうくさい。リクエストのパラメーター数すうが多おおいと、null抜ぬいたりも面倒めんどうくさい。 レスポンス側がわはReadFromJsonAsyncなどでダイレクトに変換へんかんできるようになって特とくに問題もんだいはないのですが、リクエスト側がわは、かなりの手作業てさぎょうが要求ようきゅうされます。そのへんを全部ぜんぶやってくれるrefitというライブラリもありますが(A
皆みなさん .NET 6で追加ついかされたMinimal API使つかってみました?最初さいしょは別べつにいらんやろ、とか思おもってたんですが、いや、これ正直しょうじきめっちゃ凄すごい、いい。まぁDelegateベースで書かくかどうかは別べつとして(書かかないかなー)、謎なぞStartupを葬ほうむり去ざってBuilder/Runが素直すなおに繋つながった形かたちが美うつくしい。Top level statementとの相性あいしょうも良よいので、もうこっちのAPI以外いがいで作つくる気きしないなあ。 さて、ところでConsoleAppFrameworkです。今いままでクラスが必要ひつようだったんですよね、たった一いち個このメソッドを実装じっそうするにも。それがTop level statementとの相性あいしょうが悪わるい。Top level statementだけで完結かんけつできるとき、クラスって作つくりたくないんですよね。と、いうわけで、そろそろ大だい改修かいしゅうが必要ひつようかなーと思おもっていたところにMinimal APIですよ。特とくにその場ばでラムダ式しきでばし
.NET 6 Advent Calendar 2021の12日にちの代理だいり投稿とうこうとなります。プレゼント付つきですと!?BALMUDA The Brew STARBUCKS RESERVE LIMITED EDITIONが欲ほしいです! さて、先程さきほどNativeMemoryArrayという新あたらしいライブラリを作成さくせいし、公開こうかいしました。.NET Standard 2.0でも動作どうさしますが、全体ぜんたい的てきに .NET 6 の新しんAPI群ぐん(NativeMemory, Scatter/Gather I/O)を活いかすための作つくりになっていますので、今回こんかいのAdvent Calendarにもピッタリ。実用じつよう性せいも、ある……!あります……!もちろんUnity版ばんも用意よういしてあります(NativeArrayと何なにが違ちがうって?まぁ違ちがうと言いえば違ちがいます)。 GitHub - Cysharp/NativeMemoryArray C#には配列はいれつ、特とくにbyte[]
C# Advent Calendar 2021の参加さんか記事きじとなっています。去年きょねんは2個こエントリーしたあげく、1個いっこすっぽかした(!)という有様ありさまだったので、今年ことしは反省はんせいしてちゃんと書かきます。 スクレイピングに関かんしては10年ねん前まえにC#でスクレイピング:HTMLパース(Linq to Html)のためのSGMLReader利用りよう法ほうという記事きじでSGMLReaderを使つかったやり方かたを紹介しょうかいしていたのですが、10年ねん前まえですよ、10年ねん前まえ!さすがにもう古臭ふるくさくて、現在げんざいではもっとずっと効率こうりつ的てきに簡単かんたんにできるようになってます。 今回こんかいメインで使つかうのはAngleSharpというライブラリです。AngleSharp自体じたいは2015年ねんぐらいからもう既すでに定番ていばんライブラリとして、日本にっぽんでも紹介しょうかい記事きじが幾いくつかあります。が、いまいち踏ふみ込こんで書かかれているものがない気きがするので、今回こんかいはもう少すこしがっつりと紹介しょうかいしていきたいと思おもっています。それと直近ちょっきんVisual
見みた目めはほとんど変かわっていませんが(とはいえ横よこ幅広はばひろくしたので印象いんしょうは結構けっこう変かわったかも)、このサイト、フルリニューアルしました。内部ないぶ構造こうぞうが。完全かんぜんに。別物べつものに。元々もともとはWordPressだったのですが、今回こんかいから自作じさくの静的せいてきサイトジェネレーターでhtmlを生成せいせいし、GitHub Pagesでホストするようにしました。元もとになるソース(.md)もGitHub上じょうに置おき、GitHub ActionsでビルドしてGitHub Pagesでホスティングされるという、完全かんぜんGitHub完結かんけつソリューション。また、記事きじを書かくエディタもGitHub web-based editor(リポジトリのトップで.を打うつと、VS Codeそのものが起動きどうするやつ)を利用りようすることで、非常ひじょうに快適かいてきで、というかMarkdownエディタとしては最高さいこう品質ひんしつのものが乗のっかっていて、たかがブログ書かくにしては面倒めんどうくさいPush/Pullもなくダイレクトコミッ
次つぎのページ
このページを最初さいしょにブックマークしてみませんか?
『neue cc』の新着しんちゃくエントリーを見みる
j次つぎのブックマーク
k前まえのブックマーク
lあとで読よむ
eコメント一覧いちらんを開ひらく
oページを開ひらく