Tim Smart's Avatar

Tim Smart

@timsmart.co

I hack on effect.website

213
Followers
8
Following
8
Posts
02.11.2024
Joined
Posts Following

Latest posts by Tim Smart @timsmart.co

πŸŽ‰

23.12.2024 18:42 πŸ‘ 4 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

I'm using nix instead of homebrew :)

17.12.2024 00:18 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

πŸ€”

16.12.2024 03:20 πŸ‘ 4 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0
Preview
read-lines-reverse.ts GitHub Gist: instantly share code, notes, and snippets.

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

05.12.2024 22:14 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

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

05.12.2024 21:54 πŸ‘ 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 } }

05.12.2024 21:51 πŸ‘ 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...

02.12.2024 02:07 πŸ‘ 9 πŸ” 2 πŸ’¬ 0 πŸ“Œ 1

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

27.11.2024 01:04 πŸ‘ 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...

26.11.2024 16:34 πŸ‘ 9 πŸ” 2 πŸ’¬ 0 πŸ“Œ 4
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...

10.11.2024 07:39 πŸ‘ 6 πŸ” 2 πŸ’¬ 0 πŸ“Œ 0