HNHacker News
TopNewBestAskShowJobs

enugu

457 karma · joined February 12, 2016

Google email id : harshavr
submissionscomments
enugu··on Recent results show that LLMs struggle with compositional tasks
This has been pursued by researchers like Rodney Brooks. See also https://en.wikipedia.org/wiki/Embodied_cognition
enugu··on Recent results show that LLMs struggle with compositional tasks
There is a whole genre of essays like this talking about behaviour in a human specific way. But, I wish they engaged with the notions of the Church-Turing thesis and the Universal Turing Machine which indicates that any behaviour following standard physics principles is in fact computable.

(FWIW, I dont think that humans can be reduced to computing, but the Church-Turing thesis is a powerful counterargument which more biologists and psychologists should engage with).

enugu··on Why do bees die when they sting you? (2021)
Sure, you won't get exact predictions on which genetic codes are realized. Similar to how statistical physics doesn't predict microstates, but the macro picture is understood. Even that might be too ambitious for complicated systems, but you can still have sensible predictions from evolution theory which looks at a landscape and says that there will be animals with tall necks and predators with very fast speeds even if you didn't know beforehand about giraffes and cheetahs.

In the fractal analogy, the compressed theory does not predict that exactly this point does/does-not lie on the fractal, but predicting whether a small disc around the point intersects the fractal.

enugu··on Why do bees die when they sting you? (2021)
This is an interesting analogy, thanks.

But, doesn't this match the parent comment's point? If someone asks why a particular point and not, a nearby point is on the fractal, the reply is just that complicated program generated this number and not another number. It leads to the theme of incompressibility (is there a program of smaller length which can correctly check whether a point in a given region is on the fractal). Sometimes, programs are incompressible, and at other times there is a local explanation.

So, people writing on this topic should be careful to make this distinction and check if their local explanation (which is a 'compression' of the evolution process) actually classifies points into fit/unfit regions with the assumption that the points are in some common region(shared features in the environment).

Compare also with explanations of historical events(list of causes for a victory but with the same causes present, there is failure in another context) and atheist - religious debates on God's grace for a particular prayer and allowing the suffering of others. If a local explanation can't distinguish events, then the global explanation has to be validated by something else.

enugu··on Databases in 2024: A Year in Review
There have been proposals to have global state in programming languages which function like databases with the advantages of monitoring/persistence/naming etc, but also retain the modularity of local state.

https://www.scattered-thoughts.net/writing/local-state-is-ha...

https://awelonblue.wordpress.com/2012/10/21/local-state-is-p...

enugu··on The Cognitive Style of PowerPoint [pdf]
Some of Tufte's criticism of slide bullets is not specific to PowerPoint, but could be extended to software which work with nested nodes like Roam/Workflowy(software which I like). Workflowy, in fact, allows you to convert a tree of nodes into a linear presentation. Wittgenstein also wrote his classic books as numbered nodes (though not nested).

Indeed, this can also be seen as a critique of structured code editors vs text editing. Mathematics books also follow tree structure a bit, (Def 6.3.1, Example 6.3.2), though there often is some connecting narrative.

The point about oversimplification to fit into a single slide is specific to PowerPoint. But, the critique that organization into discrete nodes often skips over an underlying narrative or a causal structure which connects the nodes is more general.

What can be said in defense of discrete organization? Firstly, the overall narrative is not initially apparent. Listing the pieces together can help to discover this structure.

Secondly, in long essays, the larger point often gets buried in the details. This is especially true in mathematical works where the purpose of a complicated definition/result is only seen a long time later. This also happens in source code, where a lot of preprocessing obscures the central purpose of a function (though of course, source code is not a candidate for a report with sentences anyway).

By forcing these documents to become less dense, the narrative actually becomes more apparent. Whereas with a dense document, the reader's attention can wander away before the punchline.

One issue that Tufte seems to not discuss in the oversimplification critique is that attention/time is limited. Since an organization leader cant read all reports 3 levels down the ladder (either usual style reports or nested trees), there needs to be a strategy for marking specific reports as important and also to mark which details from the document need to be passed on to higher levels of decision making and which details should be only relevant to middle managers.

In the Columbia report, the problem is not oversimplification but that the critical conclusion was mentioned as a low level detail whereas a methodology of choosing a 'conservative' model became the heading.

Could a usual technical report have avoided this issue? The 'conservative' phrase could well have been a section heading and the damage indicated in sentence buried inside the section. But a technical report also has a 'Conclusion' section which could have forced the authors to state their position clearly. This 'Conclusion' section is implicitly a protocol for which information in the report has to be passed up to a higher level. IPCC Reports have a 'Summary for Policymakers' in discrete points (https://www.ipcc.ch/sr15/chapter/spm/). Tufte, for some reason, doesn't like "Executive Summary".

enugu··on Fermat's Last Theorem – how it’s going
Don't think you should be intimidated just by reading the article itself. It is using several domain specific terms. But you would encounter that in many other contexts - for instance a group discussing an intricate board game you are seeing for the first time.

However, unlike board games where the concepts can be explained to you in a few minutes (usually it becomes clear only when you play), a lot mathematics especially algebraic geometry/number-theory can have many layers of dependencies which takes years to absorb.

It would be interesting to compare it to understanding a large open source project like the Linux kernel, well enough to contribute. I would say it is not so conceptually deep as mathematics of the article (while still having a few great ideas). But understanding the source would require familiarization with 'tedious details' which incidentally, what this article is also about.

So the issue, stated this way, is not so much raw talent as time and effort. This leads to the topic of motivation - finding something great in an idea can lead to investment in the subject. For those more talented, the journey might be easier.

Alan Kay's maxim is crucial - a change of perspective can simplify things relative to 80 extra IQ points. A long sequence of technical steps can be compressed into a single good intuitive definition/idea like the complexity of navigating a path becomes clear from a higher viewpoint.

Grothendieck, considered by many to be the best mathematician of the past century, made the point that there were several colleagues who were more proficient at symbolic manipulation. But, he was able to look at things with a more foundational perspective and could make great contributions.

Here's a good essay by Thurston "Proof and Progress in mathematics". https://arxiv.org/pdf/math/9404236

He discusses this problem of being intimidated by jargon.

enugu··on From where I left
One of the motivations of copyleft licenses like GPL which are a part of open source, was the freedom for users to see and modify code. The fact that the user works with the software in a browser rather than inside a native app is a technicality which shouldn't mean that the principle becomes invalid.

Of course, this makes it harder for developers to monetize their work. But, instead of framing the discussion in terms of these conflicting interests and finding a balance, the term 'open source' becomes a debate target (even though the OSI definition includes AGPL which is also radioactive if one wants to monetize the work.)

So we have three parties 1) Users 2) App Developers who write commercial closed source code for the user facing app 3) Dependency Developers who write code used by App Developers.

(There is a simplification here as 2 can be a startup writing selling a closed source dependency used by other developers)

Just as App developers would like to monetize via user payments, some licenses allow the same option for Dependency developers while simultaneously allowing source code to be available and modified.

The basic idea behind such a license is 'free of cost and inspectable/modifiable code for almost all users, but commercial for large companies making a significant revenue from the software'.

There needs to be some work done, to make the license predictable - which users it requires to pay, and the price involved.

enugu··on From where I left
It is absurd to call this license change stealing when the previous work is still available under the original license. This is more like someone who is giving to the community, still continuing to give, but with a slightly more strict license. Do you expect someone who is doing philantropic work, gets contributions from others, but later becomes less philantropic to change their name?

> NEVER NEVER NEVER have had the traction

There is plenty of even closed source software which has traction in many domains, let alone software released under a license which as anti-rez points out allows the users to freely run their websites on redis, modify and redistribute code etc.(with the exception of running hosting services like Amazon).

For instance, it would be amazing and a great improvement if there was a top-quality CAD program with a similar license to Redis.

enugu··on Move semantics in Rust, C++, and Hylo
In this discussion of a specific point in the post, the promise of Hylo language and mutable value semantics can be overlooked.

Namely, we get a lot of the convenience of functional programming (mutating one variable doesn't change any other variable) with the performance of imperative languages (purely functional data structures have higher costs relative to in-place mutation and are more gc-intensive).

https://docs.hylo-lang.org/language-tour/bindings

enugu··on 8 months of OCaml after 8 years of Haskell in production (2023)
OCaml is not an unsophisticated language. It inherits the features of ML and has first class modules, which is not present by default in Haskell (present in backpack). Not having first class modules leads to a lot of issues.

Also, there is a better story for compilation to the web.

enugu··on Functional Programming Self-Affirmations
"Make illegal states unrepresentable" can be done by encapsulating the variables inside a single data object(struct/class/module) and only exporting constraint respecting functions. Also, Algebraic Data Types can be present in FP/non-FP languages.

The Result monad can be implemented in any static language with generics (just have to write two functions) and in a dynamic language this is easy (but return will have to be like T.return as there is no implict inference).

I didn't get the relation between FCore/IShell and DSLs, the main requirement for FCore is a good immutable library. Macros help DSLs though that is orthogonal.

But really, my main point is that OOP vs FP is red herring as 3/4 aspects which characterize OOP can be potentially done in both OOP and FP, with different syntax. We shouldn't conflate the first 3 with the 4th aspect - mutability.

An OOP language with better extension mechanism for classes +immutable data structure libraries and a FP language with first class modules would converge. (ref: Racket page below and comment on Reason/OCaml down the page).

See Racket page on inter-implementability of lambda, class, on the unit(ie. a first-class module) page here (https://docs.racket-lang.org/guide/unit_versus_module.html). Racket has first class 'class' expressions. So, a mixin is a regular function.

enugu··on Functional Programming Self-Affirmations
Doesn't skipping view layers mean that constraints held by intermediate layers can be violated?

Say a city stats(location, weather) component is held inside a region component which in turn is in charge of a product route generating component (which also contains a separate 'list of products' component).

You can't update the city coordinates safely from the top as the region component enforces that the cities are within a maximum distance from each other. The intermediate constraint would have to be lifted to the higher level and checked.

Edit: There is also a more basic problem. When your app has multiple types of data(product, city), the top level store effectively becomes a database(https://www.hytradboi.com/2022/your-frontend-needs-a-databas...). This means that for every update, you have to figure out which views change, and more specifically, which rows in a view change. This isn't trivial unless you do wholesale updates (which is slow), as effects in a database can be non-local. Your views are queries and Queries on streaming data is hard.

The whole update logic could become a core part of your system modelling which creates an NxM problem (store update, registered view -> does view update?). This function requires factoring into local functions for efficient implementation which is basically the data dependency graph.

enugu··on Functional Programming Self-Affirmations
This page (https://reasonml.github.io/docs/en/module) is useful to see how a FP language can do what he wants. Because we have functors, which are functions from a group of modules/classes to another module/class, we can have Composition, Inheritance(single/multiple), Mixins etc.
enugu··on Functional Programming Self-Affirmations
To your main point, I wouldn't say exactly that the component stores the state. But, rather that every component provides an initial value, possible events, and a default event handler which is a function from value to value. In effect, this is partially 'storing local state', but the above pieces can be composed to create a container component.

Note that there is no option really - the app wont be reimplementing how a key is handled in a text box. But composability means that the same principle should hold not just for OS/browser components but also for higher level components (A custom map or a tree-view where there are restrictions on types and number of nodes - these should also have default handling and delegation to upper levels.)

The global store choice makes it harder to have component libraries. But, the composable alternative has its problems too - redundancy and communication which skips layers (which requires 'context' in React).

enugu··on Functional Programming Self-Affirmations
This is a digression, but regarding OOP, my somewhat provocative view, is that it is not a natural thing, but in most languages, it is atleast 4 different concepts 1. Encapsulation/Namespace, 2. Polymorphism, 3. Extensibility(Inheritance is a special case) 4.Mutability.

These four concepts are forced/complected into a 'class' construct, but they need not be.

In particular, FP only varies on 4, but languages like ML,Clojure do 1,2,3 even better than OOP languages. Modules for encapsulation, Dispatch on first or even all arguments for polymorphism and first class modules, ML style, for extensibility.

Aside: There was a recent post (https://osa1.net/posts/2024-10-09-oop-good.html) (by someone who worked on GHC no less), favorably comparing how OOP does extensibility to Haskell typeclasses, which are not first class, but modules in ML languages can do what he wants and in a much more flexible way than inheritance!

There is also the dynamic aspect of orginal OOP - message passing instead of method invocation, but this is about dynamic vs static rather than OOP vs FP.

What OOP languages have managed to do which static FP hasn't done yet is the amazing live inspectable environments which lead to iterable development like we see in Smalltalk. The challenge is to do this in a more FP way while being modular.

enugu··on Functional Programming Self-Affirmations
FP nerd: The pure core is nice and composable, with the imperative shell at the boundary.

State Skeptic: Yes, But! How do you compose the 'pure core + impure shell' pieces?

FPN: Obviously, you compose the pure pieces separately. Your app can be built using libraries built from libraries.... And, then build the imperative shell separately.

My take is that the above solution is not so easy. (atleast to me!) (and not easy for both FP and non-FP systems).

Take an example like GUI components. Ideally, you should be able to compose several components into a single component (culminating in the app) and not have a custom implementation of a giant state store which is kept in something like Redux and you define the views and modifiers using this store.

Say, you have a bunch of UI components each given as a view computed as a function from a value and possible UI events which can either modify the value, remain unhandled or configurable as either. Ex: dialog box which handles text events but leaves the 'OK' submission to the container.

There are atleast two different kinds of composability (cue quote in SICP Ch1 by Locke) - aggregation and abstraction. Ex: Having a sequence of text inputs in the document(aggregation) and then abstracting to a list of distances between cities. This abstraction puts constraints on values of the parts, both individually(positive number) and across parts(triangle inequality). There is also extension/enrichment, the dual of abstraction.

This larger abstracted component itself is now a view dependent on a value and more abstract events. But, composing recursively leads to state being held in multiple layers and computations repeated across layers. This is somewhat ameliorated by sharing of immutable parts and react like reconciliation. But, you have to express your top->down functions incrementally which is not trivial.

enugu··on Traits are a local maximum
Yes, I do agree with you - live image programming has to be composable/comprehensible/reproducible, and crucial state shouldn't be in anonymous objects. (I've even thinking of replacing mutable objects with with pure functions modifying a a tree of data). Types is another direction and the work on Strongtalk has proved influential for popular VMs.

But, we dont need to go back from objects to files, except for the purpose of interacting with the OS. Richer structures actually help comprehensibility. For instance, revision control operating at a structural level. UNIX would have much nicer, if something like nushell had been adopted from the beginning, and the 'little pieces' used to build the system worked on structured data.

enugu··on Traits are a local maximum
OK, but files are external to the system. Within the Smalltalk environment, everything is an object and files are required as the ambient OS works with files. You can say that some objects within the environment, containing program source are playing the same role as source files in usual programming. Even there, one can have a richer interface than text/binary files.
enugu··on How to give a senior leader feedback without getting fired
Reasonable observations on office behaviour are being processed into glib stereotypes on culture. Employees routinely show discontent in India, (just one instance https://www.reuters.com/world/india/workers-apple-supplier-f...). So much so, that labour disputes are considered a major obstacle to corporate investment. Like Europe, India has labour laws which make people hard to fire.

There are other factors involved - if a H1B employee, whose job security is tied to the employer risks taking a 10x salary cut or more by going back home, then a fear for job security leading to such behaviour is a given.

enugu··on Traits are a local maximum
Sure, files are a detail. But, the concept of namespace doesn't need to be attached to a file, it can just be a convenient convention to attach a namespace to a file. In live environments like Smalltalk images, there are no files.

I think what /u/dominicrose is trying to get at was that OOP bundles together things which need not be and in doing so, one loses flexibility. OOP is Encapsulation(can also be done via namespaces/modules), Polymorphism(can be done by functions with a dispatch based on first argument) and Reuse/Extensibility(inheritance is a special case, there are many other ways to build a new class/data-type from older ones, composition being one).

Often, this is not recognized in discourse and we end up with a 'OOP vs FP' discussion [1] even though the issue is not im/mutability. In fact, the discussion in article of [1] is actually about what is being discussed in this article. Should one do polymorphism via named implementations like in ML or anonymous ones like in Haskell/Rust? Inheritance in standard OOP languages counts as named implementations as the subclass has a name. Named implementations require more annotation but also have certain advantages like more clarity in which implementation to use and don't expose type parameters to user of the library (which happens with typeclasses).

[1] https://news.ycombinator.com/item?id=41901577

enugu··on A joke in approximating numbers raised to irrational powers
Yes, I should have mentioned polynomials with rational coefficients(or indeed any algebraic numbers as coefficients due to transitivity of being algebraic).
enugu··on A joke in approximating numbers raised to irrational powers
One interesting result implies that numbers like 3^(sqrt(3)) will be transcendental (ie no polynomial will evaluate them to 0).

https://en.wikipedia.org/wiki/Gelfond%E2%80%93Schneider_theo...

enugu··on A BBC navigation bar component broke depending on the external monitor
This is a good account of a software modelling process. But, this is not specific to booleans. Database constraints involve the same issue. One motivation for encapsulation in software was to preserve constraints in the data (or in other words, disallow improper states). Encapsulation allows only internal functions to manipulate the data, and the developer just needs to checks that these functions are doing it correctly.

Or, as pointed out in the post where multiple booleans are merged into a single enum, encode the constraints into the data itself ie. use the constraints of the host programming language.

But this wont be possible in general - for instance if your language doesn't have sets/dictionaries, how would you encode uniqueness of values directly using arrays and lists? It would have to be done using interface functions.

enugu··on A Mathematician in a School of Art
A formal program with funding, faculty and grad students would greatly help to make something which is not superficial. (Although I don't know of how much making art is a university subject, art criticism seems to be more in vogue).

Currently, undergrads take double majors (Witten was a history grad!). But, this doesn't tend to happen at the graduate level. The obstacles can be getting funding(siloed into departments), and courses being demanding enough already for one subject.

Faculty sometimes do hold a side appointment in other departments. But, the main incentive emerging from the academic job system is to get specialized expertise and publish in high reputation journals.

enugu··on How I ship projects at big tech companies
There is a tendency here to pattern match the advice in this article with frustrating experiences about office politics. But I dont see this as a post about politics.

Rather, what I got was that the spec is an incomplete description and there needs to be more inquiry into how the software is going to be used. This can require a little bit of 'going up the stack' to see how business need relates to the software requirement(single enterprise customer with a precise requirement, acquisition of new customer, software for some internal vision of CEO etc). Compare with a startup where one doesn't even have a spec and one is trying to find a product-market fit or when developers take sales calls and find new insights on how the software is actually being used.

A completely broken spec is indeed a failure in management process. But, in general, it helps a library developer to think beyond a library spec and see how it is being used.

enugu··on IronCalc – Open-Source Spreadsheet Engine
Hyperfiddle and Quadratic implement some of the items on your wishlist (richer data types, modern programming languages, working with arrays, better connectivity to data tools).
enugu··on Rust for tokenising and parsing
We can think of the Compiler as a function from a string to a string - high level (HLC), to low level code(LLC). LLC can include the garbage collection code(if it is run as a standalone executable instead of garbage collection being done by a separated runtime).

The compiler executable itself is running in a compilation process P which uses memory and has its own garbage collection. (The compiler executable was itself generated by a compilation, using a compiler written in Go itself(self-hosting) or initially, in another language).

But the compilation process P is unrelated to the process Q in which the generated code, LLC, will run when first executed. The OS which runs LLC doesn't even know about the compiler - LLC is just another binary file. The garbage collection in P doesn't affect garbage collection in Q.

Indeed, it should be easy for the compiler to generate an assembly program which constantly keeps allocating more memory until the system runs out, while compiling say a loop which allocates a struct within a loop running a billion times. Unless, of course, you explicitly also generate a garbage collector as part of the low level code.

Your question does become very interesting in the realm of security, there is a famous paper called "Trusting Trust" where a compiled compiler can still have backdoors even if the compiled code is trustworthy and the compiler code is trustworthy but the code which compiled the compiler had backdoors.

enugu··on Programming languages that blew my mind (2023)
The overtyping seems not about not about static vs dynamic but about nominal typing(functions based on the abstract type) vs structural typing/row-polymorphism (functions based on specific fields). Go seems to have structural typing, though less used. Do you have the same problem with overtyping while using structural typing?

There was a very similar complaint [1] ("OOP is not that bad") favorably comparing the flexibility of OOP classes in Dart vs typeclasses in Haskell. But as pointed out by /u/mutantmell [2], this is again about lack of 'structural typing' at the level of modules with exported names playing the role of fields. First class modules in functional languages like ML (backpack proposal in Haskell or units in Racket) allow extensible interfaces and are even more expressive than classes in most usual OOP languages. First-class modules are equivalent to first-class classes [3] ie. a class expression is a value, so a mixin is a regular function which takes a class and returns a class. Both are present in Racket.

[1] https://news.ycombinator.com/item?id=41901577

[2] https://www.reddit.com/r/haskell/comments/1fzy3fa/oop_is_not...

[3] https://docs.racket-lang.org/guide/unit_versus_module.html

enugu··on Dropbox announces 20% global workforce reduction
There seems to be an analogy to servers being capable enough for usual demand(income>spending), but fails due to some downtime for some servers(out of a job) or peak loads(medical emergency). This can be amortized by having data centers serving multiple apps(social security, insurance - but they dont always exist).

One main fault in the analogy is that in an economic crisis, there is a vicious cycle of income loss which leads to lower demand leading to more lost jobs. This coordination failure can be handled by fiscal/monetary policy. Whereas server failure, even when widespread due to a virus doesn't happen recursively like that.

← PreviousPage 3 of 9Next →