« first day (537 days earlier)      last day (2127 days later) » 

11:48 AM
If you are like me you constantly want to read about APL related stuff. If that's the case, check out my latest essay APL At Its Core (https://ac1235.github.io/apl.html) and also take a look at @alexcweiner APL blog (http://blog.alexweiner.com)
You might also enjoy https://www.sacrideo.us/tag/apl/ by the author of @dyalogapl co-dfns.
@pldanthony @alexcweiner Awesome stuff on APL .. thanks for posting.. it’s a thing of beauty:-)
 
 
2 hours later…
1:56 PM
Hello everyone! I'm back from vacation \o/
 
@J.Sallé Welcome back!
 
Thanks! Back to work but the college semester ends tomorrow, so I'm kinda still in vacation :p
Also just one more semester to go \o/
 
2:23 PM
@Adám is SharpPlot the best (or only) way to plot mathematical graphs in APL? If so, is the tradfn they show here the way to go?
I think my workplace's firewall is blocking dyalog.com >.>
 
@alexcweiner I wrote up a sort-of blog post for this with elaboration to explain the parts of APL I used. https://lobste.rs/s/ievyyw/apl_for_ml_k_means_clustering
 
@J.Sallé Yes and yes. But remind me again, which OS you use?
 
@Adám I'm on W10 64-bit
 
@J.Sallé Have you tried the chart wizard?
 
@Adám I opened it and found it kinda confusing. I have to do the code anyway for this challenge
Trying to de-rust my APL
 
2:37 PM
@J.Sallé Right, it has a ton of options, but you can go to File>View Script to auto-generate the tradfn body. And then copy and edit that.
 
@Adám Ah, I see
 
@J.Sallé So you can generate a reasonable array (nested or high-rank — it will figure it all out by itself) with all your data, e.g. x←0.1ׯ50+⍳100 ⋄ y←x*2 ⋄ data←x y and then position the caret on data and click the chart button
 
@Adám Oooooooh that's how it works then
I was looking at the sample charts scratching my head :p
That really is very helpful
 
@J.Sallé de-Rust or just de-rust? :P
 
@J.Sallé Good. You can even do multiple series at once: x←0.1ׯ50+⍳100 ⋄ y1←2×x ⋄ y2←0.1×x*3 ⋄ y3←1○x ⋄ data←x y1 y2 y3
@J.Sallé Or 3D plots: data←x×↓|1○x∘.×0.002×x←⍳100
 
2:50 PM
@Zacharý I have absolutely no Rust knowledge, so if there's Rust in my APL I'm screwed
 
:D
 
@Adám nice! I'm trying to create a function to solve the challenge now and will plot it when I get it
 
Yeah, when you code a ton of languages: your style tends to get VERY screwy, VERY fast.
Trying to program imperative APL (I don't do that one), array-oriented D, strictly-functional Python are not good things to do
 
@J.Sallé I can solve the challenge in 38.
 
Which challenge?
 
2:57 PM
31
Q: Draw a graph of \$y=(-n)^x\$

Beta DecayChallenge Given an input of an integer, \$n\$ (where \$0<n<50\$), output the graph of \$y=\mathrm{Re}((-n)^x)\$ from \$x = -3\$ to \$x = 3\$ inclusive. Where \$\mathrm{Re}(p)\$ is the real part of the complex number \$p\$. Note that \$\mathrm{Re}((-n)^x) = n^x \cos{(\pi x)}\$ Output The out...

 
@Adám I'm still trying. At 23 bytes atm
 
@J.Sallé That's for the data-generation, right? I meant with charting and everything.
 
I'm using flawr's approach, not sure how optimal that is, tbh
@Adám yeah yeah
 
@J.Sallé Ugh, I just found an issue with mine, and there is something odd in the chart wizard when I try to use it in a way that wasn't intended…
 
@Adám Oh D:
 
3:16 PM
@Adám wasn't there a function to return the real part of a complex number?
 
@J.Sallé 9○
 
Ah, thanks!
 
3:40 PM
@Adám This seems to work (for a handful more bytes than your original 38) ]chart g (9○{(-⍵)*g←(-∘⊢,0,⌽)3-100÷⍨⍳300} 2)
 
@J.Sallé 3-20÷⍨⍳121 with ⎕IO←0
 
Ah, nice. I'm using ⎕IO←0 already, forgot to mention that
@Adám Huh, weird. That one seems to double the output of the graph in half the space (will get some screenshots)
 
@J.Sallé Did you remove (-∘⊢,0,⌽)?
 
Ah nevermind, I think my algorithm is off
yeah exatcly
I still think something is off, though, the graphs don't look anywhere near what they're supposed to be
 
@J.Sallé Forgot to answer the parenthesised question: No, you can e.g. also use MiServer with Dimple or Syncfusion.
@J.Sallé Mirrored?
 
3:54 PM
Ah, I think I've found the problem. @Adám how can I make sure the axes on the graph cross at (0, 0)? Mine is crossing at (¯1, ¯3)
That's why it looks weird
 
@J.Sallé They don't have to:
@Kritixi As long as the domain of the graph is from -3 to 3, yes — Beta Decay Apr 13 '17 at 8:44
 
Oh, I see
@Adám So, do I just post the answer as ]chart g (9○{(-⍵)*g←3-20÷⍨⍳121}1)?
And add the plots to the post, naturally
 
4:24 PM
@J.Sallé um, are you sure you can't do ]chart g 9○¯1*g←3-20÷⍨⍳121? ;-)
 
@EriktheOutgolfer nope, I haven't fiddled with the code yet, I'm trying to learn this chart wizard thingy
Also apparently that doesn't work from a cleared workspace (gotta set g before calling ]chart)
 
]chart g←3-20÷⍨⍳121 9○¯1*g?
nah
 
nope, same problem
I thought ]chart 3-20÷⍨121 (9○¯1*3-20÷⍨⍳121) would work but it doesn't
]chart g (9○{(-⍵)*g←3-20÷⍨⍳121}1) works
I'm just not entirely sure this is a valid answer
I'll go get lunch, be back in a few
 
5:24 PM
@J.Sallé My problem was that that is not really a "program" or "function".
 
@Adám yeah, that's what I assumed as well
How to make it a program or function though?
 
@J.Sallé Best program I've come up with so far: ⎕SE.UCMD∊'chart x(9○(-'⍞')*x←3-20÷⍨⍳121)'
 
@Adám I see. Can I use that in my answer?
 
@J.Sallé sure
 
Thanks! Gonna post it then.
@Adám ⎕SE stands for Session, right?
 
5:37 PM
@J.Sallé The session object, which is a system namespace.
 
Okay, thanks
 
 
3 hours later…
8:37 PM
@Adám it's only valid in J806
it is a function though
 
@FrownyFrog Oh, I'm using 805.
@FrownyFrog How so?
 
almost there :)
the first in the list of features
 
@FrownyFrog Yeah, I see. So no wonder I didn't pick up on that.
@FrownyFrog Should I get 807 while I'm at it?
 
TIO uses 806
i didn't try 807 myself
 
@FrownyFrog OK, updated the post. Thanks!
@FrownyFrog I've been thinking that A∘f and f∘B could ignore their left argument (or should the latter ignore the right arg when called dyadically?), and A∘F∘B could ignore any or both arguments.
 

« first day (537 days earlier)      last day (2127 days later) »