« first day (2417 days earlier)      last day (2432 days later) » 

12:10 PM
Final feedback for these sandboxed challenges?
3
A: Sandbox for Proposed Challenges

HyperNeutrinoDraw translucent boxes code-golf string ascii-art I'm not sure if this should be an ascii-art because it uses non-ascii characters. note: the string art might look horrible here because of SE font weirdness :P :( Given a list of four-tuples representing the corners of rectangles, draw transl...

1
A: Sandbox for Proposed Challenges

HyperNeutrinoDesign a commutative bijection between any infinite set and unordered pairs thereof code-golf math Related, but this only requires positive integers and does not have to be commutative The Cantor Pairing Function is described in this Wikipedia article. Essentially, it is an operation such that ...

 
@HyperNeutrino wait
 
so X, Y -> sorted((X, Y)) is invalid?
 
well sorted((X, Y)) isn't an integer...
 
where does it say it has to be an integer?
 
12:18 PM
sorry no not integer
 
well you should add that to the challenge body
 
sorted((X, Y)) doesn't belong to the same infinite set as X or Y
 
what if we choose the infinite set of multisets?
then X and Y can be multisets
and Z can also be a multiset
of course Z is unordered here
 
yes
huh
 
so a simple identity function would serve
 
12:20 PM
um
how about an infinite set of orderable items
 
ordered multisets?
 
the identity function will keep their order
 
but the identity function is f: S -> S, you need f: S, S -> S
 
e.g. jelly, 0 bytes
 
12:21 PM
also it has to be commutative
 
@HyperNeutrino well
@HyperNeutrino solved with a simple sort
 
or do you mean f(x, y) = f(sorted((x, y)))
 
first function:
f(x, y) -> sorted((x, y))
second function
f(x) -> x
and x and y are in the same domain as sorted((x, y))
overall that's 2 bytes in jelly (1 byte if we use consensus that you're allowed to get two arguments in the form of an array)
 
well
rip
 
yeah better restrict to integers or something that is not a collection
 
12:25 PM
how about any countable infinite subset of the real numbers
 
hmm, but better restrict to real numbers
since I don't know if complex numbers can't be used as collections
e.g. f(complex x, complex y) -> x + y * i...wait
 
is this how they are supposed to look?
 
(imgur blocked)
 
@HyperNeutrino ?
 
@Mr.Xcoder no
> note: the string art might look horrible here because of SE font weirdness :P :(
 
12:28 PM
my school network blocks imgur
 
@EriktheOutgolfer Bleh, They are horrible on my machine, as you can see
@HyperNeutrino They're just horribly misaligned because of Stack exchange.
 
oh you're talking about my "ascii" art
 
Yes, unicode-art
 
is there a suitable tag for that
 
No.
 
12:31 PM
@HyperNeutrino for the other challenge
 
let's restrict to an infinite set of numbers (just confirmed complex numbers can't be used as collections)
 
is the only one.
 
ok
^^^ sure. I'm going to say countable infinite set
 
so the set of integers (including negatives) isn't countable?
 
12:32 PM
it is
0, 1, -1, 2, -2, 3, -3, ...
 
huh?
 
that way you can also count collections
 
some, yes
 
let's consider a set X of multisets of two integers and X
then we count
 
12:34 PM
huh?
 
@HyperNeutrino Is this how you usually write it in English speaking countries: Given an value in S?
 
{{0 0} {0 1} {1 0} {1 1} {0 -1} {-1 0} {-1 -1} {0 2} {1 2} {2 0} {2 1} {2 2} {0 -2} ...}
except that this way we'll never get to any X
 
@Mr.Xcoder I think it is normally "Given a value in S"
 
@Potato44 That's what I think too
 
@Mr.Xcoder I done goof
 
-3
Q: Create an application that will load a predefined set of short forms from a text file that the user inputs as a command line argument.

armiet drive Create an application that will load a predefined set of short forms from a text file that the user inputs as a command line argument. After which it prompts the user to enter a phrase if the application can convert the phrase into an acceptable tweet (that is of size less than 140 characters) i...

 
12:51 PM
^ September again, time for homework questions
Feels like the number of Prolog questions has increased tenfold this week compared to weeks in August too
 
1:10 PM
0
Q: Design a commutative bijection between any (restricted) infinite set and unordered pairs thereof

HyperNeutrinoRelated, but this only requires positive integers and does not have to be commutative The Cantor Pairing Function is described in this Wikipedia article. Essentially, it is an operation such that when it is applied to two values X and Y, one can obtain the original values X and Y given the resul...

 
1:34 PM
I wonder how big of an answer Somewhere On The Tube …But On Which Lines? would have when answered in Mornington Crescent...
 
Final Feedback?
3
A: Sandbox for Proposed Challenges

HyperNeutrinoDraw translucent boxes code-golf string ascii-art I'm not sure if this should be an ascii-art because it uses non-ascii characters. note: the string art might look horrible here because of SE font weirdness :P :( Given a list of four-tuples representing the corners of rectangles, draw transl...

 
is used for non-ASCII characters
 
^ fixed
 
Why are you using ASCII pipes rather than the full Unicode drawing characters?
 
i'm not...?
 
1:41 PM
Weird. Yay rendering on my screen. :-/
 
there should be an tag as I usually look up when I feel like doing some older challenges, and unicode challenges get left out from that
 
You should also explicitly spell out the code points used for the various box characters
 
I wonder why your box-drawing characters are so mangled compared to my recent challenge
 
@AdmBorkBork link?
also done specifying codepoints
 
I still haven't made box-drawing character drawing for SOGL :|
 
@AdmBorkBork bold and three-armed components are weird
 
Ah, gotcha. That's a shame.
 
it might work better with double lines rather than bold but I am not spending another half-hour copying box-drawing characters ("EDIT" (EDIT: I never edited the first edit in): that's pretty much what I'm about to do for a new language idea (inspired by Funciton ofc :P))
@AdmBorkBork any more suggestions? I have the question in the Ask Question box already and I just need to hit that button :P
 
I don't think you need your note about copy-paste, and I think your bullet points can be summarized as "Any previously-drawn characters enclosed in the newly-drawn rectangle"
 
1:51 PM
so you think that's well-specified enough?
 
For this challenge, you are required to have (0, 0) in the top-left corner and then later you mention that it can be (1, 1), (1, 0) or (0, 1). Just a bit misleading
 
huh will modify, thanks
 
I think your "leftwards facing ..." is convoluted. I get what you mean, but I think it's easier to just say any previous characters.
 
alright, how is it now?
 
Looks good to me, but don't forget your tag.
 
1:56 PM
wait but isn't that only for actual ASCII
 
nope
> Typically this uses only 95 printable (from a total of 128) characters
 
huh
alright, ready to post then?
 
13
Q: Text art or ASCII art? Which tag should we have?

trichoplaxThe tag wiki for ascii-art says This challenge involves creating or parsing pictures using text characters as the paint. Typically this uses only 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963. This makes it clear that "ASCII" here refers to the origi...

 
ok
posted
that downvote was fast
huh onvm
 
^ and it's gone. Guessing someone misclicked?
 
2:01 PM
probably
phew I was worried I missed something :P
 
1
Q: Draw Translucent Boxes

HyperNeutrinonote: the string art might look horrible here because of SE font weirdness :P :( Given a list of four-tuples representing the corners of rectangles, draw translucent rectangles over each other in that order. For this challenge, you are required to have the smallest coordinate in the top-left co...

 
@HyperNeutrino comment ninja for ^ :P
 
Rod
@HyperNeutrino about the bijection question, the functions must be math-based only ? Can I take any approach?
 
any approach is allowed
 
2:20 PM
@HyperNeutrino brb, making a solution that searches the internet for the answer :P
 
._.
yeah go ahead whatever i don't care you'll lose anyway :3 xD
 
@HyperNeutrino Is that an ordinary underscore? It looks too thin
 
yes it is
 
Does it work for me? ._.
 
0
A: List of bounties with no deadline

AdmBorkBorkMore unsuitable language bounties: 2 x 500 Similar in spirit to lirtosiast's bounties 500 rep for an answer in Mornington Crescent to Somewhere On The Tube ...But On Which Lines? 500 rep for an answer in Hexagony to HexaRegex: A Tribute to Martin Ender

 
2:24 PM
CMC: given an integer greater than ten, halt iff the given intger is prime.
 
so if it's not prime, keep running (theoretically) forever?
 
and just silently run forever otherwise?
 
yes, I said "iff".
 
@HyperNeutrino how goes your groups?
 
2:26 PM
@LeakyNun Are we allowed to segfault if the input isn't prime?
 
Still having trouble figuring out how to get it to work for infinite groups
 
That would count as halting I think
 
If it halts, does it matter what it outputs?
 
@HyperNeutrino get what to work?
@HyperNeutrino it doesn't
 
well like get my approach
 
2:27 PM
@cairdcoinheringaahing i'm curious about your segfault solution...
 
Jelly, 6 bytes: ¹ÆPṆ$¿
 
@Sherlock9 Interesting query. Is that the most recent message by every user, sorted by date (essentially)?
 
@LeakyNun Its a Jelly program that just calls itself over and over
 
@HyperNeutrino oh, you're still on the same problem?
 
@LeakyNun 05AB1E, 5 bytes: p_i[=
 
2:27 PM
@LeakyNun yeah rip
 
@LeakyNun If segfaulting on nonprime input counts, Jelly, 5 bytes: ¹ßÆP?
Ignore the stuff in the input box
 
huh well that would theoretically keep running infinitely given infinite memory
 
@LeakyNun Sakura, 3 bytes: W¬p
 
@TuxCopter Wrong ping?
 
oops wrong message
 
2:30 PM
interesting
 
sorry
 
CMC: Cause a segfault
 
@cairdcoinheringaahing C, 7 bytes: main=0;
 
@HyperNeutrino I solved it now
it's easy
You might not want hints
 
2:35 PM
Jelly, 2 bytes: ß¹ (the identity is to prevent tail-call optimization)
@LeakyNun yeah I'll try to figure it out myself first because the way I see it and the way my math professor sees it, once I see the solution I see that it was so obvious, but I still wouldn't be able to figure it out myself. I'll try to do it with no hints first
(does Jelly tail-call optimize?)
 
@HyperNeutrino Jelly is essentially Python
 
@LeakyNun Does Python TCO?
 
@cairdcoinheringaahing no idea
 
I think it does but good question
 
Ven
@cairdcoinheringaahing no
but Jelly has an optimisation for some cases IIRC.
(well, "python" the language doesn't mandate TCO, and I know of no implementations that do)
 
2:38 PM
@El'endiaStarman Should be
 
the version Python3-TIO doesn't TCO I think
 
In [1]: def f(): return f()

In [2]: f()
^CERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py", line 2862, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-0ec059b9bfe1>", line 1, in <module>
    f()
  File "<ipython-input-1-5101c95e76df>", line 1, in f
    def f(): return f()
  File "<ipython-input-1-5101c95e76df>", line 1, in f
@cairdcoinheringaahing nope
 
I'm trying to figure out how to sort it descending, and appending DESC doesn't seem to be working
 
code?
 
@El'endiaStarman Edited again for sorting by date and time: ppcg.starmaninnovations.com/tnbde/#lqLdISoVVG
 
2:43 PM
@Sherlock9 Well, um, I seriously need to update the documentation. There's actually a latest_msg column in transcriptAnalyzer_user that has the most recent mid that user posted. You could then join that with the _message table to get what you want.
 
XD
Oh Lord
 
hmm, trying to get bochs working and I keep running into problems, I expected it to be a pain, but man it's awesome
uhm, i meant to say aweful, got distracted
 
@El'endiaStarman Since my SQL-fu is weak, can you tell me what that query would look like?
 
looks like it's failing to connect to X
 
@FunkyComputerMan why the new username? Can't you just stick with Wheat Wizard?
 
2:47 PM
oh I was missing bochs-x
awesome, that actually works
 
It's amazing how useful that precomputed value is (likewise for U.latest_name).
 
@El'endiaStarman -1, too much shouting :P
 
@cairdcoinheringaahing I DON'T KNOW WHAT YOU'RE TALKING ABOUT.
 
@El'endiaStarman SQL is full of shouting (uppercase command)
> NameError: name 'UNDEFINED' is not defined
Really, Python?
 
@cairdcoinheringaahing Yes, yes, I am well aware of that. :P
@cairdcoinheringaahing It's not Javascript.
 
2:57 PM
CMC: Shortest infinite loop
 
@TuxCopter VTC as dupe of either this or this
 
PowerShell, 7 bytes -- for(){}
 
@TuxCopter Also, is output allowed?
 
@TuxCopter Brachylog, 1 byte:
 
@cairdcoinheringaahing Yes
 
2:58 PM
@Mr.Xcoder SOGL, 14 bytes: I{0;{Xf№}¹№ι}¹ - look at the last line like `¹`@14: [resultHere] for the answer. was fun :D
 
@TuxCopter x86 machine code, 2 bytes: EB FE
 
@TuxCopter Pushy, 1 byte: [
@TuxCopter brainfuck: +[], Befunge: `` (0 bytes) and ///: ///
That enough? :P
Crap, answer 150 just got posted to the OEIS question. Here comes the ninja war again :P
 
yay python
 
@HyperNeutrino totallyhuman just posted in Python 2 :P
 
3:08 PM
:P I just realised that he used Python 2 both times it was available
 
MORE NECKLACES WHY
 
> Number of n-bead necklaces with 2 colors when turning over is not allowed; also number of output sequences from a simple n-stage cycling shift register; also number of binary irreducible polynomials whose degree divides n.
 
@TuxCopter # Recursiva, 12 bytesK'while 1:0' {shameless python exec :D}
 
WTF does that mean?
 
@officialaimm There's no shorter way than an exec?
 
3:10 PM
@TuxCopter, nope because I havent added 'while' yet just a 'for each' in recursiva. :D
 
@TuxCopter This. 'Nuf said
And on that note, bye y'all o/
 
.o/
CMC: Subskin interpreter
 
@TuxCopter This might be suitable for the main, I think!
 
Agreed
 
3:27 PM
@Mr.Xcoder For your CMC earlier, you don't have to use the identity function on the prefixes, instead ZƤZ, TIO
 
ugh, makefiles can be such a pain
 
Anonymous
@Mayube I've never encountered a situation where they aren't painful
 
Apparently, exec('while1:0') in python, doesnot loop neither throws error, how?? :o
 
Anonymous
@officialaimm Well while1:0 is apparently technically a valid piece of Python code, but that's not how you write an infinite loop. You need a space between while and 1.
 
Anonymous
Apparently while1:0 is an annotation
 
3:40 PM
@Mego Thanks. That's weird though!
 
are you kidding me
so I compile my assembly and try to ld it, and it's like "oh this is 32bit asm but you're trying to ld it in 64 bit, doesn't work
so I add -m elf_i386 to ld to force it into 32bit
and now it's like oh this is 64bit asm but you're trying to ld` it in 32 bit, doesn't work"
 
Calm down.
 
4:00 PM
try 48 bit
 
@Poke 72bit is the future
 
no 27 trit is the future
 
2
Q: How many Lynch-Bell numbers are there?

Beta DecayChallenge Given an integer, n, as input where 36 >= n >= 2, output how many Lynch-Bell numbers there are in base n. Lynch-Bell Numbers A number is a Lynch-Bell numbers if: All of its digits are unique (no repetition of digits) The number is divisible by each of its digits It doesn't contain ...

 
oooh I was misreading the error completely, sorry for the rant
ld was saying my asm is 32 bit, then when I told it to force 32 bit it was saying my C code was 64 bit
 
4:27 PM
@BetaDecay I would have commented, but the chain is getting really long.
How does 4 give 6?
I can only think of 4 of them: [1, 2, 12, 21]
 
@DJMcMayhem I'm not sure. I just used the Mathematica code given in the first answer
 
Are you sure that that answer is correct?
Cause the results don't seem to make sense
6 should have significantly more LB numbers since it has more divisors than 5
 
I have no idea. I think they've only checked it against base 2 and base 10
 
But they both give 10
I believe RṖŒPŒ!€ḍ⁸Ȧ€S should work for inputs < 10, but it doesn't match any of the test cases
 
Is the base taken as an argument in that code?
 
4:35 PM
Yeah
But I'm not 100% sure it's correct
But each test case I've tried seems to make sense
 
@DJMcMayhem Manually, I get the solution [1, 2, 3, 12, 132, 312].
 
But 4 is not divisible by 3
....
>_> I'm completely misunderstanding the task
 
The number itself has to be divisible by the digits, not the base.
 
I'm not even remotely close
 
ugh now bochs won't run my code >.> I'm probably missing something stupid again
 
4:38 PM
@Dennis I did the same thing and got the same results.
 
Sorry for misleading everyone >_>
 
It's fine
 
I'm giving up on this task for now
 
:x
 
Although while we're on the topic, @Dennis whats the best way to get all combinations of any length (without replacement) in any order in Jelly? I got ŒPŒ!€
 
4:43 PM
That's not combinations. Combinations have no order.
 
Well then what would you call it when order does matter?
 
Permutations.
 
permutations.
 
But permutations only includes lists of the same length
So I guess I want all permutations of all sublists
 
@DJMcMayhem k-permutations or variations.
 
4:45 PM
So ẆŒ!€ ?
 
No, that'll miss a few. ŒPŒ!€Ẏ is the best solution I can think of. There really should be an atom for that.
 
Really? It doesn't seem to be missing any
 
For [1, 2, 3], this won't generate [1, 3] or [3, 1].
 
@BetaDecay I recommend adding the example [1, 2, 3, 12, 132, 312] for base four. I was also getting different results and only after seeing this example realised that by ignoring permutations with zeros, I was also removing numbers with leading zeros ...
 
1
A: How many Lynch-Bell numbers are there?

Leaky NunJelly, 15 bytes *ḃ€’Q€Qḍḅ¥€⁸Ạ€S Try it online! Complexity O(nn).

@DJMcMayhem *ḃ€’Q€Q
 
5:46 PM
0
Q: Date within range?

XeoncrossGiven a MM/DD date (12/24) and a start/end date range (11/01 - 06/24), figure out if the date is within the listed date span. Date ranges can be sequential (05/01 - 11/01) or wrap around to the next year (11/01 - 05/01). Examples: 12/24 is in 11/01 - 06/24 = True 06/24 is in 11/01 - 06/24 = T...

 
6:25 PM
@cairdcoinheringaahing I think you should post it.
it is ok
 
0
Q: Tag proposal [function-class]

Funky Computer ManI have found myself asking a good deal of questions with a similar theme. I enjoy asking questions in which answers are required to implement a function with a number of characteristics that are well defined but do not isolate a specific function that needs to be implemented. I thought it might...

 
0
A: Sandbox for Proposed Challenges

Magic Octopus UrnAlign the Words Given a list of words l output them as follows: Iterate through l, if it's the first word, output it as usual. If it's not the first word, iterate through this nth word and: Find the first letter of word n that's in word n-1. Align the first occurrence of that letter in word ...

 
Anonymous
@HyperNeutrino Looking at this one makes the others make more sense
 
yeah I saw that one when looking through the crossrefs
but like why do they have the exact same description but different terms
 
Anonymous
@HyperNeutrino Likely a typo
 
¯\_(ツ)_/¯ rip
 
7:29 PM
@Mr.Xcoder Posted :P
@Mr.Xcoder Be honest, did you solve that while it was in the sandbox?
 
No, it was too easy
I started solving it exactly when you posted
@cairdcoinheringaahing Wait, your examples say we should handle division by 0.
 
@Mr.Xcoder Ignore them, I need to change that D:
 
Your last test case BTW
 
@Mr.Xcoder The bottom 3 actually
 
Oh heh
@cairdcoinheringaahing Oh and BTW 3*0 ≠ 3...
 
7:37 PM
@Mr.Xcoder I hope your program is correct, because I used it for the new test cases :P
@H.PWiz does your Husk answer use eval?
 
Nope
 
2
Q: Reverse Maths Cycles

caird coinheringaahingInspired by this In the linked challenge, we are asked to apply addition to the elements of the original and the reverse of the input array. In this challenge, we are going to make it slightly more difficult, by introducing the other basic math operations. Given an array of integers, cycle thro...

 
@NewMainPosts -1, too slow :P
 
oh yeah remember my 70 byte Jelly solution for this?
 
@HyperNeutrino For what?
 
7:42 PM
@cairdcoinheringaahing yeah, pray it works
 
the challenge
 
@HyperNeutrino Which challenge?
 
Reverse Maths Cycles
 
@cairdcoinheringaahing just for clarification, how should % and // behave for negative numbers? I'm never quite sure.
 
oh dammit you added another operator to the challenge
 
7:43 PM
@H.PWiz The result is negative. Like this
(You may not be able to read Jelly, : is basically //)
 
With two negatives, this gives positive for div
 
@Mr.Xcoder what test case has 0?
 
0 is not in [2, 1, 8]
#blamecaching
 
yeah uhm how should I do this in Jelly the serious way
 
@HyperNeutrino wouldn't compressing the Python code by so much shorter?
 
7:50 PM
prolly
 
even not compressing it is shorter rip
in fact right now my Jelly answer is longer than all others, and not by a close number either :P
 
@HyperNeutrino of course miles and his forks outgolf you :P
 
yes ._.
 
8:05 PM
@FunkyComputerMan Like, for real?
 
8:23 PM
@quartata Yeah, I did the lab in Brain-Flak and when they saw my code they asked me to do it again in python.
6
 
@FunkyComputerMan Hahahahaha oh man, that totally made my day
Do you have the code from that still?
 
I wish they let us use Python in my CS course; my "CS" course is just programming basics for Java which I learned like 3 years ago rip
 
@DJMcMayhem Yep I can link it when I find it
The lab had two parts and asked students to implement 2 different algorithms for calculating fibonacci numbers
part 1: https://tio.run/##dZExa8MwEIV3/4oHXSSaQrubbh0KHULoZjzI1jkRkSVhy0nB6Le7Z3dyioQGCX3v7r1TMyjjXjqrrsuCzHqa8enCFGFGBKta0vAO8UIYo2qvUHG7NHQ2zhl3hu9AP9RO0TCXCjGnXN2jYf0UNr3ZeqQCEEJKUQr5Lh/xtTve8PpgwGkorfkh@l0pmU90ZED7u9vxM1uthKzL//yX9wFMm55G3C80EN94IDvngvW8pSzXQnOqOQKHYPn3oNzY@aFHpQ5o6tVp1RygnvmcipQf0QeHs2tztpeycU7U@xttbiKzN2Un2maZ/9I@WNOaCD/FP/vL8gs
part 2: https://tio.run/##lZPLasMwEEX3/oqBLmrRpjRdmyxaWii0UMiydKE4si0ia4weScDo292RkmL3QUK9sKyRdO@ZGXlluNSzSvHNMFz0sJS6FHCfgk8UBMXLjY
 
You should do the next one in JSFuck and be like "What? It's in JavaScript!"
6
 
8:40 PM
@AdmBorkBork I'm almost done with a Brain-Flak to Haskell compiler. When its done I can do all my labs in Brain-Flak and submit them in Haskell
8
 
hahaha
 
@FunkyComputerMan You amuse me
 
8:55 PM
@FunkyComputerMan Well conor had a brain-flak to C one IIRC :P
I'm sure you can just do basically what Conor did for haskell :P
 
@ASCII-only My new compiler will be way faster. Once it is done it should be the absolute fastest way to run Brain-Flak out there. At least until someone makes something faster :P
 
@FunkyComputerMan Faster than BrainHack?
 
@ASCII-only Conor's current compiler and Craneflak are both already faster than BrainHack. The end result should be faster than either.
 
@FunkyComputerMan Interesting. What techniques does it use that will make it so fast? Does it do things like simplifying recognized snippets?
 

« first day (2417 days earlier)      last day (2432 days later) »