« first day (2589 days earlier)      last day (2258 days later) » 

ngn
12:02 AM
@ASCII-only the source of light is moving, right? so those two angles must be changing too
 
I figured out how to measure the angle. The angle 0<theta<=90 formed between the other endpoint, the endpoint in question, and the point in question (in that order) should be maximized. This should be done on each endpoint of the mirror. Then, since the portion shaded depends on the angle, the maximum angles should determine the region that is always in shadow.
 
12:18 AM
Sorry, was afk getting married. — histocrat Sep 7 '15 at 14:03
10/10
 
@totallyhuman Congr...I'm years late in saying that.
 
Chat Mega Challenge: Turn this site into atari breakout with a google extension or equivalent
 
Anonymous
12:39 AM
Chat not-as-mega challenge: implement SequenceMatcher.ratio for two strings
 
@totallyhuman That's hilarious
Reminds me of this:
Aug 1 '16 at 2:29, by Mego
I got married yesterday. 10/10 would recommend, 0/10 would not do again.
 
Congr... I'm late again.
 
Anonymous
@EsolangingFruit A slightly better approach is a = product(factors); b = filter(lambda x: x not in factors and (a+1)%x==0, primes_up_to(a+1)); print(b)
 
Anonymous
12:55 AM
primes_up_to(n) is O(n) with the sieve of Atkin
 
@Mego Isn't a string already a sequence in Python?
 
ngn
1:12 AM
@Mego so what's the advantage? only that you're not testing whether a's prime factors divide a+1?
 
@Pavel ES6, 18 bytes: a=>a.map(e=>e+e%2)
 
@Neil s/map/Select to get a C# solution.
 
Trying to think of a CnR challenge
 
I wouldn't recommend you actively try to think of a challenge in a specific category; if any ideas come to you that might fit into a few categories, decide which category to use, but don't try to think of a CnR challenge just for the sake of having a CnR challenge.
 
I want one XD
 
Anonymous
1:19 AM
@Pavel Yes. I meant in other languages
 
-1
A: Sandbox for Proposed Challenges

ChristopherText to Brain-Flak Your challenge is to turn text input to brain-flak code that will output the text. Tutorial taken from here with permission here Brain-Flak has two stacks, known as 'left' and 'right'. The active stack starts at left. If an empty stack is popped, it will return 0. That's it....

Another call for feedback
 
Anonymous
@ngn Yeah, it's a very slight improvement
 
@DJMcMayhem that is so good actually
 
-1 for the part about the shuttle run ಠ_ಠ /s
 
Anonymous
Since a and a+1 are coprime
 
1:20 AM
@Mego the quote ^^^ i replied to is so good man. Like wow. I am actually blown away by the goodness of it
 
Except that there are obviously faster ways to find prime factors
 
You need way more test cases @Christopher
If you're going to make it [tag;test-battery] (if I remember the definition of that correctly), you need a lot more test cases.
 
@HyperNeutrino Those are not the test suite
Those are sample textx
 
> Test cases (these will determine your score)
 
forgot to change that XD
 
ngn
1:21 AM
@Mego I'm not even sure it's an improvement. In order to save log(a) "%" operations, you're introducing a/log(a) "not in" operations.
 
Oh I see in the bottom of your post your note about releasing it 1-2 weeks later :P I read large text over small text and if they conflict I usually misread the small text to make it match the large text
 
I fixed big text
 
> Optimization for test cases is not allowed
a bit hard to enforce, no?
also I edited to make the format a bit nicer to read
 
not hard to enforce
 
can you get a shorter way to get 7224 on the stack for pyt? I've only got 2ᴇ4/⬠ᵽ5+
lul @mudkip201 ↑
 
1:42 AM
Where is a flakker when you need one :(
 
What do you need flaker for
I can flak, just not well lmao
Just put a challenge in the Sandbox (won't post because NSP will do that soon)
 
ok so... what if i made a language like lost but certain necessary-for-tc commands cause the command pointer to be randomised again
i'm thinking this might be a decent idea
 
oh god why do you do this to us
 
one sec
 
@HyperNeutrino because i can
ok so
I'm going to modify my current language plan to just have every single obliviator obliviate all of the program state except memory storing blocks
should be fun
 
1:48 AM
Jan 2 '17 at 5:49, by Mego
> A friendly message from The Name of All that is Good and Holy: Hello! This is The Name of All that is Good and Holy. Before you think of making your own extension to this language, here's another idea for you to consider: Don't! For the love of me, please don't make another derivative of this language! Unless you have something truly new to contribute, it's been done a million times before and will probably make it worse than the original.
@DestructibleLemon read that
 
that's for brainf*** though
and it's for making unoriginal ideas
I have something new to contribute either way
 
still
 
no... the point of that message does not apply
it's not about difficult languages
it's about unoriginal bf derivatives
 
@Christopher Says the guy who made pain-flak
 
@Pavel I made pain-flak and that was a gift to this world, holds back tears as Pain-Flak threatens my family if I don't keep telling how good it is
 
1:51 AM
alright, so, two things
what will the language be called?
and also what sort of control flow should i use
 
make the pointer reorientation commands (^v<>) randomize position but not direction, and make commands do different things based on which direction the pointer is facing
 
i feel like that is a different idea altogether
 
0
A: Sandbox for Proposed Challenges

HyperNeutrinoSum on a Fenwick Tree! code-golf array-manipulation Background Information: What is a Fenwick Tree? A Fenwick tree is a way of representing the prefix sums of an array of numbers (basically, it makes it easy to get the sum of a contiguous run of numbers). While a normal array has O(1) access ti...

 
@NewSandboxedPosts ty NSP
 
i think that there can be an negative/positive/0 checker thing perhaps?
 
2:03 AM
@DestructibleLemon Bewildered
 
cool

 Esoteric Programming Languages

A room for discussing, creating, using, golfing and discoverin...
i might discuss in that room
 
3:00 AM
Why does esoteric so often have to imply "novelty" or "frustrating"?
 
because normal usable languages are usually practical :P
 
Anonymous
@Οurous Because normal programming languages are designed for usability (PHP notwithstanding). To be esoteric is to shun the typical design goals.
 
esolangs are usually designed to be weird and weird languages are usually frustrating because most coders are used to normal usable languages
@Mego I don't think PHP counts as a "normal programming language" anyway :P
 
Anonymous
It's more of a sequence of mistakes
 
PHP is the sum of an infinite series of mistakes
infinite sums \o/
 
Anonymous
3:02 AM
And that sum converges to 5.4
 
@Mego As a string, despite there being no strings in the series.
 
Anonymous
@Οurous But if you look at it too closely, it turns into 5
 
isn't there PHP 7.2.3 already though
 
Anonymous
Yeah but PHP 5.4 is still used worryingly commonly
 
3:04 AM
oh huh ok
the programming competition run by the nearby university allows submissions in PHP :P as well as Pascal for whatever reason
but not something like Ruby
 
I'd honestly rather program in malbolge than PHP 5.4. They're both irritating but one makes sense.
 
@Οurous okay then, write a server in malbolge :P
 
I haven't actually even really used or even seen PHP code much before. I tend to not look at it too much :P
 
when did they remove string rounding errors?
 
PHP 7.2.30000000000000000000000004
 
3:07 AM
@ASCII-only you'll be able to read my paper on it in a few decades :P
 
@HyperNeutrino i don't think so. it wasn't that recent
 
@DestructibleLemon I don't actually know, I'm just picking a random version I know and adding a bunch of zeros and then a digit to the end of it :/ was a joke lmao
 
:/ I'm trying to debug infinite recursion but it doesn't appear that the function causing the recursion is executing at all
 
Wait darn we really are on 7.2. I need to update the WordPress server again.
 
@HyperNeutrino ok but string comparisons had rounding errors in them for multiple major versions
 
3:09 AM
@ASCII-only compiler bug handling the recursion?
 
oh what ._. how does that even work
 
casting strings to floats before comparing them
 
0/10 WHY lmao
 
@Οurous this is Python, a.k.a the-snek-that-must-not-be-named
 
Anonymous
When I say that PHP is the worst language in existence, it is not hyperbole
 
Anonymous
3:11 AM
arr["5.4"] === arr[5.4] === arr[5]
 
;# is better than PHP? (I mean ;# is probably not considered a language so nvm)
@Mego that disgusts me... :P
honestly why ;-; even JS can do better
 
I'm sure someone is going to come along and say "When I say that JS is the second worst language in existence, it is not hyperbole" >_>
 
Anonymous
@HyperNeutrino Very low bar there
 
wait arr[2.3] is undefined instead of erroring
 
@HyperNeutrino obviously?
 
3:12 AM
OH GOD WHY DID I TRY THAT
 
Anonymous
That's because array keys can only be strings or integers
 
@Mego my goto thing would be string rounding errors existing for multiple major versions
 
@HyperNeutrino JS uses string keys for arrays
 
now uh
what... ok that's weird
@ASCII-only oh that actually makes sense. ok thanks
 
Anonymous
And if the string looks like a number, it is cast as a number, then floored
 
3:12 AM
but like JS has mixed arrays/dicts and it looks dumb
 
foo[{}] === foo['[object Object']]
 
@ASCII-only ah. Well can't help you much there.
 
because like a = [1, 2, 3]; a[2.3] = 4; a gives [1, 2, 3, 2.3: 4] o_O
@ASCII-only send code?
 
@HyperNeutrino here
 
how tf do you sign in to cloud 9
 
3:16 AM
@HyperNeutrino you need a credit card if you signed up after July 2016
 
ok? i don't see any option for that
I try to sign in with GH and it takes me to a username/email + password auth page
i can't log in to that
if I click the cat then it takes me back to the previous page
which contain two signin buttons which do the exact same thing
 
Anonymous
IIRC GitHub auth for c9 has been bugged for a long time
 
"give this website your credit card to see if you can help me"? I have faith it isn't as bad as putting it like that makes it sound.
 
can i just have like TIO or hastebin link or something lik that
 
what's the deal with needing a credit card for cloud nine
 
3:19 AM
@Mego I always sign in using GitHub though
 
@Οurous how would it not be novelty?
it ceases to be an esolang as soon as it's not novelty
 
@Οurous Well, describe a language that would be esoteric but neither novelty nor frustrating
@HyperNeutrino link
 
where is the infinite recursion being caused?
 
from the esolangs wiki: "An esoteric programming language, or esolang, is a computer programming language designed to experiment with weird ideas, to be hard to program in, or as a joke, rather than for practical use. "
 
test with ./charcoal -c '**(getvar "q", evalvar "Range" [5])' (caused by wolfram.py:132)
 
3:25 AM
if it were for practical use and designed normally, it wouldn't be an esolang
 
@DestructibleLemon I'm sure Ourous knows that though
 
@ASCII-only yep. While I'm looking, do you have a more concrete set of criteria for me to use than the excerpt by Destructible Lemon?
 
I can't even install regex ಠ_ಠ
 
@Οurous i would say that it has to be designed for novelty?
 
3:28 AM
#include "Python.h" fails
 
which sort of includes the novelty of being able to write short programs i guess
 
@Οurous see the one and only Esolangs Wiki :P (Basically, a language 1. not designed for practical use, and 2. implementing an idea which would never be considered for a practical language)
 
Anonymous
@HyperNeutrino Do you have the Python dev package installed?
 
but is scratch an esolang, if you consider it is for novelty instead of practical use?
 
@DestructibleLemon Golflangs aren't really esolangs imo
 
Anonymous
3:29 AM
@ASCII-only Golflangs are definitely esolangs. Extreme brevity usually doesn't allow practicality for general use.
 
@Mego I don't think so. I just did sudo dnf install python-devel and it still fails for the same reason; is that the right thing to install?
anyway brb o/
 
Anonymous
@HyperNeutrino Might be python3-devel
 
yep lol
0/10 using Gdrive instead of GH
@ASCII-only seems to just print the code string itself :/
brb
 
@HyperNeutrino oh yeah add <space>-v to the end
 
@Pavel since you're going to the dota thing, have you been to insomnia before?
I watch the stream of it but I've never been personally
 
3:47 AM
Oh yeah also when I try to use pdb it still recursion errors even though I set a breakpoint at the start of the function
 
4:05 AM
never mind. i was being an idiot
 
I started a project for an interpreter chain but it has stagnated
not interpreter, compiler, i mean
i think it might be a good idea to reboot that, perhaps restarting from the bottom, seeing as it was only like one or two languages
maybe we can use brainflak instead of brainf*** instead even
except that doesn't have interactive i/o
maybe i'll leave the current repo but start a new one in case the one other contributor cares at all about it
actually maybe i'll just make the new one on my github instead of as a group thing
 
4:23 AM
@Riker No... Actually haven't heard of it.
 
4:52 AM
What's a reasonably complex program that a language should be able to implement as a measure of completeness
 
Can somebody help me golfing this more? codegolf.stackexchange.com/questions/156967/…
I am sure this could be brought down to below 100 bytes.
 
@ManishKundu Unfortunately, there's a bigger problem, which is that your code itself has to be non-discriminating in this challenge.
 
damn it i didnt see that part.. .:/
removed that. sorry
 
@ManishKundu Even though it's invalid, here's -6: Try it online!
CMC: That challenge but without restricted source
@ManishKundu I got it down to 70 :)
 
5:10 AM
thats cool. also looks like i could make it valid by adding some un-necessary characters
 
Actually, I have two different ways to get to 69
 
@DJMcMayhem My Pip answer but without the no-ops :P
 
lel. i am also writing the code on mirc..
 
(It's possible that is the shortest way to do it... I'm not 100% sure yet though.)
 
Haha, I came up with a third way to get 69
 
5:17 AM
lol
 
113
Q: Tips for golfing in C

CaseyWhat general tips do you have for golfing in C? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to C (e.g. "remove comments" is not an answer). Please post one tip per answer. Also, please include if your tip applies to C89 and/or C99...

 
@Downgoat a (good) brainfuck interpreter is probably not a bad idea
be sure to handle nested loops properly
 
 
1 hour later…
6:28 AM
holy crap it works
read: holy crap it's not broken anymore
 
6:51 AM
@ASCII-only btw good news: Class compilation, ifs, strings, functions, variables, and returns all compile now :D
see slack for hackmd on abi btw
 
Q: Can I use the sandbox to sandbox things that are not challenges?
 
@Downgoat O_o
@user202729 No
@Downgoat also isn't it super late rn
 
yes
 
But QFT was sandboxed in the sandbox IIRC...
and username, without being a mod.
 
7:33 AM
@user202729 Well... if you have no reason to then don't. The only reason QFT was there was because it was a largish project and that was the most convenient place to put it (okay, it wasn't, but I'd say it's less bad than putting other things since QFT was such a massive project)
 
 
1 hour later…
9:01 AM
@DJMcMayhem 64 bytes
And 57 bytes outputting via exit
 
9:38 AM
0
A: Sandbox for Proposed Challenges

user202729Generalized subset-sum problem code-golf Given a positive integer m (modulo) and a list of number (multiset) A = a1, a2, ..., an where 0 <= ai < m for all 0 < i <= n, output the largest s such that there exists s disjoint subset of A and each subset sums to 0, modulo m. Test cases m, [a...] ...

 
9:51 AM
0
Q: Link to the main site

Weijun ZhouOK Maybe I am really dumb and fail to see something obvious, but I am not able to find a link to the main site (i.e. codegolf.stackexchange.com) in the non-mobile view of this meta site. I can find the link at the bottom of the page in the mobile view, or find the link to the right of the edit bo...

 
10:48 AM
hi all
hi @Mr.Xcoder
 
Hello
 
do you think there will be an amazing J answer to my challenge?
as someone who knows more about golfing languages than me
 
1) J is not a golfing language 2) There might an amazing submission if the J experts hover over your challenge... Why?
 
People tend to think that whatever language that is shorter than their favorite language is a golfing language -- no, they're not.
 
11:24 AM
i waned to get rid of that argument inside the while loop :P
 
... What language is that?
 
mIRC scripting language, also called msl
 
Any documentation?
 
you can look at the mirc help file..
wait i will give a link
 
@Mr.Xcoder codegolf.stackexchange.com/a/96847/9206 is what I was thinking of
 
11:33 AM
made it to 13 bytes with recursion :D
 
@Mr.Xcoder which solves a similar problem awesomely (in a golfing sense)
oh and.. we need more answers in bash!
 
That’s Digital Trauma’s job!
 
@Lembik more answers in msl too.. thats way too rarely used.
 
>___>
 
11:37 AM
i guess quite underpopular too.. lol
 
but everyone uses bash!
(who isn't a windows person)
 
I don’t.
 
it has literally millions of users
 
And I am a mac person :)
 
@Mr.Xcoder ah :) what is the default shell on mac?
 
11:38 AM
Well... bash
 
:)
I just checked that while learning echo $0
which I had never used before
so I learned some new bash :)
 
11:50 AM
@Mr.Xcoder do you think you would be able to implement the new definition of a Hafnian in python at en.wikipedia.org/wiki/Hafnian ? It looks much faster
I don't know how to get all 1-factors (perfect matchings) on the complete graph easily
 
@Lembik yeah that one.
 
@ManishKundu :)
 
Hmm, who edited it
I'll check it out as soon as I can
 
ShreevatsaR
he is very clever
@Mr.Xcoder thanks!
he/she is very good at math to be more precise
 
Oh I think I know them. The guy/girl with ~30k on Math.SE?
 
11:53 AM
yes!
the new method looks like it should be hugely faster
 
Oh wow that's much simpler (mathematically speaking)
 
right!
 
When it comes to programming, though... it seems far more complicated
 
ah :(
it would at least be nice to test if it gives the same answer :)
 
I know how to generate K_{2n}
However I am not sure how to implement the set of perfect matchings
I'll try
 
11:57 AM
to any mods, the sandbox is still missing from codegolf.stackexchange.com
@Mr.Xcoder cool!
 
@Lembik It is featured though, there's not much they can do I think
 
@Mr.Xcoder how do you find it now?
 
Go to meta and click the "active" tab
 
Assume there is exactly one file with abc extension in the current folder and an executable named a, would ./a < *.abc be a valid command?
(I can type it in the bash prompt but I can't put it in a sh file)
 
@Mr.Xcoder thanks
 
11:59 AM
0
Q: Learning programming, please help me with the below question

Rakesh Roshan0 0 1 0 0 1 2 1 0 0 1 2 3 2 1 0 0 1 2 3 4 3 2 1 0 write a script / program that prints the lines above. Please make the script/program flexible that it can expand to 1000 lines printing similar pattern with minimum changes.

0
Q: associating resistors with short circuits

Martin Horst If I4 = I, what is the voltage between A and B?

 
@user202729 why can't you pit it in a sh file
 
@NewMainPosts ಠ___ಠ
 
About bash shell expansion - when will them be expanded? (<-- please don't answer that I'm rubber duck Google searching)
He is a programmer, he dosent explain how to do it. please tell me what concept this is, i will search and start learning there. — Rakesh Roshan 2 mins ago
Should I?
(our off-topic rule says that we should not help the OP anyway)
In this case - "find a Java tutorial, binomial coefficient".
(are my comments on off-topic NMPs better now?)
So this is my problem.
 
12:15 PM
@user202729 No! Don't help them! Don't incentivise them to seek for help here
 
So,
> Sorry, our rules says that we can't help off-topic askers.
Would that work?
 
Hm...
BTW, VTD request.
 
Already. Not? Then what have I just VTD?
 
... I don't think so. I VTD'ed and there's only one vote
@user202729 You VTD'ed the now deleted electrical engineering question
 
... the physics one.
 
12:22 PM
Man, TIL how hard fighting against the system is...
 
... Whoops, I accidentally voted to reopen the deleted physics question.
 
It doesn't matter that much now
 
I guess that should not be a problem as it's deleted anyway?
@Mr.Xcoder ...?
... Why does my script work with #!/usr/bin/bash but not #!/usr/bin/sh while (v)?
 
@user202729 Long story... I better refrain from expressing my disappointment here.
 
readlink -f /usr/bin/sh
/usr/bin/bash
 
ngn
12:28 PM
@user202729 from "man bash": If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible
 
So which one is better? (<-- primarily opinion-based, off-topic) (<-- wait a minute rubber duck first)
 
ngn
@user202729 that question belongs to philosophy.SE :)
 
Ok, sh.
 
12:40 PM
@ngn I updated the hafnian question so that the input elements are integers
thinking of posting it now
the fastest-code version that is
 
ngn
@Lembik my suggestion was to use a finite field (e.g. ints modulo a prime), but I guess that might also work
 
@ngn yes that would make sense mathematically but I fear would put off some coders
and people would complain that it was an irrelevant extra specification.. and I have no idea what the complexity of the problem is mod 2 !
 
ngn
@Lembik yeah, there's always danger of that
 
it seems that -1,0,1 chosen at random doesn't give too large answers
 
ngn
@Lembik but there would still be division by n! 2^n, the denominator depends only on n, not the data
 
12:47 PM
we don't have any Objective-C coders here do we?
 
@ngn Did you see the new formula on the wiki page?
"Equivalently,[...]"
 
ngn
@Lembik oh... I need time to digest that :)
 
@ngn :)
 
ngn
@Lembik without the denominator what you said makes much more sense
 
great
someone just downvoted it!
please save me :)
-1
Q: Compute the Hafnian as quickly as possible

LembikThe challenge is to write the fastest code possible for computing the Hafnian of a matrix. The Hafnian of an 2n-by-2n matrix A is defined as: Here S2n represents the set of all permutations of the integers from 1 to 2n, that is [1, 2n]. The wikipedia link also gives a much faster looking fo...

@ngn hmm. how do you get a fractional value from the new formula?
if the input is all integers
 
12:55 PM
@Neil I know Swift, if that helps any... They're somewhat loosely related
 
as in print(hafnian([[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8], [1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8]]))
33673.5
 
@Mr.Xcoder is the memory management the same?
 
Hmmm, I don't think so
:(
 
Swift is a high level language (i.e. with GC) - it's comparable to Dart/C#
 
ngn
@Lembik good question :) either one of the two formulae is wrong, or the implementation
 
12:57 PM
argh!
@ngn all the implementations are giving the same answer
 
Are you sure that all the terms of the perfect matchings are integers?
(I don't have a good understanding of what those are yet)
 
@Mr.Xcoder see page 93 of books.google.co.uk/…
which is the first page you see
and then compare to 4.1.1.2
 

« first day (2589 days earlier)      last day (2258 days later) »