« first day (1557 days earlier)      last day (3406 days later) » 

6:00 PM
@R.MartinhoFernandes Sure, now I only have EmptyTree and BinaryTree left.
Consumes more memory than the previous version though, and executes more instructions.
 
You don't need EmptyTree either.
 
@рытфолд :c
 
@FredOverflow Does it?
 
user1804599
@Jefffrey Instead you can associate .pl file extension with the Perl interpreter.
 
@R.MartinhoFernandes Sure, because a node with only a left child only used 2 references before and now uses 3 references.
 
6:01 PM
@FredOverflow 2 references and a tag.
 
user1804599
But I don't know the specifics.
 
Now the spare reference is the tag.
 
What tag? Are we talking Haskell or Java?
 
user1804599
I'd just go with case class BST[+T](left: Option[BST[T]], right: Option[BST[T]], value: T).
 
6:03 PM
How would you implement size if you only had 1 node type? Here is how it's implemented in BinaryTree:
public int size()
{
    return 1 + _left.size() + _right.size();
}
In EmptyTree, I just return 0;
 
@FredOverflow And you cannot discount the instructions need to perform a virtual call either.
 
user1804599
case class BST[+T](left: Option[BST[T]], right: Option[BST[T]], value: T) {
    def size = 1 + left.map(_.size).getOrElse(0) + right.map(_.size).getOrElse(0)
}
 
@FredOverflow After looking at the tag, yes.
 
So you want a tag field and an if? naaa
 
It's not much different from if(_empty) return 0; else return 1 + 1 + _left.size() + _right.size();
 
6:04 PM
It’s Java, you get it for free.
 
@FredOverflow No, I don't.
It comes with the Java.
 
user1804599
@FredOverflow vptr is tag field, if is table lookup
 
So we are talking Java after all?
 
user1804599
No, more general.
 
6:04 PM
You guys are driving me mad.
 
user1804599
But JVM has one specific implementation of it (or multiple, depending on optimisations).
 
@FredOverflow I'm saying that your solution only saves memory and instructions if you ignore the things you get for "free" with Java.
 
Computer science / information theory, as realised in the language of your choice. Which happens to be Java. Were the tag not here for free, we would have added it.
No free lunch.
 
If you account for the "free" stuff that Java gives you, it's not much different.
 
My Java solution saves Java memory. Are you Java happy now?
 
6:05 PM
@рытфолд My friend says that if he adds #!C:/usr/bin/perl then it works.
 
Java no.
 
Hi
 
user1804599
@Jefffrey OK.
 
So it has respect for shebang apparently.
 
@Jefffrey But how does it work on linux now?
 
6:06 PM
@R.MartinhoFernandes It doesn't.
 
user1804599
Hmm, in my current syntax you can say %%1.size as an alternative for fn(x) => x.size lol.
 
So we kinda have to choose.
 
If only windows had env.
 
If an open-source project provides doxygen webview,
do you find it convenient?
 
Associate the extension or add Perl to PATH and run perl thing.pl
Don't make Windows-only shebangs
 
6:08 PM
Or do you prefer to look at the real code.
 
It's dumb
 
@CatPlusPlus It's apache
 
Don't use CGI
 
@StackedCrooked I find it mostly redundant.
 
@CatPlusPlus Tell that to my professor.
 
6:09 PM
Besides you can associate extensions in Apache
Shebangs not required at all
 
@рытфолд Geebus. %%1 looks so much like batch files.
 
@R.MartinhoFernandes vOv I work with sandboxed interpreters enough to make shebangs pretty much useless
 
@StackedCrooked Depends on the quality of the doxygen documentation. If it's just plain generated without any resonable doxygen comments, I'd prefer just looking at the code.
 
@CatPlusPlus Oh sorry. Misclick.
lol
 
@πάνταῥεῖ you know what would be great?
a combination of Digital Mars' D compiler which is able to output HTML documentation
and an IDE that is able to read it
and provide contextual info
mouse over my function, I want to see the relevant stuff from the docs (summary + examples - the compiler turns unit tests for a function into example doc)
 
6:11 PM
IDE shouldn't need an externally generated documentation
 
user1804599
@AlexM. don't mechanically read HTML. :(
 
Also examples really don't work as a hover popup
 
user1804599
HTML wasn't meant to be read by computers.
 
@CatPlusPlus see how Eclipse opens up a scrollable panel
 
And it's terrible
 
6:12 PM
I like it
 
Like most things Eclipse does
 
@AlexM. Isn't "what Eclipse does" like the Godwin argument of IDEs?
 
Plus lol requiring mouse
 
@R.MartinhoFernandes I don't know
 
@AlexM. Eclipse CDT supports context help tooltips, extracted from the doxygen comments.
 
6:13 PM
@R.MartinhoFernandes it's the nazi-friendliest IDE?
 
6:30 PM
I like i3 so far
using keys to move from place to place
crazy
now if I could get it to go fullscreen when I double click vmware's icon
xrandr doesn't let me choose weird resolutions
so the biggest I get is 1440x900
 
Do you mean this as the c++11 replacement/equivalent, for the other boost related question? — πάντα ῥεῖ 20 secs ago
Not sure how to handle this?
It looks like a helpful attempt, but seems to need serious improvement (compared to the linked Q&A)
 
@CatPlusPlus 3D factorio?
 
it's from the spacechem guys
it's probably just as smart and hard as spacechem
so I'll pass
nse;dp
 
Has anyone here ever gotten reverse-next and friends to work in GDB?
 
6:45 PM
Reverse debugging is extremely fragile
 
it's either that or resetting your entire debugging session cause you went too far by accident :s
 
Xeo
Hm. My local Thalia store has all 5 GoT books (English, paperback) in a package for 30 bucks
 
P sure it still only works on Linux targets
 
user1804599
Arrgh fucking javascript with its non-object types.
 
Xeo
This is tempting
 
6:48 PM
And according to wiki only in a record/replay session
 
new mouse is so very nice... but really isn't happy about crappy wood table
@Xeo but that's only the books so far right?
you'd be better waiting for him to be 'done'
just get the one set
 
Xeo
I wanna read something, though
 
user1804599
Neat.
 
@Xeo just buy a cheapo version
or use a library (just don't tell @R.MartinhoFernandes)
 
6:51 PM
@thecoshman That's like waiting for Dwarf Fortress to be done
 
@CatPlusPlus version 1.1 is nearly out!
later, I swap to SSD :D
 
user1804599
I talked to Larry Wall.
 
user1804599
@gnzlbg lol
 
@рытфолд fo realz?
 
user1804599
@thecoshman I don't see why not.
 
6:56 PM
because you are a pleb
 
user1804599
I'm not a pleb.
 
user1804599
I'm a Dutchman.
 
user1804599
I am superior to non-Dutchmen.
 
Still learning English I see
 
user1804599
I'm better at English than you are.
 
6:59 PM
 
And Einstein is better at physics than me, what's you point?
 
@thecoshman Well, Einstein is dead.
 
Christ, I even suck at being dead!
 
Just wait, you will get better at it
 
Sluuuurp
 
7:01 PM
 
Octo just have backup copies
 
user1804599
@thecoshman You don't complain to Einstein he's still learning physics.
 
FUCK! I'm already so over my budget!
2
@рытфолд aren't we all
 
user1804599
Hmm.
 
user1804599
I could loosen def f(x: T) to allow any T for which in is defined, not just types.
 
user1804599
7:11 PM
for ^5 {
  FIRST { say "[*] The first time the loop is run, before ENTER" }
  NEXT { say "At loop continuation time, before LEAVE" }
  LAST { say "At loop termination time, after LEAVE" }
}
 
user1804599
Oh woo shiny.
 
Thats in your language you are commiting?
 
user1804599
No.
 
Xeo
7:26 PM
@thecoshman I need this.
Holy crap, that kickstarter only started today and is already at 2000%
haha
> 200 backers All gone!
THE COLLECTOR'S DECK
THERE WAS NO CHANCE GETTING THAT
 
WHOAH - Most disturbing question title award: stackoverflow.com/posts/1884941/revisions
@рытфолд that's annoyingly awk-ward
 
user1804599
It's Perl 6.
 
@sehe It should be rolled back.
 
Xeo
@sehe That must've been fun on the hot question list.
Nowadays I'd say that's either on Arqade or Puzzling, if I saw it
 
@Mysticial nah :)
 
Xeo
7:34 PM
Oh look, a Card Game Humble Bundle
 
user1804599
Ok so.
 
user1804599
Time to implement comparison operators with Python-like (AKA sane) behaviour.
 
user1804599
Such that x < y < z becomes { let (tmp1, tmp2) = (x, y); tmp1 < tmp2 & tmp2 < z; }.
 
7:47 PM
@BartekBanachewicz The first part already exists. It's called ghc with -Wall.
 
lol, people really want the naughty cards :P
 
Xeo
@thecoshman "naughty"?
Just NSFW
also, KS exklusive
 
same thing :P
is it?
oh man
I really can't afford to buy more stuff
 
Xeo
Hey, it's your February budget, you'll be fiiiiine
 
@FredOverflow Well, sure I'm bothered sometimes about downvotes (who's not?). But I wasn't exposing that question here to just get sympathy upvotes or such (I'd guess that would be a pretty stupid idea anyway). I was asking for hint's for improvement in 1st place, and tried to do so now.
 
7:53 PM
@Xeo ... more like April...
and I have other commitments
 
Xeo
Sometimes, you gotta make sacrifices
 
stop it :'(
... hash-tag lounge treats the pirate?
 
Oh, by the way: swag has arrived! ~10 SO stickers, an SO shirt and an SO coffee mug
 
@Xeo Food is overrated anyway... :-)
 
@sehe that's SO cool!
 
8:02 PM
I think it's SO-SO
 
lol
 
It's a nice gesture though.
 
Xeo
I might have to push for 100k to get that shirt
 
I might say this a few times, but man this new mouse feels nice
 
Xeo
and I'm only 26k away!
 
8:04 PM
it's nice to be able to scroll again as well :P
 
Oh my...
2
Q: uintmax_t not handling 128 bits

MoiI wanted to define gigabyte in my code so I used, firstly, unsigned long. However, unsigned long could not handle 2 * gigabyte. So, I replaced it with long long but I got the same compilation error/warning: error: integer overflow in expression [-Werror=overflow] Finally, I looked up for bi...

 
@sehe But soon we're going to also get lox platters.
 
What the hell does that have to do with 128 bit
@thecoshman >:( I got a cheap Trust mouse since a year or so
 
> Everybody wants to know what we’re going to do with all that money. First of all, of course we’re going to gold-plate the Aeron chairs in the office. Then we’re going to upgrade the game room, and we’re already sending lox platters to our highest-rep users.
hehe
Google had to help with "lox platter"
 
@Columbo :S ~€60
 
8:07 PM
@Columbo If it's smaller than 128, clearly it's not the max!
 
plus ~€110 for the keyboard
twice... so I can have same pair at work :S
 
@sehe Are you turning into a troll? :D
 
user1804599
I had a great idea.
 
Or did you already, or am I just stupid, or all combined
 
@рытфолд no you didn't
 
8:08 PM
@Columbo No. Honestly, I think this is the kind of logic that goes on in muddled heads.
 
@sehe I don't even know what muddled means
 
muddied? whatever: from mud
 
user1804599
#scala is not a nice channel.
 
user1804599
#perl6 OTOH
 
That's because they don't know it's about Perl, because #perl6 starts with # and the rest of the line is ignored!
 
user1804599
8:10 PM
Damn...😳 the NFL been around longer than our government. We've had 48 Super Bowls and only 44 presidents. I didn't know that 😳😳
 
@рытфолд lol
 
@рытфолд Looks like they made milking retweets into a proper artform there
 
user1804599
@thecoshman let's design a programming language.
 
I think the important bit of calculation that she's missed is math
 
@рытфолд How many languages have you abandonned designed?
 
8:12 PM
@рытфолд o_0
 
@EtiennedeMartel 3 2 and counting?
 
user1804599
Hmm.
 
user1804599
The identity function is just %%1. :D
 
@sehe ...and you need bagels to go with it.
 
you see ivan is now my favorite meme
 
8:19 PM
@sehe Closer to 10
 
@JerryCoffin As long as it's the best kind of bagel.
 
user1804599
@AlexM. lol
 
@EtiennedeMartel Why would you ruin a perfectly good bagel by putting sand seeds on it?
 
@JerryCoffin You heathen.
 
8:22 PM
Because... what? You compared one thing to... void(). "so this implementation would not perform as well". I'm happy you had an insight, but if you want to usefully share this insight (and get appreciation for that, no doubt) it's a good idea to actually exposition it. (Otherwise it's like handing out your ungroomed back-of-napkin notes to a book editor and say "you can publish this") — sehe 12 secs ago
 
user1804599
ok yay
 
user1804599
Now def f(x: T) = …; desugars to def f(x)(require x in T) = …;.
 
@sehe I think @Yakk got it right, but the question alone is still poor :( ...
@sehe "Otherwise it's like handing out your ungroomed back-of-napkin notes ..." :-D LOL
 
That's the feeling I got. As if dealing out one's unreadable notes is like pure nuggets of gold to low lifers on SO
 
@EtiennedeMartel I'm left wondering whether a beer drinker calling a wine drinker a "heathen" has to be deliberate irony, or just a sign that said beer drinker lacks awareness of his own lack of refinement or taste. :-)
 
8:31 PM
@πάνταῥεῖ To be honest I suspect the OP/self-answer-author thinks that the key diff is that "enable_shared_from_this" requires a std::map<void*, shared_ptr<void*> > and the constructor/destructor somehow registers/unregisters the instance from that lookup table. And the idea being that it would be too expensive to do this for any T, so it's only opt-in for enable_shared_from_this derived classes.
Personally, I think it's far from the truth (Yakk got it right), but I'll be Socratic and let the OP answer how he thinks that the existing implementation(s) do it :)
 
@sehe I'm retaining to close/downvote self answered stuff, because I'd assume there's at least one (single) person that found this useful ;-).
 
me too
 
@xeo what you think? $2mill?
 
Xeo
Dunno, trending says 5
 
there's always a sharp burst to start with
 
user1804599
8:37 PM
@sehe but especially you.
 
I reckon 90% of his fans who would buy would buy within the day
 
Xeo
That project would've never taken off like that without theoatmeal
 
oh god no
that could literally sell his shit for a $1000 a turd
 
user1804599
lol, this ivdeo Im cwahting is highalrigious
 
omg finally got an invite to Keybase
 
8:45 PM
> I launched two software buisnesses after learning how to code in PHP
 
Dudes...
Have you seen the Talos Principle game?
I was wondering, how do you design the puzzles and how do you make sure they are solvable?
Do you like create an algebra and then verify the levels using the algebra or something?
Or do you do full state space search for the solutions?
 
@wilx The same way you make sure the game is playable
By testing it
 
@wilx Game design isn't just maths, you know.
You can't just apply an algorithm that tests it for you.
 
Sure you can, it's AI work
 
Fun fact: Ubisoft Montreal's user research lab has a database with 10,000 players in it.
 
8:53 PM
@CatPlusPlus which what?
 
It can get complex though
 
@EtiennedeMartel For what?
 
And take a lot of time
 
@wilx you design your puzzle as a series of steps
 
@wilx Play testing.
 
8:54 PM
from the root you get ramifications
 
@wilx For playtesting duh
 
They bring people in, make them sign an NDA, make them try some bit of a game in development, and then gather data.
 
if you want your puzzle to always be solvable, all branches must lead to the solution
if you want to let the player get himself in an unsolvable state, some of the branches may not
you usually want to do this at a very high level, so you do not branch all the possibilities
because the lower you get, depending on the game, there may be too many to list :)
 
Well, they worked around some possible deadlocks by providing the player with escape route from the end room of each later puzzle.
But I wonder how they ensure that there are none.
Hmm.
 
I never played the game, so I can't reason much about it :(
 
8:56 PM
I thought it might be formally verifiable for such logical puzzle game as this.
 
I don't enjoy complex puzzles all that much
 
@wilx You need to do a lot more than know that each puzzle is theoretically solvable. You need to design the puzzles to match the skill/capability level of the player you expect--challenging enough to be interesting, but not so difficult as to be frustrating.
 
@AlexM. Day9 has videos of it: youtube.com/watch?v=mcs2Ss6aK-w
 
well it's formally verifiable in a way like
ok, here's an example
a button on which the player must place a crate
 
@JerryCoffin OK. But what I am asking is only how do they verify it is solvable and does not lead to dead end.
 
8:58 PM
@wilx mno uz aspon mam napad na diplomku ;)
 
the only condition for this puzzle to work is (aside from the button existing) for the player to be able to pick up the crate from somewhere
 
@ScarletAmaranth Jaký?
 
@wilx formalna verifikacia "prejditelnosti" urovni hry znie fine :)
 
as long as you can be sure the crate's there and can be picked up, the puzzle is solvable
 
@AlexM. wrong
 
8:59 PM
@wilx Typically by working backward from a known solution. For a trivial example, if I have a "guess my number" game, I start by choosing a number, then add some other numbers from which you can guess. As long as I ensure my number is one you can guess, the puzzle is solvable.
 
@ScarletAmaranth inb4 bugs that make the crate fall through the ground
 
@AlexM. you forgot an important constraint; the button must be reachable from the place where the box is located
 
@JerryCoffin Hmm.
 
(and the box itself needs to be reachable as well)
 

« first day (1557 days earlier)      last day (3406 days later) »