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

I don't think they create it, they just use some template that comes with it.


And then they don't ever open the page, right?


I've tried coding with AI for the first time recently[1] so I just joined that statistic. I assume most people here already know how it works and I'm just late to the party, but my experience was that Copilot was very bad at generating anything complex through chat requests but very good at generating single lines of code with autocompletion. It really highlighted the strengths and shortcomings of LLM's for me.

For example, if you try adding getters and setters to a simple Rect class, it's so fast to do it with Copilot you might just add more getters/setters than you initially wanted. You type pub fn right() and it autocompletes left + width. That's convenient and not something traditional code completion can do.

I wouldn't say it's "mission critical" however. It's just faster than copy pasting or Googling.

The vulnerability highlighted in the article appears to only exist if you put code straight from Copilot into anything without checking it first. That sounds insane to me. It's just as untrusted input as some random guy on the Internet.

[1] https://www.virtualcuriosities.com/articles/4935/coding-with...


> it's so fast to do it with Copilot you might just add more getters/setters than you initially wanted

Especially if you don't need getters and setters at all. It depends on you use case, but for your Rect class, you can just have x, y, width, height as public attributes. I know there are arguments against it, but the general idea is that if AI makes it easy to write boilerplate you don't need, then it made development slower in the long run, not faster, as it is additional code to maintain.

> The vulnerability highlighted in the article appears to only exist if you put code straight from Copilot into anything without checking it first. That sounds insane to me. It's just as untrusted input as some random guy on the Internet.

It doesn't sound insane to everyone, and even you may lower you standards for insanity if you are on a deadline and just want to be done with the thing. And even if you check the code, it is easy to overlook things, especially if these things are designed to be overlooked. For example, typos leading to malicious forks of packages.


Once the world is all run on AI generated code how much memory and cpu cycles will be lost to unnecessary code? Is the next wave of HN top stories “How we ditched AI code and reduced our AWS bill by 10000%”?


I don't know but the current situation is already so absurd that AI probably won't make it much worse. It can even make it a little better. I am talking about AI generated "classical" code, not the AIs themselves.

Today, we are piling abstraction on top of abstractions, culminating with chat apps taking a gigabyte of RAM. Additional getters and setters are nothing compared to it, maybe literally nothing, as these tend to get optimized out by the compiler.

The way it may improve things is that it may encourage people to actually code a solution (more like having it AI generated) rather than pulling an big library for a small function. Both are bad, but from an efficiency standpoint by being more specialized code, the AI solution may have an edge.

Note that this argument is only about runtime performance and memory consumption, not matters like code maintainability and security.


Your IDE should already have facilities for generating class boilerplate, like package address and brackets and so on. And then you put in the attributes and generate a constructor and any getters and setters you need, it's so fast and trivially generated that I doubt LLM:s can actually contribute much to it.

Perhaps they can make suggestions for properties based on the class name but so can a dictionary once you start writing.


IDE's can generate the proper structure and make simple assumptions, but LLM's can also guess what algorithms should look like generally. In the hands of someone who knows what they are doing I'm sure it helps produce more quality code than they otherwise would be capable of.

I'm unfortunate that it has become used by students and juniors. You can't really learn anything from Copilot, just as I couldn't learn Rust just by telling it to write Rust. Reading a few pages of the book explained a lot more than Copilot fixing broken code with new bugs and the fixing the bugs by reverting its own code to the old bugs.


This looks great but the scrollbars are unstyled.


Nothing stops you from joining https://www.fanclubs.org/ or https://www.fark.com/ instead of reading what bots post on Reddit all day.


Would you mind explaining what keeps these sites from becoming victim to the same thing?


No upvotes.


>by the same author

What? People are just creating new languages these days as if they were Javascript libraries?

Let's say I wanted to make my own programming language. What's the easiest way to prototype it in a way I can share it with the world? Are the programming language development toolkits that come with a tokenizer library and things like that? Should I write my own program to output machine code? Or maybe it's easier to just transpile to Javascript?


The author, Calvin Rose, is a (I assume pretty great) compiler engineer at NVIDIA who has a personal affinity for LISPs and Lua: https://bakpakin.com/

I don't think the average programming language enthusiast is maintaining multiple well-known languages.


Interesting. I saw another link here of someone who insists on making C# run everywhere, now someone who insists on LISPs.

I really want to try making a language that is imperative, like really imperative, where every line must start with a verb, just to see what it would look like.


> I really want to try making a language that is imperative, like really imperative, where every line must start with a verb, just to see what it would look like.

It would look like Tcl.


A bit but I don't like "set foo 32"

One way I think I can get rid of that is like this

    32 = foo;
But why do we even need variables? I think the perfect language design would be if you could just do this:

    pow(x, 2);
    pow(y, 2);
    sqrt() = result;
And maybe you could do this

    {
        pow(x, 2);
        pow(y, 2);
        sqrt();
    } + 1;
    pow(2) = result;
Instead of result = pow(sqrt(pow(x, 2), pow(y, 2)) + 1, 2); that we have today.


At that point you’re almost, but not quite into the realm of “forth”


Crafting interpreters by Robert Nystrom could be a place to start - https://craftinginterpreters.com/

The author posts on HN as ‘munificent’, I think.


Great book—as an entry point for designing languages.


I thought almost all programmers created a language or two in the course of their careers or hobbies.

You can make a simple language very easily if you design the syntax carefully and restrict its capabilities. It all depends on what you need it for.

In my case I needed a way to create reports from a Turbo Pascal program (TP3 for DOS I think) without having to edit the program and ship a new version. So I made a simple report generating language. It had simple for loops, all variables were global, tokens were all separated by white-space, no user defined sub-routines or functions, a set of predefined procedures specifically designed for the report generating function, arithmetic expressions that were only allowed in assignment statements, interpreted not compiled.

It was actually quite easy to do but of course was not a general purpose language. These days it might be simpler to embed Lua.


>are there any advantages to this approach over using C directly?

Presumably the fact that you don't have to use C.


Funny, because the average person is convinced it's not worth spending any time supporting Linux!


I don't get the criticism either. Every time I try to post on a platform I miss the ability of just dragging a paragraph around to reorder it.


For 99.99% of the people, it doesn't matter. Even if Wordpress stopped getting updates today, the code already works and it's open source, thanks in part to Matt for maintaining it for 20 years.

It was just the weekly Internet drama of the programming niche probably pumped by Youtubers and influencers in need for content to drive views and then by memes. Barely anything of substance was actually written about it.

After all, if Matt were such a negative factor in the project, it would be trivial to just take all the code and fork it and then for all the developers to just move to the new project. The fact that this didn't happen shows that there is non-trivial infrastructure being provided that is separate from the open source project. How do such smart people as programmers fail to understand this when they repeatedly conflate the open source project with the whole trademark/plugin hosting thing is beyond me. Does nobody question the whole thing before pointing fingers and picking their pitchforks?

I've seen a Youtuber who interviewed to Matt in one video and the Youtuber himself raised the point of hosting costs, and then in a next video they conflate the two concepts as if they had completely forgotten about everything they said and heard. It's surreal.


Wordpress: create your own website in minutes!

Wordpress new AI: create your own website in minutes!


The bus, when you live on the route: Get to work in 30 minutes!

A car: Get to work in 30 minutes! (you still have to live and work in the right locations for that to be true, but you now also have deal with traffic)


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

Search: