« first day (1501 days earlier)      last day (1450 days later) » 

18:00
  :If ~⎕NEXISTS args
      →0⊣Log'Unable to find "',args,'"'
  :ElseIf 2=t←1 ⎕NINFO args ⍝ normal file
      :If (lc⊢/⎕NPARTS args)∊'.json' '.json5' ⍝ json files are configuration
          :If 0≠⊃(rc msg)←LoadConfiguration JarvisConfig←args
              Log'Error loading configuration: ',msg
          :EndIf
      :Else
          CodeLocation←args ⍝ might be a namespace script or class
      :EndIf
yeah that's more like it
ngn
ngn
@nathanrogers that doesn't baffle me. i wouldn't rewrite it. sometimes i do, but not this particular one. it's simple enough to read as-is.
I'm not lumping you in with "most" @ngn the conversation is around golfing vs non golfing APL styles
so obviously
this is more idiomatic to a golfing style
so of course it wouldn't baffle you because you're part of that group
writing code like that makes iverson roll in his grave
I mean... those control structure were part of APL 1 iirc
18:01
you should give a talk on control structures as a tool of thought
if you imagine people writing the kind of code that golfers produce on an IBM 7090, you're bonkers
@rak1507 stop clowning and putting words into my mouth
I didn't say control structures were good
I said they're normal
I said that's about what average APL code looks like
they're only normal because that's what people have decided APL should look like
go read ]link written by ADAM. Of all people you'd think he'd have a taste for brief code, but he uses control structures
@rak1507 no its because people need to get work done and don't have hours to consider the phrasing of a single one-liner
ngn
ngn
@nathanrogers of all people, i wouldn't
Why would I think Adam would like brief code? I think the opposite with his constant advocacy for tradfns
18:04
Well, there are somethings that you need tradfns for
in an actual application
not in a 1 liner novelty tinker-toy
if you need something to write an application it's because of the language's choices not because of the merits of that particular thing
I'm not saying those things have merit
I'm saying they're normal, average, common
reading comprehension in APL higher than english apparently
The only reason something is commonplace in a language is because the implementers have decided that is a good way to do things
right, back in the 80's my guy
and as yet, much of those things don't have "expression" alternatives
Because of the language implementers choices
18:06
right
there's baggage and legacy
common lisp is exactly the same, APL and CL's best bits aren't the bits that are building applications and making businesses money
doesn't mean that the worst bits arne't necessary
it just means the good bits are better than any other language
ngn
ngn
@nathanrogers logic :)
also I disagree that you need tradfns to build applications, I've written a few personal mini scripts in APL that while are not huge projects are not 'one line tinker toys', which use a total of 0 tradfns
@rak1507 Well, usually the implementers lead the way in terms of programming style, but it's not like users have to listen to them.
I mean, you try writing trap code in a signification application to provide error handling on asynchronous sockets
without a tradfn
@Marshall true, it would definitely be nice if people went against dyalog and used purely dfns :)
@nathanrogers {errorcode::stuff ⋄ foobar}
18:09
dfns are a decent example actually. Scholes was very insistent on a pure functional style but plenty of people use modified or even global assignment with them.
@rak1507 that isn't error handling, that's... error avoidance?
true :(
but you can't always avoid errors
@nathanrogers you trap the error, and then handle it in stuff
errors need to be handled so your multi billion dollar application doesn't crash during peak hours
oh right
there's ::
18:10
yes
completely forgot about that one
what a surprise
man you're toxic
like I was answering the guys questions and nothing that I've said thus far is inaccurate
ngn
ngn
@nathanrogers hm..
it IS NORMAL to see procedural APL in actual applications
18:11
I don't disagree
it's also NORMAL to write multiline DFNS which name intermediate values
is it idiomatic to write the shortest expression possible? If your domain is golfing solutions, yes, if your domain is a team writing business applications that needs to be maintainable, no.
because your set of idioms changes with your change in target
I would say john scholes' style is the most "correct" level of brevity ≡ short + clear
but golf = short, short can be clear, but isn't by virtue of being short
@nathanrogers try finding a tradfn in the dfns workspace
ngn
ngn
@nathanrogers again: "clear" is subjective
like all squares are rectangles, but rectangles aren't necessarily square. A balance between short and clear results in brief and elegant
@ngn of course it is
@rak1507 I'm not advocating tradfns, I just said there are some faculties that are NORMAL in APL APPLICATIONS that cannot be achieved without the use of tradfns
not to mention people relying on older versions of APL where certain features don't exist
@rak1507 try finding a single line golfed solution in the dfns workspace either
ngn
ngn
18:16
@nathanrogers you're philosophizing too much, making unsubstantiated statistical claims about "clarity" and "most aplers" (based on your personal experience?) and drawing conclusions from them about how code should be written by everyone else
like, just for clarificaiton, the APL2XL project uses tradfns... in the build directory, where all the mutation happens. It's like a warning sign: "mutation happens here", but the rest is all DFNS
@ab5tract pmat2←{{,[⍳2]↑(⊂⊂⎕io,1+⍵)⌷¨⍒¨↓∘.=⍨⍳1+1↓⍴⍵}⍣⍵⍉⍪⍬}
@ngn I'm not drawing any conclusions about anything. the ONLY conclusion I made or any kind of statement is what IS COMMON, and what I BELIEVE to be the best balance of clarity + brevity
you're projecting
or reacting
I can't tell which, but I don't have a lot to argue
@ngn No, I think you're reading in conclusions that aren't there. The question was just about "paradigmatic" APL, so Nathan described a way that many people use the language. I don't think there was a deeper intention.
I was just answering the question that different domains have different aesthetics
@Marshall this
ngn
ngn
18:19
"best balance" and "paradigmatic" sound like you're recommending that
@ngn he asked what is paradigmatic
But it is confusingly mixed in with this "brevity" discussion.
and I was saying that what is idiomatic depends on your domain
@rak1507 that's the entire code? dfns workspace entries are known for being tools of explaining and comparing with relatively high levels of verbosity in terms of comments and temporary variables. if pmat2 stands all alone in dfns that would be an exception rather than a rule
and APL has a lot of different domains
so then after making that clear point, I mentioned what I believed to be the best idiomatic aim which is brevity, striking a balance between shortness and clarity
18:20
@nathanrogers And I really don't think "brevity" is a good name for that.
@ab5tract it's a function given in dfns.dyalog.com/n_pmat.htm, it's not one of the functions in the dfns workspace though
@rak1507 so not an example of a dfns workspace entry that is only a single line of golfed code
@Marshall "brevity is the soul of whit", striking the balance between removing the unnecessary while maintaining clarity, providing subtext where possible, I think that describes brevity just fine
brev·i·ty
/ˈbrevədē/
Learn to pronounce
noun
concise and exact use of words in writing or speech.
terse
/tərs/
Learn to pronounce
adjective
sparing in the use of words; abrupt.
one is abrupt, the other is concise and exacting
@ab5tract most dfns entries are too complex to be a one liner
seems like a good delineation between the ideas I'm after @Marshall
18:23
dfns.dyalog.com/c_life.htm does this count @ab5tract
it's not the most golfed life implementation but there are no variables assigned etc
@ab5tract in other words its CLEAR, the comments are there to elucidate the domain in question, which can't necessary be inferred by either the names or the form of the arguments
@nathanrogers that's what I'm getting at, yes.
@ab5tract john scholes' comments are some of the best commenting I've seen in code. they don't describe the line, the reveal underline domain knowledge, and that's great
@ngn this one point is the only thing I was adding to the observations I've made from seeing a good amount of production code, and some really legacy applications
@rak1507 what I'm saying is that each of the examples you provide are contextualized in the company of other examples that don't use a golfing style
which I think we've discussed enough to where we understand each other
18:25
@nathanrogers "Brevity" is relative, but I interpret it as always pointing in the shorter direction. To me it doesn't emphasize that there's a tradeoff. Ironically I'd say "brevity" instead of "both short and clear" is favoring terseness too much...
el·e·gance
/ˈeləɡəns/
Learn to pronounce
noun
1.
the quality of being graceful and stylish in appearance or manner; style.
2.
the quality of being pleasingly ingenious and simple; neatness.
if shortness sacrifices the pursuit of this, then it is too short
that's what I mean by brief
only as long and as short as necessary to communicate as much as possible
Like to me "brevity is the soul of wit" just means "the things you're writing are too long to be funny. Make them shorter" or perhaps "you are never going to get it short enough so always aim shorter".
@Marshall what "brevity is the soul of whit" means to me is that anyone can eventually communicate an idea, the cleverness is in communicating it clearly, without any "bloat" as rak put it
can I be clear with less? can I alter the phrasing to increase clarity, can I redue the length, does that effect the intention or meaning
@Marshall to me, "brevity" implies no actual change in anything other than shortness. It's not being clear, but staying clear compared to a longer alternative
right
along with "concise" is "exact" so its very deliberate in how its formed
18:30
@nathanrogers Wait, is it correct to say that for you brevity is a way to be more clear? In that case you're never trading off clarity for concision but the goal is always maximum clarity.
Or maybe minimum time to read and understand.
yes, reduction while maximizing clarity
yes
@Marshall that's a fair articulation
the expression should expedite the read time by removing obstacles to understanding
if you have to suddenly switch domains mid-stride, that is an obstacle
@Marshall (then there's the whole topic of "read and understand" what specifically - the entire code, or the minimum you need at the time being. each lends to different styles)
@nathanrogers Well I can't just tell you to use "clarity" instead of "brevity" because that's like just saying "write good code" but maybe a better way to explain is to say that you should use brevity as a tool instead of as a goal (or means versus end, etc.).
@ngn I agree this is philosophizing the entire idea quite a bit, but I am struck often by elegant expressions, and the way they elucidate properties about the domain to which they belong, and I find that to be an admirable aim
describing that aim is a rather philosophical matter
@Marshall fair enough. elegance = brevity + clarity then?
ngn
ngn
@nathanrogers cool
for me, short code (trying to avoid words like "brevity" and "terseness") is a side effect of trying to simplify. that's why my real-world code looks so much like my golfed (purposefully, competitively short) code. i believe there are many other golfers (though not all) who feel the same way.
18:36
btw @nathanrogers sorry if I was being too 'toxic' as you put it, I'm not trying to be, I don't think tone is easily conveyed over the internet
@Marshall the main thing I was trying to delineate with the choice of the word "brevity" was to distinguish between "terseness" which is abrupt and jarring, and something that is also short, but provides subtext
@rak1507 that's fair. we've had good convos in the past, so no worries. I just wasn't sure why I was being assigned all this intention around tradfns and such when really that was just what I observed in my time at Dyalog
One thing you do have to be careful about is if you think a particular formulation is nonsense, it might just be because you don't understand its components in the way the author does. Like if you don't know multiplication by unit complex numbers is a way to express rotation then code that uses it will seem insane. A few times I've written code that felt like black magic and then found the right frame of mind so it was easy. Can't think of a specific one though.
@ngn That I can agree with - simplifying should usually lead to shorter code. But I think the reverse is not true
ngn
ngn
@nathanrogers what word would you use to describe just "code using fewer characters", without any other implications?
18:38
Oh, code golf actually can make a really good prod for finding better frameworks. So it's not useless!
I enjoy golf, I'm not good at it but I"m learning
not criticizing golfing
ngn
ngn
@nathanrogers unfortunately in array language context, "terse" is taken - it already means something else ("point-free style", "function-level programming", etc)
but I don't golf my production code
@nathanrogers I thought you were advocating for them in some ways but I think that was just my misunderstanding
@rak1507 maybe I was being too "terse" and not adding enough "clarity" :P My only intention was to answer @lambda 's question about what "idiomatic" APL looks like in different contexts
18:40
@ngn surely the obvious word for that is 'short'
ngn
ngn
@rak1507 i thought "concise" was an obvious synonym for that too, before nathan taught us
con·cise
/kənˈsīs/
Learn to pronounce
adjective
giving a lot of information clearly and in a few words; brief but comprehensive.
ngn
ngn
yep, i saw it the first time
"giving a lot of information" I find that to express things in the shortest manner possible you do all kinds of things that lose information
like I actually reallly love the K page that defines all the "verbs" and such on a single page
but I also think that there's not enough on the page to be complete documentation
Yeah, to me "concise" emphasizes the short/complete tradeoff more than "brief". But I think that's actually a different tradeoff than short/clear so it could also be confusing.
18:43
@nathanrogers this one? kparc.com/k.txt
@Marshall that's why I chose brief because breif as was defined earlier is "concise and exact"
@rak1507 yeah that one
yeah definitely not full documentation
@rak1507 like its super cool, and I learned a lot by really looking and trying to understand it back - oh about 3 years now I think
but I definitely need more information :P
@Marshall so if its concise, it "gives a lot of information" if its exact then its "precise"
ex·act
/iɡˈzakt/
Learn to pronounce
adjective
not approximated in any way; precise
not approximated, meaning there's no excess
yep, especially the lack of examples for non standard things
so I like brevity to describe my intentions, but I think explaining the difference between all the words makes the choice of "brevity" an anti-pattern @Marshall haha
perhaps "elegance = brevity + clairty" is a more direct way without all the need for pasting definitions and exploration of the vernacular
even though I think "brevity" encapsulates "elegance and clarity" not the other way around
18:48
@nathanrogers Well, relying on subtle connotations of words is always dangerous. Not everyone uses them in the same way, and a dictionary definition can only be a summary.
true enough
@Marshall Anecdote: I was having a conversation with someone who said "I have a big vernacular". I laughed because the vernacular is public and is simply the collection of words in popular usage by a given culture... so he clearly didn't have a large "vocabulary".
@Marshall another one that irritates me to no end is the pervasive use of "far and few in between" which is a logical contradiction. The phrase connotes "rarity", and to say that the distance between any 2 of the referred items is far, but there are a few in between, than the distance isn't as great as was suggested.
ngn
ngn
@nathanrogers it's like "don't speak in dialect" :)
The phrase is "few and far between" because there is a finite set of "the thing in question" and the distance between each one is great.
The other is a logical contradiction
and it peeeeeves me
18:51
@nathanrogers Don't think I've heard that one actually!
It's ALL over youtube
if you watch youtube videos on ANY subject, this will come up repeatedly
@nathanrogers are you saying that youtube videos that don't use that are far and few in between :)
@nathanrogers One more reason to avoid doing that I guess.
:D
I find many youtubers attempting to be "thought leaders" are as inarticulate as child, and I don't know how they're supposed to analyze others arguments when they are incapable of properly formulating their own
Unfortunately my generation decided that words mean whatever they feel like they mean, and so it is impossible to communicate with ourselves because they're using different definitions without giving anyone a dictionary
ngn
ngn
like "operator" in apl
18:55
@nathanrogers it could be understood as "far [between the endpoints] and few [instances] in between". google gives 7.5x as many instances of the correct one over the incorrect
I give APL a pass to some degree because it was just trying to find names for things long before standardization of terms
ngn
ngn
@nathanrogers it had 50 years to adapt. it didn't.
@ngn or 'defined function'
right, but it was also sequestered from the rest of the industry
ngn
ngn
@rak1507 yeah
18:56
@dzaima that's because its been "incorrectly used" into the vernacular
ngn
ngn
k is about to fall in the same trap
"expression" - what do you think it means?
@nathanrogers I'm inclined to think that was because of a ridiculous superiority complex.
now it is the "correct" version but it is also a contradiction. which is what I mean, people are generally incapable of understanding their own ideas because they can't formulate cogent thoughts on their own, so why exactly does this generation presume to understand all that is or ever was when they can't understand their own words
its maddening
if logical fallacies are just every day idioms... no wonder everything is going to shit :P
@nathanrogers is it? i specifically said that "few and far between" is 7.5x more popular, at least in google-indexed text
oh, I read that as "far and few in between".... 7.5x more popular
then forget what I just said :D
@dzaima this read as a continuation, not 2 lines
my fault
19:02
@ngn straight up renaming things is the hardest thing one can do - people using the old terms won't want to change. (and look, now there's BQN with 1-modifier and 2-modifier)
APL community has their own vernacular, and so long as the culture remains isolated, that vernacular likely won't change
ngn
ngn
@dzaima that's right. in this particular case i think there are other reasons to not like "-modifier" too.
but as more and more non-APLers pick up the language, the more I think the language will change, but that will necessitate a fundamental culture shift
ngn
ngn
@nathanrogers "specialized technical vernacular" = "jargon"
and also an evolution of language over which nobody has direct control
@Marshall maybe it was a superiority complex, but maybe notational programming.... is superior?
ngn
ngn
19:05
@nathanrogers well, dyalog hold quite a bit of power over that
@nathanrogers Being (possibly) superior in one way doesn't justify never interacting with other programming language communities.
We are talking about the language that took like 20 years to admit "Goto considered harmful" made some good points.
and it turns out hiding away in a corner for decades eventually makes your language inferior to others
ngn
ngn
cheap shot: don't rest on your laurels
@Marshall :D that's all true. I don't see it as a reason to completely separate yourself from literally the entirety of the rest of the evolution of computer sciene
how many ofs can I use in 1 sentence: GO
@ngn I don't know anyone named Laurel
ngn
ngn
@nathanrogers search for "laurels" in this chat and you'll understand
19:13
@Marshall I don't know if I ever told you the story, when I first learned of APL (through K first), I didn't know how anything ACTUALLY worked, or about what array programming actually is, I just implemented a few of the functions from APL based on their meaning in Javascript, assuming nested arrays to represent matrices.

i then started using the notation I devised to represent those names to solve code-wars problems and other prompts, and I found that I was able to directly type in my expressions from paper into javascript and they produced correct results without bugs the first execution
The point being, I think notation is its own merits, array programming has its merits now that I've learned more of what it actually means, but I think the true strength is in the notation and that every language would benefit from some kind of universal notation
so I think just for that reason alone, notational programming is superior. and the rest of the industry can learn a lot by providing "operators" that do functional things, to remove the need for conceptualizing manual iteration, mapping, etc
that sounds like more of an argument for array programming than notation
Other languages have superior notation for data literals, and crappy notation for doing programming things
@rak1507 not really. The functions I wrote were naive and only operated on the first levels of a javscript array. I had no idea what a rank was let alone how I would do transformations without iteration or mapping or looping
so I implemented functions that assumed mapping and looping at the highest level of a nested array
'remove the need for conceptualizing manual iteration, mapping, etc' sounds like 1 + x rather than map (1+) x
which is an array programming thing not a notation thing
19:20
yes, but also we're dealing with nested arrays representing matrices because I knew nothing about APL arrays
so like rotate rows I had to explicitly map
map ←→ /
filter ←→ |
reduce ←→ _
in the notation I had devised for myself
so to rotate each row of a 2d javascript matrix
rotate / mat
but if I wanted to rotate the order of the rows I could say
rotate mat
so it really wasn't true array programming
or even close, it was just concealing the iteration
I defined a 2d version of outer product as I understood it which is just
a.map(x => x.map(y => f(x,y)))
so there was a lot of stuff that made no sense because I was making a LOT of assumptions based on my knowledge of mainstream languages
my takeaway has always been that its the notation that is the most valuable thing about APL, but then I'm not typically solving array problems in my programming experience. Usually lots of API data, dictionaries, json, REST, sockets, streams, file IO, GUI development
none of these things are particularly array oriented
but man do I wish there was a good notation for them
aside from ⎕ARBIN ⎕NGET ⎕JSON ... one of the best things APL can do for itself is a data literal notation
ngn
ngn
@nathanrogers "K first" - really?? a couple of days ago you didn't know even basic stuff about k
and I totally get that a notation for system interaction is counter to APL's design philosophy, and that's why I'm saying I think Array notation is a good thing to have... what about dict notation, IO notation, and everything else
@ngn it was a month or 2 3-4 years ago
I did solve a work problem in K and it amazed me
I had to generate a series of IPV6 addresses in procession
I solved it in K and J and thought it was amazing, oh what's this APL thing over here
I also reworked a few of my codewars solutions in K
but it was really only a few weeks
ngn
ngn
and with all this apl experience you never encountered trains? (they were added relatively recently, ~7y ago i think, so it's possible)
oh I've encountered them, but I wasn't golfing, I was writing and maintaining business applications and writing a library
ngn
ngn
trains were not meant only for golfing
19:32
and the customers have their opinion about what is readable
ngn
ngn
ok
"coding style and guidelines" etc
so not much in the way of trains for those projects
as for my personal opinion
I really like the aesthetic of ⍺⍵ over ⊣⊢
and () is so overloaded, I actually just can't stand having to use them ever
parentheses are overloaded? what
data grouping, operational precedence, operand grouping, delineating a train
they all do the same thing
19:37
they may "do" the same thing but they are semantically different in different contexts
I don't like that
but we only have so many grouping symbols :/
that isn't overloaded though, it's just used in different contexts
unless you're bqn
syntax vs semantics. it may not be syntactically overloaded, but it is semantically overloaded
it does too much, I'd like bqn's brackets to make different kinds of groupings more clear
idk I'm not sure if I buy the semantic overloading, they do the same thing in all cases
@nathanrogers BQNs prentheses do all the same things they do in APL
@Marshall how does bacon tell the difference between a train and just bog standard code?
@dzaima but there are other kinds of brackets for arrays besides ()
19:40
parentheses don't form trains if you think they do
no they don't, the group an expression
I get it
@nathanrogers A train is bog-standard code, but the difference between an expression with a function result and one with a subject result is that the rightmost component after applying modifiers is a function versus a subject.
@nathanrogers look at the rightmost "thing" (usually a single token, sometimes a derived modifer or itself a parenthesized thing); function→train, array→regular evaluation
so we should use what, () for some stuff, [] for others, {} for others, <> for others...?
right, or add other kinds of brackets
like how {} is overloaded in c-derived languages
19:43
@nathanrogers but parentheses necessarily are overloaded. You can't require different things for only-semanitally-different things
yes you can
@nathanrogers you'd have to change something about how things work. Parentheses always syntactically do the same exact thing
for instance clojure had the great idea to use [] for n-ary functions and parameter lists
@dzaima I don't see a problem with having synonyms or syntactic sugar
@nathanrogers that's adding a new thing, not separating the already-overloaded parentheses
19:45
if it creates clarity
what's unclear about (stuff)
@nathanrogers so you'd just want […] or something to be exactly equivalent to (…) besides just being written differently?
(gtg :/)
whether its a thing or a verb or order precedence
@dzaima like if [] wasn't already overloaded for indexing and rank specification, I might use it to group arrays
@nathanrogers APL syntax isn't context free so it is basically impossible to know that
{} for functions
() for order precedence
19:46
So "(" and ")" do appear a few times in BQN's grammar because they can enclose four different kinds of expressions corresponding to the four possible result roles (and two more times because assignment targets and function headers use restricted forms of expressions). I would say they're doing the same thing in each case: at parse time they pass roles unchanged, and at evaluation time they group expressions.
⟨⟩ for a train
⦃ ⦄ for dicts
or something along these lines
ngn
ngn
that would be wasteful
there's an arguement to be made, but there's a lot of unicode brackets
@Marshall And the repetition is because of the particular form required to describe a context-free grammar; a parser like the self-hosted one usually won't need it.
you can still have a context free grammar, but just have synonyms for the reader
ngn
ngn
19:48
@nathanrogers not enough keys on a keyboard though
@ngn also fair enough, does bqn have a keybaord though?
ngn
ngn
@nathanrogers i don't know much about bqn
if you were to rearrange, you could get mod+{ mod+shift + { and { all onto one key
19:49
that's 3 kinds of brackets per bracket
then you have <> for the unicode nice angle brackets
⟨⟩
I really like the choice of 「 」 for matrices
that's nice
aesthetic
ngn
ngn
rolls eyes
ngn
ngn
regardless of the choice of symbols for bracketing, you still have sequences of terms ending with an array (expressions) and ending with a function (trains)
Also BQN has modifier expressions, and it would be weird if you couldn't parenthesize them.
ngn
ngn
@ngn it seem wasteful to require one type to be enclosed with a certain kind of brackets and the other with another
19:57
you're not wrong, I just don't like parsing (((someting)(something))(something))
I don't think it should be a requirement
I think it would be nice to have the option
i.e. syntactic sugar
to make the semantics nicer
ngn
ngn
@nathanrogers ok, then make up your own convention, e.g. enclose exprs in ( ) and trains in (( ))
((⟨something⟩⟨something⟩)[something]) becomes much more clear
ngn
ngn
with spaces around them they should be "readable" :)
its clear that I'm grouping 2 trains and applying it to an array
in order of precedence
ngn
ngn
is it just my default fonts or "⟨" looks too much like "("
19:59
maybe, I see nice pointery brackets
@nathanrogers In BQN it's not legal to place two subjects next to each other, so if there's a subject on the right then the thing to its left has to be a modifier or function.

« first day (1501 days earlier)      last day (1450 days later) »