4,363 karma · joined December 18, 2009
https://github.com/dwwoelfel
https://twitter.com/danielwoelfel
YC Badge: 0x9e3313e5bd4204ba554c8615b35b4d99d089d31d
For example:
(let [result {:a 1}
result (assoc result :b 2)]
...)
He mentions that C and C++ allow const variables, but Clojure doesn't support that.clj-kondo has a :shadowed-var rule, but it will only find cases where you shadow a top-level var (not the case in my example).
https://yt-better-subs.web.app/
I went through quite the hassle to get the app's oauth scopes approved with Google so that it can keep your subscriptions up-to-date as you add or remove YouTube channel subscriptions.
1. Set up logical replication to a new database server. We used https://github.com/2ndQuadrant/pglogical, but maybe you don't need that any more with newer versions of postgres?
2. Flip a feature flag that pauses all database queries and wait for the queue of queries to complete.
3. Wait for the query queue to drain and for replication to catch up.
4. Flip a feature flag that switches the connection from the old db to the new db.
5. Flip the flag to resume queries.
It helped that we were written in OCaml. We had to write our own connection pooling, which meant that we had full control over the query queue. Not sure how you would do it with e.g. Java's Hikari, where the query queue and the connection settings are complected.
We also had no long-running queries, with a default timeout of 30 seconds.
It helped to over-provision servers during the migration, because any requests that came in while the migration was ongoing would have to wait for the migration to complete.
https://g.co/bard/share/7966410c42af
ChatGPT also figured it out, but Bard is much better at displaying information: https://chat.openai.com/share/ba5d5acc-7b40-46e1-ada5-74b4a6...
1. Make `globalId` part of a "Node" interface that all of the types implement. This will work better with tooling like Relay (used for refetching and caching). It will also let you add a `node` field that can be used to fetch any node in the graph.
2. Make the sort input an enum so that you have `sort: TITLE_DESC` instead of `sort: {by: TITLE, order: DESC}`.
3. Implement the connection spec instead of returning a list of items: https://relay.dev/graphql/connections.htm. This will let you add pagination data to the field and other useful info like totalCount.
4. Spin up a postgraphile instance with the `@graphile-contrib/pg-simplify-inflector` and `postgraphile-plugin-connection-filter` plugins and copy everything they do.
But maybe that's the kind of criticism he was trying to avoid in the first place!
Those affected will gain access to the company’s “generous severance philosophy” and “a talent hub to allow them to opt-in to receive additional support services.” (The details surrounding the severance package are unclear, but some affected workers on Blind alleged they would receive two months worth of base pay; a representative from Coinbase did not provide further comment.)
I had just started the book when I watched her video, and I counted four separate times where he did mention total energy gain. In one chapter (pg. 142 in my kindle edition), he quotes from a source who lays out the distinction she claims people in fusion research want you to be confused about:
Like First Light Fusion, Tokamak Energy is much more interested in power production than energy breakeven. "Achieving a of one is a scientific goal," Jonathan Carling continues, "but it's nowhere near enough to produce commercial energy, which requires a Q [in the region] of tens." As mentioned previously, Q is the ratio of fusion power out to heating power in. His strong view is that unless other star builders have a credible plan to get to factors of twenty or thirty more power out than they put in, then they're in the science game and not the fusion energy game.
This video by the Improbable Matter channel has a good response to Dr. Hossenfelder's general remarks: https://www.youtube.com/watch?v=KtqC8W0_Ups
It is unethical to leave that up after Fastly pointed out core issues with the benchmarking, like using a free tier that was rate-limited.
It's nice that eastdakota responded here, but he had two weeks since the original tweet thread from Fastly's VP of Eng calling out the problems with their benchmarking. They didn't respond or retract the blog post in those two weeks.
As a cloudflare shareholder (and a fastly shareholder), I want Cloudflare to act ethically and either retract the blog post or issue a correction.
Are you going to remove the ToS clause or issue a correction on the blog post?
Here's an example query that will poll an npm package and send a payload whenever the latest version changes.
https://www.onegraph.com/graphiql?shortenedId=FYH1SY
subscription PollNpmPackage {
poll(
webhookUrl: "https://example.com"
onlyTriggerWhenPayloadChanged: true
schedule: { every: { minutes: 60 } }
) {
query {
npm {
package(name: "graphql") {
distTags {
latest {
versionString
}
}
}
}
}
}
}
This is just an illustrative example. I used NPM because it doesn't require any authorization. We also support proper subscriptions for NPM that listen to their couchdb change feed.It's a very imperative process and fairly slow on a cpu, but the nice thing is that I can run the same code in the browser to speed up development. The Rust project, https://github.com/Aloxaf/silicon, mentioned in another part of the comments is probably faster, but I didn't find it when I was searching for a solution.
For the languages I don't know, I looked at the code people posted on rosettacode.org
I initially used carbon.now.sh, but they don't have an API, and the community-provided API is pretty slow because it uses a headless browser to generate the image.
Source Code Shots uses VSCode's syntax-highlighting engine, so the highlighting is about as good as you can get and I can fully support a lot of languages that CodeMirror or Highlight.js haven't gotten to.
The docs, https://sourcecodeshots.com/docs, have plenty of examples of how to use it as an API. You can email me at daniel@onegraph.com if there's something you need that it doesn't support.
People who already knew Clojure had a tendency to overcomplicate things with solutions that used every bit of their Clojure knowledge.
They won't pay you any money, but they're very responsive in my experience. Things usually get fixed.
The cloud version is running at https://precursorapp.com
Are you saying that GCP has seamless upgrades? Any link to a doc? The only one I can find has you dump the database and restore it: https://cloud.google.com/sql/docs/postgres/upgrade-db