Hacker Newsnew | past | comments | ask | show | jobs | submit | carlopi's commentslogin


Here it is: https://carlopi.github.io/duckdb-wasm-unsigned////#queries=v...

That is, the duckdb-wasm web shell with loaded PSQL extension


DuckDB-Wasm, with extension enabled. Execute SQL queries within a browser tab, and share the scripts as a link.


I'd say find an angle that adds value for you (ideally both since you want the answer AND you can benefit from learning) random ideas can be: * C++: extension to interface with GitHub workflows results (say how many times job X passed) * JavaScript: browser-based library to visualize data * Python: crunch geospatial data (say your own GPS data) * ...


I just discovered Hacker News offers a JSON API, ducking awesome, if only there was a nice tool to crunch data as JSON files...

I think I have just found out yet another great DuckDB-weekend project!


Btw, it's already happening:

Go to https://shell.duckdb.org, and type FROM 'https://hacker-news.firebaseio.com/v0/item/37663308.json';

Querying hacker news, from a browser tab (passing through a bunch of database and Web technology that make it possible for DuckDB to be executed within a browser tab)


woah! Didn't know this existed https://shell.duckdb.org, it's pretty cool!


It's definitely a fun dataset to explore.

Dale from ClickHouse wrote a pretty extensive blog series on the Hacker News dataset, ingest approach, some queries of interest...

Could be a good bit of reading alongside the project?

https://clickhouse.com/blog/getting-data-into-clickhouse-par...


Thanks, cool read, I took a couple of ideas, will see where we land.


Not sure whether they classify as obscure, but I haven't see cited already:

- Dominator tree (https://en.wikipedia.org/wiki/Dominator_(graph_theory))

- Single-Connected-Components-Graph

- Deterministic data structures (eg. a set that acts deterministic to the fact that addresses might be somehow randomly assigned, very useful for ensuring reproducibility)

Already cited, but it's clearly among the most elegant:

- union-find (!!!!)

and as a bonus one that is easily overlooked:

-std::deque, that when restricted to push_back() or push_front() guarantees not to ever move objects around.


I am not completely sure of what "classical" partial evaluation is, but probably yes, this is somehow a special case of it. I have now quite some material to read (see other links about partial evaluation or super-compilation).


Take this other example: https://gcc.godbolt.org/z/nebP68Tx8

Here by playing HumanCompiler it should be possible to prove that the if condition never evaluates to true, so removing the if is safe.

This is an example of optimization that PartialExecuter is able to do. Note that some combinations of other optimizations might also be potentially able to get to this result (say adding a tag "is always power of 2", but doing this in a general way it's what PartialExecuter does well).

Somehow similarly, clang might be instructed to enable a check to avoid including printf_float and somehow detect it and exclude it (this is what happens here), but this is hardly generalizable.


Interesting, looks like this is bit arithmetic related, as it looks like even complex expressions seems to be handled fine, as long as there's no bit ops.


Devirtualization is always plenty of fun + has lots of potential. Added to the list of article to read.


Congrats, later will check & take inspiration!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: