The practical counterpoint to Dex is Jax, by many of the same authors: https://github.com/google/jax
I’m optimistic that we’ll eventually be able to figure out how to build practical tools [..] The biggest challenge may be trying to fit them into Python syntax.
=============
(isn't that a golden blast from the past. i'm a bit lost in precedence rules for 'practical' in this pearl, but i love it anyway. i hope all that optimism and the power of positive thinking came to fruition.)
(take your time. for some folks, it is known to take some time to process and reflect on the difference between a real system and yet another sciency llvm jit. last time i checked, julia was doing pretty well in that particular weight class. what happened, what did i miss?)
yes, true. some people did indeed port not just python3 to wsm, but also llvm (not sure about llvm9 to run dex/jax/vax, but still). the practicality of such heroics is questioned by some folks, but tastes differ.
"we can compile anything to anything" is a bit of a non-argument. while it is a true statement, the public k9 wasm build is meant to illustrate how well k9 runs on bare metal ("bare", in this particular case). syscall table and two stdlib functions used by the web console are optional.
> clickhouse is winning left right and center
oh, thank you - never heard of that one, Russians produce a lot of excellent software (and sometimes manage to get away with it, see nginx). in particular, 3 queries against famous nyc taxi ride db is a very popular (non-)comparison, i really enjoyed the story of this guy riding a taxi on 100-way cluster:
https://tech.marksblogg.com/billion-nyc-taxi-rides-clickhouse-cluster.html
> show us something
maybe this, although old news:
https://shakti.sh/benchmark/taxi.k
i know it doesn't look remotely as shiny (and resilient!) as the clickhouse cluster configuration rant up above, but taxi.k is fully self-contained, includes some economy of scale estimations for k9 and some other systems, and will happily do 100-way over ipc if you so desire.
> ..interesting?
maybe this:
https://kparc.io/k/#%5Cl%20taxi.k
this is nyc taxi Q1 on your phone. no threads, no ipc, no ec2, no simd, no simdjs. it is just you and your mobile phone. maybe not so impressive.
i get about 9ms on iphone12 and about 40ms on mbp2012.
what do you get?
> J is cleaner and open source
while could be very true as well, especially open source part, i am not aware of taxi shootout readings for J, so my competence ends here. what i know about J, however, is where it came from - see the legendary "origins of j" anecdote at https://kparc.io
* * *
finally:
> k is a db
that is imprecise. k is a small, agile and integrated system, very well designed. it is a language that gives you a "db" if you need one, but it can also solve euler p572 for you only 10-20 times slower than a carefully crafted c solution (one should be lucky to get ~200ms, but maybe you get luckier).
I have only iPhone XR and it took 14 ms. But my Linux on Asus A15 is a bit faster than your MacBook. It took 12 ms with battery power and 7 ms with a power cord connected.
instead of something, in algo-like languages, such as:
plus((mult(3,square(x))),plus(mult(3,x),1)))
Even Java lets you write 3xx+8*x+1, as a concession the value of algebraic notations.
I think that three issues at play are:
0. Falling into an intellectual comfort zone. My path has included BASIC, FORTRAN, PASCAL, C, C++, Perl, k/q. At each step I had to learn a new notation that seemed difficult at the time because of the intellectual comfort with my earlier experiences. k was ultimately a reversion to basic algebraic notation. I also learned regex notation along the way and still use it to this day :).
1. Having to learn a new (and slightly larger) operator vocabulary to understand vector languages like apl/j/k/q. I find the APL vocabulary to be too large for my taste, for example.
2. The possibly of a large expression that carry lots of semantic content. Large expressions in algebra/mathematics are often refactored into named expressions or functions, similar to programming language source code. In addition, verbose languages have lower semantic density and make it easier to comprehend what can fit on one line of source code.
also this! we've gotten really lazy around here, so we just take and cut. here's our new RegExp() for that, as @elbab below would definitely agree if he knew which way to read it. easy does it:
3^24#1.
fun fact: i actually once took a semester of arabic just out of curiosity how an rtl language with all vowels omitted works perfectly fine for a lot of people, and nobody says is looks like regexp.
18 comments
[ 3.1 ms ] story [ 50.0 ms ] thread=============
shoyer on Oct 26, 2019 [–]
The practical counterpoint to Dex is Jax, by many of the same authors: https://github.com/google/jax I’m optimistic that we’ll eventually be able to figure out how to build practical tools [..] The biggest challenge may be trying to fit them into Python syntax.
=============
(isn't that a golden blast from the past. i'm a bit lost in precedence rules for 'practical' in this pearl, but i love it anyway. i hope all that optimism and the power of positive thinking came to fruition.)
K users are mostly there for streaming/querying not numerical compute, however
https://kparc.io/k/#(%2B'%3A%2C)%5C~!10%20%20%20%2Fpascal's%...
what's cleaner syntax for that, please?
under wsm32?
on your local voice-talking apparatus?
(take your time. for some folks, it is known to take some time to process and reflect on the difference between a real system and yet another sciency llvm jit. last time i checked, julia was doing pretty well in that particular weight class. what happened, what did i miss?)
We can all compile C to wasm now.
K is a db that loses to Clickhouse and isn’t resilient. J is cleaner syntax, and with no crushing commercial license.
Show us something interesting.
"we can compile anything to anything" is a bit of a non-argument. while it is a true statement, the public k9 wasm build is meant to illustrate how well k9 runs on bare metal ("bare", in this particular case). syscall table and two stdlib functions used by the web console are optional.
oh, thank you - never heard of that one, Russians produce a lot of excellent software (and sometimes manage to get away with it, see nginx). in particular, 3 queries against famous nyc taxi ride db is a very popular (non-)comparison, i really enjoyed the story of this guy riding a taxi on 100-way cluster: maybe this, although old news: i know it doesn't look remotely as shiny (and resilient!) as the clickhouse cluster configuration rant up above, but taxi.k is fully self-contained, includes some economy of scale estimations for k9 and some other systems, and will happily do 100-way over ipc if you so desire. maybe this: this is nyc taxi Q1 on your phone. no threads, no ipc, no ec2, no simd, no simdjs. it is just you and your mobile phone. maybe not so impressive.i get about 9ms on iphone12 and about 40ms on mbp2012.
what do you get?
while could be very true as well, especially open source part, i am not aware of taxi shootout readings for J, so my competence ends here. what i know about J, however, is where it came from - see the legendary "origins of j" anecdote at https://kparc.io* * *
finally:
> k is a db
that is imprecise. k is a small, agile and integrated system, very well designed. it is a language that gives you a "db" if you need one, but it can also solve euler p572 for you only 10-20 times slower than a carefully crafted c solution (one should be lucky to get ~200ms, but maybe you get luckier).
that's the idea.
i guess what we're missing is:
"1. day one
install llvm 9..."
which must explain the jit awesomeness. must come very handy in production.
also, the final punchline in the readme ("this research maverick is not yet pwned by gowg" is just a lie. see the license.)
as for the syntax: it is much better than pascal. a low, but important bar.
cute.
wow, that's a pretty famous nazi camp entrée. didn't hear that one in a while.
> i don't like regex
no. this is just not how this works. this just ain't so. you are confused.
but that's fine. like you said, jedem tierchen sein pläsierchen.
similar to:
3x^2+8x+1
instead of something, in algo-like languages, such as:
plus((mult(3,square(x))),plus(mult(3,x),1)))
Even Java lets you write 3xx+8*x+1, as a concession the value of algebraic notations.
I think that three issues at play are:
0. Falling into an intellectual comfort zone. My path has included BASIC, FORTRAN, PASCAL, C, C++, Perl, k/q. At each step I had to learn a new notation that seemed difficult at the time because of the intellectual comfort with my earlier experiences. k was ultimately a reversion to basic algebraic notation. I also learned regex notation along the way and still use it to this day :).
1. Having to learn a new (and slightly larger) operator vocabulary to understand vector languages like apl/j/k/q. I find the APL vocabulary to be too large for my taste, for example.
2. The possibly of a large expression that carry lots of semantic content. Large expressions in algebra/mathematics are often refactored into named expressions or functions, similar to programming language source code. In addition, verbose languages have lower semantic density and make it easier to comprehend what can fit on one line of source code.
> [these regexps] look [suspiciously] like algebra!
where do i sign! it is 2021, and the following universal truth still evaluates to false for them:
what do they mean by "no it isn't"? what is this right-of-left-no-precedence-rules nonsense?what a retarded tech. turing award, seriously? who's idea was this?
must've been some brainiacs on a nerd patrol. my gut always tells me when i look at a good complang, and i'm definitely not looking at one right now.
lol.
also this! we've gotten really lazy around here, so we just take and cut. here's our new RegExp() for that, as @elbab below would definitely agree if he knew which way to read it. easy does it:
fun fact: i actually once took a semester of arabic just out of curiosity how an rtl language with all vowels omitted works perfectly fine for a lot of people, and nobody says is looks like regexp. (kelasquez out)you so much better made me rethink everything.
thank you.
k.