0
KPDroid
3y

Who else has worked with astronomical algorithms using JavaScript? How did it feel? Please share your experience

Comments
  • 3
    Why would you do it? That’s stupidity.
  • 0
    @100110111 why? Just for calculating rise and set times for astro bodies on the frontend
  • 2
    @KPDroid a) why in frontend? B) why the fuck would you use js for anything like that?
  • 1
    Yeah, do the calculations with a real language like Java, C++, or C#, and provide endpoints for what you need to consume on the front end.
  • 0
    @fullstackchris well yeah, but maybe something better suited for scientific calculations. Well you can use those, but if astro algos is all you gonna do, why not use a lang designed for such a use case?
  • 0
    @100110111 the reason is kinda sensitive, am developing the web app on my phone, and your guess is right coding backend on mobile is quite impossible
  • 0
    @KPDroid you’re not making much sense
  • 1
    @100110111 If you plan an interactive site with no permanent storage requirements, I see no reason to even involve a back end, unless the calculations require a lot of resources.

    Extremely precise calculations may be not necessary, depending on the context. Anyway, the problem of precidion may be solved by using BigInt (supported AFAIK everywhere except Safari) instead of float.
  • 0
    @100110111 am coding the web app on my phone. It's quite impossible to do the BE on my mobile phone (android less than 1gb ram)
  • 0
    @sbiewald exactly, for now my goal is not very precise calculations
  • 1
    @100110111 you could shorten that comment:

    why the fuck would you use js for anything?
  • 1
    @tosensei well, yes. There are valid arguments to use JS in web FE, but that’s the gist of it.

    @KPDroid why don’t you use a lang better suited for mobile dev? It doesn’t make sense to use a shit tool when there are better tools you can easily use instead…
  • 1
    @KPDroid oh wait what the actual fuck, you are developing ON a phone FOR web?! Why in the name of everything unholy would you do something that fucking stupid? Just use a computer like everyone with any shred of sanity…
  • 2
    @100110111 the only reason JS is used in web dev is stockholm syndrome. we had nothing else, so we had to learn to love it.

    i hope that, at some point, it will be phased out by either webassembly, or other languages using JS purely as compilation target.
  • 0
    @100110111 you got to calm down. Have no computer, where I live they are expensive atleast for people from a modest background. I'm just doing what I can
  • 0
    @KPDroid Oh… yeah now that makes sense. I don’t know how hard it is to save up for a computer for you, but if you want to progress and make a profession out of it, you’d better start saving up! You don’t need a powerful computer for developing, any old faithful that runs will do, really.
  • 1
    I converted a bunch of calcs from Python to JavaScript for a triangulation algorithm I am using. I was able to produce the exact same output as the Python code created initially with the same inputs.
  • 1
    @100110111 am only an apprentice in a fashion house which means I've got no wages. Am hoping to sell the app am building to a startup (I know it seems impossible, I sincerely doubt it too but then Am giving a try) , you can be sure what I plan to use the money for is to get a PC though I've got many other pressing need
  • 2
    @KPDroid If you want to have a "full" Linux environment (does have some quirks though), use https://f-droid.org/packages/...
    You can even install a desktop environment, though it needs a quite amount of storage.

    1 GB memory should even be enough for back end software software (unless using a lot of dependencies or a resource hungry editor...).
    Anyway, developing on an Android device will be supbar, no matter what you do.

    I don't know if you can earn any money with what you do, but at least you get new skill which may pay later.

    However it turns out, I wish you good luck.
  • 0
    @sbiewald oh termux, it does not work on my phone. I installed it from f-droid in the past
Add Comment