r/dependent_types • u/Cherylnip • Oct 07 '21
r/dependent_types • u/canndrew2016 • Apr 13 '18
All I want for Christmas is a dependently typed language with manual memory management and without god-awful Haskell syntax
Something I can replace Rust/C/C++ with. Why doesn't this exist yet? What is all this PL theory supposed to be for if people aren't going to use it? Am I the only one who wants this?
Anyone want to help make it?
r/dependent_types • u/Metastate_Team • Jan 29 '21
Announcing Dactylobiotus
We are pleased to announce Dactylobiotus, the first developer preview release of Juvix. Juvix has been designed by Metastate and takes inspiration from Idris, F* and Agda. The aim of Juvix is to help write safer smart contracts. To this end it is built upon a broad range of ground-breaking academic research in programming language design and type theory and implements many desirable features for a smart contract programming language. This first release supports compilation to Michelson. As the Juvix language is written in a backend-agnostic fashion, future releases will support additional backends. To learn more please visit the following links: blogpost, official website, Github
Let us know if you try it and have any feedback or suggestions.
r/dependent_types • u/awa_cryptium_baker • Jan 22 '20
The Why of Juvix: Ingredients & Architecture – Language for Secure Smart Contracts with Strong Dependent Types
Hi Dependent Type Redditors,
Wanted to share a new blogpost on Juvix, in case there are folks in this subreddit interested in any of the ingredients and components of the architecture.
This post, the second part of a two-part series, enumerates the various theoretical ingredients in Juvix that we think will enable it to meet these challenges, describes the current state of specification and implementation, and provides a list of further resources & instructions should you wish to learn more.
List of ingredients:
Dependent types
Usage quantisation
Whole-program optimisation & efficient execution
Resource verification
Backend parameterisation
Quick access to resources:
The full article is here: https://research.cryptium.ch/the-why-of-juvix-ingredients-architecture/
Link to GitHub: http://github.com/cryptiumlabs/juvix
Link to Language Reference: https://github.com/cryptiumlabs/juvix/blob/develop/doc/reference/language-reference.pdf
r/dependent_types • u/carette • Mar 23 '18
Tilting at windmills: the horror that is Vec
The thing called Vec in Agda, Vector in Coq, and Vect in Idris are all hideously named. They are not vectors, they are sized lists.
Vectors are the inhabitants of vector spaces. If they are represented, then one must have a basis.
It is really too bad that we must foist this massive mislabelling upon new students, who are likely to not understand that they are being seriously misled.
In all fairness, most computer scientists don't seem to realize that arrays and matrices are rather different beasts. So it's no surprise that they conflate lists and vectors too.
Ok, I've now had my Don Quixote moment, I can be quiet again.
r/dependent_types • u/audion00ba • Apr 22 '20
forall n, const 1 n = const 1 (length (seq 1 n)).
Why can't I even state the following lemma? Coq says the types are not the same, but that's kind of the point of it. I want to prove that they are the same. I even have a proof that length (seq 1 n) = n in another lemma.
Lemma why: forall n, Vector.const 1 n = Vector.const 1 (length (seq 1 n)).
In environment
n : nat
The term "const 1 (length (seq 1 n))"
has type "Vector.t nat (length (seq 1 n))"
while it is expected to have type
"Vector.t nat n".I can state Lemma why: forall n, Vector.to_list(const 1 n) = Vector.to_list(Vector.const 1 (length (seq 1 n))). instead, but that's really not the kind of equality I am looking for.
r/dependent_types • u/stevana • Nov 30 '10
Size-indexed logical relations
sneezy.cs.nott.ac.ukr/dependent_types • u/Noria7 • Jun 19 '22
Dependent types are the crypto of programming languages
As in they are over hyped and offer very little use in practice.
Sure, they can offer a layer of safety on top of a program at compile time, but that safety can be implemented at run time extremely cheaply , but the sheer complexity on the language and burden on the developer is no where near justifying the nanoseconds you gain. There is a reason after decades of research, no one came up with a practical way to use them beside proving math theorems. Take the classic example of getting an element from any array. You can just do this instead:
let n: Int = 3
var m: [Int] = [1,2,3,4,5]
if n < m.count && n > 0 { print(m[n]) }
The same checks can be applied in all other "uses" of dependent types. Fuzz testing can also ensure you covered any missing cases.
Anyway, I'm not saying people are wasting their time researching and implementing them, they are interesting. But IMO they offer very little value to cost ratio.
r/dependent_types • u/Metastate_Team • Nov 25 '20
Juvix
Juvix synthesizes a high-level frontend syntax, dependent-linearly-typed core language, whole-program optimisation system, and backend-swappable execution model into a single unified stack for writing formally verifiable, efficiently executable smart contracts which can be deployed to a variety of distributed ledgers.
Learn more about Juvix by watching Christopher’s presentation hosted by Nomadic Labs. Visit Juvix’s website, and follow Juvix’s twitter profile to learn more.
r/dependent_types • u/stevekrouse • Nov 19 '16
Shapes as types in graphical programming
r/dependent_types • u/alex-manool • Mar 21 '21
Your relation with data typing: Dynamic? Static? Static but unsound? (and the approach in the MANOOL-2 language)
self.manoolr/dependent_types • u/stevana • Mar 07 '14
Introduction a la theorie homotopique des types (French PDF)
cse.chalmers.ser/dependent_types • u/greenrd • Jan 31 '10
Curry–Howard correspondence [Wikipedia]
r/dependent_types • u/homotopytypes • Dec 09 '12
What about epigram?
when is epigram coming out?
r/dependent_types • u/audion00ba • Apr 27 '20
Coq: Applying a proof on lists to a proof on vectors?
I showed a Lemma for a list of nat, but now I want to also show it for a vector of nat. So, I figured I needed a lemma like the below, but those types don't match again.
Someone said in a previous thread that I had to "transport" those proofs, which probably involves some kind of "cast" function
Lemma vector_map_is_map: forall (A B:Set) (xs:list A) (f:A->B),
Vector.map f (Vector.of_list(xs)) = Vector.of_list(map f xs).I did manage to show the following:
Lemma vector_map_is_map_sort_of: forall (A B:Set) (xs:list A) (f:A->B),
Vector.to_list(Vector.map f (Vector.of_list(xs))) =
Vector.to_list(Vector.of_list(map f xs)).I also tried to show the following, but got stuck. The length index of the two vectors could be different in general, which was what I wanted to show at first.
Lemma vector_to_list_same : forall (A B:Set) (n:nat) (v1 v2:Vector.t A n) (f:A->B),
Vector.to_list v1 = Vector.to_list v2 -> v1 = v2.
Proof.r/dependent_types • u/awa_cryptium_baker • Jan 08 '20
The Why of Juvix: [Part 1] On the design of smart contract languages
Hi Dependent Types Redditors!
4 months ago I posted on Reddit a link to Juvix. The project has been progressing a lot and starting now there will be more blogposts and articles on the project. Just wanted to share with you:
The teaser is here: https://medium.com/cryptium-research/the-why-of-juvix-part-1-on-the-design-of-smart-contract-languages-69071ece2bc
And the full article here: https://research.cryptium.ch/the-why-of-juvix-part-1-on-the-design-of-smart-contract-languages/
The repository: https://github.com/cryptiumlabs/juvix
Please subscribe to our research blog if you want to stay tuned.
r/dependent_types • u/stevana • Jan 28 '14
A New Type of Mathematics? (Communications of the ACM on HoTT)
r/dependent_types • u/greenrd • Dec 28 '14
Experimental Scala fork created supporting values at type level and dependent types
r/dependent_types • u/sideEffffECt • May 14 '15
Against the definition of types, by Tomas Petricek
r/dependent_types • u/stevana • Apr 10 '14
Abstract Datatypes for Real Numbers in Type Theory (PDF)
cs.bham.ac.ukr/dependent_types • u/[deleted] • Sep 08 '12
Pi is for Power, Sigma for Product
jonmsterling.comr/dependent_types • u/GeoKangas • Oct 19 '11
A Naive Question About Dependent Types (Somewhat Long)
I'm told that "dependent types" are types that may depend on values. That sounds to me like dynamic typing.
Here's how I see statically typed computing (as in, e.g., SML): first a program is compiled, which essentially means assigning types to expressions; then the program is run, which means assigning values to expressions. In other words, what "type" means, is what can be known about an expression, before the program runs. In yet other words, the type of an expression is (more or less) isomorphic to compiled code for that expression.
Dynamically typed computing goes like this: the program just runs, and expressions just get values. Some aspects of these values are called "types". Since there's no compile time (not counting byte code "compiling"), the meaning of "type" can't refer to compile time; instead, a value's "type" is just a reference to a set of functions that can be applied to this value. Such "types" must depend on run time values, because run time is the only time.
Glancing at Agda, Epigram, Idris, and Coq, no one will mistake them for Perl, Python, or Ruby. A much more rigorous, academic flavor pervades the former list. But what's the fundamental difference?
A related question: in the dependently types languages, is there any fundamental distinction between types and values?
r/dependent_types • u/greenrd • Jun 22 '10
Finally: Your dependent types questions answered! (Maybe)
A social Q&A site called Quora.com is generating some buzz at the moment, and has just opened to the public. We could use this to ask each other questions which aren't specific to one particular dependently-typed language - things like, "What does this bit of terminology mean, anyway?" I know I've been itching to ask such questions. The advantage of that over just using this reddit would be:
Quora lets you create a wiki-style, anyone-can-edit answer summary at the top of the page. Good for saving time for people who refer to that page in the future. (Reddit's "self-posts", like this one - that is, posts which aren't links to external websites - can be edited, but only by the original person.)
This reddit wouldn't be cluttered up by questions, and people wouldn't need to feel held back about asking as many questions as they wanted, and as beginner-level or advanced-level questions as they wanted. Quora guidelines state that even questions whose answers can be found with a little Googling around are fine to ask, because by making an answer easier to find or easier to understand, you create some value.
When a question crosses over into being about other topics as well (e.g. formalising category theory), anyone can tag it with more topics, and there is still only one page for that question, which appears in all of those topics. Reddit also allows cross-posting, but each topic has its own separate page when you cross-post, and its topics tend to be much more coarse-grained, partly because of this.
You can permanently "endorse" people with respect to a topic on their profile page, to say, in effect, "This person knows what he or she is talking about - listen to them". I'm unsure how useful this is in practice, though.
Anyone can redirect duplicate questions to avoid duplication, and anyone can reverse redirections if a mistake or vandalistic redirect happens.
The main disadvantages are:
Use of your real name is required to join. However, Quora questions can be asked and answered anonymously, so this isn't quite as bad as it sounds.
A Facebook or Twitter account is required (I think).
StackOverflow.com is another possibility, but I believe that's more about the nuts and bolts of programming than cutting-edge research theory, so more theoretical stuff might be unwelcome there.
If you want to join, and don't mind using your real name: dependent types topic on Quora
Questions like "What does this syntax mean in Agda", specific to one language, would probably still be best directed to the relevant project mailing list.