Code Monkey home page Code Monkey logo

link's People

Contributors

abrudz avatar aplteam avatar dimitryo avatar dyaandys avatar e9gille avatar fengerer avatar karlholt avatar mbaas2 avatar mkromberg avatar nicolas-dyalog avatar rikedyp avatar stampes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

link's Issues

Odd warning message on XLOAD

I ran the QA tests which passed successfully. After that I tried XLOADing a ws and saw the folowing warnings in the session:

      )xload C:\devt\svq\SVQ_12_124.dws
C:\devt\svq\SVQ_12_124.dws saved Tue Apr 12 11:33:15 2016
c:/src/trunk/SALT\core/Import.dyalog cannot be found
c:/src/trunk/SALT\core/Fix.dyalog cannot be found
c:/src/trunk/SALT\core/FileSystemWatcher.dyalog cannot be found
c:/src/trunk/SALT\core/Export.dyalog cannot be found

Any idea what causes this?

Add mechanisms to add/remove names from links

Some changes to the active workspace cannot be detected by the ]link mechanism. The user command should provide a way for a user to explicitly add or remove source code links, for example:

]link -define=dfn←{⍺+⍵}
]link -expunge=myns
]link -rename oldns=newns

Change of a function name in APL editor shall result in 2 functions linked to 2 (different) files

APL functions are linked to individual files with "flatten" option. We invoke Link.EditorFix via an AfterFix event.

If we change a function name in the Editor we expect to get:

  • 2 functions in the workspace
  • each of these are linked to it own file
  • both files are located in the same folder as the "source" function.
  • Only the new function and the newly created file is modified.

The new file will be seen from Git as "untracked".

Link.Export should call beforeWrite [for variables]

UCMD.Export (

Export{ Write items to file in folders
) ignores completely objects of nameclass 2. This means that when the namespace is first exported, variables aren't allowed a chance to be processed by onWrite. Is this by design or is it an oversight?
In fact: shouldn't Export always use onWrite if present before commiting to the various []NPUT? If not, it's possible that special logic in onWrite only kicks in when the objects (even classes 3, 4 and 9) are modified after the first export. But the logic in onRead/onWrite could prescribe for certain objects different extensions, different encodings. And this would mean a big mess in the source folder...

Support -casecode

It should create file structure with case code suffix, both on folders (namespaces) and files.

)CLEAR keeps links active

I )CLEARed and then attempted re-running the link cmd only to find that it was still active.

Expected to see an automatic reset of all links. Is that reasonable?

Combine typeExtensions and codeExtensions and customExtensions

It is confusing to have all these specifications. A single 2-column matrix based on the current typeExtensions is enough. All extensions listed in the right column will be considered as code extensions, and additional custom extensions (which still require custom handlers beforeRead and beforeWrite) can be listed with ¯1 as their type, while 0 indicates "everything else".

Link will scan down the first column to find a compatible entry. E.g. for tradfns (3.1=⎕NC), Link will use the first found of 0 (everything else) 3 (functions) 3.1 (tradfns).

The default extensions will be:

Type extension
2 apla
3 aplf
4 aplo
9.1 apln
9.4 aplc
9.5 apli
0 dyalog

Using Link together with "shared code files" have negative effect on performance. (Dyalog reference 16653)

We often use a setup, where a large number of APL functions are stored in a shared code file.
All functions are in root namespace

When we link to files with "flatten" option is takes a very long time compared to when all functions are in stored directly in the work space.

Two workarounds can be used short term:

  1. Call Assimilate Shared Code Files (8666⌶⎕NULL) before calling ]link
  2. Use ⎕EX to delete the functions etc. before calling ]link

Classes (their scripts) are destroyed by a ]link -reset

Try the following:

Create a class and put anything you want in it:

      )ed ○class

Then execute the following:

      ]link # d:\trash\wrapper\source\
 # linked to d:/trash/wrapper/source/ 
      )ed class
      ]link -reset
 Link from # to d:/trash/wrapper/source/ removed (2 names affected) 

Now try:

     )ed class

again... Surprise! The script is gone!

Add quick commands for common operations

Make it easier to perform common operations like creating a new source folder or loading an existing one into the workspace, without having to provide lots of switches. For example:

]link create myns c:\sources\myns

Would validate that the target folder is empty and suitable for use in a new project.

Add support for watching files on OSX and Linux

I note that the Readme mentions that having automatic updates to the workspace based upon filesystem changes and additions only works under windows.

Note that both xnu (the darwin/osx kernel) and the Linux kernel provide for userspace notifications upon changes to specific files/directories. So it should be possible to implement equivalent functionality on those platforms.

However, maybe this requires changes in the backend APL interpreter process, rather than in this codebase?

Add a Link.Expunge function

⎕EX of a linked object does not remove the file. This should probably not be changed, but we could add a ⎕SE.Link.Expunge or Delete function which would remove and object with its file.

Error when linking # in non-empty ws with empty target dir

We discussed this, I know. I think we said "error if both ns and dir non-empty"

  1. When first "exporting" dws content to file, target dir would be empty and there is no risk.

  2. When loading into # from disk, we only need to signal error if # not empty.

NC 2 not handled

⎕SE.Link.Fix doesn't receive the oldname from the ⎕SE.SALTUtils.EditorFix:

[64]			      →(args[4 6] ⎕SE.Link.Fix ⍬)⍴0 ⍝ If linked, returns 1

should be

[64]			      →(args[4 6 5] ⎕SE.Link.Fix ⍬)⍴0 ⍝ If linked, returns 1

]link.create/export create files with the wrong name

Repro: in a clear WS create an empty class, like aaa.
)ed ○aaa

Escape immediately to leave the class empty (the content is not relevant).
Then try and export the root:
]link.export # d:\trash\wrapper\src1
Exported: # → d:\trash\wrapper\src1

This is the content of the generated folder:

image

There are two files, and not one, as expected. And the one that is supposed to be aaa.aplc is called aaadyalog (no "." between name and extension and wrong extension).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.