« first day (1852 days earlier)      last day (2983 days later) » 

7:00 AM
Unless you somehow "watched" a and updated it once, then just fetched the results later.
 
@Mego -> is already being used for function chains.
b :> 3*a?
 
Anonymous
Sure
 
Bonus: smiley.
 
Anonymous
But it should point towards the target
 
Anonymous
So b <: 3*a
 
7:01 AM
How is this link being accomplished...?
 
I generally worry about implementation details later.
But it'd work such that any time you need the value of b, it is calculated from a, or it's updated when a changes.
 
@El'endiaStarman is it written in python?
 
Anonymous
It's essentially a property
 
@somebody Yes.
 
@El'endiaStarman The first case sounds no different than a regular function :/
 
Anonymous
7:03 AM
So in JS-ish: b.get = function(){ return a*3; }
 
idk, but you could always treat all objects as functions
 
@Geobits The difference is ease. No bookkeeping work for the programmer needed.
 
Anonymous
Or more like Python, b.__call__ = lambda self: a*3
 
I don't see that. I just see a difference in syntax tbh.
 
That'd be one way to do it, yeah.
 
7:03 AM
@Mego foo = class {get b{return a*3;}}
 
Anonymous
Actually I can write up an example impl real quick
 
Anonymous
Ack I'm not sure I know how to do it in Python because pointers would be the easiest way
 
@Geobits Possibly a good thing. And besides, aren't differences between programming languages of the same kind just "differences in syntax"?
 
I'm just saying it doesn't sound different than what I said before: b=f(3*a)
As in b is a pointer to the function.
 
Yes. What I'm proposing is that b behaves like an int everywhere.
 
7:06 AM
Yea, you make f() return the int. That's what I meant.
So you could do d=c+b etc
 
d=c+b would treat b like a function in that way.
 
Mathematica has a := operator which seems similar to this.
 
Hi everyone!
 
7:09 AM
@Mego I don't get what have to be done in your holier number challenge... What do you mean when you say " output the Holier Number whose 0-index is n"?
 
@El'endiaStarman what you have here isn't actually a link of some sort
 
@AlexA. Ya know, I knew there was no good reason to click that, but...
 
@El'endiaStarman it's a closure with automatic calling
a = 3
b = lambda: a*5
 
then whenever b is used b() is substituted
 
7:11 AM
@AlexA. *simulator
 
*emulator
 
Anonymous
@Katenkyo 0-index means index, starting at 0
 
Seems sort of the opposite of a closure... it does not remember the value from when it was created
 
>>> a = 3
>>> b = lambda: a*5
>>> b()
15
>>> a = 5
>>> b()
25
 
Anonymous
So n=0 would be the first value in the sequence
 
7:12 AM
Helka? Is that you? Hello!
 
more socks!
\o/
oh
 
@Mego oh... so it's the (n-1)th element of the sequence, thanks.
 
not a sock, a name change
 
Not a sock
So many in-challenge Calvin references to change :o
 
7:13 AM
@ಠ_ಠ ಠ_ಠ
 
@orlp I called it a "link" not for any technical reasons. Just calling to mind the concept of a link between two objects (not in the programming sense) such that when one object changes, so does the other.
 
@Geobits Nah, I don't like overwriting history
 
> I used to be "Calvin's Hobbies":

But that changed the day Programming Puzzles & Code Golf graduated. So long Calvin.
 
@El'endiaStarman a link is bidirectional in my book
 
Oh, so CH was your training name? :P
 
7:15 AM
@orlp I could implement that too. b <:> 3*a or something.
 
@El'endiaStarman you can't
 
Anonymous
@Katenkyo Yep
 
it's magical and unsatisfiable
 
@HelkaHomba You're... you're not you anymore. D:
 
Anonymous
Man why is everybody changing their names
 
Anonymous
7:15 AM
I know we're graduating but we don't have to change this much
 
Not me. I'm staying the same. Forever.
 
I guess I'd better change my name and avatar
 
Anonymous
NO
 
This is going to take some getting used to. So much cheese movement.
 
Anonymous
Birds must be consistent!
 
7:16 AM
who else changed names
 
i don't want to change my name
Aqua Tart
lirtosiast
 
@orlp Lynn and lirtosiast
 
Anonymous
Thomas, Mauris, Calvin, quartata so far that I can think of
 
@orlp Example where it would fail?
 
My name isn't changing. My avatar might when we get a design... maybe.
 
7:16 AM
@AlexA. :( I know, but I've been planning on retiring Calvin for a while
 
@HelkaHomba Why so?
 
@El'endiaStarman b <:> 0*a
 
Anonymous
My avatar only changes for holidays
 
b = 5
 
@HelkaHomba You're literally in media coverage as Calvin's Hobbies.
 
7:17 AM
can someone give me a full list of name changes
 
Anonymous
And even then it's just more penguins
 
Anonymous
It's penguins all the way down for me
 
@orlp Calvin's Hobbies -> Helka Homba, Thomas Kwa -> lirtosiast, quartata -> Aqua Tart, Mauris -> Lynn
 
I agree with Mego, nickname changes are disturbing ^^'
 
@orlp Solvable by making such a bi-directional link work only when the function has a defined inverse and only when the inverse exists at that value.
 
7:18 AM
@somebody Yes
 
@El'endiaStarman that's not achievable for any reasonable definition of achievable
 
@AlexA. Idk, just more original. (And if I start making mc vids again once 1.9 comes out my profiles across sites are more continuous.)
 
@orlp Why not? For functions not defined in Pytek originally, require the end user to define the inverse.
And if one doesn't exist, oh well, that feature isn't usable.
 
@HelkaHomba RIP Calvin's Hobbies. u_u
 
7:21 AM
TIL @HelkaHomba 's avatar is a minecraft skin
 
Well, it is good to have a name that isn't copyrighted/trademarked if you plan on ever monetizing anything ;)
 
@Mego super overcomplicated
int a = 5;
auto b = [&]() { return 3*a; };
 
Anonymous
@orlp Doesn't work when you leave that scope
 
Anonymous
(I think)
 
@Mego neither does yours
 
Anonymous
7:22 AM
(It's been a long time since I did C++)
 
@HelkaHomba You should change Chat Relay's avatar.
 
you have a pointer to a local variable
 
Anonymous
No, I have a pointer to a dynamically-allocated variable
 
oh no you don't
but that's a moot point
I could make a a pointer to some object as well
 
If the original variable is out of scope, there's no reason to expect good things to happen.
 
7:24 AM
I expect rainbows and puppies once things go out of scope.
 
Anonymous
There, updated it to show that scope works
 
now mine also can go out of scope
if you share the variable
 
This all still sounds quite dodgy imo >_>
 
make_shared? What is this, Communist Russia?
 
@AlexA. no, that'd be own_means_of_production
 
Anonymous
7:26 AM
Smart pointers
 
Anonymous
I need to learn all the C++11 stuff at some point
 
@Geobits Ha, sure, I don't mind you saying so. There's no guarantee that it'll get implemented. I do want to explore all sorts of ideas that could be really helpful for reducing the programmer's work.
 
@orlp Is that in the standard library?
 
Anonymous
I can't follow replies and I'm an idiot
 
@El'endiaStarman Sure,sure. I'm all for experimentation. I'd be interested to see it if/when you get it working the way you want.
 
7:28 AM
I can't believe Calvin is gone. ;_;
9
 
I think I identified the song that was going through my head earlier! It's Blackout in the album Battlecry by Two Steps from Hell. I'm listening to it right now. :P
 
@El'endiaStarman but how often will programmers use it?
 
@somebody Considering that I want to use it for actual stuff...
 
linking variables?
 
[shrug] Might be useful.
 
7:29 AM
Well since @HelkaHomba is a thing now, I guess we should do right by it and start posting anagrams. How about Elk mob? Haha! to start?
2
 
downstars Geobits
 
Anonymous
I'm sad about the usernames changing
 
anti downstars
 
I'd say let's not criticize @El'endia's beautiful language until it's implemented. Then we can really tear into it. >:D
 
Anonymous
@Downgoat userscript make Calvin's name come back
 
7:30 AM
@Mego hold on
 
@AlexA. I'm.....not sure what to feel. Flattered and insulted. :P
 
Anonymous
@AlexA. Yep, just like you guys did with Seriously :P
 
Hello
 
@AlexA. Part of retiring "Calvin's Hobbies" is also to respect Bill Watterson's dislike of any form of merchandising past the strips themselves. Seems silly for an SE account I know, but not for an associated Youtube account that runs monetized ads.
 
@AlexA. not criticizing, just not sure if it's worth the effort
 
7:30 AM
@zyabin101 no
 
@El'endiaStarman That seems like the appropriate response :D
 
@somebody Since when was anything we PPCG'ers did ever worth the effort? :P
 
btw guys
 
@El'endiaStarman Kidding of course. I'm really excited to see where you go with it with some examples, use cases, etc. I think it has a lot of potential.
 
meta post was edited
graduation date is november 1st
 
7:31 AM
I knew it!
 
@Mego an other question on your holier number: why does 4which have an holier value of 0 is in the sequence and is after 44 which have an holier value of 1...
 
@AlexA. :D
 
@HelkaHomba You have ads on your videos? Lel I have an adblocker. :I
2
 
@El'endiaStarman the userscript/Jelly/OEIS sequences aren't worth the effort?
 
guys
we must have the smallest community ad
 
7:32 AM
@somebody In all seriousness, implementing Minkolang taught me a good deal of how programming languages work, and I expect Pytek will teach me a LOT.
 
@somebody It's not fair to say that Jelly is worth the effort and Pytek isn't.
 
i know
just the linking
 
Anonymous
@Katenkyo 44 has an enhanced holarity of (1 + 0 - 1) + (1 + (1 + 0 - 1) - 1) = 0
 
not very worth it if user needs to enter inverse
 
@El'endiaStarman I'd go with PYthon Magic Proprietary Link Syntax (pympls)
 
7:34 AM
gonna almost certainly be harder than implementing a differ if inverses automatic
 
what is this holy stuff you guys are talkin 'bout
@Geobits THIEF
THIEF
 
Anonymous
Ack I labeled the list wrong
 
Anonymous
I messed up
 
RAAAAAAAH THIEVES EVERYWHERE
 
Oh, I remember now why I thought linking was a good idea. With the stuff I've done with D3.js (like Spacewar!), the graphics stuff always had to be updated "manually", but when I was just getting started with D3.js, I thought the updating was automatic and magical.
 
7:34 AM
@orlp Thief? Ooooh I see. Once you make an acronym, nobody else can do different ones. Got it :P
 
@Geobits Too many H's :/
 
@El'endiaStarman but what you really have is just a lambda function
 
I have one for another recent name change though: soil artist
 
@AlexA. To what?
 
@orlp Yeah, but no bookkeeping!
 
7:35 AM
@Sp3000 Nice :D
 
@HelkaHomba Anything that isn't exactly the same as your current one
 
Anonymous
Ahh crap Holier Numbers has a serious problem
 
what are holier numbers
help
i need an adult
 
@Mego Is that a pun or..?
 
( ͡° ͜ʖ ͡°)
 
Anonymous
7:36 AM
All holy numbers comprised of singly-holy digits have an enhanced holarity of 0
 
@El'endiaStarman but D3 isn't about math/inverse functions
 
Wait sorry, that's Seriously
 
@somebody I didn't say it was.
 
@Mego Oh, right, my bad... So, what's the rule for sorting all these 0-value number?
 
are you guys just trolling me right now
or what
 
7:37 AM
@El'endiaStarman but you're saying you want tow-way linking for b=a*3 right?
 
Anonymous
@Katenkyo The rule is I'm gonna fix the challenge real quick
 
@somebody I don't have to implement that.
Just might be useful.
And only upon explicit request of the user.
 
@orlp The inverse of 666 is one of them.
 
@Mego Ok, I'm waiting for the holier challenge to pop again :)
 
@Geobits -667?
 
7:38 AM
 
@AlexA. Well I meant 1/666, but that works, too.
 
Anonymous
@Quill implying there is non-shoddy PHP
 
I wonder what trinket we'll get in place of the rubber duck.
 
Damnit Helka's Hobbies, this HHLKMB hurts
 
7:39 AM
@El'endiaStarman but something like adding r before variable to pass by reference may be useful
 
@Geobits A swift kick in the StackEggs
 
@Sp3000 Huh?
 
lel Helka's Hombies
 
Too many hard-to-use consonants
 
Calvin Homba
 
7:40 AM
@AlexA. StackEggs would make a nicely backhanded gift.
 
how do I achieve world domination in the fewest amount of bytes possible?
 
@Geobits Anyway, it should not be anything related to golf.
 
Hopefully the stickers have in small print at the bottom.
 
@zyabin101 Branded golf tees :D
 
7:42 AM
@Geobits Nope.
 
@zyabin101 o....k....
 
@orlp TakeWorldHostage, 0 bytes
 
@Sp3000 noncompeting
 
@AlexA. Nope.
 
language invented after challenge
 
7:43 AM
 
@zyabin101 You know they're joking, right?
@AlexA. ...well, that came back to bite me in the butt.
 
@El'endiaStarman I know. :)
 
Okay, just checking. :)
 
@El'endiaStarman >:U
 
You cannot fight the meme, no matter how many fake screenshots you post :P
 
7:45 AM
It's a real screenshot...
 
I don't see how you can prove that to my satisfaction ;)
 
Anonymous
There, fixed it
 
@Dennis Is a quine still a true quine if you use reflection not to read the source, but to write in it? Because the only reason I used g in my fish answer is because I couldn't get the program to work with 2 quotation marks (And I needed 2 if I wanted 2 different true quine pieces of code)
 
2 hours ago, by El'endia Starman
 
Ah. So not fake, but not truthy either.
 
Anonymous
7:46 AM
4
Q: The Holier Numbers

MegoAs we learned from The Holy Numbers, there are 5 holy digits (0, 4, 6, 8, 9), and positive integers consisting solely of those digits are holy. Additionally, the holiness of a number is the sum of the holes in the number (+2 for every 0 or 8, and +1 otherwise). Now, there is an additional proper...

 
I'd call it "carefully selected."
 
@Mego you up for a challenge?
 
Anonymous
@orlp Define challenge
 
@Geobits Correct. The two 29k rep users Calvin and Helka can both independently confirm that, in fact, .
 
@Mego Your sequence still puts 4,6,9 after 44,46,49 :)
 
7:50 AM
@Mego your answer is almost certainly the right approach
@Mego but it can be done in O(n) instead of O(n log n)
 
Anonymous
@Katenkyo Yes, re-read the challenge definition. It's different in an important way.
 
> the great language Python
+1
 
Anonymous
Actually wait I'm just a doofus
 
@HelkaHomba It's official. You can't argue with 58k+ rep about these things.
 
(I expect @CᴏɴᴏʀO'Bʀɪᴇɴ will disapprove though. ^^^^ :P)
 
7:52 AM
Nope
(Sorry Alex <3)
 
@Mego I saw that, but you don't really sort by numeric value in case of tie
 
@Mego you know why?
 
Anonymous
It should be... Why is Python not stable sorting?
 
Anonymous
@orlp Sure
 
@Geobits probably a golf ball
 
7:53 AM
getting the largest k values out of an array can be done in O(n)
sort(l)[:k] is O(n log n)
 
@Quill I hope not :(
 
@Mego the problem is here:`if n < 10:
return 2 if n in [0, 8] else 1`
 
@Quill Surely not :)
 
it should be return 1 if n in [0,8] else 0
 
Anonymous
Thanks, I thought I was losing my mind for a moment
 
7:55 AM
@Mego No problem, it bugged me too ^^
 
Anonymous
@orlp I think I see. I'll try to implement it real quick
 
I don't know why people are freaking out about graduation. I mean, I only waited about half a year for it to happen, what's the big deal? :p
 
ಠ_ಠ
 
Anonymous
@orlp I'm not convinced it'll be linear overall. Because the number of adjustments needed (k) is linearly correlated with n, and getting the k largest elements from a length n array is O(n log(k)), it won't be truly linear.
 
There are many users that are still awaiting actual graduation. Like from school.
 
Anonymous
8:01 AM
It'll certainly be more optimal than my current approach, but not linear
 
@Mego nope
getting the k largest elements from a length n array is O(n)
regardless of k
 
In order?
 
nope
that's the crux
 
Oh, ok then
 
you get the k largest elements in unspecified order
 
8:03 AM
Are we assuming that popping elements is O(1)?
 
@El'endiaStarman this is assuming a random access array
and it's not popping them
it works by partitioning the array in-place
In computer science, the median of medians algorithm is a selection algorithm based on the quickselect algorithm, and is optimal, having worst-case linear time complexity for selecting the kth largest element. The algorithm finds an approximate median in linear time – this is the key step – which is then used as a pivot in quickselect. In other words, it uses an (asymptotically) optimal approximate median-selection algorithm to build an (asymptotically) optimal general selection algorithm. The approximate median-selection algorithm can also be used as a pivot strategy in quicksort, yielding an...
 
Wonder of wonders, median of medians!
 
huh, cool
 
Anonymous
@orlp That's for getting the kth largest element, not the kth largest elements
 
@Mego but it partitions
 
Anonymous
8:07 AM
That O(n) algo would need to be used k times, resulting in O(nk)
 
such that all elements smaller than the kth element are to the left of it
 
Anonymous
...oh
 
@Mego your algorithm doesn't work though
try [1, 1, 1, 1, 1, 1, 1, 1, 1, 100000000] as input
 
Anonymous
Ah, that would be that counterexample I had been looking for
 
the problem is a lot harder than it might seem at first :)
I'm kinda sad it hasn't attracted more attention
 
Anonymous
8:17 AM
I fixed it so that it properly handles cases where values should be decremented
 
@Mego broken again
same counterexample
[0, 0, 0, 0, 0, 0, 0, 0, 1, 32766] is not valid output
 
Anonymous
Oh crap
 
I'm debugging a program and keep getting spammed with messages about non-existent segfaults.
 
@feersum instead
try this challenge:
7
Q: Model a probability table using 15-bit fixed probabilities

orlpA histogram is an array of integers that counts the number of times a symbol occurs. For example, for the string "aaabbbabbdebabbbebebdbaaabbabaaaaeebeaabaaba" a histogram is a: 18, b: 18, c: 0, d: 2, e: 6, or [18, 18, 0, 2, 6] in short. If we were to pick a random character out of this string, ...

 
I still couldn't figure out why that challenge is not easy.. maybe it could be "fun" to write a quick wrong answer and find out which part I failed to read.
 
8:25 AM
@feersum go ahead
it's actually surprisingly difficult
(I still don't have an algorithm in mind that's fast and optimal)
 
Anonymous
@orlp Fixed it for n log n
 
hum, looks like my submission for holier numbers will be looooong
 
Mego's approach is the obvious one which seems like it would be fast and optimal as long as there are no bugs
 
0
A: Sandbox for Proposed Challenges

FedericoYou're Reputation is not in base 10! This was prompted yesterday by having reached a rep on aviation.SE of exactly 11.111, that I immediately got me to say "hey, that's 31 in binary!" So here's a code-golf challenge: accept a series of integer numbers: the list of reputations you have across ...

 
@feersum but it's not optimal
@Mego [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 100000000, 100000000]
you output [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16374, 16383]
 
Anonymous
8:43 AM
Yeah it's far from optimal (for overshoots)
 

« first day (1852 days earlier)      last day (2983 days later) »