« first day (95 days earlier)      last day (2856 days later) » 

08:42
@Adám Why doesn't this work?
in The Nineteenth Byte, 2 mins ago, by Leaky Nun
Why isn't (⊢[⍋⊢])∘∪⊢|⍳×⍳ working?
Oh wait, Leaky figured it out
 
1 hour later…
09:55
@KritixiLithos You can't use bracket indexing in trains as it does not conform to normal APL syntax.
 
6 hours later…
16:25
I've been struggling to find the equivalent of "cap" in "J"
@Adám do you have any idea?
16:37
@LeakyNun Yes, that's easy: APL doesn't need that syntactic anomaly!
@Adám then how do you use a monad in the middle of the train?
the fg train in APL is just fg
@LeakyNun your overall train is monadic, you can use compose ∘
What would a(x)+h(f(x)+g(x)) translate to?
a + (h f + g)
or a∘+∘h f g if applied monadically.
oh...
doesn't a∘+∘h f g mean f((a∘+∘h)(x), g(x)) ?
16:43
Sorry, missing the +: a∘+∘h f + g
doesn't that mean a(+(h(f(x)+g(x)))) ?
@LeakyNun No, because the operators bind first: ((a∘+)∘h) f + g
I'm not seeing how that gives a(x) at all
so we have four functions, that makes a 2-train (an atop) where the right tine is a 3-train (a fork).
hang on a sec.
@LeakyNun Sorry, you're right.
@LeakyNun Enter this into your session:
∇ pic←valence ParenTrain train;id;names
  names←⎕A,819⌶⎕A
  ⎕SHADOW,¨names
  :For id :In ⎕A
      ⍎id,'←''',id,''''
  :EndFor
  :For id :In 819⌶⎕A
      ⍎id,'←{⍺←⊢ ⋄ ''('',⍺,''',id,''',⍵,'')''}'
  :EndFor
  pic←1↓¯1↓⍎(3×1=valence)↓'''⍺''(',(,' ',⍪train),')''⍵'''
∇
what is that?
16:52
@LeakyNun It is a tool to inspect trains' behaviour.
but then how would I create what I want?
It takes a string representing train as right argument. all lowercase letters are functions, all uppercase letters are constants. Left arg is valence when applied.
@LeakyNun a + (h f + g)
@Adám heh
Ah, how about a + f h∘p g?
heh, never tried that before
16:54
    1 ParenTrain 'a p (h f p g)'
(a⍵)p(h((f⍵)p(g⍵)))
AH, right, it doesn't worK:
    1 ParenTrain 'a p f h∘p g'
(a⍵)p((f⍵)h(p(g⍵)))
Which is why I am still waiting for APL to get a proper atop operator.
heh, you should switch to J instead :p
@LeakyNun No. I really dislike the cap.
In J it should be a + [: h f + g
@LeakyNun With atop ⍛: a + f h⍛+g
what do you mean by a proper atop operator?
16:59
The fact that ∘ is NOT atop keeps biting everyone.
@LeakyNun J's @
what is the difference?
I guess it would be a + f h@:+ g instead
@LeakyNun Yes. Exactly.
Handy chart:
thanks
why are they so different
@LeakyNun So as you can see, f&g and f@g are equivalent in J when called monadically.
I see
17:05
@LeakyNun So one may come to believe that APL's ∘ is J's @, but really, it is &.
I see
So when one goes dyadic, things fail.
@LeakyNun Since @ is more common than & (I think), it is silly that APL doesn't have @.
I know APL is silly
@LeakyNun I wouldn't say that. However, it is silly that we are so conservative.
17:08
@LeakyNun On the other hand, it is often easier to express things explicitly (especially for newcomers), and explicit programming is basic to APL, while awkward in J.
I like tacit :p
And J's biglyphs are only somewhat mnemonic if one knows APL.
@LeakyNun Me too, but it is horrible for application programming.
Who uses APL for application programming?
@LeakyNun Oh, huge companies.
I see
17:11
Some of them prohibit us from telling who they are so their competition won't find out what gives them their advantage, but I can tell you that one of the biggest oil companies uses APL to manage their "chemicals' recipes".
Also one of the biggest financial services technology providers run everything in APL.
One I am allowed to mention: Volvo's heavy-engine division (trucks, ships, etc.) Their entire production is managed by one large APL program.
How do you know those that you can't mention?
@LeakyNun I work for Dyalog ;-) I had to sign a NDA.
interesting
 
1 hour later…
18:35
Wow, the is really powerful
@KritixiLithos Good for golfing, but powerful? How so?
18:59
It goes pair in pair with ¨. For instance, I had an array of arrays containing indices and had to calculate which elements the indices mapped to. I needed to use , but it requires the indices to be the left argument, so the only tool that I could use to swap the arguments around was the tildiaresis
@KritixiLithos Practical, yes, but what it does is really simple, and it can always be replaced with a dfn: A f⍨ B ←→ A{⍵f⍺}B. Only for trains, is it essential, as it allows constants as right tine: Square←{⍵*2} ←→ Square←2*⍨⊢, although it can often be substituted with composition: Square←*∘2.

« first day (95 days earlier)      last day (2856 days later) »