« first day (5098 days earlier)      last day (40 days later) » 

00:14
CMC: how Looksay encoded is my number? Take a number eg. 2311 and interpret it as a looksay sequence, eg. 331. Return how many times this can be done until the final number is not an even number of digits
looksay sequence?
In mathematics, the look-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, 31131211131221, ... (sequence A005150 in the OEIS). To generate a member of the sequence from the previous member, read off the digits of the previous member, counting the number of digits in groups of the same digit. For example: 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as "one 2, one 1" or 1211. 1211 is read off as "one 1, one 2, two 1s" or 111221. 111221 is read off as "three 1s, two 2s, one 1" or 312211...
thanks
I wonder if this can be done faster than just re-interpreting...
The number of digits in f(x) is trivially known, but the number of digits in f(f(x)) is slightly harder…
00:52
Is 2222 -> 2222 a valid looksay inverse?
because if you looksay 2222 then you'd get 42, not 2222
For the purposes, assume you will not receive an input that would result in an infinite loop., You will never get 2222 as part of any step in the sequence
 
1 hour later…
02:28
There is C, C卄 and C#, is there C+ and C丰?
03:44
When Stanley came to a set of two open packets of butter, he ate the butter on his left
04:04
Aww it's not even a fun one
@NewPosts This was not the correct way to the refrigerator room, and Stanley knew it perfectly well. Perhaps he wanted to stop by the butter lounge first, just to admire it.
@lyxal Eight!
This isn't what the Butter Parable is about! It's about the nature of choice in Nineteenth Byte messages, not about a button that says the word "eight". Stanley, get out of this room before you get the wrong impressions!
 
1 hour later…
05:19
0
A: Sandbox for Proposed Challenges

Wheat WizardTriangulations and bracketings This is a sequence challenge. So you will output a sequence per default rules. I will give two different interpretations of what this sequence means. The two both give the sequence so feel free to follow whichever one you feel. As an extra challenge figure out why t...

 
2 hours later…
 
1 hour later…
08:31
I need to do one of those "cybersecurity awareness training" things, and it's a game of guessing what they mean instead of the correct answers
No your password can't be stolen if you use public wifi
Downloading a .zip is not inherently dangerous
Also there was a question about if anti virus and I wanted to paste a long rant about them being useless
Also there was a question what if a printer repair person wants to check a setting in your computer, with like 10 options ranging from call their manager to just watch and make sure they don't do anything weird. The only correct answer was "No, Never". But of course they need access to my PC if they are going to debug my printer? It's obviously nececairy for them to do their job
 
2 hours later…
11:01
@mousetail'he-him' our group policy enforces 3 months between password changes
the stupidest shit i've ever seen
11:14
@mousetail'he-him' really?
I actually don't know how risky public wifi is if it is set up maliciously by the russians
7
A: Can users connected to the same non-open (e.g. WPA-PSK) WiFi see each others traffic?

SpiffIf you know the passphrase or PSK of a given WPA-PSK or WPA2-PSK network, AND you capture the key handshake when a given client joins the network, you can decrypt that client’s traffic for that session (until it disconnects from and reconnects to the AP, at which time you’ll need to capture its n...

11:41
@Simd They can see traffic, but the data is encrypted if it's HTTPS
@Themoonisacheese One thing they did correctly was recomending using a long passphrase of random words rather than using a lot of symbols or numbers, but never use a quote from a movie
CMC Given some cups of infinite capacity, each with some scales(aka. it's possible to move water in/out till reaching some volume), decide if possible to make each cup with given amount of water if there's initially exactly enough water in 1st cup. E.g [[1,2],[3,4],[5,6]], [1,1,1] => True (to 3rd cup, measure 1 using 1st, the 1 to 2nd, 3->1 measure 1
E.g [[3],[4],[5]],[4,5,3] => False (No cup can be last decided)
I really managed to read "no cup" as "no cap"
fr
12:05
@mousetail'he-him' from the link I pasted it looks like you need to enforce wpa-2 only?
Yes, also, bit it's irrelavent in either case since the data is also HTTPS encrypted
@mousetail'he-him' battery horse staple only?
That's what they recomend, which is good
I am not sure how to prevent it from choosing wpa psk if that is all that is offered
You could connect, then check the wpa version, then not log in to anything if it's wrong I guess
12:12
@mousetail'he-him' I guess so
I imagine that would get 99% of people
Are you a python person by any chance?
I used to be, I'm a crab now
Ah yes. That can happen
I am trying to use tqdm and joblib in Linux
But it makes a mess
I want multiple progress bars
Have you considered making your own? tqdm isn't very flexible and it's easy enough to do yourself
12:55
@Simd tqdm progress bars can have a position parameter passedx to them
that being said it's never worked properly for me so yeah
per the docs this should work, but on my machine it's not great, although i do a bunch of shitty threading so maybe that's my fault
13:19
@Themoonisacheese thanks. Yes I tried that. Here is the bountied question stackoverflow.com/a/79352174/1473517
Surely it should be simpler!
your bars disappear because the with tqdm() block is finished which destroys it. if you make the thread wait (for a semaphore realistically) until all are finished then the bar will stay
@Themoonisacheese how can you do that?
not sure
yeah i'm struggling to do it with your code because i've never used joblib
do the parallel threads have access to the outer variables?
ideally you would do this:
but done and n_cores aren't actually accessible inside the threads and i don't know enough about joblib to make them behave that way
13:45
It's confusing because a web search suggests people do it
Am I reading right that every thread has it's on tqdm? That seems like it won't work
They will interfere with eachother
@mousetail'he-him' they have a position passed to them
@Simd if you add this at the top does what i sent earlier work?
I doubt tqdm is thread safe, it's emiting a lot of shell escape codes and if multiple write at the same time it's not gonna work
@mousetail'he-him' oh yeah
You might need to have a lock around your tqdm calls
13:50
but simd's problem appears to be with progress bars disappearing rather than race conditions
Try putting: tqdm_lock = threading.Lock();
the problem i have with mine is definitely a racecond which makes no sense because i veray rarely update my bars
Then every update do with tqdm_lock: bar.update()
See if it makes any difference, maybe the problem is somewhere else but maybe it will help
A escape code race condition could easily erase a bar
that probably fixes mine yeah
his problem is at the end, because once the thread finishes the long loop, the progress bar is destroyed (because the with block is done), hence what i suggested
Isn't the while done != ... loop meant to delay exiting the with until everything is complete?
13:55
yes
but while keeping the tqdm bar alive
So that part isn't waiting long enough?
the stated problem was this:
which now that i look at it in hd is just a race condition on the escape codes
disregard everything i said you just need a lock on your bars
The normal bars are constantly overwritten, so when a race condition happens it will be fixed. But if something goes wrong at the very end, the bar will never be fixed. So it could be erased or replaced by a different bar or corrupted in some other way
@mousetail'he-him' antiviruses are not completely useless tho
@Themoonisacheese will that slow the parallel code down?
@Themoonisacheese if you would like the bounty you could add an answer too
 
2 hours later…
15:51
@Simd yes, somewhat. this means that everytime a thread wants to update its bar, it must wait for other threads to finish updating their bars.
@Simd i feel like mousetail was really the person who got the problem right, i was just going on a mistaken assumption the whole time
The time it takes to update the bar should be very small, it's unlikely to effect performance much
@Themoonisacheese Can you share the code as text you wrote? Or where did you get that from? So I can write a proper answer. I'll credit you
the original code is in the post, what i wrote was in a temp buffer that's now gone
also unclear what you need from my code because keep=True should do the trick
3
A: Running functions in parallel and seeing their progress

BoobooMy idea was to create all the task bars in the main process and to create a single multiprocessing queue that each pool process would have access to. Then when calc completed an iteration it would place on the queue an integer representing its corresponding task bar. The main process would contin...

@Simd Are you multithreading or multiprocessing?
Ok seems you are fucked because it seems joblib uses processes so you have no way to actually sync the different processes, and they all share a stdout
~~How about rewriting it in Rust~~
Imagine that's a strikethrough
16:25
@mousetail'he-him' I just want it to run in parallel to died l speed it up
When writing a progress bar, tqdm needs to emit a series of shell escape codes, go to this line, clear it, then write a new progress bar. But if multiple processes are writing to the same stdout, one will go to a line, then another will write the wrong progress bar
They need to coordinate, but you can't over multiple processses
For threads it would be easy but because of the GIL it won't improve performance much
0
Q: Draw an ASCII "analog-digital" clock

FhuviWrite a function (or a whole program) that, given the hour and minute (in any reasonable format) outputs (or prints) the "analog-digital" corresponding clock. Example: Input: 08:25 Output: ## 08 08 25 25 25 The canvases for the hour and minutes are...

16:41
@mousetail'he-him' interesting. The multiprocessing solution claims to do it. Do you understand how?
3
A: Running functions in parallel and seeing their progress

BoobooMy idea was to create all the task bars in the main process and to create a single multiprocessing queue that each pool process would have access to. Then when calc completed an iteration it would place on the queue an integer representing its corresponding task bar. The main process would contin...

It uses a queue to communicate between processes
@mousetail'he-him' does that slow things down?
Yes but more importantly it requires a lot of code to coordinate effectively, enough that I'd probably consider it not worth it
16:51
I am most worried about the slow down
I really thought tqdm was supposed to be able to do this more easily
You'll probably notice it, but it's not that huge
tqdm is very basic, very much not meant for situations this complex
I'd recomend you try the solution and see if the slowdown is acceptable
@mousetail'he-him' that looks related to what you said
Yea thread safe but not process safe
17:01
Got you. So useless for running things in parallel
I don't understand python threads that don't run concurrently
Basically. Making things process safe is not really possible
You can try a python build with GIL disabled, then run with the treading backend
1
A: How to disable the GIL in python3.13?

Caio SalgadoAccording to the What's new in Python 3.13, you need a new Python binary to test it. The free-threaded mode requires a different executable, usually called python3.13t or python3.13t.exe. Using pyenv latest version to install Python, this should give you a virtual environment to test it (in mos...

@mousetail'he-him' I would like to do that but it has to run on 3.12 sadly
Welcome to APL Monday. This one might look drunk, but can be handy...
Apple cider?
17:04
I want to open a bug report somewhere:) tqdm or joblib is the question
What does the following monadic structural function compute when given any rank 3 array argument?
{⍉⍪⍉⍵}
It's not really fixable so I don't think it's a bug
What does monadic structural mean?
@mousetail'he-him' I guess joblib could allow the queue solution
Monadic means it takes a single argument. Structural means it deals with how values are organised, not what the values themselves are.
Thanks!
17:07
@Simd Joblib has many backends, including distributed ones. Most either won't benefit or can't support from a queue based solution. They can't change the interface for one specific use case.
tqdm would also need to change it's interface and add a lot of overhead to support that
@Adám tacit functions are parsed RTL right?
Yes, but this isn't tacit at all.
ah i am dummy
i recalled last weeks apl monday and didnt see the braces :P
@mousetail'he-him' I am sure you are right.
so transpose table transpose... rank 3 gets its axes reversed so table ravels original axis 1 out over 2, and transposing again gives you a rank 2 array where... I am SO bad at reasoning about rank 3+ arrays as anything but nested lists lmao
17:21
Does it create a 1x3x3x2 table?
No.
("Table") ravels each major cell, or in more common CS language, flattens each element of an array.
Ah ok, then transpose would only change the order of the output, not the shape right?
Transpose reverses the order of axes.
how does transpose work on a 3d array?
1 2 3 -> 3 1 2?
17:25
No, 1 2 3 → 3 2 1
> reverses the order of axes
ah
so the function collapses the 3rd dimension into the 2nd?
I guess you could call it that, yes.
@Seggan Wait, does "the function" refer to or {⍉⍪⍉⍵}?
the whole thing
Which way are you counting the axes?
17:31
1 2 3 -> 3 2 1 -> 2 1 -> 1 2
But that's not right (if I follow you), because promises only to keep the first element of the shape intact, replacing all trailing shape elements with their product.
So if anything, you could write 1 2 3 → 3 2 1 → 3 2&1 → 2&1 3
ohhhhh
so is basically ?
but yes. (Ignoring the difference between rank and depth.)
yeah sry was thinking in vyxal for a moment
yeah i got and , backwards
It is in fact exactly ,⍤¯1
Another equivalence would be that ⍪Y is ↑,¨↓Y (but only for matrices; ↑,¨⊂⍤¯1⊢Y in general.)
 
2 hours later…
19:30
I'm inspired for a language where the only control flow is through throwing and catching exceptions
Java?
Java except no if
And no polymorphism
Separate idea: Language where the only control flow is polymorphism. Except OO bros would actually love it
you're probably right 😭
att
att
20:04
what's stopping you from if(true, then-body, else-body) := then-body
That would basically be what you'd be doing one way or another
toasty is now slightly less broken on mobile!
also I see that nobody's actually using it, smh :p
20:42
@mousetail'he-him' how would conditional branching work
@Seggan Anything that could lead to an error, eg divide by zero
This is already usually the most golfy way to branch in JQ, though it also has normal if but it's long
JQ is really fun to golf in btw you should try it
int cond = [zero or one]
try {
  1 / cond
  trueBranch()
} catch (Exception e) {
  falseBranch()
}
like that?
@mousetail'he-him' i dunno jq
Yep
You can learn it in an hour or two, it has like just 20 or so builtins
 
2 hours later…
22:44
@mousetail'he-him' I was actually working on alanguage like that a while back: github.com/ysthakur/oops
I should really get back to it again, it was fun
22:58
@mousetail'he-him' Sounds like my language Exceptionally

« first day (5098 days earlier)      last day (40 days later) »