Advertisement ยท 728 ร— 90

Posts by grace

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...

2 months ago 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...

2 months ago 20 4 4 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...

3 months ago 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

3 months ago 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

3 months ago 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...

4 months ago 1 0 0 0
Video

Happy Thanksgiving! ๐Ÿฆƒ

trygrace.dev?github=Gabri...

4 months ago 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

4 months ago 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

4 months ago 5 0 1 1
Advertisement
Grace browser Live demo for the Fall-from-Grace functional programming language

try this yourself here:

trygrace.dev?github=Gabri...

4 months ago 0 0 0 0
Video

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

4 months ago 4 0 1 1

hello world

4 months ago 18 6 0 1