Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Tamás Koczka
    @koczkatamas
    or converting from multiple languages (depending their preferences) to others, etc
    aolko
    @aolko
    ts and js are not very good src
    it's better to aim for python
    Tamás Koczka
    @koczkatamas
    well, people usually expect full grown products with support of big companies for free created by tens of developers for years and expect same quality from a hobby project created by a standalone developer in his free time
    and people with such attitude will usually always find problems in every project, it's impossible to satisfy them.
    of course he can edit the "one.hpp" and the code generation part, so he can fully control the generated code, but that would require effort on his part and he considers easier to spend this effort on salting ;)
    Tamás Koczka
    @koczkatamas
    is this post from a public forum?
    aolko
    @aolko
    no, "the coding den" discord server
    MIchael Solomon
    @mikicho
    Hm... did you heard about https://haxe.org ?
    MIchael Solomon
    @mikicho
    @GreyCat I use Haxe for some years and this comparison doing wrong to haxe... haxe is more than just trans-compile one lang to other, but also add a lot of really cool stuff to the basket like macros, pattern-matching, inline and much more.
    Also, Haxe have really smart and blazingly fast compiler that supply DCE, analyzers and more
    Although, it must to say, that Haxe have its own cons but it always getting better :)
    Tamás Koczka
    @koczkatamas
    That's why the disclamer is there:
    Disclamer: I don't know Haxe well, so if you know it better and you could improve the contents of this page, please tell me by opening an issue (but first check if there is one already).
    Most One features are implemented fully in templates and you can modify every character in the output if you want, including adding new features via attributes (like the way I added the preliminary reflection)
    So although currently One and Haxe are looking similar, they are really different internally
    IMHO
    MIchael Solomon
    @mikicho
    @koczkatamas I read that.. my words are not to criticize the compression, but to emphasize that Haxe is not only tran-compiler :)
    @koczkatamas BTW... why create brand-new lang instead of getting involve Haxe?
    Tamás Koczka
    @koczkatamas

    @mikicho mainly because I wanted to learn how to parse languages, generate syntax via templates, see the differences between languages first hand. Reading other's code is less fun for me than doing it actually from ground zero.

    Other reasons: I wanted to be able convert from one language's syntax to other and AFAIK Haxe only accepts Haxe as input language, so simply it would not work. Also one of the goals of the project to be able to compile Onelang itself to every supported language, which would be near impossible with Haxe

    One of the project where I thought One could come handy had to run in the browser, so I had to use a language which converts to JS.

    MIchael Solomon
    @mikicho

    to compile Onelang itself to every supported language

    what do you mean by that?

    Tamás Koczka
    @koczkatamas
    @mikicho create a package for C++, C#, Go, Java, ... which is generated by One and can be used for convert code from C++, C#, Go, Java, ... to C++, C#, Go, Java, ...
    YuanYuan Liu
    @mgenware
    Hi @koczkatamas , thanks for this great project. just found that onelang is smart enough to transform a small set of APIs to different languages, for example [1, 2, 3].push(4); in js gets converted to []int{1, 2, 3} = append([]int{1, 2, 3}, 4) in go and new List<int> { 1, 2, 3 }.Add(4);. while some funcs like Array.pop are not supported. so i'm wondering are there any docs on the list of APIs supported by onelang? thanks.
    Tamás Koczka
    @koczkatamas

    hi @mgenware ! Sadly Onelang does not really support language stdlib methods yet (there are a few exceptions, as you mentioned). I should've emphasized this point in my communication, sorry if I was not clear enough about this. You can view the currently supported methods here: https://github.com/koczkatamas/onelang/blob/master/langs/StdLibs/stdlib.d.ts

    Currently Onelang is a toolkit for converting syntax mostly. Although you can add any new methods even in the WebIDE, this is of course can be a lot of work. Here is the main issue about supporting libraries (not just syntax): koczkatamas/onelang#9

    My main focus is now to provide a public repository / plugin system, so if somebody implements something, then he/she can publish it immediately, others can use it. But there is no quality control. The goal of the project is to provide these main functionality of course, but I don't want to be a single blocker entity in the process, that's why I favor a community style solution.
    Tamás Koczka
    @koczkatamas
    also @mgenware if you haven't read the FAQ [ https://github.com/koczkatamas/onelang/wiki/FAQ ], please do so before starting to use One for anything serious
    tossy
    @xxxsy5_twitter
    How to
    How can I convert [go] -> [swift]
    Tamás Koczka
    @koczkatamas
    @xxxsy5_twitter Go is not supported as input language yet, only TypeScript, Ruby, C# and PHP
    tossy
    @xxxsy5_twitter
    ok ,thanks
    YuanYuan Liu
    @mgenware
    wow, thanks for your detailed and informative reply.
    Chrizzly
    @Chris2011
    Hey, when I go to onelang.io there is the note: compiler backend is not configured. For each language.
    Is the app broken?
    Tamás Koczka
    @koczkatamas
    No, it just does not run the generated code. More info here: https://github.com/koczkatamas/onelang/wiki/Compiler-backend
    Chrizzly
    @Chris2011
    I understand that, but I don't want to install it ony my machine, I thought this page is the the app, which will have everything on there own server.
    Hosted via onelang.io
    Tamás Koczka
    @koczkatamas
    well, it would cost for me to host servers with compiler services, there is no intention for me to do that, you can run the compiler backend on your machine directly and use the website
    Chrizzly
    @Chris2011
    ok, understood. Thought that this will do the job. It wa confusing me, beacuse I thought it is an online service.
    aurel co
    @aurelco3_twitter
    Hi everybody
    I'm running backend with docker it's ok but when i put the server parameter(?server=http://127.0.0.1:11111) i've got an error "typeError: Network Error when attempting ressource on each frame of langages
    I give my authentification token at the first loading
    Where i'm wrong ?
    Tamás Koczka
    @koczkatamas
    @aurelco3_twitter what is your OS (Linux / macOS)? what commands did you use to launch the container? is 127.0.0.1:11111 available from your terminal (e.g. nc -vvv 127.0.0.1 11111)?
    aurel co
    @aurelco3_twitter
    Hi
    I run this command
    touch .secret_token && docker run -a stdin -a stdout -p 127.0.0.1:11111:11111/tcp -p 127.0.0.1:8003:8003/tcp -i -v $(pwd)/.secret_token:/one/.secret_token --restart unless-stopped -t onelang/compilerbackend
    and this one
    $ nc -vvv 127.0.0.1 11111
    Connection to 127.0.0.1 11111 port [tcp/*] succeeded!
    Nathanael Coonrod
    @ncoonrod
    Hi there! Great job on this project! Which branch should be used for further development? master or stdlib?