« first day (3799 days earlier)      last day (1027 days later) » 

ngn
3:00 PM
@felipa don't any of the answers here solve your problem?
 
@ngn no!
they don't care about nice partitioning sadly
they only care about bytes :)
I don't think any of them is in-place
I guess I could have posed a fastest-code challenge but then I would need to have given huge input cases
@ngn en.wikipedia.org/wiki/Quicksort#Hoare_partition_scheme looks a little like anush's partitioning
 
You need to define what you mean by "code golf video" — Luis Mendo 6 hours ago
 
@Adám how come no APL answer to my challenge?
 
@felipa What challenge?
 
13
Q: Continuous knapsack but fast

felipaThe input for the continuous knapsack problem is as follows. For each item 1...n we are given a positive weight and profit. Overall we are also given a positive capacity which is the maximum weight we can carry. The goal is to pick items so that the profit is maximized without exceeding the capa...

does anyone have any idea if this is correct ? codegolf.stackexchange.com/a/230391/7310
I can't test it as I don't know what the input should be
I mean the answer by user1502040
@pxeger ah do you understand it?
 
@felipa 1) I've been busy 2) It looks complicated and I tend to mostly answer smallish problems 3) I'm not very good at time complexity things
 
@Adám all good reasons!
maybe a jelly person will give it a go
 
3:32 PM
I can't speak for other people, but I dislike [restricted-complexity] challenges just in principle, but even if I did decide to try one, I'd never use Jelly :P
Jelly is very good at golfing and a pain to use for anything other than the shortest, often simplest, method :P
 
i would be more willing to use jelly than brachylog
 
I might give it a shot, ignoring [restricted-complexity], and then just ping you here in chat with it @felipa, but I wouldn't hold out for a Jelly answer (at least not before an APL/J/k answer that can be ported)
 
ngn
this problem isn't particularly hard. i can't right now, but i'll give it a go later.
 
An interesting for of Jelly golf: fewest links, rather than fewest bytes
Essentially but Jelly specific
 
Right, that'd make sense for APL too.
 
ngn
3:36 PM
@felipa for 3way partitioning in-place - search for dutch flag sorting
 
I am ready to steal answers for my repo whenever you guys post one
 
@ngn thanks. At this point I was just really hoping for some code
@cairdcoinheringaahing cool
 
@Razetime Are you a repo man?
 
idk
 
I meant wdym by your comment?
 
3:41 PM
@Adám I think it might be slightly harder to define for APL (but a lot easier than other languages) tho
 
@cairdcoinheringaahing why would you need to ignore [restricted-complexity] ?
@ngn if that was for me... thank you!
 
@felipa Because that's an entirely different challenge
 
@cairdcoinheringaahing different to what?
 
[code-golf[
 
but isn't it just like any other specification? E.g. having to give the right output
 
3:43 PM
@user this
 
It means that I can't use the obvious approach, but which could lead to some clever golfing tricks. Instead, I'd have to focus on making it fit within the complexity, which would (IMO) make the program less interesting
 
@Razetime Oh cool
 
or read a particular input format
 
@cairdcoinheringaahing No, it is actually quite easy for APL.
 
@cairdcoinheringaahing I guess I don't really see the difference to having to compute something difficult
 
3:44 PM
@felipa Put it this way: if I can save a byte making my program (in some random challenge, not necessarily yours) go from O(n) to O(2^{n!}), I have and will
 
@cairdcoinheringaahing would that be ignoring quicks or would it just be counting digraphs as 1 and then either leaving literals as is or forbidding some classes of them
 
In [restricted-complexity] challenges, I can't do that, so I'm constrained by something other than what I'm capable of doing
 
@cairdcoinheringaahing I understand. I just don't see how that is different from changing the output from correct to incorrect if the challenge is at all clever
 
@UnrelatedString For example, H+¥/ would be one link
 
3:45 PM
Essentially, the length of the parsed chain (as attrdicts) before executed
 
ah, so (ab)using ¤$ƊƲ¥ɗʋ isn't an exploit, it's the name of the game
 
Yeah, basically
 
CMC Convert bpa.st/7YTQ to be in-place (that is create no new lists)
 
It's why I generally prefer over R, because it's one fewer links
 
3:47 PM
CMCnR: Python snippet like abc %s def that, when formatted with an arbitrary expression, executes that expression in Python 3.9 but doesn't in 3.10
 
i suspect you could get most stuff into one link
 
I frankly have no idea what euro and R do, as I don't do golfing languages. But I'm interested. Does the former have to do with money somehow?
 
no
 
euro in jelly is map
 
@pxeger You've been hacking the CPython interpreter again, haven't you? :P
 
3:48 PM
nope, no hacking involved here! :þ
 
i think there's another language it's map in but it's prefix instead of postfix lmao
 
@felipa It's those kind of restrictions I dislike in challenges :P [restricted-source] is generally ok as it generally involves more creative approaches. But complexity, time and memory are annoying to me
@UnrelatedString 05AB1E
 
@cairdcoinheringaahing each one to their own, said the woman as she kissed the cow :)
 
@pxeger I have not used any version of python since 3.8 (yes I'm an old-timer) because I've been moving to JavaScript lately
 
@UnrelatedString You can definitely get most stuff into one chain, but links are more challenging
@felipa Indeed :P
 
3:49 PM
@RecursiveCo. Python 3.8 is not old
 
Now, I have a cow to kiss :P
7
 
I know I was joking
 
i was 85% sure it's 05ab1e but i also felt like the last time i tried using it there was some other mapping thing that came up
 
oh no the hivemind is back
 
@RecursiveCo. I only use Python 0.3 because it's the most recent AFAICR :P
 
3:50 PM
Yes someone unstarred hyper's JS is "normal"? message. One step closer to criminal programming language justice reform
it had 9 and now it had 8 I believe?
 
@cairdcoinheringaahing I'm not sure there ever even was a Python 0.3 <!-- note: I just instinctively typed 3.0 lol -->
 
@UnrelatedString is a single command map, 05AB1E also has a "block map" command
 
@RecursiveCo. I'd star it but mobile doesn't have a starboard :/
 
python 3.10 seems to have actually improved its error messages!
 
3:52 PM
Could I have an example?
 
@RecursiveCo. for what?
 
@RecursiveCo. When you do 1/0, the compiler steps out of the computer, slaps you and says "No"
 
the new and improved error messages @pxeger
 
@cairdcoinheringaahing Here it is
 
well now it has 9 :(
 
3:53 PM
@cairdcoinheringaahing Doesn't work properly on Windows, I'll file a bug report :/
 
@user I can't star it unless I scroll all the way up to it (in the room, not the transcript) :/
 
@cairdcoinheringaahing Have you tried the desktop version?
 
@user Oh yeah, it only works on cairdOS
@user I refuse to touch that on mobile unless I'm moving messages
 
@pxeger So finally a language that doesn't say "syntax error: missing )" on a ")"
 
3:55 PM
I can do literally anything else via the mobile site (including kicking), so I only use the full site if absolutely necessary
 
the "moderator on the move"
 
@cairdcoinheringaahing Hmm, I really need to get a laptop with cairdOS, the superior OS. Currently, the compiler just steps out of the computer, and slaps me 1/0 times
 
Ok, I'm going to test something: the mobile chat allows me to "kick" myself, so I may be seeing y'all in 30 seconds :P
 
@cairdcoinheringaahing Imagine needing your phone to kick people :P
 
@cairdcoinheringaahing See ya!
 
3:56 PM
Hahaha
It shows this drop down instead:
 
note that the compiler is not responsible for division by zero errors
 
> Really, you want to kick yourself? I suggest a long walk instead.
7
 
lmao
 
lol
What does it say when you kick hyper?
 
3:56 PM
@cairdcoinheringaahing off a short plank, maybe?
 
Enough lmaos and lols lmao
 
or one of the ROs
 
mods don't have a kick button I think
 
@user ROFL
 
I can kick the other ROs, so I don't want to test that
@hyper-neutrino Mind me trying for you?
 
3:57 PM
if you want, go ahead - I know it won't work though :P
 
Soothe the hyperactive neutrino
 
> You cannot kick moderators.
Booo
 
yeah, there is pretty much nothing you can do stop a mod from chatting
 
Aw, was expecting a screenfight
 
@cairdcoinheringaahing But you're not a mod.
 
3:58 PM
they are ROs everywhere so timeouts don't work, we can talk in frozen rooms, I think we can even talk in deleted rooms
@Adám caird tried to kick me
 
@hyper-neutrino Yep, mods can talk in deleted rooms
Even ROs can't do that :/
But we can talk during timeouts
 
Though why you'd want to talk in a deleted room is beyond me
 
@cairdcoinheringaahing wait what
 
You can?
 
oh. timeouts. that makes a lot more sense
 
3:59 PM
but Stack Exchange (the user) was able to chat for a few days after being suspended
 
@RecursiveCo. To explain why the room was deleted
 
I mean, ROs can start and stop timeouts, so it wouldn't make sense that they couldn't talk during them :P
 
@RecursiveCo. To flex
 
@RecursiveCo. That depends on the are they get suspended on
 
suspensions on the main site != suspensions in chat
 
3:59 PM
from the docs: > SyntaxError: invalid syntax. Perhaps you forgot a comma?
 
Can ROs kick ROs?
 
@Adám ROs can also unRO ROs
 
If I kick someone, doesn't that mark them for life?
 
@Adám Why, are you planning a coup?
 
yes, but nobody really checks that
 
@Adám Depends on how hard you kick them
 
If you kick them 3 times, a flag is raised. Otherwise, I think it's just a mod tool
 
there's a mod exclusive page that shows us KM history and TBH I've never checked it because we just use annotations if a user is being troublesome repeatedly
 
Oh just read that python 3.10 has a switch statement
Although it's sorta redundant
 
4:02 PM
but yes, repeated kicks raise a mod flag automatically (presumably not if a mod is doing the kicking)
 
We were messing around with kicks a few years ago in here and accidentally summoned half the network mods because I was kicked 3 times :P
@hyper-neutrino Nope, even if a mod kicks, it raises a flag
 
huh. lol
 
@RecursiveCo. It's more useful than a switch statement like in C style languages though. And it's certainly not redundant
 
DJ kicked me 3 times IIRC and we had to explain everything to a bunch of mods :P
 
redundant perhaps because of the existence of elif
@cairdcoinheringaahing who's DJ?
 
4:03 PM
@cairdcoinheringaahing For testing?
 
@cairdcoinheringaahing he did? i don't see that on your history :p
 
@RecursiveCo. Everything is redundant if you want a Turing tarpit. Convenience is what matters
 
@UnrelatedString why would you do this to yourself xD
 
4:03 PM
...did i forget the last quick
oops
...
 
did python 3.10 add match too or is that smth else I'm thinking of
 
and it broke it?
adding it broke it
 
@hyper-neutrino that was what I was talking about
 
@hyper-neutrino That's what they were referring to
 
Terrible news: syntax like 1if 2else 3 (combining numeric literals with keywords with no space between them) will be deprecated in Python 3.10 and removed in Python 3.12
 
4:04 PM
@hyper-neutrino Errr, let me go search for a bit
 
@pxeger wait what?? :(
 
@pxeger The horror! How dare they persecute us code golfers!
 
wait no i think that was the wrong one lmao
 
4:05 PM
@pxeger Goodbye to easy recursion, easy byte savings and easy unreadability
 
@UnrelatedString That's not one link
 
yeah i copy pasted the url from the wrong tab
this is one link
 
@RecursiveCo. goodbye to easy recursion? it will only be a 1 byte loss in most cases
 
@pxeger In unrelated news: no code golfer upgrades their Python version past 3.11 :P
 
lol
 
4:06 PM
@pxeger I misunderstood, I thought that the if else syntax was being removed
 
unless i counted wrong and it somehow still works to paste it straight into the footer
 
@cairdcoinheringaahing Well, TIO isn't up-to-date anyway
 
@cairdcoinheringaahing but what if my secret bonus feature that I'm hacking into CPython gets merged in 3.12?
@RecursiveCo. ah I see
 
Z×3\€ḊṖƊZƊa×3\€ḊṖƊḤƲJ%3ZƙƲ⁺€Z×3\€ḊṖƊZƊa×3\€ḊṖƊḤƲ€€Ʋa3Ɗ,,Z×3\€ḊṖƊZƊa×3\€ḊṖƊḤƲƲFSƊ
 
it'll be like minecrafters not going beyond 1.8 even with another 8 versions after; golfers will just stop upgrading at 3.11 and stick to that forever :p
 
4:07 PM
Maybe I'll write in to complain on the python-dev mailing list
 
@hyper-neutrino It's the opposite for JavaScript as when I look at old JS answers I think, "wow, es5 is clunky"
 
I think a better counting system for the link-golf would be to only allow the grouping quicks (ignoring the nilad one) if followed by a quick
 
you can still cheat with like W[...]$<each> i think
 
i feel like if you make the obvious solution long and/or dyadic enough it might not be super easy to one-link but we'd still ideally not want the solutions to be one link or else why are we even calling it a scoring method
 
Bug?
 
I don't think so
More UB than a bug
 
it seems that -x / instead of reducing over windows of size x, reduces over the entire list with each such window reduced
 
do people have their favourite ways to make writing C sane? I just discovered -fsanitize=leak,address,undefined which is pretty amazing.
 
4:15 PM
> writing C sane
impossible
 
congrats for 1234 gains
 
Wait isn't that just outfixes?
 
noice
 
¯\_(ツ)_/¯ i think so?
 
I have written a comment on the Python bug tracker about the 1for change: bugs.python.org/…
 
4:20 PM
I wouldn't mind a deprecation/ambiguity warning since it is bad style and things like 0x1for could get confusing, but making it error would kinda suck
 
65
Q: Why does Python return [15] for [0xfor x in (1, 2, 3)]?

InfinityWhen running the following line: >>> [0xfor x in (1, 2, 3)] I expected Python to return an error. Instead, the REPL returns: [15] What can possibly be the reason?

 
> I recommend just letting this be. Aside from it allowing for a cute riddle, in the real world seems to be harmless and not worth breaking code.
I think raising a Syntax Warning would be an appropriate compromise (which has been suggested in the bug tracker thing)
 
SyntaxWarning sure, but only ever a warning, never an error please
 
ngn
4:55 PM
@felipa yes. should i post it as an answer? (once i'm ready)
 
ngn
5:15 PM
 
5:27 PM
@pxeger a byte is still a byte
 
5:59 PM
@hyper-neutrino is the bug with undeleted answers on deleted questions still around?
 
I think it's a "feature" not a "bug" or smth - they get deleted within an hour anyway and the weird number of undelete votes isn't a huge deal
I don't think it's been reported
 
Given that it requires mod undeletion, does it ignore locks?
@hyper-neutrino Andrew not going for the easy MM rep? :P
 
... not sure
 
@hyper-neutrino Have at it :P
 
like, wdym by ignore locks
 
6:06 PM
Users can't VTD locked posts, but I think mods can without having to unlock them
 
can't mods just... delete?
 
Well yeah, but they do that by VTDing :P
 
if I delete a post it says in the timeline "deleted by vote"
 
an incredible showcase of democracy
 
6:22 PM
Indeed, we should make this world wide :P
I support HN as the leader of Canada, and for the Dutch to rule the world :P
 
ngn
@hyper-neutrino but you're not vote, you're hyper-neutrino
 
my first campaign promise as leader of any country is to golf the laws
law books are far too long and difficult to understand. i say we golf them for ease of access for the people
 
laws: 1. don't be mean 2. see 1
 
1. no kill 2. no bad
 
too long
1. be nice
 
6:31 PM
1. no
 
@cairdcoinheringaahing everything is illegal
 
but I'm glad we all agree that 1-based indexing is superior
 
ngn
@hyper-neutrino but think about all the lawyers and judges. how are they gonna feed their families if the laws are clear to everyone?
 
Imagine not using 0 to indicate that an element isn't in the list :P
 
you're not allowed to steal, but you're also not allowed to possess
 
6:32 PM
@ngn bribery :P
 
ngn
oh, right..
 
you're not allowed to lived, but you're also not allowed to die
wait...
 
Yes
Why live when you can die, but also, why die when you can live?
 
you're not allowed to think either
stop it
 
but i'm not allowed to stop either
 
6:35 PM
the law isn't allowed to disallow that tho
 
you're not even allowed to think
 
@totallyhuman If everything's super illegal, nothing is :P
Honestly, I quote that line from Incredibles far too much :P
 
7:23 PM
@Razetime only for cardinal infinity. for ordinal infinity, 1 + infinity = infinity, but infinity + 1 > infinity. for surreal infinity, 1 + infinity = infinity + 1 > infinity.
 
 
1 hour later…
8:38 PM
@Razetime That's cool! ... but why do you say that? I assume it's something to do with using ASCII, but couldn't non-ASCII languages still be scored in characters?
@cairdcoinheringaahing That's not possible. :D But if you want some variety, you can quote from The Point instead: "A point in every direction is the same as no point at all!"
 
@DLosc My only problem with quoting The Incredibles is that its close to 20 years old and I never look back darling, it distracts from the now :P
 
@cairdcoinheringaahing Hahaha, touché ^_^
 

« first day (3799 days earlier)      last day (1027 days later) »