Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
spion
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
211.
▲
by
spion
4y ago
We really don't know why LLMs have the most of their emergent capabilities. The entire GPT-3 paper was about being surprised about it.
212.
▲
by
spion
4y ago
> Sorry, which emergent capabilities are you talking about? You're trying to slip in that there even are emergent capabilities, when in fact there's literally nothing unexpected which has emerged. Given how LLMs work, literally
213.
▲
by
spion
4y ago
What would you use instead?
214.
▲
by
spion
4y ago
1. can be fixed with typescript 2. can be fixed with Deno - https://deno.land/manual@v1.31.3/basics/permissions 3, 4, 5. Why not have that wrapper to solve those? (AFAIK you do need the wrappers for jsonnet too)
215.
▲
by
spion
4y ago
Its not JSON though, its more of a stripped down purely functional language - functions are quite central.
216.
▲
by
spion
4y ago
We don't understand them. There is a key difference between building something from parts and running gradient descent to automatically find the network connectivity. That difference is that we don't understand the final result at
217.
▲
by
spion
4y ago
I meant that nobody knows. There is a big difference between knowing how the models are trained and knowing how they actually work. This is a basic problem of machine learning (explainability) and we're nowhere understanding how or why
218.
▲
by
spion
4y ago
No we don't
219.
▲
by
spion
4y ago
I've been trying GPT-4 for the past few weeks on some more generic (technical, not business domain related) but difficult problems for a side project. The harder the problem the more its help tilts into net-negative rather than net-pos
220.
▲
by
spion
4y ago
Haskell doesn't have the documentation / doctest / code examples culture of Rust, cargo is arguably a better experience than any of the Haskell package management options (at least last time I checked) and I don't believ
221.
▲
by
spion
4y ago
Also, the requirement to manually order the compilation units (files) in an XML file to ensure the compiler doesn't get confused. They had me at features, lost me at manual compilation ordering.
222.
▲
by
spion
4y ago
I was trying to discuss the merits or demerits of hooks overall - just wanted to point out that a class based design doesn't need to be significantly less powerful or HoC-level awkward to use. (I can't resist commenting I suppose
223.
▲
by
spion
4y ago
And yeah I totally agree with you regarding `cargo`, in my mind thats also one of the things that don't seem to be related to the language but the quality of life improvements end up being huge.
224.
▲
by
spion
4y ago
> I had thought that maybe the framework could pass a more limited delegate for the instance to the constructor to prevent people from doing something silly with it, but that would prevent you from assigning a property safely anyway. Tha
225.
▲
by
spion
4y ago
I would typically save the result of calling debounce (once), then call that, rather than calling debounce over and over on the same inline function (hooks style). My debounce implementation would *not* be trying to catter to some API that
226.
▲
by
spion
4y ago
The class version is class ViewportHook { constructor(component) { this.viewportState = component.addState(this, initialValue) component.addEffect(() => { return watchViewport((x, y) => this.viewportState.s
227.
▲
by
spion
4y ago
The reason why I don't think HTML is the ideal way to represent HTML declaratively is because HTML does not have pure functions or any sort of proper first-class values.
228.
▲
by
spion
4y ago
> React function components are not constructor functions though, so I don't see how those are relevant I'm giving an example of whats a normal use case of closures. Running a single function once that creates closures that run
229.
▲
by
spion
4y ago
> Closures work exactly the same as they always do, but they're also something a lot of people struggle with and always have. Its not normal for a render function to run all the time but the closures mentioned in it to be completely
230.
▲
by
spion
4y ago
It really IS weird to reason about. `useEffect(f, [])` runs on every render, but only installs the effect once. The other times its not installed. That means standard language facilities such as *closure capture* don't quite work as ex
231.
▲
by
spion
4y ago
see https://news.ycombinator.com/item?id=35192312
232.
▲
by
spion
4y ago
Good question. component.use(SubHook, param) could be used, that would pass the param as a second argument to the constructor. The main reason why this isn't the case, I think, is concurrent mode. Hooks force certain values to b
233.
▲
by
spion
4y ago
Its not quite that simple. Some of the things that Rust gets right are subtle, but typically punted by many other languages. Documentation containing fully working examples due to thos examples being run by doctests, for example, is kinda r
234.
▲
by
spion
4y ago
Thats purely a React API limitation. The hook API could be class based: class ViewportHook { // API on use constructor(component) { this.viewportState = component.addState(this, initialValue) const unsubscr
235.
▲
by
spion
4y ago
> impossible with class components I'm not sure thats really true. In a different world, the react constructor functions would have access to `this.useState` and `this.useEffect` and then you could extract any logic you like by disp
236.
▲
by
spion
4y ago
> HTML is already the ideal way to represent HTML declaratively I'm curious what you mean by "declaratively", and I wonder why everyone puts so much value into that particular idea. What is declarative? Is it different
237.
▲
by
spion
4y ago
Haskell doesn't (or didn't last time I tried it) have the documentation and example culture of Rust.
238.
▲
by
spion
4y ago
Its absolutely hacketty, yes. Not familiar with Drupal.
239.
▲
by
spion
4y ago
I did, and I should've listed it. Its my third favorite typed language. At the time I was trying it, its type system wasn't as expressive as TS is today (no algebraic data types, no Result<T> error modelling in the type syst
240.
▲
by
spion
4y ago
1. They work by setting a global variable to the value of the current component then calling the render function. Whenever you call a hook you're effectivelly dispatching it to the component in question, OOP style. 2. React counts the
More ›