« first day (819 days earlier)      last day (25 days later) » 

2:43 AM
@TessellatingHeckler I asked the same question a while ago, it didn’t sound like it a solution was in production reddit.com/r/apljk/comments/7veiiu/ocr_for_apl/…
Also had a brief go at using Tesseract.js to train it but didn’t have the sample data tesseract.projectnaptha.com
 
3:08 AM
Not out of the question that one person could get the necessary training set together with modern ML techniques twitter.com/hardmaru/status/1120863660107161600?s=21
 
3:54 AM
@chrispsn now that you mention it, the lack of training set hadn't occurred to me
Windows 10 with a tablet has a pretty good text input, and OneNote App edition has a pen->math input editor, although I haven't used it much. But I doubt there is much handwritten and electronic APL
 
 
3 hours later…
6:37 AM
I watched Jay Foad's webinar about the Advent of Code problems; rather hoping I'd see something to answer a question in the back of my head "what happens when a problem gets too big for a 'naive' "make a big matrix" solution.
e.g. the first problem has a vector of numbers, and they need to be summed repeatedly, such that in an imperative language I'd use an index into the array and walk the array over and over. Jay simply catenated the vector to itself ten million times .. and it worked, fast. A later problem he outer-product outer-product, and got a large matrix, again it just worked and fast.
I'm both impressed that it goes so far, and also still wondering what happens when that stops working. What's the equivalent of a generator in C#, or a lazily evaluated list in Haskell, or is that kind of thing happening in the background
 
7:33 AM
@TessellatingHeckler some thoughts in a k context: stackoverflow.com/questions/51916990/…
Particularly this part “When using the "do...while" forms to implement nontrivial algorithms, it is common to write the body of the loop as taking a tuple containing all the loop's state and returning a new tuple for each iteration“
 
 
2 hours later…
9:27 AM
@TessellatingHeckler Unfortunately not that I know of. If only shapecatcher was open source, all we'd have to do was reduce the supported character set.
 
 
2 hours later…
11:17 AM
@dzaima What does this mean?
 
in dyalog they're equal and i felt that was pointless
should get around to updating that file as there's a lot to add
 
@dzaima ah, so ⌽[k] ≡ ⊖[(⎕IO+≢⍴⍵)-k] ?
 
@Adám yeah, should be
 
@dzaima Good point, but shouldn't that apply to , and / and \ too? ,[k] ≡ ⍪[(⎕IO+≢⍴⍵)-k] and f/[k] ≡ f⌿[(⎕IO+≢⍴⍵)-k] and f\[k] ≡ f⍀[(⎕IO+≢⍴⍵)-k]
@dzaima I did something similar for my extensions so (2 3)(4 5)/2 2 2⍴⎕A is the same as (1 1)(2 3)(4 5)⌿2 2 2⍴⎕A while (2 3)(4 5)⌿2 2 2⍴⎕A is the same as (2 3)(4 5)(1 1)/2 2 2⍴⎕A
 
Ven
11:33 AM
@Adám How to get a full program on TIO without counting the ⎕← in the code box?
 
Ven
I don't get the input format :-)
 
@Ven "Input" is just an APL session where the "user" calls p and then answers the prompt.
 
Ven
Hah, okay, I see it now.
 
The leading spaces before p are for clarity.
 
11:37 AM
@Adám it probably should, but my ⍪ doesn't currently take dimension specification at all and my ⌿ isn't at all /
 
@Ven Here is a different method that doesn't require you to explicitly call p: Try it online!
@Ven This one lets you specify how many times you want to run the function.
 
Ven
All good, thanks. I'll try to find a few extra golfs in Extended.
I think with manual p calls it's fine too
 
11:57 AM
@chrispsn very interesting reddit thread, but a lot over my head; I can't speak K or Q but I think I follow the loop tuple idea, although not enough that I could use it
 
12:10 PM
@Adám ShapeCatcher feels so heavyweight; GPU for character recognition? Impressive, but it's doing a lot
 
12:24 PM
@TessellatingHeckler Yeah, we don't need that much. A basic OCR that allows a limited character set would be enough. Btw, did you know that early APL fonts had all letters in italics? It was easy to distinguish ∘○0 oO and L and × x and T and 2Z and 5S. See e.g. APL2741:
The IBM 2741 is a printing computer terminal that was introduced in 1965. Compared to the teletypewriter machines that were commonly used as printing terminals at the time, the 2741 offers 50% higher speed, much higher quality printing, quieter operation, interchangeable type fonts, and both upper and lower case letters. It was used primarily with the IBM System/360 series of computers, but was used with other IBM and non-IBM systems where its combination of higher speed and letter-quality output was desirable. It was influential in the development and popularity of the APL programming language...
 
1:28 PM
@dzaima Huh, compare (f g h) in dzaima vs Dyalog
 
@Adám hmm. debug yay
 
@dzaima It doesn't explain the order, though.
 
the evaluation is done here - the two lines could easily be swapped
@Adám true, forgot how trains worked and that that isn't at all ((⎕←1) (⎕←2) (⎕←3))⍬
 
@dzaima Question is, should it?
 
@Adám it doesn't really matter, though i guess rtl is more APLy
heh this vs this
rtl would be more logical as it extends throughout the train
RTL also would allow for better memory management - LTR requires all results to be held in memory while RTL only needs the few for itself
 
Ven
1:48 PM
0
A: Professor at MIT can read minds!

VenAPL (Dyalog Unicode), 49 bytesSBCS ⊃x⌽⍨⊃i-4×2-⌊1.8⊥⍋1↓i←⎕⍳⍨x←,⍉'CDHS'∘.,2↓⎕D,'TJQKA' Try it online! Thanks to @ngn for the 4×2-⌊1.8⊥. Explanation: ⊃x⌽⍨⊃i-4×2-⌊1.8⊥⍋1↓i←⎕⍳⍨x←,⍉'CDHS'∘.,2↓⎕D,'TJQKA' ⎕D,'TJQKA' ⍝ Concatenate a list of numbers with TJQKA...

Better with an actual explanation
I think it's my longest APL snippet yet
 
it is done
 
Ven
callInv should totally use the previous order ;-)
 
@Ven You mean ⍣¯1? I'm pretty sure it does in Dyalog, but you can't invert side-effect'y fns (yet), so it is a bit hard to check.
 
@Ven sadly inversion of a dyadically called fork just doesn't happen in my apl :p
 
Ven
Haha
 
1:54 PM
@Adám how would a dyadic train inversion even work?
 
Ven
Reading the source code of dzaima/apl though, I'm surprisde by how clean it is.
 
@Ven Needs 100rep bounty, right?
 
Ven
(and impressed by how much better you got at APL in ~2 years)
@Adám ah, yeah, thanks
 
@Ven you get a lot from not having objectives changed mid-writing :p
 
@dzaima Magic:
⍞←2(×+÷)⍣¯1⊢2(×+÷)4
 
1:57 PM
@Adám yeah, besides magic, i mean
 
@DyalogAPL Where are you?
 
Ven
@dzaima I didn't know you could rid of Magic in APL ;-).
 
@Ven writing my apl has been a very big part of that
 
Ven
I suppose those are two very good reasons, yes
 
Google recommends writing your own APL interpreter.
 
2:01 PM
@dzaima and then there's me redoing a lot every now and then (right also bitarrs and no more ⎕cond in my apl yay)
 
Ven
I'm not gonna pretend I find this all very readable ;-)
 
@Ven point is, diffs are pointless sometimes
 
Ven
.oO( Yes, but have you seen q's source code? )
(or was it K? I can't remember...)
 
@Ven not k's/q's, but if the whitney style is what you mean, then yes
 
⍞←'Have you lost your mind?'
 
2:05 PM
@Adám
Yes.
 
probably about time to get my apl updated on tio, been holding it off for a long time
 
@dzaima Can you try this with the new definition?
 
@Adám my new favourite command
 
Ven
@dzaima ...Pretty much. Still better than O
 
@dzaima could probably make repr() be inherited from the underlying token now actually
@Adám 2 does the same, - errors?
 
2:16 PM
@dzaima I figured there'd be an issue.
@Ven O, there are others writing in AWC. I didn't know.
 
Ven
@Adám The appropriate french joke here would be "No, they had an AVC writing this" (a stroke)
 
error is fun
https://tio.run/##zVXNTsJAEL73KSZcgKQlBgvRHowaMDEhDQeNB4JJLbttA7RkW4hCvBkOGg0Xj158AU9ePPoofRGc7Q8Uwo9GIbbNbmd3dr7vm9ludc3uae54fAAZ/@kZKBhgZmXhqFrJeU6T2FafsJx30yFu7lhzLb1i2cQ93C8Wd6hMBLV8oQgAutMgSjIAyIDD@EQOscvEA4LBoKn1NKYM/McP8Icj8O9fwX@4A26nzBT277f1dX5G6CfC70PR9aF@jIaqVzn/MaSE/QucqtXzs3VlLJC9wm6@WAhoTkoVF0uCyIy6mlSfeyurJWViBHUNBUsiZFZqhZUyYaXCbH1bIKG8jLRJnACoJgfthpFE2CbMiSo0qA261mqBvOAkSMRInAVoxh/NcCTC1OQbH9eIMDuuopmbWRoWLTIWgEZE5w4gjTGlZnLqMTzH@skE6g3mzVB@SCMw/mca6NI00GVqvzMRp4Em00Bn0oAW/gB4Mtym1elYtgF6tw@Wl3Y5NZSyhLKxnDLIIhgiD1ufwi6eLTltzbLLjDlMgfJ1h@geaYDdbV8Rhm6OB7qJC3GUCR
@Ven eh, that seems pretty readable
@dzaima oh it's actually that -chr doesn't work, the error is actually accurate (though not the pointer) ಠ___ಠ
in the process of reworking the scalar system (in the bitarr commit) i seem to have just accidentally removed Chr::swap :|
 
2:35 PM
TIOBot (0.0.6) logged in!
 
#tio alias view
 
@Adám
Command Aliases:
]help -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'help %args% -url'}(⎕NS⍬).(enableSALT⊣⎕CY'salt')
⋄ -> #TIO apl {0::⎕←⊃⎕DM⋄%args%⋄⍬⊤⍬}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
)tio -> #tio do apl-dyalog ⎕←'https://tio.run/##','\+' '='⎕R'@' ''base64 10↓¯8↓256|⊃⌽3(219⌶)¯128+256|128+(⎕UCS'apl-dyalog'),t,('UTF-8'⎕UCS'%args%'),t←255 255⊣'base64'⎕CY'dfns'
⍞← -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←%args%⋄⍬⊤⍬}⍬
f← -> #tio do apl-dyalog ⎕←'https://tio.run/##','\+' '='⎕R'@' ''base64 10↓¯8↓256|⊃⌽3(219⌶)¯128+256|128+∊{255,⍨'UTF-8'⎕UCS⍵}¨'apl-dyalog' '' '%args%' 'f←
 
@Adám fixed..
 
@dzaima If you evaluate from right to left, (⎕ f g h) cannot know at h evaluation time whether h needs to be called monadically or dyadically, as it depends on whether a constant or a function is entered at the prompt.
 
@dzaima oh the marked 'f' is displaying the argument that was attempted to be passed to -, which is actually what it's supposed to do. pointing to there is a bit wrong though, and, though the solution is simple, it'd mean adding a variable store before every function call
@Adám is no different from a variable so it'd make sense for it to work - both have the same interface for getting type, just has an unusual side-effect of asking the user
 
2:56 PM
hmm, if I can, should I?
 
@dzaima So (2⌽,↓)'abcdef' gives 'cdefabdef' and (-⌽,⊢)'abcdef' gives 'FEDCBAABCDEF'?
@dzaima Can what?
 
@Adám yeah, if dyadic was implemented
@Adám keep the exact source of trains
 
@dzaima OK, then some other function. Make sure to test it.
@dzaima Oh.
 
@Adám as expected, it works. seems that such simple things won't trick my parser nowadays
@dzaima yeah, no
 
3:12 PM
Did you know… that f∘B∘g is a valid (and potentially useful) derived function?
 
@Adám why wouldn't it be? kind of instinctively at first assumed that was gonna be A∘f∘B, but no :p
i remember a long long time ago being confused why 2∘+∘3 didn't immediately error :D
 
@dzaima I just never thought of it. You realise what it gives in terms of right?
 
@Adám yeah; there are many things we've probably never thought of, doesn't mean they're not clear & simple. just picking on "valid" seeming to be the more important thing in the message
 
3:49 PM
probably missed some things but ¯\_(ツ)_/¯
 
@dzaima Do you have the capability of defining more advanced primitives in terms of others?
 
@Adám sure, i can directly call the other built-ins. it'd give stupid errors and probably be a bit slower though
 
@dzaima Are you interested in APL definitions for e.g. ⍺?⍵ and ⍺⍸⍵?
 
@Adám i guess that's a solution for laziness
i'd probably want to have the binary search of though
 
Dyadic and are simple too.
 
3:57 PM
@Adám I'd like to see an APL definition for ⍺?⍵
 
my guess is it involves ⍋?x⍴0 and does fancy modification to it
 
Yeah, I think {⍺↑⍋?⍵⍴0} works, except for checking the arguments' validity.
 
That's quite clever
 
@Adám oh of course it doesn't have to be anything fancy:|
 
ngn
Dec 5 '17 at 15:01, by Adám
@ngn Marshall responds: Using floating-point roll rather than deal biases it ever so slightly towards keeping letters in the same order, since two letters in a word might get the same value. So while I certainly don't want to do battle with Nickolov in the realm of code golf, I'm not sure he can declare victory here. Then again, it can be fixed up with only two more characters, which leaves it one shorter than mine: ⊂⊃¨⍨∘(⍋?⍨∘≢+≢×+\)1,(' '∊⊢)⌺4
 
4:07 PM
@ngn there are more than ~2^52 floating point numbers between 0 and 1, i think the chance of collision is low enough for my little project
 
@ngn Point taken: {⎕CT←0 ⋄ ⍺↑⍋{?⍺⍴0}⍣{⍺≡∪⍺}⍨⍵}
@dzaima -⍤0⍳5 gives me an odd error.
 
@Adám f⍤A is still not implemented
 
@dzaima Ah, so is only atop?
 
@Adám yeah, currently
 
Oh, you don't have TAO :-(
 
4:17 PM
@Adám the algorithms mind of mine is screaming about and not both using the same sorting data
@Adám not supporting ⍴⍴⍵ ≠ 1?
 
@dzaima What? They do.
 
@Adám oh does dyalog optimize for that?
 
@dzaima Well, everything. E.g. ⍋⍳¨2 3
@dzaima Ah, now I understand what you mean. No, not yet, although such is planned.
 
:o well anyways, my apl definitely doesn't optimize that
 
@dzaima Which letters are valid in names?
 
4:28 PM
should add to that, it's pretty nifty
 
@dzaima Not ? No digits? Btw, some APLs allow ¯ too.
 
@Adám digits are allowed (though not as 1st char, so special), idk whether should be added; is a¯1 better interpreted as a single var or a ¯1?
 
@dzaima fwiw, Dyalog interprets a¯1 as a ¯1 but 2¯1 as 2¯ 1 (i.e. an error) :-(
 
@Adám 2¯ 1 o.O why though
 
@dzaima No idea:
⋄ parse←{2::8↓2⊃⎕DM ⋄ ⍎⍵} ⋄ parse '2¯1'
⋄ parse←{2::⎕←8↓2⊃⎕DM ⋄ ⍎⍵} ⋄ parse '2¯1'
 
4:36 PM
@Adám
 
:-(
⋄ parse←{2::8↓2⊃⎕DM ⋄ ⍎⍵} ⋄ ⎕←parse '2¯1'
 
@Adám
 
 
4 hours later…
8:37 PM
@dzaima ok javas Math.random only produces 48 bits of entropy, so if i math right (which i'm pretty sure i didn't but whatever), with 10 million items there's a 17% change of two being equal which could be counted as bad
 
8:52 PM
@Adám made the error more clear - now it's IncorrectArgsError: dyadic operator ⍤ can't be called monadically
oh hmm should i just remove the mention of "dyadic operator"? it's pretty useless there and just causes confusion
 
ngn
@dzaima is this for implementing ⍺?⍵?
 
@ngn not currently doing that, but that exactly is {⍵≢∪⍵}?x⍴0
@dzaima ok now it's just IncorrectArgsError: ⍤ can't be called monadically. doesn't convey the fact that f⍤A isn't implemented, but it's understandable
 
9:34 PM
@dzaima This one should be completely evenly distributed, plus it has been extended to multiple dimensions: {⍺⍴{⍵,i~←i⌷⍨?≢i}⍣(⍺{⍺⍺≤≢⍺})⍬⊣i←,⍳⍵}
 
@Adám have you seen martin-thoma.de/write-math/classify - that appears to be open source and mostly open license, although it does still depend on a backend and a lot of training data
( with the discussion and links in the /write-math/ parent url )
 
@TessellatingHeckler No, I hadn't, due to it being unavailable previously. I got it loading and working for me for a minute this time, but now it is gone again :-(
 

« first day (819 days earlier)      last day (25 days later) »