Fudgets

{{Infobox software

| name = Fudgets

| logo =

| screenshot =

| screenshot alt =

| caption =

| author = Thomas Hallgren,
Magnus Carlsson

| released = {{Start date and age|1993|06}}

| latest release version = 0.18.4

| latest release date = {{Start date and age|2023|06}}

| latest preview version =

| latest preview date =

| programming language = Haskell

| operating system = POSIX compatible: Unix, Unix-like, Linux, macOS via XQuartz

| platform = IA-32, x86-64

| size =

| language = English

| genre = GUI toolkit

| license = freeware non-commercial

}}

In computing, Fudgets is a graphical user interface toolkit for the functional programming language Haskell and the X Window System.{{Cite book |last1=Hallgren |first1=Thomas |last2=Carlsson |first2=Magnus |date=1995 |title=Advanced Functional Programming |chapter=Programming with Fudgets |editor1-last=Jeuring |editor1-first=Johan |editor2-last=Meijer |editor2-first=Erik |chapter-url=https://link.springer.com/chapter/10.1007/3-540-59451-5_5 |series=Lecture Notes in Computer Science |volume=925 |language=en |location=Berlin, Heidelberg |publisher=Springer |pages=137–182 |doi=10.1007/3-540-59451-5_5 |isbn=978-3-540-49270-2}}{{Cite book |last1=Reid |first1=Alastair |date=1994 |chapter=Implementing Fudgets with Standard Widget Sets |url=https://doi.org/10.1007/978-1-4471-3236-3_18 |title=Functional Programming, Glasgow 1993: Proceedings of the 1993 Glasgow Workshop on Functional Programming, 5–7 July 1993 |place=Ayr, Scotland |pages=222–235 |editor1-last=O’Donnell |editor1-first=John T. |last2=Singh |first2=Satnam |editor2-last=Hammond |editor2-first=Kevin |access-date=2023-10-26 |series=Workshops in Computing |publication-place=London |publisher=Springer |language=en |doi=10.1007/978-1-4471-3236-3_18 |isbn=978-1-4471-3236-3}} Fudgets makes it easy to create client–server model applications that communicate via the Internet.

Most of the work on Fudgets was done in 1991-1996 by Thomas Hallgren and Magnus Carlsson.{{Cite web |last1=Hallgren |first1=Thomas |last2=Carlsson |first2=Magnus |date=June 6, 2023 |title=Fudgets Home Page |url=http://www.altocumulus.org/Fudgets/ |access-date=October 25, 2023 |website=altocumulus.org}}

The authors claim that many of the advantages of Fudgets come from it being programmed in a lazy functional programming language.{{Cite book |last1=Carlsson |first1=Magnus |last2=Hallgren |first2=Thomas |date=1993-07-01 |title=Proceedings of the conference on Functional programming languages and computer architecture |chapter=Fudgets: A graphical user interface in a lazy functional language |chapter-url=https://dl.acm.org/doi/10.1145/165180.165228 |language=en |publisher=ACM |pages=321–330 |doi=10.1145/165180.165228 |isbn=978-0-89791-595-3|s2cid=9943994}}

The main entity of toolkit is fudget (implemented on low level through stream processors) which has its own input and output.{{Cite journal |last1=Burton |first1=F. Warren |date=1999 |title=Advanced Functional Programming: Lecture Notes in Computer Science 925 edited by Johan Jeuring and Erik Meijer, Springer-Verlag, 1995. |url=https://www.cambridge.org/core/journals/journal-of-functional-programming/article/advanced-functional-programming-lecture-notes-in-computer-science-925-edited-by-johan-jeuring-and-erik-meijer-springerverlag-1995/F1EEA48458E15F0D5929E41543BB2848 |journal=Journal of Functional Programming |language=en |volume=9 |issue=1 |pages=105–111 |doi=10.1017/S0956796899223246 |issn=1469-7653|url-access=subscription }} Fudgets can be composed in parallel or sequence, yielding new fudget which can be used in code as any other fudget.

Example

factorialF = stdoutF >==< mapF (show . factorial . read) >==< stdinF

factorial :: Integer -> Integer

factorial n = product [1..n]

The code is self-describing considering that >==< is sequential fudget plumbing and mapF is fudget that takes a function of one argument and makes a fudget which output is input applied to that function. Fudget composition must be read from right to left, as a simple function composition. Now you can simply write:

main = fudlogue factorialF

compile and run. For every given integer value it will print its factorial.

License

The software license of Fudgets claims that this software is freeware for non-commercial use only.

References

{{Reflist}}