« first day (1528 days earlier)      last day (1143 days later) » 

12:13 AM
@rak1507 Meh:
code_report t → 3.8E¯1 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
regex t       → 1.9E¯1 | -51% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
tcnymex t     → 1.3E¯1 | -68% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
vfi_abc t     → 1.1E¯1 | -71% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
vfi_space t   → 8.2E¯2 | -79% ⎕⎕⎕⎕⎕⎕⎕⎕⎕
mkrom t       → 8.7E¯2 | -78% ⎕⎕⎕⎕⎕⎕⎕⎕⎕
masks t       → 5.0E¯2 | -87% ⎕⎕⎕⎕⎕
masks2 t      → 3.6E¯2 | -91% ⎕⎕⎕⎕
masks3 t      → 3.1E¯2 | -93% ⎕⎕⎕
flat t        → 4.2E¯2 | -90% ⎕⎕⎕⎕
 
12 times speed up with masks3! not bad
 
I'm open for suggestions on speeding this up:
 flat←{
     digits←⍵∊⎕D
     cumSum←+⍀digits
     widths←¯2-⌿0⍪cumSum/⍨1,⍨2</digits
     maxWidth←⌈/widths
     expansionInds←1+0,+\¯1↓widths
     extra←maxWidth-widths
     expansionAmts←extra@expansionInds⊢0⍴⍨⊃⌽cumSum
     expansionVec←(+\∊⍨∘⍳+/)1+expansionAmts
     expanded←'0'@{~expansionVec}expansionVec\digits/⍵
     expanded⍴⍨←maxWidth,⍨≢extra
     ≢∪expanded
 }
And this, for that sake, but I don't think there's much that can be done here:
 masks3←{
     nonzero←⍵∊1↓⎕D
     digits←nonzero∨⍵='0'

     begins←2</0,digits
     ends←  2>/digits,1

     ⍝ Not leading zeroes (∨\) in each subvector of "nonzero" indicated by "begins"
     digits∧←ends∨≠\b\2≠/0,nonzero/⍨b←begins∨nonzero

     ≢∪digits⊆⍵
 }
Actually, inlining begins and ends might speed it up…
Nah, insignificant, if anything.
 
I'd say my favourite solution is probably still morten's, simple enough that it's an easy-ish one liner but pretty good performance
 
 
5 hours later…
5:35 AM
1
Q: How to find the index of the first row of a matrix that satisfies two conditions in APL Language?

Rodrigo MirandaOne more question to learn how to use APL Language. Suppose you have an array, as an example: c1 c2 c3 c4 c5 c6 3 123 0 4 5 6 3 134 0 2 3 4 3 231 180 1 2 5 4 121 0 3 2 4 4 124 120 4 6 3 4 222 222 5 3 5 So, how to find out which row has a value of 4 in the 1st column and a va...

 
 
8 hours later…
1:17 PM
@MortenKromberg Yeah, I implemented it backwards in KAP at first, and the funny thing is that many of the test cases ran fine (because in many cases, th ebahviour in both versions are the same), but some tests failed in what seemed to be random ways. It wasn't until I asked here that I understood.
 
 
5 hours later…
6:03 PM
Feedback welcome:
 
@Adám literally perfect
 
I'll suggest adding it to 18.1
But for now: a good weekend to all!
 
 
3 hours later…
9:05 PM
ooh, that looks great
apart from the tradfns ofc :P
It says it's for the windows IDE, will it be for RIDE too?
 
RGS
@rak1507 Conor said he's looking to PR that theme to ride
 
ah, cool
 
RGS
Before Adám's GH I also had a go at porting that theme to the Windows IDE, you would've noticed if you watched my presentation at APL Seeds 😂
 
:( wish I was there
I'll see it on yt when it's uploaded...
 
RGS
I just looked at the dracula colour palette (draculatheme.com/contribute#color-palette) and did my best at interpreting the spec
@rak1507 I'm just joking with you, sadly I don't think I would've taught you anything.
 
9:13 PM
@RGS it would still have been interesting though
 
RGS
@Adám I like it. I installed your version and accidentally overwrote mine, but I won't go through the trouble of going back, yours is very similar.
There's just an issue with the .md files in the repo and the fact that the dracula website still doesn't list the Dyalog IDE.
IMO would also be cool if the screenshot showed the colouring for an idiom...
And I'm also sad that in the Windows IDE you can't colour ops differently from funcs.
 
can you colour idioms in the windows IDE?
 
RGS
@rak1507 yes
 
ooh
 
RGS
Adám's version colours them green instead of that light blue
 
9:25 PM
I should investigate it
I have never changed the colours from the default
ah, it's only in the editor window
how come ,/ is an idiom but ,⌿ isn't?
 
RGS
@rak1507 You can also make it work in the session
But in the session it will only colour the line you are editing
 
RGS
9:40 PM
@rak1507 did you figure out how? Or should I open my IDE to look for the correct button?
 
did I figure what out, how to colourise idioms?
 
RGS
@rak1507 on the session
 
oh, no, I couldn't be bothered, but it's not an issue I don't really care that much
 
RGS
Alright
 
 
1 hour later…
10:47 PM
Not sure if this is the right place to ask this, but is there any context in which the enclosing brackets/parentheses don't count towards a code golf score for apl? for some reason I got it in my head that they didn't
 
curly braces {} must always be counted. If the submission is a train, you don't need the outermost parentheses (as e.g. f←+/÷≢ works without the parentheses)
 
11:18 PM
Ok, thanks. I must have misunderstood a comment somewhere along the way...time to update my answers :)
 

« first day (1528 days earlier)      last day (1143 days later) »