hello.skr 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. (post
  2. :title "(display \"Hello, World!\")"
  3. :date (make-date* 2016 04 12 16 00)
  4. :tags '("hello")
  5. :slug "hello-world"
  6. (p [Hello everyone!
  7. Time to test the sanity of this system, yeah?])
  8. (p [So, this is the soft launch of the 8sync website.
  9. There's not ,(em [too much]) to see quite yet.
  10. I need to make a proper release, etc.])
  11. (p [But maybe you're wondering what this crazy 8sync thing is?
  12. Well, as the name implies, it's an asynchronous event loop
  13. (hence the pun, 8-synchronous... the logo has an infinity symbol...) for
  14. ,(anchor [GNU Guile] "http://www.gnu.org/software/guile/").
  15. If you're familiar with
  16. ,(anchor [Node.js] "https://nodejs.org/en/")
  17. for Javascript or
  18. ,(anchor [asyncio] "https://docs.python.org/3/library/asyncio.html")
  19. for Python, you might know a bit about what I mean by
  20. "asynchronous event loop".
  21. So, why bring another event loop into the world?])
  22. (p [Well, as things tend to go, I initially wrote 8sync largely for
  23. myself.
  24. I've spent enough time in other asynchronous systems to know that
  25. I'm just not very happy working in them.
  26. I knew I wanted a system with the following properties:])
  27. (ul
  28. (li (p [Absolutely no "callback hell".
  29. Asynchronous code is as easy to read as synchronous code.])
  30. (p [Most event loops end up with you chaining different event
  31. commands together manually and what in a synchronous program
  32. might be a strightforward piece of code gets very confusingly
  33. threaded across many pieces of code.
  34. I was inspired by asyncio's coroutine support, but hoped that I
  35. could achieve even better.
  36. asyncio requires that you very carefully "line up" coroutines
  37. so that they fit together.
  38. 8sync avoids this by making use of
  39. ,(anchor [delimited continuations]
  40. "https://www.gnu.org/software/guile/manual/html_node/Prompts.html")
  41. under the hood.
  42. However, most users will never have to learn how delimited
  43. continuations work, 8sync provides the (8sync) special form.
  44. Yay, abstractions!]))
  45. (li (p [Live hackable.
  46. I wanted a system that I could modify and play with while the
  47. system is running.
  48. No need to restart.
  49. I want my editor, my code, and my REPL all interconnected.
  50. So, 8sync has nice integration with
  51. ,(anchor [Geiser] "http://geiser.nongnu.org/") and
  52. ,(anchor [Emacs] "http://www.gnu.org/software/emacs/").
  53. (It's a bit dated, but I still find David Thompson's video of
  54. ,(anchor [live hacking in Sly]
  55. "https://dthompson.us/functional-reactive-programming-in-scheme-with-guile-2d.html")
  56. to be a massive inspiration).]))
  57. (li (p [Ideally, in some kind of lisp.
  58. Well, I like lisps, but in a certain sense, this is
  59. ,(em [because]) of the above goals.
  60. Lisps tend to be well suited for "REPL driven development"
  61. and forging the syntax necessary to make solving problems
  62. easier.
  63. And I was spending a lot of time in Guile, so of course
  64. having something in Guile would be nice.])))
  65. (p [I had the good fortune at the FSF 30th anniversary party to sit
  66. down with Guile hackers David Thompson and Mark Weaver, and we
  67. ,(anchor [had a nice brainstorm about what a good asynchronous
  68. event loop in Guile might look like]
  69. "https://lists.gnu.org/archive/html/guile-devel/2015-10/msg00015.html").
  70. At the time I still assumed I would convince someone else to do
  71. the work, but then I started coding a mockup, and oh hey!
  72. The mockup started to turn into something pretty nice.
  73. And so, 8sync was born.])
  74. (p [So anyway, it's still early days for 8sync.
  75. Today is the launch of the 8sync site.
  76. Horray!
  77. (Happily, this site is built with David Thompson's
  78. ,(anchor [Haunt] "https://haunt.dthompson.us/"),
  79. which is a real delight to use!)
  80. And, as you can see, we're a GNU project, which is pretty cool.
  81. Hopefully sometime in the next few days, an official 8sync
  82. release will come out... 0.1!
  83. After that, I might end up doing more integration with some of
  84. the port refactoring work Andy Wingo is doing in Guile.
  85. At the very least, 8sync has demonstrated some good ideas,
  86. but there are some goofy things to clean up too
  87. (why are we using select instead of poll/epoll?).])
  88. (p [Lots to do!
  89. And so, hello world, it's nice to meet you.
  90. See you again soon!]))