How can Dart-language apps run on native BSD?

We have one crazy thread here, about 32-bit support. Being that one justified or not, in any case there would be the need of some workforce to keep 32-bit up and running. But then, dropping it might palliate the symptoms, it will probably not cure the malady.

I read another text here, and I could just barf.

Maybe some of you know that I don't like Perl and even less Php, and instead prefer Ruby. Or maybe Python - but looking at Python code in comparison, feels like looking at COBOL in comparison to C. So much for that.

Sadly, every little crap that one might do in a browser, is written in Php. Talk webmail frontend. Talk forum.
There is no webmail frontend in Ruby. The one that was, was abandoned 14 years ago.

There is, however, a forum in Ruby. And you may know it if you get your certs from Let'sEncrypt. They use it.

I finally figured what it is, and, it can be used (no need to pay for it).

Now the fun starts. That piece depends on -among other things- sassc-embedded. Whatever that hurts. Then that one again depends on something, which depends on something, which depends on Dart. For whatever reason. Or, more precisely, you just get the message "Not Implemented" when you try to install, and then you look what's it about, and walk along the dependency chain, and it ends with: now download and compile Dart.

Considering: sass is a kind of "language" put upon CSS. It does nothing else than rewrite the CSS before it is sent to the browser - essentially nothing you couldn't do with any macro preprocessor (think m4, cc -E, etc.). But, it's "modern". And it needs to be "embedded", that means bidirectional talking between that prerocessor and the program in charge. For whatever reason.

Now that's the malady spoken of above. Things deliberately bloated and weirded. Things no longer split into well-designed and reuseable subsystems, but made into an unintellegible moloch, and dragging such moloch along for the smallest benefit.
It is the outright opposite of the unix philosophy, and FOSS doesn't help either, because there is now an oligarchy of providers, and these have zero interest in having anything else running than Windows, Linux and MacOS, plus their own derivatives.

At the bottomline, it's just a matter of bad engineering. And that's why we all need a "code of conduct" to shut down those who term it that way, in a free and open world.
The issue is not that there were proprietary software or closed source. It is rather to create a monoculture of environments. Because, when that is achieved, the free software is the smallest problem. I.e. what use is a phone-call if you cannot speak?
 
What is POSIX good for?

Code:
case "${platform}" in
    "SunOS")
        /usr/xpg4/bin/find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs ar cq "${LIBV8_MONOLITH}"
        ;;
    "Darwin")
        /usr/bin/find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs /usr/bin/ar -cq "${LIBV8_MONOLITH}"
        ;;
    "Linux")
        find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -and '(' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" ')' | sort | uniq | xargs ar -cqSP "${LIBV8_MONOLITH}"
        ar -sP "${LIBV8_MONOLITH}"
        ;;
    *)
      echo "Unsupported platform: ${platform}"
      exit 1
      ;;
esac
https:// github.com/rubyjs/libv8-node/blob/master/libexec/build-monolith


When I dared to say that POSIX defines (occasionally) nonsense, oh what an indignation - POSIX must not be disrespected!
(Yes, it does occasionally define nonsense, otherwise this patch wouldn't be necessary - but never mind, that's not the problem)
Code:
--- a/crypto/heimdal/kadmin/kadm_conn.c
+++ b/crypto/heimdal/kadmin/kadm_conn.c
@@ -189,8 +189,9 @@ wait_for_connection(krb5_context contextp,
 
     pgrp = getpid();
 
-    if(setpgid(0, pgrp) < 0)
-       err(1, "setpgid");
+    if(pgrp != getpgrp())
+       if(setpgid(0, pgrp) < 0)
+           err(1, "setpgid");
 
     signal(SIGTERM, terminate);
     signal(SIGINT, terminate);

Now I was thinking, blind believe was from the middle ages. And if nowadays something is respected, it should bring some benefit, over all.
So where is the mistake here?
 
You might want to see the good drhowarddrfine , his commentary just might lift your bad mood about web development and POSIX... ;)

I agree, sometimes standards are nonsensical - probably because the idea that 'stuff needs to be standardized' was taken too far on plenty of occasions.

I just want my stuff to work, work correctly, and work everywhere. Pick two, you can't have all 3.
 
Minor flaws in a standard are not the problem. These happen. But this specific standard was created, as far as I know, for exactly the purpose to avoid such things as the first quoted code piece - that basic system tools like ar and find would have different syntax on each platform. And it's not the first time I see this, I've seen ports in the tree that do no more than print "FreeBSD is not a supported platform."
 
Not sure if such still exist... yes, this one does:
Code:
      case host_os
      when /linux/
        gssapi_lib = 'libgssapi_krb5.so.2'
        ffi_lib gssapi_lib, FFI::Library::LIBC
      when /darwin/
        gssapi_lib = '/usr/lib/libgssapi_krb5.dylib'
        ffi_lib gssapi_lib, FFI::Library::LIBC
      when /mswin|mingw32|windows/
        # Pull the gssapi32 path from the environment if it exist, otherwise use the default in Program Files
        gssapi32_path = ENV['gssapi32'] ? ENV['gssapi32'] : 'C:\Program Files (x86)\MIT\Kerberos\bin\gssapi32.dll'
        ffi_lib gssapi32_path, FFI::Library::LIBC  # Required the MIT Kerberos libraries to be installed
        ffi_convention :stdcall
      when /solaris/
        ffi_lib 'libgss.so', 'mech_krb5.so', FFI::Library::LIBC
      else
        raise LoadError, "This host OS (#{host_os}) is not supported by ruby gssapi and the MIT libraries."
      end
/usr/ports/security/rubygem-gssapi/work/gssapi-1.3.1/lib/gssapi/lib_gssapi_loader.rb

That port is required if you want to run ssh from ruby code, and happen to have kerberized ssh. Aside from this gimmick and a few wrong pointer dereferencings (some of them have been fixed in the meantime), it works. BTW, it also states that it cannot run with Heimdal, but the truth is that these pointer mishandlings crash Heimdal immediately and MIT only after some ten connections (which normally do not happen in the same context).
 
Now what You say? This seems to be getting custom, choose Linux, Windows, Darwin and maybe Solaris.
No AIX - most of the other classics have disappeared anyway. And no Berkeley.

But back to the matter: I want that webforum. If it runs in Ruby, I want it. And I want it on native System - because I'm not going to use anything else.
Corollary:
I have a Linux reference guest on my desktop, and I get a horror whenever I touch it - the xterms are coloured so one almost cannot read anything, systems management is overpackaged in whatever strange tools - one doesn't get a concise understanding on what is actually happeing, neither where to modify it. OTOH, if one needs to do anything usual, there is immediately a webpage explaining how to do just that, and that usually works. I suppose everybody is doing just that, and nobody any longer understands how the system internally works.
But when I got my first Unix, I worked myself thru all the files installed, and got an understanding of what every one of them is good for. And that is still my philosophy: there is nothing on my systems where I wouldn't know why it is there.

So, that
Forum requires sass-embedded, which is a Dart application, and not available for FreeBSD. To build it locally one needs a Dart compiler (or SDK of whatever that thing is termed). That doesn't exist either and also needs to be built, first. To do that one needs other things, and I spent a day trying, and then I started to read the threads of those who tried before, and they were discouraging, like this one: https://github.com/dart-lang/sdk/issues/10260
The bottomline is, the big corps are not interested in portability (for obvious political reasons, as one can imagine). That means, if one would create a freebsd port, that would not be integrated into upstream - instead, upstream would continue to change whatever they like and you would be continuousely busy to see how to merge these changes in. Frustrating.
Whatever Copyright or Copyleft does just require them to somehow publish their source, it does not require them to cooperate in any sensible way. And given the sheer size of such projects, this is a very practical way to create proprietary environments - not by closing the sources, but simply by the amount of work necessary to adapt them and keep that current.

So I said to myself, let's see if that sass-embedded is needed at all, and first try to run the Forum software without it. But after I got far enough with integrating the software into my environment and actually start it, I quickly found where the problem is. It looked like this:

Code:
Error: Invalid CSS after "@return math": expected expression (e.g. 1px, bold), was ".div(0, 0);

So here is a function math.div(x, y) - this is not in CSS. It is documented here, and you can see the fine print ("Compatibility"): this is only supported with Dart, not with native Ruby or elsewise.

So that is what happens, and all our lucky developers sitting at their Linux and Apple laptops do happily engage in these new features, and do not consider that they lock out classical Unix environments with these.
 
The bottomline is, the big corps are not interested in portability (for obvious political reasons, as one can imagine). That means, if one would create a freebsd port, that would not be integrated into upstream - instead, upstream would continue to change whatever they like and you would be continuousely busy to see how to merge these changes in. Frustrating.
Whatever Copyright or Copyleft does just require them to somehow publish their source, it does not require them to cooperate in any sensible way. And given the sheer size of such projects, this is a very practical way to create proprietary environments - not by closing the sources, but simply by the amount of work necessary to adapt them and keep that current.
Yeah, and standards like ISO, IEEE, and others are there to combat that kind of issue... but I guess there's no way to completely outrun the politics. ?
 
Back
Top