Rubens Silva · Sep 21, 2017 go to post

Nice, but to prevent flooding the OP's e-mail inbox you could introduce an internal timer that gets triggered when a new answer is posted.
e.g., if I post a new thread asking for help with something. And someone posts an anwer, as I'm the OP I'll be notified by e-mail if I don't see the thread again within 15 minutes. If I still don't see the thread, wait another day and send the e-mail again.

Well, something like that.
Actually... forget my idea, I guess it would complicate and annoy OPs even more needlessly.

Rubens Silva · Sep 21, 2017 go to post

Hello Evgeny! Sure!
 No. 5 means that instead of showing the editor that creates a reply, leave it hidden untill the user clicks Add new comment. This way this editor won't appear before the one that creates an answer. 
Doing that, it's possible to prevent replies that should be an answer, so that they can be checked by the OP.

 

No 7. is simple, but I'll elaborate it to explain the why. I have noticed that the community contributes a lot with tutorials (including mine), but there's no way to classify them in that way, leaving them mixed with unrelated threads. Several times, these tutorials get lost because they disappear from the user's visibility, since they get pushed down by newer threads.
So if you introduce a tag or even a group to correlate them, it would make easier to search them.
 

Rubens Silva · Sep 19, 2017 go to post

Whoa! This is even better than what I suggested. Thank you whoever you are!

Rubens Silva · Sep 19, 2017 go to post

why didn't someone else think of this before?

As far as I know, VueJS uses property accessors to ovewrite set/get behavior. When AngularJS came out there wasn't an estabilished way of reproducing that, so who takes the blame here was the slower JavaScript development, untill ECMAScript 5 came out. Mostly because IE of course.

Rubens Silva · Sep 18, 2017 go to post

Added demo explaining stream usage. This ends the Part 1.
P.S.: No tag for tutorials?

Rubens Silva · Sep 15, 2017 go to post

Hello, sorry for the bump again.
I have updated the original post to include a tutorial. This is only the Part 1!

Rubens Silva · Sep 11, 2017 go to post

Hello Maks.
Not that I'm against using e-mail, however I think it's more resourceful if we keep the discussion opened for whoever has interest on participating. We could use the community forum as a start point and as the project expands into something solid we migrate to a github issue.

Rubens Silva · Sep 8, 2017 go to post

JavaScript is evolving day by day and really, really fast. Check what ECMAScript 6 and even 7 to see what it's becoming.
COS could evolve faster as well if there was some kind of COS API for parsing and rewriting the language itself. Something that could transpile features unknown to the current COS language. Just like BabelJS does.
However COS is proprietary, and just like Linux and Windows, open-source projects  evolve faster due to the community involvement. I don't mean to make it fully open, but provide the community a way to interact with it by providing with new features proposals.

Rubens Silva · Sep 6, 2017 go to post

Hello.
A new version will be published soon. This version has support for using streams properties and SQL along with %Dynamic instances.
As these features reach stable versions, I'll be publishing a tutorial about how to use Frontier.
If you want to dive deep into it, I recommend taking a look on the router below. It's really self-explanatory.
https://github.com/rfns/frontier/blob/sql/cls/Frontier/UnitTest/Router…
If you import the class WebApplicationInstaller you'll be able test these features by navigating to localhost:57772/api/frontier/test/[one of routes from the router above].
P.S.: Sorry for the bump.

Rubens Silva · Sep 6, 2017 go to post

I would like to. But I need some clue about how to isolate monoids from the global scope, this would push the development a lot further. I mean... it would be wonderful if subroutines could be passed as parameters, you know. But this is out of my reach yet.
For now what I could do is to add more methods to handle different type of datas.

Rubens Silva · Sep 6, 2017 go to post

No, it's a proof-of-concept, my purpose was to discover a way to express the minimal features needed to develop in a functional fashion.
You can use it with real projects and it will work as it should, the only real issue might be regarding the performance in a long term, since this library uses %ConstructClone to keep the monoids pure.

Rubens Silva · Sep 5, 2017 go to post

Interesting, can you expand this subject a bit or point the documentation? I'm also interested about how to capture user input using the Studio's output.

Rubens Silva · Sep 5, 2017 go to post

Hello Kevin,

From my experience you cannot use Studio's output window to ask for input from the user and I think that's because the Studio's output window  is not really a terminal device.
I also tried to read the input from this device without success as well. I hope  I'm wrong and you can find an answer for that (and mine as well).

Rubens Silva · Sep 4, 2017 go to post

 

Cache for Windows (x86-64) 2017.1 (Build 792U) Mon Mar 20 2017 19:13:14 EDT

Rubens Silva · Sep 4, 2017 go to post

Greetings everyone.
I have decided to publish the current version for your pleasure.
I'm now working on implementing SQL support and access policies. But you can already check it out.
Remember to provide some feedback here or using the issues if you feel like it.
Also, if you want to contribute, feel free to do so.
Best regards.

Rubens Silva · Aug 30, 2017 go to post

It doesn't, at least not directly. I used it for boosting the comparison speed by using git diff.

 

The idea as a whole was:
diff - whenever the user selected the "Import" from the Source Control menu, it would run git diff instead, if git was installed and the current project is versioned (has .git).
add - automatically add modified and new files to the staging area whenever the item is saved on Studio.
I ended up dropping those ideas because I noticed I was wasting resources as it need to be less exploitable and it also went against my objective of creating something agnostic to version control systems.
If you want to see the result, here's the project in question.

Rubens Silva · Aug 29, 2017 go to post

Wouldn't it require all methods to implement the device logic? I guess that's why he asked for device redirection.

Rubens Silva · Aug 29, 2017 go to post

Hello Athanassios,

I think you're on the right track. But that should be only the beginning.


To capture "writes" from Caché you need to redirect your IO and write the data back to the device you binded your Python interpreter. This is your writer device. If you need help about how to configure your writer device, check the Job Command Example.
Remember that it's your responsibility how you'll implement a buffer and how much it can store before writing it back to the implementer. I do recommend using a stream here.

Now I don't know if simply by calling the binded method you're able to see it's output before returning. If it doesn't, you problably need to open a TCP connection from the implementer's side too and listen to the writer device using a separated thread.

Rubens Silva · Aug 29, 2017 go to post

Sadly I haven't the code with me anymore. because it was a a feature implemented on another branch, that's why I posted a Gist instead. I used it to preserve the important implementation parts since I deleted the branch. Check my post again to understand better regarding the placeholders.
Port.SourceControl.Extension.VCS is quite simple actually, %OnNew initialize two temp files path that serve as output and error feedback, inheriting classes use those files as parameters along with >.

Rubens Silva · Aug 29, 2017 go to post

Hello Benjamin,

This is how I binded a class to some git cli commands on the earlier versions of my project.
The main tip here is to use ZF along with ">" to output the result to a file. This way you can make Caché aware about what happened when the command was executed.


You'll notice that you can even create a custom query for operations like log, diff, etc.
If you don't want with the logic behind the outputs, you can simply use RunCommandViaZF from %Net.Remote.Utility.
But remember that older versions haven't this method.
Also, when reading the command string you'll notice a lot of {PLACEHOLDERS}. You don't need to implement it to work, just rewrite it to use static parameters instead.

They are:
{VCS} - The absolute path to the git executable.

{SLASH} - The resolution from \ or / depending the OS.
{Pn} - Where n is a sequential number, they are the parameters needed to call the command.
And finally, here's a sample:
do $zf(-1, "C:\Program Files (x86)\Git\bin\git.exe --work-tree="C:\Projects\Test" --git-dir=C:\Projects\Test\.git add cls 2> ""outputfilepath"" > ""errorfilepath""")

Rubens Silva · Aug 20, 2017 go to post

Hello Coty.
I noticed that you starred my github repository and I thank you for that. :)


Back to your question, I think you're detecting changes by applying an unusual way to do that, since you said you can't trigger an action when modifying static files. Just so you know, as long as you're working with the Studio's SourceControl API, you should be able to do whatever you want whenever an  item is modified, you're even free to decide how to restrict the implementation, all of this regardless of the item you're updating.
Look at this part to understand how it's done.

About your use-case, we're actually testing Port with this development format. We have one code base, that's our development server, multiple namespaces simulating different customer configurations and mock data (not mock, actually their test data).
Even though this model works, by our analysis it can get pretty frustrating for users coming from a distributed version control, because they notice that multiple developers interacting with their "repository". Still, it's already a step ahead from not versioning at all.
However, the team is expected to migrate all their source to projects, since Port annoys the user about trying to save default projects and even detects items that are already owned by other projects. This forces all the team to prioritize organizing their code base.

Rubens Silva · Aug 11, 2017 go to post

Good! Now can IS do something about shrinking replies?
I also find it difficult to remember that the reply cannot be  marked as ANSWER.
Most of times I end up clicking on "Add comment" instead of creating a reply that could be marked as answer.

Rubens Silva · Aug 10, 2017 go to post

Thanks for pointing that out.
PUBLIC=1 is an inheritance from another project with support for 2010 that worked almost the same way. At that time there wasn't a way to determine whether the method should be available to be called via HTTP or if it should be blocked, so I implemented that security flag.
Nowadays, as %CSP.REST uses UrlMap to restrict callable methods, you can consider using PUBLIC as deprecated. My bad.

Rubens Silva · Aug 10, 2017 go to post

Hello Jon.

 

Please note that the large JSON is not problem itself, but a specific field instead.
I'm already avoiding a round trip by outputting to the device instead of using streams. 
As a side note, I noticed that parsing/serializing using %Dynamic API is much faster and more efficient than %ZEN.proxyObject.

 

So I'd prefer keep using it if possible. But since you said that Caché cannot get such values I suppose I can advice the user to enable long strings. I don't think any property content could even get close to 3GB.

Rubens Silva · Aug 10, 2017 go to post

You're right, it's not 3GB. Yes, objects containing base64 binary can be troublesome.
For now a workaround I would suggest is to split the string into chunks and put them inside an array, that way you can use .join('').

Rubens Silva · Aug 10, 2017 go to post

This works without implementing anything else. So I'll consider it as a coding style or preference.

Hmm, I didn't know I could use $classmethod or $method with expression methods as well.