« first day (1644 days earlier)      last day (993 days later) » 

12:00 AM
How do I enter a RIDE session? What host/port do I enter?
I can't find mapl right now. Doesn't seem to be where it should
 
@AviFS The default is localhost:4502
 
It doesn't connect, though
I'm trying to start it up from npm after building it from GH
I just found mapl, but not where the help thing says it should be:
/Applications/Dyalog-18.0.app/Contents/Resources/Dyalog/mapl
 
@AviFS Which help is that?
 
I wonder if that's worth adding somewhere
 
@AviFS So, you started the interpreter separately, and want to start RIDE separately and connect?
 
12:07 AM
on MacOS:
$ RIDE_INIT="SERVE:*:4502" /Dyalog/
Dyalog-16.0.app/Contents/Resources/Dyalog/mapl
Actually, that's embarrassingly similar. I think it must be a typo.
The first Dyalog should be Applications
Aside from that, it was actually right
(And the version number, of course)
@Adám I think so? I'm trying to follow the instructions to build from source
 
@AviFS And did you start it with RIDE_INIT= as it says there?
 
No, I didn't look to see where to put the RIDE_INIT, I was just trying to do it from the dialog box
I thought once I started mapl I could just do localhost + 4502
 
@AviFS Logged as issue 19236
@AviFS That goes on the commandline when starting the interpreter.
 
Where did you log the issue?
 
In our documentation issue system.
 
12:16 AM
Ah, not publicly open?
export $RIDE_INIT="CONNECT: jay-pc.dyalog.bramley:4502" /Applications/Dyalog-18.0.app/Contents/Resources/Dyalog/mapl
zsh: CONNECT not found
Well actually, I forgot to change the name. But is that what you mean? I've never seen two things in a bash var
 
i don't think you don't need the $ before RIDE_INIT
 
And you definitely don't want to connect to Jay's PC at the Dyalog office.
 
Haha, true. But it still doesn't work with either piece of feedback
 
RIDE_INIT=SERVE:*:4502 /Applications/Dyalog-18.0.app/Contents/Resources/Dyalog/mapl
Try ^
 
^^ yeah, you don't need export if you're executing a thing immediately
 
12:19 AM
Then start RIDE with RIDE_CONNECT=localhost:4502
 
@Adám Hmm, this starts it running in mapl automatically
Oh... I think the mapl part is just to run it
 
?
 
@AviFS yeah, a=b before a command just assigns an env var before executing it
 
I see, thanks! In this case I want to execute the electron app though
 
@AviFS well, first you want to launch dyalog in the terminal, and connect in RIDE separately later
 
12:23 AM
ah, sorry guys
The Dyalog that you download pre-built for mac takes care of all of this for you!
 
@dzaima (that's assuming that's what you want to do)
 
@AviFS We really should have that option for Linux too, imo.
 
Hmm, still no
So I opened tmux. First I ran RIDE_INIT=SERVE:*:4502 /Applications/Dyalog-18.0.app/Contents/Resources/Dyalog/mapl.
 
@Adám ?
 
With that running, I opened a new tab and ran RIDE_CONNECT=localhost:4502
That doesn't start ride automatically though. So I then ran npm start
The window is still prepopulated with what I ran last time
 
12:25 AM
@dzaima An option (recommended!) to download and install everything together so new Linux users don't end up in the TTY interface.
 
Oh wait
My bad...
 
@Adám isn't that what already happens?
 
It did have the same config
But this time connect worked
Thanks @all!!
 
@dzaima I don't think so. I think the only Linux downloads from (my.)dyalog.com are RIDE-free.
 
Also, I've been meaning to ask:
Is there any way to keep all lines syntax highlighted in repl, even after you've run them?
Woah, wait, who here knew that ride has a minimap?!
 
12:28 AM
@AviFS Not as far as I can tell, though the Windows IDE does allow that. I suggest you log an issue to get it in RIDE too.
@AviFS ○/
 
@Adám How many more secrets are you keeping from us :P
@Adám Will do!
Thanks again all for helping me start this up! Will see if I can do the themes thing now
 
@AviFS RIDE includes the command palette you see in e.g. VSCode.
 
Which command palette, Adám?
 
@Adám huh.
 
12:33 AM
@dzaima Am I mistaken?
 
@Adám no, it seems that's correct. So I just manually installed RIDE and have no memory of it i guess
 
Right, but when people go to download from the website, nothing tells them about RIDE :-(
 
oh right, I installed RIDE back when my.dyalog.com was a thing you had to use
 
1:34 AM
 
 
2 hours later…
3:05 AM
@Adám Wait, it might be worth adding a comment. It's not quite that simple. That was my path for the MacOS pre-built RIDE I downloaded. But when I built it from source, I got it at this path:
~/Library/Application Support/Ride-4.4
Which is pretty darn different, except for the Application Support piece
The important thing, I think, is to give clear instructions for pulling up the console -- F12 for linux and Fn-F12 for Mac. And then give the command they should copy/paste that'll spit out the path
The one I'm using right now is nodeRequire('electron').remote.app.getPath('userData'), but @dzaima, I remember you had a shorter one!
 
 
3 hours later…
6:09 AM
Do I still have your okay to say you've approved the idea?
The only thing is I don't know how to add tests for it, but it looks pretty safe to me & the test-suite already doesn't seem to be worrying about prefs. There were no other try/catch statements in that file, and only one in the file that finds and parses pref.json. Whereas what I added uses 2 of them. I'm assuming that's a good thing...
 
@AviFS Well, I'll open an issue to add a proper interface. Based on your PR, it should be rather trivial to do.
 
Ah, the interface I won't even pretend to do!
But it's much more friendly already. It'd be nice to make an article on APLwiki about themes and installing!
Does the style look alright though? What about tests?
I guess... I could just wrap the whole piece in a big try/catch and then call it stable :P
That would mean that worst-case scenario, it just doesn't add the themes from themes/dir, but it'd still add all the built-ins and prefs.json ones as usual.
 
@Adám Nice, I just saw that. That was super fast!
Actually, given that it'd be great to have this merged at all costs, I don't think what I suggested is silly at all. I added the idea as a comment
 
6:30 AM
@AviFS Give me a few minutes. I think we can make this work properly.
 
Me first! I just had another idea!
No variables outside the scope get modified unless it runs successfully.
I've never coded at this level of 'safety.' What do people think of that style for this: is it silly... great?
@Adám What are you working on?
 
@AviFS I just added this button:
<button id="col_exp" onclick="x=D.el.dialog.showOpenDialogSync(D.elw,{title:'Openfile',filters:[{extensions:['json']}],buttonLabel:'Import',properties:['openFile'],})" open=""><u>E</u>xport</button>
 
Oh nice!
 
Safety? Pish, I once made a webapp where error messages were displayed unsanitized through a ?err= query.
 
Will that just add a new file to themes/?
@Ausername Yup, that's me too! I'm betraying our kind.
 
6:44 AM
@AviFS Now, instead of just assigning to x, it should use your code to extract the current theme and put it in a file with the name x.
Might want to specify the default save folder to be somewhere in the user's home or Documents.
 
@Adám Not following, mind saying differently?
@Adám You mean instead of {path}/themes/?
(Where path is the path in {path}/prefs.json)
 
@AviFS Rather than adding a directory to the install folder (where users really shouldn't mess around), the GUI should simply allow you to export to and import from any location of your choosing.
 
I did think about allowing the user to specify the path to themes/ in prefs.json, but decided against it!
 
Specify what?
 
If you could choose where to have it in the GUI though, that could def be worthwhile!
@Adám Now edited
 
6:50 AM
No, you're not getting me here.
 
Oh, maybe I'm not!
Again?
 
I am against the idea of adding a /themes/ folder.
 
Uh oh, so where would they be stored?
 
They wouldn't.
 
Would they just be added into prefs.json?
 
6:52 AM
Yes.
And exported into transfer files.
 
I thought the point was not to do that, though
 
But transfer files are never used directly.
However, you can import transfer files into prefs.json
 
I don't know what transfer files are
 
No wonder! They don't exist yet.
 
Oh, haha, alright
But then, why this PR?
 
6:53 AM
Dunno. Not my idea.
 
I asked about it earlier, remember?
 
Ah yes, it was your idea!
 
Right, but I thought you were all over me PRing it, no?
I guess I misunderstood.
So PR=bad?
 
No, PRs are good.
I even stated that the RIDE project does accept PRs.
I just personally don't like your solution.
 
@Adám I thought you'd been talking about the particular idea when you said that, though. Welp
 
6:56 AM
Communication is hard.
 
I do think it's a useful idea, though. It's much more convenient to add files to a directory than worry about a GUI
@Adám haha, tell me about it
Also, another idea with having each one in a file was to be that you could have them in the decoded form
> // Colour schemes have two representations:
// in memory (easier to manipulate) in prefs.json (more compact)
If each one had it's own file, you could use the 'in memory' representation or the prefs.json one, with nearly no footprint
 
It seems dangerous to me to be able to have current settings that are not reflected in prefs.json
 
Not settings, just additional color themes
Also, I did consider adding each one into prefs.json
 
If something goes wrong, and people press Shift+F1 to copy all their settings to the devs, their current colours would be copied.
 
Would you prefer I did that?
It's super easy to add them into prefs.json as they're parsed
 
7:00 AM
I would prefer a proper design rather than rushing things.
 
I don't personally feel like it's rushing things, but we can wait
I thought we were just trying to make it more convenient & less error-prone
And a themes/ dir is what lots of editors use
 
@AviFS You just did this whole thing overnight!
 
But here's the structure, in case it isn't clear:
themes/
  dracula.json
  nord.json
  red-moon.json
 
@AviFS Now, it would probably be good to keep schemes in separate files, but that's not how RIDE currently works. A hybrid approach is messy.
 
Where dracula.json is:
{
  "name": "Dracula",
  "theme": "dark",
  "styles": "asgn=fg:#50fa7b com=fg:#6272a4 diam=fg:#ff79c6 err=fg:#ff5555,bgo:1,U fn=fg:#8be9fd idm=U kw=fg:#ff79c6 lnum=bgo:0,fg:6272a4 mod=bgo:0.5,bg:#44475a mtch=bgo:0.5,fg:#f8f8f2,bg:#44475a norm=bg:#282a36,bgo:1,fg:f8f8f2 num=fg:#bd93f9 op1=fg:#50fa7b,fgo:1 op2=fg:#f1fa8c quad=fg:#ffb86c sel=bg:#6bb2ff,bgo:0.5 semi=fg:#50fa7b sqbr=fg:#50fa7b srch=bg:#bd93f9,bgo:0.5 str=fg:#f1fa8c tc=bg:#44475a,bgo:1 tcpe=bg:#44475a,bgo:1 zld=fg:#bd93f9 scmd=fg:#ff79c6 ucmd=fg:#ff79c6,B vtt=bg:#44475a,bgo:1 ca=bg:#44475a,bgo:1,fg:#ff5555 cm=bg:#282a36,bgo:1,fg:
@Adám Which part is hybrid?
You mean to have preferences stored in multiple places?
 
7:03 AM
yes.
So, slow down and do it properly.
 
I don't see a good way around that, personally. I don't think preferences & themes belong in the same place. Esp since I don't think users should be messing with prefs.json themselves-- it's too risky. So anything you want users to add themselves manually should be separate imo.
 
Agreed.
 
Plus, if we want themes in their own files, as you said, then having themes and prefs.json separate is inevitable
 
Maybe it is OK to import all validated themes from /themes/ into prefs.json at startup time.
 
That's what the PR does!
 
7:07 AM
But what do you do if prefs.json already contains a theme of that name?
What happens if you have multiple files in /themes/ that define the same theme name?
 
It adds duplicate names, good point. That should be fixed.
 
Should the folder be called /themes/ or /schemes/?
 
Is there a better way to get this feedback without submitting a PR?
I'm not saying it's ready, I've just never submitted to a professional project and not sure what the stages for feedback are
I figured I'd do a PR to see the feedback and adjust it
 
The very first thing is to slow down.
 
Is there a better way to go about it?
 
7:09 AM
This isn't a mere bugfix, it is a major project.
@AviFS Yes, GitHub discussions. I'll enable that.
@AviFS Have a look at github.com/Dyalog/ride/discussions and see if you are allowed to start one about this.
 
@Adám I get that we misunderstood each other, but please bear in mind: I understood that you were saying I should go ahead with it right away and submit a PR and that 'Of course' you'd accept it. That it was 'first-priority' and that you thought I should do it before continuing on the aspects of my project that I was working on.
If I misunderstood in my naivety, it's fine, I've learned for next time. I just wish you'd stop telling me to slow down, please.
 
@AviFS Who am I to accept PRs on RIDE‽
@AviFS OK, don't slow down then. ;-)
 
Haha, thanks. I just hope it's clear that I really don't mean to pressure/rush anything. I was just under the wrong impression that this would be useful and appreciated right here & right now
And that your advice was to halt the current project until this was taken care of, before then adding more themes..
 
I think it would be useful.
I think it would be appreciated.
 
@Adám Of course! Edited!
 
7:14 AM
I think it should be done properly.
@AviFS I think the correct approach is figure out the architecture before building, but if you'd rather do it a different way, go ahead.
 
For RIDE I'll totally following your guys' advice, of course. But I think I disagree on the apl-themes front
For now, it's just a theme showcase that should make installing themes a tiny bit easier
 
@AviFS I don't know what you mean.
 
Maybe I misunderstood again, then? I really don't know!
 
@AviFS Ugh, I still don't know the connection between the two.
 
But speaking of apl-themes, do you have any other themes in your prefs.json?
If you send it to me, I can convert them and add them!
 
7:18 AM
I don't have any themes at all. What is a theme?
 
arghhhhh
scheme?
 
Color scheme I guess
 
Wait, @Bubbler! Do you have any?
 
@AviFS Yes, RIDE has built-in colour schemes.
 
If you guys share the custom ones you use, I'll add them under your names
 
7:20 AM
I just use the default color scheme (for any editor I use)
 
Like dzaima's
@Bubbler -←1
@Adám Which colourScheme do you use :P
 
@AviFS Nord, but I avoid RIDE as much as possible.
 
Darn, it's a bummer that has a name already!
Any custom tweaks on the Nord you use?
Of course, you're the one that made it so maybe not
 
I didn't really make it.
 
Oh?
I mean not the palette, but the RIDE thing I thought
 
7:22 AM
So, step one (imo, feel free to disagree) is getting the nomenclature right.
@AviFS Right, if you look carefully, you might notice that the three schemes I added are actual well-specified colour schemes, not palettes.
 
Right, that's why I mean that you made the scheme!
 
And that's why I'm telling you that I didn't.
 
The palette was made, and you made it into a scheme...
Okay, we def have to figure out the nomenclature
Agreed!
 
If I had taken a palette and made a scheme from it, then you could claim that I had made the scheme.
However, I didn't.
 
Ah, so who?
 
7:25 AM
But that doesn't really matter.
OK, so a scheme has a name and is a set of styles (one rgba value for each syntactic elements) plus a theme (light/dark) setting, right?
RIDE 4.4 comes with 7 built-in schemes.
 
7:45 AM
@AviFS Have a look at this and feel free to continue the discussion.
158 messages moved from The Nineteenth Byte
163 messages moved from The Nineteenth Byte
 
 
14 hours later…
9:39 PM
aw, it doesn't work on TIO? so I can't try it
annoying
 
@rak1507 I have J installed.
 
I can use a different online vm (or just install it locally I suppose) but that's more effort than just TIO annoyingly
 
Right, and the emscripten version is out of date too :-(
 
10:09 PM
is there a way to get the number of functions in a train? (other than manual counting)
 
10:33 PM
@rak1507 anywhere in the train, or at the top level, or at odd positions…?
Do derived functions count?
 
@Adám lets say (f g h i⍥j) would be 4 (so count each function but derived ones only count as one)
stencil is sooooo slow for anything that isn't special code it sucks bc something would be really nice with it but I have to use nwise reduction instead
 
@rak1507 How about (f 1 g h)?
 
3, 1 is not a function last time I checked :P
 
@rak1507 Did you see Roger's blog posts about that?
 
@Adám yeah, stencell
and the things that are done by special code
 
10:36 PM
@rak1507 In principle, you can compute it based on 183⌶ but it will take a little work. Nice problem.
@rak1507 Why is (f g h i j) not 3?
 
@Adám if f g h i and j are all functions, there are 5 in the train
 
No, the train has only 3 functions, the rightmost one is derived.
 
hmm, true
in that case count each individual function in a derived function
 
How many functions are there in the train (1⍨2⍨3⍨) ?
 
I'd say 3
 
10:41 PM
How many are there in ⊢⍤/ ?
 
ideally a derived function using an operator should be 1 I'd say
but 2 would be alright as well
 
How many are there in /∘⊢?
 
1 also
 
@rak1507 so you want to count the number of tines of forks/atops recursively until non-fork/atop (excluding array tines)?
 
yeah
 
10:45 PM
How many are there in /~3⍨ ?
 
3
 
It'll be hard to determine when slashes are functions.
 
good point
 
@Adám 183⌶ just gives it a 3, no?
 
No.
 
10:51 PM
@Adám ?
 
     f←//
     183⌶'f'
3 4
Maybe it is good enough to determine when it is what.
 
@Adám well, that's what you want - it tells you which ones are operators, and which are functions
slashes just aren't special at all for 183⌶
 
Does ≢⍤{1≥|≡⍵:⍵~2 ⋄ (¯1↓⍵),∇⊃⌽⍵}183⌶ do the job?
No, but almost.
≢⍤{4≡2⊃⍵:3 ⋄ 1≥|≡⍵:⍵~2 ⋄ (¯1↓⍵),∇⊃⌽⍵} maybe?
:-( gives 5 for ÷+-(××)
New candidate: ≢⍤{4≡⊃1↓⍵:3 ⋄ (1=≡⍵)∧2=≢⍵:3 ⋄ 1≥|≡⍵:⍵~2 ⋄ (¯1↓⍵),∇⊃⌽⍵}183⌶
 
@rak1507 Currently in order to try the F:: family, you need a local installation of J902 and install dev/fold package from the package manager manually
which is very weird given that it looks like a primitive, but it somehow calls out for the extra package
 
Henry Rich mentioned that the family is implemented in J.
 
11:06 PM
Yeah, looks like it is. Just that this error threw me off when I first tried:
   n=:5#1
   1]F:.{{([echo)x,y}}n
not found: c:/program files/j902/addons/dev/fold/foldr.ijs
|nonce error
 
Ugh, fails on ++
This might make a good challenge for main: Given the result of 183⌶, return how many functions the function consists of.
Oh no, I found a bug in 183⌶
 
11:37 PM
If anyone knows anyone using APLCloud.com, feel free to reply to this tweet: twitter.com/hawkinsw/status/1420145414062448640?s=20
 
@code_report I know of someone: Jerry Brennan.
 

« first day (1644 days earlier)      last day (993 days later) »