« first day (1462 days earlier)      last day (34 days later) » 

3:48 AM
How does work with dyadic functions?
<moon-child> ⋄ 1+⍣3⊢5 ⋄ 5+⍣3⊢1
<moon-child> generally: x (f⍣p) y ←→ (x∘f⍣p) y
<moon-child> this provides useful identities like a +⍣b⊢0 ←→ a×b, or a ×⍣b⊢1 ←→ a * b
<moon-child> (so you can define multiplication and exponentiation--and tetration, etc.--trivially in terms of ⍣)
that's great!
3 hours later…
7:04 AM
@RGS Until my wife won't have it any longer ;-) I'd say no more than two hours, but likely less.
2 hours later…
9:31 AM
tips regarding projecteuler 18?
I think i came up with a brilliant solution which works on the supplied testcase, but not on the problem itself :p
↑(⊣+((⌈/⊢⌺2)⊢))/(3)(7 4)(2 4 6)(8 5 9 3)
smarter with bind: ↑(⊣+∘(⌈/⊢⌺2)⊢)/(3)(7 4)(2 4 6)(8 5 9 3)
returns correct result (23), but for the project it returns 1000 which isn't a correct solution :/
@Adám Alright. If it extends for too long I may not be able to watch the whole stream, but we'll see.
⍝ nvm solved it, somehow i chopped the first number while transforming it to the APL format
@KamilaSzewczyk (⊣+∘(⌈/⊢⌺2)⊢)/ → +∘(⌈/⊢⌺2)/
That's a really great solution
i'm so proud of it
9:38 AM
Yeah, I was pretty sure the algorithm is correct
it's my first smart APL program
Way better than mine
Yeah, genius
@Bubbler oh true i think the tacit programming page mentioned that :p
mine was routes ← 0 1(,∘.{⍵,⍺+⊃⌽⍵}⍣14)1 ⋄ ⌈/+/¨(⊃⍤0 1)∘(↑triangle)¨routes I just generated all the routes
though I think you can get away with (⊣+2⌈/⊢)/
9:39 AM
this is amazing
@rak1507 How about P67 then?
I haven't done that one lol
      cmpx '↑(⊣+2⌈/⊢)/tab' '↑(⊣+∘(⌈/⊢⌺2)⊢)/tab' '↑+∘(⌈/⊢⌺2)/tab'
  ↑(⊣+2⌈/⊢)/tab      → 4.9E¯6 |     0% ⎕
  ↑(⊣+∘(⌈/⊢⌺2)⊢)/tab → 3.8E¯4 | +7690% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  ↑+∘(⌈/⊢⌺2)/tab     → 3.8E¯4 | +7745% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
the stencil-less solution seems much faster :p
as expected, honestly
that's a really neat solution either way
but why do you have these tacks here
can't they be stripped off?
like before
9:41 AM
if you do +∘2⌈/ the + binds with the 2
but +∘(2⌈/) would work I think
You could do that by +∘(2∘(⌈/))
but it's ugly you know
yeah, true
unless is a hyperator and allows things like ⌈/∘⍨2∘⍨+
and still it's the same byte count as (⊣+2⌈/⊢)
ah yes, highest order functons
so does it work after the adjustments?
9:44 AM
it's crazy that you can solve it with 11 bytes of APL
It's crazy great when the given problem is well suited to APL. Not much for others
problem 11 is nice in APL too
cmp: how many PE problems have you solved and what's the highest-numbered?
64, 124, need to get back into doing them
9:57 AM
@ngn exactly one, #1
244 problems across all accounts of mine, highest being #581
(don't worry, all but one are set to hidden)
@Razetime good you solved at least one, otherwise the highest-numbered would be ¯1.797693135E308 :)
@Bubbler oh, you're advanced. what language do you solve most in?
@ngn It has been many years since I was very active, but I believe I solved most of them in plain Python
@Bubbler You're the first person I've heard of that has multiple project Euler accounts
10:02 AM
and then some re-solved in APL and J
i solved every of these in APL
I think I had an account when I was younger and did about the first 10 in python but I can't remember
i'm doing them in order
i assume that when APL starts using scientific notation it's impossible to get the whole number?
Advertisement: #299 was created by me
@KamilaSzewczyk ⎕PP←16
it's still truncated :p
10:06 AM
Or, since PE problems are designed to be solvable with uint64_t, ⎕FR⎕PP←1287 34
@Bubbler i'll try it later :)
@ngn Thanks. If you can work out the maths, coding part is relatively easy.
i kinda got bored of bundling .dws files with my solutions :p
so since problem 20 i stopped doing that
ngn is crying right now
10:09 AM
@rak1507 ?
oh you just hate when people use dws files over plain text
i bundled both
now i only submit plaintext
@rak1507 git hates non-diffable binary blobs more than i do :)
10:38 AM
@Bubbler I remember seeing it after reading your profile
11:29 AM
CMP: Should APLcart open documentation and TIO links in the same window, or open a new window?
new window
@Adám new window obv.
11:51 AM
@Adám new tab
New window.
OK, that looks pretty unanimous. Maybe I'll add a URL parameter to in the same window.
Is there some rule of thumb for the longest acceptable train one should ever write (in non-golf settings)?
@xpqz I'd say it depends on the "carriages". Once you need to parenthesise any, I'd limit to 3 or 4.
@xpqz depends how complicated it is, some things naturally make longer trains
12:03 PM
This from dyalog docs makes both sense and is easy to read as a longish train: ⋄ 6(⌽+,-,×,÷)2
@xpqz Right, no parentheses there.
So when you need jots, parantheses and many tacks, perhaps the train's too long.
definitely if you're doing something like a∘b∘c∘d you should probably be using a dfn (to me)
@xpqz Yes. ^ though a single or or , and even multiple ⍤⊣/⍤⊢ are probably fine.
1:02 PM
Anyone have an example of a borderline too complex train?
@xpqz Maybe ⊢∧(∧⍀∨⍀=⊢) (First group of ones)?
It'd probably be better to write {⍵∧∧⍀⍵=∨⍀⍵}
I was surprised and concerned to see yesterday's comments about the future of Dyalog.

I'm not privy to any Dyalog secrets, but I've known Morten and Gitte for decades, and we have often discussed the future of APL in general and Dyalog APL in particular.

I'm also pretty familiar with Dyalog's history. Decades ago,
Pete Donelly asked me if I was interested in acquiring Dyadic (as they then were). Sadly I couldn't, though I would have loved to.
Àdam's comment 'We're considering that' was particularly worrying, for me and for any Dyalog customers who saw it. I
had to do a double take to realise that he was talking about Open Sourcing APL, not about selling the company.

I'm quite certain that selling the company to a new single owner won't happen for the reasons that Morten explained.

I hope that's now clear to Dyalog's customers: ultimately they pay Dyalog's salary bill.
Dyalog has a tight-rope to walk. I am absolutely sure it wants to do all it can to enhance APL, but it can only do
that if it survives and thrives. That means it has to meet its commitments to its existing customers,
including those who are shareholders in the company, and that necessarily limits the speed of change.
Actually, my main short-term concern is staff: Who will replace the brilliant minds that (judged by their legal age) are scheduled to retire?
Who'll be the next Gitte? (A CEO that is a believer > a corporate suit.)
@Adám Excellent, I'll sue that.
@xpqz Whoa, you don't have to take legal action against it!
1:12 PM
Ha. → use
Who'll be the next Morten? (A CTO that knows the customers and their businesses for decades.)
Ask them, not me. But remember that Warren Buffet is still going strong at 90-odd, and he is a very smart suit.
Who'll be the next Geoff? (His insight into what's actually going on is based on having been there from the dawn.)
Who'll be the next John Scholes? (The dfns workspace needs maintenance, and he was one of the few Roger entrusted with language design.)
Who'll be the next Roger‽
It's like Man United after the golden generation :)
1:31 PM
i'm having some trouble with P22
I came up with this solution
but it seems to be off by +- a thousand
i've been thinking that there's an off by one in the first procedure, but i can't spot it
@KamilaSzewczyk ~⍤∊⍨ - isn't this just ? (with a scalar on the left)
why drop the last name? ¯1↓
@Adam Nobody thought Streeter or Scholes would become legends when they started work, least of all themselves. It is folly to try to search for plug-compatible replacements, the demands on the Dyalog team are changing rapidly. If we are lucky and determined, we will see the emergence of a new generation of developers who the community we will come to respect and admire. I think we can see the contours of a couple of them already.
@ngn ohhhhhh i thought the last name was this empty block appended by nget
/trailing comma
but it's not the case
@MortenKromberg Really‽ Maybe I'm just over-awed by the giants :-)
1:47 PM
@MortenKromberg I'm an aspiring pessimist, but you did manage to turn Dyadic around when things were looking bleak.
On my part, I'll do my best to keep it up.
@Adam I think I would rate you as better than aspiring right now :)
@Razetime Did you ever look into golfing "transpose md tables for SE" further? Reminder: I'm down to 40.
@Adám No, Pete Donnelly and a few other people turned Dyadic around several times when things were looking bleak, they actually went bust and worked without pay several times. Things have never looked bleak during my time at Dyalog, and they look better now than they have ever done, IMHO.
@adam And I'm not just paid to say that, I'm paid because I believe it :-).
@Adam Anyway, I must be off to test the new #! scripting support on my Mac.
@MortenKromberg That is reassuring, and I trust you on it. (For real, not sarcastically meant.)
@ngn i tweaked it, and it still seems to give a wrong result
but i think i can solve it on my own
1:58 PM
do you know what's the problem :p?
@KamilaSzewczyk ⍳ off by one?
then it'd throw a length error
@KamilaSzewczyk is your ⎕io 0?
it's default, ergo 1
2:01 PM
ah, then you're not off by one. and i don't know what the problem is, yet.
that one test case seems ok-ish
@Adám uh no not exactly
the correct result is 871198282
i'm getting 871202251
the only problem I can think of is file/ something with the grade up
although grade up should work perfectly fine here
2:26 PM
i rewrote it in JS, i get a similiar or the same array (the same first x elements, the same last element)
it sums up to the correct number
but it doesn't work in APL, for some reason.
i think the problem is on the grade up side, maybe i should reimplement sorting.
@KamilaSzewczyk yes, reproduced
my k solution prints the correct answer. would it help? +/,/(1+!#x)*x@<x:(1-"A")+.'","\1:"Desktop/euler22_names.txt"
index 147 has incorrect value
but why 147?
what the hell
15141 instead of 11172
it corresponds to the name JOANNE
it seems ⎕nget is returning an extra byte
is it?
try this: +/a×⍳≢a←+/¨⎕A∘⍳¨a[⍋a←','(≠⊆⊢)~∘'"'⊢¯1↓⊃⎕NGET'Desktop/euler22_names.txt']
2:41 PM
ok, this returns correct results
so your ¯1↓ was right, only it wasn't in the right place :)
fun fact: there's no poland on the list of countries on ProjectEuler
lol what
"Republic of Poland"
since when we are a republic
i expected it to be just Poland
I'm just glad it has Scotland, very few country selections have it
i should create a dfn for quickly calculating proper divisors
@KamilaSzewczyk hard to tell. wikipedia says there was a period of "elective monarchy" in polish history :)
3:26 PM
mornin' y'all. i had a cpl BQN vm questions. btw i put my in-progress repo up here https://github.com/cannadayr/ebqn
im mostly posting now while its fresh from last night and will try to fix this stuff this evening (after work)

so the javascript implementation relies on javascript being able to perform arithmetic operations on lists of size 1. for example: [1 sh: [1]] + [1 sh:[1]] = 2. I was planning to add some logic such that lists of size 1 wont be created (they will remain numbers). the other option is to resolve these lists to a number when performing the operation. unsure if there ar
^ might have to dbl check the "arithmetic on lists of size 1. noticed it late last night and my browser seems to have different behavior so... unsure.
@cannadayr The VM should never do arithmetic on BQN arrays. If you can find a case where it does, please explain so I can fix it.
Testing #! scripting on the Mac (apologies if the example offends any of you kool kats):

Mortens-MacBook-Air:~ mkrom$ cat osversion.dyascript
#!/usr/bin/env /usr/local/bin/dyalogscript
Mortens-MacBook-Air:~ mkrom$ ./osversion.dyascript
@Marshall thx Marshall, ill come up w/ some test cases later tonight. no urgency or anything.
@cannadayr I use arrays directly for the shape in JS for convenience, but it's better for to convert w to a native list of numbers. already converts the argument's shape to a BQN array, and I think all the other primitives treat shapes as native lists and don't convert between shapes and BQN values.
so, for example reshape(1,[1,2,3 sh:[3]]) -> [1 sh: [1,2,3]] ?
3:40 PM
In Dyalog's Jupyter kernel, is there a command I can enter to suppress a cell's output? It doesn't seem to resepect %% sequences.
@xpqz Doesn't {} work?
@cannadayr Well, the first argument (1) has to be a list of length 6 here, but that's the right idea.
@Adám Can you elaborate? I want to avoid the output of e.g. ]box on
@xpqz Oh, for that particular case, do ]←box on
@Marshall ah ok, so i should maybe add an assertion in reshape where X has a ravel of size equal to multiply-reduce of the shape
3:45 PM
oh... nearly
@cannadayr You could; if it's tripped then that's an error in the runtime code.
Is there no way of doing %%capture, for example?
@Marshall yep, im in the point where im going thru the output and spot checking the results w/ the js vm, so it might be helpful for identifying errors
@xpqz Ah, max level? OK, then you have to go one step further: {}⎕SE.UCMD'box on -s=max -t=tree -f=on' etc.
Yes! Works. Thanks!
3:50 PM
@xpqz You could log an issue against the kernel to support (some of) the sequences.
1 hour later…
5:14 PM
i think i broke my interpreter
oh wait nvm it's not a switch
5:35 PM
I made an interesting thing:
      cmpx '{⍵[⍋⍵]}{∪×/¨∪{⍵[⍋⍵]}¨1↓{⌿∘⍵¨↓⌽⍉2⊥⍣¯1⊢¯1+⍳2*≢⍵}1,↑,/{(⊃⌽⍵)⍴(⊃⍵)}¨↓⍉2pco⍵}12387312' '{⍵[⍋⍵]}{∪×/¨1↓{⌿∘⍵¨↓⌽⍉2⊥⍣¯1⊢¯1+⍳2*≢⍵}1,↑,/{(⊃⌽⍵)⍴(⊃⍵)}¨↓⍉2pco⍵}12387312' '(∪⊢∨⍳)12387312' '{⍵,⍨∪⍵∨⍳⍵÷2}12387312'

      312 → 2.5E¯4 |       0%
          → 0.0E0  |       0%
          → 9.0E¯1 | +357900% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
listing divisors of a number, much quicker than the APLcart or optimized APLcart formula
if they don't need to be sorted, then {∪×/¨1↓{⌿∘⍵¨↓⌽⍉2⊥⍣¯1⊢¯1+⍳2*≢⍵}1,↑,/{(⊃⌽⍵)⍴(⊃⍵)}¨↓⍉2pco⍵} will do.
how does {∪×/{⍵*⍤1 1⍉2⊥⍣¯1⊢1-⍨⍳2*≢⍵}3 pco ⍵} compare
it's much shorter, hmm
3 pco vs 2 pco
ohh wait, i didn't know about pco 3
i manually factored it all :/
3 pco is just ∊(⌿⍨)⌿2 pco
5:38 PM
  {⍵[⍋⍵]}{∪×/{⍵*⍤1 1⍉2⊥⍣¯1⊢1-⍨⍳2*≢⍵}3 pco ⍵}12387312

      312 → 2.5E¯4 |       0%
          → 2.5E¯4 |       0%
          → 9.0E¯1 | +361500% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
          → 4.5E¯1 | +180100% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
          → 0.0E0  |       0%
but on the other benchmark:
  {⍵[⍋⍵]}{∪×/{⍵*⍤1 1⍉2⊥⍣¯1⊢1-⍨⍳2*≢⍵}3 pco ⍵}12387312

      312 → 2.5E¯4 |       0%
          → 0.0E0  |       0%
          → 9.1E¯1 | +363100% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
          → 4.4E¯1 | +177800% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
          → 2.5E¯4 |       0%
i think my solution 2 and your solution are comparable
but i'll use yours anyway, because it's shorter :P
i should start archiving my APL snippets so that future self can laugh at them
{∪×/1⌈{⍵×⍤1⍉2⊥⍣¯1⊢1-⍨⍳2*≢⍵}3 pco ⍵}
I slightly changed it
I think that'll be faster than using * and I had ⍤1 1 instead of ⍤1 for some reason
according to a benchmark it's slower by a clip
      ]runtime -c '{⍵[⍋⍵]}{∪×/¨1↓{⌿∘⍵¨↓⌽⍉2⊥⍣¯1⊢¯1+⍳2*≢⍵}1,↑,/{(⊃⌽⍵)⍴(⊃⍵)}¨↓⍉2pco⍵}12387312' '{⍵[⍋⍵]}{∪×/1⌈{⍵×⍤1⍉2⊥⍣¯1⊢1-⍨⍳2*≢⍵}3 pco ⍵}12387312'

  {⍵[⍋⍵]}{∪×/¨1↓{⌿∘⍵¨↓⌽⍉2⊥⍣¯1⊢¯1+⍳2*≢⍵}1,↑,/{(⊃⌽⍵)⍴(⊃⍵)}¨↓⍉2pco⍵}12387312 → 4.6E¯4 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {⍵[⍋⍵]}{∪×/1⌈{⍵×⍤1⍉2⊥⍣¯1⊢1-⍨⍳2*≢⍵}3 pco ⍵}12387312                      → 8.8E¯5 | -81% ⎕⎕⎕⎕⎕⎕⎕⎕
5:43 PM
what's the difference between runtime and cmpx
@KamilaSzewczyk oh lol nvm
I think they're the same thing but I could be wrong
Made a stylistic change that took WAY too long to do. janiczek.github.io/tryapl-elm
I wonder which of these is better... the one on right takes less space but wraps text around ...
I think the one on the right
The interface is brilliant I have to say
Very impressive
i prefer left but who knows. very responsive/clean tho.
the fact that we can't interactively edit the APL session is a bit sad
but the interface is very slick and i love it
5:46 PM
Yeah, it's immutable in that sense.
Re responsiveness: I'm afraid of trying it out at smaller resolutions :D
I think having the description on the left would be great for new people to scroll and look at all the features easily
So that gets a thumbs up from me
And the completion options as well
One thing I noticed is that the toolbar is now a bit too small for me to comfortably mouse-through while looking at the panel on left
6:38 PM
Removal of log items now possible, and state persisted to URL. (I don't know at how many chars do browsers start to break. But given TIO and dzaima paste seem to work, I'm willing to risk it :) )
7:20 PM
@Bubbler i'm stuck on #299. according to my (likely wrong) calculations, there should be 74 triplets for b+d<100 (instead of 92)
7:37 PM
wow, replacing a 1 pco with p where p←∊∘(⍸10 pco 0 100000) just sped up some code by several orders of magnitude
what are the arguments of using K over APL
@KamilaSzewczyk it's simpler and faster
and more precisely?
what about arguments of using J over APL
@KamilaSzewczyk you want examples? give me a piece of apl and i can translate
@KamilaSzewczyk it has more mathematical built-in stuff, i guess (i'm not a j expert)
@ngn i think this all supplies Dyalog APL through dfns workspace
7:44 PM
and j's best impl is under the gpl
yes, it makes it automatically better in licensing aspect than any other interpreter on any other license.
@KamilaSzewczyk Better choice of primitives, particularly with the use of leading axis theory, and simpler syntax (although this is sort of double-edged because functions are awful).
@KamilaSzewczyk prime sieving?
@ngn yes
i was mostly thinking of pco being a replacement for p.
@Marshall which builtins have been ditched, which builtins have been added?
{z←500⋄a←⍸0=1∘|{(2×z×⍵-z)÷⍵-2×z}¨⍳z-1⋄(×/a)×(*∘0.5)+/2*⍨a} @ngn
@KamilaSzewczyk here's my prime sieve for PE
7:47 PM
i have no idea what i'm looking at
I like APL because it's charset is unique and when i see an APL glyph it instantly ticks in my head
@KamilaSzewczyk The paired sets of primitives are all gone, using the rank conjunction instead. Lots of stuff has been added, particularly for number theory and calculus, but very little of it is useful.
i had this problem with j where everything was blending in my eyes
@KamilaSzewczyk ask for a simpler example :)
APL is definitely much easier to read.
I'm stuck between not wanting to recommend APL and not wanting to recommend J.
@ngn i didn't show you the source code of a prime sieve.
apl fits my smoller brain in terms of charset
i don't like stuff that uses random ascii letters for random actions
i mean - sure, you can learn it, and you can use it effectively, but sole thought of that process makes me go aAAaa
7:51 PM
ok, waste of time.. never mind then
@KamilaSzewczyk Also J uses flat array theory with boxes where modern APLs all use nested array theory. J is more rigorous and APL more convenient. I would say the advantage goes to APL here, but both are bad (and based is much better).
you can't deny that K is relatively overwhelming
@KamilaSzewczyk it's the smallest and simplest of the 3
how does tacit programming work in K?
@KamilaSzewczyk It's more limited.
7:55 PM
which concepts are simplified?
(and through which means?)
@KamilaSzewczyk there is no tacit programming. trains are straightforward compositions, e.g. 1+!2* works the same way as {1+!2*x}
oh, this seems really good
you're easily impressed :)
i hate tacit programming
that's why i asked about it :p
and seeing it simplified made me impressed
my problem with tacit forms is that terms at odd and even positions are applied in different ways, so you must be constantly aware of parity while reading
7:59 PM
@KamilaSzewczyk The big change is that you use lists instead of arrays, and store arrays as nested lists. You can still do transpose and various array operations, but if you have say a matrix of strings then there's no distinction between the first two dimensions (matrix) and the last one (string).
in other words, "k unifies rank and depth"
just a reminder that there's a k room where you're more likely to get quick answers, even if i'm not around
8:16 PM
i still don't fully understand what rank is, i remember tweaking with it in J but in APL i just kind of never face this concept
@KamilaSzewczyk a matrix has rank 2. a vector of vectors has depth 2.
in k they are the same thing
@KamilaSzewczyk you're probably thinking of the "rank operator" ( in apl)? or maybe not?
this is good, i often work around it using random combination of ↑↓⊂⊃ and ,
CMC: Given an N-dimensional array, sum its rows (the trailing dimension), thereby reducing it to an array of rank N-1.
8:25 PM
I'm assuming it's not +/ but I don't really know what you mean
@rak1507 Why are you assuming it isn't +/?
because that would be way too simple
Sometimes, tasks have simple solutions.
Anyone up for solving this CMC in K?
Oh I see what you're doing
@Adám did you read this?
8:28 PM
I consider "sum along rows" to be a little clearer, or maybe "sum each row".
@ngn I did.
@ngn We're discussing in the SIMD language discussion room in case you haven't seen it.
@Marshall yes, i'm checking it from time to time
9:16 PM
@Adám something like:
2019-09-25 14:44:44 2core 3gb avx2 © shakti l test
 m:((1 2;3 4);(5 6;7 8))
 .[m;(0 1;0 1);+/]
3 7
11 15
I made a solution to problem 23:
amend-at-depth is partly nyi in k9 atm
abundant←⊢<⊢-⍨+/∘{∪×/{⍵*⍤1⍉2⊥⍣¯1⍳2*≢⍵}3 pco ⍵} ⋄ {+/(⍳⍵)~∊∘.+⍨1+⍸abundant¨1+⍳⍵}28123 mine @KamilaSzewczyk
I think yours is a bit faster
and depending on what the second arg can take it could either require (-1+#shape)#(;) or an explicit generation of the indices !'-1_shape m
(real answer is: try to keep data flat :) )
@rak1507 runtime error
> Mismatched left and right argument shapes
9:19 PM
ah yes, I love index origin problems.
but hey, now my solution won't work so i can't cmpx them
god damn it man
Where'd you get 20161 from
wolfram article about abasdaisd numbers
i forgot already how to spell it
9:37 PM
isn't the solution for 24 just 1000000⊃↓dfns.pmat 10
haha yeah
it's slow and there are better ways but that works fine
doesn't seem like
i get a wrong result
isn't this just n-ary counting with no repetitions or something
you need to subtract 1
@MortenKromberg wait, what? Best news I’ve heard all year!
btw ⊃↓ can be ⌷
9:44 PM
@rak1507 a day without IO problem is a day wasted.
oh did you still have it on ⎕IO←0 lol
can we have a virgin ⎕IO←0 user vs chad ⎕IO←1 enjoyer meme
10:08 PM
@chrispsn Can you do f←.[(0 1;0 1);+/] then f[m]?
with colon and semicolon, yes: f:.[;(0 1;0 1);+/];f m
10:33 PM
@ktye Ah, of course. And if you wanted f[+;m] (or f[m;+]) to work?
10:48 PM
@ngn 74 is correct for one case, you need to find the other one so that it adds up to 92
@Bubbler oh
thanks. it sounds like there is still hope :) i thought there must be something wrong it my calculations on paper, though i triple-checked them..
@Adám new args fill the gaps in a projection, e.g. f[;b;;d;][a;c;e] ←→ f[a;b;c;d;e]
@ngn OK, so f:.[;(0 1;0 1);/]?
@Adám +/ is a single arg
i think f:.[;(0 1;0 1);] and then you can do f[m;+/]
@ngn And if you want to only pass +, not +/?
@Adám that would require wrapping it in a user-defined function, i'm afraid
10:56 PM
So f:{.[y;(0 1;0 1);x/]} ?
@Adám yes (except you've swapped x and y)
Huh? Wouldn't my definition allow f[+;m]?
ah.. so you want to swap them? then it's ok
i'm not sure if (/)x would work in k9. if it does, maybe something like f:.[;(0 1;0 1);]@(/)@ can solve the problem from your previous question without introducing { }
@ngn actually i forgot that the first arg is missing too, so no, it won't work :(
@chrispsn does k9 allow .[m;(::;::);+/]? i.e. use :: instead of the explicit indices 0 1

« first day (1462 days earlier)      last day (34 days later) »