Hacker Newsnew | past | comments | ask | show | jobs | submit | more gopiandcode's commentslogin

The visualisation of how the model sees nullability was fascinating.

I'm curious if this probing of nullability could be composed with other LLM/ML-based python-typing tools to improve their accuracy.

Maybe even focusing on interfaces such as nullability rather than precise types would work better with a duck-typed language like python than inferring types directly (i.e we don't really care if a variable is an int specifically, but rather that it supports _add or _sub etc. that it is numeric).


Why not just use a language with checked nullability? What's the point of an LLM using a duck typing language anyway?


This post actually mostly uses the subset of Python where nullability is checked. The point is not to introduce new LLM capabilities, but to understand more about how existing LLMs are reasoning about code.


> we don't really care if a variable is an int specifically, but rather that it supports _add or _sub etc. that it is numeric

my brother in christ, you invented Typescript.

(I agree on the visualization, it's very cool!)


I am more than aware of Typescript, you seem to have misunderstood my point: I was not describing a particular type system (of which there have been many of this ilk) but rather conjecturing that targeting interfaces specifically might make LLM-based code generation/type inference more effective.


Yeah, I read that comment wrong. I didn't mean to come off like that. Sorry.


I find this particular choice of syntax somewhat amusing because the pipe notation based query construction was something I ended up using a year ago when making an SQL library in OCaml:

https://github.com/kiranandcode/petrol

An example query being:

```

let insert_person ~name:n ~age:a db = Query.insert ~table:example_table ~values:Expr.[ name := s n; age := i a ] |> Request.make_zero |> Petrol.exec db

```


Please also consider how much less inclusive and accessible computing would be if access to development tooling was placed behind such exorbitantly priced paywalls... The things we have at the moment aren't perfect, but I feel like the fact that the barrier of entry to programming is so low is an overwhelming positive that I couldn't see any level of bells and whistles justifying taking it away.


You're assuming it would have to be either/or, but it doesn't.


To be fair, the distinction here is about actions by a government, versus actions by private entities. Opposition to the government banning a website does not necessarily mean that you would oppose private companies refusing to provide service to a bad actor.


At the behest of the government, no doubt. The Twitter Files show that the real situation is a lot more messy.

Large internet "infrastructure" businesses are in partnership with government officials, so I have no reason to believe that the Parler takedown was anything but political censorship. Maybe not technically, but definitely in spirit and effect - and after all, that's all that really matters.


The internet is largely made up of private companies. If Comcast decides to not route traffic to you there is nothing you can do. Private companies are the ones who decide if the internet is open or closed. The government can influence these companies behaviour, but companies technically can do what they want.


When I was growing up behind the Iron Curtain, we had a joke: in communism, the companies are owned by the government. In capitalism, it is the other way around.

On this topic, the point is, that something is banned by someone with the appropriate means. It doesn't really matter whether it is government or private enterprise, because they meet in the backroom and coordinate their steps anyway. In the end, it doesn't matter who's initiative it was, who did the execution, but the purpose and result itself.


The distinction Verge used was that of "friend" and "enemy"


> If not, how do you reconcile this belief with the right of scientists and publishers to sell their productive labor?

As many others in the thread have said - the profits from the paper paywalls go to the publishers, reviewing is done by volunteers.

As an aside, it's funny how often defenders of intellectual slavery are so dug in to their beliefs while being completely unaware of the mechanisms of what they're defending. I suppose such ignorance is a necessary precondition to support such injustice.


Funny you should mention that - I actually ran into another in-proportion solar system park model in Eugene, Oregon, USA: https://eugenesciencecenter.org/exhibits/eugene-solar-system...


Wow! GPL-licensed, Free as in Freedom, encrypted note taking! This is great. I think I'll probably end up self hosting this just on principle, but I signed up for a year just to show support! The fact that the Notesnook community is on discord is a little annoying, but other than that, I have no qualms with this, can't wait to try it out.


> I see this misunderstanding constantly online - honestly it's hideous to see people twisting Popper's pro-free-speech message into an excuse to crush those they misunderstand or disagree with. Literally inverting his meaning.

Yeah, it really is sad to see people so eager to embrace authoritarian sensibilities like this. The paradox of tolerence has seemingly become a buzzword without meaning, perverted beyond its original intent; a simple facade that enables people to feel self-justified about their own intolerance while still allowing them to claim progressive ideals.


"One of the peculiar phenomena of our time is the renegade Liberal. Over and above the familiar Marxist claim that ‘bourgeois liberty’ is an illusion, there is now a widespread tendency to argue that one can only defend democracy by totalitarian methods. If one loves democracy, the argument runs, one must crush its enemies by no matter what means. And who are its enemies? It always appears that they are not only those who attack it openly and consciously, but those who ‘objectively’ endanger it by spreading mistaken doctrines. In other words, defending democracy involves destroying all independence of thought."

- George Orwell, "Freedom of the Press" (1945)

Note that this predates Popper's paradox.


Yes, good catch! I actually wrote the fold predicate thinking of fold left, hence the naming, but as the same predicate can simulate both fold left and right, for the purposes of the blog post, I figured I could get away without renaming the variables.


> It's not clear whether the author means to say foldl and foldr are equivalent, or only that any foldl call which terminates can be converted into a foldr call.

Oh, no, I wasn't trying to say that they were equivalent in general - of course, fold right is the more general operator, as you can implement fold left in terms of fold right. (As an OCaml programmer, I'm used to assuming that all my lists are finite[1]).

The interesting part that I wanted to highlight was the fact that when you express fold as a declarative relation, it is possible to obtain both fold left and fold right essentially for free. Maybe this is an obvious fact for Prolog practitioners, but as a functional programmer this was a somewhat surprising discovery for me.

> Here's a neat paper on fold by Graham Hutton: "A tutorial on the universality and expressiveness of fold"

> https://www.cs.nott.ac.uk/~pszgmh/fold.pdf

Oh, nice! Thanks for the pointer, that's a great paper!

[1] Although technically it is possible to represent certain restricted classes of infinite lists in OCaml: https://v2.ocaml.org/manual/letrecvalues.html


> of course, fold right is the more general operator, as you can implement fold left in terms of fold right.

The other way works too: fold right can be implemented in terms of fold left. Here's an approach using continuations in OCaml:

  let fold_right f z xs = (List.fold_left (fun kont x -> (fun y -> kont (f x y))) Fun.id xs) z;;


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: