News for hackers. Stuff that matters.
Re:Show HN: Empirical – a language for time-series analysis by chrisaycock on Tuesday May 21, 2019 @08:17AM (#19969416)
I wrote Empirical to address issues I had routinely faced in my career.

I spent ten years in quantitative finance, primarily statistical arbitrage and high-frequency trading. I always ran into problems working with time-series data, from fetching the data to expressing the algorithms to watching my backtests fail from a type error after four hours.

As a result, Empirical has statically typed Dataframes and builtin timestamp types. It can infer the types from a file as long as the input source is known at compile-time, such as in a REPL.

Today's release is the very first public beta. There is a ton of work to do still; see the roadmap for further details:

https://github.com/empirical-soft/empirical-lang/issues/1

I have released the source code under the AGPL with the Commons Clause. A proprietary license is available for users who need more commercial-friendly terms.

It was a long journey to get here. I would like to thank everyone who participated in the private beta. And lastly, I would like to thank Y Combinator; I won a Startup School grant last year.

Re:Show HN: Empirical – a language for time-series analysis by hx2a on Tuesday May 21, 2019 @09:56AM (#19970167)
I like how SQL syntax is integrated into the language. That is very convenient.

Can you compare/contrast this language with q? Can I write complex queries as I can do in q? How about performance?

Re:Show HN: Empirical – a language for time-series analysis by chrisaycock on Tuesday May 21, 2019 @10:26AM (#19970429)
q was definitely an inspiration.

The biggest difference is that Empirical is statically typed. Also, arbitrary expressions are allowed anywhere when dealing with Dataframes.

For example, I can sort by anything:

    sort my_table by col1 - col2, foo(col3)
And I can aggregate by an external array as long as the lengths are the same:

    from my_table select foo(col1) by some_array_with_repetition
As for performance, I've tried to make Empirical "reasonable" at this stage, though I haven't put too much effort into it beyond that. I'm more worried about the ergonomics of the language right now, so I don't have SIMD, dependency analysis, etc.

One of the biggest things Empirical lacks compared to q is nested arrays. That's a major issue I have to tackle in the virtual machine.