TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Pile Programming Language

4 点作者 jhhh超过 1 年前
Pile is a Lisp running the JVM. It will feel familiar to users of Clojure as it has much of the same syntax and similar concepts, like persistent collections with literal syntax and namespaces, however no code was copied.<p>Expected Lisp features like read&#x2F;eval, macros, first-class functions and a runtime compiler have been implemented. Java interop exists including varargs support, first-class Java functions, functional interface integration and streams. Runtime polymorphism is accomplished by multimethods and generic functions (type-based multiple dispatch). I targeted the modern JVM to take advantage of features like virtual threads, invokedynamic, constantdynamic, and records to name a few.<p>As I am still writing and testing the language there will be bugs, and the current implementation should only be used for evaluation. I am looking for feedback on the implementation and desired features people may have.<p>Thanks!

1 comment

onetom超过 1 年前
Very interesting to see an alternative approach to implementing Clojure! And it&#x27;s soooo featureful already!<p>I was just trying to use `Path&#x2F;of` in the past few days and it took awhile to get familiar with the Clojure varargs interop, so it&#x27;s nice to see that pile has simple support for it already.<p>I was also wondering how much the use of more contemporary Java features could enhance the source code or the runtime performance. This implementation seems like a great test-bed for answering such questions.<p>A small aside: The README uses `Paths&#x2F;get`, which might be deprecated eventually: <a href="https:&#x2F;&#x2F;github.com&#x2F;openjdk&#x2F;jdk&#x2F;blob&#x2F;b16e5584abcae18fdcc4494f88189daffb7fbdce&#x2F;src&#x2F;java.base&#x2F;share&#x2F;classes&#x2F;java&#x2F;nio&#x2F;file&#x2F;Paths.java#L35-L38">https:&#x2F;&#x2F;github.com&#x2F;openjdk&#x2F;jdk&#x2F;blob&#x2F;b16e5584abcae18fdcc4494f...</a><p>Should just use `Path&#x2F;of` directly.<p>BTW, I thought I would give it a try, but my initial naive attempt hasn&#x27;t yielded any results:<p><pre><code> nix shell nixpkgs#maven nixpkgs#jdk20 Restored session: Wed Sep 20 03:51:47 HKT 2023 pile on  master is v0.0.1-SNAPSHOT via on (ap-southeast-1) java --version openjdk 20.0.2 2023-07-18 OpenJDK Runtime Environment Zulu20.32+11-CA (build 20.0.2+9) OpenJDK 64-Bit Server VM Zulu20.32+11-CA (build 20.0.2+9, mixed mode, sharing) pile on  master is v0.0.1-SNAPSHOT via v20.0.2 on (ap-southeast-1) time .&#x2F;repl [INFO] Scanning for projects... [INFO] [INFO] -------------------------&lt; com.pile:pile-lang &gt;------------------------- [INFO] Building pile-lang 0.0.1-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- clean:3.2.0:clean (default-clean) @ pile-lang --- [INFO] Deleting &#x2F;Users&#x2F;onetom&#x2F;github.com&#x2F;sixfootbeard&#x2F;pile&#x2F;target [INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ pile-lang --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 8 resources from src&#x2F;main&#x2F;pile to target&#x2F;classes [INFO] [INFO] --- compiler:3.10.1:compile (default-compile) @ pile-lang --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 294 source files to &#x2F;Users&#x2F;onetom&#x2F;github.com&#x2F;sixfootbeard&#x2F;pile&#x2F;target&#x2F;classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.358 s [INFO] Finished at: 2023-09-20T03:53:30+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project pile-lang: Fatal error compiling: error: release version 20 not supported -&gt; [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http:&#x2F;&#x2F;cwiki.apache.org&#x2F;confluence&#x2F;display&#x2F;MAVEN&#x2F;MojoExecutionException .&#x2F;repl 2.37s user 0.18s system 236% cpu 1.075 total</code></pre>
评论 #37578214 未加载