HN user

profquail

6,978 karma

C#/F#/C++/Python developer. Building trading systems and strategies at Susquehanna: https://sig.com/Careers/

Twitter: @jkpappas

https://github.com/jack-pappas

https://fsharp.org

Posts408
Comments851
View on HN
reviewmeta.com 5y ago

A Major ReviewMeta Update: Why I’m Stepping Away and Seeking a Successor

profquail
2pts0
www.govtech.com 7y ago

Harvard Converts Millions of Legal Documents into Open Data

profquail
331pts31
meanderful.blogspot.com 8y ago

The accidental HFT firm

profquail
132pts32
gildor.org 8y ago

Faster zlib compression by optimizing longest_match()

profquail
1pts0
documents.worldbank.org 9y ago

Estimating poverty using cell phone data: Evidence from Guatemala

profquail
1pts0
urbanspatialanalysis.com 9y ago

Urban heat islands and street trees in Philadelphia

profquail
86pts19
github.com 9y ago

Quake 1 ported to Vulkan

profquail
3pts0
github.com 10y ago

Usrsctp: a portable, user-mode SCTP implementation

profquail
2pts0
2013.asiabsdcon.org 10y ago

SCTP in Go [pdf]

profquail
5pts0
www.ibm.com 10y ago

Better Networking with SCTP

profquail
4pts0
williamrfry.com 10y ago

A brief guide to the Philly tech scene

profquail
6pts0
www.ageofascent.com 10y ago

Serving 6.8M requests per second at 9 Gbps from a single Azure VM

profquail
127pts55
github.com 11y ago

Zlib-ng: a performance-oriented fork of zlib

profquail
100pts45
www.slate.com 11y ago

A Good Professor Is an Exhausted Professor

profquail
2pts0
zinascii.com 11y ago

More Efficient TLB shootdowns

profquail
52pts6
www.bloomberg.com 11y ago

AirBnB is now available in Cuba

profquail
138pts45
www.learnprolognow.org 11y ago

Learn Prolog Now

profquail
169pts72
linuxgizmos.com 11y ago

MIPS tempts hackers with Raspbery Pi-like dev board

profquail
6pts0
www.youtube.com 12y ago

Depth-first search in APL

profquail
3pts0
dineability.com 12y ago

Busy NYC Restaurant Solves Major Mystery by Reviewing Old Surveillance

profquail
133pts70
www.ixsystems.com 12y ago

Jenkins and Bhyve: Continuous Integration for FreeBSD

profquail
2pts0
www.mitls.org 12y ago

MiTLS – A verified TLS implementation in F#

profquail
4pts0
rtfm.net 12y ago

FreeBSD 10.0 on Ubiquiti EdgeRouter Lite

profquail
90pts56
www.brendangregg.com 12y ago

FreeBSD, OS X, and Solaris monitoring tools using DTrace

profquail
11pts0
blog.xen.org 12y ago

Improved Xen support in FreeBSD 10

profquail
3pts0
cstheory.stackexchange.com 12y ago

What's new in purely functional data structures since Okasaki? (2010)

profquail
75pts17
www.itwire.com 12y ago

McKusick Denies FreeBSD Lagging on Security

profquail
2pts0
julipedia.meroh.net 12y ago

Introducing the FreeBSD Test Suite

profquail
41pts8
www.freebsdfoundation.org 12y ago

The FreeBSD Foundation is now accepting Bitcoin donations

profquail
3pts0
nvidia.custhelp.com 12y ago

Unprivileged Nvidia GPU access vulnerability

profquail
1pts0

The complicated number encoding scheme you mentioned is a hexfloat: C has them too.

Hexfloat can be really useful when you need precise/exact floating-point constants for numerical methods. Without them, you end up having to do more-complicated hacks to preserve exact constant values when code gets compiled, or you have to live with compilers (sometimes) subtly altering constants.

I wish more languages supported hexfloats.

Now could be a good time to make this change, in coordination with HPy: https://github.com/hpyproject/hpy

I agree though — it’s tempting to keep extending and stretching the language to be something it was never designed for; but at some point it’s been stretched so far it loses the properties that made it attractive to start with. I like Python, but some of the things people are using it for now, they should really consider another language instead, and write a Python wrapper on top of that if they must use it from Python.

Kats looks like a useful library, but I’m a bit surprised to see they’re not enabling parallel execution for the numba kernels. Surely FB must have time-series data large-enough they’d see some performance benefits from parallelism in these functions?

Maybe more like: next time there’s a downturn, keep the orders if they can afford to. Having the chips on hand when the market picks up again could be a great investment, since they’ll be able to produce vehicles when their competitors can’t. Or they can sell some of the chips they’re holding to their competitors (at the going market rate).

Sure, it’s important for a library to have C source code for portability. That doesn’t exclude implementing the code in another language (such as F*/FStar or Dafny) that has stronger out-of-the-box safety guarantees, then compiling it to portable C source code for distribution.

You can also use SQL:2011 "System-Version Tables" (a.k.a. temporal databases) supported in most of the major RDBMSs now. You'd just need to keep track of a timestamp when you started querying/paginating and include it as part of the SQL query, which'll give clients a consistent view even if the database is being concurrently modified.

oneAPI uses DPC++ (Data-Parallel C++), which is pretty much just SYCL, which itself is a C++ library on top of OpenCL.

From my understanding, the Khronos group realized OpenCL 2.x was much too complicated so vendors just weren’t implementing it, or only implementing parts of it, so they came up with OpenCL 3.0 which is slimmed-down and much more modular. It’s hard to say how much adoption it’ll get, but with Intel focused on DPC++ and oneAPI now, there will definitely be more numerical software coming out in the next few years that compiles down to and runs on OpenCL.

For example, Intel engineers are building a numpy clone on top of DPC++, so unlike regular numpy it’ll take advantage of multiple CPU cores: https://github.com/IntelPython/dpnp

Another approach to solving this issue is with a temporal database (standardized in SQL:2011); supporting a “valid time” in your query gives your user a consistent view of the database tables even if others are modifying it concurrently. It’s also handy if you want to keep audit records of the database (e.g. so users can see who/when/what changes were made).

https://en.wikipedia.org/wiki/SQL:2011

The optimizations get you the following:

* Normalization: this is where "smart constructors" come in handy; having a normal form for the terms allows the caching to work better. This also impacts the compactness of the generated DFA. * Hash-consing: this turns structural equality (in this case) to a simple pointer equality; applied recursively, this makes it much faster to compare two terms for equality, and overall speeds up the DFA generation by a non-trivial amount (I forget the exact numbers, but it was significant). * Dense set implementation: The AVL tree-based data structure in the facio/Reggie code is an implementation of the Discrete Interval Encoding Tree (DIET) data structure from "Diets for fat sets" and "More on Balanced Diets" papers.

Note the optimizations I've mentioned here impact the performance of generating the DFA. Once you have the DFA, it'll run at the same speed as one generated in any other way. Part of the motiviation for my writing this library was to learn about regex/DFAs/grammars, but also to try to improve on the performance of fslex/fsyacc at the time. Using this library, the FSharpLex tool can generate the DFA for the full F# language grammar in well under 1 sec; the code generation takes a bit longer, largely due to having to convert the DFA into a different form for backwards-compatibility with fslex.

Overall, I feel like the derivatives technique is generally better and simpler, and I'm not aware of any real downsides. The only one that comes to mind is if you're wanting to implement things like backreferences and capture groups -- those obviously make the implementation (of the DFA) more complicated, and there's a lot less literature on it (last I saw, maybe only one or two papers on implementing those features on top of a derivatives-based regex engine).