Seu SlideShare está sendo baixado. ×

# How to make the calculator

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
TinyCLR OS on Wio LTE
Carregando em…3
×

1 de 18 Anúncio

# How to make the calculator

.NET Fringe Japan 2018 New Year Party
https://dotnetfringe-japan.connpass.com/event/74536/

.NET Fringe Japan 2018 New Year Party
https://dotnetfringe-japan.connpass.com/event/74536/

Anúncio
Anúncio

Anúncio

Anúncio

### How to make the calculator

1. 1. How to make the calculator .NET FRINGE JAPAN 2018 KOUJI MATSUI (@KEKYO2)
2. 2. 2 Kouji Matsui - kekyo • NAGOYA city, AICHI pref., JP • Twitter – @kekyo2 / Facebook • ux-spiral corporation • Microsoft Most Valuable Professional VS and DevTech 2015- • Certified Scrum master / Scrum product owner • Center CLR organizer. • .NET/C#/F#/IL/metaprogramming or like… • Bike rider CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI
3. 3. 3 Agenda • Introduction • Operator notations • Demo • Conclusion CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI
4. 4. 4 How bring up about the calculator? CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI HP16C (RPN)
5. 5. 5 Operator notations • Operator notation variation: CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI Polish notation (PN) “+ 123 456” Infix notation “123 + 456” Reverse polish notation (RPN) “123 456 +”
6. 6. 6 Operator notations • Polish notation (PN): • Operator first • Trailing two values and more CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI “+ 123 456” “* + 123 456 789”  123 + 456  (123 + 456) * 789
7. 7. 7 Operator notations CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI (* (+ 123 456) 789) (* (+ 123 456) (- 11 22)) “* + 123 456 789” “* + 123 456 - 11 22”
8. 8. 8 Operator notations • Parse and construct AST easier CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI “+ 123 456” + 123 456
9. 9. 9 Operator notations CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI AbstractNode OperatorNode ReducibleNode NumericNode ExpressionNodeReduce()
10. 10. 10 Operator notations CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI “+ 123 456” + 123 456OperatorNode NumericNode NumericNode ExpressionNode
11. 11. 11 Operator notations CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI + 123 456 “* + 123 456 789” * 789 ExpressionNode ExpressionNode • Nested nodes
12. 12. 12 Operator notations • Reduce() “Beta reduction” CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI + 123 456 * 789 return 123 return 456 return 123+456 return 789 return 579*789 456831
13. 13. 13 Demo CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI
14. 14. 14 CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI Making archive IL2C #6-52 2018.1.27 CENTER CLR VIDEO #6-52 .NET Fringe Japan 2018 New Year Party - Kouji Matsui (@kekyo2) 再放送
15. 15. 15 Between dotnet600 and fringe2018 • Will slow down (but better incremental development) • System.String turn to use UTF16LE • Take down concurrent GC support (bad) code elements. • Flow analyzer causes detecting bad path. • Flow path may constructs randomly. • Stack analyzer causes matching bad path. • Support derived class type and can handle virtual/abstract/override methods.  AbstractNode and ASTs • Tested on UEFI environments (The demo). CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI
16. 16. 16 Derived class type Current version not supported cast operator and exceptions. ◦ Transleted to C language: can’t detect invalid pointer conversion. Virtual methods: ◦ We have to support vtable/vptr or other technics. ◦ IL2C already has type-information structure. I use it storage by store function pointers into side-by-side. ◦ Lookup vtable at runtime (likely C++). CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI
17. 17. 17 Conclusion • Polish notation – easyway parsing expressions. • IL2C now UEFI, WDM, Win32, Arduino • We’ll be making IL2C on multi-platform • IL2C is under construction. • Primitive types. • String • Class / ValueType / Boxing • Polymorphism (by class) • GC (non concurrent) • P/Invoke (basic) CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI Playlist: http://bit.ly/2xtu4MH GitHub: https://github.com/kekyo/IL2C
18. 18. 18 Thank you joining my session!! • Become slides on slideshare and my blog entry. http://www.kekyo.net/ (Sorry blog only Japanese language) • My twitter account @kekyo2, follow <3 • GitHub https://github.com/kekyo/ contains: • IL2C, FusionTasks, RelaxVersioner, fscx and more… • Open conference with “Center CLR” in Aichi pref., Japan! Join us!! https://www.meetup.com/en-US/CenterCLR/ CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI