6 comments

  • skybrian2 hours ago
    It sounds like you know what you’re doing but the documentation seems rather shallow and I don’t quite get it. I think you’re going to need a real language specification. I like how Go does it.<p>There is some apparently AI-generated prose that needs rewriting for clarity. For example, in the tutorial:<p>&gt; The caller proves where; the implementation proves ensures. A precondition failure stops compilation before any program runs.<p>Fron the readme:<p>&gt; I think you get it now.<p>Nope, I skimmed, because the syntax is unfamiliar.<p>&gt; Memory model is in a tree of &quot;planes&quot;. The stack is a tree. Each function is a node. Each variable is another node. If it&#x27;s a struct then it&#x27;s also a node. Down to the most atomic types, which are just the integers.<p>Meaning what? This needs to be explained better.
    • jordan_bonecut2 hours ago
      Yeah the repo&#x2F;documentation is pretty rough right now. TBH I am not quite ready to spend a ton of time on docs yet as some of these things are changing on the fly. But the core concept&#x2F;syntax should remain the same. The code is not super interesting yet, though
      • bigbadfeline16 minutes ago
        &gt; TBH I am not quite ready to spend a ton of time on docs yet as some of these things are changing on the fly.<p>I&#x27;d assume, what you do is based on some research, with articles and other projects like yours - these references are what&#x27;s missing from your project, you don&#x27;t have to write them yourself.<p>The most important missing explanation, that only you can provide, is this: Why a new language? There are projects that attach proof obligations to standard Rust in order to reuse its vast ecosystem and existing LLM skills. That would be a far easier and more productive approach to take.
      • skybrian2 hours ago
        Yeah, if I were motivated I’m sure I could figure it out from the tutorial.
        • jordan_bonecut1 hour ago
          And, to be clear, the README was mostly an initial prompt for the AI. I’ll prioritize making a much clearer and legible README soon
          • assumed_throwaw1 hour ago
            A good tip is to actually polish your README before sharing it with everyone.
            • jordan_bonecut0 minutes ago
              I considered waiting longer to share more but felt feedback early was better than waiting for more polish. Will focus on this with high priority though, good feedback
  • kreco1 hour ago
    Sorry for the non constructive comment:<p>I wish we would stop xxx::yyy::zzz for namespace.<p>It was horrible in C++ from day one, and is still horrible in Rust.<p>It had some reason to be this way in C++ but not in any other newer language.<p>Real negative part: it looks to me that the authors of those languages are parroting other languages rather than understanding the reason of those language choice.<p>This simply worries me because I judge the level of expertise and makes me not consider the language in the first place.<p>(I know C++ and Rust are alive but they share their fair share of poor design choice)
    • roarcher46 minutes ago
      &gt; it looks to me that the authors of those languages are parroting other languages rather than understanding the reason of those language choice.<p>I don&#x27;t mean this to sound combative, but I think you are the one who doesn&#x27;t understand the reason for the language choice. I assume you&#x27;re objecting to the fact that these languages use different operators for module&#x2F;namespace paths (`::`) and object member&#x2F;method access (`.`), not the `::` symbol specifically.<p>You seem to assume that Rust blindly imitated C++, but that&#x27;s not the case. The `::` syntax allows the compiler to identify and resolve all the static paths before any type inference or other analysis. This is important because macros are expanded between these stages, and can in turn introduce more static names which must also be resolved before any further compilation.<p>You might be able to introduce a rule that any `.`-path that <i>can</i> be resolved statically will be, trumping any non-static members (or maybe not, it might cause ambiguities I&#x27;m not thinking of), but Rust&#x27;s stated design philosophy favors explicitness.<p>I don&#x27;t know what this language&#x27;s reason for using it was, as I don&#x27;t see any mention of macros. But in general it simplifies compiler design. If you can resolve all the static names up front, the following compiler stages can ignore the concept of namespaces altogether.
      • kreco14 minutes ago
        I <i>assumed</i> Evergreen blindly imitated Rust.<p>However, I <i>believe</i> Rust purposely imitated C++, for reasons. And I still don&#x27;t like it.<p>A lot of language are doing fine using dots. And if you are going to use &#x27;::&#x27; you can have your reasons. I would still find it annoying to type and read.<p>Just to add precision: I critic the syntax (which is very subjective), and I critic the parroting, as two separated arguments.
        • roarcher3 minutes ago
          &gt; A lot of language are doing fine using dots.<p>I have implemented one such language, and while it is indeed doing fine, the dots-everywhere syntax really does complicate name resolution. It only uses it because the distinction between two different operators would be lost on its intended less-technical audience. It is a (in my opinion unfortunate) tradeoff made for a specific reason.<p>And one thing those languages all (as far as I know) have in common is that they do not have Rust&#x27;s macro system. It may well be impossible to implement that without a distinct operator.<p>I have no opinion as to whether that operator should be `::` or some other arbitrary symbol, but I believe that no matter what symbol they chose, someone would complain that it doesn&#x27;t fit their personal taste. Can&#x27;t please everybody.
    • mantomat1 hour ago
      &gt; It was horrible in C++ from day one, and is still horrible in Rust.<p>I don&#x27;t get it. Is it <i>syntactically</i> horrible or are there real reasons that I&#x27;m missing?
      • kreco4 minutes ago
        No it&#x27;s just a personal opinion. I like the UX of using dots for everything.
      • ModernMech43 minutes ago
        For me, I guess it’s just that foo&#x2F;bar is standard and fewer characters so it’s the obvious and ergonomic choice. But we can’t use that because of infix math, which is also a choice. So why are the choices made that way? “We made it easier to write mathematical notation at the expense of making it worse to talk about every namespace” isn’t the best trade off all the time.
    • edf131 hour ago
      Any links to the historical reason for C++ using ::?
      • kreco1 hour ago
        I don&#x27;t have a link but you can search on the web. I have the .pdf on my computer.<p>From &quot;A History of C++: 1979− 1991&quot;.<p>&gt; In C with Classes, a dot was used to express membership of a class as well as expressing selection of a member of a particular object. This had been the cause of some minor confusion and could also be used to construct ambiguous examples. To alleviate this, :: was introduced to mean membership of class and . was retained exclusively for membership of object.<p>It was taken from Algol68.<p>Then, this was reused for namespaces for consistency reason.
    • packetlost56 minutes ago
      My favorite namespacing syntax is ironically Clojures. module&#x2F;func or fully.qualified.module&#x2F;func or just func if you explicitly import the symbol. I vastly prefer shallow namespacing (module&#x2F;func) most of the time.<p>I write Rust mostly for my day job (and it&#x27;s also my preferred language on the side these days), so I usually end up explicitly importing all the symbols I actually use because module::func is just additional noise in an already pretty verbose language and is what&#x27;s considered &#x27;idiomatic&#x27;.<p>I don&#x27;t really get the issue with :: being the separator used here. It&#x27;s slightly ugly, but it&#x27;s visually distinct from . for field access, which I do appreciate.
    • jordan_bonecut1 hour ago
      This is good feedback. I will chew on this…
      • kreco5 minutes ago
        Don&#x27;t think too much about it though, it was to express a personal opinion.<p>I just like &quot;dots&quot; for everything, and there are some reasons to distinguish package&#x2F;module qualification, struct&#x2F;class member access (.), or static member access (::).
    • aeve8901 hour ago
      Hard agree. PHP did it right with backslashes.
      • jordan_bonecut1 hour ago
        That, sir, is a hot take
        • bigbuppo15 minutes ago
          I&#x27;m assuming it was a joke. I&#x27;m hoping it was a joke. Please assure me it was a joke.
  • jordan_bonecut3 hours ago
    This language has been something I&#x27;ve wanted to build for years. For a while I thought I&#x27;d get my PhD and build it there. But now it&#x27;s very possible to have Claude build it while I&#x27;m at work and give it intense code review every day. It&#x27;s still not in a &quot;useful&quot; place yet, but I&#x27;m curious what fellow programmers think of a language like this. If I continue work is this something anyone thinks they&#x27;d enjoy using? Would love some feedback, thanks!
    • sblom2 hours ago
      It&#x27;s a really great concept. What guarantees are made by the prover?<p>Success in programming languages is not simply if-you-build-it-they-will-come. Bootstrapping a community that loves programming in it is the hard part. You&#x27;ll either need a killer interop story with an already built ecosystem, or you&#x27;ll need your own HTTP server, JSON parser, etc. etc. etc.<p>Best of luck! I&#x27;ll watch this space.
      • jordan_bonecut2 hours ago
        Thanks! The guarantee is that, without the use of trustme (which can prove any fact), you cannot address memory as the wrong type. The compiler also ensures that a pointer&#x2F;reference to a value is live at compile time, so it’s not possible to create an invalid pointer (without the use of trustme). You can also claim any fact which the compiler must prove in order to continue compilation.<p>That is good advice, I’m definitely planning on including some batteries soon, once I’m very happy with where the compiler is at.
    • empath751 hour ago
      This isn&#x27;t so much directed at you, as other people that get inspired by this. I have been working on my own Rust like language with claude for a few months and there are a _lot_ of projects like that out there.<p>Mine has a formally proven borrow checker built on linear types, along with algebraic effects, with an LLVM compiler written in lean -- the type checker uses exactly the proven calculus.<p>If you are going to build a language with claude, I highly, highly recommend writing it in Lean or Coq and starting by formalizing a pre-existing paper or system that has the properties you want.<p>Claude gets confused and takes shortcuts constantly, and if you don&#x27;t have a proven base, you are really going ot struggle. I had to throw away months of work as i got bogged down trying to resolve special cases and bugs that just evaporated when i switched to a proven calculus.
      • amccollum6 minutes ago
        Is your language available anywhere? I&#x27;d be curious to check it out. I strongly believe that there will eventually be a new language created with agents in mind as the primary consumers, and making the foundations provable &#x2F; safe are key cornerstones in my mind. The other property that I think is very important is fast tooling &#x2F; compilation. Compilation speed is not generally the bottleneck right now in agent loops, but models can get faster, and as software scales up and is written by swarms of agents in concert, making the tools run really fast will be an important way to decrease cycle time and increase speed.
    • 0c3ca831 hour ago
      It&#x27;s so strange how much effort goes into producing a language that people don&#x27;t even intend to write.
      • jeremyloy_wt1 hour ago
        To me it’s about determinism and feedback. Agents will make mistakes but if they get clear feedback from the tools they use, they will produce a good result.<p>There are a shrinking number of reasons to geenfield projects with non-strict or unsafe languages now.
      • gchamonlive1 hour ago
        What&#x27;s strange is only seeing value in manually writing code when clearly AI is very useful to produce quality code here.
        • 0c3ca831 hour ago
          you can ask ai to write code in existing languages with large training sets, and it&#x27;ll do better because of the large volume of training data.<p>if you&#x27;re all-in on ai, you want to prioritize familiarity for agents.
          • gchamonlive1 hour ago
            The objective of this project isn&#x27;t to make a language fit for AI to write but to make a &quot;probably safe system language&quot; regardless of who&#x27;s doing the coding.
          • ModernMech34 minutes ago
            That would imply the AI should write every program in Python from now until the end of time; but just because the AI is most familiar with Python doesn’t mean we have to throw everything we know about system design and using the right tools for the job out of the window.
  • gtutino2 hours ago
    That&#x27;s basically SPARK (the Ada subset) but with c-like syntax (more or less).
    • LiamPowell1 hour ago
      I see minor differences; however, the author does nothing to highlight them. That&#x27;s the number one thing that any new language should show when it&#x27;s trying to fit into a niche that a language already exists for: What makes this language different?
      • jordan_bonecut1 hour ago
        A compare and contrast is good feedback, will work on this
  • TofuLover2 hours ago
    Is this just &quot;Rust with dependent types&quot;? Not saying that as a criticism, I think this is genuinely useful.
    • jordan_bonecut2 hours ago
      Dependent types are part of it, yeah! There are definitely some things I dislike about Rust which I am not planning on including, mainly lifetimes and some ways they handle pointer mutability. One thing I particularly dislike about Rust is:<p>let x = vec![1,2,3]; let a = &amp;mut x[0]; let b = &amp;mut x[1]; swap(a, b);<p>This is not allowed. And actually in the compiler’s mind it’s for the same reason as this:<p>let x = vec![1,2]; let a = &amp;mut x[0]; x.push(3); <i>a = </i>a + 1;<p>Which is definitely not safe and should be rejected. But the compiler cannot reason that the above case is actually safe, because they both fail to compile for lifetime reasons.<p>Another thing I’m working on are “patterns” which are like enums on steroids. In Rust you cannot define how an enum is laid out, thus requiring optimizations for types like Option&lt;&amp;T&gt; to be in the compiler. In evergreen this will be in the language via a similar process to trait implementation.
      • nicce2 hours ago
        &gt; not planning on including, mainly lifetimes and some ways they handle pointer mutability<p>How are you going to solve the problem with other means? Lifetimes basically guarantee, that there are no use-after-free bugs.
        • jordan_bonecut2 hours ago
          The compiler statically tracks “where” everything lives. It also knows “when” the “where” is valid.<p>Each “where” is called a plane, which is a tree. The stack plane contains all your function calls memory, a structure allocated on the stack has a child plane for each field. The compiler tags which plane something is from at compile time and tracks when it dies.<p>Things do get complicated in scenarios like:<p>fn max(a: &amp;usize, b: &amp;usize) -&gt; &amp;usize {<p><pre><code> if *a &gt; *b { a } else { b } </code></pre> }<p>In such a scenario the compiler tags the result with both of the input planes. However, you cannot define add a postcondition ensures clause to make it more precise
          • tancop1 hour ago
            Sounds a lot like group borrowing from Valen, but that one still has annotations like `entity in world.entities[] mut`. Are you tracking the same things implicitly with post conditions?
          • 0c3ca831 hour ago
            And what about allocations and threads?
            • jordan_bonecut1 hour ago
              Allocations live in their own plane, the root allocated typed being the root node of that plane. For threads, I’m still working on that, don’t have a super cool answer yet
              • 0c3ca831 hour ago
                how does that prevent use after free? pretty sure your algorithm is either very poorly explained or doesnt&#x27; actually work.
                • jordan_bonecut1 hour ago
                  Another thing - when a value is moved or dropped the plane’s type changes from T to shape(T). shape(T) contains unspecified data but has the size and alignment of a T. So you couldn’t safely prove that a moved out&#x2F;dropped shape(T) is a T
                • jordan_bonecut1 hour ago
                  The compiler tracks all of the currently living planes. The compiler tracks from which plane each borrow is borrowed. Once the plane it is borrowed from dies that borrow is no longer valid
      • throwaway17_172 hours ago
        Since you are replying, I’ll go ahead and you answer…<p>In a sibling comment I said the types seem more likely to be refinement (or Liquid) types instead of being full-spectrum dependent types. Is this correct? I certainly haven’t been through enough of the docs to be confident, but I took a swing when I posted my comment.
        • jordan_bonecut1 hour ago
          What I’ve showcased is definitely not full fledged dependent types. Support is planned via ideal generics but it’s lower on the priority list to nail down
    • throwaway17_172 hours ago
      The introductory examples look more like refinement type (or Liquid types) which are limited to those operations and restrictions one’s that are provable by the compiler utilizing a restricted subset of operations and computational constructs subject to deterministic proving via SAT solving. I’m going to look closer at the docs so I could be mistaken on that point. It certainly seems to have taken the ownership and ‘borrowing’ concepts for memory semantics from Rust at a quick glance at the first few pages.
      • jordan_bonecut2 hours ago
        Dependent types can be achieved via “ideal Generics”. Very undocumented and not ready to commit to how they work yet, but the basic idea is that a type can be generic on a value.
        • ch4s32 hours ago
          How long have you been working on this?
          • jordan_bonecut2 hours ago
            I have been building little prototype languages for years. This iteration which is heavily AI powered is a couple weeks old
            • ch4s32 hours ago
              Oh cool, it&#x27;s amazing how quickly you can stand up a language now, I love it. I&#x27;d love to exchange ideas, I really like what you&#x27;re doing.<p>How are you doing resolution of your dependent(refined?) types? I&#x27;ve been using Z3, but you&#x27;re clearly doing something else here.
      • ch4s32 hours ago
        Yeah it definitely looks like refinement vs actual dependent types. I do the same thing here[1] in my language (pardon the mess). Adding liquid types to basically rust is IMHO a good idea.<p>[1] <a href="https:&#x2F;&#x2F;march-lang.org&#x2F;docs&#x2F;refinement-types&#x2F;" rel="nofollow">https:&#x2F;&#x2F;march-lang.org&#x2F;docs&#x2F;refinement-types&#x2F;</a>
  • solatic1 hour ago
    I didn&#x27;t delve too deeply, but I don&#x27;t get it. How do you get provable <i>runtime</i> safety (in a dependent types sense) in a system which gives you direct control over memory, and without introducing the kind of overhead that would be inappropriate for a systems language?<p>Your &quot;overflow, then inspect&quot; example illustrates this incoherency. If overflow is allowed, and you try to fit 250 + 10 into a u8, so the value should be 4, which <i>is</i> less than 10, so it should fit your precondition, not violate it. And this is a simple example where 250+10 is known at compile-time - what happens when a user provides the number at run-time? Does the compiler attempt to provide the proof anyway? How?<p>I mean.... I have a lot of respect for Haskell and Idris and the goals they set out. But they&#x27;re not <i>systems</i> languages.
    • jordan_bonecut53 minutes ago
      Overflow is allowed. Overflow behavior is unspecified, like C++
      • jordan_bonecut51 minutes ago
        If you want to assume that overflow wraps either:<p>Your hardware does this OR You implement it in software