« first day (1318 days earlier)      last day (1331 days later) » 

12:19 AM
@ngn Care to share your translation?
 
ngn
@voidhawk i got bogged down trying to port it to the latest k9. the previous interpreter i had was a month old, i can show you the code for that if you want.
ceil:{[x]$[x=_x;x;1+_x]}
i: :/' :/'p:{[x]+2^(,"")_" "\",=>"_x}'0:"i/14"
i,:,"ORE"
m:{[x;y]@[&#i;i?y;:;@[-`i$x;-1+#x;*;-1]]}/'p
fr:*m@i?,"FUEL"
g:{[x]$[~#n:&0>-1_x;-*|x;{[x;n]r:m n;d:x n;g x++/r*ceil'a|-a:d%|/'r}[x;n]]}
f:g@fr*
f 1 /part1
it has a bug in _x (floor, which is also used to implement ceiling) for negative numbers, so i added ceil as a hack
 
12:40 AM
@ngn Thanks! I admit I can't read it yet, though I've been meaning to look into k for a while. In your opinion, is k9 stable enough for a beginner to ramp up on, or should I stick to ngn/k?
 
ngn
1:13 AM
@voidhawk difficult question. ngn/k has the best benefit÷cost ratio, of course :) but it doesn't have many users, and eventually i'll have to give it up.
k9 isn't at all stable now, and i hate some aspects of its syntax, but it's good to keep an eye on it early on - arthur is aiming for a simpler and faster language than ever before and he has a history of success. eventually, k9 is likely to start taking over from older k-s, and that's where the money is.
 
 
4 hours later…
5:13 AM
Hello again
I am back with more APL confusion
 
@Razetime Go ahead.
 
I made this function today for (https://codegolf.stackexchange.com/questions/50538/caesar-equivalence/210557#210557)[Caesar equivalence]
`⋄{>/⎕UCS⍉↑⍺⍵}`
 
@Razetime Markdown fail?
 
and so far I've gotten to determining which ones to add 26 to and which ones I shouldn't
yes, huge markdown fail
 
Markdown doesn't work in multi-line messages. But multiple messages get merged visually if sent right after each other.
 
5:17 AM
but I'm not sure how I should implement the conditional
Ok I'll keep that it mind
 
@Razetime Since the inputs are guaranteed to be the same length, you can take the input as a 2-row matrix.
@Razetime What conditional? And why are you using >/? Shouldn't you subtract to find the distance?
 
yes but it wraps around
aka a-c =2
 
That's what division remainder is for.
 
but c-a = 24 or something
@Adám ?
 
@Razetime c-a would be 2, no?
 
5:20 AM
yes
 
@Razetime Actually, I don't even think you need division remainder. The only thing you need to check is that all differences are the same.
 
how do we consider wrapping?
⋄{|-/⎕UCS⍉↑⍵}'ABC' 'YZA'
is the bot offline?
or does UCS not work
probably UCS
 
No, bot seems to not be in the room.
@Razetime Ah, right, try inserting 26 before |
 
@Razetime Also, no need to ; just use instead of /
 
5:24 AM
⌿ reduces pairwise?
 
No, it reduces along the leading axis.
 
didn't know modulus worked with negatives as well
 
It does in APL. Fails in many programming languages.
 
Cue frustration when switching to other languages
 
You mean from APL?
 
5:26 AM
yep
 
So why switch?
 
must be annoying that other languages aren't as flexible
well, Once APL on rails comes up maybe I won't switch
@Adám can this be made tacit?
it has only one argument, right?
 
Sure it can, but number of arguments has no bearing on that.
 
why is the mix operator moved down?
 
14 mins ago, by Adám
@Razetime Since the inputs are guaranteed to be the same length, you can take the input as a 2-row matrix.
 
5:32 AM
in order to make it 2 rows in APL input, theres a mix in it.
got it.
 
You could also use of course.
 
(⊃∧.=,) checks if all elements are equal, but I have no idea whats going on inside with the inner product and the and operator
 
@Razetime , makes the argument into a vector, takes the first argument element. scalar f.g vector is the same as f/ scalar g¨vector
But for golfing purposes, you can simply count the unique elements: ≢∪vector
 
ah tally unique
does a number >1 really count as falsey?
 
No. You have to check if it is 1.
 
@Razetime Yes, but in this case, a full program is shorter: Try it online!
 
Everything I'm doing keeps getting 1upped 😂
 
Having some fun with the new 18.0 functions: 1=1⊥26≠⍤|-⍥⎕UCS
 
Cool Imma post it, thanks @Adám
 
Oh, the challenge says full program anyway
 
5:54 AM
@voidhawk I watched some of the webinar yesterday
I was there for the boxing part i think
 
There are boxing changes?
 
I remember @Adám was explaining some things with 3D and 4D arrays, but I'm not exactly sure
 
@voidhawk No, I just explained some of the features of ]box -style=max.
 
Oh, phew
 
I am considering adding -style=off though.
But I'd much rather split the command into a separate one for arrays and one for functions/operators.
 
5:58 AM
]boxing on -style=off sounds like self-contradiction
 
Oh, THAT'S where the weird box formatting in the dfns documentation comes from
Never used -style=max
 
@Bubbler I know, that's why I'd rather make two commands. Currently, there's no way to get e.g default display of arrays, but the tree view for trains.
Similarly, I'd like to split ]rows into ]rows and ]cols
I'm also working on adding these settings to the IDE menu.
 
Ooh.
 
that looks fun
 
 
1 hour later…
7:21 AM
Hello Hello again again
How do I convert it to tacit?
(⎕UCS⍳126)~
this one errors for some reason
 
@Razetime Because a 2-train should be function function but yours is array function.
 
didn't know that
Just converted it to (⎕UCS⍳126)~⍞
 
That would make a full program.
 
yep
 
⍞~⍨⎕UCS⍳126 is one byte shorter
For a function, (⎕UCS⍳126)~⊢ (make it 3-train) or (⎕UCS⍳126)∘~ (use bind) works.
 
7:26 AM
yep, but I figured it was longer
 
But I think you might want printable ASCII?
 
yes, but I didn't find anything an APLCart for printable ascii
so I just converted the range directly
is there a way to get printable ascii that is shorter?
 
@Razetime 31↓⎕UCS⍳126 ?
 
yup but that's longer right
 
For "shorter", you first give us your fully working program.
 
7:30 AM
that's it
 
Yeah, I'm not sure what your task is.
 
that's the whole program
18
Q: Print the missing characters

SkidsdevSimple challenge inspired by the popularity of my previous print invisible text and print real invisible text challenges, and the same length different string challenge. Given a string consisting of only printable characters (0x20 to 0x7E), print every printable character not present in the stri...

 
@Razetime It is wrong because it prints control characters too.
So you didn't provide us a fully working program.
 
there's no restriction put up on adding unprintables in the output
 
@Razetime Ah, then Bubbler's solution is shortest.
 
7:32 AM
yep that's what I was planning on posting
 
@Razetime "Output: Every printable ASCII character not present in the input string, in any order."
 
hmm ok
so jsut drop the unprintables and output
 
Yes, prepending 31↓ to any of the solutions we discussed so far will work
But there's no shortcut for "printable ASCII" in APL, because it's not a golfing language.
 
⎕A exists so I thought it might be
 
To see if there's a built-in, you could check the docs directly.
 
7:38 AM
bookmarked
 
On the other hand, having an APLcart entry for printable ASCII sounds reasonable.
@Adám How about ⋄ ⎕UCS⎕IO-⍨32+⍳95 for ^?
(Uh, the bot is offline...)
 
yep since morning
@Bubbler why isn't 31↓⎕UCS⍳126 good enough?
 
@Razetime 1. The result depends on ⎕IO 2. It creates a longer vector than necessary during calculation 3. APLcart is not for golfing per se.
 
what is ⎕IO 2?
 
A confusing concatenation of ⎕IO and a bullet point.
 
7:55 AM
I know that APLcart is for usable snippets that work across a range of problems, but was just wondering why so much code for a constant
 
Because that's the shortest (portable) way to get the specific constant.
 
@Bubbler yep got it from here
 
8:43 AM
@Razetime Who really needs the list of printable ASCII chars?
 
9:36 AM
Good question.
 
9:53 AM
@Bubbler 1. APLcart assumes ⎕IO←1 throughout 2. Wasting 31 bytes of memory isn't a big deal on modern machines.
@Razetime Now there is.
 
10:27 AM
@Adám lol why ask the question then
 
11:02 AM
@Razetime What question?
 
@Adám i assume this one - if noone needs it, why add it?
 
Well, even if nobody really needs it, it is a good reference to have.
 
nice, thanks
Hello Hello Hello again again again
⋄{(⎕SE.SALT.New'HttpCommand'('HEAD'⍵)).Run.Data}'razetime.github.io'
trying to get the document info of a site
but when i run it, it returns nothing
 
No harm in adding stuff, after all there's a lot in APLcart I doubt anyone will ever need
 
11:18 AM
@Razetime ((⎕SE.SALT.New'HttpCommand').Get'razetime.github.io').Data
 
well that returns the whole site right
I just want the info on it
like ip address
url
meta descriptions
 
Ah, you only want the header?
 
yes
the header only
Which is why I tried a 'HEAD' request in the first place
I just modified an APLcart snippet to that
 
@Razetime So why are you getting the Data?
{(⎕SE.SALT.New'HttpCommand'('HEAD'⍵)).Run.Headers}'razetime.github.io'
 
I didn't know which part of the docs it was in
What exactly can i search for to get the info on this command?
Another thing, why is there a huge amount of whitespace in the end of the output?
 
11:29 AM
@Razetime Probably CR LF
 
Looks ok to me
 
hmm, stil doesn't have redirect info
looks like it doesn't return the final url
 
11:51 AM
@Adám
how do i import a function that requires the prefix dfns.?
I want to use dfns.htx
 
12:17 PM
@Razetime Good point. I should add an entry for HttpCommand (and maybe more stuff) and link to the corresponding docs.
 
@Adám BQN wins! As of yesterday!
 
@Razetime What did you search for on APLcart?
@Marshall Not shorter as dyadic fn?
 
@Adám That does cut a character, but it beats APL either way...
Although the actual challenge says it has to take input from STDIN??
 
Yeah, old challenges…
 
ngn
@voidhawk i gave up trying to translate it to the latest k9 - it has worse bugs than the previous. in ngn/k i get marginally better performance than dyalog:
p14:{
 i::,[;,"ORE"]@{*|*|x}'p::{+0N 2#^[;,""]@" "\x^",=>"}'0:"i/14"
 m::{@[&#i;i?y;:;@[-.'x;-1+#x;*;-1]]}/'p
 fr::*m@i?,"FUEL"
 f::({$[~#n:&0>-1_x;-*|x;o x++/r*-_-'a|-a:(`f$x n)%|/'r:m n]}@fr*)
 g::{$[1000000000000.0<a:f`j$x+1;x;o(x+1)|_(x+1)*1000000000000.0%a]}
 (f 1;g 1)}
\t:1000 p14[]
@voidhawk btw, you can inline d, and init r on first use
 
12:30 PM
@Marshall Actually, K wins: 1=#=- Try it online!
The equivalent APL would be 1=∘≢,⍥⊂⌸⍤-⍥⎕UCS
 
@Adám Fails on words that wrap like abcd/yzab.
The equivalent BQN is also 5 chars: ⊣`⊸≡-.
 
@Marshall OK, 1=#=26!- then. Try it online!
 
@Adám I wanted to extract HTML
 
@Adám So... K ties?
 
so i searched up html and that was the only result: 'dfns.htx' @Adám
 
12:35 PM
@Marshall I guess.
@Razetime Right. No, I mean what did you search for to find how to import from the dfns library?
 
ngn
which challenge is this?
 
@Adám uhh I did not
 
25
Q: Caesar equivalence

JamesTwo strings are "Caesar equivalent" if the distance (counting up) between the corresponding characters are the same. Yes, I made this term up. Here's an example: "Abc" and "Cde" are equivalent because distance from a-c == 2 distance from b-d == 2 distance from c-e == 2 The capitalization does...

 
ngn
thanks
 
@Razetime If XHTML compliant, then you can also use ⎕XML.
 
12:40 PM
cool
I'll try coming up with something
 
@Marshall I'm not sure I understand why this works. Care to explain?
 
@Adám 26|- gets the difference between the characters mod 26. ⊣`⊸≡ projects the first value of that result to the entire array with the scan ⊣`, and tests whether it matches the unprojected result, that is, whether the distance between the first two characters is equal to each other distance.
 
@Marshall Thank you. I'm a bit confused by then. When it's derived function is applied monadically, it is as a selfie?
 
@Adám Yes. The runtime defines ⊸ ← {(𝔽𝕨⊣𝕩)𝔾𝕩}, where 𝕨⊣𝕩 is 𝕨 if it's present and 𝕩 otherwise. This definition is needed to make binds work.
 
OK, that was the part I was missing. Thank you.
 
12:52 PM
Here's a previous discussion.
 
Right, I remember now.
 
⋄{(⎕SE.SALT.New'HttpCommand'('GET'⍵)).Run.Data}'api.stackexchange.com/users?inname=leaky&site=codegolf'
I tried this and I got an error `{"error_id":400,"error_message":"No site found for name `codegolf?inname=leaky,
codegolf`","error_name":"bad_parameter"}`
 
I'm not sure you can just add parameters to the url like that. HttpCommand does do some analysis of the URL.
 
ohhh
I tried ]help with ⎕SE and didn't get anything related
what should I pass the parameters as
 
@Razetime ⎕SE?
@Razetime You probably should do ]load HttpCommand and then edit that to see the syntax overview/cheat sheet.
 
1:09 PM
edit it?
 
Yeah, like double-click on HttpCommand or enter )ed HttpCommand
 
YOU CAN DO THAT?!
 
1:26 PM
This is great
 
1:44 PM
@Razetime just saw your video about loaders number, really enjoyed it, wonder if that's possible to do in APL
Could be an interesting challenge, biggest number
 
Oh, thanks!
I actually found it on CGCC
there's a challenge to golf a number bigger than loader's number
 
Oh nice
Do you have a link?
Is there an APL submission?
 
f←{((25 3⌷t)≡⍵):t←20 3⌷0(⎕JSON⍠'M')(HttpCommand.Get('https://api.stackexchange.com/users?inname=',('\s+'⎕R'\%20')⍵)'&site=codegolf').Data}
      f 'Razetime'
So I made this function for finding the id of a user based on Name
But it says t is not defined
22
Q: Golf a number bigger than Loader's number

PyRulezAs a follow up to Shortest terminating program whose output size exceeds Graham's number and Golf a number bigger than TREE(3), I present a new challenge. Loader's number is a very large number, that is kind of hard to explain (since it was itself the result of a code golfing exercise with a fle...

 
define t before f
 
2:00 PM
I need to assign t using ⍵ however
 
@Razetime Turns out we had a bug upon a redirect, but if you include the protocol (https://) then it works.
 
huh interesting
@Adám Bit of help needed here
The snippet 0(⎕JSON⍠'M')(HttpCommand.Get('https://api.stackexchange.com/users?inname=',('\s+'⎕R'\%20')⍵)'&site=codegolf').Data gets the required data
but i need to compare it with the input more than once for this challenge
 
@Razetime {(⎕SE.SALT.New'HttpCommand'('GET'⍵)).Run.Data}'https://api.stackexchange.com/users?inname=leaky&site=codegolf' works
((⎕SE.SALT.New'HttpCommand').Get'https://api.stackexchange.com/users?inname=leaky&site=codegolf').Data is shorter.
 
I need to get input and insert into the query
 
@Razetime Just concatenate the user name into the url.
@Razetime (⎕JSON((⎕SE.SALT.New'HttpCommand').Get'https://api.stackexchange.com/users?site=codegolf&inname=',⍞).Data).items.user_id
 
2:10 PM
yup, but you need to replace spaces with %20 right
@Adám Yes but how do I compare ⍞ with the result of it
 
@Razetime I don't understand why you need to.
 
just assign ⍞ to a variable and then print it?
 
Or use and wrap in {}
 
use a train like (⊢,f)? maybe?
 
@Adám The question states that you're not supposed to return the user id without an exact match
 
2:13 PM
Ah, I see. Right, then do it in a function, or assign it.
 
f←{⍵≡y.display_name:y.user_id⋄y←(⎕JSON((⎕SE.SALT.New'HttpCommand').Get'https://api.stackexchange.com/users?site=codegolf&inname=',⍵).Data).items}
It gives me undefined name
I'm gonna define them separately
a←⍞
y←(⎕JSON((⎕SE.SALT.New'HttpCommand').Get'https://api.stackexchange.com/users?site=codegolf&inname=',⍞).Data).items
f←{a≡y.display_name:y.user_id ⋄ 0}
running f gives a syntax error
 
2:33 PM
I GOT IT TO WORK
JSON.display_name gives an enclosed object
so just gotts use ⊃ on it before comparison
 
3:00 PM
@rak1507 Are you around?
 
3:14 PM
@Razetime It seems @rak1507 isn't here. Do you want to meet?
 
3:26 PM
@rak1507 Ah, you're here. Ready to meet now?
 
Hi only just got home sorry, bad traffic
Yeah I am
 
Zoom -\758,435,8447
Also, anyone else here who want to test or contribute to the new automated problem solving site, feel free to join ↑
 
Alright I'll be on in one minute
 
No problem.
 
oh I'll be in
 
4:07 PM
Ah, used the rank operator for one problem, I assume that's 18.0+ only?
 
@rak1507 No, Rank is since 14.0.
 
Ah my solution just doesn't work then haha
 
Only Atop doesn't work in 17.1. Though Rank and Atop are the same symbol.
 
Got it thanks
 
Ok, 2020 P1: my solution isn't working
⋄{⍉⍪(⍺↑⍵)(⍺↓⍵)}
seems to be correct in the IDE with box on
Is it correct? @Adám
 
4:15 PM
Another question, how do I make sure ↑'String' is the same as 1 6 ⍴ ↑'String'
 
well, do 6 ⍴ (1 6 ⍴ 'String')?
 
It's similar to nest, but not like that
 
4:44 PM
@Razetime Fails on negative numbers, no?
@rak1507 Matrify?
 
 
1 hour later…
ngn
6:12 PM
@cannadayr did you try k9?
 
@ngn no. didn't really have any immediate plans to tbh.
 
ngn
oh. ok
 
hah, work takes up a lotve my time
just other priorities
 
ngn
@cannadayr yesve course :)
 
w/ 3 day weekend in states I wanted to take another day to learn more BQN - port more stuff over
possibly dig into the javascript vm
@ngn i did however subscribe to the google group :) even if I dont use the software seeing what problems they face as the primary commercial use of array languages is very important
 
ngn
6:25 PM
@cannadayr it's mostly about "time series" databases in finance
but i think k has potential to be a great general-purpose language
 
@ngn oh im sure. I wish the financials were different that they would consider open-srcing but i doubt thatll happen - theyve got market share in a niche, no reason to risk their business model. plus i appreciate that kx still funds apl stuff.
 
ngn
@cannadayr you mean the hopl paper (guy steele, roger, morten, etc)?
 
@ngn yep thats what I was thinking about
i think that paper pretty important re: APL. i read it as a manual to implement an APL runtime or successor
 
ngn
6:41 PM
@cannadayr btw, k9 is developed at shakti, not at kx. a couple of years ago arthur&janet sold their shares and founded a new company.
 
@ngn was hopl funded by shakti or kx?
 
ngn
@cannadayr by kx, afaik
 
 
1 hour later…
7:50 PM
0
Q: Is there a package manager for APL?

Andriy MakukhaIs there any package manager for APL (something like cargo for Rust, npm for Node.js or pip for Python)? I'd like to contribute a package or two, but not sure how to do it other than via a GitHub repository.

 
 
2 hours later…
9:30 PM
added a couple of the latest BQN changes to dzaima/BQN (˙⊐@, extended ⥊, character operations)
 
@dzaima Great! I can probably remove about 90% of the s in md.bqn.
I think ! is the only unsupported primitive the compiler needs now. Can you add it?
 
@Marshall right. also meant to add it, but never remembered to
(also, ⟨∘⟩⥊⟨⟩ fails in the JS interpreter; a couple more things do when executed by your compiler in dzaima/BQN, but that probably doesn't matter)
 
@dzaima Will get to it. Currently debugging ({𝕩})1...
 
Added !
 
10:03 PM
@dzaima It's because the compiler still doesn't support standalone modifiers properly: it works with _o_←∘⋄⟨o⟩⥊⟨⟩.
 
@Marshall ah, that makes sense
@dzaima (ah, those "probably doesn't matter" are from my native not expecting the "fake" made by dzref)
 
10:18 PM
huh. i don't do any correctness checking for leading axis agreement
 

« first day (1318 days earlier)      last day (1331 days later) »