Come along to the next meeting of the Frankfurt APLers - see here for more information and to sign up https://www.meetup.com/de-DE/Frankfurt-APLers/events/259725008/ #FRAPL
hmm, how about moving my whole apls indexing from array of position vectors to vector of direction arrays? i.e. ⍳vec → ϼvec, this kind of @, etc? seems way more APLy and memory efficient
also the fact that matrices are indexed by y x instead of x y makes me want to make APLP5s G.rect, etc called with G.rect y1vec x1vec y2vec x2vec
Here's a question: if {1+⍣{check}⍣⍵⊢0} gets you the ⍵-th item of the sequence that satisfies {check}, is there an easy way to get the first ⍵ terms of a sequence without have to rerun the whole thing ⍵ times with {1+⍣{check}⍣⍵⊢0}¨⍳10?
Or a way to get only the second, third, and fifth terms, but in one go
@Sherlock9 No, unfortunately, there's no easy way. You'd have to modify the function to concatenate a new value to the list of old ones, using the newest existing one as argument this time around.
@Sherlock9 I've wanted to allow ⍣2 3 5 in my Extended APL, but it seems to be broken right now.
@ngn Because it is kind of similar to ⎕ (I thought if adding them all as ⎕DFNNAMES, but there were clashes) and because it is already in the character set, and it is kind of the "home" group of fns.
@ngn Extended Dyalog isn't a golfing language. It is just showing how powerful Dyalog APL could easily become.
@ngn Oh, that's what you meant. Then it can't be automated (except appending "2" or something ugly like that).
@ktye It isn't a function, it is like the ⎕ prefix, but instead of referring to the system functions, it refers to the content of the dfns.dws library.
@ktye E.g. the dfns library has a function called cal. It will be available as ⌂cal
@ktye Yes, the closest thing Dyalog has to a standard library right now. However, it is a bit annoying that the library contents isn't available without an explicit import, and even then it is only available in the namespace it was imported into. This ⌂ syntax addresses the issue by being universally available.
@Adám that more says to me that Dyalog doesn't have a good way to manage imports rather than a need to special-case dfns. what if i want to use another library globally?
@dzaima Right. I'm working on addressing this, but meanwhile for Extended… Actually, my real proposal is adding ⎕X (for extensions) as a new root namespace containing imports. I personally use ⎕SE.X as a model for this. Adding more modules is as easy as dropping folders into C:\X
problem with Dyalog is the many places code can be written in and them not being directly associated with scopes. for :namespaces, i'd be okay with having :import dfns but that doesn't translate well to dfns & lone tradfns, requires a fancy IDE to allow quick imports and doesn't seem very APLy
@ngn wsname⌂item would be a new syntax, but 'wsname'.item is a consistent extension of . but a pain to model. I could do it with my high dot cover for . though. However, we really want to move away from workspaces as delivery format.
@dzaima Right, so in 17.1 you can drop files and folders containing files into specific locations and they will be imported when APL starts. You can also set one or two env vars to use custom locations.
@Adám though i have no idea what's in ⎕SE, I'd assume it isn't mission-critical, and if it is, i don't like it either
@Adám also i really don't like the idea of having a global library folder. i've heard tales of how annoying pythons setup is and i heard you saying before that the package management wasn't going to be global
@dzaima No it isn't critical. You can safely erase it all or use an empty or no session. However, things in ⎕SE survive switching workspace, as it is the right location for utilities. That was the original intention of ⎕SE. Note that you still have to prefix the names with ⎕SE., so it won't interfere with what you do.
@dzaima Morten is working on a workspace setup file that can part of a project. It will define which libraries to load for that project.
@dzaima It is for utilities you as a developer want to have at hand when you work, not for modules you want to include when you distribute your application to the end user.
@dzaima OK, I shouldn't have answered your question then, as it was leading. I originally didn't say anything about libraries. I said you can drop files and folders…
@dzaima Also, things will only be in ⎕SE (or #). If you want to use stuff without giving the full address, you can set ⎕PATH←'⎕SE.mystuff ⎕SE.myutils'. ⎕PATH can be local to a function too.
@dzaima ok thinking about it more it's probably that. somewhere in the workspace defining what libraries to globally import (relative paths, global files, names, doesn't really matter) is probably okay
so how exactly would using e.g. base64 from dfns look?
@dzaima For now, dfns is a workspace, but I was pushing for it to be converted to a collection of text files. Assuming that part had been done, you'd set DYALOGSTARTUPSE=/path/to/folder_containing_dfns_folder. This would cause all of dfns to appear in ⎕SE.dfns upon startup. Now you can do use ⎕SE.dfns.base64. If you want to use dfns directly without ⎕SE.dfns. you set ⎕PATH←'⎕SE.dfns'. Now you can simply call base64 as long as you don't have anything called that where you are.
@Adám ⎕SE (afaik) can be saved & used for multiple workspaces and is preserved between )loads. libraries imo are workspace/project specific, so shouldn't bleed into other places
@dzaima Sure, it can be saved, which is nice if you want a specific development environment setup (or even several to choose between), but by default, changes to ⎕SE are not saved. So if you want to put project specific stuff into ⎕SE, don't use the env var, but rather the new Link tool: ⎕SE.Link.Import '⎕SE.mylib' '/path/to/mylib'
@Adám yeah, that's probably what I'd do. Makes using them harder inside namespaces though, which would either require a builtin for the global namespace (which'd be strange) or importing to the current # everywhere (which is pretty much what java does). my personal solution would be to have another quad specifically for global things per-project
@dzaima No, it always refers to the root of the current workspace, even if you are in ⎕SE. It is completely analogue to ⎕SE in that way. The current namespace is ⎕THIS.