[New Plugin] UNIX Converter

In the meantime, this plugin does exactly what I need, converting UNIX to a Bubble datetype. Thanks for your work @jarrad

Hey guys. Our page is only a fun side-project and the API was not intended to be used in real …
bubble and we are already working on it and hopefully come up with a solution for it soon. Meanwhile i try to improve the performance of the api temporary with more hardware resources.

It works again! :slight_smile:

Any news on this @jarrad? Is this perhaps turning into a zeroqode plugin? You mentioned you were working on a new script, hoping that will still be finished…

Unix Converter seems to be down. Anyone else getting that issue? Seems like the site they run the conversion through is offline.

The plugin is down.

You can calculate UNIX yourself: a date minus dates of 1st Jan 1970, shown as seconds times 1000.

Save the result in a state and use it as you please :slight_smile:

3 Likes

Yep, that would be correct. Good one.

If you’re partial to JS, you could just do some_date.getTime() in an Expression or JS to Bubble element.

This seems to be slower :frowning: somehow…

The toolbox plugins ARE NOT as efficient as native JS. So you’re correct. There seems to be a ton of overhead in JS to Bubble in particular. Suspect there’s something suboptimal in what Misha’s code does there. (I’ve got variations on this concept — communicate between Bubble and the plugin level — that are substantially faster. See my demos of Calendar Grid’s iterate feature, for example.)

But we’ve not seen Misha round here in a while now. I don’t expect a fix. In fact, I’m rather worried about @mishav… no sighting since February. :man_shrugging:

Maybe something big is coming out?..

Nope… I think MishaV might have been eaten by a shark or something. This happens to people who live in the southern hemisphere. :man_shrugging:

Could be :slight_smile:

By the way, have you managed to make any server-side plugin to work consistent?

I struggle to understand if I am doing something wrong or the NPM dependencies thing does not actually work with Bubble…

Server-side instantiation still takes a couple of seconds for the first time. My SSA plugin suite is way better than it was, but I’ve not finished it as I’ve been working on Calendar Grid Pro (in release), some pretty-AMAZING additions to Cal Grid Pro (Time Grid accessory) and a new thing that’s just to kill a really stupid thread here in the forums (guess what it does). Oddly, though I have no interest in client-side plugs, those last three are all… Client-side plugins.

Fate… so cruel.

I see.

Yeah, I saw the grid plugin, look useful and quick!

Could I ask for some help with SSA?

In the “modules” box I put:


{
    "dependencies": {
        "NAME OF PACKAGE (from NPM)": "latest"
    }
}

And the the I have in the code section:


function(properties, context) { 

    var someVar = require('SOMETHING');
     
    XXX.someMehtodThatCameFromNPM ( function (zzz, yyy) {      
                var m = yyy;
    });
    return {
        KEY_NAME: yyy
    }
      
}

This sort of thing does not work :frowning: I either get error of “KEY_NAME is not defined” or “KEY_NAME: null”

Any advice would be appreciated greatly!

This is potentially pretty worriesome. Of course because of @mishav but let’s assume he is alive and well. :slight_smile:

His toolbox plugin is so widely used now, I wonder if it needs to be integrated as an ‘official’ bubble plugin. If something happens with the plugin (maybe a problem when bubble releases a new version and is in conflict with Toolbox) who is there to solve the problem now?

I think too many people rely on that plugin to not make sure its covered…

3 Likes

Hey @funwtp, a dependency looks like this:

^^^ name of package : version to fetch

And then in your code, the require statement is just whatever the package needs (consult documentation):

Note that, apparently, you do not have to build the dependencies part anymore. Just having require statements is supposed to autofetch and load the latest package. (I’ve not tested this though.)

1 Like

Uhmm…It pings devices?

1 Like

BTW, @funwtp: If you’re still getting your feet wet with writing out valid JSON (e.g., the list of dependencies is JSON), tools like https://jsonlint.com/ are very handy.

Hey @vincent56 - while it would suck if @mishav’s been eaten by a dingo or something, the Toolbox plug, since it is open source, is right there out in the open.

(And, actually, it’s remarkably simple – but very very clever. At the end of the day, Run JavaScript just executes eval() on the code that’s typed into the Run Javascript action. It’s the whole concept that’s the amazing thing about the Toolbox plugins. The JavaScript to Bubble element is a touch more complicated than Run JavaScript, but again the brilliance of it is the concept, not the rather simple code itself.

The Server Script server-side action is kind of mind-bending and the most “complex”… but it’s just 14 lines of code and once you read it it’s like… “Oh, duh. Cool… but, duh.” Though there’s an amazingly clever thing in terms of its output – it shows how you can get an app-specific data type back from the SSA, which is something that’s not described anywhere else, AFAIK.)

I often forget that it’s open source and that you can just go examine or fork the plugin. D’oh!

The JSON part seems to be fine.

It it more that Bubble doesn’t seem to actually run the “required” function, in other words, I get expected result only 2 out of 5 runs :frowning: