Advertisement · 728 × 90

Posts by Tim Smart

🎉

1 year ago 4 1 0 0

I'm using nix instead of homebrew :)

1 year ago 2 0 0 0
Post image

🤔

1 year ago 4 0 3 0
Preview
read-lines-reverse.ts GitHub Gist: instantly share code, notes, and snippets.

gist.github.com/tim-smart/ee...

1 year ago 1 0 1 0

Will need to do a bit more work for the "line by line" part.

1 year ago 1 0 1 0
import * as Fs from "node:fs/promises"

export async function* readReverse(path: string, chunkSize = 1024) {
  const file = await Fs.open(path, "r")
  const stat = await file.stat()

  let pos = stat.size
  while (true) {
    pos = Math.max(0, pos - chunkSize)

    const chunk = Buffer.alloc(chunkSize)
    const result = await file.read(chunk, 0, chunkSize, pos)
    yield chunk.subarray(0, result.bytesRead).reverse()

    if (pos === 0) break
  }
}

import * as Fs from "node:fs/promises" export async function* readReverse(path: string, chunkSize = 1024) { const file = await Fs.open(path, "r") const stat = await file.stat() let pos = stat.size while (true) { pos = Math.max(0, pos - chunkSize) const chunk = Buffer.alloc(chunkSize) const result = await file.read(chunk, 0, chunkSize, pos) yield chunk.subarray(0, result.bytesRead).reverse() if (pos === 0) break } }

1 year ago 3 0 2 0
Preview
Effect 3.11 (Release)

@effect-ts.bsky.social 3.11 has been released!

Includes features like Effect.fn (auto-traced functions with better stack traces), Micro improvements and more.

Blog post is here: effect.website/blog/release...

1 year ago 9 2 0 1

@attilavecerek.bsky.social is a great dev - was really interesting to hear the challenges his team faces at Zendesk!

1 year ago 4 1 0 0
Adopting Effect at Zendesk with Attila Večerek | Cause & Effect #1
Adopting Effect at Zendesk with Attila Večerek | Cause & Effect #1 YouTube video by Effect | TypeScript at Scale

How Zendesk incrementally adopted Effect in a polyglot environment with a large codebase.

Cause & Effect Podcast with Attila Večerek – hosted by @schickling.dev

Give it a listen and let us know what you think about their approach!

www.youtube.com/watch?v=rNAq...

1 year ago 9 2 0 4
Advertisement
Effect Development: Second revision of HTTP API
Effect Development: Second revision of HTTP API YouTube video by Effect | TypeScript at Scale

Effect Development: Second revision of HTTP API

By Tim Smart @timsmart.co

www.youtube.com/watch?v=Opuf...

1 year ago 6 2 0 0