« first day (729 days earlier)      last day (1918 days later) » 

7:31 AM
@nathanrogers I don't think there'd me any way to do that without modifying the code as the compiler easily could inline variables and stuff (aside from live compilation)..
 
 
2 hours later…
9:30 AM
@nathanrogers Yeah, I'm with dzaima there. I don't think that's even possible no matter which language is trying to call that library. It is the nature of compilation, that things turn static, no?
 
9:53 AM
@J.Sallé Problem is that cells can only depend on cells that precede them in ravel order.
 
10:38 AM
@Adám The dependency ("topological order") problem is tricky. Can APL support lazy (ideally memoised) evaluation of array elements?
 
@chrispsn Not natively. However, if each cell is stored as a formula, it is possible to keep reevaluating until the result is stable. That's the method used here. Each cell effectively sets a flag when "done", and formulas that refer to cells that are not flagged as done are skipped in that pass.
 
 
3 hours later…
1:24 PM
0
Q: Assigning a niladic function

August KarlstromA non-niladic function F can be assigned to a variable G with G ← F However, if F is niladic, how do I prevent it from being evaluated?

 
 
2 hours later…
3:31 PM
Join us at the first Dyalog Meetup in New York, February 7th 2019. Interested in meeting APL users in the New York area? Sign up here https://www.meetup.com/en-AU/New-York-Dyalog-APL-Meetup/ Note: The location has recently changed - be sure to sign up to receive details of the new location & access instructions.
Come along to the January British APL Association meeting on Friday 25th at The Hoop And Grapes in London. For more information go to https://groups.google.com/forum/#!topic/baa-london/ja0EtJmRYqg
 
4:06 PM
I guess that leaves me with two options, dramatically modifying 2 immense libraries, and keep them both maintained as they're updated, or creating my own library of equivalent size in APL. 0_0 Well, looks like I'd better get started
perhaps create a global state object in APL, and pass that object, modifying any function containing unbound local scope variables to take the global object in APL
Only thing is, that's still a lot of work just to see if it is feasible. Decisions decisions
 
 
1 hour later…
5:40 PM
@nathanrogers personally I wouldn't change the actual functions but make small wrappers that modify the state and call the respective thing. I don't wouldn't think there'd me that much to add, as you'd have to actually use all the functions, and at worst case, the process should be automizable
 
But I don't see how that's possible. It's expected that there is some global variable flag to be set, and when you call functions it checks the state of this global variable
I don't see how that global variable flag will exist in such a way that the C library can "see" it
for example:

// c code:
globalVar = 1;

//elsewhere
void f(){
if(globalVar == 1) {
// do something here
}
}
then in apl I can't say globalVar←1 because f doesn't know about apl
I can't call my apl imported f without failing
because globalVar was never initialized
 
@nathanrogers so make void fW(int globalVarDef) { globalVar = globalVarDef; f(); }
 
if I were to create a wrapper like you said, won't the state created by that function be gone or garbage after it exits?
how do I know that it is being allocated correctly? and that it will persist?
all of the state that I have is being returned and held in APL variables
 
@nathanrogers i don't actually know how ⎕NA works, i'm just giving general food for thought ¯\_(ツ)_/¯
 
sure
I could give that a shot, I just don't know what happens to the state once a function exits
 
5:46 PM
how much of that global state actually is there? i.e. is it viable to pass & re-set it again for every function call?
 
I'm not sure, but it appears to be prolific
I would like to see some kind of setter function like you're saying, or a means of extricating the global state into a central object that can be managed more centrally
because then I could create that global object in APL
 

« first day (729 days earlier)      last day (1918 days later) »