Live data from Hacker News

AI converts between hundreds of programming languages

codelanguageconverter.com

51–60 of 60 posts

Re: AI converts between hundreds of programming languages

#52

Tried pasting a big piece of code. "Whoah, that's big, try something smaller." Ok, paste small snippet of code. Click "translate". "Sign up first". Urgh, fine, this looks just about exiting enough to try, but barely so. After signing up, I have zero credits, without a single translation performed. I mean, not that I expect free lunch, but I'm also not gonna pay money before seeing a single 10 line example.

I was about to come back to this thread and post almost the exact same comment. I didn't even get 10 lines - I just converted the 3 line typescript example that was already there, and couldn't try anything else. There's no way I'd ever pay for this.

Re: AI converts between hundreds of programming languages

#55
post #42
post #38

Earlier quoted context omitted.

Writing code is rarely the problem anyway. Understanding the problem and devising a suitable solution given the full context is where the magic is. And since most humans have a hard time even accurately describing a problem and full context, there's no threat that AI will replace developers. If we can build up an immense library of clearly defined problems and solutions, with variants which fit with all conceivable u…

The interesting bit will be when the AI is smart enough to take an “easy” language like Typescript and convert it to rust or c++

It still won't help with setting up the development environment to be able to compile rust of the week or c++??. Both of which have dev communities which adopt forwards incompatible features fairly rapidly so the environment in your distro probably won't work as is. But eventually, maybe they AI will set that up too, https://www.commitstrip.com/en/2019/03/15/css-css-everywhere...

Re: AI converts between hundreds of programming languages

#56

I used GitHub Copilot to translate a few small programs, from Javascript to Python. Results: - single lines went over well, and even became idiomatic in the destination language - snippets translated well - for two snippets translated separately, the 2nd snippet didn't understand the original context and got confused. Lesson: translate a whole file at once, or you'll have to fix cross-function references/names. One t…

How did you instruct Copilot to do the conversion? I've always used it just as a smart auto-complete.

Re: AI converts between hundreds of programming languages

#57
I wish the price structure was a lot more explicit.

I can buy 20.000 credits for $5. This will give me "around 5-20 code conversions"

That is a pretty big difference. What are the metrics to estimate what a conversion will cost?

I am not critiquing that you cant have a fixed price since length, complexity, edge cases varies significantly but I would like some indication.

Re: AI converts between hundreds of programming languages

#59

Seems completely broken now; like others, I tried to test something, found I had to sign up, signed up, and found I have "0 free credits". I really wanted to see what it was gonna do for Python -> C++ converting some nested dictionary and list comprehensions: def foobar(x, y): return { _: __ for _, __ in zip( [_ for _ in x if _ in y], [_ for _ in x if _ not in y] ) } {3: 1, 4: 2} == foobar([1, 2, 3, 4], [3, 4, 5, 6])

I bought some credits. Here is the result (Python to C++):

  std::map foobar(std::vector x, std::vector y) {
    std::map map;

    for (int i = 0; i 

Re: AI converts between hundreds of programming languages

#60
post #59

Seems completely broken now; like others, I tried to test something, found I had to sign up, signed up, and found I have "0 free credits". I really wanted to see what it was gonna do for Python -> C++ converting some nested dictionary and list comprehensions: def foobar(x, y): return { _: __ for _, __ in zip( [_ for _ in x if _ in y], [_ for _ in x if _ not in y] ) } {3: 1, 4: 2} == foobar([1, 2, 3, 4], [3, 4, 5, 6])

I bought some credits. Here is the result (Python to C++): std::map foobar(std::vector x, std::vector y) { std::map map; for (int i = 0; i

Thanks for checking into that... doesn't look like the AI is even close to ready for prime time right now as this is not the correct translation:

    #include 
    #include 
    #include 
    #include 

    std::map foobar(std::vector x, std::vector y) {
      std::map map;

      for (int i = 0; i  ex{ 1, 2, 3, 4 };
      std::vector wy{ 3, 4, 5, 6 };
      std::map result = foobar(ex, wy);

      std::cout 
It outputs:

    {3: 4, 4: 0, }
But it SHOULD be getting:

    {3: 1, 4: 2, }
Post reply on HN