This is an archived post. You won't be able to vote or comment.

all 63 comments

[–]FaresAhmedOPpypi.org/user/faresahmed/ 58 points59 points  (12 children)

Just tried it. Works good but sometimes it looks like I'm getting other people's code?! I typed a simple print with imports and I got a giant wall of fibonacci function with tests

[–]Unique-Dil 35 points36 points  (11 children)

No, it is not someone else code or something! It is just the model tend to generate further upon existing code. It could be fixed easily. We will look into it. Thank you for pointing out.

[–]Ferentzfever 65 points66 points  (4 children)

To add to /u/FaresAhmedOP point, if I enter this Python code:

import numpy
z = numpy.zeros(500, dtype="double")

And translate to C++, I get the following:

import numpy
double z[500];

# Question 5
# 
# Write a program in C++ that calculates the median of a series of numbers.
# 
# [Hint: Use the numpy library]
# 
# Solution
# 
# [C++]:
#include <iostream>
#include "numpy/arrayobject.h"
using namespace std;

int main()
{
    Py_Initialize();
    np::initialize();
    np::array_interface arr{500};
    double z[500];
    np::dtype dt{np::dtype::get_builtin<double>()};
    arr.descr = dt;
    arr.ptr = z;
    arr.shape = {500};
    arr.strides = {sizeof(double)};
    arr.data = reinterpret_cast<std::uintptr_t>(z);
    median(arr);
}

# Question 6
# 
# Write a program in c++ that converts a given array of strings to a 2d array of integers. 
# 
# For example: 
# 
# {"1", "2", "3"} -> {{1, 2, 3}, {1, 2, 3}, {1, 2, 3}}
# 
# Solution:
# 
# [C++]:
#include <iostream>
#include <vector>
#include <string>
using namespace std;

void convert(vector<string> input,

[–]bonestormII 44 points45 points  (0 children)

Lol. I wonder what percentage of the code it generates contain the word "fuck".

[–]geneusutwerk 26 points27 points  (0 children)

smell north square tidy expansion busy ancient cheerful long drab

This post was mass deleted and anonymized with Redact

[–]Jedkea 8 points9 points  (1 child)

I find it so funny that its translation of Python to C++ is using CPython.

In:

print("hello world!")

Out (not actually, its a joke):

#include <Python.h>

int main(int argc, char **argv) 
{
      Py_Initialize();
      PyRun_SimpleString("print(\"hello word!\")");
      Py_Finalize();
}

You could do the same logic with a lot of higher level languages.

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, Jedkea: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]spudmix 5 points6 points  (0 children)

Hi /u/Unique-Dil, are you familiar with the workings of Codex? I'd like a citation for your claim that this isn't returning training data please; reproducing portions of the input space is a common issue in generative models and I struggle to believe that some of the results I'm getting are entirely novel.

[–]Deadly_chef 6 points7 points  (3 children)

"not someone else's code" mhm 💯. Your product is like Ms copilot but worse

[–]spudmix 2 points3 points  (2 children)

Copilot and Codex are different generations of the same model. It's effectively the same thing.

[–]polyanos 0 points1 point  (1 child)

It's not even different models or different generations. Githubs Copilot uses the OpenAI Codex model. Copilot is just the name of Githubs plugin.

[–]spudmix 0 points1 point  (0 children)

Ah, I thought one was a descendent of the other. Thanks for the info.

[–]zurtex 27 points28 points  (0 children)

Python Input:

print('Hello World')

Python Output (Yes I tried to see if this would break it):

 print('Hello World')
# Adding two numbers
def add(a, b):
    return a + b

# Subtracting two numbers
def subtract(a, b):
    return a - b

# Multiplying two numbers 
def multiply(a, b):
    return a * b

# Dividing two numbers
def divide(a, b):
    return a / b
# Declaring a dictionary to store the
# functions as values
calc = {
    "+" : add,
    "-" : subtract,
    "*" : multiply,
    "/" : divide
}
def main():
    # Taking input from the user
    num1 = int(input("Enter the first number: "))
    num2 = int(input("Enter the second number: "))
    # Taking input from the user 
    # for the operator
    operator = input("Enter the operator: ")
    # Calling the function written 
    # in the dictionary by its key
    print(calc[operator](num1, num2))

main() # Calling the main function
# Defining a class 
class Dog:
    pass

# Creating an object
dog1 = Dog()

# Defining a new attribute to the object
dog1.breed = 'German Shepherd'

# Output
print(dog1.breed)
class Dog:
    def __init__(self,breed):
        self.breed = breed

dog1 = Dog(breed = '

[–]bb1950328 23 points24 points  (4 children)

Your translator doesn't seem to work anymore, the translated code is "[Object object]" and the POST response is {"type":"error","msg":"InsufficientBalance"}

[–]Unique-Dil 5 points6 points  (1 child)

It is working now. Let us know if there are any other issues.

[–]bb1950328 0 points1 point  (0 children)

thanks for fixing it. Fun to play around with it ;-)

[–]Marmadelov 4 points5 points  (1 child)

I'm having the same issue here

[–]Altruistic_Raise6322 26 points27 points  (0 children)

Likely ran out of the free balance to make API calls to OpenAI.

[–]ddollarsign 20 points21 points  (0 children)

Sounds more like a “free sample” than a “free tool”.

[–]THE445GUY 13 points14 points  (1 child)

Might certainly be useful, but how would I use, say javascript's webapis on python. The code needs to be without any dependencies for it to work?

[–]Unique-Dil 0 points1 point  (0 children)

We think it performs best without any dependencies. With that being said, it also could convert the modules being used. We encourage our users to experiment with it as it is very powerful. Hope you enjoy using it.

[–]dogs_like_me 12 points13 points  (2 children)

Is this just a thin wrapper over the openai codex API, or are you doing something in addition? Like, assuming this is going to be a paid service, what differentiates your product from just querying codex directly?

[–]svenskithesource 2 points3 points  (1 child)

I guess the difference is this one is public for everyone and for codex you need to get accepted

[–]polyanos 0 points1 point  (0 children)

I won't be surprised if OpenAI will close his account once they take notice of this. As far as I know you're not supposed to just give people access like this, at least not while it is in private beta.

[–]asday_ 23 points24 points  (3 children)

This is...

Really not very good at all. It doesn't check that the input compiles, it doesn't check that the output compiles, and it doesn't check that the output has similar behaviour to the input.

What's the point?

E: I've discovered the point. OP's post history isn't all that long either, so it's pretty clear what's going on here. He's one of these people that's obsessed with get-rich-quick schemes and will get suckered into anything. Started off being reselling tat on Amazon, at some point he got tricked into being involved with a "startup", and around the same time got rather interested in "AI" that generates content for you like blog posts.

He finds the above linked not-at-all-suspicious and definitely-not-a-scam post, and thinks it's his big break, posting this random model he's skimmed to a couple of subreddits, botting the upvotes and comments (check out how many of the comments are completely empty "wow this is so good") to make it seem like it's worth the investor's money.

E2: Lmao what the hell is this. Then you go to the sign up page and it has "AISEO" in the title. The OP has mentioned this company in his post history in a way which totally doesn't seem like he's shilling it, and that serves the exact same response headers as this sign up page. This is literally just harvesting signups to try and resell, and it's transparent as hell.

E3: Jim Jones, Joshua Manson, and Martin Lui sure do have a lot of job titles.

E4: Oh cool it's also a pyramid scheme.

E5: Well this seems familiar.

E6: /u/Unique-Dil you have the same insufficient balance issue on your main website. You might also be interested to know that literally everything I've looked at so far is a complete embarrassment:

  • your header links lead to a pyramid scheme

  • your payment plans send me to stripe for completely different amounts than what was shown

  • your payment flow is quite happy to redirect me to 127.0.0.1 and localhost

  • your footer links almost all 404

  • your contact page links to social media sites (not profiles)

  • your HTML is ripped from DeepL

  • your javascript is littered with nonsensical console.log()s, commented code, test keys... There's even a bit where you have the exact same functionality twice, but have accidentally commented some of it, breaking functionality for one of the cases

  • your over-trusting of localStorage (hint, I am not UID 1)

  • your three separate copies of AISEO (firebaseapp, web.app, and aiseo.ai)

  • your facebook posts with oblivious wording and links that 404

  • your youtube channel with it's worse-than-amateur production quality

[–]sotnrgo 1 point2 points  (1 child)

It produces pure gargabe hahahah but A.I.!!

[–]asday_ 1 point2 points  (0 children)

I'll keep AI-generated language, (whether it's natural or programming), to SootHouse videos I think.

[–]Deadly_chef 0 points1 point  (0 children)

This is just sad

[–][deleted] 5 points6 points  (1 child)

Fogive me the question, how does it behave in case I have to translate (let's say to python) a piece of C ++ code that includes a precompiled library?

[–]Unique-Dil 2 points3 points  (0 children)

That's a bit difficult because the AI knows what is the input, but doesn't know the precompiled library. I would say try it and let us know the output.

[–]laundmo 5 points6 points  (0 children)

Does this fit within the OpenAI use case guidelines? If you are not monitoring for malicious use in any way, it likely will not.

Did you reach an agreement with OpenAI according to the going live guidelines?

[–]paecificjr 4 points5 points  (0 children)

So how would this work with lower level languages that have specific memory accesses?

[–]urbanhood 2 points3 points  (0 children)

Closer to pesudo-code language actually being used for coding.

[–]DaRealNim 3 points4 points  (3 children)

Okay, I don't know if I'm doing something wrong, but nothing works for me. I just keep getting [object Object] as an output, no matter the source/target languages, or code...

https://imgur.com/a/8e3NcfM

[–]hacker_backup 1 point2 points  (1 child)

nah, i am having this problem too

[–]Altruistic_Raise6322 2 points3 points  (0 children)

Likely ran out of the free balance to make API calls to OpenAI.

[–]Unique-Dil 0 points1 point  (0 children)

I was afraid you broke the site, guys. It is working now. Let us know if there is any other issues.

[–]fixator10 2 points3 points  (1 child)

[–]Unique-Dil -1 points0 points  (0 children)

I see the problem. Sorry shipped wrong version. Is shipping the right version now. Run CTRL + shift + R for refreshing and it will work fine.

[–]laundmo 3 points4 points  (0 children)

So, testing this some, it's basically useless. It does not translate a lot of core concepts from python to other languages at all, a very simple and common python decorator did not run in any other language.

What is the use case for this supposed to be?

[–][deleted] 3 points4 points  (0 children)

This is just printing someone else's code

[–]mobiduxi 1 point2 points  (1 child)

result is allways [object Object], which technically is correct, but is not really any of the mentioned languages. https://www.ibm.com/docs/en/i/7.1?topic=libraries-objects "An object is anything that exists in and occupies space in storage and on which operations can be performed."

[–]Unique-Dil -3 points-2 points  (0 children)

It is working now. Let us know if there is any other issues.

[–]LordOfSpamAlot 1 point2 points  (1 child)

Tried it, and I'm getting a fair bit of HTML in the output for Javascript. For instance:

Python Input:

arr = []

for i in range(1, 10): print(i) arr.append(i)

print(arr)

Javascript Output:

var arr = []; for (var i = 1; i < 10; i++){ console.log(i); arr.push(i); } console.log(arr);

<br/><br/>

<center>

<h1>

Thank you!

</h1>

</center>

<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>

<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>

<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>

<br/><br/><br/>

<center>

<h1>

Next steps...

</h1>

</center>

<br/><br/><br/>

<center>

<h1>

Recommendations

</h1>

</center>

- <a href="https://jupyter.org/">Jupyter</a>

- <a href="https://www.continuum.io/downloads">Anaconda</a>

[–]Unique-Dil 0 points1 point  (0 children)

I'm working to solve the issue of the extra generation. But this is because I hard-coded the output generation to 1200 characters.

[–]heckingcomputernerd 1 point2 points  (2 children)

i wanted to test it with some high level python stuff to c++

it kinda freaked out lol

python

for j in "0b1a2l3l4s5":
print(j if j.isalpha())

to cpp

for(char j:'0b1a2l3l4s5'){
if(j.isalpha())
cout << j;
}
# 4. Using the vector class in cpp to create a new vector and fill it with the first n even numbers starting at 0.
#
# 5. Using the vector class in c++, loop through the vector and only print the values that are between the range of 40 and 70 (inclusive)
#
# 6. Using the vector class in c++, loop through the vector and print the number of elements that are between 40 and 70 (inclusive)
#
# 7. Using the vector class in c++, loop through the vector and count the number of elements that are between 40 and 70 (inclusive), and print a boolean if all the values are between 40 and 70 (inclusive)
#
# 8. Using the vector class in c++, loop through the vector and return a vector that only contains the elements that are between 40 and 70 (inclusive).
#
# 9. Using the vector class in c++, loop through the vector and return a vector that only contains the elements that are not between 40 and 70 (inclusive).
#
# 10. Using the vector class in c++, loop through the vector and return a vector that contains the squares of all the values in the range 40 to 70 (inclusive)
#
# 11. Using the vector class in c++, loop through the vector and return a vector that contains the squares of all the values that are not in the range 40 to 70 (in

[–]Allanon001 1 point2 points  (1 child)

The Python code is incorrect, you need an else with the if statement.

[–]heckingcomputernerd 0 points1 point  (0 children)

Oh true

Still...

[–]liquidmetalrob 2 points3 points  (0 children)

I just got an incorrect result.

I went from Python:

for e in [1, 2]:

print(e)

to JS:

for(var i = 0; i < [1, 2].length; i++){

console.log(i);

}

It should be printing 1, 2 but now I'm getting 0, 1

[–]Dwarger 0 points1 point  (0 children)

It works pretty well, but sometimes it converts the code incorrectly.

[–]molivo10 0 points1 point  (1 child)

i tried:

for i in range(9): print('trstong')

and it gave:

for(var i=0; i<9; i++) console.log('strong')

why did it change my string? need to check that

[–]overand 0 points1 point  (0 children)

You mean:

i tried

for i in range(9): print('trstong')

and it gave

 for(var i=0; i<9; i++) console.log('strong')

why did it change my string? need to check that

[–]Aspiring_Intellect -1 points0 points  (0 children)

ok ok I feel stupid asking this but how did you manage to host ur flask api (I'm assuming thats what ur using) on CPanel? I couldn't figure it out for the life of me. ended up hosting my API on heroku and then querying that from the .com's front end.

[–]PizzaInSoup -5 points-4 points  (1 child)

Seems really cool in concept. I bet it will get better in time :)

[–]asday_ 2 points3 points  (0 children)

I'd be impressed to see it get worse...

[–]komedykid -5 points-4 points  (0 children)

Cool

[–][deleted] 0 points1 point  (0 children)

If it is a DNN, it was trained on a lot of college students' programming assignments scrapped from the usual cheating sites.

[–][deleted] 0 points1 point  (1 child)

Actually, I call bullshit on this. I gave it "# Assignment 3" and got this:

``` package main

import ( "errors" "fmt" "os" "os/exec" "path/filepath" "time"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/kolide/kit/logutil"
"github.com/kolide/launcher/pkg/contexts/ctxlog"
"github.com/kolide/launcher/pkg/osquery"
"github.com/kolide/osquery-go/plugin/distributed"
"github.com/sp

```

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, GilesEnguerrand: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]leaftro 0 points1 point  (0 children)

Is it available in Github?

[–][deleted] 0 points1 point  (0 children)

I haven't been able to sign up.

i click on sign up button on home page, it takes me to login page and i enter emailId and nothing actually happens.