MinGW



  • If game companies can claim they run on Linux when all they do is package their game with its own WINE binaries and run their Windows compiled programs through that....

    If Adobe can claim Acrobat Reader works on Linux, and all they offer is a version several years old that doesn't support needed functionality like saving a filled out form...

    If Microsoft can claim that .Net runs on multiple platforms, when the only reason it does is because of worked by third parties to develop things like Mono...

    Bottom line, sometimes cross platform requires a little extra work, extra software, or extra features. Get over it.


  • Considered Harmful

    For those interested in the thrilling conclusion, I am migrating our .scss files to .less files and using .less library. The documentation is a bit lacking (almost non-existent), but I managed to figure out how to hook into @import handlers so I can have .less records in the database reference other .less records in the database, which is a nice bonus. I'd expected that my only options would be a) serialize all files to disk before running the process, or b) recursively inliine @imported documents, but much prefer the more elegant - if undocumented - c) implement a custom importer.



  • Oh yeah, that's much easier than just spending 5 minutes installing Ruby.

    Do your bosses know how much time you've wasted on this not following Blakeyrat's advice? Tell them to cut me a check.


  • Considered Harmful

    @blakeyrat said:

    Oh yeah, that's much easier than just spending 5 minutes installing Ruby.

    Do your bosses know how much time you've wasted on this not following Blakeyrat's advice? Tell them to cut me a check.

    Installing a program on the server (Ruby) requires an "IT Readiness review", a process that requires analysis, review and sign off from several teams and will take over a month. I'm pretty sure I saved us time.


  • @blakeyrat said:

    Oh yeah, that's much easier than just spending 5 minutes installing Ruby.

    Do your bosses know how much time you've wasted on this not following Blakeyrat's advice? Tell them to cut me a check.

    .i.ii mi tugni la.blakirat.



  • @joe.edwards said:

    Installing a program on the server (Ruby) requires an "IT Readiness review", a process that requires analysis, review and sign off from several teams and will take over a month. I'm pretty sure I saved us time.

    Fuck.

    Who do you work for? Red Stamp, Inc.? Stereotypical Evil 80s Corporation, Ltd.? The Government?

    How is it possible that an organization that backwards even got a chance to learn about SASS while they're typing away on their Windows XP, 15" CRT monitor computers?

    Why are you still working there?

    EDIT: Still arrange for me to get a check, though.


  • Considered Harmful

    @blakeyrat said:

    @joe.edwards said:
    Installing a program on the server (Ruby) requires an "IT Readiness review", a process that requires analysis, review and sign off from several teams and will take over a month. I'm pretty sure I saved us time.

    Fuck.

    Who do you work for? Red Stamp, Inc.? Stereotypical Evil 80s Corporation, Ltd.? The Government?

    A Fortune 500 company with presence in 71 countries/regions.

    @blakeyrat said:

    How is it possible that an organization that backwards even got a chance to learn about SASS while they're typing away on their Windows XP, 15" CRT monitor computers?

    The organization didn't, our sub-subdivision did. We have near sovereignty in our development practices and within our intranet subnet, but there are stringent controls over what can go on a publicly accessible server. @blakeyrat said:

    Why are you still working there?

    They keep me very well compensated, and I rarely need to work overtime.

    @blakeyrat said:

    EDIT: Still arrange for me to get a check, though.

    I'll put in a good word for you.



  • Ok my consulting rate's $300 and it took me about 6-7 hours to compose, "just redist Ruby, idiot", so I figure that comes to $2100.


  • ♿ (Parody)

    @joe.edwards said:

    We have near sovereignty in our development practices and within our intranet subnet, but there are stringent controls over what can go on a publicly accessible server.

    This is morally reprehensible because you're deliberately sabotaging the script kiddie usability of your servers.



  • @blakeyrat said:

    it took me about 6-7 hours to compose, "just redist Ruby, idiot"

    Blakey's intelligence captured in a single quote.



  • @joe.edwards said:

    For those interested in the thrilling conclusion, I am migrating our .scss files to .less files

    I think the internet prefers what you started with over LESS because the former is a bit more programmable. But LESS has enough features over raw CSS already, so it's good if it works for you.



  • @David1 said:

    So people who writing for Linux for free or paid by Linux companies are bad, bad people because they didn't test on your preferred platform. Yeah, I'm not feeling it. If you want something guaranteed to work on your preferred platform, look for something labled "for Windows!" or offer someone money to port and maintain it on Windows.

    While I agree with you partially, even for other *nixs (I have a friend who is an OpenBSD developer), it becomes hell to port the code base because of what he says is "pure laziness".

    I write mostly webapps PHP/Python/NET. Some parts of PHP work differently on Apache compared to IIS or Nginx, it is trivial to put the check into a function and save someone else a headache.

     


  • Considered Harmful

    @Arnavion said:

    @joe.edwards said:
    For those interested in the thrilling conclusion, I am migrating our .scss files to .less files

    I think the internet prefers what you started with over LESS because the former is a bit more programmable. But LESS has enough features over raw CSS already, so it's good if it works for you.

    I prefer Sass myself. LESS won because it has a CLR implementation and Sass doesn't. Calling out to an external process on the web server is bound to bring down the wrath of IT security upon me.

    I managed to get libsass compiled, but it errors when I call it. The API is: call sass_new_file_context, get a pointer to a struct, populate the struct, call sass_new_folder_context with the struct pointer, call sass_free_file_context with the struct pointer. Except with PInvoke I can't manipulate the struct they pass back directly; I have to marshal it to managed and then marshal it back again, in which case I'm not passing back the same pointer I got from the API call. There's also a fair chance my managed struct isn't aligned with their struct.

    I don't really know what error is happening with libsass, I get a generic error code back. At least with the LESS approach I am making measurable forward progress and have certainty I will finish this week.



  • Interestingly enough I just found this. Hasn't been updated for 2 years but it does have pinvoke definitions and what seems to be code that uses them. It also appears to have a vcproj for building libsass with MSVC.


  • Garbage Person

    @Arnavion said:

    This thread is full of examples of Linux-only software that pretends to support Windows. Give me even one example of Windows-only software that claims to work on Linux.
    Just for shits and giggles, I stood up a Debian VM today. Pulled down monodevelop and smacked the Build button on the solution I have set up to build the entire universe that my team is responsible for.

     

    133 projects. Every single one of them with only source-tree dependencies built, passed unit tests and likely would have worked if I'd bothered duplicating the deployment dance. The ones with binary dependencies obviously didn't work.  102 of 133 projects built. That's 76% utterly accidental cross-platform compatability from Windows to Linux - for a complicated pile of enterprisey nonsense that sucks at compatability so much that it trainwrecked the first time someone installed it on Windows x64.

     Cue kvetching about how this doesn't count because blah blah mono is a compatability layer blah blah piss moan etc.

     

    Anyway, the 102 components that worked comprise enough of my environment's demand curve that I'll be evaluating using Linux VM's for the brunt of our seasonal scale-out. 



  • And another one who doesn't read the posts he's replying to. I asked for Windows-only software that claims to support Linux. Yours doesn't, so it's not even relevant to the point - that projects like GTK claim to support Windows, yet don't bother testing on Windows, don't fix Windows-only bugs when they're pointed out, and don't even build on Windows without patching.

    But to humor you...

    @Weng said:

    The ones with binary dependencies obviously didn't work. 102 of 133 projects built.

    A quarter of your projects didn't build, and you think you achieved something? Congratulations to your team for not hard-coding backslashes in their file paths, I guess, because that and pinvoke is pretty much the only way to have .Net code not work on Mono/Linux without modifications.

    @Weng said:

    for a complicated pile of enterprisey nonsense that sucks at compatability so much that it trainwrecked the first time someone installed it on Windows x64.

    And the cause of the trainwreck was those 31 projects with the binary dependencies, wasn't it?

    @Weng said:

    Cue kvetching about how this doesn't count because blah blah mono is a compatability layer blah blah piss moan etc.

    If you think Mono is a "compatibility layer" you're a bigger moron than whatever you think I am.


  • Discourse touched me in a no-no place

    @Arnavion said:

    A quarter of your projects didn't build, and you think you achieved something?
    I'd be interested to see what the other constraints are that make this a reasonable choice. Some trade-offs are definitely worthwhile.


  • Considered Harmful

    OK, after about 10 more hours of recompiling sass, changing around marshaling settings, finally writing memory byte-by-byte in C#, I got it to work.

    The problem? I didn't fucking populate the image_path field in the sass_context. This was causing it to segfault. Yes, no error message, no exception. Access violation. My first compile was probably fine, my marshaling was correct from the start. I didn't set the image_path, for my proof-of-concept .scss file that was, in its entirety: body { background: blue; }.



  • @joe.edwards said:

    OK, after about 10 more hours of recompiling sass, changing around marshaling settings, finally writing memory byte-by-byte in C#, I got it to work.

    The problem? I didn't fucking populate the image_path field in the sass_context. This was causing it to segfault. Yes, no error message, no exception. Access violation. My first compile was probably fine, my marshaling was correct from the start. I didn't set the image_path, for my proof-of-concept .scss file that was, in its entirety: body { background: blue; }.

    Your debugger doesn't let you see the stack trace of a crash?


  • Considered Harmful

    @Ben L. said:

    @joe.edwards said:

    OK, after about 10 more hours of recompiling sass, changing around marshaling settings, finally writing memory byte-by-byte in C#, I got it to work.

    The problem? I didn't fucking populate the image_path field in the sass_context. This was causing it to segfault. Yes, no error message, no exception. Access violation. My first compile was probably fine, my marshaling was correct from the start. I didn't set the image_path, for my proof-of-concept .scss file that was, in its entirety: body { background: blue; }.

    Your debugger doesn't let you see the stack trace of a crash?

    Not in C# when the stack frame is in native compiled code.



  • @joe.edwards said:

    The problem? I didn't fucking populate the image_path field in the sass_context. This was causing it to segfault.

    Are you sure? <a href="https://github.com/hcatlin/libsass/blob/master/sass.cpp#L50>https://github.com/hcatlin/libsass/blob/master/sass.cpp#L50 does do a null-check. When you got the struct from unmanaged code and unmarshalled it into a .Net struct, the image_path was null, right?



  • Dammit I keep reading ".scss" as ".sccs" and thinking there was going to be a rant about that particular version control system...



  • @too_many_usernames said:

    Dammit I keep reading ".scss" as ".sccs" and thinking there was going to be a rant about that particular version control system...

    But not .ssds?


  • Garbage Person

    @Arnavion said:

    And another one who doesn't read the posts he's replying to. I asked for Windows-only software that claims to support Linux. Yours doesn't, so it's not even relevant to the point
    Yeah, I know, I saw your post. I didn't care, because Community Failure here doesn't give you a handy "I want to reply to the root of the thread" option unless you scroll all the way up to the OP. Your post was handy, and vaguely topical, so you got it.

     @Arnavion said:

    @Weng said:
    The ones with binary dependencies obviously didn't work. 102 of 133 projects built.
    A quarter of your projects didn't build, and you think you achieved something? Congratulations to your team for not hard-coding backslashes in their file paths, I guess, because that and pinvoke is pretty much the only way to have .Net code not work on Mono/Linux without modifications.
    Or using one of the corners of the framework that mono cut - like the less well-traveled parts of WCF (which I was actually very concerned about hitting). And if you note my earlier comments on how we deal with opensource dependency hell (with binaries), 3 out of 4 is surprisingly good. Seriously. For context, this thing has been built, maintained and expanded upon by years of ambitiously terrible architecture astronaut type programmers. I took the pile over in January and I'm just getting to the point where my team has triaged and stopped the worst bleeding. For example, we can now tell whether a given job is actually running or not!

    @Arnavion said:

    @Weng said:
    for a complicated pile of enterprisey nonsense that sucks at compatability so much that it trainwrecked the first time someone installed it on Windows x64.
    And the cause of the trainwreck was those 31 projects with the binary dependencies, wasn't it?
    As a matter of fact, no. It still fails on those binary dependencies (until I find someone with spare bandwidth to finish the x64 buildout), but it was more or less a 100% unmitigated clusterfuck the first time someone tried it. Directly in production.

    No, I don't know the details of what the fucking hell my predecessors did - I haven't reviewed the reports and checkins that fixed it yet. Probably hardcoded paths or some shit (bonus points because we don't even install to Program Files). I also don't know why the fuck every single service call results in 14 threads being started, most of which do nothing but start other threads like a deranged set of matryoshka dolls. I also don't know how the fuck they've managed to make it absolutely impossible to connect a debugger to a running session and have the symbols match up. Goddamn clusterfuck savants.

    @Arnavion said:

    If you think Mono is a "compatibility layer" you're a bigger moron than whatever you think I am.
    I know better, but this forum is full of the sort of dickweed that would argue that .net in mono on Linux isn't "running on linux" at all. Hence why I built that lovely strawman. They work like scarecrows and keep the real pests down.


  • Considered Harmful

    @Arnavion said:

    @joe.edwards said:
    The problem? I didn't fucking populate the image_path field in the sass_context. This was causing it to segfault.

    Are you sure? https://github.com/hcatlin/libsass/blob/master/sass.cpp#L50 does do a null-check. When you got the struct from unmanaged code and unmarshalled it into a .Net struct, the image_path was null, right?

    Yes, quite positive. I've managed to reproduce this in a pure C++ context, calling only the sass_new_context() and sass_compile() functions (note: different entry point than the one you reference which does a null check).

    I've already found and fixed a bug with their builtin max() function, and made a pull request which was accepted surprisingly quickly. I may fix this bug for them as well.


    Also, the error as seen from C++ is as follows:
    terminate called after throwing an instance of 'std::logic_error'
      what():  basic_string::_S_construct null not valid

  • Considered Harmful

    @joe.edwards said:

    I may fix this bug for them as well.

    Done and done.



  • @joe.edwards said:

    @joe.edwards said:
    I may fix this bug for them as well.

    Done and done.

    Apparently you broke the build.

    Or at least someone did.



  • @Ben L. said:

    @joe.edwards said:
    @joe.edwards said:
    I may fix this bug for them as well.

    Done and done.

    Apparently you broke the build.

    Or at least someone did.

    It's been failing for quite some time actually.

  • Considered Harmful

    @Arnavion said:

    @Ben L. said:
    @joe.edwards said:
    @joe.edwards said:
    I may fix this bug for them as well.

    Done and done.

    Apparently you broke the build.

    Or at least someone did.

    It's been failing for quite some time actually.

    The build is fine, some unit tests are failing. The implementation is a work in progress, mostly edge cases and newer Sass features. This my first time contributing to a FOSS project and I'm actually kind of enjoying it. I feel some reward in knowing that I can spare someone somewhere a bit of the headache this has caused me.


Log in to reply