« first day (2431 days earlier)      last day (2407 days later) » 

1:00 PM
0
A: Sandbox for Proposed Challenges

Kevin CruijssenBack to the Basics of Math code-golfarithmeticintegernumbersequence Introduction: We all know these three basic arithmetic math tables I assume. ADDITION: + | 1 2 3 4 5 6 7 8 9 10 ---------------------------------- 1 | 2 3 4 5 6 7 8 9 10 11 2 | 3 4 5 6 7 8 9 10 11 1...

 
1:11 PM
Would it be appropriate to add a community ad for an APL-only codegolf site?
 
Of course
You can add a community ad for anything you like. If the community doesn't like it, it'll just be downvoted
 
@DJMcMayhem Cool. One of our customers ran a 9-hole codegolf tournament during our user meeting, and it was so well-liked that they want to make another one which is open to the public.
 
1:38 PM
> If the community doesn't like it, it'll just be downvoted
accurate description of how SE itself works lol
Question: I'm designing a golfing language attempting to be shorter than Jelly for certain types of challenges; what categories should I try to target?
I'm thinking mostly , , and
maybe as well
 
@HyperNeutrino :P
 
:P
no I'd never be able to beat Charcoal
you can see how my last attempt went
Also, does it make more sense for forks to associate left or right?
 
@ASCII-only WTH is a vine.
 
@MagicOctopusUrn you don't know what a vine is o_O
it's a video uploading platform where each video has like a 7 second limit or something like that
 
@HyperNeutrino so it's a public snapchat?
 
1:45 PM
it was an interesting idea to share short funny films or maybe inspirational messages but it's dying I think
@MagicOctopusUrn sure?
 
@HyperNeutrino odd... anyway, back to lurking.
 
@MagicOctopusUrn pls first give me idea for in which general category of PPCG challenge I should try to have my language outgolf Jelly
 
@HyperNeutrino that joke is becoming old...:p
 
:P
but I'm actually planning on trying this time
@EriktheOutgolfer How does f g h j k l behave as a series of dyads in Jelly?
 
at the very start of a line?
because in that case they behave differently
 
1:49 PM
like on its own
 
like (f g h) j k l
f g h forks like g(f(x, y), h(x, y))
 
ok so fgh is a fork and then what does jkl do?
(to rephrase my question, how does ð f g h j k l ð behave)
How to outgolf Jelly: Rename some of the atoms so that you get shorter builtins :D
 
final result should be l(k(j(g(f(x, y), h(x, y)), x), y), y)
 
ah ok
 
like this for reference
 
1:51 PM
so my idea for my language is slightly different in at least one way
@EriktheOutgolfer thanks
Also ,,,,,, makes it slightly clearer
 
1ð,,,,,,ð2 gives [[[[1, 2], [1, 2]], [1, 2]], 2]
 
@HyperNeutrino In J, A (f g h j k l) B is A f ((A g B) h ((A j B) k (A l B))) but in APL it is f ((A g B) h ((A j B) k (A l B))) (with f applied as a monad).
 
ah ok thanks
 
@HyperNeutrino yeah tbf I haven't really used a so long run of dyads
 
1:53 PM
mhm yup :P
 
apparently it's doing the "fibonacci" thing there...
 
in my language A (f g h j k l) B would look something like (((A f B) g (A h B)) j (A k B)) l B
@EriktheOutgolfer huh?
 
@HyperNeutrino OK, that's just mirrored J.
 
so like it forks the first three to form a new dyad and then it forks (fgh), j, and k
 
I can see it behaves like (,,,),(,)
 
1:55 PM
@Adám o
 
@HyperNeutrino yeah
 
huh
I wonder which one's golfier
 
and this behaves likewise like ((,,,),,),,
 
huh okay
 
Once you use Jelly for a while, is it sufficient to understand a 25 byte program?
Just by looking at it for a while. Not a complex one.
 
2:01 PM
what do you mean by sufficient
 
Not easy, not too hard.
 
if you have the tabs open sure
 
I'm tired of writing scripts on my phone
 
jelly is more like a "write-only" language :p
 
2:02 PM
I was thinking that Jelly could reduce typing...
 
lol
@TuukkaX if you like copy-pasting 5000000 times sure
 
reduce??? it uses unicode chars in its encoding
 
but if you're thinking about using Jelly for production code, please reconsider your existence
you can't type most of the characters lol
 
production - Jelly ? No such thing
 
use Pyth to reduce typing
^^
 
2:03 PM
Yeah, but I could work around the unicode thing
Pyth sounds nice...
 
with all chars though?
 
you'd need a lot of copy-paste or you'd need a custom keyboard layout
 
Custom keyboard would do it
 
he's on a phone, not sure if such a layout exists?
 
There must be. I'm running Android
 
2:05 PM
oh also I'm designing my language to use mostly characters that my keyboard supports
I think it's the Android Multi-Lingual Standard keyboard but idk
 
Seems like a good thing to go for!
 
@EriktheOutgolfer Nah, if I try, I can decipher most Jelly scripts under about 30 bytes. Otherwise, I'm stumped :P
 
I often forget which built-in is which
like is f with the dot filter-in or filter-out? (I know it's filter-out in this case because I just used it yesterday but still :P)
 
@HyperNeutrino Beat you to it. That's what Levant's (my new language) primary code page is designed around :P
 
and like is A with the dot on top Any and All or is that the one with the dot under it?
@cairdcoinheringaahing lol my ideas have never been original
 
2:10 PM
@HyperNeutrino looks at Proton, then at JavaScript and Python :P
 
well that was designed to combine the best of both (also, Cheddar)
 
@cairdcoinheringaahing Under 30, by head only?
 
@TuukkaX Normally yeah. It depends on the atoms and quicks used though
 
@cairdcoinheringaahing Without looking on PPCG for my answer, decipher Ḋ=⁶Ḣ$¡UµÐĿ¹Ṛƭ€QY
(unless you've seen this answer already)
 
@cairdcoinheringaahing Interesting. I'll probably learn Jelly sometime next month then!
 
2:13 PM

 Jelly Hypertraining

Practice your Jelly :) Rules and stuff are here: golfingsucces...
 
@HyperNeutrino dequeue if the first character is a space, then reverse. Repeat that until the results no longer change. Next alternate between reversing and doing nothing. Finally deduplicate then join by newlines. And, without looking on main, I swear, I can tell you exactly what challenge that is for. The "Undress a string" challenge.
 
mhm nice
now lemme find a harder one :P
 
All hail the Jelly reader! :P
 
:D
 
@cairdcoinheringaahing ಠ_ಠ
Decipher the following:
2ị⁼Ṁ
0;;0ṡ3Ç€Tị
 
2:16 PM
pastes malbolge
 
(not actually harder lol)
 
@HyperNeutrino Fine, but last one. I have work to do
 
ok :P
(says while on TNB)
 
TNB = ?
 
@TuukkaX The Nineteenth Byte
 
2:18 PM
Ah, obviously :-P
 
@HyperNeutrino Monadic or dyadic? I'm guessing dyadic, but just wanted to check
 
monadic
what the heck
why am I using map, truthy, index
why not just filter
 
@HyperNeutrino Append and prepend 0 to the input list, then split at 3s. Call the helper link on each, then make that into a list of truthy and falsey values and index the argument into that list. Helper link: Is the index of that into 2 equal to the minimum of the list?
I'm not sure about that, that one is more difficult
 
oh it is harder? huh
not quite; the s with a dot means "overlapping slices of length"
 
2:21 PM
@HyperNeutrino Hehe
 
@HyperNeutrino Shhh, you're making me look bad :P
 
so it appends and prepends 0 to the input list, and then slices it into overlapping slices of length 3. It calls the helper link on each, gets the indices of truthy values, and then takes elements from the original list at those indices. the helper link checks if the second element is equal to the maximum (if the middle is a local maximum). this program gets all local maxima
(I know because I wrote this code lol)
Here's a fun one for when you finish your work: Ḋm2Qµ³m2Q;Ṣe“nu“mw“bq”ȧ³⁼U¤
 
Notice: In ~40 minutes, I'm leaving PPCG and never coming back. (Well for a week) preemptive o/
 
o :( work-related stuff?
 
2:24 PM
@HyperNeutrino I have a big project coming up and can't get distracted so :/
 
ah ok
 
@MetaEd How often do you change your profile picture?
 
hey I found my first Jelly solution on PPCG
 
@cairdcoinheringaahing Whenever I think to check the calendar.
@cairdcoinheringaahing Nothing coming up soon except Oktoberfest.
 
@MetaEd books tickets to Germany Thanks for reminding me :P
 
2:30 PM
@cairdcoinheringaahing Bitte zehr.
 
Ich spreche nicht Deutsch (?) :(
(trusting google translate on that one :P)
 
Wie schade.
 
Es ist eine interessante sprache (?) (translate, again)
 
Das Neunzehnte Byte
 
@HyperNeutrino Non, tu parles francais (ca't type a cidilla)
ಠ_ಠ Forgot my french lesson from today
 
2:33 PM
@cairdcoinheringaahing oui je parle un petit peu de francais
 
dan4 shi4 ni3 hui4 jiang3 zhong1 wen2 me?
 
@HyperNeutrino I don't speak Mandarin
 
@cairdcoinheringaahing nice job identifying it though
 
@HyperNeutrino I didn't think it had so many numbers though :P
 
2:34 PM
Why are there so many numbers?
 
(the question asked is "but, do you speak Chinese?") (where zhong1 wen2 means "Chinese" but really is "Mandarin")
Each Mandarin word has one of 4 accents for a total of 5 variations: 1 through 4 and unaccented
 
Parli italiano?
 
Je parle un petit peu francais und ich spreche ein bisschen Deutsch. I prefer German though :P
 
@MetaEd no (polyglot between english and italian :D)
 
@HyperNeutrino Uhhh... no idea lol.
 
2:36 PM
@cairdcoinheringaahing Je parle un petit peu de francais et ich spreche sehr wenig deutsch. I prefer English though :P
@MagicOctopusUrn ah ok :P
 
@HyperNeutrino Ek verkies Afrikaans
 
uh wat
 
@HyperNeutrino Afrikaans
 
@cairdcoinheringaahing My skeertuig is vol palings.
 
@cairdcoinheringaahing well yeah duh :P
我更喜欢国语
 
2:38 PM
@MetaEd Either you know an insane number of languages, or you're using google translate :P
 
(I used Google Translate on that but from Chinese -> English interestingly enough :P)
 
@cairdcoinheringaahing I know some German and a little Italian and Spanish.
 
(Also, Cantonese has 6 accents; it has 3 of the Mandarin accents and then the same 3 accents except higher up)
 
@MetaEd I'm guessing Afrikaans or Dutch?
 
@cairdcoinheringaahing Google Translate apparently thinks it's English :P
 
2:39 PM
@cairdcoinheringaahing It's a Monty Python reference.
 
skeertuig is Afrikaans for hovercraft
 
"Dirty Hungarian Phrasebook" is a Monty Python sketch. It first aired in 1970 on Monty Python's Flying Circus as part of Episode 25. An inspiration for the sketch may be English As She Is Spoke, a 19th century Portuguese–English phrase book regarded as a classic source of unintentional humour, as the given English translations are generally completely incoherent. == Plot == A Hungarian (John Cleese) enters a tobacconist's shop carrying a phrasebook and begins a dialogue with the tobacconist (Terry Jones); he wants to buy cigarettes but his phrasebook's translations are wholly inaccurate and have...
 
@MetaEd I only know Life of Brian from Monty Puthon
 
oh that's where hovercraft full of eels got his/her name from
 
You don't know that. It could be they own an actual hovercraft full of eels.
 
2:44 PM
:o
but presumably that's where though technically fine yes I have no proof :P
 
Technically correct is the best kind of correct :p
 
:P
anyway gtg now o/
 
you're not allowed to leave :p
lol just kidding ;)
 
all hide, Mr. Laser Eyes Diamond Sledgehammer is here!
 
i don't have the hammer today, I left it in the bunker.
sips coffee
 
2:48 PM
glances over, curses at lack of coffee, sips monster instead
 
reaches for drink, accidentally spill it on compu....
 
awkwardly looks what the others are doing
 
coughs and the room suddenly goes dark
... oops :P
 
looks for the torch
 
who needs a torch when you've got laser eyes?
 
2:58 PM
doesn't have laser eyes
 
0
A: Sandbox for Proposed Challenges

Kevin CruijssenBeyond Java's Borders code-golfnumberintegerarithmeticjava Introduction: In Java Integer.MAX_VALUE = 2147483647 (232-1), and Integer.MIN_VALUE = -2147483648 (-232). When calculating with these values, when a result goes beyond these borders, the number wraps around. Here are some examples of s...

 
I didn't say they had to be your laser eyes
 
my laser eyes aren't firing right now what you're seeing is the Borg implants on my head emitting lazers for enhanced scanning
 
Deja vu is strong in here right now
 
@Geobits we're all crazy aren't we :p
 
3:01 PM
Yes you are all crazy.
 
@flawr how do you know that we aren't just all constructs of your own mind and therefore YOU are the crazy one
 
Crazy? Yes. All? Yes. Aren't? No.
 
@ThomasWard Cause I have a really dirty mind.
 
@ThomasWard Given that the four users who are talking at the moment are a downvote, a dog, a blindworm and a lazer-eyed alien, I'd say we're most definitely crazy :P
 
Not a snake
 
3:03 PM
@cairdcoinheringaahing heh
 
*blindworm
 
@flawr Fixed :P
 
And I'm not a downvote either. I just play one online.
 
@Geobits Are you saying that I'm not a dog?
 
Downvoter-impersonator
 
3:05 PM
I said something about myself only.
 
Q: Is it possible to view the SE source code?
 
A: Yes
(depending on whether you have access to it. and eyes)
 
@Geobits Q: How?
 
A: With your lazer eyes.
 
A2: By summoning CTHULU and having him deliver the code.
 
3:07 PM
@TuukkaX Maybe consider APL (there is an Android keyboard) or J (ASCII only) to reduce typing? They are usually not as concise as Jelly, but they are real world production class languages made with general applicability (rather than golfing) in mind.
 
I'll never understand people spelling laser with a z o_O
 
because it is lizard and not lisard
 
@ThomasWard Got Cthulhu, but it's not getting me the code D:
 
@Geobits ztimulated
 
@flawr But 'laser' is an acronym with no Z in it :/
 
3:08 PM
> Lazer may refer to:

A misspelling of laser
Wikipedia is on Geobits' side
 
@Geobits well now it iz :)
 
I'm gonna have to start saying 'raydar' now, just to mess with people.
@cairdcoinheringaahing Of course it is. I wrote it.
All of it.
 
@Geobits At our user meeting, there was a guy named Ray Cannon (yes really) who demonstrated his autonomous robot which used laser beams to detect surface edges. How cool is that‽
 
Would be way cooler if he used lazer beamz.
 
Less than 10C for sure
 
3:12 PM
@Adám Cool enough for an interrobang :P
 
Did it do sweeps and look for sudden changes in reflection distance?
 
@Geobits Actually, it had multiple beams and did sweeps and looked for where the normal pattern was missing.
 
Nice :)
 
So basically a reverse light house?
 
Ray Tube would have been better. He's the cousin of the Odes: Ann, Cath and Di.
 
3:14 PM
Airborne weather radar does much the same thing, at least the fancy ones.
But it's mainly looking for changes in density, since you mainly get partial reflections from clouds, depending on density
 
Actually, it was even cooler as it was a Pirate Bot (based on Raspberry Pi), complete with pirate face, hat, and speaker blasting out sailor tunes while exploring the maze.
Too bad the lasers weren't mounted as eyes on a shark. Maybe next version!
 
Yes, that's definitely cooler than either the name or the function.
And both of those are cool
 
Python CMC: Using a string beginning with r' (repr string), output only \
 
Tell him I expect them be available online very shortly.
 
I feel like I jut missed a very intresting conversation
@cairdcoinheringaahing Huh? Test case please
 
3:19 PM
@Pavel assuming you equate chaos to interesting things, then :P
 
Well chaos is intresting, but not all intresting things are chaotic
 
@Pavel print the character \ using a repr string (e.g. r'\n' == the characters \ and n, not a newline)
 
Chaos is interesting in its own way. Ian Malcolm would surely agree if he were able to.
 
This is the first time I've ever seen a four-day-old message on the starboard of TNB.
 
And with that, I must take my week-long leave of absence from PPCG (and TNB) o/
 
3:20 PM
@Pavel Because we don't like stars anymore
 
Yep, we like lasers now.
 
And pirate bots
 
@cairdcoinheringaahing C#: @"\"
(C# rawstring literals function like VB.NET string literals, in which the only escape sequence is "" to escape a quote mark.)
101
Q: Why can't Python's raw string literals end with a single backslash?

cdlearyTechnically, any odd number of backslashes, as described in the docs. >>> r'\' File "<stdin>", line 1 r'\' ^ SyntaxError: EOL while scanning string literal >>> r'\\' '\\\\' >>> r'\\\' File "<stdin>", line 1 r'\\\' ^ SyntaxError: EOL while scanning string literal It ...

 
This is why PowerShell uses backtick as its escape key
 
That's intresting. I like that.
Does powershell have rawstrings?
Can those contain a single backtick?
 
3:28 PM
@cairdcoinheringaahing I don't even python, but this seems to fit your weak rules: print r'\\'[0]
 
Single-quote strings don't parse the string, only double-quote, so single-quote-backtick-single-quote is just a string literal composed of solely a backtick.
But can you imagine trying to write out Windows paths with backslashes if every one needed escaping? Ugh.
Hence, backtick.
 
No it makes perfects sense
I like that a lot, actually.
@AdmBorkBork So single-quoted string can't contain single-quotes?
 
@Pavel No, not that I'm aware.
 
Ugh, all these escape rules. APL strings are so simple: Single-quote-quoted. Single-quotes are doubled. Period.
 
I think C# rawstrings might be the most superior.
@Adám So like C# rawstrings with single quotes instead of double quotes. Got it.
 
3:35 PM
@Pavel Huh. Apparently if you double-single-quote inside, it's counted as a single quote inside. So, guess I was wrong.
 
@Pavel Yeah, but extra @ syntax, and imho, single quotes are easier to read, especially when they need to be doubled. Compare @"Joe said ""Hello"" to me" to 'Joe said ''Hello'' to me'
 
So PowerShell single-quote strings seem to function just like APL single-quote strings.
 
This all quote talk makes me want to finally put my horrible unfinished language on github. But instead, now I'm gonna close all of PPCG so I could finally work on this project I should have done already. :p
 
@AdmBorkBork Seems so. But APL only has these, and no other strings. KISS.
 
@Geobits print(r'\\'[0]) for Py3 but same difference :P
 
4:31 PM
@Adám how do I put null bytes in string without \0
And there are times when I'd rather use \n over a literal newline
 
Question: I'm about to write up a challenge that involves repeating some function on an array a certain number of times. The number of times you need to repeat it is very consistent except for with an input of 2. Should I say all inputs will be >2, or make people handle that edge-case?
(For more detail, you need to repeat the function until you arrive at the original array, which, if the array has length n, will always take n steps for odd n, 1 step for n == 2, and 2 steps for even n)
2 is just a weird edge case
 
I'd say no to edge cases for anything because it distracts from the main goal, unless there's a good (and usable in code) reason for the edge case or the edge case is the point of the challenge.
 
4:48 PM
Well in this case, the reason for it is because it simply takes one step to return to the original array if it's length 2. Which is usable in code, but then answers couldn't precompute the number of iterations to run.
I'm not sure if that's a good or bad thing though
 
Though I don't make many challenges, I try to allow any small potential variations or weird behaviour just to not give an advantage to languages which have a built-in to deal with the specific problem and to not disadvantage languages made for the challenge by adding silly restrictions. IMO a small edge case is as bad as only allowing output to STDOUT - some languages will benefit, some not.
 
Hmm. Yeah, I'd agree with that. I'll just restrict it to >3 in that case.
 
for example, SOGLs 1 byte - subtract 2 - could benefit SOGL at an edge case for 2
but I guess ultimately golfing is about having the most built-ins :p
 
Well, I can tell you that would not help in this case haha
 
5:06 PM
@dzaima well, as long as they're short
 
@Giuseppe Well a 40 byte Mathematica answer that is two functions and syntax sugar is much more interesting than a complicated 15 byte jelly answer and can easily get more upvotes
 
@DJMcMayhem i don't see why that's a edge case
if u return to the original array twice
it'll be still the original arrray
unless that's an auxillary part of the challenge
 
5:22 PM
@cairdcoinheringaahing print'\\'+r''
what, I used an r string
 
Is there more efficient way to update the position of a moving ball in tkinter except delete it and create new one and then update the canvas ?
 
u mean on the canvas widget?
that's prolly the best way
 
What kind of objects wouldn't be able to just be moved? Is there no move or way to update the coords at all?
 
Isn't that ridiculously slow ? I mean I am planning to a double pendulum, and that thing should be ridiculously slow to observe the velocity properly.
 
@AlexKChen well is there a reason ur using tkinter instead of pygames or something
cuz that does the whole redrawing thing, but fast
 
5:37 PM
Well firstly I don't know pygames (but I know vpython), and secondly I like doing things for scratch (and I heard that everything is ready in pygames)
 
@AlexKChen 1)tkinter really isn't meant to be used for graphics
2) pygames is definitely not high level
 
Pygame is basically MS paint with scripting
7
And it's a lot of fun. It's how I first got into programming
 
Damn kids these days
:P
 
(I've actually made a high level library on top of pygames pypi.python.org/pypi/SuperWires)
but u said u wanted to go from scratch
 
Lol... the other day someone told me different (chat.stackexchange.com/transcript/message/39747508#39747508).
BTW, what's the demopanels module given pyinmyeye.blogspot.in/2012/08/tkinter-pendulum-demo.html
 
5:47 PM
@DJMcMayhem I got my start on a Commodore in BASIC, following the instructions in the back of a manual to make a little PETSCII "bird" fly around the screen.
 
Bye all, se ya later !
 
@AdmBorkBork Pfft, Commodore. Tandy 1000 for life
 
@AdmBorkBork And then you rode off on a dinosaur? :P
 
By then the dinosaurs had just started dying out, so it was considered rude to ride them.
 
@Geobits Well, the Tandy 1000 was a completely different animal than my VIC-20. For starters, it came out several years later and cost like 4x as much as the VIC-20. :p
 
5:59 PM
Right. So it was better. I said that :p
 
I still have my VIC-20. I wonder if it still boots.
 
If it doesn't, boot it.
 
6:40 PM
Hopefully not a dupe.
 
Ha! That's funny. I had the exact same idea (even down to the characters used) a while ago, but never got around to it.
 
I know I did something similar before with - and | but I can't be bothered to look through all my question history :|
 
@Adám I actually thought about APL, but considered it absurd. Now that I looked into it, I found that the google play store has an app: sAPL, that's able to interpret APL! Thanks for the suggestion! :)
 
@TuukkaX Also TryAPL.org and tio.run/#apl-dyalog and ngn.github.io/apl/web/
 
@TuukkaX That app unfortunately doesn't have all the cool Dyalog stuff like function definiton with {}, ¨ (from what I can tell), and strangely shaped arrays :/
 
6:50 PM
6
Q: Illustrate the Least Common Multiple

Helka HombaGiven two positive integers, A and B, illustrate their least common multiple by outputting two lines of dashes (-) with length LCM(A, B) after replacing every Ath dash in the first line and every Bth dash in the second line with vertical bars (|). In this way, the end of each line will be the on...

 
@NewMainPosts even if SOGL had LCM I don't think it'd do well :/
 

« first day (2431 days earlier)      last day (2407 days later) »