« first day (1848 days earlier)      last day (3010 days later) » 

4:01 PM
ok, let's stop being imprecise
def verify_model(model, hist):
    # 15-bit integers.
    for p in model:
        if not type(p) is int:
            raise Exception("model does not consist of 15-bit integers")

        if not 0 <= p <= 0x7fff:
            raise Exception("model does not consist of 15-bit integers")

    # Sums to 1.
    if sum(model) != 0x7fff:
        raise Exception("cumulative probability of model is not 1")

    # Non-zero.
    for i in range(len(hist)):
        if hist[i] != 0 and model[i] == 0:
            raise Exception("model assigns zero probability to non-zero probability symbol")
 
That assumes that each integer in the "model" directly represents the probability
 
well, that is the problem at hand
as I said, I'm not interested in other 'representations' as you call them
 
You should have stated that as a requirement
So you can only choose how the model is written, not read, correct?
 
52 mins ago, by orlp
I want the ratios as 15-bit fixed point
not "I want a representation of the histogram using a scheme that incorporates 15-bit fixed point"
 
True but my earlier solution still had the ratios
And used 15-bit fixed point
 
4:05 PM
@LegionMammal978 can you implement your solution such that I can verify it?
 
I'm stating that for the meta-solution, you would need a different verifier
 
well, I'm looking for actual solutions
if it can't be verified it isn't a solution
 
True, but it's still a solution
It just has to be verified differently
 
how?
the problem directly said: transform the ratios into 15-bit fixed point
such that...
the above verifier checks that
 
Okay, so we have to use that specific verifier.
That would have been useful to know
 
4:08 PM
That verifier just implemented my requirements without any possible ambiguity left over.
 
I know, but it's restricting the number of possible solutions meeting those requirements
 
no it doesn't?
 
Like my all-ones-followed-by-0x2345-because-we-know-it-already solution
 
that's not a solution
 
Why not?
 
4:10 PM
it directly fails that they must sum to 0x7fff
 
But you don't interpret the 0x2345 as a number
 
57 mins ago, by orlp
and the last requirement is that the cumulative probability must be exactly 0 to 0x7fff
@LegionMammal978 yes it is
7 mins ago, by orlp
52 mins ago, by orlp
I want the ratios as 15-bit fixed point
 
You interpret it as an instruction to take the remainder and use that as the last number
 
There IS NO INTERPRETING
15-bit fixed point is entirely unambiguous
@LegionMammal978 do you know what 'fixed point' means?
 
Why? It's still a 15-bit fixed point number, just not a direct output value.
 
4:12 PM
or are you just reading over it?
 
Yes, I know
 
Please do explain
Because if you did, you'd know that those values exactly are the ratios, and that exactly is the output, exactly as I specified in the requirements
 
Where did you state that?
 
2 mins ago, by orlp
7 mins ago, by orlp
52 mins ago, by orlp
I want the ratios as 15-bit fixed point
 
0x2345 is still a 15-bit fixed point (010001101000101)
 
4:14 PM
but it fails
1 hour ago, by orlp
and the last requirement is that the cumulative probability must be exactly 0 to 0x7fff
 
It's just not the value you use
 
IT IS
MY GOD
 
So you're saying that we have no control over how the values will be read from the array, correct?
 
IF I ASK YOU FOR AN ARRAY OF REAL NUMBER PROBABILITIES SUCH THAT THE CUMULATIVE PROBABILITY IS 1, WOULD YOU ARGUE THAT "5 is a real number", or that "0.5 is a probability, but it's not the value you'd use"
 
I'm saying that it's a 15-bit fixed point number, just not a probability
 
4:16 PM
IT IS
THAT WAS THE PROBLEM
anyway, I'm done arguing about this
 
@orlp Is the allcaps really necessary here?
 
So you're saying that every 15-bit fixed point number in the array is a probability, correct?
 
@Doorknob @LegionMammal978 is being exceptionally dense, uncooperative and it's really getting on my nerve
@LegionMammal978 yes
 
Okay, now I can try to think of a solution meeting your new requirements
 
4:18 PM
@LegionMammal978 this is not a new requirement
if you go back to where I list the requirements
I mention 'probability' in every single one
stop trying to act as if there was no misunderstanding, and I'm moving goal posts
 
I believed that it meant "probability" as the value that the array means
But now I realize that it is the values that the array contains
 
If someone makes a code golf, "half every number in a list", and you simply output the list, do you also try to argue that every number in your list means that it's half the value?
 
@Doorknob If someone awards a bounty on your answer and that answer is deleted, do you lose the rep from the bounty?
 
probably
 
What makes you think there was a meaning step allowed in all this?
That there was some interpretation of whatever you're outputting?
 
4:22 PM
@quartata yes
 
No, there's a standard loophole against that, I believe
But none were specified for this problem
So I assumed it was allowed
After all, something must read this array
 
@Doorknob k
 
There is one new requirement that I didn't have before, written out.
0 probability must stay 0
(before I only had >0 must stay >0)
 
And 1 probability must stay 0x7fff?
 
That can be deduced, but not from that rule alone.
The sum must be 0x7fff
 
4:26 PM
I see
 
If something has a probability 1, all other probabilities must be 0
 
Let me think
I can't just use another distribution of values, with more values near the edges...
 
So this is the new verifier:
def verify_model(model, hist):
    # 15-bit integers.
    for p in model:
        if not type(p) is int:
            raise Exception("model does not consist of 15-bit integers")

        if not 0 <= p <= 0x7fff:
            raise Exception("model does not consist of 15-bit integers")

    # Sums to 1.
    if sum(model) != 0x7fff:
        raise Exception("cumulative probability of model is not 1")

    # Zero must stay accurate.
    for m, h in zip(model, hist):
        if (m == 0 and h != 0) or (m != 0 and h == 0):
Obviously you may assume that the histogram is not all 0, otherwise you can't sum to 0x7fff yet 0 stays 0 :)
 
Does that mean that we can assume that there is at least one symbol?
 
oopsie, fixed p <= 0x7fff instead of p < 0x7fff
@LegionMammal978 Whatever, sure.
 
4:32 PM
Sorry gtg
 
@quartata I have been summoned!
 
4:52 PM
What on Earth is an .xdp file and how do I print one?
 
@MartinBüttner Nice to look back and see how much Retina has evolved:
13
A: Area of an ASCII polygon

Martin BüttnerRetina, 293 + 15 = 308 314 385 bytes ;`\s _ ;`\\ / ;`.+ o$0iio ;+`(o(?=/.*(i)|L.*(ii)|V.*(io)|_)|i(?=/.*(io)|L.*(o)|_.*(ii)|V.*(i))). $1$2$3$4$5$6$7$8 ;`o <empty> ;`ii$ #:0123456789 ;+`^(?=i)(i*)\1{9}(?=#.*(0)|i#.*(1)|ii#.*(2)|iii#.*(3)|iiii#.*(4)|iiiii#.*(5)|iiiiii#.*(6)|iiiiiii#.*(7)|iiiiiiii#...

 
@PhiNotPi It's like a XML asset holder thingy for PDFs
 
and that was less than a year ago
 
@quartata Any clue what (free software) I can open one with?
 
I think you need Adobe Reader
 
4:59 PM
and adobe flash too, just in case.
 
er no
Well, maybe.
You never know with Adobe.
 
Context: My state's primary is in a week, there's a 90% change that I'll just drive the 20 minutes to vote in person, but I was looking at the "official absentee ballot application generator" that they have set up, and it spits out an .xdp file.
 
does anyone know how to start off a codeblock with a newline?
 
<pre><code>
stuff</code></pre>
 
thanks!
…and the userscript breaks
 
5:05 PM
@randomra well yeah Retina is only like a year old ;)
 
The languages grow up so fast
 
@Maltysen <pre><code></code></pre>
 
oh
derp
 
I think I can tell which errors in the console are default Source engine errors and which ones were added by the Stanley Parable modders:
> video playback too fast -- wtf??
> VP8 SOUND NOT LOADING WHAT IS THIS I DON'T EVEN
 
5:25 PM
._.
dat error
 
Both Pyth and MATL are down to 26 bytes. This has me only slightly worried
If Jolf loses even though it has a built-in that'll be kinda sad
 
I can try golfing it again....
 
@Maltysen I always found it kinda weird that print with trailing newline was a literal newline in Pyth
@CᴏɴᴏʀO'Bʀɪᴇɴ I tried a couple things (combining the replacements into one primarily) and it didn't help
I don't think it can be golfed more
Here I'll try one last thing though
 
@quartata that decision was the result of a few character reshufflings
 
If I didn't overload decrement, I could save a byte :(
 
5:34 PM
\x05 is space you said?
 
Hrmph I'll have to use a hex editor
 
Or just type \x05 in the textbox and press "apply transformation of code"
 
Oh nice
 
5:36 PM
23 bytes.
 
good job! :D
I forgot about doing that. Include both for completeness
If I can find a one-byte function that returns falsey/truthy only for 1, we can golf it another byte.
 
Yeah I was trying to find a shorter way than ternary
 
there might be!
 
5:41 PM
BTW, a hexdump button would be cool
 
Oh, not a bad idea! I'd have to make my own though.
Well, that's what I'm doing today XD
 
Well, safely in the lead.
I'll hunt around for a shorter way to handle n = 1
 
@somebody ummm
 
Yeah he just forked Rotor too
But not pl ;_;
 
5:48 PM
snowman also
 
Probably didn't fork pl because it's written in perl
 
somebody is forking a lot
6
 
None of mine :(\
 
My child was forked.
 
File a police report.
 
5:51 PM
s/fork/spoon ( ͡° ͜ʖ °)
 
Why fork Rotor and not pl
 
pl being written in Perl is no explanation. Rotor is written in Groovy.
 
That's pretty groovy, amirite?
 
Well Groovy kinda looks like Java
Maybe he got confused
 
Groovy is not at all Groovy.
 
5:53 PM
OK just because Groovy is slow doesn't mean it isn't groovy
 
It pretty much does.
 
I don't have @CompileStatic on in Rotor it would be faster
 
Jelly is slow. 30 seconds for FizzBuzz is a crime.
 
Fine I'll turn on @CompileStatic
 
5:54 PM
Also Jelly isn't that slow
 
How fast is BF fizzbuzz?
(if any)
 
It's pretty slow. Recent versions got better though.
@CᴏɴᴏʀO'Bʀɪᴇɴ goo.gl/YjdZ5T (500 ms)
 
Wow. I thought it would be a heat death of the universe type thing :|
 
I don't know how other interpreters do it, but TIO transpiles to C, then compiles with gcc. That's probably overkill for small programs, but it should be pretty fast for complex ones.
 
question for the radiation-softened quine
 
6:00 PM
@Dennis if you're bored you could pull Retina... the change is so minor though it's no problem if you don't
 
since 0 byte programs don't count as quines, one char answers are invalid
but if I have a two-char literal, would that count?
like 11
 
@MartinBüttner Pulled.
 
thanks
 
@Maltysen Literals aren't quines. They aren't payload capable.
 
oh, ok then
 
6:02 PM
I have a suspicion that the problem is impossible with non-cheating quines, but I'd be happy to be proven wrong :)
 
I almost have something working.
 
That's what I thought about regexes that only match themselves.
 
(I think at least any quine that meets my - imperfect - definition of a proper quine can probably not solve the challenge by definition)
 
How so?
 
well the definition says that there must be some part of the code encoding another part. if you only change one of them, there's going to be some sort of mismatch, no?
 
6:11 PM
\o/ Vitsy is finally on the 'Evolution of "Hello World!"' question.
 
are newer languages even allowed?
 
The answer before mine was. And Jolf's younger than Vitsy.
 
might have been an oversight as well
 
¯\_(ツ)_/¯
 
@Calvin'sHobbies are you aware that you're allowing newer languages to Evolution of HW?
 
6:14 PM
0
A: Repair the ranges

vageliPython, 184 bytes z=0 for i,e in enumerate(t): if e!=0: while z!=0: if l>e: t[i-z]=e+z else: t[i-z]=e-z z-=1 l=e else: z+=1 print t Input: must be a [list] of ints Output: [list] of ints

 
@VoteToClose link me?
 
0
A: Evolution of "Hello World!"

VoteToCloseAnswer 173 - Vitsy Distance 7 from answer 172 4mrZ"#03w(*#class jux!{public static void main(String[] h){#\ #System.Console.Writeln(//@\//Hello*}}print,cat<<#*)\ put" a "Hello World!";#(O).g!)S(#X` ;}}//printputsx;//-##E;]bye#*) Oh, geez, that was easier than I expected it to be. Explanation:...

 
@VoteToClose ?
 
@AlexA. I was asking if it checked out, apparently that message didn't come through.
 
OIC
Welcome to Programming Puzzles & Code Golf! Your code appears to assume that the variable t is defined. In general, submissions cannot assume that variables exist because it makes them snippets rather than full programs (which read from STDIN and write to STDOUT) or functions (which accept input and return output). To fix this, you could add t=input() or wrap the whole thing in something like def f(t). Let me know if you have any questions! — Alex A. ♦ 3 mins ago
Does not quite check out
 
6:18 PM
I saw that. ;P Thanks. I don't know Python well enough to comment.
 
Looks like a lot of whitespace for a golfed program, too =P
 
^
That's what I was thinking.
Also:
 
Once he makes it a valid submission I'll link him to the Python golfing tips
 
\o/ I'll celebrate with you but I don't know what we're celebrating
 
6:22 PM
181k people reached.
I feel speshul
 
:3
 
I have cast over 5x the amount of votes you have .____.
 
meanwhile, Alex has 459k reached
 
O.o
Dam son.
 
6:23 PM
3930 of which are upvotes.
 
You also have 1.75* my rep. D:
 
There
 
o-o That seems edited.
 
#inspectelement
 
6:23 PM
 
I have cast more votes than alex. >_>
 
Huh
 
A lot of Alex's votes are downward facing, though. >.>
@somebody Why are you forking so hard?
 
Downvoting is an important part of the site.
2921 up, 652 down
 
...
My question makes one-boxes no work. D:
 
6:26 PM
lel
 
Skype For Mac Team Has Agreed To Remove The Word 'Unexpected' From Crash Reports
 
Nailed it. ;P
 
@undergroundmonorail Rofl =P
 
Does anyone know how URLS handle \x00?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Depends on the application, I guess - it's a known potential vulnerability owasp.org/index.php/Embedding_Null_Code
 
6:37 PM
Thanks!
 
23
Q: Approximate ∫((e^x)/(x^x))dx

VoteToCloseYou are to approximate the value of: Where your input is I. Rules You may not use any built-in integral functions. You may not use any built-in infinite summation functions. Your code must execute in a reasonable amount of time ( < 20 seconds on my machine) You may assume that input is grea...

@VoteToClose that's because that's a link to a comment.. see ^
 
Comments should also onebox, as yours did
 
I know it was a link to a comment. Still shoulda worked. ;P
 
@El'endiaStarman I'm working on compressing the data for VoL! :D
 
6:55 PM
VoL?
Oh, variations of life. Got it.
 
@VoteToClose it worked. mine did, then i deleted it though.
 
O.o
 
@VoteToClose VoteOnLine
 
The o wasn't capitalized ;)
 
7:00 PM
I know
 
On wouldn't be capitalized anyways.
 
I did it to match VTC's username capitalization
 
Neither would "to".
 
7:01 PM
Vitsy did calculus! :3 I'm so proud.
 
0
A: Approximate ∫((e^x)/(x^x))dx

VoteToCloseVitsy, 39 bytes Thought I might as well give my own contribution. ¯\_(ツ)_/¯ This uses the Left-Hand Riemann Sum estimation of integrals. D9/([X9]1a5^D{/V}*0v1{\[EvV+DDv{/}^+]V* D9/([X9] Truncation trick from Alex A.'s answer. D Duplicate input. 9/ ...

The explanation on that one is really long.
 
TIL not to build something from source with an aluminum bodied computer on my lap.
 
kek
Well done.
 
My thighs are red
3
 
7:04 PM
*thighs
 
kek
 
And out of context quote for the day ;)
 
( ͡° ͜ʖ ͡°)
 
I need to make a keyboard with a zero-width space ...
Can someone help me implement this (below)? I'm having a whole lot of trouble with it.
3
A: Optimal compression for a large base 10 number contained in a string

riciIf you work on the number in groups of three digits, you can represent each triplet in 10 bits with very little wastage. Then you "just" need to create a stream of 8-bit octets from your stream of 10-bit triples, which will require a certain amount of bit-shifting, but is not awfully complicated....

 
@AlexA. I read that as "My things are real"
 
7:08 PM
@AlexA. It's a real word. o-o
 
@Optimizer ( ͡° ͜ʖ ͡°)
@VoteToClose Wait, really?
 
The action of wasting, yeah.
 
Huh
Language failing today I guess
3
A: Optimal compression for a large base 10 number contained in a string

Mark Adlerrici's answer, using 10 bits for every three digits, is indeed what I would use for a practical application. However since you asked for the optimal compression and stated that you don't care about speed, that would be generating a binary representation of the decimal number using multiple preci...

I don't know what that one is talking about but this one recommends GMP.
 
It's JavaScript.
Does not have that.
 
7:10 PM
Reimplement GMP in JavaScript.
 
._.
I cannot seem to write the inverse function correctly ._.
 
While you're at it, reimplement the .NET regex engine in JS as well.
 
I probably should do that.
 
It's open source.
I've seen the source code.
It's horrific.
 
I DID IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
BOOYAH
 
7:13 PM
What, you implemented .NET regex in JS?
 
Oh
 
the number compression
 
Nice
 
And now I come to the astounding revelation... I'm an idiot.
>_<
 
7:16 PM
lel
 
Hello
 
¡Hola!
 
'morning
 
Feb 7 at 17:14, by RikerW
And the realization hits...
 
:OOOOOO
Holy hell.
I refreshed the page and there was another thousand. :O
 
@VoteToClose objection :p
 
overruled
 
INTERNET COURT IN SESSION.
 
my rep is 2^9 - 1 :D
 
7:40 PM
Oh hi
 
and its funny because?
 
its not
 
then why :D?
 
its internally pleasing
 
^ I get this.
 
7:40 PM
:D Just means happy. O.o
 
:D means laughing.. :) is happy
 
Sniped your challenge @Seadrus
 
holy shit
 
1
Q: Is the time linear?

SeadrusI like patterns in time. My favorite is when the time lines up. For example, all of these line up: 3:45 12:34 23:45 3:21 6:54 This is because each digit in the hour/minute is one more/less than the previous. Your task is to take the current time and check if it "lines up" in this pattern in a...

 
do you guys just stalk the unanswered question page
 
7:42 PM
yes
i just stalk.. i do not answer them.
 
I stalk and answer if I can type fast enough.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Why does everyone want to work on VoL except me? :P (Well, there's only you and @somebody, but still.)
 
8:05 PM
hmm, I think I might have a go at doing that latest one in Batch later, assuming nobody else beats me to it
 
what is this "VoL" you speak of
 
aaaaaaaaaaaaaaaaaa the CSS make it stop
 
* { display: none !important; }
 
Yeah, that'll do it.
 
8:21 PM
@El'endiaStarman what happened to the Voronoi maps one?
did you ever do it?
 
Just added that as a style on Stylish. Would not recommend.
Even the Stylish options page gets the CSS applied to it. Hilarity ensures.
 
you guys are such nitpicks.
Hows about reopening my question?
 
The Nitpick Byte
 
@Seadrus So constantly means that 1:21 is not linear? That's not nitpicking, 3 of the 4 answers got it wrong.
 
none of the examples showed it, so why should they get it wrong?
 
8:27 PM
I just wrote a dice-rolling bot for a GroupMe group.
 
@Seadrus That's how the first answer did it and the others followed its lead? Not sure. I'll reopen the question, but please add the test case I mentioned so there's no more potential for confusion.
 
kay
 
@Seadrus A good way to phrase it would be that all digits are either strictly increasing or strictly decreasing.
 
thanks
 
@Maltysen Never got around to it. :/
 
8:38 PM
ah, k
 
I did, however, finish two projects! :D
Though one of those projects might get "un"-finished... >_>
 
which ones?
 
The Minkolang Online Interpreter (I "fixed" the memory overusage problem) and Variations of Life (I implemented the render-to-gif feature).
 
@Cyoce What is it with you people and wanting every website to be slathered in Web 2.0 CSS
 
@Cyoce What CSS? :P
 
8:47 PM
@NewMainPosts Isn't this a dupe of codegolf.stackexchange.com/questions/19540/…
 
No, that are entirely different patterns.
 
Oh, I thought the third pattern was the same
 
No, that's only increasing, which is easier.
 
hmm, 256 bytes, might need to golf it down a bit
 
@Alex @Dennis it's fixed.
 
8:59 PM
Cool beans
 
I prefer hot beans
 
Same
 
But I am not really into beans anyway
 

« first day (1848 days earlier)      last day (3010 days later) »