Nim,A new approach to meta programming
approach to meta programming Author: Andreas Rumpf A new approach to metaprogramming Copyright © 2013 Andreas Rumpf Talk structure 1.What is Nimrod? 2.Implementation aspects 3."Hello World" 4.Meta programming "Hello World" via term rewriting macros 6.Hoisting via term rewriting macros 7.Summary of Nimrod's meta programming features Talk structure Copyright © 2013 Andreas Rumpf What is Nimrod? What is Nimrod cast[int](gch.stackBottom) • with a clean syntax iterator from1to2(): int = yield 1; yield 2 • and strong meta programming capabilities. template `!=`(x, y: expr): expr = not (x == y) What is Nimrod? Copyright0 码力 | 45 页 | 360.68 KB | 1 年前3Template-Less Meta-Programming
1 / 58Template Metaprogramming (TMP) Template Metaprogramming (TMP) templateusing meta_fun = this_talk ; 2 / 58❓static_assert(Template::Metaprogramming::is_hard); // ✔ 3 / 58❓s Value-based TMP ( - Value-based TMP ( *, *, *)*) - - (Circle-lang meta model*) (Circle-lang meta model*) - - (comptime) (comptime) - ... - ... * - this_talk * - this_talk C++ template inline constexpr auto meta = type ::id; static_assert(meta == meta ); static_assert(meta != meta ); static_assert(typeid(meta ) == typeid(meta )); 16 / 58Value-based 0 码力 | 130 页 | 5.79 MB | 5 月前3How Meta Made Debugging Async Code Easier with Coroutines and Senders
0 码力 | 131 页 | 907.41 KB | 5 月前3Reflection Based Libraries to Look Forward To
implementation(s)! 2425We have a reflection operator! using namespace std::meta; auto magic_reflection_method(info obj) { .. do something with “meta” info .. } // ^Lift^ MyType to reflection land auto result = namespace ... 26We have a reflection operator! using namespace std::meta; auto magic_reflection_method(info obj) { .. do something with “meta” info .. } // ^^Lift^^ MyType to reflection land auto result 27We have a std::meta::info! using namespace std::meta; // std::meta::info with std::meta // associated namespace auto magic_reflection_method(info obj) .. do something with “meta” info .. } auto0 码力 | 118 页 | 14.33 MB | 5 月前3Beyond struct: Programming a Struct Replacement in C++20
John R. Bandela, MD Beyond struct: Meta- programming a struct Replacement in C++20Disclaimer This is not an official Google library These opinions are my ownStruct struct person { int id = 1; std::string wrappers in C++Let’s Go Beyond Struct u C++20 u No MacrosDefining and accessing members using Person = meta_struct< // member<"id", int>, // member<"name", std::string> // >; Person p; get<"id">(p) - 1>;Meta Struct templatestruct member { constexpr static auto tag() { return Tag; } using element_type = T; T value; }; template struct meta_struct 0 码力 | 65 页 | 702.78 KB | 5 月前3Hadoop 迁移到阿里云MaxCompute 技术方案
....................................................................................... 28 6.4 Meta 和数据迁移 ........................................................................................... ......... 30 6.4.2 方案 A:通过 MMA Agent 迁移 Meta 和数据 ................................................................ 32 6.4.3 方案 B:使用 Dataworks 服务迁移 Meta 和数据 ....................................... .................... 45 7.1.3 运行 meta-carrier 收集 meta 信息 ................................................................................... 46 7.1.4 修改 meta-carrier 的输出,调整 hive 与 odps 的映射 .....0 码力 | 59 页 | 4.33 MB | 1 年前3peewee Documentation Release 2.10.2
Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database. Note Note that we named our model ForeignKeyField(Person, related_name='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses the "people.db" database Now that we have our models, let’s then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields (or columns) declaratively, like0 码力 | 275 页 | 276.96 KB | 1 年前3peewee Documentation Release 2.10.2
class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database. Note: Note that we named our model Person = ForeignKeyField(Person, related_name='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses the "people.db" database Now that we have our models, let’s connect then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields (or columns) declaratively, like django0 码力 | 221 页 | 844.06 KB | 1 年前3Scrapy 1.4 Documentation
/span>, ... <meta itemprop="datePublished" content="2011-04-01">April 1, 2011 ...... <meta itemprop="worstRating" span>, ... <meta itemprop="datePublished" content="2011-03-25">March 25, 2011 ...... <meta itemprop="worstRating" Request objects class scrapy.http.Request(url[, callback, method='GET', headers, body, cookies, meta, encoding='utf-8', priority=0, dont_filter=False, errback, flags]) A Request object represents an0 码力 | 394 页 | 589.10 KB | 1 年前3Scrapy 1.6 Documentation
callback for parsing the response • --meta or -m: additional request meta that will be passed to the callback request. This must be a valid json string. Example: –meta=’{“foo” : “bar”}’ • --pipelines: process itemprop="author">Ellie, ... <meta itemprop="datePublished" content="2011-04-01">April 1, 2011 ...... <meta itemprop="worstRating" itemprop="author">Lucas, ... <meta itemprop="datePublished" content="2011-03-25">March 25, 2011 ...... <meta itemprop="worstRating"0 码力 | 295 页 | 1.18 MB | 1 年前3共 1000 条- 1
- 2
- 3
- 4
- 5
- 6
- 100