« first day (323 days earlier)   

Ven
4:14 PM
Mh, seems like TryAPL has troubles...
 
4:27 PM
@Adám Thanks man, it means a lot :). I have some programming background, but yeah, I started learning APL when I first joined PPCG/this very chatroom a couple months ago.
 
Ven
@J.Sallé I feel envious :P.
Grats!
 
@Ven Hahahah thanks :p
 
4:49 PM
@Adám @ngn can you explain to me what exactly is the order of the things happening here n⍴⍨{v≢⍬:j⊃v⋄n}? Does it shape n as the result of the dfn, or it shapes the result as n?
 
Ven
@J.Sallé it shapes n with the shape of the result of the dfn
 
@Ven that's what I thought, thanks!
 
5:57 PM
)refs
)about
 
@J.Sallé You can evaluate an APL expression by typing it into chat prefixed by ⍞←. Use ⎕← instead for boxed display and multi-line results. Do not use markdown. Commands: )lb for language bar, )help for table of language elements, )docs for full documentation, )ref for PDF reference card.
 
)ref
 
@Adám when you have some time, could you check my explanation to see if I didn't mess up anything?
 
6:17 PM
@J.Sallé It isn't a prefix tradfn, but rather a niladic tradfn, or "full program" (as it takes care of I/O).
@J.Sallé It also only takes one input, which is a 3-element list.
 
@Adám okay, thanks! I'll fix those.
 
@J.Sallé "concatenate (,) with v" should say "append to (,←) v"
@J.Sallé Other than that, it is good. Your explanation is lucid. Great job!
 
6:56 PM
@Adám sounds good! Thanks a lot man!
 
 
3 hours later…
9:47 PM
@Adám codegolf.stackexchange.com/questions/150650/binary-sequences sounds like a good showcase for stencil, though I have no idea how to make the different check for the edges
 
@Uriel Without even reading the problem: You can use to detect the edge.
 
@Adám I figured that, but that doesn't really cover my lack of understanding of stencil
 
@Uriel Well, it really is just a sliding window, and you can do with each cut out piece whatever you need.
 
@Adám you mean like it works with APL code like QuadR/S?
 
@Uriel Oh, you are talking about Stencil, not . Ah, yes. the code is just a single APL line (it may have s).
@Uriel The central part of what I did was pre-define some variables you can use in that code without defining them yourself.
@Uriel If 1 < n < d, then if the (n-1)th, nth and (n+1)th digits of A are equal, then the nth digit of B is zero; otherwise, it is one.1=≢∪⍵
@Uriel The first digit of B is zero if the first and second digits of A are equal; otherwise, it is one.⍺=¯1:=/⍵
 
9:56 PM
@Adám ≢∪⍵ on input 1 1 gives me 2 2 (i.e. 2 unique items)
some bug?
 
@Uriel That's because each size-3 window has a padded 0.
 
@Adám no need for the edge case; the main one sums the action, as the edges contain only 2 items
@Adám hmm no way to remove it?
 
@Uriel Sure, ⍺↓⍵
@Uriel Ah, you're right, I hadn't read the entire description yet. This is easy.
 
@Adám you mean ≢∪⍺↓⍵? doesnt work
 
@Uriel It should. You just need to check if it is 1=
 
@Uriel Uh, I think I just found a bug in .
⍞←{⊂⍵}⌺3⊢1 1
 
@Adám ERROR: Use ⎕← for a full error report
 
@Uriel afaict ^ should work.
 
⎕←{⊂⍵}⌺3⊢1 1
 
@Uriel

Rebuilding user command cache... done
Was OFF -trains=box -fns=off
⍎DOMAIN ERROR
 __field_initialize_result_←(⎕NS ⍬).⍎'⎕CY''salt''⋄⎕SE.UCMD''box on -fns=on -trains=tree''⊣enableSALT' ⋄ ⎕←{⊂⍵}⌺3⊢1 1
                                                                                                        ∧

Real time: 1.509 s
User time: 1.275 s
Sys. time: 0.069 s
CPU share: 89.03 %
Exit code: 0
 
10:03 PM
@Uriel The reason is that I pad with extra zeros.
@Uriel This works:
⍞←{1≠≢∪⍺↓⍵}⌺3⊢⍎¨'010111100111'
 
@Adám 1 1 1 1 0 0 1 1 1 1 0 0
 
@Adám almost beats jelly. can that be made into a train?
 
@Uriel Yes, but same length: (1≠∘≢∘∪↓)⌺3
@Uriel Is it just me, or should that give (0 1 1)(1 1 0) ?
 
@Adám hmm. fix stencil fast and nudge dennis to pull it in and hope it goes unnoticed?
actually, I think they cancelled the non-competing for newer languages/versions
 
@Uriel Yes, we've changed the rules. You can use a language which post-dates the challenge.
@Uriel I don't think I easily can. Stencil pads with even more zeros to avoid problems like ⌺3,1 but by doing so, I messed up the edge signalling.
@Uriel If I'm not mistaken, {1≠≢∪⍵~#}¨3,/#,,∘# is a valid solution.
@Uriel I've sent an enquiry to our internal language group.
 
10:32 PM
How often are bugs spotted in APL thanks to code golf, anyways?
 
@Zacharý Quite often. For the 2016 Year Game, Dan and I wrote brute forcing algorithms which found bugs that were fixed. I stumble upon bugs several times a week, some of which I find during code golf. However, I usually use the next upcoming version, so customers rarely experience these bugs.
@Zacharý I've filed eight bug reports against the interpreter in the past week. Five have been fixed already. Only one of these bugs were in a primitive, while two were in system functions, one was in editor behaviour, one in IDE behaviour, and two were purely IDE-cosmetic.
 

« first day (323 days earlier)