TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Owl – OCaml Scientific Computing

190 pointsby alokraialmost 6 years ago

10 comments

sreanalmost 6 years ago
The first thing I did was to check how slicing and indexing works. If anyone else is curious it is explained here<p><a href="http:&#x2F;&#x2F;ocaml.xyz&#x2F;chapter&#x2F;slicing.html" rel="nofollow">http:&#x2F;&#x2F;ocaml.xyz&#x2F;chapter&#x2F;slicing.html</a><p>The syntax is quite verbose. Anyway to make it better with macros ? Coming from number crunching world makes me wish that the syntax for list and arrays in OCaml were swapped.<p>On a different note, I hope Owl allows flexibility over memory layout in future. Inter-operating with Fortran is often necessary. Besides that, compile time reshaping n-dimensinal-arrays is very useful for having efficient code. As far as I know Julia can do this with macros, may be without macros too.<p>&gt; OCaml’s Bigarray can further use kind GADT to specify the<p>&gt; number type, precision, and memory layout. In Owl, I only<p>&gt; keep the first two but fix the last one because Owl only<p>&gt; uses C-layout, or Row-based layout in its implementation.<p>&gt; See the type definition in Ndarray module.
评论 #20464568 未加载
评论 #20458195 未加载
marmadukealmost 6 years ago
It&#x27;s interesting to read through the contents here:<p><pre><code> http:&#x2F;&#x2F;ocaml.xyz&#x2F;chapter&#x2F;index.html </code></pre> They seem to be implementing the most popular parts of the Python numerical ecosystem from ndarrays to AD graph and neural nets, as well as plotting.
评论 #20457562 未加载
StefanKarpinskialmost 6 years ago
How does Owl handle representing arrays of Float64s (for example) in BLAS-compatible format? That is, as contiguous memory blocks, instead of having each float value individually heap allocated and boxed with the array being an array of pointers to these values. That ability seems like the most basic requirement for a language in which scientific computing is done—if for no other reason than to call BLAS and LAPACK and other Fortran&#x2F;C&#x2F;C++ libraries. Vanilla OCaml doesn&#x27;t support this (as far as I&#x27;m aware), so you&#x27;d need something like NumPy which grafts typed arrays onto Python, but for OCaml. Of course, OCaml already has typed arrays, unlike Python, there&#x27;s just a legacy insistence that all collections work with pointers to values, since other wise you might need to compile generic code more than once (god forbid). Is such an &quot;efficient array library&quot; part of Owl? Any tidbits on how it works?
评论 #20462865 未加载
评论 #20461621 未加载
评论 #20467514 未加载
Stubbalmost 6 years ago
What&#x27;s the state of threading in OCaml? Can I do a multithreaded map() or reduce()?
评论 #20463003 未加载
improbable22almost 6 years ago
What&#x27;s the one-minute pitch for using this, over say Python or Julia? I couldn&#x27;t figure this out from a quick skim.
评论 #20457505 未加载
评论 #20458089 未加载
评论 #20457534 未加载
评论 #20457461 未加载
评论 #20458062 未加载
评论 #20457951 未加载
phonebucketalmost 6 years ago
I am comfortable with Python, Julia and R, but the static typing and functional aspects of OCaml make Owl look enticing.<p>Can anyone point me towards a good free online resource for learning OCaml?
评论 #20458845 未加载
评论 #20463443 未加载
nafizhalmost 6 years ago
By keeping Part 1 as a placeholder they are potentially missing out on a lot of new users who are not familiar with functional programming but are willing to learn it through the use case of scientific computing.
mirekrusinalmost 6 years ago
Scripting zoo with hash imports from gists is interesting idea.
wolfspideralmost 6 years ago
I really dig the inception demo. I think this would be a great companion to FStar also written in OCaml.
kraphtalmost 6 years ago
Kinda wish they had gone with F#. Would&#x27;ve been less work for them to write nice functional wrappers around existing .NET libraries.<p>Of course, you can&#x27;t get funding for something that unambitious, so I understand the tack. Still...<p>I look forward to trying this out once more significant work has been done. I&#x27;m a big fan of OCaml-like languages, if that wasn&#x27;t already obvious.
评论 #20457939 未加载
评论 #20457426 未加载
评论 #20457785 未加载
评论 #20457265 未加载