« first day (2645 days earlier)      last day (2192 days later) » 
00:00 - 17:0017:00 - 00:00

12:02 AM
@Dennis Sweet!
 
@HusnainRaza reasons explained?
 
12:17 AM
ok so either i'm doing something really worng (99% chance) or tcl is really similar to lisp for ASCII-art challenges
 
input()
while 1:
s,t=[int(j)for j in input().split()]
print(int(s*(t*.6)))
How can I golf it further?
cm/s to meter/min ?
s = speed, t = time
can I spare the variables somehow? :o
 
@0x45 TIO pls
 
i dont know how to use it...
How do I add input?
 
12:36 AM
@0x45 does the final result have to be an integer
 
yes
no decimal
 
also >_> <_< you weren't using the first input... which makes it error...
 
Well, on the website I could ignore it, it gave me an error but still it would run an i could save some bytes
insane, id never get to that result of yours
could you explain o:
 
i actually dont need the indents? How comes?
i always get errors when I try to write oneliners
 
12:43 AM
@0x45 really it depends on what you're trying to do. e.g. nested loops don't work as oneliners
@0x45 which part don't you understand
@0x45 how would the website accept this >_>
 
it shows the error, still it continues with computing :D
 
@0x45 ???
 
so my "solution" would have worked as a oneliner too?
 
no. you printed after the loop
so it would never have printed
 
you didnt?
while 1:s,t=map(int,input().split());print(int(st.6))
the ; splits the loop doesnt it?
 
12:46 AM
nope
if it's a oneliner it's still part of it. only indentation determines if something's in a loop or not
 
so how it works then?
there could also be multiple inputs
 
@0x45 ???
 
the first input is the number of partipants
 
@0x45 same way as yours. it just repeats until there's an error (i.e. no more input)
 
for my example there was only one, so the input wouldve been:
1
20 10
it could also be:
2
20 10
10 20
ah wait they cant have different time
2
20 10
5 10
 
12:49 AM
@0x45 yes. try changing the input in mine
 
ah... so basically for my solution i could have simply added it into the loop?
the print*
 
Alright, turns out I can prevent RegexDOS in .NET using the Regex.MatchTimeout property.
Which is exactly what I need.
 
@0x45 yep
 
1:37 AM
@ASCII-only yeah i know why my code doesn't work but I was wondering how cjfaure got it to work if he used the same code
 
@HusnainRaza pastebin pls?
@HusnainRaza same?
 
@ConorO'Brien (dont have the steam mobile app on here) i had an idea
 
38
A: Tweetable Mathematical Art

cjfaureSierpinski Paint Splash I wanted to play more with colors so I kept changing my other answer (the swirly one) and eventually ended up with this. unsigned short RD(int i,int j){ return(sqrt(_sq(abs(73.-i))+_sq(abs(609.-j)))+1.)/abs(sin((sqrt(_sq(abs(860.-i))+_sq(abs(162.-j))))/115.)+2)/(115^i

 
try adding "sourcePaths": ["pdcurses-d/sources"]
maybe you need that and importPaths?
 
@HusnainRaza link to python code?
 
@dzaima :| is unimplemented in Canvas
@notnottotallyhuman does commata have no looping :| or range for that matter
 
Anonymous
2:12 AM
RFC: codegolf.meta.stackexchange.com/a/16288/45941 (specifically, is it too close to the challenge that AdmBorkBork linked?)
 
2:31 AM
@quartata yea?
too late prolly
 
hi
 
 
2 hours later…
4:32 AM
I came up with a fun challenge idea. Unfortunately, it involves solving the halting problem :/
 
@musicman523 solution: use this language
 
@ASCII-only sure, you write the program that solves the halting problem, I write the challenge, we split the karma 50-50?
 
@ASCII-only I'm lazy okay
 
@musicman523 :P
 
4:42 AM
@dzaima but it's in the docs but not the interpreter?
 
@ASCII-only in the docs it's even red to tell you it's not implemented :p
 
@dzaima oh. so that's what red means
but. why
that must be the simplest thing to implement
 
5 mins ago, by dzaima
@ASCII-only I'm lazy okay
 
@musicman523 Allow a halting oracle to be taken as input
Or, if you want to be boring, have all answers be written in Scheme-1.
 
Both good ideas
 
5:06 AM
0
Q: Rope&Nail logic

l4m2Consider a loop of rope hanging on n nails. Given a table showing whether the rope would fall down when each possible set of nails were removed, please provide a possible roping way. You may assume such a solution exist. Here, "fall down" means every nail is connected to the infinite far point, ...

 
 
1 hour later…
6:28 AM
If someone could tell me how the c code works but the python code which is an exact copy of the c code doesn't, that be cool
 
@HusnainRaza how are you sure it's an exact copy
@HusnainRaza basically since C is doing float division the /0 doesn't error
:|
so that doesn't work
 
6:48 AM
0
A: Sandbox for Proposed Challenges

tshKnight Distance code-golf In Chess, a Knight on cell (x, y) may move to (x-2, y-1), (x-2, y+1), (x-1, y-2), (x-1, y+2), (x+1, y-2), (x+1, y+2), (x+2, y-1), (x+2, y+1) in one step. Imagine a infinity board with only a Knight on (0, 0): How many steps is required for moving a Knight from (0, 0...

 
7:12 AM
@HusnainRaza a bit better
 
> QuantumBogoSort a quantum sorting algorithm which can sort any list in O(1), using the "many worlds" interpretation of quantum mechanics.

It works as follows:

1. Quantumly randomise the list, such that there is no way of knowing what order the list is in until it is observed. This will divide the universe into O(n!) universes; however, the division has no cost, as it happens constantly anyway.

2. If the list is not sorted, destroy the universe. (This operation is left as an exercise to the reader.)
 
7:34 AM
@HusnainRaza close enough
 
 
2 hours later…
9:56 AM
2
Q: simple golfing interpreter

Muhammad Salmanchallenge : Your job is to create a simple interpreter for a simple golfing language. Input : Input will be in the form of string separated by spaces. Output : Output the result (a number or a string) obtained after performing all ops. If there are more than one output join the together ...

 
 
1 hour later…
11:10 AM
Jelly CMC: Find an atom that gives an empty list from any number. Spoiler.
 
@user202729 +1 for spoiler method
 
11:28 AM
@user202729 Does t work?
 
@Adám Not a bad idea (in fact I didn't know about that atom), but doesn't work in my case (answer to NMP) because I need them in a chain.
 
@user202729 I think four of the œ atoms will work too.
 
12:11 PM
hi.. how about this for a challenge?
Given a set S of k strings, we want to
find every string in S that is a substring of some other string in
S. That is, we want to find the smallest subset of strings S'
\subset S such that no string in S - S' is a substring of any
other string in that set.
 
@Anush Strict substring or not? Are equal strings substring of each other? (looks good -- I can't find a dupe)
 
CMP: How bad of an idea is a(n intended to be practical) language that supports OOP/blocks but not really? i.e. there are only two real syntax constructs - operators and function calls (which would have various possible forms)
 
@user202729 not strict
 
I don't understand voting on this site, sometimes.
 
@ASCII-only Is there anything else?
@AdmBorkBork s/sometimes/always/
 
12:18 PM
@user202729 Not really, I think?
 
@ASCII-only Then how is it bad?
 
@user202729 Things like namespaces, classes/interfaces/structs/traits and loops would really be macro calls then
and you'd have to do things like:
foo = class {}
instead of the normal way
 
@user202729 Hehe, no, not always. But in this case, I'm the highest voted answer on Conor's ASCII Pylon challenge. Why? Who knows.
 
@AdmBorkBork Maybe "have many 'based on' solutions". (I guess it has many solutions)
 
@user202729 maybe it's only interesting if I restrict the complexity?
 
12:23 PM
@user202729 31, yes, but as far as I can see none are based on the PowerShell one.
 
an exponential time solution seems a bit boring
 
:44253884 It's shorter in PowerShell because of how I handled the char-array creation.
 
@AdmBorkBork yeah for a lot of other languages string repetition isn't cheap
@AdmBorkBork yeah I realized :P ok not really
@AdmBorkBork so the $j++ means you can't incorporate the spaces line into the loop?
 
It's actually because the array is constructed of two parts.
 
@Anush I can't think how it can becomes exponential then. There are (number of string)² pairs of string that needs substring-checking, and substring checking should take at worst (length of first string)×(length of second string).
 
12:28 PM
($x=79-$_)..($y=$x+$j++) on the one side
(++$y)..$x) on the other
 
@user202729 right...maybe say it has to be better than n^2 to make it interesting?
where n is the total length of the strings
 
@Anush Strictly better (o(n²))?
 
@user202729 yes
it can be solved in linear time of course
although I have no idea how you are typing that!
 
@Anush Probably US keyboard or Compose key
 
I fear making it linear time may put off too many people though
 
12:30 PM
Because of how the array is constructed, the shortest it can be is three elements -- $x..$x + $y..$x, so like !"!
 
But don't make it a dupe of this.
@Anush That's in the Jelly codepage, that's on my keyboard.
 
43 upvotes!
who awarded 1000 points?!
 
1
Q: Knight Distance

tshIn Chess, a Knight on grid (x, y) may move to (x-2, y-1), (x-2, y+1), (x-1, y-2), (x-1, y+2), (x+1, y-2), (x+1, y+2), (x+2, y-1), (x+2, y+1) in one step. Imagine an infinite chessboard with only a Knight on (0, 0): How many steps is required for moving a Knight from (0, 0) to (tx, ty)? Inpu...

 
Lembik has a surprisingly small user ID.
 
@user202729 what do you mean?
how do you measure the size of a user ID and what does it signify?
 
12:38 PM
@Anush Small as in low number
 
what does that signify?
 
They registered for PPCG pretty early (after beta but still early)
 
aha
lembik is no more right?
 
@Anush Yeah, they deleted their account like a week (?) ago
 
No users matched your search.
@ASCII-only You must have scared them off :)
 
12:40 PM
@Anush :| why me specifically
 
I meant collectively and in fact it was just a joke
 
@Anush All their posts say "user9206" now
 
got you
 
@ASCII-only added. it took making a while loop though
 
@dzaima wow that must have been hard :P
@dzaima ok. so what does this do
this would be so much easier if you had an AST with hyperlinks/descriptions
 
12:48 PM
@ASCII-only dammit you got me something to do
 
@dzaima i mean it's ok (and not urgent at all) but it would be really helpful for people who don't understand Canvas yet
of course that could be said of any golflang
 
0
Q: Creating a Y-shaped Recursive Tree

Luis felipe De jesus MunozChallenge In this challenge you will construct trees, in the form of ASCII Art using recursion. Basically you will generate the ASCII version of the Fractal Tree Input Number of iterations N <= 5 && N > 0 Output The Nth iteration of the Fractal Tree. It must be a matrix of 63 rows and 100...

 
@ASCII-only it converts the first 30 numbers to base 3 and back as if from base 4. The could be removed though, it's there because it works either way
 
clearly they don't have descriptions because they're terrible though :P
@dzaima wait what so they were base conversion? til
 
@ASCII-only ಠ_ಠ are these not clear enough?
(well, the first line of each as the subexplanations I added now)
 
12:53 PM
@dzaima exactly >_> i thought they were from/to strings or something like that because apparently Canvas has no number literal?
 
@ASCII-only it's just that the idea somehow never made it into my mind but it's a very good one
@ASCII-only Canvas has numbers..
 
@dzaima *multi-digit number literal
@dzaima hmm, i wonder why more people don't do it. i guess most golflangs aren't supposed to be understandable :P
 
@ASCII-only oh yeah still have to add ways of making bigger numbers (it'll be complicated)
 
@dzaima complicated? :|
 
@ASCII-only I don't plan on doing regular multidigit numbers as it's wasteful & I can't push 3 & 5 in 2 bytes anymore. And to complicate it even further, 48 can be represented as 0c but only if not after a string
 
12:56 PM
@dzaima oh yeah char codes are a thing
@dzaima i mean sure. but at least conversion from/to string?
 
@ASCII-only do I not have that?!?!
 
idk
 
(so 32-127 shouldn't be pushable normally iif not after a string, but should have replacements otherwise. Also stuff like 8« for 16 has to be considered and maybe the superscripts contents too)
 
Oh man this was messy in Octave! Still haven't managed to get it right :(
 
@ASCII-only well ŗ can kind of be used to convert a number to a string, but it's hacky and doesn't work if by strings
 
1:01 PM
Giving up for now... Time for audio books (Cursed concussion!)
 
@ASCII-only to number though, I'll have to add that
 
wait what
proton currently isn't parsing strings
well, not evaluating them
it's parsing them
but I can print("hi") and it prints "hi" (with the quotes) o_O
 
@dzaima where did leading space go. also pls make permalink auto-copy to clipboard if it doesn't already (element.select(); document.execCommand("copy"); or w/e)
@HyperNeutrino why would it not
@HyperNeutrino excuse me what
 
idk why that works; it's supposed to print None or something like that maybe but idk
@ASCII-only no typo it parses them but global_eval doesn't do anything to them yet
 
@HyperNeutrino TIO version?
 
1:05 PM
@ASCII-only no local version
 
@HyperNeutrino if it "doesn't do anything", isn't that just a no-op
 
@ASCII-only loops are 1-indexed so you're starting with 33
 
@dzaima ah i see
 
@ASCII-only well by "doesn't do anything" I just mean doesn't eval them; it will print "blah blah blah not evaluated ..." and return None
 
@HyperNeutrino then you broke print D:
 
1:07 PM
D:
 
hi @MuhammadSalman
 
@Cowsquack : HI.
 
my submission currently rounds the number down when dividing
 
I got KC tag badge o_O wat
 
@Cowsquack : How many bytes difference would it make if you change it to what I proposed ?
@HyperNeutrino KC tag badge ?
 
1:09 PM
@MuhammadSalman ; I think it's 100 score and 50 answers or something
20 answers
 
@MuhammadSalman I would allow rounding down, as some languages don't work with floating point numbers but rather with integers
 
@Cowsquack I think what you have is ok , since it doesn't really matter. You can keep it your way. :)
@HyperNeutrino Ok thanks
@ConorO'Brien Yeah done, above message explained. Thanks for info
 
@MuhammadSalman glad it's sorted out :)
 
no problem. be sure to revise the question to include this revision
 
@ConorO'Brien okay. :)
@Cowsquack : updated description. :)
 
1:16 PM
@ASCII-only there, added conversion to number
 
@dzaima :D
 
now autocopy permalink & then the hover info popup maybe
that's that aand I have no idea how to make that info thing. @ASCII-only also Canvas doesn't have any ASTs, everything's decided & matched on the fly :p
 
@dzaima but you must have a parser of some sort. you could just create the ast tree ascii-art thing as a global variable while you're parsing
or even build the ast as an object/array and hackily stringify that afterwards (Charcoal does this >_>)
 
@ASCII-only nope. I've just got a function that calculates what is the next instruction (plus a whole lot of horrible stuff for loops) :p
 
@dzaima oh yeah. that made me realize most golflangs aren't ungolfy like Charcoal is >_>
 
1:28 PM
@ASCII-only well the way Canvas does it is pretty horrible
 
like when you think about it Charcoal is basically a lisp without parens
 
also stack based = no real way of knowing what are the params to what
 
that's true
also btw: +1 for the underline thing
 
@ASCII-only I had fun playing around in fontforge :p
(the font isn't the same for the underlined and regular characters though because I like consolas but it doesn't allow distributing modifications as far as I could waste time searching)
 
@dzaima protip: just use an underline combining mark and copy/paste/select hooks next time
also, random thing:

 new language yay

DIscussion for a possible new language
looking for feedback/questions
 
1:34 PM
@ASCII-only that can't work globally trough the OS though
 
@dzaima but it can?
 
@ASCII-only well, without each char being 2 characters
 
@dzaima what do you mean
i meant convert to/from the 1-char on copy/paste/select
 
@ASCII-only I like seeing underlined characters in text editors too though
 
@dzaima that's true. but you'd have to install the font first :P (and set it as default font for everything)
 
1:37 PM
@ASCII-only I have (not as default everywhere because that doesn't make much sense though)
 
CMP for Vim users: Do you remap Esc?
 
ngn
@user202729 no, most often I use <C-c>
 
(what is <C-c> then?)
(Alt is M-, Ctrl is ^, Shift is ... upper case, right?)
 
ngn
@user202729 Ctrl+C, it works similar to <Esc> by default
@user202729 depends on notation, in vim it's <C-...> not ^...
 
1:53 PM
@user202729 Ctrl is ^ on linux terminals not vim
well really control/unprintable character is ^ on linux terminals iirc?
 
I guess there are just 2 different notations.
 
The universally understood one and the vim one.
 
ngn
@Dennis doesn't emacs use C-... too?
 
@Dennis That's not even a sentence...? and -> are?
 
@ngn yeah. <C-x> <M-c> <M-butterfly>
 
1:58 PM
@Dennis are you familiar with filters?
 
What kind?
@ngn No clue. I'm a nano guy myself.
 
1
A: Sandbox for Proposed Challenges

redwolf10105Shortest Possible 240 Sided Die Program: Using No Constant Greater than 6 code-golf Have you ever played Yahtzee with a 240-sided die? No, probably not. Anyway, I came up with the idea of a 240-sided die program, but to make it hard, you cannot use a constant greater than 6. For example, randIn...

 
Interesting. That's <C-[> for Luakit. TIL.
 
@NewSandboxedPosts should be possible with something like ((((randInt(1,2) * 4) + randInt(1,4)) * 5) + randInt(1,5)) * 6 + randInt(1,6)?
 
just almost poured milk into my fried rice like it was a bowl of cereal
 
2:07 PM
@ASCII-only Could that ever give 1?
 
@H.PWiz yeah mistake. corrected in the comment, hang on
 
-randint(-240,-1). Done. — user202729 10 secs ago
 
((((randInt(0,1) * 4) + randInt(0,3)) * 5) + randInt(0,4)) * 6 + randInt(1,6) maybe?
@user202729 you could probably also use the inverse of 240? 1/4/6/2/5
 
@Dennis those in mathematics
In mathematics, a filter is a special subset of a partially ordered set. For example, the power set of some set, partially ordered by set inclusion, is a filter. Filters appear in order and lattice theory, but can also be found in topology whence they originate. The dual notion of a filter is an ideal. Filters were introduced by Henri Cartan in 1937 and subsequently used by Bourbaki in their book Topologie Générale as an alternative to the similar notion of a net developed in 1922 by E. H. Moore and H. L. Smith. == Motivation == Intuitively, a filter in a partially ordered set (poset), X, is a...
 
I've worked with ultrafilters, but that was a long time ago.
 
2:16 PM
I see
 
FYI (because I sometimes hang out here): It appears that the PPCG newsletter info box is broken
(I already posted to Meta.SE about this because it appears to affect all sites)
 
@user202729 I'm afraid that calls unary minus on the constant 240.
 
@Dennis Depends on the language.
 
@user202729 Golfing languages aside, languages with negative literals are quite rare.
 
2:23 PM
@Dennis J.
That is my imaginary pseudo language, I can make it anyway I want.
 
Funky uses Unary minus instead of negative constants. But it also works R2L, so -2+3 is -5, not 1
 
ngn
@user202729 and all of the apl family (APL: ¯1, J: _1, k: -1)
 
@Dennis TI Basic
@Dennis Haskell, but only with a special flag enabling negative literals
@Dennis Verilog
 
ngn
python2:
>>> c=compile('f(-1)','','eval')
>>> c.co_consts
(-1,)
 
@Dennis the approach to limits via filters is quite cool
pun intended
 
2:36 PM
Can I view the time of each vote to close?
 
>>> import ast
>>> ast.literal_eval("2+5")
7
 
one doesn't need to specify ->infty as a special case
there's a filter sort of representing the "neighbourhood" around infinity
 
Python apparantly consideres basic arithmetic expressions to be literals
 
@ngn That doesn't make -1 a literal. If you do 1+1, you'll get 2 as one of the constants.
 
@Dennis wait what, why?
damn ninja edit :p
 
ngn
2:39 PM
@Dennis but you'll also get 1
>>> compile('1+1','','eval').co_consts
(1, 2)
>>> compile('-1','','eval').co_consts
(-1,)
>>> compile('-(1)','','eval').co_consts
(1, -1)
 
In Proton, should I allow statements to be put next to each other like print(1)print(2)
 
@HyperNeutrino What is it supposed to do?
 
@user202729 same as print(1);print(2)
 
@HyperNeutrino Clearly that should be print(1) * print(2)
 
2:41 PM
Then would 1-1 be interpreted as 1;-1?
 
@ngn That's an optimization then. Integer literals don't have a sign.
 
no
as long as it can be parsed as one statement it is, but if you have two things next to each other that can't possibly be part of the same statement, it currently requires a newline or semicolon to separate
 
co_consts should just contain the constants used by the function
not the literals
 
@HyperNeutrino Are programmers supposed to write readable code?
 
it could be used for either that or for golfing
golfing isn't my main priority though
 
2:43 PM
co_code will give you the bytecode
 
or actually one at all
I should probably just keep it the way it is
 
then you can use dis to map the bytecode to what is does
 
@HyperNeutrino Then what is the language used for? Practicing your skill to create a language?
(Hm... after some thoughts I have never written an interpreter for any non-esolang, even Lisp...)
 
ngn
@Dennis huh, I didn't expect that from python :) if it walks like part of the literal and it quacks like part of the literal, then...
 
that, and to basically combine Python and block-style (non-strict-indented) language together and give it some things from functional programming
not strictly functional but a lot more functional than python
 
2:48 PM
The only way to make a language "more functional" is to remove non-functional features.
 
hm true I guess
@Dennis what would you suggest removing that exists in Python ._. like, global state or something?
 
@HyperNeutrino (I guess) that's a joke.
(i.e., "functional" = "based on function" | "working")
 
I don't suggest removing anything. I'm just nitpicking that making a language more useful for functional programming doesn't make the language "more functional".
 
> So why is detecting and interpreting sarcasm such a hard task for AI?
Firstly, because it’s often difficult even for humans to comprehend.
Random quote from HNQ.
 
3:03 PM
Something is wrong in your syntax obok '' Thank you, MySQL, this error tells me really a lot (on the side, obok is a translation error).
 
My top comment has 95 votes
 
cool
 
Happy Birthday! — Dennis ♦ Sep 8 '15 at 6:40
(158)
 
lol
 
@mbomb007 ಠ_ಠ number one is testcase suggestions
 
3:12 PM
my top comment has 9 votes :]
 
Welcome to the site! This is a nice first challenge, and unfortunately very relatable for me and my fT FINGERS. — DJMcMayhem ♦ Mar 14 at 18:29
So close to 100...
 
(23)
Important: Please be nice to TIO and don't just (write a script or manually) test all of the languages there. TIO is very busy already. — user202729 Feb 7 at 11:37
 
@DJMcMayhem ftfy
 
This code says: "Yes, you definitely have to execute me." — Soaku Sep 28 '17 at 4:29
 
3:14 PM
Yay! :D
 
(8)
 
Can you use 144 instead of java.awt.event.KeyEvent.VK_NUM_LOCK? CAPS_LOCK would be 20Poke Feb 22 '17 at 21:30
66 byte golf
not too bad
 
@Poke That's what happens with Java and readable constants.
Although I always use std:: in C++, java.awt.event.KeyEvent is overkill.
(yes, real code use import)
 
My top comment only has 26 :-/
Teehee
Jeez ... this language ... — AdmBorkBork May 27 '16 at 20:10
 
Jelly (and J) grid looks much nicer.
 
3:20 PM
@LuisMendo Your video link on codegolf.stackexchange.com/a/110980/60042 is ded
 
@mbomb007 I memorized my user ID anyway.
 
Sure, but what if you want to look up stuff for other users?
 
4:01 PM
should (a, b, c) |> f be equivalent to f(a, b, c) or f((a, b, c))
 
4:11 PM
why I keep writing console.log in PHP? Somebody help me...
 
0
A: Sandbox for Proposed Challenges

ngmThe Derby Stakes The Derby is a horse race run (near) annually since 1780 near the town of Epsom and is the middle leg of the Triple Crown. The race covers one mile, four furlongs, and six yards. Over the years it has had as few as 4 and as many as 34 entries. The fastest winning time was in 201...

 
4:33 PM
Error:
 Problem: nss-pem-1.0.3-6.fc27.i686 has inferior architecture
  - nss-pem-1.0.3-6.fc27.x86_64 does not belong to a distupgrade repository
  - problem with installed package nss-pem-1.0.3-6.fc27.i686
Can anyone help? I'm trying to upgrade Fedora 27 to 28.
I can't remove nss-pem since a ton of things depend on it. Wine, Vulkan, Steam
 
00:00 - 17:0017:00 - 00:00

« first day (2645 days earlier)      last day (2192 days later) »