Remix.run Logo
middayc 2 days ago

When I am not working on my 'job' project, I am working on Ryelang.

In September, I was working on language core, console, generic methods, etc ... but this week I updated integration with OpenAI, IMAP, Surf (browser like client) and then I did few experiments by meshing together these libs.

These few lines proved to be quite helpful for my work email :)

    read-file: fn { f } { .Read .trim }
    line: "\n----\n"
    
    cli: imap-client read-file %.imap-user read-file %.imap-pwd "secure.emailsrvr.com" 993
    |Select-folder "INBOX"
    |Search-emails "UNSEEN SINCE 30-Sep-2025" :uids
    
    cli .Get-emails uids 
    |map { -> "text" } |join
    |concat3 line " Summarize the most important emails above and report them to me. Then separately report the most URGENT ones." :cmd

    oai: openai read-file %.oai-token
    oai .Chat\stream cmd { .prn }

I also tried to write/use these libs interactively: https://asciinema.org/a/745616

and made a "console applet": https://pbs.twimg.com/media/G2FXUepWgAAn7cu?format=jpg&name=...

... since you asked :)