Readit News logoReadit News
avernet commented on Useful built-in macOS command-line utilities   weiyen.net/articles/usefu... · Posted by u/yen223
hk1337 · a year ago
> which hear

> hear not found

macOS 15.1

avernet · a year ago
Someone needs to create a brew formula for `hear`.
avernet commented on Show HN: Repogather – copy relevant files to clipboard for LLM coding workflows   github.com/gr-b/repogathe... · Posted by u/grbsh
ukuina · a year ago
It's fascinating to see how different frameworks are dealing with the problem of populating context correctly. Aider, for example, asks users to manually add files to context. Claude Dev attempts to grep files based on LLM intent. And Continue.dev uses vector embeddings to find relevant chunks and files.

I wonder if an increase in usable (not advertised) context tokens may obviate many of these approaches.

avernet · a year ago
And how does repogather do it? From the README, it looks to me like it might provide the content of each file to the LLM to gauge its relevance. But this would seem prohibitively expensive on anything that isn't a very small codebase (the project I'm working on has on the order of 400k SLOC), even with gpt-4o-mini, wouldn't it?
avernet commented on Ask HN: What's the fastest tool for basic CRUD?    · Posted by u/xupybd
camkego · 6 years ago
You shouldn't overlook Orbeon Forms, it has history going back to 2007 (it seems quite mature). I believe it can just be used like a robust black box to do both CRUD and HTTP web front ends.
avernet · 6 years ago
Yes, Form Builder, in Orbeon Forms, allows you to create a page with form fields, use the provided values to call a REST/CRUD API, and show the result on that page. You can try that out for yourself on demo.orbeon.com, or download the software and run it locally.

There is an open source (LGPL) Community Edition, but the services & actions feature you need for this is only available in the Professional Edition. This being said, if you just need this for your own local testing, you can get a trial license (automatic process, valid 3 months, no limit on number of licenses you get), and have fun with it.

Bias: I'm one of the Orbeon Forms developers ;). ‑Alex

avernet commented on Transducers are coming to Clojure   blog.cognitect.com/blog/2... · Posted by u/siavosh
wyager · 11 years ago
For those curious a about this, look up Haskell's `build` and `destroy` functions. Those functions are for church-encoding lists and doing optimizations that way.
avernet commented on Transducers are coming to Clojure   blog.cognitect.com/blog/2... · Posted by u/siavosh
richhickey · 11 years ago
These sigs are for the arities below only.

map f: (a->b)->(x->b->x)->(x->a->x)

filter pred: (a->bool)->(x->a->x)->(x->a->x)

flatmap f: (a->[b])->(x->b->x)->(x->a->x)

etc.

avernet · 11 years ago
OK, maybe we're getting somewhere. Let me try to write this `map`, just to see. I'm using Scala, so I can put some types, and have the compiler yell at me if I'm doing something overtly wrong (I need all the help I can get!).

For clarity, let's define a type alias for reducers:

    type Reducer[X, A] = (X, A) ⇒ X
Let's define `map` to match the type definition you provided. And with that type definition, I only see one way in which the function can be implemented. So it must be:

    def map[X, A, B](f: A ⇒ B): (Reducer[X, B] ⇒ Reducer[X, A]) =
        (redB: Reducer[X, B]) ⇒ (x: X, a: A) ⇒ redB(x, f(a))
How can I use this? Let's try the following:

    def addup(zero: Int, a: List[Int]) = a.foldLeft(zero)(_ + _)
    def parseList(a: List[String]) = a.map(_.toInt)

    map(parseList)(addup)(1, List("7", "8"))
This returns 16. OK, parsing the list, and adding up starting from 1. But it doesn't look to me like `map` implements anything like the usual semantic of map. It just converts the data structure, and applies the reducer. What am I missing here?

avernet commented on Transducers are coming to Clojure   blog.cognitect.com/blog/2... · Posted by u/siavosh
richhickey · 11 years ago
No, (map f) is not curried map. It returns an entirely different thing - a function of reducing function to reducing function, aka a reducing function transformer, aka a transducer.
avernet · 11 years ago
Providing the signature of this new `map` function (e.g. as in Haskell's fmal http://www.haskell.org/hoogle/?hoogle=fmap), would certainly go a long way towards helping people understand what this `map` does.

u/avernet

KarmaCake day15June 20, 2014View Original