« first day (2242 days earlier)      last day (402 days later) » 

2:23 AM
I am using aspx files to build a website application and have an APL workspace as code behind where I reference a Class which has a page_load function. I am trying to tie to an external APL component file vis-a-vis the apl workspace. The component file is on my hard drive and I am using IIS as the server. I want to be able to read and write to the component file so I can store and update data.
The system does not let me do the file tie and I end up with a value error. I have researched the web but cannot find the obvious solution.
 
 
2 hours later…
4:35 AM
Dealing with so much Java and Groovy at work. Really tempted to casually add in Dzaima APL.
 
4:56 AM
@user1782004 Hi Alexea Marie Nieves, if you want to participate here, please email access@apl.chat
 
5:09 AM
@preaburn What error do you get from ⎕FTIE?
Who can find (or brute-force!) the 3-char solution to this?
46
Q: Split string on first occurrence of each character

AdámRelated. Given a printable ASCII string, split it into a list of non-empty strings with a new sub-string beginning every time a character, which has not previously been seen in the same case, occurs. Examples "mississippi" → ["m","i","ssissi","ppi"] "P P & C G" → ["P"," P ","& ","C ","G"] "A...

 
6:02 AM
Can't find the link for syntax here. There was a cute hack for making spoilers.
@Adám spoiler
 
@B.Wilson i think u do [spoiler](https://google.com "spoiler text")
 
@B.Wilson You don't have a link to apl.wiki/APL_Orchard on the right? it is there under Basic_formatting.
 
@AidenChow Finally got there :P There was actually about a 5s delay until the link rendered, where it showed literally, so the last two deletions are even more spurious than the first two!
 
@AidenChow That makes a link rather than a spoiler.
 
@Adám u r supposed to hover on top of the link to see the spoiler text
 
6:09 AM
yes.
ofc, that means touch devices have an accessibility problem...
 
@Adám I do but am just dumb. Was looking for an SE link.
 
I get a value error because it doesn't allow me to tie the file. I am not totally clear on the reason but it has to do with the fact that a new workspace is called everytime a page load event occurs.
 
@preaburn I don't follow. If you cannot tie the file, ⎕FTIE should error, but not with a value error.
 
 
5 hours later…
11:47 AM
@Adám What time was the Quest today?
 
15:00 UTC, i.e. in 3 hours and 11 minutes.
 
 
2 hours later…
1:22 PM
huh, why the time change?
 
Because it clashes with my schedule every Friday.
 
2:02 PM
@Adám BTW, the APL Quest banner announcement still seems like it's set for the old time.
 
2:13 PM
@B.Wilson oops.
 
Adám has added an event to this room's schedule.
Adám has removed an event from this room's schedule.
Adám has added an event to this room's schedule.
 
@Richard @att @BrianBED user1175060 @lyxal @user287218 @user287218 @user19874054 @user19874054 @user19758417 @user19758417 @user1275760 @user1275760 consider signing up for reminders at the new time.
 
Adám has removed an event from this room's schedule.
 
2:31 PM
in 30 mins
 
2:52 PM
noice the time change works better with my schedule too
 
Welcome to APL Quest 2018-9! Today's quest is Earlier, Later, or the Same?:
> Write an APL expression that given left and right arguments of Y M D h m s f vector timestamps returns a ¯1, 1, or 0 if the left argument represents a time that is respectively, earlier than, later than, or simultaneous with the right argument.
 
I wsa very proud of my solution, until you pointed me to APLchart :)
{⍺≡⍵:0 ⋄ -/⍋⍺ ⍵}
 
That is nice, but you can combine the guard expression and the main expression, the APL way.
 
oh, that makes sense - i had {×-/¯1 1⎕dt ⍺ ⍵}
 
You don't need to specify ¯1 — that's the default for vectors.
 
3:02 PM
I had ⊃0~⍨×⍤-
 
That's beautiful.
I had (>-<)⍥(1⎕DT⊂)
 
@rabbitgrowth wow that ~ trick is nice
 
And using to coerce a new 0 if they are all equal.
 
@Adám really? That seems to have domain error in tests:×-/ 1⎕dt ⍺ ⍵ caused DOMAIN ERROR with (3345 4 16 14 11 12) as left argument and (4337 2 12 17 54 7) as right argument
 
time to rework one of my problem solving competition entries
 
3:04 PM
Shh!
@Silas I get the same error if I have the ¯1 there.
 
huh, with the ¯1 says passed basic tests but not (7⍴0) as arguments
 
I had ⊃0,⍨0~⍨×⍤- at first, then realized the 0,⍨ could be dropped
 
I'm at a loss here. I get "should have returned" with {-/1⎕dt ⍺ ⍵} but a domain error when inserting ×. How can × domain error on a number or -/ return a non-number‽
Shh!
 
@Adám how? You cannot distinguish between two same entries and two following up ones
 
{(⍺≡⍵)×-/⍋⍺ ⍵}
 
3:10 PM
ah ok :)
 
Or train it to be ≡×{-/⍋⍺ ⍵}
Here's a fun one: ×-⍥(1000∘⊥)
 
@Adám how precise is this one? Will give huge numbers
 
Ah yes, we'll need ⎕FR←1287 for it.
 
I also tried to make {-/⍋⍺ ⍵} tacit.
Probably not usefull but got stuck at (-/⍒,⍥⊂)
 
You can do -/⍤⍒⍤,⍥⊂ but…
Anyone up for an industrial solution?
 
3:24 PM
yes
 
{⎕USING←'System' ⋄ DateTime.Compare{⎕NEW DateTime ⍵}¨⍺⍵}
Won't work online because the Linux server has no .NET installed :-)
 
dyalog apl can access .net?
 
Yes, it was on Microsoft's official list of .NET programming languages back when .NET was new.
 
huh
 
Anyway, with this abomination, shall we say see you next week for 2018-10: Anagrammatically Correct?
Shh!
 
 
2 hours later…
5:54 PM
ive got two bqn functions:
MedianOfSortedLists ← ({𝕩{2|≠𝕨 ? ⊑𝕩⊏𝕨 ; ÷⟜2+´𝕨⊏˜𝕩-1‿0}⌊2÷˜≠𝕩}∘∧∘∾)
FirstMissingPositiveInteger ← {⌊´1+/¬𝕩∊˜1+↕≠𝕩}
both as solutions to these leetcode challenges respectively:
https://leetcode.com/problems/median-of-two-sorted-arrays/
https://leetcode.com/problems/first-missing-positive/

im new to bqn, coming from apl and im wondering about some ways to refactor these expressions.

median-function:
first off, im not proud of the algorithm in and of itself. its quite imperative by nature and requires the ? if-like statement (which i love as bqns response t
 
 
2 hours later…
7:31 PM
@Slimey BQN is 0-indexed, so /𝕩 is just the thing you use for APLs ⍸⍵ with ⎕IO←0. If you require 1-indexing, you indeed just 1+ that, same thing you'd do for anything you want to make 1-indexed
an alternative way to write the second function might be {⌊´ ¬∘∊⟜𝕩⊸/ 1+↕≠𝕩}, avoiding one of the 1+es by "reusing" it
and {(+´÷≠) 𝕩⊏˜ (⌊⋈⌈) 2÷˜¯1+≠𝕩}∘∧∘∾ is one option for avoiding the branching for the median
 

« first day (2242 days earlier)      last day (402 days later) »