grace's Avatar

grace

@trygrace.dev

the functional programming language for prompt engineering try the tutorial at trygrace.dev profile picture by @art.nekomimi.pet

39
Followers
1
Following
8
Posts
20.11.2025
Joined
Posts Following

Latest posts by grace @trygrace.dev

Preview
GitHub - Gabriella439/grace: A prompt engineering functional programming language A prompt engineering functional programming language - Gabriella439/grace

thank you for 500 stars ๐ŸŒŸ

github.com/Gabriella439...

22.01.2026 05:26 ๐Ÿ‘ 8 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
Type-safe eval in Grace The case for principled eval support

I wrote a post about a cool feature that's actually been in Grace for a while: type-safe eval

This feature also powers Grace's support for type-safe dynamic imports, a feature which had long been requested in Dhall

haskellforall.com/2026/01/type...

20.01.2026 16:11 ๐Ÿ‘ 19 ๐Ÿ” 4 ๐Ÿ’ฌ 3 ๐Ÿ“Œ 0
Preview
grace/examples/history.ffg at main ยท Gabriella439/grace A prompt engineering functional programming language - Gabriella439/grace

@trygrace.dev now supports chat history, meaning that the prompt keyword now supports a history argument, including support for System/Assistant/User messages

github.com/Gabriella439...

05.01.2026 02:57 ๐Ÿ‘ 4 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
ghci> increment <- load (Code "(input)" "\\x -> x + 1") :: IO (Natural -> IO Natural)

ghci> increment 3
4

ghci> generateNumbers <- load (Code "(input)" "\\key -> prompt{ key }") :: IO (Key -> IO [Natural])

ghci> generateNumbers key
[0,1,2,3,4,5,6,7,8,9]

ghci> generateNumbers key
[1,2,3,4,5,6,7,8,9,10]

ghci> increment <- load (Code "(input)" "\\x -> x + 1") :: IO (Natural -> IO Natural) ghci> increment 3 4 ghci> generateNumbers <- load (Code "(input)" "\\key -> prompt{ key }") :: IO (Key -> IO [Natural]) ghci> generateNumbers key [0,1,2,3,4,5,6,7,8,9] ghci> generateNumbers key [1,2,3,4,5,6,7,8,9,10]

You can now load Grace functions as Haskell functions

18.12.2025 20:27 ๐Ÿ‘ 19 ๐Ÿ” 3 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
# Grace supports "eval", meaning that you can import code from strings (even
# dynamic strings which depend on values in scope) and yet everything is still
# type-checked correctly and the compiler infers that the expression's type is:
#
#     Natural -> Natural

let one = 1

in  import read "\\x -> x + ${show one}"

# Grace supports "eval", meaning that you can import code from strings (even # dynamic strings which depend on values in scope) and yet everything is still # type-checked correctly and the compiler infers that the expression's type is: # # Natural -> Natural let one = 1 in import read "\\x -> x + ${show one}"

One cursed/blessed Grace feature that's not well known is that Grace supports type-safe eval

18.12.2025 18:23 ๐Ÿ‘ 13 ๐Ÿ” 2 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
{ "How are you feeling?": fold
    { "Hungry" { }: 'How hungry are you?'
        (fold{ succ text: "๐Ÿ˜‹" + text, zero: "" })
    , "Full" { }: 'Go get some rest'
        { }
    }
}

{ "How are you feeling?": fold { "Hungry" { }: 'How hungry are you?' (fold{ succ text: "๐Ÿ˜‹" + text, zero: "" }) , "Full" { }: 'Go get some rest' { } } }

editable version of the same form:

trygrace.dev?edit=true&gi...

27.11.2025 19:24 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Video thumbnail

Happy Thanksgiving! ๐Ÿฆƒ

trygrace.dev?github=Gabri...

27.11.2025 19:19 ๐Ÿ‘ 5 ๐Ÿ” 1 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Screenshot of Grace browser demo in dark mode with the following program:

\{ "OpenAI API key" } ->

import prompt{ key: .'OpenAI API key' }
    : { "Job Description": Text } -> { "Is Finance?": Bool, "Rationale": Text }

***

Inputs:

OpenAI API key: *******

Job Description: artist

Outputs:

Is Finance?: false

Rationale: The brief title 'artist' describes a creative/artistic role and does not indicate responsibilities related to accounting, financial analysis, investment, or other finance functions.

Screenshot of Grace browser demo in dark mode with the following program: \{ "OpenAI API key" } -> import prompt{ key: .'OpenAI API key' } : { "Job Description": Text } -> { "Is Finance?": Bool, "Rationale": Text } *** Inputs: OpenAI API key: ******* Job Description: artist Outputs: Is Finance?: false Rationale: The brief title 'artist' describes a creative/artistic role and does not indicate responsibilities related to accounting, financial analysis, investment, or other finance functions.

dark mode, too

26.11.2025 00:22 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Screenshot of Grace browser demo with the following program:

\{ "OpenAI API key" } ->

import prompt{ key: .'OpenAI API key' }
    : { "Job Description": Text } -> { "Is Finance?": Bool, "Rationale": Text }

***

Inputs:

OpenAI API key: *******

Job Description: artist

Outputs:

Is Finance?: false

Rationale: The brief title 'artist' describes a creative/artistic role and does not indicate responsibilities related to accounting, financial analysis, investment, or other finance functions.

Screenshot of Grace browser demo with the following program: \{ "OpenAI API key" } -> import prompt{ key: .'OpenAI API key' } : { "Job Description": Text } -> { "Is Finance?": Bool, "Rationale": Text } *** Inputs: OpenAI API key: ******* Job Description: artist Outputs: Is Finance?: false Rationale: The brief title 'artist' describes a creative/artistic role and does not indicate responsibilities related to accounting, financial analysis, investment, or other finance functions.

I got a makeover

26.11.2025 00:22 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1
Grace browser Live demo for the Fall-from-Grace functional programming language

try this yourself here:

trygrace.dev?github=Gabri...

21.11.2025 17:22 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Video thumbnail

you can now render any expression of mine using "export show"

21.11.2025 17:15 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1

hello world

20.11.2025 06:23 ๐Ÿ‘ 18 ๐Ÿ” 6 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1