Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • hardcore22: are there any kind of silabsoft servers like back in the days i miss that
      May 25, 2020, 05:44:08 AM
    • Amcora: @ dr house contact me; greetings celien :)
      May 24, 2020, 03:16:21 PM
    • Amcora: Stop shouting around please
      May 24, 2020, 03:13:26 PM
    • iddsyou: PkOwnage OSRSPS [link]  Join us on Discord! [link]  Download: [link]
      May 17, 2020, 11:44:17 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:48:19 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:48:12 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:56 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:49 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:42 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:29 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:18:03 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:17:53 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:17:50 AM
    • Decimate Returns: Project Decimate 474 OSRS ; [link]
      May 13, 2020, 07:27:00 PM
    • hardcore22: are there any silabsoft servers left? of the good old days like hackscape
      May 12, 2020, 07:53:18 AM
    • iddsyou: yo guys check out this instagram post #pkownage  [link]
      May 06, 2020, 02:35:58 PM
    • fishingsheep: any servers like project catasrophe or frugoo scape been remade ?
      May 04, 2020, 05:01:00 PM
    • asshole_rule: relmitos the legend
      May 04, 2020, 04:28:54 PM
    • iddsyou: PkOwnage 317 OSRS, Vote4donor, [link] Download now: [link] Discord: [link]
      May 04, 2020, 11:15:11 AM
    • relmitos: is anyone familiar with 317 packet opcodes? Im confused about opcode 3 (wich appears to send wether or not the client window is currently focused). is it safe to ignore?
      May 03, 2020, 08:47:40 AM

    Author Topic: Cross language programming?  (Read 1983 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