HackerTrans
TopNewTrendsCommentsPastAskShowJobs

abrudz

no profile record

comments

abrudz
·5 เดือนที่ผ่านมา·discuss
I don't think I did anything special. I just uninstalled "Notepad", and that revealed the good old Notepad.
abrudz
·6 เดือนที่ผ่านมา·discuss
Yes, it can also a fork where A is an array while B and C are function and a tacit atop where either B is a monadic operator and A its array or function operand or A is a function and C is a monadic operator with B being its array or function operand. Finally, it can be a single derived function where B and C are monadic operators while A is B's array or function operand.
abrudz
·6 เดือนที่ผ่านมา·discuss
I'll be happy to give you a live personalised intro in https://apl.chat or head over to https://challenge.dyalog.com/ for an automated guided introduction (with a chance of winning a prize).
abrudz
·10 เดือนที่ผ่านมา·discuss
⍨
abrudz
·ปีที่แล้ว·discuss
https://apl.quest might be of interest.
abrudz
·2 ปีที่แล้ว·discuss
Also (mind the year this is from!):

— Can you teach a computer to write poetry?

— If you can teach it--yes, there's nothing easier. One of the things is that you could do, for example, you could simply give it a collection of poems or prose or whatever you have, and then provide a program which selects pieces from these, either individual words, individual phrases, individual passages, and so on, and merges them together according to some criterion, which you would then write into the program, and also with a certain element of chance. Usually, you know, you'd say, "Well, you want to pick this sometimes, that sometimes." Yes, you can write it, but you raise the question, what would be the point?
abrudz
·2 ปีที่แล้ว·discuss
Try it online at https://blazorcanvas20210704221924.azurewebsites.net/mcmpoc
abrudz
·2 ปีที่แล้ว·discuss
Think "normal" call syntax like

  foo(bar(baz(42)))
and then remove the superfluous parens

  foo bar baz 42
The expression is evaluated from right to left.

Now, let's make two of the functions into object members:

  A.foo(bar(B.baz(42)))
Remove the parens, extracting the methods from their objects, instead feeding each object as a left argument to its former member function:

  A foo bar B baz 42
This is normal APL-style call syntax; right-to-left if you want.
abrudz
·2 ปีที่แล้ว·discuss
See https://github.com/Isaac-Flath/anki and https://github.com/aeamaea/APL_Anki_Decks
abrudz
·2 ปีที่แล้ว·discuss
APL brings another couple of ternaries (besides for those mentioned with regards to J):

  x f[k] y
This one is universal among traditional APLs (though some modern APLs, including J, remove it). However, it is traditionally only used for a concept of application along an axis of APL's multidimentional arrays, and only for a strictly limited set of built-in "operators". That said, GNU APL and NARS2000 both allow it on user-defined functions (which have infix syntax, just like "operators").

  x n.f y
This is infix application of the function f from the namespace n, so n must have namespace value, but it is still a proper argument because n isn't just an identifier, but can also be an expression:

  x (expression).f y
In fact, the expression can be an entire (multidimentional!) array of namespaces:

  x (namespace1 namespace2).f y
is equivalent to

  (x[1] namespace1.f y[1])(x[2] namespace2.f y[2])
Furthermore, f can be a built-in "operator" which appears to exist in every namespace, but which also takes the current namespace into consideration. For example, x⍳y is the position of y in x and if io0 is a namespace wherein indexing is 0-based and io1 is a namespace wherein indexing is 1-based, we can write:

  'AX' 'BX' (ns0 ns1).⍳ 'X'
and get the result 1 2 because X is at position 1 in AX with 0-based indexing but at position 2 of BX with 1-based indexing. (I'm not saying you should write code like this, but you could.)
abrudz
·2 ปีที่แล้ว·discuss
Correct. Now try parsing `x (f1 f2 f3 f4 f5 f6) y`!
abrudz
·2 ปีที่แล้ว·discuss
It was about APL that Alan J. Perlis said "A language that doesn't affect the way you think about programming, is not worth knowing." (number 19 of https://cpsc.yale.edu/epigrams-programming)
abrudz
·2 ปีที่แล้ว·discuss
Have you looked at dfns (https://en.wikipedia.org/wiki/Direct_function)? They allow you something very similar. Compare Dijkstra's GCL:

  if a < b → c := true
   □ a ≥ b → c := false
  fi
To an APL dfn with "guards":

  c ← {
        a < b : true
        a ≥ b : false
      }
As in GCL, if none of the guards hold true, the dfn (braces) will terminate without return value, and thus the code will abort with an error.
abrudz
·2 ปีที่แล้ว·discuss
I wrote a program to launch and kill tight loop threads such that Windows Task Manager's performance graph would spell out text (though of course with spaces below lines in letters filled out).
abrudz
·2 ปีที่แล้ว·discuss
No, it appears on page 210 (logical page 220).
abrudz
·2 ปีที่แล้ว·discuss
It is indeed Dyalog APL (evident by certain features used, and also what Co-dfns requires). And yes, I agree, especially since this uses the ".apl" file extension of GNU APL, rather than the ".apls" that Dyalog uses for shell scripts. Oddly enough, the "⎕IO←0" appears outside the ":Namespace" which means it cannot be used by other APL code.
abrudz
·2 ปีที่แล้ว·discuss
Yes, https://apl.wiki/Co-dfns
abrudz
·2 ปีที่แล้ว·discuss
The paper's author speaks up in some episodes of the APL Campfire (https://apl.wiki/APL_Campfire):

- https://www.youtube.com/watch?v=w1VMeSzJLyE&list=PLYKQVqyrAE...

- https://www.youtube.com/watch?v=_jBQ53cRi0s&list=PLYKQVqyrAE...

- https://www.youtube.com/watch?v=a65K-0jaWc4&list=PLYKQVqyrAE...
abrudz
·2 ปีที่แล้ว·discuss
That's actually a historical quirk, because modern keyboards have = where old APL keyboards had × and - where old APL keyboards had +. You'd press Shift+ for - and Shift× for ÷ meaning that Shift gives the inverse function. Similarly, they Shift/ for \ (which is the inverse of / in APL).

See https://en.wikipedia.org/wiki/APL_(programming_language)#/me...
abrudz
·2 ปีที่แล้ว·discuss
Dyalog APL's RIDE interface doesn't even need you to find the symbol on a language bar; just hover the mouse over it, and a tooltip appears: https://i.imgur.com/XtzRGUs.png