« first day (3797 days earlier)      last day (1036 days later) » 

2:05 PM
@StackMeter There are more important things in life than rep and badges
 
@user yes
but not many
 
@user Yup; shaving bytes.
 
that's one of them
 
@Adám I was going to say money, but that works too :P
 
Money has no inherent tangible value, but saved bytes are truly saved.
5
 
2:08 PM
Wise words
 
But in a sense, money, medicine, and code bytes are similar: You should want as little of each as necessary, but no less than that.
CMQ: Why do projects count LoC instead of BoC‽ You can artificially lower your line count, but you can't cheat on byte count.
 
Because it might make people give their variables and functions really short names, which is bad for maintainers
 
what is
 
! + ?
 
An interrobang
 
2:12 PM
The interrobang (), also known as the interabang (‽) (often represented by ?!, !?, ?!? or !?!), is an unconventional punctuation mark used in various written languages and intended to combine the functions of the question mark, or interrogative point; and the exclamation mark, or exclamation point, known in the jargon of printers and programmers as a "bang". The glyph is a superimposition of these two marks. The interrobang was first proposed in 1962 by Martin K. Speckter. == Application == A sentence ending with an interrobang asks a question in an excited manner, expresses excitement or disbelief...
 
@hyper-neutrino so if not?
 
Plus, if you make everyone use the same auto-formatter, you can't artifically decrease or increase your line count (idk what people actually do irl though)
 
It indicates rhetorical questions.
Maybe we need CMR for Chat Mini Rhetorical-question.
or CMRQ.
 
@Adám I can always cheat on byte count: 0 bytes in MyMadeUpLanguage :P
 
2:30 PM
CMRQ: Why are there so many mediocre languages with great tooling and great languages with mediocre/poor tooling?!
 
@user ?! ‽ TFTFY.
 
Not all of us have keyboards as powerful as yours :P
 
If you can download RAM, surely you can download a keyboard.
@user What OS are you on?
 
Windows
 
Then you can just download my kbd.
 
2:35 PM
@Adám I tried, but all I could find were hard copies like this one
 
@Adám Wait, the interrobang is on your keyboard‽
 
Yes. AltGr+Shift+U,?
 
I've downloaded it already, although I can't try it right now because I'm on my mom's computer
@Adám Nice, I'll have to try that later
 
CMC: produce an SE chat message that says backtick space backtick
 
2:43 PM
backtick space backtick
 
Ninja'd
 
` `
 
` `
no escaping is necessary
 
Here's the Sandbox in case you need it
 
How does esolangs implement 2d array input
 
2:53 PM
[[inner,arr],[another,inner,arr]]?
 
what about input from stdin
how do they convert that
 
well you can just eval it
 
eval is not working
atleast when i try to pass it into numpy.array
 
define "not working"
 
ok i am dumb
error on my end
 
3:10 PM
@Adám Haven't we already done this, or was that with backtick backslash backtick?
 
3:23 PM
@Adám ` `
 
0
Q: When's my weekend finally here?

Ian H.I like my job, but sometimes it can get a bit tedious and boring. As motivation, I want to know how many hours of work are left before I finally get my two days of weekend and relaxation. I work every day from Monday to Friday, totalling 38.5 hours, starting at 9am and ending at 6pm. Every day -...

 
i think i found a very useful module for python: github.com/gruns/icecream
this also looks pretty good: github.com/alexmojaki/snoop
 
4:09 PM
would anyone be so kind as to help me fix my fractional cascading code please
 
What's wrong with it? (depending on the problem, it may be better for SO)
 
this reminds me of this website: dontasktoask.com
 
@cairdcoinheringaahing that was backtick backslash
 
ngn
what's the easiest algorithm to encode any string as monospaced chat markup?
 
@ngn you can't encode any string as a codeblock in SE chat
 
4:17 PM
I am just not sure how to get it right
it should be a lot like randomized median finding
 
I can't help you with Python, but
> print("Aargh! This shouldn't happen")
0/0
 
:)
 
that's very sus
 
sus in what sense?
 
Why not raise ValueError("aargh!")?
 
4:19 PM
@ngn hi
@user that's a better idea
 
@dzaima If the string doesn't end with \, you just replace ` with \` and surround in backticks. If a string doesn't start or end with a backtick, you can surround it with more backticks than the longest run in the string. Otherwise (i.e. starts with `, ends with \), you're out of luck
 
ngn
@Anush hi
 
@ngn could you help me with the fractional cascading please?
I am frustrated and stuck
the profit should be 1036.0731707317073 in this case
1036 3/41
 
ngn
@dzaima wow, so complicated. i think i'd better just append a space if it ends with \ and be done with it.
or replace \ with a visually similar character
@Anush i'll have a look in a moment
 
@ngn thanks so much
I wanted the faster linear time algorithm (linear time on average is fine too)
 
4:28 PM
May I ask what this is for?
 
@user is that for me?
 
yeah
 
I like algorithms and wanted to see how much faster the linear time algorithm is than sorting
the plan is to reimplement it in C once it is working in python and compare to qsort
hopefully a lot faster!
 
ngn
@Anush it seems to get stuck in infinite recursion when l,r (left and right) are one unit apart
 
@ngn yes. I think my partitioning part is correct but I have screwed up the recursion
can you see how to fix it?
I feel there is a clean and elegant solution hiding and it would be great to find it
 
4:36 PM
CMC: Given n > 1, output a prime with n digits that contains n as a substring in the digits.
 
ngn
primes are so common, you can start by padding n with zeroes and just look for the first prime after that
 
There are definitely multiple approaches - my Jelly answer is shorter than trying to do that
 
it be would harder if you had specified perfect numbers :)
 
It's a cmc, it's not intended to be too hard :P
 
:)
 
4:45 PM
I have 9 bytes in Jelly :P
 
ngn
@Anush why do you have low=l; high=r? shouldn't the sorting order be descending?
 
0
Q: Print instructions for typing \` in chat

hyper-neutrinoBackground As far as we can tell from trying everything (besides cheating with ZWSPs), you can't type `\ in chat. However, you can type \` by doing `\\`` (I'd love to put these in-line, but no matter if I try using backticks or <code></code>, it breaks formatting here as well. Markdown makes m...

 
@ngn it should. The idea is that l and r just specify the subarray you are looking at
we update low and high in the partitioning scheme so I thought we should keep the original values as l and r
low and high are indices, not values in the array
 
Where is the chat sandbox thing for testing chat stuff?
 

Sandbox

Where you can play with chat features (except flagging) and ch...
 
ngn
4:55 PM
@Anush your comments are wrong then
 
@ngn oh which ones?
ah yes.. they should say densities[low] etc
thanks
 
I have ⁵*ÆRD³D¤ẇƊƇṪ for 12 bytes :c
 
So, a line of \ just turns into one less \ than was in the line?
Dang it markdown
 
@hyper-neutrino do you have a target in Jelly for your new challenge?
 
@ngn an improved version but with no bugs fixed bpa.st/MMJQ
 
4:58 PM
@hyper-neutrino Doesn't convert it's left argument to digits?
 
does it? ¯\_(ツ)_/¯
 
Vyxal uses ` for strings, so if you had to escape every backslash in markdown, you could just do q to solve the challenge.
 
@cairdcoinheringaahing I have 16 but it can almost certainly be shorter
 
@hyper-neutrino Yes it can - see my answer :P
 
5:01 PM
@StackMeter Sandbox please, not here
 
@cairdcoinheringaahing nice :P
i was doing length-each increment \-repeat
 
oh ok
 
Has there been a golf for causing a BSOD or locking up the system?
 
@SlamJammington tricky to test :)
 
You should've waited a few hours @hyper-neutrino, I've already rep capped today :P
 
5:04 PM
@cairdcoinheringaahing well, I haven't, but I'm reasonably close :P
hint: I skipped the sandbox on this challenge
 
235
Q: Code that will only execute once

ojblassGoal The goal of this challenge is to write code that will execute once and only once. This means basically that it damages the program, script, or environment in some way. If rebooting the system allows the code to run again that is permitted. Scoring Number of votes. All assumptions must ...

 
@Anush True, you could run it on virtual machines but thats a lot of hassle
 
@hyper-neutrino Yeah, that's always a strong indicator :P
 
although I also should've waited a few hours; unless everyone suddenly decides to hate my challenge i'm going to cap well before UTC 0h
@cairdcoinheringaahing ha, the vigil answer on that is a perfect example of the absolute correct tool for the job :P
 
@cairdcoinheringaahing thanks! I knew something similar had been done before
Also, is it okay if you post an answer with the same language as someone else? I assume it is, but i just wanted to check
 
ngn
5:08 PM
@Anush why does your sortsolution() use a different densities array?
 
yes, absolutely - by policy we won't even delete identical solutions (unless there's clear plagiarism which has happened) especially if they were posted really close to each other (though the one who lost the FGITW will usually self-delete it anyway)
 
@ngn argh.. it shouldn't!
 
Sweet, thanks!
 
@ngn are you sure it's different? It is meant to be the same
 
ngn
@Anush it consists of the same values as the first densities, but i was wondering why you have to redefine it
 
5:11 PM
@hyper-neutrino 11 bytes :P
 
@ngn oh that was just because my jupyter notebook was changing the values of densities for some reason and I wanted to be sure
 
@cairdcoinheringaahing oh that's clever i should've thought of that xd
 
Ugh, I hate that y is character only
 
yeah :/
 
ngn
@Anush unbloated version:
https://tio.run/##jVLbcpswEH3XV2zjF4jXg7HNxXKUX@gHMH6gQtSiGBhJNnF/3pUsQppMH8owaDlnOXvY3eFmTn23vd8X36KLVtEP2UWiu8LgcVKr/gzalEZqI7kGeR56ZeAsKll2pBI11EGLCisckYcUFi1tRW1QUSV/ngxWtBKdlkYKjSMdhQM1csrLoeTS3AjIGlrGbL4wF9XBQ8yirD00TB0G5ksFRVXII1ZF4x6BXDZhFG2OxxAWAx3ktTcoaduP2NCTrUFgPMlWgHxpKAFXA8AJvLIByq4Cp2NjKpcstrxobcZX/gUG2qw@8xb7b97pz6bZ5FweD6PDRofN0WHW0YKWWgvb4jUBzfTlHIyFtRkfw0er9IvtHeMrfZDYYMVq24p47j/xTvQrp@90686JnFr8oAjhLM/2sJgncWXFPsZsg/s17lJMEsxxm2CWYBpjbIMMd2tMtw7Z7N0zzjDLHbjbHe0cVF9Lo8nIinyH@RZ39rYUpphb0Q1uEocmKcY5JjnGlswxW@M@xe0G09zmWJlpR0jFirfoBnWv4A1vIDv4LYfgi
 
5:15 PM
Although, even if it were, it's still 11 bytes
 
ngn
jupyter notebooks should be banned
@Anush are you sure this is O(n)?
 
after discovering that "replace ` with \` and surround with `" is a solution my challenge is quite boring now :c
 
5:31 PM
@hyper-neutrino It's deceptively difficult in Vyxal since it uses ` as string delimiters.
 
ngn
@Anush actually, your first function moves around the values in the array, so it would be better to copy it
@Anush this doesn't look correct:
        weights[low], weights[high] = weights[low], weights[high]
 
doesn't vyxal have escapes tho, so it's just lengthier
 
Vyxal uses \ for escapes
 
right but you can still do something like `\`` \` V probably
 
5:40 PM
But, for example, `\`\\\`\\`\\\`\`` becomes `\`\\`\`\\`\``, and I need to turn some of the 1-long lines of \ into \\ and some of them into \\\.
 
wait does \ have special meaning with V as well
if you can't use V you can probably just use the split length increment repeat join method
lol Pip uses ` for regex and has the exact same escaping mechanism with SE chat so uh...
it's like if q worked in vyxal :P
 
Clearly, I don't know how markdown works.
 
yep .-.
pip bug is a feature i guess :P
if \\ became \ and \` became ` this would be far too trivial
 
Yeah. However, I was able to get kinda close, so that's something, I guess?
 
ngn
5:55 PM
@math you don't have a test for the "mega double plus"
 
Shall I make one?
 
ngn
well, if you want your challenge to be taken seriously :)
 
ok
It'll take some time
`\
 
@ngn argh that looks wrong
@ngn it is if you really choose the median or if you pick a pivot at random (then it is linear time on average)
@ngn I guess f doesn't work yet?
@ngn I was hoping it could be inplace, like partitioning in quicksort
@ngn it no longer recurses forever at least
@ngn I still don't know how to get the right answer from it though
 
6:14 PM
rip @ngn's inbox :P
 
@ngn version with the bug you spotted fixed bpa.st/7JUA
 
ngn
6:35 PM
@Anush my reasoning is: assuming good pivoting, there will be log(n) iterations. at each iteration you compute sum(weights[:low+1]). "low" is n/2 on average, so the whole algorithm is O( log(n) * n/2 ), aka O(n log n)
(could be wrong)
 
@ngn you need to add n + n/2 + n/4 - ...< 2n
It's the same reasoning as finding the median of an array in linear time
 
ngn
@Anush but you're summing from low till the end of the array, not just till the end of the current slice
 
@ngn if I am doing that it is wrong. The portion of the array being considered should half in length each time
 
isn't finding median linear log to sort and constant to get if sorted
 
@ngn that's another bug then.
@hyper-neutrino no. You do it recursivejy but only look at one half at each recursive step
 
6:42 PM
how do you halve the array and be sure the median is on a specific side
 
@hyper-neutrino pick a pivot at random. Then move everything smaller than it to the left and everything bigger to the right. You now know the rank of the pivot. If it is more than n/2 you know the median is in the half. Otherwise it's in the second half. Then recurse
 
@Anush if you're assuming the array is sorted anyway isn't finding the median just a[a.length / 2]
 
@hyper-neutrino no I am not assuming it is sorted. It is trivial if sorted as you say
 
oh wait
i misread that
i see how this works. yeah that sounds right - didn't think median of unsorted array was possible sub-linear-log but that's cool
 
"in the half" should be"in the first half"
@hyper-neutrino it is cool. But I am failing to implement a similar algorithm!
And hoping ngn can fix it
 
ngn
6:50 PM
@hyper-neutrino actually, we're not looking for the median but for something similar - an index i such that sum(x[0], x[1], .., x[i-1]) is as close as possible to a given "capacity", where x is the sorted input (though we don't explicitly sort it)
 
ngn
        return ((cumweight+weight-capacity)/weight)*(density*weight) + cumprofit
@Anush ^ you could cancel the weight-s
 
@ngn true!
Or just use the profit vaiue which we also have
 
7:31 PM
I wish SE chat would make me leave the room when I close the tab
 
it does after like 15m i think
or some amount of time
why do you want instantly tho
 
because it clutters up my right side bar, and shows me messages that I no longer care about
(or never did care about)
cough sandbox cough
 
oh wait that's what you meant sorry
yeah i'd rather it not, because i don't want to have to keep 18 tabs open
*19, apparently i'm in 19 rooms right now
 
@pxeger Sorry
 
lol it's not your fault
 
7:38 PM
Hey @ngn, great to see you!
Or at least to read you
 
also thanks for fixing my question text lol (pxeger)
 
np
Nothing a little https://gchq.github.io/CyberChef/#recipe=To_HTML_Entity(true,'Numeric%20entities') can't fix
 
huh that's cool
 
Do any stack langs have a (repeat operation until there's one element left on the stack) commands?
 
Yeah - I don't have many bookmarks on my toolbar, but CyberChef is one of the few
 
7:42 PM
Eg. +. would keep popping and adding the first two elements, until you were left with the sum of the stack?
 
so wrap + reduce?
 
Is that what that command is called?
 
it's not necessarily reduce, because it can "return" multiple accumulator values (by pushing more than one thing on the stack), and accept multiple items at a time
 
\o caird
 
7:45 PM
So what's an example of a stack lang that has that?
⍤/
 
none, that I'm aware of
 
Really?
 
I'll add it to the feature ideas for mine :þ
 
Is that worth recommending for, say, Vyxal?
 
yes probably
 
7:46 PM
Oh, nice!
 
@lyxal ^^
 
@pxeger o/
It's weird to be joining/leaving the room tbh
 
In my case, it sounds like wrap/reduce would work @hyper-neutrino. How do you do that?
 
In what language?
 
Just for the record, I said hi too!
Any stack lang
 
7:49 PM
@AviFS Oh sorry, I didn't notice! Hi :P
 
@AviFS Wλ ... ;R in vyxal
just wrap the stack and reduce over some function
 
ngn
@AviFS hi avi, great to see you too
 
@cairdcoinheringaahing Just giving you a hard time, haha
 
not the same as what you asked for as pxeger pointed out, but if you have a ,_=> function this works i think
idk if this reduces the right way
 
@ngn Yeah, it's been a while!!
 
7:50 PM
I normally have my laptop open/on all the time so I'm always in the room. Except I'm currently not at home for the past few days, and am only using my phone to check in on the site/TNB from time to time :P
Therefore, joining and leaving the room everytime :P
 
wait where are you right now :p
 
@ngn Is ngn/apl made for golfing?
Or does it stick with the APL philosophy
 
@hyper-neutrino About an hour's drive from Adám :P
As opposed to a 2.5 hour drive
 
i see :p
 
Because I had a wildly unpopular idea for a golfing APL
 
7:52 PM
sounds like jelly with extra steps
 
(I'm checking out accommodation options at the uni I'm going to in the fall)
 
@cairdcoinheringaahing I love the metric, haha
 
ah that's a good idea :p do you like it so far? (i'm assuming you've already been there if you've been away for a couple of days)
 
@cairdcoinheringaahing how do you know where Adám lives precisely enough that you can define how many hours' drive it is? (London + driving = wild)
 
Plus meeting up with some old friends, I used to live here :P
 
7:53 PM
Oh nice! That's a great idea
WHich one?
 
ngn
@AviFS i don't maintain it anymore but it's still available on tio.run
 
@pxeger I'm Google Maps
 
Does Adám make his address public?
 
@ngn I know, just curious what the intended audience/use case was
 
7:54 PM
@pxeger He's made his area public
@AviFS Bristol University
 
Ooh, congratulations!!
 
i don't think ngn/apl changes that much (if at all) over standard APL (is there a "standard APL"? I assume it's just the dyalog official implementation?)
 
@AviFS Thanks, should be a fun 4 years :P
 
@ngn The idea was to notice that =/ is useless. And that checking if all elements are equal is very difficult. So I was wondering about changing the behavior of =/ to do that
 
ngn
@hyper-neutrino there are standards but paywalled and too old
 
7:55 PM
@cairdcoinheringaahing I was gonna say that's fair enough because people know he works at Dyalog and they know where Dyalog's offices are, but given the following I'm assuming he works remote:
 
I actually used to live in Bristol when I was a kid, and so I've got a lot of old friends here. It's going to be nice to meet up with them
 
So for instance 3=/ would check chunks of 3 to see if they were all the same, useful for say a tictactoe game
 
(nightmare commute from anywhere in London if not)
 
@pxeger Adám has publicly said the first 3 bits of his postcode here IIRC
 
Currently n=/ is an entirely useless function for all n except n=2. (And n=2 would work the same way if it were implemented this other way.)
Adám hates it because then =/ is different from {⍺=⍵}/. So it's a case of consistency vs utility, which is why I was wondering if it was for golfing
</rant>
 
7:58 PM
@AviFS Check all elements equal the first
 
Right, that!
 
It's 5 bytes in APL (I think, maybe more because of its chaining rules)
 
Yeah, @Bubbler came up with this:
3(⌊/=⌈/)1 0 0 0 1 1
Which is pretty pesky for golf
 
I don't like the idea of special-casing = in =/ even if it's in a golfing language because it's just confusing and you may as well just implement E
much less for APL lol
 
@AviFS =/ checks if the array is in the form [n,n,1,1,1...] or [n,x,0,0,0,0,...]
 
8:01 PM
@hyper-neutrino But it's absolutely useless, except for 2=/ which would stay the same were it changed
 
@hyper-neutrino My golfing language has as framework for replacing code that would otherwise duplicate other code with different builtins (e.g. [reduce] [add] already exists as [sum], so [reduce] [add] is now FizzBuzz). MAXIMUM ENTROPY!
 
well not exactly useless, it does what caird mentioned which isn't really helpful for most cases but this behavior is expected
all-equal is not reduce by equality anyway, it's its own function
 
@cairdcoinheringaahing It's a lot more complicated than that, I'm actually writing a code-golf challenge as a decision problem that would run =/ on a list
Eg. =/0 0 1 0 1 0 is truthy
 
@hyper-neutrino Reducing is often thought of as "joining the array with the function", so if you did it like Python chains comparisons, then =/ would be all equal
</ would be "is descending" and >/ would be "is ascending"
 
That would also be way more useful!!
You're totally onto something, caird
 
8:04 PM
That could be a different form of reducing tho
 
I propose this behavior for a golf apl
That's true
 
hm, true
 
Even Dyalog could implement this, I suppose
 
It does involve that "interpretation" of reducing, and having comparison chaining rather than associative functions
 
Speaking of notation as a tool of though, I think =/, </ & >/ are really clear ways of reading, 'equal', 'descending' & 'ascending'. Just with a different reduce op as suggested
 
8:06 PM
For example, if you understand reducing as "Do x to the first two, then do x on that result and the next element and so on", it doesn't make sense
 
this form of reducing is just {∧/¨ 2 ⍺⍺/¨ ⍺ ,/ ⍵}
 
@Adám What do you think of this?
 
@hyper-neutrino Yes indeed, I know what this says :P
 
@hyper-neutrino That just means it won't be so hard to implement!
But you can't possibly advocate for that as good notation for something so conceptually simple
@cairdcoinheringaahing ikr haha
 
given a number n on the left, a function f on the left, and a vector a on the right, this is an operator that n-wise reduces a over pair which gets slices of size n of a, then pair-wise reduces each slice by f, then reduces each result by AND
 
8:08 PM
Yeah, the ⍺ ,/ ⍵ was the main bit I didn't get
 
Ah, I see, that does work!
So you're basically doing this for </, right?
∧/2</1 2 3
 
well it works for any function
 
That doesn't work if α isnt passed as a argument (aka =/)
 
^
idk how to implement it to work for both monadic and dyadic
 
@AviFS I'd rather have a way for to handle the edges better.
 
8:11 PM
SFF election finished; TheLethalCarrot won
 
(Why do I feel like I'm in the APL Orchard here?)
 
@hyper-neutrino Good, my top candidate :D
 
@Adám is so overkill for this though (and most things really)
 
TLC had almost majority from the first round alone
 
User931 got too much of the vote :/
 
8:13 PM
Hey @dzaima, long time no see!
@hyper-neutrino All the more reason to introduce a new operator, no?
Can we make this a feature request for abrudz/extended?
 
@hyper-neutrino imo that has two separate parts - f←{∧/2 ⍺⍺/⍵} and g←{⍺,/⍵}, composed as operand f¨ ⍺g⍵. g also then becomes the other reduce-like thing discussed
 
@pxeger Not that bad, actually. There was a while I went from London to the office Sunday night, and returned home Thursday afternoon. I've also commuted from (far) west London to the office on a daily basis. That was nice, as I went against the peak flow.
 
(gtg, I’ll be back later!
 
@dzaima (of course g is still broken on non-simple )
 
@Adám That's a hell of a traffic jam
 
8:19 PM
@cairdcoinheringaahing Where? When?
 
@Adám Leaving London on Sunday night and returning on Thursday afternoon, that's almost a 4 day jam :P
 
:-P
 
Dyalog rents a really nice house about 15 mins by car from the office. People from afar stay there when they visit HQ.
 
Repcap!
 
8:37 PM
0
Q: Try to simplify/shorten this python code

Димитрий i0xNew to codegolf.stackexchange. Was wondering if it's possible to make this code more simple/smaller (XOR Encryption, One-Time Pad) a=lambda*b:''.join(chr(ord(c)^ord(d))for(c,d)in zip(*b))```

 
Dimitriy?
 
9:03 PM
@pxeger @cairdcoinheringaahing I'm here:
 
9:37 PM
@Anush I gave it a shot after seeing it linked in the starred messages list: codegolf.stackexchange.com/a/230327/3852
I hope 50 isn't "so boring and long that nobody bothered submitting their 50"!!
I think 90% is a nice sweet spot and 95% will be a bit frustrating/unforgiving, especially if the word list isn't very carefully curated, which no 10k word list really is. For example the English one here has la and the Spanish one has iceberg
 
9:58 PM
0
Q: Time till Friday

l4m2Output the time I need to wait till Friday, in seconds; or zero if it's already Friday. Your program shouldn't run for more than 1 second on a reasonable computer. (This avoids someone waits till Friday and outputs 0) Shortest code in each language wins. Languages without access to clock can read...

 

« first day (3797 days earlier)      last day (1036 days later) »