Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:32 AM
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:28 AM
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:23 AM
    • marquise:[link]
      October 11, 2019, 12:24:21 PM
    • marquise: hey guys try autoscape.org [link]
      October 11, 2019, 12:19:08 PM
    • Rash: is this site still ded
      October 08, 2019, 07:54:22 PM
    • The Meek: Just Uploaded New Server ~Phusion~
      October 01, 2019, 03:30:31 AM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:43 PM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:40 PM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:33 PM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 26, 2019, 09:02:13 AM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 26, 2019, 08:52:25 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:33 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:24 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:15 AM
    • PavSwag: bopalini
      September 23, 2019, 10:08:02 PM
    • PavSwag: Join autoscape,0rg fun events daily for infernal mystery boxes only server with Infernal Twisted Bow
      September 23, 2019, 03:05:33 PM
    • Frostydapure: Upcoming dmm/open pvp world server, 2006 style (different and fun trus me) [link] join join!
      September 23, 2019, 08:05:52 AM
    • Frostydapure: Upcoming dmm/open pvp world server, 2006 style (different and fun trus me) [link] join join!
      September 23, 2019, 08:05:45 AM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 22, 2019, 02:55:32 PM

    Author Topic: Cross language programming?  (Read 1839 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineRoar337

    • Member
    • ****
    • Posts: 252
    • Thanks: +0/-0
      • View Profile
    Cross language programming?
    « on: December 09, 2016, 06:33:30 PM »
    What is the best method for general cross language programming?
    Is there a general single way you can achieve this that should be universally or nearly universally applicable?
    Can two programs make use of a serial port to communicate assuming the both support IO?
    « Last Edit: December 09, 2016, 06:37:54 PM by Roar337 »
    Code: [Select]
    for(int i=0; i < 2147483647; i++) {
    doFacedesk();
    }
    Runescape Gambling

    OfflineDeath Style

    • Member
    • ****
    • Posts: 569
    • Thanks: +0/-0
      • View Profile
    Re: Cross language programming?
    « Reply #1 on: December 09, 2016, 06:42:11 PM »
    you mean learning a new language?
    « Last Edit: December 09, 2016, 06:49:45 PM by Death Style »

    OfflineRoar337

    • Member
    • ****
    • Posts: 252
    • Thanks: +0/-0
      • View Profile
    Re: Cross language programming?
    « Reply #2 on: December 09, 2016, 06:48:01 PM »
    No I mean

    [Example]:
    Program 1 has a variable x with a value of 10.
    Program 1 sends variable x to Program 2.
    Program 2 interprets the data from Program 1.
    Program 2 creates a new variable x with the data from Program 1.
    Program 2 prints out the value of x as 10.

    Program 1 and 2 are of different languages no additional addons have been used.
    Code: [Select]
    for(int i=0; i < 2147483647; i++) {
    doFacedesk();
    }

    OfflineDeath Style

    • Member
    • ****
    • Posts: 569
    • Thanks: +0/-0
      • View Profile
    Re: Cross language programming?
    « Reply #3 on: December 09, 2016, 06:52:14 PM »
    well as far as the web goes JSON is the standard for transmitting data across services regardless of language, and every widely used language has a library to read JSON

    xml is still used in some places but should be avoided imo

    if you have a socket connection between two services there is really nothing stopping you from sending/receiving on different languages. the data is the same on the wire, and some libraries like socket.io handle this for you on multiple languages. you could make your own data transmission format too

    OfflineRoar337

    • Member
    • ****
    • Posts: 252
    • Thanks: +0/-0
      • View Profile
    Re: Cross language programming?
    « Reply #4 on: December 09, 2016, 06:55:18 PM »
    Okay I was wondering about sockets myself that would probably be a good option for languages with net connectivity I don't really like JSON though it's way to moody and isn't it rather new?

    I tinkered with the idea of outputting data to a regular file and reading it into another programming language you would just have to choose which format and think of a way to interpret it on the other side but I didn't like the idea of using disk space for some reason.
    Code: [Select]
    for(int i=0; i < 2147483647; i++) {
    doFacedesk();
    }

    OfflineDeath Style

    • Member
    • ****
    • Posts: 569
    • Thanks: +0/-0
      • View Profile
    Re: Cross language programming?
    « Reply #5 on: December 09, 2016, 07:20:42 PM »
    JSON has been around for over 10 years. Don't know what you mean by moody; it's the de facto standard for transmitting any information across web services.

    Writing to disk is not a good idea. If you're on a unix environment you can use named pipes written to /tmp/ which is a little cleaner depending on what you're trying to do. I'd only recommend that if the services are not running simultaneously and this is something running locally.

    Offlinejustaguy

    • Member
    • ****
    • *
    • Posts: 706
    • Thanks: +0/-0
      • View Profile
    Re: Cross language programming?
    « Reply #6 on: December 09, 2016, 08:12:52 PM »
    Lots of options assuming these are running locally: pipes, shared memory, sockets. Hard to recommend what is best with the lack of detail.
    RIP

    OfflineRoar337

    • Member
    • ****
    • Posts: 252
    • Thanks: +0/-0
      • View Profile
    Re: Cross language programming?
    « Reply #7 on: December 10, 2016, 12:21:13 AM »
    There is a lack of detail because at the time I was just inquiring I wasn't sure what I was going to do with it more of a curiosity thing...

    I also wanted to avoid giving details because I was asking in a very general scope.

    The services I'm now tinkering with are running locally Json Importing/Exporting seems to be working rather well.

    The only language I've tested this with is Java -> Processing but processing is based on java soooo... XD
    Code: [Select]
    for(int i=0; i < 2147483647; i++) {
    doFacedesk();
    }

    OfflinestCky

    • Member
    • ****
    • Posts: 409
    • Thanks: +0/-0
      • View Profile
    Re: Cross language programming?
    « Reply #8 on: December 11, 2016, 09:59:02 PM »
    JSON for sure. XML if you hate yourself/other devs you work with or are in general a nonce
    HOLD CTRL AND TYPE "WTF" FOR ℱ𝓪𝓷𝓬𝔂 𝓦𝓣ℱ

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal