Tetration Forum
Language converter - Printable Version

+- Tetration Forum (https://tetrationforum.org)
+-- Forum: Tetration and Related Topics (https://tetrationforum.org/forumdisplay.php?fid=1)
+--- Forum: Computation (https://tetrationforum.org/forumdisplay.php?fid=8)
+--- Thread: Language converter (/showthread.php?tid=1649)



Language converter - Daniel - 09/30/2022

The software supports coverting between hundreds of programming languages. Both Pari and Mathematica are supported.
Language Converter Sadly it currently only works with small chunks of code.


RE: Language converter - Gottfried - 09/30/2022

Hmm, don't know what they are really doing.
The third sample code for Pari/GP is given as
Code:
const fs = require('fs');
const AWS = require('aws-sdk');

const s3 = new AWS.S3({
    accessKeyId: process.env.AWS_ACCESS_KEY,
    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
});

const fileName = 'contacts.csv';

const uploadFile = () => {
  fs.readFile(fileName, (err, data) => {
      if (err) throw err;
      const params = {
          Bucket: 'testBucket', // pass your bucket name
          Key: 'contacts.csv', // file will be saved as testBucket/contacts.csv
          Body: JSON.stringify(data, null, 2)
      };
      s3.upload(params, function(s3Err, data) {
          if (s3Err) throw s3Err
      });
  });
};

uploadFile();
Pari/GP version 14.0 doesn't understand this, and moreover I've never seen syntactical constructions like "... Bucket: 'testbucket' , ..." Maybe I'm missing something...


RE: Language converter - Daniel - 09/30/2022

(09/30/2022, 08:48 AM)Gottfried Wrote: Hmm, don't know what they are really doing.
...
Pari/GP version 14.0 doesn't understand this, and moreover I've never seen syntactical constructions like "... Bucket: 'testbucket' , ..." Maybe I'm missing something...

Sorry, it turned out to be more of an interesting idea than a useful tool. My bad.