« first day (1303 days earlier)      last day (104 days later) » 

3:41 AM
@Bubbler Oh, where? Congrats!
 
 
4 hours later…
8:15 AM
@Adám yeah started playing with it...
 
@Bubbler You truly deserved it. I also really appreciate all your APL Wiki contributions.
@gvaf Cool. Let me know if I can be of any help. Where are you holding?
 
9:03 AM
So I'm trying to find the value that maximized sin ⍵ in ⍳⍵
but something isn't right here {⍳⍵[(⊃⍒)1○⍳⍵]}
never mind, got it
 
@Razetime While you've probably found that you need to parenthesise the left ⍳⍵, you don't need parentheses around ⊃⍒. However, consider naming ⍳⍵ to avoid computing it twice: {i[⊃⍒1○i←⍳⍵]}
If you're golfing, you can use a train: ⍳⊃⍨∘⊃∘⍒1○⍳
 
I tried using that train but it doesn't seem to give the right output
I'm not sure how to use anonymous functions in the desktop application
 
9:20 AM
@Razetime Just do f←{i[⊃⍒1○i←⍳⍵]}
Or {i[⊃⍒1○i←⍳⍵]} 10 for immediate execution should work too.
For the train, did you write something like ⍳⊃⍨∘⊃∘⍒1○⍳ 10?
 
yes
 
Trains should be parenthesized (⍳⊃⍨∘⊃∘⍒1○⍳) or assigned to a function first f←⍳⊃⍨∘⊃∘⍒1○⍳ before using it.
 
yep but for some reason it's not giving the right output
that's what is supposed to come up I think
 
I don't get it. What is the exact task?
 
9
Q: Integers in cosine

Gábor FeketeIntegers in cosine From trigonometry we know that \$\sin(a) =-\cos(a + \frac{(4*m + 1)\pi}{2})\$ where \$a\$ is an angle and \$m\in\mathbb{Z}\$ (integer). The task For an input of a positive integer \$n\$ calculate the value of the integer \$k\$ with \$n\$ digits that minimizes the difference bet...

and this is my answer so far codegolf.stackexchange.com/a/209831/80214
 
9:30 AM
Then what doesn't work in the train, except for missing 10*?
 
I'm not sure
the only thing I was saying is that it wasn't fulfilling the testcases
Not very familiar with trains yet
 
This gives the values right, so the only step needed is to 10* on the argument.
It can be done with (⍳⊃⍨∘⊃∘⍒1○⍳)10∘*.
But it has the same bytecount with simply using your dfn with an intermediate assignment, so train isn't needed here.
 
Ah I didn't add the 10* that was why the previous links didn't work
what does ∘ do in these trains?
 
9:48 AM
The ones in ⊃⍨∘⊃∘⍒ are "Beside", where x f∘g y → x f (g y) and f∘g y → f (g y).
So x ⊃⍨∘⊃∘⍒ y → x ⊃⍨ ⊃ ⍒ y → (⊃⍒y)⊃x.
The one in 10∘* is "Bind", which binds one side of a dyadic function to make it a monad.
x∘f y → x f y, (f∘x) y → y f x
 
ngn
10:15 AM
@Bubbler why do you need i[ ] / ⍳⊃⍨∘ at all? (and congratulations!)
 
@ngn How I missed that...
 
11:21 AM
@ngn D'oh!
@Razetime As per ngn, ⊃∘⍒1○∘⍳10∘* or {⊃⍒1○⍳10*⍵} is enough. ⊃∘⍒ or ⊃⍒ gives an index, and using that to select and index (from ) is of course a no-op. Since we only need the argument once, a full program that prompts for input: ⊃⍒1○⍳10*⎕ (The "quad", , is stdin.) Try it online!
 
11:47 AM
no-op?
 
@Razetime NO-effect-OPeration.
In computer science, a NOP, no-op, or NOOP (pronounced "no op"; short for no operation) is an assembly language instruction, programming language statement, or computer protocol command that does nothing. == Machine language instructions == Some computer instruction sets include an instruction whose explicit purpose is to not change the state of any of the programmer-accessible registers, status flags, or memory. It often takes a well-defined number of clock cycles to execute. In other instruction sets, a NOP can be simulated by executing an instruction having operands that cause the same effect...
 
cool.
 
 
3 hours later…
2:59 PM
Announcement: "Advanced Use of The Rank Operator" webinar in one minute at dyalog.tv
 
 
4 hours later…
6:40 PM
is there a way to remove the { ... ⍵ } from this APL expression:
rf ← ((⌈\⌊{⌽⌈\⌽⍵})+.-⊢)
 
@code_report (⌽⌈\∘⌽)
 
@dzaima Thanks! ... and interesting. I think I tried (⌽∘⌈\∘⌽) at one point. Are you able to explain why you only need the first ∘
 
@code_report it creates an atop of 2 functions - (⌽ (⌈\∘⌽)); a jot and an atop is common for 3 sequential monadic functions (you could also usually have 2 jots at the expense of a byte, but \ makes that not work as (⌽∘⌈\∘⌽) is ((⌽∘⌈)\∘⌽))
also, with under, {⌽⌈\⌽⍵} could also be ⌈\⍢⌽
 
@dzaima i see, so due to binding precedence, i would need to do (⌽∘(⌈\∘⌽)) in order to use jot twice. but that is more verbose than an atop
its odd because the atop train and jot basically serve the same purpose if I understand correctly
composition of two functions
 
@code_report besides syntax, the tacit atop is equal to monadically, but dyadically it acts as
 
6:54 PM
interesting
and I have no idea what "under" / ⍢ is
doesnt seem to show up in tryapl.org
 
(and is equal to monadically, so ((f) (g)) is always the same as (f)⍤(g))
@code_report it's not in Dyalog currently. in this case, f⍢g X is (g⍣¯1) f g X - it's implemented in dzaima/APL and Dyalog APL Extended
 
cool! thanks for your help @dzaima!
 
 
4 hours later…
RGS
10:54 PM
@Bubbler nice! Congratulations!
There's still some time left before it happens, but I think you'll enjoy Portugal :P
 
Thanks!
 
@Bubbler I'm sure well-deserved. I wasn't aware it was open to non-students... And I reviewed the part 1 problems :)
 
11:37 PM
@Jonah non-students couldn't win any of the cash prizes, but could enter anyway. Torsten Grust won non-student last year, and got to visit the Dyalog conference from it.
 

« first day (1303 days earlier)      last day (104 days later) »