The birds have vanished down the sky.
Now the last cloud drains away.
We sit together, the mountain and me,
until only the mountain remains.
Zazen on Ching-t’ing Mountain
A Cryptol major mode for Emacs.
Home Page: https://www.cryptol.net
License: GNU General Public License v3.0
The birds have vanished down the sky.
Now the last cloud drains away.
We sit together, the mountain and me,
until only the mountain remains.
Zazen on Ching-t’ing Mountain
#14 only dealt with Cryptol 1, but Cryptol 2 is trickier to support as it doesn't yet support the -c
command line option.
We don't support Emacs 23 because it doesn't provide prog-mode
. We should just derive from fundamental-mode
instead I think.
I have an incoming patch for this; the ticket is just for tracking.
M-; doesn't presently work the way I'd expect.
Expected behavior: I highlight a bit of text, and M-; comments it out
Observed behavior: I'm prompted for a comment syntax, after which M-; works.
Given a function definition, it'd be excellent if we could insert the functions inferred type signature much like haskell-mode
and ghc-mod
can.
This should be fairly simple in principle by invoking the compiler and just asking for the type (ghc-mod
gets the benefit of being integrated via the GHC API;) for example (by default this will do bit
interpretation, supporting all of Cryptol):
$ cat > test.cry
zip (a,b) = [| (x,y) || x <- a || y <- b |];
$ cryptol -qns test.cry -c ":type zip"
zip : {a b c d} ([a]b,[c]d) -> [min(a,c)](b,d)
$
Or:
$ cryptol -qns test.cry -c ":type dkatest"
dkatest : {ks bs n} (fin bs) => ({decrypt : ([ks],[bs]) -> [bs];
encrypt : ([ks],[bs]) -> [bs]},
[n]([ks],[bs],[bs])) -> [n]([bs],Bit)
Another question is what keybinding should be used. I am actually partial to M-t
, which I picked up as a habit from ghc-mod. The original C-u C-c C-t
used by haskell-mode
could also work as well, but it's a bit longer. :)
This might be complicated due to the fact I don't know how to get the Isabelle theories publicly; Galois must provide them.
When launching the REPL in cryptol-mode on a new file, I get the following errors:
_ _
___ _ __ _ _ _ __ | |_ ___ | |
/ __| '__| | | | '_ \| __/ _ \| |
| (__| | | |_| | |_) | || (_) | |
\___|_| \__, | .__/ \__\___/|_|
|___/|_| version 2.1.0 (faab3ae)
�]0;cryptol��]0;cryptol�[error] can't find file: /Users/dchristiansen/tmp/Test.cry
cryptol>
cryptol>
Process cryptol finished
xo _ _
___ _ __ _ _ _ __ | |_ ___ | |
/ __| '__| | | | '_ \| __/ _ \| |
| (__| | | |_| | |_) | || (_) | |
\___|_| \__, | .__/ \__\___/|_|
|___/|_| version 2.1.0 (faab3ae)
�]0;cryptol��]0;cryptol�Parse error at 3:1, unexpected end of input
cryptol>
Github isn't showing the ^G characters that are also in it. Shouldn't these be stripped out?
Open A.cry
and then do C-c C-l
to load the REPL. Then open B.cry
and do C-c C-l
again - and only A.cry
remains loaded in the REPL.
We should keep track of what file is currently loaded at the REPL and reload it when we switch buffers.
Includes things like C, SBV, VHDL, etc.
This is not directly related to the compiler tickets; this is only for quickly switching, since users might want to switch to refine theories in other backends.
This also might just be an easy stop gap to provide users now, and later we use it to switch mode+invoke compiler all at once easily.
On my Ubuntu 12.10 machine, cryptol-mode
is broken due to (I believe) incorrectly detected $TERM
settings. When you launch the terminal, any keystrokes will cause cryptol
to immediately exit. This is obviously a very bad bug.
Launching the REPL on my OS X machine Emacs correctly seems to set $TERM
to dumb
, and the REPL works just fine for playing around. It also does this for Linux, but it seems as if terminfo
(which the cryptol
executable is linked to) always reports that it cannot find the dumb
mode despite having all the prerequisite packages installed.
I'll try to provide more details shortly but I realized I hadn't filed this.
We should support both the C
backend and translation via the (IMO much nicer) sbv
backend.
Because of #1 when you use cryptol-version
or cryptol-backends
you get garbage output.
I have a fix for this. Creating just to keep track of it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.