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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Draft of OCaml Scientific Computing book

199 点作者 mseri超过 4 年前

14 条评论

G4BB3R超过 4 年前
Each year I think wether should I learn OCaml or not. What is the current state of multi-thread OCaml? Is that a game changer or just a cool feature? I can't understand why OCaml doesn't have mass adoption.
评论 #24281925 未加载
评论 #24282474 未加载
评论 #24285121 未加载
评论 #24284587 未加载
评论 #24281751 未加载
评论 #24282058 未加载
评论 #24286680 未加载
评论 #24281892 未加载
评论 #24281878 未加载
评论 #24287280 未加载
UncleOxidant超过 4 年前
Love OCaml. One of my favorite languages. But I'm using Julia for this kind of thing, it just seems much better suited. Likewise, I wouldn't use Julia to write a programming language implementation, OCaml is much better suited for that.
评论 #24284681 未加载
forgotpwd16超过 4 年前
Online version is available on <a href="https:&#x2F;&#x2F;ocaml.xyz&#x2F;book&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ocaml.xyz&#x2F;book&#x2F;</a>.<p>Pretty interesting. Reading it, seems closer to a tutorial in using Owl, an OCaml-written package for technical computing (what e.g. Matlab is; though architecture differs according to post).
评论 #24281882 未加载
fluffything超过 4 年前
Skimming through this book, one thing i was constantly wondering, is how well does this ocaml framework use the hardware.<p>Leaving ocaml aside, the connection between scientific computing and hardware is the one thing I miss the most in &quot;scientific computing&quot; books and courses, because it sooner or later limits the science that any researcher doing scientific computing can do.<p>To give an example, earlier this week, one of our scientists was waiting 10 minutes between each interactive iteration of their data-set, so I was called to help, and the only feedback they gave was that &quot;its slow&quot;, to which I replied &quot;slow with respect to what? how fast are you expecting this to be and _why_?&quot;.<p>The answer to these questions is the difference between &quot;maybe they just need a faster computer&quot;, &quot;maybe they need a different algorithm&quot;, or even &quot;maybe this problem cannot be solved today because computers this fast do not exist&quot;.<p>From their facial expression, it looked to me that they actually had never thought about any of this, probably because whatever they did before was always fast enough, but now this issue was limiting their science and they were lacking the bare minimum set of tools to even get proper help.<p>If you are doing scientific computing, chances are that the problems you are going to be dealing with are going to be getting bigger and harder as you advance in your career. For many scientists, the first problems will actually be big enough for the hardware to matter.<p>I wish scientific computing courses and books will at least provide the most basic tools to these scientist for them to at least be able to get meaningful help. Having someone on call for when this matters is quite expensive.
评论 #24291468 未加载
评论 #24287363 未加载
评论 #24282424 未加载
评论 #24282966 未加载
cultus超过 4 年前
In my opinion, static languages don&#x27;t bring a whole lot to the table with numerical math. There&#x27;s not many types for one. You basically just use matrices and vectors of floats most of the time.<p>What would really be a bigger deal is some limited dependent typing to avoid errors from mismatched array sizes. Until then though, Julia is a bit more practical choice for me.
评论 #24284210 未加载
评论 #24284000 未加载
ihnorton超过 4 年前
&gt; Indexing, slicing, and broadcasting are three fundamental functions to manipulate multidimensional arrays.<p>...<p>&gt; Indexing and slicing is arguably the most important function in any numerical library.<p>These statements are undoubtedly true. The first question any practitioner familiar with other systems will ask is: what does basic arithmetic, array manipulation, and linear algebra look like?<p>But from what I can tell on a very quick skim, that question isn&#x27;t really answered until the section starting with these sentences, on page 123. I&#x27;ve noticed this situation every time I look at the Owl docs webpage too, FWIW (have not looked recently though).<p>I understand the need to be perceived as fully-capable for modern tasks -- and that&#x27;s fine for a 2-4 page set of teaser examples up front -- but I think this book would become much more approachable if the basic mechanics of doing math were presented first.
评论 #24283743 未加载
vmchale超过 4 年前
Good stuff! Love OCaml and functional programming in the spotlight.
jpz超过 4 年前
I think the work the author has done is amazing. I Just looking at the commit history - the core contributor has definitely been super busy.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;owlbarn&#x2F;owl&#x2F;graphs&#x2F;contributors" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;owlbarn&#x2F;owl&#x2F;graphs&#x2F;contributors</a>
dunefox超过 4 年前
Interesting idea to use an ML for scientific programming, but I don&#x27;t see any practical reasons not to use Julia or Python. I&#x27;d rather take advantage of everything Julia already offers (+ Python with PyCall.jl) than wait for the same support in a language not widely used in the first place.
评论 #24282099 未加载
rich_sasha超过 4 年前
I&#x27;m beginning to think of learning either OCaml or F# for data sciency-kind of things. Any points of comparison between those?<p>Library ecosystem seems better on F#, but I must admit I&#x27;m somewhat wary of the behemoth that is .NET .<p>What else should I consider?
评论 #24282877 未加载
评论 #24284998 未加载
评论 #24283953 未加载
评论 #24283001 未加载
评论 #24282405 未加载
TallGuyShort超过 4 年前
I&#x27;ve never encountered a real OCaml project or anyone who uses it in my career (same is true for Haskell). I have assumed these languages are a hobby for CS academics and get used for pet projects by their devotees. Not that that&#x27;s bad - they&#x27;re interesting and the ideas are cool. I would just be afraid of locking myself into an isolated ecosystem that it&#x27;s hard to hire experienced people for. Is anyone on HN actually using these languages for scientific computing, or other large production projects? Curious to know what the pros &#x2F; cons are in practice and how common that is.
评论 #24282425 未加载
评论 #24282426 未加载
评论 #24281785 未加载
评论 #24281842 未加载
评论 #24285000 未加载
评论 #24281989 未加载
评论 #24287543 未加载
评论 #24282538 未加载
评论 #24282762 未加载
srean超过 4 年前
Owl, the array&#x2F;scientific computing library that this book introduces, has been discussed on HN before. Dropping those links here, in case people are curious about the comments.<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20449595" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20449595</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14751236" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14751236</a>
smabie超过 4 年前
As someone that likes and uses OCaml a lot but uses Julia for scientific computing, it&#x27;s not worth it, just use Julia.<p>The Julia code is going to be shorter, faster, and more elegant. The libraries will be sooo much better. The static typing of OCaml doesn&#x27;t really help in this area and sometimes actually hurts (statically typed DataFrames don&#x27;t work so well).
评论 #24287632 未加载
logicchains超过 4 年前
I wonder if there&#x27;s any overlap between this and <a href="https:&#x2F;&#x2F;www.ffconsultancy.com&#x2F;products&#x2F;ocaml_for_scientists&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;www.ffconsultancy.com&#x2F;products&#x2F;ocaml_for_scientists&#x2F;...</a>, or would it still be helpful to read both of them?
评论 #24281552 未加载
评论 #24281527 未加载
评论 #24281854 未加载