« first day (1625 days earlier)      last day (1030 days later) » 

6:06 AM
@rak1507 Not just those two. Monadic and dyadic operators are actually entirely different syntactic classes. (In J they have distinct names too.) ALL monadic operators can be assigned directly. NO dyadic operators (except dops) can be assigned directly. Not that this restriction makes sense, but at least ¨ and are no different from say & or ⍣2 or {⍺⍺}.
@Jonah Maybe you can use F. and then call Z: in the condition?
 
6:32 AM
@Adám yeah that's an option I forgot about though when I've explored F. / Z: previously the solutions weren't very golfy.
@Bubbler the counter solution might be the best option :(
 
 
3 hours later…
9:48 AM
CMC: Produce 0⍴⊂⍬
 
10:00 AM
I have many at 3
2
 
Well, it can hardly be shorter than 2.
@xpqz Sorry for making the fun so short-lived.
 
Well, now that I have a brute-forcer....
My favourite 3 was 0⊂0
 
My favourite 3 was ⍬⊆⍬
 
Or maybe ⍴¨⍬
 
Another blog post?
 
10:08 AM
Still working the first one!
 
A lot of people struggle with empty arrays and prototypes.
 
Count me into that set....
 
I think going through and explaining all these could be a great help to gain an understanding, and maybe even an intuition for the subject.
 
The 2 makes more intuitive sense than most of the 3s to me.
 
10:22 AM
,⊂⍬
@Adám is there always a way to get low rank empty arrays without
 
@Razetime I think you can do anything without , though it might well be very awkward.
 
 
1 hour later…
11:51 AM
@Razetime Not sure that is correct?
⋄(,⊂⍬)≡0⊂0
 
@xpqz 0
 
RGS
woohoo, my "let's build a simple APL interpreter" series reached the front page of HN! news.ycombinator.com/item?id=27728071
I'd share a screenshot but I'm on my phone and I can't seem to be able to do it XD
 
12:16 PM
@RGS Well done.
 
@RGS Interesting that it is part 2 that's on HN. It already has significantly more views than part 1.
 
RGS
12:35 PM
@Adám yeah, but iirc someone once shared part 1 on HN as well... I might be wrong, but I seem to have that recollection.
 
12:56 PM
@xpqz yep incorrect
@RGS may be worth linking to part 1 in part 2
 
RGS
1:20 PM
@Razetime all parts are linked in the end, and usually the intro of part n+1 directly links to part n. Should I add the series listing to the top of the posts..? That's not something I see commonly
 
@RGS Same person, three months ago: search.
 
1:58 PM
Hi all, has anyone tried to solve project euler 14 using APL? I tried building a cache where the length of a collatz sequence is stored in the vector vals and the initial starting point is stored in the hashed array (using 1500⌶) but it is still too slow (about 5 minutes on my laptop).
 
Are you searching by just counting up from 1 and finding the sequence length for each?
 
Yes. I have a cache though, so if along the way I hit a number I've cached then I just add the current count to get a total and return that + update the cache.
@hyper-neutrino
 
Ah. That'll take far too long because n/2 means every new value potentially doubles the next term to prepend to your current chain. If you have a number x at the start of your chain and you want to extend it backwards, you essentially want to find some k such that k/2=x or 3k+1=x. Think about how you can do this without just looping up.
(I havent' solved this by the way, but I'll try to do it in C++ with my idea, so do take my advice with a grain of salt)
wait, hold on, i may have misread this. give me a second to think about if my suggestion still works
hm, yeah, my idea may not work, sorry. i'll think more about it later maybe
 
2:14 PM
To be more precise here is my solution:
keys←1500⌶1⍴1
vals←1⍴1
collatz←{
⍵∊keys:vals[keys⍳⍵]
c⊣keys,←⍵⊣vals,←c⊣{
⍵∊keys:1⊢c+←¯1+vals[keys⍳⍵]
2|⍵:(2÷⍨1+3×⍵)⊣c+←2
(⍵÷2)⊣c+←1
}⍣(1=⊣)⊢⍵⊣c←1
}
 
you don't need a cache
collatz is simple enough to bruteforce via recursion
or via power
but tail recursion is far more optimized
 
ok, will try but I reckon that I won't get below a 1 minute runtime @Razetime. Do you reckon tail recursion is more optimised than ⍣? I doubt it.
So something like:
⊃⍒{c⊣{2|⍵:2÷⍨1+3×⍵⊣c+←2⋄⍵÷2⊣c+←1}⍣(1=⊣)⊢⍵⊣c←1}¨⍳¯1+1e6.
 
yes, something like that
naive recursion gives 32797ms btw
 
old conversation about problem 14 (note: spoilers: speed)
 
interesting
 
2:49 PM
Announcement: Dyalog webinar on Database basics in 10 minutes.
 
3:06 PM
@11Kilobytes ⊃⊃{i a←⍵⋄(m/i)(a/⍨m←(≠a)∧1≠a←m+2÷⍨a×1+5×m←2|a)}⍣{1=≢⊃⍺}⊢2⍴⊂1+⍳1E6 ⍝ thanks dzaima
 
@11Kilobytes If you put your code into a separate message (it'll be visually merged with you previous one), you can press Ctrl+k to enable monospace font and indenting.
 
 
2 hours later…
4:52 PM
@Adám On APLcart issues, you have a lot to do with adding links to more kinds of content, particularly videos and long-form text. Is there an existing way to implement this, eg with the '?' button, or are you planning to add another button-link type in addition to the current '?' & '▷'?
 
@AviFS Are you talking about the issues labelled (pub)?
 
@Adám Good point. Yeah. But the description isn't helpful. It just says concerning /pub
 
@AviFS Indeed: aplcart.info/pub
 
Woahhhhh
Now I get it! Thanks.
Did you mean to have a serif font? I find it much harder to read.
 
@AviFS np. I don't publicise it because it is so far from finished. However, see the internship ad.
@AviFS No, does it render wrong?
 
5:01 PM
Yeah, it's a different font
Which also screws up the logos
 
Which browser?
 
Firefox
Let me look up the specifics
 
@AviFS Then you can go into the dev tools → Inspector → Fonts and have a look what's going on.
 
I was about to!
 
 
5:05 PM
In the meantime you might want to check, too, @Adám & others!
I'm on a Mac and it's happening to me across all of Safari/Firefox/Chrome, which is every browser I have
 
OK, I think I know what the issue is.
@AviFS Should be fixed now. Thanks!
 
@Adám Yup! Fixed!!
I actually would be very interested in the internship opportunity! I don't think I ever sent in all my info last time. Should I do that?
(I'd have to write up a CV for the first time, haha.)
 
@AviFS No need for a CV for this specific job.
 
Phew! What would be the next step in applying then?
 
11Kilobytes was also interested. Let's find a time when all three of us can meet and I can explain the work in more detail, and if you still are interested after that, I'll hand you over to the appropriate colleagues to discuss payment. How does that sound?
 
5:14 PM
That sounds great! Maybe splitting the work would also be a possibility, then? Or are you thinking it's a one-person job?
 
I prefer having a couple of interns to do it.
 
Perfect. I can only commit to being free on any given day between 7pm & 5am UTC, though I know that's not very convenient in your timezone!
But I'm on a lot of the time so we can also play it by ear. Feel free to ping whenever/wherever, if you didn't feel free to do so already!
 
5:34 PM
Between 10:00 and 21:00 UTC for me.
 
@AviFS @11Kilobytes OK, so right at 19/7pm UTC would suit all three of us. Would Monday Jul 12 work for you?
 
@Adám Works great for me! See you guys then
 
Works for me too @Adám!
 
5:49 PM
Great. Added to calendar. Zoom ID 844 0824 9730 with passcode ×/7 73 661
 
Looking forward to it!
@xpqz Which video is it? I was also wondering about what that meant!
 
@AviFS This one.
 

« first day (1625 days earlier)      last day (1030 days later) »