« first day (641 days earlier)      last day (2014 days later) » 

12:16 AM
@dzaima I installed java jre/jdk I ran the convert.py and I can't seem to get it running. I you have any suggestions, I'm all ears. I hope I can get it running.
 
 
4 hours later…
4:30 AM
@Adám No. I looked at it now. Thanks. This page dfns.dyalog.com/n_kbmac.htm is helpful but I use a Turkish keyboard and uptick is Option+Shift+G. That makes a little difficult. Maybe I need to map uptick to another key. Or switch to Windows. But the screen of my Mac is much better
 
 
3 hours later…
7:42 AM
@zeynel Tbf, it does say (if the country you require is not shown, then please e-mail us). Btw, in RIDE it is very easy to select prefix key, but you want it for other applications, right?
 
I just emailed them.
 
@zeynel Great, but be aware that this week is our user meeting, so almost everyone is going to be very busy. This may also explain the delay in response to your forum request.
 
7:59 AM
@nathanrogers oh windows. The whole convert.py thing wasn't made for it..
 
@Adám Good. No hurry. It all works fine now. It would be easier in the long run if I can get to uptick with single keystroke. But I'm confused about RIDE. Here docs.dyalog.com/17.0/RIDE%20User%20Guide.pdf it says RIDE is installed with Dyalog but I only see the Dyalog icon in the applications folder.
 
@zeynel Yes, it is a bit confusing. It is because on macOS, RIDE is the default interface, and so its icon is just labelled Dyalog. A normal user may not even be aware that RIDE is a separate thing.
 
8:32 AM
hey, they told me to ask my question about J to here, so i am asking here. my question is:

why can we not define a function/verb with more than 2 arguments in J (or can we and i dont know?)
 
@gnu-nobody Firstly, you could use an adverb for 3 "arguments" or a conjunction for 4 arguments, but the normal way is to use a list as right argument, with one element per "argument.
 
hmm
thanks
even though i dont know about conjunctions yet
 
@nathanrogers the only place with "idea" is a comment in the example. Unless you've modified that, I have no idea why is that showing up. It seems that it successfully compiled though?
Actually, maybe it's unicodes fault & it's failing to understand as ? ._.
I'm doing new String(loadBytes(...)) so that's probably what's happening ಠ_ಠ
@nathanrogers Pushed some changes. It should work now. I hope.
 
8:53 AM
@Adám Makes sense now. So I was using RIDE without knowing it. Unrelated, but do you know if the code in the editor can be printed? Now I copy it and paste it on google docs and print it from there.
 
@gnu-nobody This is a primitive that uses three arguments, which naturally makes it an adverb.
 
ngn
@dzaima i'm reading your code :) Value.optimize() - this is known as squeeze() in apl-ish slang
 
You can write explicit adverbs or conjunctions that works just like a function with three or four arguments, though it's not a usual way to program in J
 
@ngn what should the quad for calling it be?
 
ngn
@dzaima there's no quad for it, it should be transparent for the user
 
9:06 AM
@ngn I don't want to be making heuristics for when to automatically call it though
(at least not yet)
 
ngn
some operations require squeezing the result - for instance drop: 1↓2 'a' 'b'
others don't, for instance , (catenate)
 
@ngn calling it after every call of that feels very inefficient though
 
ngn
@dzaima it's not heuristics - it's definite and known in advance
 
I suppose it should be called after ¨ too? i.e. {1+⍵}¨ 1 2 3
 
ngn
@dzaima most of the time it's a no-op. if the array is already simple, like DoubleArr or ChrArr, "squeeze" doesn't need to do anything
@dzaima yes
the inverse operation could be useful too - "blow up" or "fan out"
 
9:11 AM
I guess that's an easy enough of an addition, but I still want a manual way to call it
@ngn that's pretty much my values()
 
ngn
that's when you don't want to bother special-casing something for chars, nums, etc - you just handle everything as Arr-s (or Value-s, I still don't understand why they must be separate classes...)
@dzaima ah, right
@dzaima except the result from .values() is Value[], not a single fanned-out Arr whose elements are separate scalars
 
@ngn because creating that instance of Arr would be pointless
 
ngn
@dzaima it's not pointless if it reduces the amount of cases your code needs to handle
 
@ngn it needs to handle one: Value[]
 
ngn
a good example would be ¨
 
9:15 AM
also, with my current array setup I could have , & just wrap the input array in a class & have a fancy get function :D
@ngn that currently just uses .get(int)
 
ngn
@dzaima i did something similar with ngn/apl initially, but later gave up on it
and similar were constant time operations
 
@dzaima really almost every built-in could be just a wrapper class
@ngn the thing is I've got all the required infrastructure & implementing that would only mean making changes to the builtin & creating the class, everything else happens automatically
 
ngn
@dzaima it's like lazy evaluation - you're stealing performance from the future :)
 
@ngn yep. Except I can bundle the different reverses together in one operation
 
ngn
any operation performed later on the result would have to go through several layers of .get()
 
9:23 AM
@ngn well true, but if it were just the reversing functions I could unwrap them & join the transforming math together
@ngn Arr is specifically for things that are not simple scalars, and Primitive is specifically for simple scalars. Value is for both of those, i.e. anything that can be stored in arrays
of course I could join the two together but I like the OOP difference from simple scalars & everything else
 
@zeynel There is no such functionality built-in, but by all means, suggest it!
 
ngn
@dzaima you have a point about transformations cancelling each other out, that could be useful sometimes
 
9:39 AM
@dzaima do you know why I get a G.pde:9:0:9:0: The function asString() does not exist. error when running the sketch?
 
@Cowsquack you haven't (re)run compile.py?
 
I ran compile.py with the new pulls from the speed branch
 
asString definitely exists now
 
huh
 
ngn
wrong branch? git checkout speed
 
9:43 AM
already on speed
 
@ngn asString should only be in speed ever
yeah, I just redownloaded the branch & it runs fine
 
I updated my local processing version and it persists
 
no idea. Try deleteing the jar in code/ & rerun?
 
works now :D
 
@ngn that is, if I even have code for , that specializes for the typed arrays
 
ngn
9:56 AM
@dzaima yeah... i hope one day you will :)
 
@ngn well, I hate ,
 
ngn
@dzaima why?
 
@ngn so annoying with all the dimensions & splicing
 
ngn
@dzaima it could be implemented with the three-loop trick i told you about
 
@ngn I don't really understand that. I mean I understand why & how it works but I can't write any code for it
 
ngn
10:01 AM
@dzaima shall i give it a try in your code?
 
@ngn I mean, go ahead, I wont stop you :)
 
ngn
@dzaima it looks like it already works, at least for matrices
 
@ngn well yeah, it works, but I still hate it :p
 
ngn
@dzaima ah... :)
 
quick question, how do I noStroke()?
 
10:05 AM
@Cowsquack good question. I thought I had that implemented somewhere
what should it be - G.stroke←⍬ maybe?
 
that's a nice solution
and similarly for fill if that's not implemented yet
 
@Cowsquack oh, that's what I had implemented :)
 
ngn
> 9,2 3⍴⍳6
9 1 2 3
> 9⍪2 3⍴⍳6
RankError: Ranks for ⍪ must be equal
9⍪2 3⍴⍳6
 ^
 
pushed
@ngn yeah, that's still on the (non-existing) todo list
is also a pretty recent addition
and (1 2 3⍴0),1⍴1 is fun
 
ngn
@dzaima so you have two separate implementations for , and and no generic ,[k]?
 
10:12 AM
@ngn exactly..
was pretty simple & efficient to implement since all it requires is joining the two Value[]s together & could utilize System.arraycopy
 
ngn
@dzaima except when one of them is scalar
 
@ngn well I didn't really need that, the only problem was the matching shape checker
1⍪2 is a pretty strange thing IMO
 
ngn
@dzaima it is - scalars have no axes, so there's no "first" axis :)
same goes for 1,2
 
huh, my , doesn't special-case that
 
re g.stroke←⍬, I get a null pointer exception
it happens if g.stroke←⍬ is before draw, but not inside it
huh
 
10:24 AM
@Cowsquack that's normal. The APL is executed in void settings()
P5.G is just a placeholder then
probably should make things then error correctly
 
makes sense, moved it into setup then
 
:D
 
that was fun
 
11:08 AM
@Cowsquack I couldn't not optimize that a bit
actually another second off since ∘. isn't optimized for DoubleArr
 
how does img work?
 
@Cowsquack P5.img takes a matrix and converts that to PImage, setting its pixels to the colors. G.img just draws the image
 
and the ⎕opt?
 
@Cowsquack that forces squeezing of the datatype. i.e. if the array was assumed to have multiple types but actually has only doubles, it can be converted to DoubleArr
really that shouldn't be needed there (and wont after I push the fix)
aand <1 second :D (well at least with the fixed ∘.)
 
11:22 AM
@Cowsquack that was a good little optimization challenge :p
probably should also make a function to convert rgb to color, or just overload P5.col more
 
another cool pattern v←n|∘.(+.×⍨,)⍨⍳n
 
little warning: A f.g Bf/A g B (not that I expect anyone to know what else would . even do)
 
you mean regarding higher dimensional arrays?
 
@Cowsquack mhm
 
11:42 AM
:D looks nice and is reasonably fast
 
ngn
i'm tempted to jump on the bandwagon and add opengl bindings for ngn/k
how hard could it be
 
why is 13 here the perfect value for the pattern to not flicker? o.O
.oO(I should make a thing that converts dfns to trains because they're so much faster)
oh negative values. I though I fixed that?
oh, the scalar case was still broken..
 
11:58 AM
@dzaima because ⌊547÷13 is 42
 
:D
 
@dzaima v←n|∘.((3××)++×-)⍨⍳n might be slightly faster
 
@Cowsquack o.O
the best values for 1-4 seem to be 5, 40, 13, 20. what
5 is 87?
 
@dzaima what are those numbers?
 
@Cowsquack in place of the 3 in 3××
the results are which value of r makes the animation frames look constant
 
 
2 hours later…
ngn
2:37 PM
@dzaima i'd like to take a stab at ,[k]. if it's a common impl for , and , where should i put it?
 
@ngn I don't really have a good place for those things. The impl for & is in Arr, so either there or just in CatBuiltin as a static method to be called from both places
 
ngn
@dzaima ok, i'll do a static method
 
yeah, that probably makes more sense as , takes 2 args instead of 1
 
3:27 PM
oh hey neat @dzaima, it does work :)
 
:D
 
where do I write the code?
 
@nathanrogers in APLP5/data/filename, but you'll have to change the name in line 12 of APLP5 in Processing to the name too
 
what is that?
 
@nathanrogers square root? :p
 
3:31 PM
that's an APL function?
 
@nathanrogers that's a function in my APL :)
 
:D
do you have the draw function documented anywhere?
 
@nathanrogers here are the half-readable docs for the thing
 
3:59 PM
@dzaima calling rect, can you clarify the various argument types? how to call with different arguments?
 
@nathanrogers left arg is a character vector of the type, right arg are the points. i.e. 'corner' P5.G.rect 200 200 10 10
 
i see
 
type is in brackets there as it's optional
 
n←n+10
'radius' G.rect (n n 10 10)
running this inside draw
I would expect the rect position to change. am I missing something?
 
@nathanrogers you'd need to do n⊢←n+10, or for this case, n+←10
 
4:08 PM
?
 
@nathanrogers otherwise it's creating a new n in the scope of the function
 
ah, so just adding 10 to the base every time
got it
you don't have trig functions?
wait no my fault
disregard again
 
Bright idea: create an APL where the only valid characters are apple emojis.
And maybe worms
 
I was thinking about that. an emoji language. you could use the spyglass for searching!
and the clock emoji for date time, and the globe emoji for a webserver
 
@nathanrogers there is an all-emojis language already IIRC. But restricting to only apples?
 
4:22 PM
????????????????????
 
@nathanrogers Go to tio.run and search fro emoji
 
Yeah, EMOJICODE sxisst
 
Lol I see exactly 2 apples in my Mac emojis
Looks like each symbol will be encoded in binary
 
4:57 PM
@dzaima G.ln and G.line are simply changing the line width of existing objects
I was expecting a line from to sort of thing based on the docs
 
@nathanrogers that's one thing it does. It does also draw lines
 
how do I specify the difference?
 
huh, seems broken for me too
 
pushed fix.. Had a > in place of >=
 
5:00 PM
:P
 
it works fine for more than 2 points :p
 
there we go
ty
 
 
2 hours later…
6:34 PM
@ngn No. I sent an email to them. My keyboard is not supported. It's a Turkish keyboard starting with F. There is also a QWERTY Turkish keyboard very similar to English language keyboards, but I don't use it.
 
ngn
@zeynel if i remember correctly, even if your kbd layout is not listed in ride's prefs, you can still configure another char instead of backtick
@zeynel it's under edit > preferences > keyboard > prefix
 
7:38 PM
@ngn Thanks! That's right. But I have 'w' on the first key where uptick is in English language keyboards and that seems the most logical choice. But what will happen if I ever need to use w?
 
ngn
@zeynel if you've configured the prefix to be something else, "w" should work as usual
@zeynel if that's your prefix key, in order to type a literal "w", you'd have to type "w" followed by a space (if i'm not mistaken...), so it's probably not a good choice. why not pick a non-alphabetic key, like ";" for instance?
is this what your keyboard looks like?
you could also use one of the accented letters as a prefix, if that's more convenient
 
8:06 PM
@zeynel If your keyboard looks like what ngn posted, why not use < (next to Shift) as prefix key? To type < you can just use <,3. It seems a good location for a "shifting" key.
 
@ngn oh only just noticed your PR. Thank you!
 
8:22 PM
@ngn Yes, but with some changes. Maybe I'll try ö next to j. @Adám I don't have < next to shift because I have a longer shift key. ö may work fine. Thanks to both. It would be easier now.
 
@zeynel What does the key next to backspace give you?
 
@ngn And yes typing space key after the prefix key enters the prefix key.
@Adám I have q next to Backspace. That may work too. I can use option with left hand. I have to experiment a little.
 
@zeynel Whoa, your keyboard is very different. Can you post an image?
 
@ngn here you've got a check for !wScalar which is always true. I suppose that the new int[] {2} is a thing left from manually handling scalar,scalar?
 
ngn
8:43 PM
@dzaima ah, you're right, that's already handled by if (aScalar && wScalar) return ...
 
8:53 PM
@Adám I don't have enough rep to post an image here.W1234567890XQ
UİEAÜTKMLYŞ
JÖVCÇZSB.,
 
@zeynel Huh. Are you not skipping an FG…HP row?
 
FGĞIODRNHP;>=
 
@zeynel OK, so
W1234567890XQ
 FGĞIODRNHP;>=
  UİEAÜTKMLYŞ
   JÖVCÇZSB.,
@zeynel It would seem then the most obvious to me to use = as prefix key, since it is to one side and you regain = with =,5.
 
@Adám Yes. Better than q. Let me try this for a while. Thanks!
 
9:28 PM
@dzaima does the P5 map function exist?
 
9:49 PM
@nathanrogers as in the one that maps a range to another range? no, as any APL implementation would probably be much more efficient
though I guess a function definition of the function would be useful if already written in APL
 
so hey, what are the changes dyalog or some other vendor makes this part of the language?
it's pretty dope
 
{s e ns ne←⍺⋄ns+(ne-ns)×(e-s)÷⍨⍵-s}, called as 20 30 50 70{s e ns ne←⍺⋄ns+(ne-ns)×(e-s)÷⍨⍵-s}21 ( can be a scalar, vector, whatever)
 
props @dzaima
perfect timing :P. Aside from the fact that I thought this'd type of thing would be native to APL already anyway
 
@nathanrogers here's a list of differences, though there are probably more things to add to that
 
like a repl/autoupdater? :O
 
9:54 PM
@nathanrogers autoupdater of what?
 
rerun the file on changes
 
@nathanrogers sure, I could make that work, though Processing doesn't like smooth() or size() being called outside of settings
and there is a plain APL repl already
 
red←'0123456789ABCDEF'[(2⍴16)⊤mx],'0000'
this expression is giving me problems @dzaima
IO is 0
 
@nathanrogers uhh I haven't made arr[vec] work ._.
 
10:01 PM
vec⊇arr should work in its place though
 
{'0123456789ABCDEF'[⍵]}¨(2⍴16)⊤10
ah
how do I type that?
 
@nathanrogers on linux I do <compose> ⊃ _, but there's no default compose thing for windows
I could probably copy-paste the logic of to [] (though that won't support ; as that's a whole another story), but that's for tomorrow, I should go to sleep :p
 
@nathanrogers Using my keyboard layout, it is AltGr+Shift+X.
 
real quick @dzaima
(((2⍴16)⊤19)⊇'0123456789ABCDEF'),'0000'
non-scalar number base not implemented
 
@nathanrogers that's as clear as day. Sorry, not implemented :/
 
10:05 PM
what isn't?
 
@nathanrogers with a non-scalar base, i.e. a vector
 
ah
so it has to be item by item then
 
⌷←2(⊥⍣¯1)15
 
@Quintec that's also not implemented
 
Actually. I’m having errors getting that to work in Dyalog APL
 
10:07 PM
@Quintec If you intended that for the bot, use ⎕, not ⌷.
 
@nathanrogers just 16⊤19 almost works, but it doesn't make sure the length is 2
my currently is almost like Dyalogs ⊥⍣¯1
 
←2(⊥⍣¯1)15 adjdidie phone chat is hard
Eek
Eh I’ll do this when I get home lol
 
is there some other way to map ints to hex?
 
⎕←2(⍎⍣¯1)15
 
10:09 PM
@Adám
DOMAIN ERROR
 
D'uh
⎕←2(⊥⍣¯1)15
 
@Adám
1 1 1 1
 
@Quintec ^
 
@nathanrogers if you manually pad with zeroes when needed, ((16⊤19)⊇'0123456789ABCDEF'),'0000' works
 
@Adám Seemed to fail for me on staging.tryapl
 
10:13 PM
@Quintec Indeed. I suspect it is due to my security measures preventing infinite tight loops with .
 
Ah, gotcha. I just had no idea why it gave DOMAIN ERROR
 
but I need n up to 255, so its going to need two digits
16⊤255 I suspect will give me issues
 
@Quintec On TryAPL, is replaced with the following tradop:
∇ r←{a}(aa þ ww)w ⍝ cover for ⍣ (allows interruption)
  :If 900⌶⍬ ⋄ a←⊢ ⋄ :EndIf
  r←a(aa{⍺←⊢ ⋄ ⍺ ⍺⍺ ⍵}⍣ww)w
∇
But cannot invert the complex inner dfn.
 
I guess it doesn't. hmm
 
@nathanrogers what's going to give you issues is 16⊤12
¯2↑16⊤ also doesn't work ಠ_ಠ
¯2↑0,16⊤ does though @nathanrogers
 
10:19 PM
alrighty. I'll keep playing
thanks @dzaima
 
@Quintec Thanks! I thin I've found a solution:
∇ r←{a}(aa þ ww)w ⍝ cover for ⍣ (allows interruption)
  :If 900⌶⍬ ⋄ a←⊢ ⋄ :EndIf
  r←a(aa{⍺←⊢ ⋄ ⍺ ⍺⍺⍣(⍎'×ww' '1'⊃⍨(⎕NC'ww')-2-⎕IO)⊢⍵}⍣(|ww))w
∇
 
10:48 PM
@dzaima A thought about argument types to bg, fill, etc. why are they strings? is there some limitation? bg taking varargs of integer rgb values like the P5 background function would seem to make a lot of sense since apl is really good at working with numbers
 
@nathanrogers you can actually pass it rgb as numbers :)
 
AHHHHHHHH
:P
i finally got the hex working, and how you tell me :P
didn't see it in the docs
how do I do that?
 
@nathanrogers P5.g.fill 256⊥a r g b (where a should probably be 255)
 
G.bg 256⊥0 0 0 255
having an interesting bug @dzaima where this is white, not blue
but when I change it to G.bg 256⊥0 P5.mx 0 255
its white until I start moving the mouse, then the background is blue mixed with p5.mx of red
 
@nathanrogers that's processings fault. fill(255) is white :/
 
11:03 PM
but background of background(0,0,255) is blue
 
the 1st number (a) should be 255, otherwise you're setting the bg to a transparent color and it just happens to actually not fill as transparent because that doesn't make sense
 
a of 255 is white
r←⌊(0 399 0 255 map P5.mx)
G.bg 256⊥0 r 0 255
where map is the function you mentioend earlier
setting a to 1 works though, no white background
 
256⊥255 r 0 0; ok sleep, me
oh maybe its int casting bug. not at pc currently :/
 
11:47 PM
disregard
how do I modify an existing matrix? var←var ... isn't updating the original declaration
@dzaima
 

« first day (641 days earlier)      last day (2014 days later) »