Posts: 281
Threads: 95
Joined: Aug 2007
09/30/2022, 05:38 AM
(This post was last modified: 09/30/2022, 06:55 AM by Daniel.)
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
Posts: 903
Threads: 130
Joined: Aug 2007
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
Posts: 281
Threads: 95
Joined: Aug 2007
(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