« first day (1685 days earlier)      last day (3184 days later) » 

6:04 PM
Back to the daily grind today :P
Q: Maze Stuck cannot workout error

Atif Farooqthe following code doesnt seem to be working any corrections would be much appreciated really you would be really doing me a solid. //______________________________________________________________________________________________________ #include<iostream> #include<iomanip> #include<fstream> #inc...

6:21 PM
@ChrisJester-Young would you be interested in the GC code or not?
@orlp Depends on what licence you are releasing it under. :-)
@ChrisJester-Young zlib
I need a license where 1) code can be reused for any purpose at all, and 2) can be revoked at any time on a whim (obviously followed by litigation).
@orlp Doesn't look too restrictive.
@Geobits That sounds crazy.
@Geobits Tie a string to it so you can yank it away from the user
6:24 PM
@ChrisJester-Young it's my favourite OSS license when it comes to libraries
@ChrisJester-Young most people use MIT, but don't realize it comes with pretty hard requirements in how you should reproduce the license
@orlp Yeah, I didn't know that either.
I'm not aware of any precedent, but you could sue over that
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software."
doesn't say source code only
so if you ship, you better also ship the MIT license of anything you included
BSD is even more insane:
Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the <organization>.
@ChrisJester-Young If I'm releasing source code under a liberal license, all I want is some goodwill attribution, not some forced watermark, so I use zlib
@orlp Yep, it's nice when it's not burdensome.
It's like, I release most of my SO code snippets under CC0 for that reason.
for some reason gist has swapped the order of the .h and the .cpp, so scroll down
you can ignore the psil namespace, that's just the (probably temporary) name for the lisp language
the GC is actually totally agnostic to lisp
@ChrisJester-Young then all you have to do is define a GC type:
    struct Cons {
        GCVisitRef car, cdr;
        void visit() const { car.visit(); cdr.visit(); }
and register it with a name: register_class_as_type<Cons>("cons");
Q: Design a solution to seat Employees in cubicles

user18071A solution for the above problem in which certain number of teams have to be seated in a 2D array like cubicle system. Lets say the software/program is running continuously and the number of teams and number of its members can change dynamically. Conditions that should be satisfied -> Minimum r...

6:41 PM
@ChrisJester-Young GCRef is a root reference that keeps an object alive when a gc is triggered, a GCWeakRef updates when the object is moved due to a compacting, but does not necessarily keep an object alive, and GCVisitRef is used to register references from GC objects to other GC objects, and must be called with .visit in a visit method of the GC object
@ChrisJester-Young and you might be a bit surprised by the lack of inheritance, that's simply because C++ has no memory layout guarantees for inheritance (except for some really simple POD objects), which makes writing a compacting GC a lot harder
I'll check it out sometime next week, this week is super busy. :-(
But the whole visitation thing makes sense.
@ChrisJester-Young It took me a lot of time to think of a way to track root references in O(1) rather than O(log(n))
@orlp Yeah, I can imagine that's challenging.
the solution turned out to be really simple
in every GCRef object (so not the GC objects themselves, think of GCRef as some std::smart_ptr) I store one integer in addition to the pointer
registering a GCRef to the gc simply gets the number of references stored so far, and stores it inside the integer (lets call it id)
then it push_backs the address of the GCRef (so it's effectively stored at index id)
then, when a GCRef unregisters (for example goes out of scope) it simply swaps the reference at id with the one at the end, and pop_backs
6:57 PM
you get the dual of a graph by swapping the roles of faces and vertices. is there a similar concept/term for swapping the roles of edges and vertices?
What is a face of a graph?
yes, that's a dual (@feersum)
@MartinBüttner what you're asking is impossible
@orlp well, I simplified the description a bit
of course each vertex would be turned into multiple edges (which would introduce another face as well)
7:02 PM
@MartinBüttner an edge per definition is connected to two vertices
@MartinBüttner but after your transformation your 'edge' might suddenly be 'connected' to three vertices
but essentially, what I want is a vertex for each edge in the original graph. and two vertices are connected if the corresponding edges share a vertex.
@MartinBüttner consider the bottomleft most point of the graph I posted above
are you reading my messages? :P
ok, I see what you want now
I know what you are talking about, but I don't know the name of it.
7:05 PM
That would be the line graph, I think.
I can't do images.
orlp to the rescue!
That's definitely the right thing.
What's the syntax? SO editing help says it's ![alt text](link)
I just post the bare URL of the image. Markdown in chat is different than posts.
7:08 PM
it's not markdown
it's called oneboxing
And it only does it if there's no other "body" to the message.
awwww, now my Paint efforts are completely wasted
here is the beautiful image anyway:
Paint efforts are never wasted.
Nice, it even does svg.
7:09 PM
@Mauris yes thanks, line graph is the term I was looking for
But thats a intersting idea: why not generalizing graphs such that a edge connects at least n points at once?
What is a good Microsoft Paint But For Linux?
Why not GIMP?
Q: Simple image editor?

mandyI want something similar to "preview" in macs. For example: I want an image editor that ONLY does simple adjustments like increase/decrease contrast, saturation, exposure, color tinting.... rotate, flip vertically, flip horizontally, make black and white, change size or format, crop. THATS IT. ...

Preferably nothing heavy like GIMP or Photoshop. They take ages to start for me. Not useful when I just want a very quick crude sketch
7:11 PM
In mathematics, a hypergraph is a generalization of a graph in which an edge can connect any number of vertices. Formally, a hypergraph is a pair where is a set of elements called nodes or vertices, and is a set of non-empty subsets of called hyperedges or edges. Therefore, is a subset of , where is the power set of . While graph edges are pairs of nodes, hyperedges are arbitrary sets of nodes, and can therefore contain an arbitrary number of nodes. However, it is often desirable to study hypergraphs where all hyperedges have the same cardinality; a k-uniform hypergraph is a hypergraph such...
Paint.NET is actually a nice mid-way point between those for me, but it's Windows-only
Also it supports some niceties in a frustratingly limiting way. Oh well.
Gnome Paint is there too (in addition to the suggestions on that question), but it's really bare.
I should accept that I am never gonna invent something new...
And why don't Paint-like programs circa 2015 come with an "upload to puu.sh/imgur/whatever" button?
@Mauris Do you know Inkscape?
7:13 PM
Oh, I've used that, yeah
Not pixel, but vector graphics editing program=)
@flawr Even your messages aren't new: "There is nothing new under the sun" :P
There is nothing new above the sun?
It was really neat! But a little confusing. Of course, I only used it once, to make some rad graphics for Wikipedia.
It takes some time getting into
7:15 PM
GIMP is plug-in-able, isn't it? Maybe I should roll my own "upload to web and copy link" functionality
Yes i think so
@Mauris there's KolourPaint
It might not support internet access, I guess...
it even has it's own scripting language i think
I always use GIMP though, it's the best (and Inkscape for vector stuff or combining things)
7:16 PM
I like how all of these programs seem to base themselves off of Windows 98-era mspaint.exe.
As if it's like the golden standard
I can understand the power GIMP offers
but some parts of the workflow are just slow for me
1. the booting
I really like the features of non destructive editing in photoshop, is there something similar in gimp now?
Haven't used gimp in a while.
2. brushes / brush size
3. fast cropping
I use Powerpoint for drawing shitty diagrams
7:18 PM
I often literally copy my selection and paste as new image to crop
@orlp 1. it loads in about 3 sec, 2. they're great, 3. easy!
Paint is too awful, no going back if I draw 2 intersecting things and want to get rid of 1
@aditsu I can crop, upload and share a picture in 3 sec on mspaint
most notably screenshots
@orlp I seriously doubt that, but whatever..
I'm too used to uploading stuff in one second because of puush.me
7:19 PM
On my home computer, gimp is pretty much always running anyway, so boot isn't a concern there. Brush size is a bit of a pain, but I've never had issues with fast cropping.
I really miss it on this Ubuntu installation.
@Mauris write your own script using imgur API
there's one part of the imgur API that I really really miss
you can only get your image URL after the upload
does anyone know of a Unicode symbol that looks a bit like an upside down capital Y? (except the actual upside down capital Y or a lambda)
7:20 PM
back when I had a quick upload script for my own webserver I would 'pre-allocate' the image url, so you could instantly share it, even if the upload wasn't done
I'm so baffled that there isn't just a web-based editor that you can go to, draw a quick diagram, and share
@MartinBüttner ⵃ
@MartinBüttner 人?
@MartinBüttner 0x1d21b
Tifinagh letter yahh
7:22 PM
@orlp adbmal?
@MartinBüttner what's wrong with ⅄ ?
or Ⲗ, Coptic capital letter laula
(Mine is the Chinese character for "person"!)
guys I have a hairy butt
@Mauris there probably is one, or many
7:23 PM
I propose ∞ = countably infinite, Ⰾ = well fuck
That's one massive hair @orlp
it's a square :p
Is there a infinity between the size of natural numbers and the size of the real numbers?
@Mauris SumoPaint isn't bad. It doesn't upload to imgur/whatever, but it has its own "cloud storage" to give you a link.
@flawr check out the continuum hypothesis..
7:26 PM
@flawr yes
or no
@aditsu thanks, interesting!
you can choose :P
I think I choose no, because I fear that it would be a very pathologic construction nobody really wants to know.
@feersum @Mauris @orlp @aditsu thanks for the suggestions. the only one that's supported by my font of those is the Chinese one, but it's not monospaced :/
@MartinBüttner may I ask what this is for
7:32 PM
pointy-topped hexagons in ASCII
(or not ASCII)
@MartinBüttner then why not inverted Y?
too shallow of an angle?
@Geobits This looks really cool
I've only used it a few times, so standard disclaimers apply ;)
7:37 PM
@orlp not supported by the font
I might change to flat-topped and just use > and <
P square square bullet bullet bullet M square N o_O
@flawr scroll up :P
@flawr thanks :)
@orlp It is a image for aditsu=)
7:39 PM
what kind of ghetto fonts are you guys using? :p
Idk, usual firefox?
I'm surprised by how much unicode Google Chrome on Ubuntu uses
not sure if it has bad keming though
never heard of a firefox font
I mean the font that firefox uses for rendering this page...
7:41 PM
well that doesn't answer my question then :p
Ah let me check via firebug
firebug says it is Verdana
it's probably substituted anyway
I have verdana
Firefox seems to be much better at substituting rare Unicode glyphs than Chrome, for some reason
Firefox <3
Maybe it comes with fallbacks to Symbola or something?
7:45 PM
        0     0
   >-0-<       >-0-<
  0     0     0     0
 <       >-0-<       >
  0     0     0     0
   >-0-<       >-0-<
  0     0     0     0
 <       >-0-<       >
  0     0     0     0
   >-0-<       >-0-<
        0     0
I have symbola too
actually this is stupid as well, because those zeroes might become larger or negative numbers...
Yay what it is for?
Mathias Wandel's cake knive could do that!
@flawr I'm working on a new esolang...
Oh, the howmanyeth?
Ok this was a bad translation^^
7:49 PM
my 3rd or 4th depending on whether you're counting Marbelous
It looks very interesting but I have no idea what you're going to do with that^^
I'll let you know when it's working :P
@everyone: I need help phrasing a question: "Did you ever have an idea of which you were sure of that you were the first one to ever have it?"?
This sounds like an elephant trying to walk on stilts.
Is it even gramatically correct?
Did you ever have an idea you were sure nobody had ever had before?
I would say "have you ever had" rather than "did you ever have."
Also don't end a sentence with a preposition ("before").
Have you ever had an idea that you were sure nobody else has had?
^ that's what I'd say
7:58 PM
Ending with 'before' is much nicer.
@AlexA. That is a silly "rule" that doesn't have much basis in reality.
@feersum It's grammatically incorrect
@AlexA. wrong
That's how I learned it in school. Ending a sentence with a preposition is incorrect grammar.
@AlexA. Isn't it the same in "what are you thinking about?"
7:59 PM
Some schools teach apocryphal grammar rules.
> At one time, schoolchildren were taught that a sentence should never end with a preposition. However, this is a philosophy actually associated with Latin grammar. While many aspects of Latin have made their way into the English language, this particular grammar rule is not suited for modern English usage.
@Geobits Opinion
Where did you read that?
No where, but the citation markup makes it seem more legit. =P
@AlexA. that's not a school worth going to
8:01 PM
I read that one here, but you can find many sources linked on the relevant EL&U question.
@aditsu It was an advanced English class :/
I believe you learned it in school; I did too. That doesn't make it true.
I also learned that all caps and no punctuation is bad form when arguing about grammar.
8:04 PM
Anyway, gotta go. There's somewhere I need to get to.
@Geobits Thanks for the links!
Thanks the links for?
@Geobits you're a nice guy to chat with :)
what are you shouting for?
8:07 PM
don't make me repeat the tag I came up with
It reminds me of someone's reasoning for not putting their SQL code in all caps: "I don't like my code to yell at me."
now that's something I can stand by :)
If you've got a database of any size, it's important to yell at it so it will process the queries quickly enough and not lollygag.
@feersum and if it still does not work just add a 'sudo' in front of the commands.
8:10 PM
a SUDO!!!!11 is more effective
@flawr And if that doesn't work, get out the belt.
and if you like css ad an '!important'
I always read "!important" as "not important"
^ me too
8:12 PM
¡Muy Importante!
El queso es muy importante.
Q: Work it harder, make it better

TreFoxIn this challenge your goal will be to output the lyrics to Daft Punk's Harder, Better, Faster, Stronger. Specifically, output this text: Work It Make It Do It Makes Us Harder Better Faster Stronger More Than Hour Our Never Ever After Work is Over [x2] Work It Harder Make It Better Do It Fast...

@orlp This is beautifully written code
A: Sandbox for Proposed Challenges

mbomb007A Quine on Every Line codegolf quine Your goal is to create a program that prints itself indefinitely, with a new line after each one. Thus, if your program is a one-liner, it would be repeated on every line of the output. Rules It must be a complete program, not a snippet or function. The p...

8:33 PM
Yay, 99 people have wished me a happy birthday :D
Happy Birthday! — Dennis ♦ 2 days ago
Did you count?
Your birthday is over, Beta. Time to move on.
No. Never
Everyday is my birthday
So you've had 5843.88 birthdays?
8:36 PM
Were you born on each one of those days?
I don't know how it works, but it's a system that allows me to milk for as long as possible
I had a very unique idea that was not so unique
1 hour ago, by flawr
I should accept that I am never gonna invent something new...
Now it is your turn: docs.google.com/forms/d/…
Did you make that?
I said no
8:40 PM
Yes I did.
How many responses have you gotten so far?
So just me
And me
A: Sandbox for Proposed Challenges

ThaddeusBBlastoff code-golf function string Your goal is the create the following text output: 10 9 8 7 6 5 4 3 2 1 Blastoff! The "10 " will be generated by the following C program: #include <stdio.h> int main(){printf("10 ");} The "9 " will then be generated by a function in a different language ...

8:41 PM
Who else?
and I now posted it on /r/SampleSize
@flawr What's that?
A subreddit for surveys I guess
8:43 PM
@flawr I have had ideas that I'm pretty sure no one has realised/implemented yet, but I'm pretty sure others have had the same idea before.
I'm a sheep. I have no ideas.
@PeterTaylor If it doesn't exactly agree with my views then I choose to ignore it. :P
↑ That's the ethos that we should all follow :D
@Calvin'sHobbies Dennis has officially won the Programming Language Quiz
No surprises there!
@Dennis rocked the shit out of PLQ.
@AlexA. Sp was leading the robbers' challenge for the longest time.
Sorry for Off Topic to current conversation, but I just have to ask: people are marking my new challenge as a duplicate, but I'm not sure why. http://codegolf.stackexchange.com/questions/57549/work-it-harder-make-it-better

They are both printing song lyrics, but the songs are completely different text, length, and I thought would require a completely different solution.
@MartinBüttner I knew it'd be one of them. Either one winning wouldn't surprise me. :)
@aditsu I was actually listening to that when you posted it xD
8:52 PM
How do you put videos in chat? Just put the link?
@flawr my wife is crazy about them
My favorite is either:

@TreFox Kolmogorov complexity has been quite thoroughly mined. The burden is now really on the person posting a new question to explain why they won't just get answers using the exact same techniques as answers to previous questions.
Did you eve see them live?
8:53 PM
Is there a "sandbox for editing snippets"?
Q: Stack Snippets Sandbox: Try It Out Here!

HaneyThis post is dedicated to testing out the newly announced Stack Snippets feature. Feel free to answer with your own Stack Snippets!

@aditsu we should open a chatroom for posting videos/music here
Moozak Room
8:57 PM
the 19th semiquaver?
@MartinBüttner Thanks!
@aditsu Both of those are awesome covers, but the songs themselves are so overplayed it makes it less enjoyable for me.
We are still allowed post answers to closed questions right?
The software won't let you.
9:11 PM
Closed means no more answers
Locked means no more anything
@PeterTaylor I think there was something like that it's a client side check and only gets checked on the server after 5 minutes or so, so if you still have a tab open haven't refreshed then you might still be able to post your answer.
@TreFox some of these lyric challenges (including yours) have inconsistent spelling, which is quite annoying
I wouldn't have closed it though
New answers can chew Bubblegum, which was not available in previous times.
9:20 PM
@Dennis that's a funny definition of "fail"
also, where's the part where it chews bubblegum?
or does that refer to the programmer?
It's actually that smoking cessation gum.
Q: What's the time, chap?

DopappI honestly cannot believe that this is not a question yet on Code Golf, but.... Print the local time to the console. Shortest code wins. Code away!

Q: Oh dear, spaces! or How to Properly Format CSS™

toothbrushThe goal is to write the shortest function to Properly Format CSS™; you must Properly Convert Spaces To Tabs™ and format the CSS nicely. Bad CSS™ html> * { padding: 10px; margin: 1em; -webkit-border-radius: 10px 2px 100%; border-radius:10px 2px 100%; border: 2px solid yellow...

10:16 PM
@MarcDefiant I think @flawr was looking for you earlier.
I'm here because of that :D
Oh, okay. Hello!
@flawr I don't want to disclose my location on public record. I think the most likely scenario we could have met is at the KuZeB. If you don't know what that is we might have met somewhere else I can't think of.
I hope he sees it tomorrow or something.
He's in here pretty regularly so I'm sure he'll see sometime soon.
He's a neat dude. If you don't know him then you should. :)
(Disclaimer: I don't know him IRL.)
Yeah, but it's past midnight in my timezone. Maybe I'll find the possibility to come back tomorrow.
or today, whatever ^^
10:22 PM
@AlexA. I translate IRL to Indy Racing League for some reason :P
(I know it stands for In Real Life)
Haha Indy Racing League is close enough
Haha excellent quote
Nice. I got a stack snippet for the word search working
Nice work!
10:37 PM
How do I minify it?
Oh, this kind of thing exists on the web, nice.
I was just about to point you to the same link
Others exist for CSS and HTML as well, should you also need to compress those
@Mauris Nice! What exactly does it do?
Calculate everyone's score and sort them in a leaderboard
Maybe if I'm sufficiently bored, I should make a "grid history" thingy.
A leaderboard would be great! I was trying to get one to work earlier, but didn't have enough time.
Q: Let's make a word-search!

YpnypnIn this challenge, we will together create a word-search containing many programs in different languages. I have started us off with a grid of 60-by-25 blanks (·), some of which are replaced by the characters of a Ruby program. To answer, choose a language that was not yet used. Using your chos...

10:43 PM
On second thought, could we sort the authors by name instead of score, since it's not really a score-oriented thing?
Ah, maybe score would be better anyway
Well, the OP states "highest score wins", but I think of it as sort of fun and ceremonial.
Same here.
I tried to find a word search maker earlier where you can specify where the words go.
I ended up finding 20+ that place the words for you.
I dislike this a bit about PPCG, I guess
The all-competition-all-the-time aspect?
Yes, sometimes the scoring systems feel incredibly forced
10:46 PM
We can't just work together on cool community project thingies like Programming Languages Through The Years without there having to be an arbitrary mega-skewed scoring system in place...
How about a tag for non-competitive challenges?
BTW, I'm voting to reopen the Work it Harder, Make it Better challenge, as I don't see any reason to close it in the first place. It's way different from the "duplicate".
@ETHproductions How would a non-competitive challenge fit into the PPCG model?
Well, it wouldn't
10:51 PM
Which is a shame, because we don't have a place for "things that are off-topic but obviously of interest to the kind of people who frequent PPCG".
@AlexA. Good point...
@Mauris This place is right here, I guess.
IDEA: Make a room for PPCG Chat Challenges.
@AlexA. FWIW, before is an adverb there
@Alex That could get confusing, once we have three or four challenges
10:55 PM
And has been since Middle English (and before. (Sorry, I had to.))
Is there a limit to # of rooms?
@ETHproductions Yes, but it means that we'd have a place to do exactly what you guys were talking about: things of interest which are off topic for the site
Could just make one room per challenge, describing each challenge in the room info blurb in the top-right corner here
@Mauris If you're thinking one room per site, that seems like a bad idea IMO, but maybe it isn't.
Oh you just said that
Perhaps that would get people who aren't from PPCG who are active in chat interested in PPCG as well.
Might be an opportunity to grow the community
Q: Trigger happy on the duplicate button: do we really consider all song lyric questions "duplicates of the rickroll?"

steveverrillSo, we have this question Work it harder, make it better Put on hold as a duplicate of this question We're no strangers to code golf, you know the rules, and so do I Now there have been many song lyrics on here which I would agree do not add anything to the rickroll, but this latest question ...


« first day (1685 days earlier)      last day (3184 days later) »