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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Interactive constraint solving in Haskell

113 点作者 mkeeter超过 9 年前

6 条评论

dhaivatpandya超过 9 年前
Interesting article. It is also possible to resolve constraints probabilistically (i.e. without gradient descent), which is a good approach for functions which are very &quot;unsmooth.&quot; I wonder if it is possible to replicate this article using a probabilistic solver (e.g. <a href="http:&#x2F;&#x2F;poincare.github.io&#x2F;DCFL&#x2F;" rel="nofollow">http:&#x2F;&#x2F;poincare.github.io&#x2F;DCFL&#x2F;</a> - a Haskell probabilistic constraint solving lib. written by me).
评论 #10447515 未加载
julien-c超过 9 年前
Cool visualizations, nicely done. By the way there is a typo in the &quot;Constraint Solving&quot; section, in the last equation, it currently is<p><pre><code> c_x - b_y = 1 </code></pre> It should read<p><pre><code> c_x - b_x = 1</code></pre>
评论 #10447434 未加载
platz超过 9 年前
for some reason I get<p><pre><code> &quot;([True,True],fromList [(&#x27;x&#x27;,1.7500000780766642),(&#x27;y&#x27;,-0.24999969839074443)])&quot; </code></pre> when i run<p><pre><code> print $ show $ solveSystem [ ((2 * x) + (3 * y)) * (x - y) === 2 , (3 * x) + y === 5 ] $ Map.fromList [(&#x27;x&#x27;, 0),(&#x27;y&#x27;, 0)] </code></pre> which doesn&#x27;t match the suggested solutions.. using this code: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;80e982016a267b1f2e48" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;80e982016a267b1f2e48</a><p>* edit - lowering the precedence of === fixed it
评论 #10448518 未加载
danharaj超过 9 年前
Someone ought to make d3 bindings for ghcjs. It does have an ffi for a reason.
skimpycompiler超过 9 年前
Loving the haskell to javascript thingy. On my i7 4770 animations are still fast.<p>Although, I thought that animations were done completely in haskell but it seems that necessary functions were exported and data used in d3js.
评论 #10447806 未加载
leadingthenet超过 9 年前
What&#x27;s with all the Haskell love I&#x27;ve been seeing on HN recently? I kinda feel good about taking that FP course in first year uni now.
评论 #10448890 未加载