Tetration Forum

Full Version: Language converter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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...
(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.