Language converter
#1
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.
Daniel
Reply
#2
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...
Gottfried Helms, Kassel
Reply
#3
(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.
Daniel
Reply




Users browsing this thread: 1 Guest(s)