« first day (828 days earlier)      last day (1819 days later) » 

8:30 AM
Hi. A definition like proto←{⊃0⍴⍵} (the prototype of ⍵'s elements) implies that it is OK to pick from an empty vector. That caught me by surprise. I had expected an INDEX ERROR, I guess.
 
@TorstenGrust It is indeed not OK to pick (X⊃Y) from an empty vector, but it is OK to take the first (⊃Y) of an empty vector.
⎕←⊃⍬
 
@Adám
0
 
⎕←1⊃⍬
 
@Adám
INDEX ERROR
 
@Adám Right. Monadic is first, not pick at index 1. Learned something. Thank you.
 
 
6 hours later…
2:42 PM
Introducing: ⊆⌈ APLcart
6
 
@Adám the first column not being monospace upsets me way too much
 
Ven
A very TIO-esque design :)
 
@Ven well what matches is 1) gray color, and 2) darker foreground, and i think you'll find that to be the case a lot :p
 
Ven
@Adám Suggestion: debounce the search bar
(or throttle)
 
@Ven What does that mean?
@dzaima OK, I can fix that.
 
Ven
2:53 PM
@Adám Only treat search keydown inputs every 200-300ms, say.
 
@Ven Oh, that's part of DataTables
 
Ven
 
@Adám suggestion: focus the search bar when somethings typed with it not being in focus
 
Ven
(^except if a modifier key is pressed, or if that key is SPC or /)
 
@Ven would pageup/down & arrow keys fall under modifier keys?
 
Ven
2:58 PM
I use {shift-,}SPC instead of pg{up,down}
 
@Ven I don't either, but we wouldn't want to break others workflow. the little things you have to think about publishing a site..
 
Ven
can probably ignore non- A-Za-z0-9_,- and non-APL chars
 
@Ven defining a list of APL chars feels a bit hard, and gives another thing to update if more get added
 
Ven
Ok, ok. You're right.
 
@Ven Done.
@dzaima Fixed.
@dzaima I'm not sure how to do that. Feel free to PR. "APLcart" links to source.
 
3:05 PM
would it be possible to get away with checking just for space & that event.key is 1 character long? :P
 
is (1∧.=2 Strictly Increasing? missing a closing parenthesis?
 
@dzaima if so, this would be enough. also, for how important it is, i don't think the search bar should be that tiny & showed in the corner of the screen
 
Ven
I'd also like / to be ignored; it triggers search on firefox.
 
@TessellatingHeckler yeah? in what context?
 
Ven
@dzaima +1, I had to look for it.
I had done something similar for Jelly a while back.. It's out of date by now, but you can just go to the wiki, copy-paste the html code for the table, and it'll work anew.
 
3:13 PM
@TessellatingHeckler Hm, it has </ so I guess I need to escape that.
@Ven Right, but mine as a ton of additional info it searches. E.g. try searching for "3.14" or "comparison" or "mirror"
 
Ven
@Adám you're just searching a hidden text field (well, a json field that's not displayed) :P
 
@Ven yeah. The real work here wasn't the site (that took minutes) but putting together the giant table.
 
Ven
Yeah, I suppose you generated that somehow, or at least extracted it from some data set, considering the shape it is in the index.html
 
@Ven Hand-typed.
 
Ven
You didn't type it whole in the index.html file directly though, did you?
 
3:20 PM
@Ven No, the json was made using ⎕JSON⎕CSV on a file saved from Excel. But pretty much everything was hand-typed or copied-and-pasted into Excel by hand.
 
Ven
Right, extracted from excel is better already
 
I actually experimented with loading the tsv file directly from JS, but I keep getting XML (!) errors.
If someone knows how to do it, I'd be grateful for help.
 
Ven
Are you doing it from files:///?
 
@Ven No $.get
After loading, i just needs to be split on newlines, and then split each on tabs. Oh, and apparently it needs to escape < etc. like here.
 
Ven
@Adám no, no, I mean -- do you have a webserver, or is the URL bar in your local environment directly from your filesystem?
You can't really do AJaX on files:///
 
3:23 PM
@Ven Oh, that's why it didn't work locally. I'll try with a server.
 
@Ven Why is that? I was trying to patch stuffin.space so it would run locally, and there were a couple of small changes to get rid of PHP, but then I got stuck when it wouldn't make AJAX calls, and my Google searches got me to "because it's not allowed on file:/// URIs". But why isn't it?
 
Ven
@TessellatingHeckler "security reasons" is what's usually invoked
 
@Ven Oh, I guess if I loaded something from a web page, and that tried to access my local disk, I'd be annoyed. It was all coming from local disk, so security be darned in that case.
 
3:44 PM
@Adám the bitmap font of apl385 for low sizes (and really any bitmap font) are horrible imo. why do they even exist nowadays, or, at least, aren't disable-able easily?
 
4:06 PM
does chrome only load bitmap fonts from local fonts or what? at least it's relatively possible to remove them locally. i hate fonts.
 
4:22 PM
@dzaima Uh, i think it is purely a vector font. Screenshot? Compare to FF?
 
@Adám it is a vector font, but it's also got bitmaps for a couple sizes. zooming in, it's easy to see that one size isn't at all subpixel rendered and is completely pixel aligned, making it look horrible (and even more so for APL chars because the designs are different too)
 
@dzaima Can you try that with APL chars instead of The quick?
@dzaima Also, which rendering engine did that?
 
@Adám that was the default linux mint font viewer. gotta install the font back & restart chrome to have configurable text
, along with ⍲, imo are the worst
 
ngn
4:48 PM
@Adám very nice! you should make all dyalog docs searchable like that :)
 
@dzaima Odd, 333 doesn't have pixel fonts.
@ngn Working on it. I want the symbols to be links to their documentation pages, and I want to add drop-down filtering e.g. "operators", "primitives", "syntax". Feel free to contribute.
 
ngn
if i haven't mentioned it: devdocs.io is a generic doc viewer and free/open
 
@ngn Looked into it. They don't allow docs for proprietary software
@ngn Can you fix the escape < & etc issue for me? You did it in lb
 
ngn
@Adám what's the issue?
 
@ngn The big data array needs to be preprocessed to escape characters that mess up the table.
 
ngn
4:59 PM
@Adám it's trivial to escape those in js
 
yeah
 
@ngn I don't understand that.
D.util.ESC
 
ngn
in isolation:
$ node
> function esc(s) { return s.replace(/[<>&'"]/g, x => ESC[x]); }
> var ESC={ '<': '&lt;', '>': '&gt;', '&': '&amp;', "'": '&apos;', '"': '&quot;' }
> esc('a&b</c>')
'a&amp;b&lt;/c&gt;'
@Adám D.util.ESC is the constant dictionary from the line above the one i linked to
why do you need datatables? i suspect it would be faster if you iterate through the dom elements and set .hidden=1 to those that don't match
 
@ngn oic. I'll try to use that then when I get around to loading the csv from file. How do I split a string into an array of strings on line breaks and then split string into an array of strings on its tabs?
 
ngn
5:12 PM
@Adám .split(regex) :)
but hang on, why do you need esc()?
 
@ngn search <
 
ngn
dom elements have a .textContent property and you could set that to the unescaped text
 
@Adám more precisely, str.split('\n').map(c=>c.split('\t'))
 
ngn
@dzaima yeah, that :)
 
@dzaima ah, that's better. Thanks. Although probably '\r?\n' to be safe, no?
 
5:14 PM
@Adám idk, whatever your data is
 
@dzaima I can't really know.
 
ngn
@Adám /\r?\n/g to make it a regex. g is for "global", i.e. consider all matches (i think it's implied in split(), but anyway)
aaand why do you need a server... it's not a lot of data, it could be a single-page application
 
@ngn he doesn't need a server, it's just that you can't load extra files running from file:///
 
@ngn I want to keep the data as a separate tsv file for easy editing.
 
ngn
@dzaima well, pre-convert them to js
@Adám makes sense while you're developing this, but not worth slowing it down when it's actually used
 
5:19 PM
@ngn that requires preprocessing though, and you need to remember to do it before every push, which imo is more of a hassle than running a simple local webserver
@ngn loading the file shouldn't be much of a slowdown at all i'd think
 
@ngn I want to be able to accept PRs and have the site just update from that.
 
@Adám Bookmarked 👍🏼. Awesome.
 
@ngn probably more efficient to have data in a pretty, domain-specific format rather than having the js tokenizer & parser having to go trough the 1000s of characters (both of which should take pretty much 0 time anyways)
 
ngn
@Adám well, if that's more important than requiring a server to view the docs, so be it
@dzaima oh, don't underestimate the js parser :)
browser vendors optimize the hell out of js parsing
 
@ngn i said, 0 time anyways. but splitting must be faster either way, no?
 
ngn
5:23 PM
@dzaima yeah, it should be
 
@ngn well it's either webserver once (or not at all), or requiring PRers to run the converter all the time constantly
 
ngn
@dzaima shouldn't docs be viewed more often than they're edited :)
 
I already have a webserver, so that's a non-issue.
 
@ngn well the docs are already available on github pages, you don't need to run a server
unless you mean offline
 
ngn
ok, performance reasons aside, i think it would be very nice to save a single html file and be able to view it offline. maybe i'm dreaming for too much
 
5:27 PM
We could keep the data as tsv in a multiline JS string, but then it is hard to use a table edtor for it.
 
@ngn well you can make a preprocessor PR/branch if you want separate from the live loader
 
ngn
@Adám fyi: ~5y ago i wanted to integrate the docs into ride, so searching and displaying them is instant
 
Ven
Ooh, coffee..
 
ngn
@Ven there wasn't ecmascript6 at the time, and i like x => y (or x -> y) much more than function(x){return y} :)
 
ngn
5:58 PM
@Adám it skips chars if i type too fast in the search field
 
@ngn The search fails or the character doesn't show up in the field?
 
ngn
@Adám it doesn't show up in the field
i'm using firefox
 
@ngn I'm using FF on a laptop with soft shallow keys, so I can run my fingers over the keyboard from A-L in a fraction of a second. All show up.
 
ngn
6:23 PM
@Adám it's a datatables problem. i can repro it reliably, including here - press and quickly release a pair of keys almost at the same time
in a longer string the omitted char is usually the second one
 
@ngn :-( Not much I can do then, but I thought that edit field was a native html one.
Btw, another thing I want to do is add that green (+) from the Responsive plugin so one can expand primitives with their tooltip.
 
 
3 hours later…
Ven
9:17 PM
@ngn don’t get me wrong — I’m still a member of the coffee team :)
 

« first day (828 days earlier)      last day (1819 days later) »