« first day (2025 days earlier)      last day (616 days later) » 

6:32 AM
Hello, anyone know why i get "libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)" when i tried to start my Ride? I cloned repo and installed dependencys with no erorrs
 
 
1 hour later…
7:53 AM
@Secret hey. libva is something with video acceleration (i think). Did you install that library? sudo dnf install libva or something?
Ride always just worked for me on fedora, so not sure what is going on there. It seems strange but then again it is an electron app, so the web engine may do crazy stuff.. Otherwise just as a test, try to run gnome on x11 instead of wayland, that is what I always do.
 
 
7 hours later…
3:00 PM
Welcome to APL Quest 2015-8! Today's quest is Unlucky 13:
> Implement a function to process output and change the 13s to 12.99.
This has a couple of really obvious solutions, as long as we only expect simple arrays.
 
(12.99@{⍵∊13})
one of the obvious
 
Why are you using instead of =?
 
no reason actualy. When using a vector ∊ gives immidiatly a 0 or 1. But this is a scalar
 
Ah, there's a good reason: It'll handle nested data!
⎕←12.99@{⍵∊13} 10 'abc' 13 'defg'
 
@Adám
┌──┬───┬─────┬────┐
│10│abc│12.99│defg│
└──┴───┴─────┴────┘
 
3:03 PM
yes
 
Let's spice things up a bit: Handle 10 (12 13) 'abc'
 
{⍎'\b13\b'⎕R'12.99'⍕⍵}
 
This fails on text and higher-rank data and also replaces text, which is against the spec.
 
(⊢-0.01×13∘=)
 
That's the old school mathematical approach.
But again, fails on character data.
 
3:06 PM
on the problem.tryapl page can we get ctrl+enter to check the solution
 
Probably. Can you log an issue against the repo?
 
Can 'rank' be used on mixed input? (12 13) 2 2⍴13
 
Not sure what you mean.
 
ovs
{13≡⍵:12.99 ⋄ 1<≢⍵:∇¨⍵ ⋄ 2≤≡⍵:⊂∇⊃⍵ ⋄ ⍵}
This is probably a bit overkill
 
@Adám done
 
3:09 PM
Thanks.
@ovs Do you really need the 3rd statement?
 
ovs
2nd and 3rd can be combined
 
I think you can just remove it.
Oh, no you can't.
But {13≡⍵:12.99 ⋄ 0≠≡⍵:∇¨⍵ ⋄ ⍵} should work, no?
 
ovs
Ah yes this is better than what I was trying
 
Can anyone find the approach that doesn't require you to implement recursion?
Here's a hint: This would be nice with Under as so we could write 12.99@(13∘=)⍢∊
I wonder if 12.99⍢(13∩⍨∊) could be made to work.
 
ovs
{x←⍵ ⋄ (∊x)←12.99@(13∘=)∊x ⋄ x}
I always forget about this kind of assignment
 
3:21 PM
Very good! You can shorten it a bit to {x⊣(∊x)←12.99@(13∘=)∊x←⍵}
And with that, I'm pretty sure we've exhausted this problem. Anything else?
 
still thinking about how to make a fully formed regex solution
but yeah that is probably it
 
Why ∩ @Adám?
 
@Richard To isolate the elements that are 13s.
 
ok!
 
multiset intersection keeps the 13s there
 
3:25 PM
 
breakfast
 

« first day (2025 days earlier)      last day (616 days later) »