« first day (2142 days earlier)      last day (499 days later) » 

12:31 AM
looking up how people did last year's day 12 and most people just didn't use APL at all
 
1:11 AM
part 2 is really slow
didn't bother optimising it properly
 
 
1 hour later…
2:14 AM
@LdBeth another AoC problem that wants you to use a [directed] graph
 
isnt there something in dfns for graphs
 
 
1 hour later…
3:23 AM
 
3:53 AM
anyone been tinkering with this?
it doesn't seem to know APL very well
 
4:35 AM
@Seggan That problem requires states and backtracking and the dfns ws functions does not apply.
And even which very optimized searching routines written in C++, it still takes a while for Part2
Where I got an answer of about 1E5 search results
(Did not do that problem in APL either)
 
5:40 AM
Today's is... sucky
I bet the problem is inspired by that ChatGPT
And I can assure someone would attempt that for solution
 
I doubt it, as it only became available right before AoC launched.
 
6:30 AM
The APL model needs loads of work.
It seems to have no conception of left argument whatsoever
And it is constantly trying to index into scalars, and seems to assume that a number is simultaneously the number n and also ⍳n
it told me that 5+/÷⍴ is how you call the above example
and that +/÷⍳5 is how you average a list of numbers from 1 to 5
I reached out to their support to address the issue
I'm learning that it is trained primarily on text, and with a lack of open source APL projects, and most of the APL training materials being interactive tutorials, or image scans of old books, I don't know how it's going to be trained very well...
It's very concerning if someone were to use ChatGPT to learn APL as many are reporting to do with Haskell, Lisp and other languages, only to be wildly misled
 
7:09 AM
@nathanrogers We're totally abusing ChatGPT for things it was never intended for.
 
What it is intended for, notwithstanding. It's taking on a life of its own, and I'm seeing many prominent technology "influencer" types pushing this thing as a productivity and learning aid... so if people come to the tool thinking "learning aid" and see that it helps to teach them other languages...
it stands to reason that they will have the preconception that it can be used to learn APL for one
and for 2, that APL is outdated, outmoded, doesn't work, is really confusing and misleading, dissuading potential users of the language through no fault of the language, but because the ChatGPT APL language model is wrong
 
You can get it to write correct APL if you help it a little. It "learns" from the current thread.
 
I sat there for over 2 hours trying to get it to supply a left argument
it had something like {⍺←⍬}/{some code}
.... what?
not to mention that it has no idea how to return a value from a dfn
it was constantly putting out gibberish code that would never Fix
 
I disagree. After very little hand-holding, it wrote this:
median ← {
  ⍝ Compute the median of a vector of numbers.
  vals ← ⍵  ⍝ vals is the input vector of numbers.
  n ← ≢ vals  ⍝ n is the number of values in the vector.
  0 = n: ⍬  ⍝ If the vector is empty, return an empty vector.
  vals ← vals[⍋vals]  ⍝ Sort the values in ascending order.
  1 = 2|n: vals[(n + 1) ÷ 2]  ⍝ If n is odd, return the middle value.
  0.5 × +/ vals[n ÷ 2] + vals[1 + n ÷ 2]  ⍝ If n is even, return the average of the two middle values.
}
 
and it "fixed" a rank error by indexing based on another index of the same value... something like ⍺[1+row[row[2]]]
where row was a scalar
@Adám I mean, you can't really disagree that I sat there for 2 hours trying to get it to supply a left argument. That literally happened.
 
7:14 AM
Sure, but maybe you just couldn't express your need in a way it could pick up. It is a NLP after all.
I suggest you write a blog post about your ChatGPT experiences.
 
Ask it to implement a solution to nqueens using recursive bfs defined as DFNS
If you can get that to work, I'd like to see what it comes up with
But the variations it was feeding me were errant
 
> As a language model, I don't have the ability to run APL code or access an APL interpreter.
 
 
5 hours later…
12:07 PM
@nathanrogers surely the average of an integer is ⊢
 
;⊢)
 
@nathanrogers there is no issue, it isn't meant to be a perfect coder in all languages
 
It isn't even meant to be a coder at all. It often writes ridiculously wrong code in common PLs too, even for simple tasks.
 
yeah, I think @nathanrogers has the wrong idea about what it actually is and what it's for
 
 
12:33 PM
this is weird: an array in my ws seems to be messed up
      ≢w
168
      ≢∊w
168
      ⎕dr w
326
      ⎕dr ∊w
163
      w≡∊w
0
      ∧/w=∊w
1
???
 
@rak1507 Other than a missing space on the last line, I've got:
      w←168⍴⊂,1000
      ≢w
168
      ≢∊w
168
      ⎕dr w
326
      ⎕dr ∊w
163
      w≡∊w
0
      ∧/w=∊w
 1
@rak1507 Have you tried ]repr w?
 
      10⍴⊂,1000
┌→──────────────────────────────────────────────────────────────────────┐
│ ┌→───┐ ┌→───┐ ┌→───┐ ┌→───┐ ┌→───┐ ┌→───┐ ┌→───┐ ┌→───┐ ┌→───┐ ┌→───┐ │
│ │1000│ │1000│ │1000│ │1000│ │1000│ │1000│ │1000│ │1000│ │1000│ │1000│ │
│ └~───┘ └~───┘ └~───┘ └~───┘ └~───┘ └~───┘ └~───┘ └~───┘ └~───┘ └~───┘ │
└∊──────────────────────────────────────────────────────────────────────┘
      10⍴w
┌→────────────────────────┐
│2 3 5 6 10 11 14 16 17 20│
└~────────────────────────┘
      ⎕SE.Dyalog.Utils.repObj w
NONCE ERROR: Generated expression did not match argument
I'm still on 18.0 so ]repr doesn't exist
 
What is ≡w?
 
1
 
Seems like APL has failed to squeeze the value. Did you use @?
 
12:43 PM
yes
 
iirc, there's a bug in 18.0 where @ fails to squeeze.
 
      {⎕dr ⍵}@{1 1 0}1 2 'foo'
┌───┬───┬───┐
│326│326│foo│
└───┴───┴───┘
this is in tryapl
 
@rak1507 That runs 18.2.44990, but my 18.2.45319 says:
            {⎕dr ⍵}@{1 1 0}1 2 'foo'
┌──┬──┬───┐
│83│83│foo│
└──┴──┴───┘
let me look up when this was fixed.
 
interesting
 
Right, it was fixed in February, r45074.
Aha, TryAPL is using the old beta version of 18.2; I'll try to move it to 18.2:latest.
 
1:08 PM
@rak1507 OK, TryAPL is up to date now. Consider getting 18.2!
 
1:21 PM
Not exactly APL home court advantage today's AoC... github.com/xpqz/AoC22/blob/main/day7.apl
 
2:11 PM
@xpqz nice. I don't have any clue yet how to do this. I think it takes me less time to do it manually. Was thinking about creating a nested array with all the directories and files. To stay a little bit close to APL...
 
 
1 hour later…
3:29 PM
I can give you a little clue if you like.
 
4:31 PM
0
Q: Can Dyalog user commands be invoked from code?

pamphletMy understanding is that generally one shouldn't want to do this, but my particular use case involves testing a custom user command, so being able to invoke something like ⎕SE.Foo 'mycmd my arguments' would be quite useful.

 
using namespaces is kinda cheating
 
@rak1507 I do not. I have been paying attention to the discussion about it accross twitter, youtube, news media, and it isn't me who has the wrong idea about what it is and what it is for. It is the usage and conversations about what it is that are confused about what it is and what it is for.
 
no one I've seen has said 'chatgpt is a tool for writing flawless APL' so I'm not sure where you got that idea
 
No, not flawless APL. That wasn't my point. My point was that it is a programming productivity, learning, and research aid
the expectation from the general population is that it is useful for those things
if it can't produce even trivially correct APL, if someone were to come to the tool , seeing that it is a useful as a learning, productivity, and research aid for "programming languages", APL being a programming language, they will expect, knowing nothing about APL or the "intent" of chatGPT, that the tool will effectively help them learn APL
 
@nathanrogers it would be a silly expectation that a tool can help with a niche programming language like APL
 
4:40 PM
no it isn't, if you just read the conversations around the tool in the general programming spheres of social media. I've seen endless threads discussing this tool for use exactly as I'm describing
 
@Richard I didn’t actually build any trees for that. You can always do the parent matching in a separate pass.
 
@nathanrogers We must hang out in different spheres, most of the people I follow have been laughing at how hilariously wrong and useless it is
 
I mean, nauseatingly endless. I'm not saying it should be used for these things, but it is being used for these things
I don't hang, I just watch
 
maybe watch different people, hype will always blow over
 
When I hear about a topic, I look for that specific topic
 
4:41 PM
naturally whenever something new is released the people shouting loudest about it are going to be people who are (overly) enthusiastic
 
Well, seeing the hype, I've messed with the thing to very interesting non-trivial effect in mainstream languages. By comparison, it's APL capability is wildly incorrect. I don't know if there is something simple we can do, either with SEO, or just publishing more source code to public repositories that would make APL more discoverable by this bot to build its model from
 
@nathanrogers APL and every other non mainstream language, anyway I doubt anyone cares enough to try and 'fix' it
 
@rak1507 I understand the enthusiasm of novelty, but what I'm seeing people pull out of this bot is both intriguing and alarming. Intriguing because sometimes it produces really interesting and correct code. Alarming because if people actually lean on this thing as the productivity tool they think it is, when it isn't... we're in for a generation of lazy people and good liars ruining the programming industry.
 
I believe logicians claimed that thing is still not good enough for logic reasoning. I would just wait until see it can do proper group theory before trying to feed it with programs.
 
Someone please beat people over the head with this, because people are seeing non-trivial single examples as proof that non-programmers will now be able to augment their non-ability and contribute to open source...
 
4:48 PM
I don't think anyone reasonably believes that. People will say all sorts of nonsense, but as soon as anyone actually tries, it'll be obvious that it isn't the case
 
Some of these threads are very concerning for the future, not because it is effective as they claim, but because it is ineffective and they're too stupid to tell the difference
@rak1507 Bro stop telling me I didn't read what I read
 
I'm saying that people can say what they like but the proof is in the pudding
I don't really care what people think might or might not be the case, I care what is the case
 
@rak1507 This was inspired: github.com/pitr/aoc/blob/main/2022/07.apl
 
I know it is, but the mass and momentum is in the direction of people using this thing for production code, and telling others that they should be using it for learning and productivity. It isn't that I care what people think. It's more that influential people are informing what other people think, incorrectly so, and it needs to be either headed off, or we need to leverage the momentum
Combined with morons who lack the ability to validate the behavior of code that they themselves write think that because its powerful with natural language, it must be equally powerful with programming language but can't tell the difference between working and not working code anyway
 
OK, let's take it down a notch.
 
4:55 PM
I wasn't aware that I had taken it up any notches. This is merely describing what I've observed over the past week.
But it does seem that there is not much reception to the topic here.
 
@xpqz I was trying to use regexp but completely forget how QUOD S works
 
@nathanrogers Either way, let's keep it civil and brief.
 
@rak1507 that use of ⎕json... wtf brilliant idea
 
5:14 PM
Treat namespace as json?
 
Yes. And get the depth for free.
 
5:52 PM
@nathanrogers Yeah I agree that people need to realise it's not magic, but I think they'll realise that for themselves when they try it, and it's not worth worrying about too much
@xpqz yeah, that's nice
@xpqz thanks, sadly not very APLy
 
6:23 PM
came up with a new approach, you can get the depth directly from the input! gist.github.com/rak1507/072748ba9bb5056c103d4a1c6eb396ce
 
@rak1507 I've not fully worked through your first one yet...
 
 
1 hour later…
I completely spaced on AOC starting. Built up my tooling and everything for the occasion... but life has a way of interrupting your plans.
 
@voidhawk Ooh, maybe join apl.wiki/aoc?
 
I somehow got doxxed and my real name is already in that table :)
 
Well, except we don't know which one is you.
 
Hrmmm, well I'm Isaac Wooden, I've been doing 2022 walkthrough videos at youtube.com/@yernab
 
7:44 PM
Oh, then you're in the table twice?
 
Lol yes
Btw, is there a good way to "unbind" a variable without calling ⎕clear ?
 
⎕ex — I'll add "unbind" as keyword on APLcart.
 
Ahhh, awesome, thanks!
 
Feel free to consolidate the wiki table.
 
8:03 PM
@voidhawk Inspirational!
 
Thanks!
I feel like a big part of these more verbose problems is to aggressively not care about the things in the input you don't have to care about lol
It also took me a while to validate all the assumptions needed for that solution to work (we never do cd / after the first line, we never ls on the same directory twice so we don't have to deduplicate file sizes, etc.)
 
 
1 hour later…
9:32 PM
@xpqz yes please. I am not going to look at the solutions yet. Want to figure it out myself
 

« first day (2142 days earlier)      last day (499 days later) »