Your SlideShare is downloading. ×
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
そうだ、bf処理系作ろう!もちろんSQLで!
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

そうだ、bf処理系作ろう!もちろんSQLで!

2,259

Published on

名古屋Reject会議での発表資料です。

名古屋Reject会議での発表資料です。

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,259
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. bf SQL bleis-tiftFebruary 26, 2011
  • 2. id:bleis-tift / @bleis
  • 3. id:bleis-tift / @bleis
  • 4. id:bleis-tift / @bleisSQL CTE
  • 5. id:bleis-tift / @bleisSQL CTE
  • 6. id:bleis-tift / @bleisSQL CTE
  • 7. SQL
  • 8. SQL
  • 9. SQL bf
  • 10. SQL bfPL/SQL T-SQL
  • 11. SQL bf PL/SQL T-SQLSELECT bf
  • 12. CTE
  • 13. CTE
  • 14. CTE
  • 15. CTE
  • 16. CTECommon Table Expression
  • 17. CTECommon Table ExpressionSQL99
  • 18. CTECommon Table ExpressionSQL99
  • 19. CTECommon Table ExpressionSQL99
  • 20. CTECommon Table ExpressionSQL99 SELECT
  • 21. SELECT *FROM (SELECT 1 AS n UNION ALL SELECT 3) T;
  • 22. SELECT *FROM (SELECT 1 AS n UNION ALL SELECT 3) T;13
  • 23. SELECT *FROM (SELECT 1 AS n UNION ALL SELECT 3) T;CTEWITH T(n) AS ( SELECT 1 UNION ALL SELECT 3)SELECT * FROM T;
  • 24. CTE
  • 25. CTECTE CTE
  • 26. CTECTE CTE SQL SELECT
  • 27. CTEWITH Hoge(n) AS ( SELECT 1 UNION ALL SELECT n + 1 FROM Hoge WHERE n < 3)SELECT * FROM Hoge;
  • 28. CTEWITH Hoge(n) AS ( SELECT 1 UNION ALL SELECT n + 1 FROM Hoge WHERE n < 3)SELECT * FROM Hoge;123
  • 29. bf
  • 30. bfBrainfuck
  • 31. bfBrainfuck
  • 32. bfBrainfuck
  • 33. bfBrainfuck
  • 34. bf CTE
  • 35. Ruby
  • 36. Ruby CTE
  • 37. Ruby CTE CTE
  • 38. Ruby CTE CTE CTE
  • 39. Ruby CTE CTE CTE
  • 40. Ruby CTE CTE CTE NE
  • 41. Ruby CTE CTE CTE NE
  • 42. WITH , Eval(id, array, ptr, input_pgm, crnt, stdout, stdin) AS ( Input(id, bf_program, stdin) AS ( SELECT SELECT 0, id>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++ , CAST(REPLICATE(CHAR(0), 5000) AS char(5000))++>-]<.>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]> , 1++++++++[<++++>-]<+.[-]++++++++++., , bf_program ) , 1, BracketTableSrc(id, open_bracket_pos, close_bracket_pos, stack, src, crnt) AS ( , CAST( AS nvarchar(max)) SELECT , stdin id FROM , 0 Input , 0 UNION ALL , CAST( AS varchar(max)) SELECT , bf_program id , 1 , CAST( FROM CASE SUBSTRING(input_pgm, crnt, 1) Input WHEN + THEN STUFF(array, ptr, 1, CHAR(ASCII(SUBSTRING(array, ptr, 1)) + 1)) UNION ALL WHEN - THEN STUFF(array, ptr, 1, CHAR(ASCII(SUBSTRING(array, ptr, 1)) - 1)) SELECT WHEN , THEN STUFF(array, ptr, 1, LEFT(stdin, 1)) id ELSE array , CASE LEFT(src, 1) END WHEN ] THEN CAST(LEFT(stack, CHARINDEX( , stack, 1)) AS int) AS char(5000)) ELSE 0 , CASE SUBSTRING(input_pgm, crnt, 1) END WHEN > THEN ptr + 1 , CASE LEFT(src, 1) WHEN < THEN ptr - 1 WHEN ] THEN crnt ELSE ptr ELSE 0 END END , input_pgm , CASE LEFT(src, 1) , CASE SUBSTRING(input_pgm, crnt, 1) WHEN [ THEN CAST(crnt AS varchar(4)) + + stack WHEN [ THEN CASE ASCII(SUBSTRING(array, ptr, 1)) WHEN ] THEN SUBSTRING(stack, CHARINDEX( , stack, 1) + 1, LEN(stack)) WHEN 0 THEN (SELECT close_bracket_pos FROM BracketTable ELSE stack WHERE Eval.id = BracketTable.id AND open_bracket_pos = crnt) + 1 END ELSE crnt + 1 , SUBSTRING(src, 2, LEN(src)) END , crnt + 1 WHEN ] THEN (SELECT open_bracket_pos FROM BracketTable FROM WHERE Eval.id = BracketTable.id AND close_bracket_pos = crnt) BracketTableSrc ELSE crnt + 1 WHERE END src <> , CASE SUBSTRING(input_pgm, crnt, 1) ) WHEN . THEN stdout + SUBSTRING(array, ptr, 1), BracketTable(id, open_bracket_pos, close_bracket_pos) AS ( ELSE stdout SELECT END id , CASE SUBSTRING(input_pgm, crnt, 1) , open_bracket_pos WHEN , THEN SUBSTRING(stdin, 2, LEN(stdin)) , close_bracket_pos ELSE stdin FROM END BracketTableSrc FROM WHERE Eval open_bracket_pos <> 0 WHERE AND close_bracket_pos <> 0 crnt <= LEN(input_pgm) ) ) , Result(id, stdout) AS ( SELECT id , stdout FROM Eval P WHERE crnt = (SELECT MAX(crnt) FROM Eval C WHERE P.id = C.id) ) SELECT * FROM Result ORDER BY id OPTION (MAXRECURSION 0)
  • 43. Q.
  • 44. Q.A.
  • 45. Q.A.
  • 46. Q.A.
  • 47. Q.A.
  • 48. SQL

×