10,762 karma · joined February 10, 2010
Global column dictionary has more complexity than normal. Now you are touching more pages than just the index pages and data page. The dictionary entries are sorted, so you need to worry about page expansion and contraction. They sidestep the problems by making it immutable, presumably building it up front by scanning all the data.
Not sure why using FSST is better than using a standard compression algorithm to compress the dictionary entries.
Storing the strings themselves as dictionary IDs is a good idea, as they can be processed quickly with SIMD.
It's very popular in Germany, with several million units installed. They call it balcony solar panel. People hang the panels on their balconies in apartment buildings. Germany allows up to 800-watt systems.
It's a very simple system, a solar panel coupled with a micro inverter that converts DC to AC power. It is plugged into a regular wall outlet to provide additional power to the home. The added power is an additional source of electricity in addition to the grid. Any electrical devices drawing power from the circuit draw from the closet source first (due to Kirchhoff's Law), i.e. from the solar panel, then any additional need will be drawn from the farther away grid.
The micro inverter needs to be UL 16741 compliant for anti-islanding protection, to shut off in case the grid has shut power down, so that the solar panel won't back feed power into the grid.
In U.S., Utah has already passed a law to allow plug-in solar systems for up to 1200 watts without permit requirement and allowing back-feed into the grid. A few other states are considering.
There are limits to the power fed into a circuit. Normal household electrical wire can handle up to 15amp (1800 watts on 120V) of electric load. The plug-in power from the solar panels should not exceed the limit. This means the power generated is meant to supplement the household power need rather than completely covering it. Any reduction from the grid helps.
I talked to my city's (in California) building department. They haven't heard of it and need time to do research. The building inspector says that as long as the solar panels are not modifying the structure of the building (on roof or on wall), they don't care. They said putting the panels on the ground in the yard is fine.
https://dynamic-media-cdn.tripadvisor.com/media/photo-o/2e/9...
Example is best for illustration. I'll use a made-up syntax.
// 'Maybe' is a monad wrapping any value type T that can be null.
class Maybe<T> {
// The value wrapped by the monadic value
value: T;
// A constructor to make a Maybe monadic value from a plain value T.
// This is called 'unit' or 'return' in Haskell, or 'lift' in other languages.
// It's really a constructor.
static wrap(v: T) Maybe<T> {
return new Maybe { value = v }
}
// then() applies fn on the unwrapped value. fn returns a Maybe<T>.
// This is called 'bind' in Haskell, or 'flatMap' in other languages.
then(fn: (T) => Maybe<T>) Maybe<T> {
return this.value == null ? Maybe.wrap(null) : fn(this.value);
}
}
That's it! That's all to to monad. You can use the same pattern to build other monadic types, like List<T>, Promise<T>, IO<T>, as long as the wrap() and then() functions are built accordingly. Back to this example, to use it, let a = Maybe<int>.wrap(4) // construct a monadic value
let b = a.then(x => Maybe<int>.wrap(x + 1)) // add 1 to it
let c = Maybe<int>.wrap(null) // construct a null monadic value
let d = c.then(x => Maybe<int>.wrap(x + 1)) // safely handle null; d is null
let e = Maybe<int>.wrap(5)
.then(x => Maybe<int>.wrap(x + 1))
.then(x => Maybe<int>.wrap(x * 2)) // chain the calls
let f = Maybe<float>.wrap(5.0) // The same Maybe on a different type
.then(x => Maybe<float>.wrap(null))
.then(x => Maybe<float>.wrap(x * 2)) // chain the calls; safely handle nullI did something similar for streaming but built it with a streaming protocol at the frame level wrapping the JSON messages [1]. The streaming protocol has support for both the LF based scheme and the HTTP Content-Length header based scheme. It's for supporting MCP and LSP.
[1] https://github.com/williamw520/zigjr/?tab=readme-ov-file#str...
https://www.wsj.com/us-news/california-dismantles-landmark-e...