Fable is a literary genre defined as a succinct fictional story, in prose or verse,[1] that features animals, legendary creatures, plants, inanimate objects, or forces of nature that are anthropomorphized, and that illustrates or leads to a particular moral lesson (a "moral"), which may at the end be added explicitly as a concise maxim or saying.
A fable differs from a parable in that the latter excludes animals,[2] plants, inanimate objects, and forces of nature as actors that assume speech or other powers of humankind.[3][4] Conversely, an animal tale specifically includes talking animals as characters.[5][6]
Usage has not always been so clearly distinguished. In the King James Version of the New Testament, "μῦθος" ("mythos") was rendered by the translators as "fable"[7] in the First Epistle to Timothy, the Second Epistle to Timothy, the Epistle to Titus and the First Epistle of Peter.[8]
The fable is one of the most enduring forms of folk literature, spread abroad, modern researchers agree,[11] less by literary anthologies than by oral transmission. Fables can be found in the literature of almost every country.[12][13]
African oral culture[16] has a rich story-telling tradition. As they have for thousands of years, people of all ages in Africa continue to interact with nature, including plants, animals and earthly structures such as rivers, plains, and mountains. Children and, to some extent, adults are mesmerized by good story-tellers when they become animated in their quest to tell a good fable.
The Anansi oral story originates from the tribes of Ghana. "All Stories Are Anansi's" was translated by Harold Courlander and Albert Kofi Prempeh and tells the story of a god-like creature Anansi who wishes to own all stories in the world.[17] The character Anansi is often depicted as a spider and is known for its cunning nature to obtain what it wants, typically seen outwitting other animal characters.[17]
Joel Chandler Harris wrote African-American fables in the Southern context of slavery under the name of Uncle Remus.[18] His stories of the animal characters Brer Rabbit, Brer Fox, and Brer Bear are modern examples of African-American story-telling, this though should not transcend critiques and controversies as to whether or not Uncle Remus was a racist or apologist for slavery. The Disney movie Song of the South introduced many of the stories to the public and others not familiar with the role that storytelling played in the life of cultures and groups without training in speaking, reading, writing, or the cultures to which they had been relocated to from world practices of capturing Africans and other indigenous populations to provide slave labor to colonized countries.
India has a rich tradition of fables, many derived from traditional stories and related to local natural elements. Indian fables often teach a particular moral.[19] In some stories the gods have animal aspects, while in others the characters are archetypal talking animals similar to those found in other cultures. Hundreds of fables were composed in ancient India during the first millennium BCE, often as stories within frame stories. Indian fables have a mixed cast of humans and animals. The dialogues are often longer than in fables of Aesop and often comical as the animals try to outwit one another by trickery and deceit. In Indian fables, humanity is not presented as superior to the animals. Prime examples of the fable in India are the Panchatantra and the Jataka tales. These included Vishnu Sarma's Panchatantra, the Hitopadesha, Vikram and The Vampire, and Syntipas' Seven Wise Masters, which were collections of fables that were later influential throughout the Old World. Ben E. Perry (compiler of the "Perry Index" of Aesop's fables) has argued controversially that some of the Buddhist Jataka tales and some of the fables in the Panchatantra may have been influenced by similar Greek and Near Eastern ones.[20] Earlier Indian epics such as Vyasa's Mahabharata and Valmiki's Ramayana also contained fables within the main story, often as side stories or back-story. The most famous folk stories from the Near East were the One Thousand and One Nights, also known as the Arabian Nights.
The Panchatantra is an ancient Indian assortment of fables. The earliest recorded work, ascribed to Vishnu Sharma, dates to around 300 BCE. The tales are likely much older than the compilation, having been passed down orally prior to the book's compilation. The word "Panchatantra" is a blend of the words "pancha" (which means "five" in Sanskrit) and "tantra" (which means "weave"). It implies weaving together multiple threads of narrative and moral lessons together to form a book.
In the 21st century, the Neapolitan writer Sabatino Scia is the author of more than two hundred fables that he describes as "western protest fables". The characters are not only animals, but also things, beings, and elements from nature. Scia's aim is the same as in the traditional fable, playing the role of revealer of human society. In Latin America, the brothers Juan and Victor Ataucuri Garcia have contributed to the resurgence of the fable. But they do so with a novel idea: use the fable as a means of dissemination of traditional literature of that place. In the book "Fbulas Peruanas" , published in 2003,[31] they have collected myths, legends, and beliefs of Andean and Amazonian Peru, to write as fables. The result has been an extraordinary work rich in regional nuances.[32]
Provides a collection of commonly used univariate and multivariate time series forecasting models including automatically selected exponential smoothing (ETS) and autoregressive integrated moving average (ARIMA) models. These models work within the 'fable' framework provided by the 'fabletools' package, which provides the tools to evaluate, visualise, and combine models in a workflow consistent with the tidyverse.
It seems like something that would be pretty commonly done, but I know that autoplot for these is meant to be pretty quick and dirty, so I don't know if it has that functionality. I looked through the fabletools github, but wasn't able to to find anything.
I like F# and somewhat dislike vanilla JavaScript. When I found out that you can write front-end using F#, I was perplexed. That's how I met Fable - a compiler which translates F# into JavaScript via Babel. There are already a plethora of different languages which can be converted into JavaScript. So, why choosing F# specifically?
This is not a tutorial about F#, so I want to suggest checking out the awesome fsharpforfunandprofit and you can decide for youself. But for me personally, F# is a very powerful, pragmatic, functional language which allows to write succinct, statically typed (bullet-proof!) code without any semantic noise.
I want to write front-end with statically-typed language. Today, TypeScript is standard de-facto if you want to write 'JavaScript-with-types'. But still, you must understand what exactly TypeScript brings to the table. You must be prepared mentally. If you're too accustomed to type-less (dynamic) code, migration to TypeScript will be painful. You must embrace the types and learn how to use them otherwise you will be writing the same old JavaScript.
For me, Fable was a rough start. It's a fresh technology and as F# is not that widespread in the wild (in comparison to JavaScript, TypeScript), information about Fable is scarce. The official example projects are not easy to comprehend when you just want to start simple. They usually involve some tinkering around.
In order to bootstrap a project you could use an official guide, but personally I'm not using that approach much. You will be redirected to fable2-sample repository, but it's not that convenient to navigate inside (as for my taste). There are a bunch of projects with different setup and it's hard to find a really 'empty' project. Even 'minimal' one is not that 'minimal' and contains Fable.React, Fable.Elmish.React dependencies. For a person who just want to start, it could be overwhelming.
In dotnet world we use dotnet new commands to start new projects. I would like to do the same with Fable, but there are no official templates. That's why I created templates project where you just type dotnet new fable-empty and an empty project without redundant dependencies is created.
In order for Fable to interop with JavaScript eco-system, we must ensure that all needed libraries are installed with npm. For such a simple example, we won't use many dependencies, just the core ones in order to start the dev server and run Fable compiler.
Very basic webpack config. All we need to know right now is that content will be served from ./public folder (must have index.html created there), server will be listening to port 8080 and the bundle.js (an app) will be generated in ./public folder.
In order to utilize the full power of Fable and F# we need to write some interop code to glue F# and JavaScript together. Our minimum job is to understand how to map JavaScript types to F# ones. We also can use some helpers in the form of TypeScript type definition files, more on that later.
In this tutorial we'll implement window.alert() (which is absent from Fable.Core), Math.random() (which exists in Fable.Core, but we'll implement it nonetheless and I'll show additionally how you can find what is implemented by default and what's not), a little bit of DOM API and p5.js lib.
Let's start with window.alert(). Firstly, we need to understand what we try to implement here. Is this a JavaScript library, a React component (heavily used in real Fable apps, but we won't touch it here) or maybe something global?
window is a global object in JavaScript. Next thing, what is alert() call actually do? Does it accept parameters? These questions are usually answered by comprehensive documentation. Let's open it and see how it can help. From docs, we see that alert function accepts one optional parameter of type string.
7fc3f7cf58