« first day (659 days earlier)      last day (1998 days later) » 

10:00 PM
@nathanrogers there are definitions for where the arguments get placed.
 
@dzaima Tell me, where is Gandalf? For I much desire to speak with him?
@dzaima Whu is your daddy, and wat does he duuuuuuuu?
 
ok what
 
there are definitions that are introductions of new special forms that add no functionality that can't be done explicitly.
 
Frankly, your style of discussion is rather annoying and inflammatory
 
everything that trains are already exist, they simply add additional notation which contradicts the existing notation
@Quintec sorry, the "where are the arguments..." line reminded me of some pop culture quotes
trains are special forms of what otherwise is perfectly internally consistent
 
10:02 PM
@nathanrogers why is adding additional ways of writing things bad? APL started off without dfns, only tradfns you know, so should dfns not exist at all either?
 
No dfns should be the base with no tradfns at all
tradfns are like VB kid gloves
 
@nathanrogers Dfns also didn't add anything you couldn't do before. But often, they are a better way to express things, and that's when you should use them. That doesn't mean you always should. I've seen plenty of unreadable dfn abuse.
 
So should NAND be the only logical operator then?
 
they added lexical scoping and encourages functional programming
 
@dzaima Gosh, you ninja'd me again. Great mindsโ€ฆ
 
10:04 PM
@nathanrogers trains encourage pointfree/tacit programming
 
which
are not a benefit
 
@nathanrogers Tradfns are much more powerful than dfns.
 
@nathanrogers functional programming also isn't a benefit.
 
yes it is
 
@nathanrogers I think quite a few FP guys will disagree.
 
10:05 PM
there's reeeeeeeeeeeams of researching into why functional programming is its own benefit
 
@nathanrogers it's merely a nicety, just as trains are
 
Uh, I should learn to type faster or be quiet.
 
there are all kinds of algorithms that don't exist without higher order pure functions
 
@nathanrogers I'm 100% sure of algorithms that work as dfns can be written as tradfns.
 
it isn't a nicety, but a requirement to accomplish much maths
maybe that's true, but would you rather read a stack of procedural fortran APL, or scheme-ish inline functional apl?
notation encourages the thinking that you're able to do with said notation
that's the point
and dfns match with the rest of apls notation
 
10:07 PM
@nathanrogers trains encourage thinking tacitly/pointfree.......
 
tradfns match with... iunno, python?
exactly @dzaima I said that early, but you so no non o
 
@nathanrogers python came after tradfns.
 
@nathanrogers I think you should take a break from this discussion (as I don't see us getting anywhere) and read this paper by Iverson.
 
@nathanrogers ?
 
i don't care what came first. they are similar in structure
@dzaima I said trains encourage tacit programming, the existence of f g h enables f g h asioghaoebiruhaoioi to exist
and encourage that kind of thinking
 
10:08 PM
And whatโ€™s wrong with that kind of thinking?
 
@nathanrogers There's nothing wrong with thinking like that, however if I want others to be able to read what I write, I need to be careful how I write it.
 
@Quintec that adkjfbh oiaewrghfioafhairehvoalw;eoijfapowirhgbla;ioeurgjaerglkasjhfedkljahsdfj;laksdjfa‌​;lkjsdf has been agreed by all parties to be ludicrous and unintelligible and undersireable
 
@nathanrogers so don't write that, stick to simple f g h trains
@nathanrogers you're making a big leap from simple tacit functions to crazy abominations.
I'm sure there are plenty of functional programming examples that are also horrible
 
I'm not making the leap, it's the logical conclusion. IF notation encourages a form of thinking, and you agree that trains encourage tacit thought, then you will think first tacitly, which, if followed to it's logical conclusion, means that it encourages more than just f g h
that isn't a leap
that is the next step
first comes i
 
That is vey much a leap.
 
10:10 PM
then comes marriage. Then comes a baby in a baby carriage
 
If you find a lighter, is your next step to light your house on fire?
 
no, first its pants on fire
4 mins ago, by dzaima
@nathanrogers trains encourage thinking tacitly/pointfree.......
 
@nathanrogers if you want to argue seriously & come to a conclusion, at least try to
 
I am arguing seriously, but I keep amusing myself out loud
sorry. really
f g h, next comes i, then j, and it doesn't seem like a leap to suddenly have f g h i j k
which we all agreed is bad
 
My analogy still holds.
 
10:12 PM
no it doesn't
because I read lots of those kinds of trains in here daily
 
โ€œToday I learned to light a candle! Tomorrow Iโ€™ll try my house.โ€
 
which is why I'm railing against it
not even a little bit @Quintec. I see trains like this daily
 
@nathanrogers Please stop saying that f g h means f g h i j k l is good. It doesn't and isn't.
 
(โ‰โณโˆ˜โ‰ขโŒฝโŠข,โ‰ โจ)
I mean hey
no I'm not saying that it is good
I'm saying it isn't a leap
 
@nathanrogers where'd you get that?
 
10:14 PM
I'm saying that tacit notation encourages tacit thought encourages tacit programming encourages tacit thinking
the last thing ngn posted
 
@nathanrogers .........that's ngn. He only posts madness. เฒ _________เฒ 
 
@nathanrogers In code golf solutions, by any chance?
 
I don't know the difference between normal APL and Golf
because it would seem that everyone in here is always golfing
 
@nathanrogers long trains โ‰ก golf
 
or the M.O. of this room?
 
10:15 PM
@nathanrogers probably because this is the Programming Puzzles & Code Golf APL chatroom?
 
is there another?
 
@nathanrogers I agree that that's not readable, but that's after the leap from good tacit to bad.
 
and you agreed also earlier that the notation of choice enables and encourages certain modes of thought
 
@nathanrogers yeah, as long as you don't go crazy.
 
and since tacit language features encourage tacit programming encourages tacit thought encourages tacit programming then it seems to me to be the logical next step, not a leap
 
10:17 PM
and f g h i j k l is going crazy. (or trying to golf, whatever)
 
so I strongly assert that the existence of f g h, being tacit notation,and tacit notation encouraging tacit thought encouraging tacit programming, is bad
 
@nathanrogers but it just isn't. There's a limit where a train is too long.
 
yes, 1 operator/function with no explicit argument
 
@nathanrogers and that's where our opinion differs - I find at least 3-long trains readable.
Maybe you don't. Then don't write them, it's that simple.
 
but there are those that find a mere mention of an argument to be toil too difficult and inhuman for any creature to endure
@dzaima but I have to read them
 
10:20 PM
@nathanrogers jelly is a golfing language, it'll sacrifice cute kittens for bytes.
 
beacuse they exist
 
If others write them, either they're golfing, using them well, or being ngn.
 
but if they didn't exist, others wouldn't write them
and then I could understand APL code
 
(+/÷โ‰ข) is a good use of a train. (โ‰โณโˆ˜โ‰ขโŒฝโŠข,โ‰ โจ) isn't.
 
I mean, to be fair, I did ask him to golf a bit of code I wrote, but when I read it, it was like being flashed publicly
and now I have a moral aversion to trains
 
10:22 PM
@nathanrogers then learn them, instead of trying to get them removed from APL because you just don't understand them.
 
no it isn't because I don't uynderstand them
I understood that one just fine
but it's heinous
 
@nathanrogers the ngn one is. (+/÷โ‰ข) isn't.
 
i'm not trying to get them removed from APL, just making a logical case for how inconsistent with the core notation trains are
 
@nathanrogers and I'm saying that as long as you don't go as far as ngn, they're fine.
 
@nathanrogers Dfns allow (and according to you it follows: encourage) nesting functions, leading to (imho) abominations like the following (abridged) code:
 defs←{โŽ•ML←1                                 โ ]defs with names.
     โบ←0 0 โŽ•THIS โ‹„ โบ{โŽโบ,'โต'}{                โ default switches โ‹„ external โŽ
         _n _l NS←¯3โ†‘โบ,(โ‰ขโบ)โ†“0 0 โŽ•THIS        โ switches: -names, -list, namespace
         nabs←{                              โ name abstraction:
             names←{                         โ names for values in defns
                 dord←โ‹|โ‰กโˆ˜(โŠƒโŒฝ)¨โต             โ definition depth order
             }โฃ((_nโ‰ 0)โˆจ_l=¯1)                โ :: NKTDs ← โˆ‡ NKTDs
             single←{Ns Ks Ts Ds←โ†“โ‰โ†‘โต        โ filter for single-line definitions
 
10:23 PM
they don't encourage nesting functions so far as I can tell, they encourage inlining functions perhaps
 
@nathanrogers JUST AS TRAINS DON'T ENCOURAGE MAKING f g h i j k l m n o p q
again sorry
 
function(programming(that(looks(like,this(is)), awful) and, people who write this way should be hanged
functional programming doesn't encourage that, it is an option
 
@nathanrogers That has nothing to do with FP or not FP. That's just a syntactical design in the language.
 
function programming encourages
f = x => x something
f2 = y => y something
val = f(3)
g(val)
but it doesn't encourage anything of the sort
writing python or C probably encourages that kind of idea
 
@nathanrogers so far you've been always saying that trains existing means they encourage making very very long trains. I'm saying that's not true, just as you're saying functional programming doesn't encourage.. that.
 
10:26 PM
i'm not saying they encourage making very very long trains, but that they encourage using trains
which 99% of all trains I've ever seen have been > 3 trains
 
@nathanrogers so too trains don't encourage abnormally long trains
 
but then why do I see so many
 
@nathanrogers well you've been looking in the wrong places (e.g. ngns code)
 
I'm looking in the only bastion of APL live conversation on the internet
is that bad?
 
@nathanrogers APL allows you to use only monadic functions too, and then you get something that looks like Lisp. Doesn't mean it is a good idea to write your APL like that.
 
10:28 PM
it isn't a good idea to try to grasp what's good APL from golfed code..
 
Idiomatic dfns doens't encourage nesting function definitions, idiomatic tacit programming does encourage further tacit programming
 
@nathanrogers I don't think a live chat is the place to glean production style code from. Try reading Dyalog's offical code, and notice when we use trains.
 
@dzaima it'd be a good idea to have some examples of what normal APL even looks like so I have the ability to tlell them appart
 
@nathanrogers ^^. sorry that this chatroom isn't the best place to find good APL.
 
Where might a lil ole boy like me procure such a sacred tome?
 
10:30 PM
@nathanrogers Have you tried GitHub?
 
my first thought is looking trough the things here
 
I wasn't aware that Dyalog hosted their "for sale" implementation of a languages source code on the githubs
@dzaima so much of that isn't code
that I don't even know where to begin
 
@nathanrogers We don't show the interpreter's C source, but our APL code is usually MIT licensed.
 
@nathanrogers clicking on a page allows clicking to the code of the fn in the first line of the page
 
@Adám can you relink that neat article/
 
10:33 PM
@nathanrogers this?
 
I must be scrolling by it I can't find it
da
 
@nathanrogers I think this is a fairly good style. I do use up to 7-trains there. Have a look!
 
@dzaima ^^ count em7
 
???
 
@nathanrogers if they're well used, even 7 can be okay. It really matters that they're well used though.
 
Reading โŠฃ,t t,1โ†“โŠข instantly made me separate the commas out, resulting in โŠฃ , t t , 1โ†“โŠข, and the rest is simple.
 
@nathanrogers What I don't do is nest parentheses. I try to avoid parentheses in general (other than for inline trains and for stranding), but I normally wouldn't use an inline parenthesised train inside another train.
 
@nathanrogers it really matters if they're well-used or not. There, , very nicely separates parts. ngns code doesn't.
 
I don't understand most of that
 
@nathanrogers I suspect this has a lot to do with your problem with it
 
10:41 PM
infoโ†“¨โจ←
wat?
 
@nathanrogers that's an idiom (well, ¾ of it is)
drop n last items of each
@nathanrogers tio.run/##K85JLM5ILf7//…. That even translates to a dfn clearly as {โบ,t t,1โ†“โต}. Using a train there over a dfn is just preference I'd guess
@dzaima oh whoops, there's no - there, that's drop n first items of each
 
@nathanrogers It is not even a train. It is the same as info←infoโ†“¨โจ8×~'='โˆŠ¨info
 
It probably is a lot to do with the problem. I want APL to work for me
 
@nathanrogers also f g h i j k l is all functions, but having arrays in the train makes it way easier to parse
 
But I'm just not having much luck
 
10:48 PM
@dzaima I think my reason is that I don't like dfns reaching for globals, while trains don't have their own scope, so t isn't global but rather becomes an explicit "argument" of the train, passed to the train as the train is established.
@nathanrogers May I suggest you begin by writing "explicit" trains: Only refer to the argument(s) as โŠข (and โŠฃ). I think you'll soon discover somethingโ€ฆ
 
oh there's also โŠขโ†“โจ2×'= 'โ‰ก2โˆ˜โ†‘. It's still pretty understandable though - '= 'โ‰ก2โˆ˜โ†‘ is checking if the first two chars are '= ', multiplies that by 2, and โŠขโ†“โจ drops that many chars from the arg
 
E.g. {(+โŒฟโต)÷โ‰ขโต} can be written as the train (+โŒฟโŠข)÷(โ‰ขโŠข). Does that train bother you, @nathanrogers?
 
I'd personally have written that as โŠข โ†“โจ 2× '= 'โ‰ก 2โˆ˜โ†‘ though
 
@nathanrogers Notice that I used the dfn {(2โ‰คโ‰ขโต)โˆง1<โ‰ขโˆŠ1โ†“โต}. I could have written it as the train (2โ‰คโ‰ข)โˆง1<โˆ˜โ‰ขโˆ˜โˆŠ1โˆ˜โ†“ but didn't. Can you guess why?
 
10:55 PM
Why have formal arguments at all
There a wired bracket?
 
@nathanrogers Indeed, Jelly doesn't, and J prefers not to. Imho, readability suffers in complex expressions.
@nathanrogers Sorry, typo.
 
No I can't guess why
 
@nathanrogers Wait, did you mean weird because I had { instead of ( or did you mean "wired" (as in connected/corded), in which case I don't understand?
 
I have no idea where the arguments go even side by side
Weird
 
@nathanrogers Because I judged that it would be too awkward to read, both due to the nested parenthesis and due the the excessive use of โˆ˜ necessary.
@nathanrogers Exactly, but the dfn is clear, right?
 
10:59 PM
Yeah, but that's always the case
I don't need a dozen articles with laborious documentation to read a normal dfn because it's literally normal app with alpha and Omega in place of values
But how much effort has gone into teaching trains
I mean x f g h y is not (x f y) g (x h y)
But (x f y) g (x h y) is
๐Ÿ˜ฎ
 
@nathanrogers Actually, Dyalog's documentation has much less on trains (1 page) than on dfns (7 pages).
 
@nathanrogers just as 1 2 3 4 5 isn't the same as 1 (2 3 4) 5..
 
@nathanrogers Wait a minute! You do realise that there really are only 2-trains and 3-train, right? 4-trains don't really exist.
 
Infinite trains exist
Or at least I'm certain that was the case
 
@nathanrogers f g h i j โ‰ก f g (h i j)
i.e. a 3-train in a 3-train
just as 1+2×a โ‰ก 1+(2×a) (though trains don't extend to all cases that happen in dfns)
 
11:18 PM
-+/ is not a train
(+-)3 why isn't this working as a train
it's of the form (fg)โต
 
@nathanrogers -+/ is a train.
 
ok then, it is neither a hook nor a fork
which I was under the impression, a function had to be either one to be a train
 
@nathanrogers Correct; it is an atop.
 
whatever that means
 
@nathanrogers No, in J that is the case, but Dyalog APL does not have hook trains.
 
11:22 PM
oh good
 
@nathanrogers That means that the left function is applied atop the result of the right tine.
 
that makes no sense
=โŒŠ
you gave me a link to hooks and forks
 
@nathanrogers Right, Iverson made 2-trains (in J) be hooks. I think it makes much more sense to have 2-trains be atops (as they are in APL).
 
=โŒŠ
 
@nathanrogers All hooks can easily be written as forks just by adding a โŠฃ on the far left. So the hook =โŒŠ (a.k.a. "is the argument an integer?") becomes โŠฃ=โŒŠ
 
11:28 PM
โŠฃ=โŒŠ
now I'm bemused with a top hat
@Adám.bemused =โŒŠ
@Adám with a top hat โŠฃ
 
@nathanrogers As a matter of fact, I do wear a top hat.
 
Your picture doesn't have a top hat, instead more like โŠค¨โŠค
โŠฃ:โด
 
โŠฃ:โ—‹
my โŠฃ off 2 โˆช
 
Back on topic: Any hook is trivially replaced by an equivalent fork, but you can't write an atop as a hook or a fork. That's why J has the anomalous [:
 
11:35 PM
:]
Oh, I had a really funny J train one time it was basically [:| |: ]: :[|
or something like that
I don't remember what it did
it was the best code ever written
what's an atop @Adám
aside from my hat โŠฃ:]
 
@nathanrogers Maybe the names of these compositional forms will make more sense to you if I draw you some diagrams:
atop    hook      fork
 f       f         g
 |      / \       / \
 g     โต   g     f   h
 |         |     |   |
 โต         โต     โต   โต
 
but then how is a hook a fork with โŠฃ
 
 hook      fork
  f         f
 / \       / \
โต   g     โŠฃ   g
    |     |   |
    โต     โต   โต
@nathanrogers ^ but since โŠฃโต is just โต, they are equivalent.
 
11:54 PM
is there a function in apl for divisors?
 
@nathanrogers No, but the divisors of โต are the integers up to โต which have no division remainder when they are used to divide โต:
โž←{โธ0=(โณโต)|โต}10
 
@Adám 1 2 5 10
 
I already had that
but I didn't know if it was super efficient
 
@nathanrogers Now try making a train of that!
 
[โ—‹โ—‹โ—‹|โ—‹โ—‹โ—‹โ—‹|โ—‹โ—‹โ—‹โ—‹|โ—‹โ—‹โ—‹โ—‹โ—‹|โ—‹โ—‹โ—‹]→
โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜โˆ˜___________________________
 

« first day (659 days earlier)      last day (1998 days later) »