Next.js works quite well with this setup tbh. Using the middleware and the route.ts routes that it offers, a lot of code that should be handled server-side, is handled server side.
01.12.2024 20:31 β π 2 π 0 π¬ 0 π 0@marnixjanssen.com.bsky.social
Typescript and Rust @ https://pola.rs
Next.js works quite well with this setup tbh. Using the middleware and the route.ts routes that it offers, a lot of code that should be handled server-side, is handled server side.
01.12.2024 20:31 β π 2 π 0 π¬ 0 π 0Mostly CSR, but all authentication stuff is handled server-side. Building dynamic dashboards is quite difficult using SSR.
01.12.2024 20:29 β π 1 π 0 π¬ 1 π 0Appreciate the plug for Advent of Typescript @tkdodo.eu π
01.12.2024 13:51 β π 3 π 0 π¬ 0 π 0screenshot of zed editor, somehow both calming and vibrant, mmm
@zed.dev is so beautiful, a vibe
26.11.2024 02:27 β π 564 π 13 π¬ 54 π 6This is nice! I like the fact that queries are defined in a separate queries directory
25.11.2024 17:16 β π 0 π 0 π¬ 0 π 0eg.
- /data/queries/user.ts
import { queryOptions } form '@tanstack/react-query'
export const getPosts = queryOptions({
queryKey: ['posts'],
queryFn: getPosts,
})
- /components/feed.tsx
import { getPosts } from '/data/queries/user.ts'
const { data: posts } = useQuery(getPosts)
Defining your #reactquery queries with queryOptions is probably the easiest way to keep your growing application maintainable
25.11.2024 11:00 β π 2 π 0 π¬ 2 π 0A diagram shows how to use str.split, list.first / list.last, cast, pl.int_ranges, and explode, all together, to turn a dataframe where a column may contain ranges like "3-5" into a similar dataframe where all ranges have been expanded, or exploded, across multiple rows. The full code is: range_start = pl.col("nrs").str.split("-").list.first().cast(pl.Int64) range_end = pl.col("nrs").str.split("-").list.last().cast(pl.Int64) df.with_columns(pl.int_ranges(range_start, range_end + 1)).explode("nrs")
How to βexpandβ ranges like "3-5" across new rows with the values 3, 4, 5?
This comes straight from our Discord server (discord.com/invite/4UfP5...)
Diagram showing how `value_counts` produces a column with struct values, mapping column values to their counts. We then show how to use `.struct.field` to extract a single field from the struct and how to use `.struct.unnest` to extract all fields into corresponding columns.
Why is there a `struct` data type?
A single expression produces a single column, so expressions like `value_counts` need to output structs to map the values to their counts.
With that said, do you understand why `.struct.unnest` doesn't break the 1 expr = 1 column principle?
A while ago I built my first OS project in Rust: a Telegram bot. It shares filterable deals subscribers. As of now, the bot shared over 1.2 million deals to subscribers, using only a Redis DB, without a second of downtime (thanks for hosting @glenndehaan.com π)
github.com/mjanssen/pep...
first post, i came here to say i made a thing today:
github.com/aidenybai/re...
@tannerlinsley.com What would/should stop me from migrating our (still) relatively small Next.js frontend to @tanstack.com Start?
14.11.2024 10:37 β π 1 π 0 π¬ 1 π 0π
14.11.2024 10:34 β π 0 π 0 π¬ 0 π 0