« first day (2258 days earlier)      last day (383 days later) » 

6:02 AM
@Adám ⎕FIXing scripted namespaces with definitions like ##.foo←{...} works for one-line dfns but generates a syntax error for multiline dfns.
The reason for doing ##.f←... is because I am using a Linked namespace and have a bunch of small utility functions that I don't want to scatter about in separate files.
⎕fix':Namespace WorksJustFine' '##.f←{_←123 ⋄ 456}' ':EndNamespace'
⎕fix':Namespace FailsWithSyntaxError' '##.f←{_←123' '456}' ':EndNamespace'
 
 
7 hours later…
12:50 PM
@B.Wilson It is 15:00 UTC.
@RubenVerg The left argument consists of how many partitions to begin at each position.
@B.Wilson That's because of quirks in how ⎕FIX deals with scripts. I throws multi-line definitions at ⎕FX and one-liners at . How about using a namespace script that ends with '#'⎕NS⎕THIS?
 
 
2 hours later…
3:36 PM
Aw darn. This apl.news article link is 404ing: apl.news/Fixing%20APL%E2%80%99s%20Trigonometric%20Notation.
 
@Adám I'm confused. This past one definitely started at 23:00 JST (UTC+09:00).
 
@B.Wilson Ow, did I mess up adjusting for the summer time change‽
Seems I did. I should have started at 17:00 my time, not 16:00. Sorry about that.
@rabbitgrowth My bad ↑
 
@Adám Of course you immediately come up with a clean workaround. :D
I'm not sure I follow, however. How does that relate to assigning to some name of a different reference?
 
@B.Wilson It doesn't. I just copies from the namespace to the root.
 
3:53 PM
@Adám Would you mind spelling it out a bit for me? My mushy brain matter is only following mushily. Are you saying that ⎕FIX is failing with a syntax error for the same reason that ⎕fx'##.f←{_←1' '2'} returns 0?
 
Yes.
But you can (ab)use the fact that ⎕FIX just throws one-liners to to have it run any expression that returns a result…
⎕fix':Namespace FailsWithSyntaxError' 'f←{_←123' '456}' '''#''⎕NS⎕THIS' ':EndNamespace'
This will, after populating the namespace (without errors!), execute '''#''⎕NS⎕THIS' with the effect of copying the contents, including f, to #
 
4:22 PM
@Adám Okay. And the reason that ##.f←{...} fails is because, as the docs say, it only creates "a function or operator in the workspace or current namespace"?
 
yes. the fact that ##.f← is a quirk of the implementation.
 
Oops. The "it" in "it only creates" above refers to ⎕FX, just in case it wasn't clear.
Anyway, thanks. I'll mentally file this trivia away as a minor footgun.
 
@B.Wilson btw, I believe you can create a file with multiple definitions in it.
 
@Adám invalid file content
 
huh, what's in the file?
 
4:36 PM
Naively shoving f←{'abc'} and g←{'def'} on separate lines in an aplf is all.
 
(shouldn't really be .aplf but also shouldn't matter)
 
Hrm. So aplf is intended for single functions? And for this case apls would be closer to the intended usage?
 
yes, but ⎕fix doesn't care.
Oh, we've hit issue 18732.
 
Oh, to be clear, the above error is with Link. Just tried again with ⎕FIX and got a tiny bit more useful error: error AC0040: could not fix function
@Adám Ooh. Fun. What is that one?
 
⎕FIX fails on multiple items if first item is a dfn
Workaround: insert a comment line at the top.
 
4:46 PM
line(1,0) : error AC0062: statement not expected at this location "f←{'hi'}"
⍝ Workaround for issue 18732
f←{'hi'}
g←{'bye'}
 
you prob. forgot 2 as left arg
 
Ah. Facepalm.
 
I mean, the design is awkward.
 
True. Now that you mention it, I do notice that ⎕FIX is a bit fiddly.
 
Make ⎕FIX great again: ∆FIX←{(1=≡,⍵)∧'file://'≢7↑⍵:∇'file://',⍵ ⋄ 0::⎕FIX⍵ ⋄ 2⎕FIX⍵}
 
4:53 PM
TREMENDOUS!
 
Maybe I should amend to insert the ?
 
Definitely!
 
Ah, but hard to do for files.
 
The 0:: guard there makes me slightly nervous. Maybe better to directly catch 11?
I guess ENOENT results in 22 either way, so it might not make a difference.
Ah! And it is now 2am here. You are good at sucking me in :D I must succumb to the wiles of somnolence for now.
 
5:51 PM
@B.Wilson Fixed
You can make pull requests/issues here: github.com/finooiigee/Jot-Dot-Times or ping me in the future. Thanks
 
@finooiigee We need an APL function that takes the path to index.html as left arg and a vector of values for a new article as right arg, and updates the file.
 
Can do
 
6:14 PM
It would be nice if there was a library for turning HTML into a namespace tree. Then I could do something like
(doc.byId '#article').((';'(≠⊆⊢)class),a.(href textContent),','(≠⊆⊢)span.textContent)
To get a vector of vectors listing: Topic | Url | Title | Date | Author
 
@finooiigee ⎕XML handles XHTML.
 
Good to know
ns.(...) is one of my favourite features of Dyalog APL
 
other langs could just add that (looking at you, js)
 
Simple but elegant generalisations is our namesake
 
 
1 hour later…
7:19 PM
@finooiigee In addition, there is it.uc3m.es/jaf/html2xhtml
 
8:07 PM
Oh, sweet. I'll give it a go.
Has anyone tried making .AppImages on Linux with the dyalog runtime? I want to try it, but I'm fairly busy at the moment.
 

« first day (2258 days earlier)      last day (383 days later) »