« first day (1432 days earlier)      last day (3509 days later) » 

Xeo
11:00 AM
@BartekBanachewicz You want the size of T, not the size of T*.
 
@Cinch To summarize: Why do you use Init and Cleanup instead of constructors and destructors? Why new? Why singletons? Why stringly-typed API? Why linear search?
 
@Xeo oh fuck right
 
Why are you writing C anyway
The best way to deal with error handling is goto
 
@milleniumbug incompetence.
 
I use Init and Cleanup in order to control what order by objects initialize and set everything up and if I want to restart without releasing resources
 
11:00 AM
@CatPlusPlus The best way to deal with error handling is use a language that actually supports error handling
 
The best way to deal with error handling is libpython.
 
@Cinch In my programs I control that by not constructing them in the wrong order.
 
I use new because I didn't know about smart pointers at the time
Which of my classes is a singleton?
 
@CatPlusPlus for giggles
 
When was it?
Why did you know about new before you knew about std::make_unique?
 
11:01 AM
^
 
Because noob tutorials
 
@PolymorphicPotato Are you being dumb on purpose?
 
See, this is exactly why I'm writing the game
 
Why are we talking about RAII in C?
 
Like you don't fucking know
god
Kick potato
 
11:02 AM
@Cinch don't use noob tutorials
 
In order to find out and make mistakes
Which of my classes is a singleton?
GUI_Engine is a singleton?
 
user3010322
Uh. You call it a singleton in the docs. o_o
 
user3010322
Srsly, at the top.
 
GUI_Engine is a pretty bad name.
The underscore is so ugly!
 
It's been delegated all the GUI work anyways
There's going to be multiple subsystems
 
user3010322
11:03 AM
vOv
 
Not quite Bjarne_case, though.
 
I mean how else would I implement it?
 
@Cinch I teach C++ on the side at the beginner level. You're welcome to buy a lesson.
4
 
I'm a cheapskate who says "What's money?"
at least on the internet
But is there a better way to manage GUIs besides the singleton method?
 
$5
1 hour
 
11:05 AM
lol that's pretty damn cheap
 
15 mins ago, by Cat Plus Plus
Seriously don't write GUI shit this is not trivial
 
An interesting thing I realised from using asio is that new io_service is a dumb thing that you never do, and yet the io_service is essentially the same thing as one of those "engines" or "subsystems" people put in games. Well, the "engines" and "subsystems" that are not just collections anyway.
 
No sorry I don't like spending money on the internet
 
@BartekBanachewicz yeah, I just enjoy doing it
 
@Cinch I take $10 for 15 minutes, but you get first 15 minutes free.
@OMGtechy I also enjoy doing it, even more if I get paid :D
 
11:06 AM
But I mean I just don't understand how GUI_Engine is so bad.
Each GameState has a GUI_Engine object itself
 
We know you don't know.
It takes time to learn those things
 
@BartekBanachewicz for me I just have the $5 there because it gets rid of people who don't want to invest in it. It's not really there for an income, just as a barrier for entry.
 
1 min ago, by Cat Plus Plus
15 mins ago, by Cat Plus Plus
Seriously don't write GUI shit this is not trivial
 
Don't doublequote
 
Well it's good logic practice! :)
 
11:07 AM
Speaking of design
 
How many levels of quoting are allowed?
 
I need to come up with one for the MUD
 
29 secs ago, by Bartek Banachewicz
1 min ago, by Cat Plus Plus
15 mins ago, by Cat Plus Plus
Seriously don't write GUI shit this is not trivial
 
@Cinch it's not a practice if you can't make a single step without asking us
 
Let's check it out.
 
11:07 AM
:18934410
 
You're not practicing anything
 
Reminder that we can kick now
 
@milleniumbug Don't.
 
@milleniumbug No limit other than max message size.
 
Has been done over to death in the sandbox.
We can kick.
 
11:07 AM
Well anyways
 
@PolymorphicPotato Links to messages never break message size.
 
It's not funny, it's been done, don't
 
Ok, ok
 
is there a specific reason why I can't use these:
// lua.set_function("add_window", &GUI_Engine::add_window, this);
// lua.set_function("add_button", &GUI_Engine::add_button, this);
// lua.set_function("add_textbox", &GUI_Engine::add_textbox, this);
 
11:08 AM
@Cinch
4 mins ago, by OMGtechy
@Cinch I teach C++ on the side at the beginner level. You're welcome to buy a lesson.
This is not a C++ tutorial room.
 
okay this shit is getting tedious and boring
I mean okay, I like helping people.
But this has been three days for real.
 
I would appreciate if people kept the marketing out of the room.
 
@BartekBanachewicz I was ready to Lounge<CodeReview>
 
@fizzbuzz Oh well. I guess you will endulge me if I say that makes little sense to me. But good to know you thought about it :) — sehe 7 secs ago
 
Sorry, the point I was trying to get across is if you want to learn go learn, this isn't a dynamic tutorial. @R.MartinhoFernandes
 
11:09 AM
There's not enough OSS MMO engines
 
^ typo fixed, btw
 
user3010322
@CatPlusPlus I'm not sure how well that'd work out.
 
Fine last question
 
Just stop man.
Go try yourself first at least.
 
Just stop being a man.
 
user3010322
11:10 AM
Also Fontconfig y u so hard to use as library
 
It's with the Lua binding
 
user3010322
plz
 
@ThePhD Why?
 
My recommendation is to chew on something smaller.
 
There are already OS MMOs you know
E.g. PlaneShift
 
11:11 AM
Would I need to define an object in Lua before I pass it as an argument to a function given to Lua?
 
50 secs ago, by OMGtechy
Go try yourself first at least.
 
Also MANGOS which is ostensibly a WoW emulator
 
@BartekBanachewicz use lambda, local class (functor or with static members)
 
I haven't look at PS code tbh
Maybe I'll get enlightened
 
user3010322
Never heard of either, but I stopped looking at MMOs like a bajillion years ago.
 
11:11 AM
Okay, that'll be 60$.
The fine, that is
 
Okay
Thanks guys
 
user3010322
Oh god
 
user3010322
Why
 
user3010322
Why does this autogen.sh have errors
 
11:12 AM
We can scream now.
We can kick and scream
 
*scream
 
And stream >>
 
user3010322
Why do all these libraries rely on these autogen.sh s?!
 
@ThePhD It doesn't. You have errors when using it. Harfbuzz? No problems for me
 
user3010322
And why DON'T THEY WORK THE FIRST TIME. ;~;
 
11:13 AM
oh finally he's gone
I admit I prefer @ThePhD over that guy
 
user3010322
@sehe I got Harfbuzz working, now it's Fontconfig.
 
he at least invents new problems every time
 
@ThePhD Because you fail to install the dependencies or take the proper steps?
@ThePhD Ah. No comment there then.
 
Build on Linux and stop vendoring libraries
 
user3010322
I am building this on Linux.
 
11:14 AM
@BartekBanachewicz Also, ThePhD seems to understand the points made. It's just that he chooses to throw caution to the wind
 
Then don't build dependencies manually god
 
@sehe which is amazingly annoying on its own rights alright.
 
iScream!
 
mmm
 
Xeo
11:15 AM
Ice cream?
 
user3010322
... I'm going to drag this over to Windows and VC++ when I'm done getting the source out of it, but... I'm trying to get the source.
 
Yep
 
Xeo
I have some of that.
 
Damn you where's mine
 
I hope this won't become a silly meme.
 
11:15 AM
A screaming pile
 
user3010322
@CatPlusPlus But I muuussstt.
 
user3010322
I mean, most of them are painless to build.
 
@PolymorphicPotato It's already silly. So...
 
thank god smaller font works here
 
However funny it may seem.
 
11:15 AM
I have no idea why it stopped working that other time
 
user3010322
It's just these few linux ones really break my back...
 
When I vendor libraries I ignore the upstream build system, because they're never designed for integration
 
istream iscream to my stomach
 
Well, when I did
I don't build C++ shit anymore because fuck this nonsense
 
I have no idea why, but the smaller font really helps. It's totally weird.
 
11:16 AM
@Jefffrey lambdas lure goes balistic
 
Someone should do a real psychological study of it.
> Font size impact on perceptions of written text.
 
@OMGtechy in your dream
@BartekBanachewicz It's not the perception of the text that changes. It's the fact that you feel you have control over your surroundings. It would not be beneficial if someone else chose the font sizes for you
 
@sehe hey! that actually makes sense
it's pretty deep.
 
It's psychology 101
 
@sehe I suppose that the next step is convincing myself that I still have control even if the text isn't smaller? :S
 
11:19 AM
holy shit another use for boost::optional
I fucking love *::optionals
 
Never used it myself, what's the new use?
 
@AlexM. I love all instances of MonadError equally :P
 
I'm supposed to have some inter-game communication via some shared form of storage
and a game may or may not have a message waiting for it
 
E:\code\.dump\planeshift\src\server
> (ls *.cpp | where { $_.Name.EndsWith('manager.cpp') }).Count
33

E:\code\.dump\planeshift\src\server
> (ls *.cpp).Count
52
4
gamedev.jpg
 
and instead of sending an empty string in that case I can just send a value saying there's no message
and treat the empty message as invalid data
 
11:21 AM
@CatPlusPlus holy fuck
 
@AlexM. nice
 
Okay hi again
 
NOOO
 
@BartekBanachewicz I'm a discriminating asshole :A
 
11:21 AM
I deeply apologize for wasting your guys' time
But it works fully now
Thank you for all of your help
 
Ignore those idiots, you can stick around
You should stick around
If you want to learn from me the best programmer
 
Xeo
lol
 
@Cinch To be fair, I didn't think your GUI_Element thingy was all that bad - I've seen worse.
 
I can confirm
 
@CatPlusPlus you are the OP now
 
11:22 AM
Cat has taught me a lot
 
Use raw pointers everywhere and have no clear notion of ownership, everything will be fine
 
Well thanks to all of you I have implemented a scripting system into my GUI system
 
he's a good best programmer
 
@OMGtechy OK, ownership was an issue. Parent != Owner.
 
11:23 AM
class psMarriageManager
 
If you guys so desire, my project is gonna be open source for the most part
 
I can just put UTF-8 encoded string literals in Lua code and it will not whine right?
 
Really Lua has unicode supp?
 
@MartinJames I was just trolling in general
 
11:24 AM
@CatPlusPlus Yeah. Definitely dick around!
 
hey can I be a help vampire now?
I need help with something
 
Oh, shtick. Dam keming
 
Hahahaha invite prompts return "yes" and "no" as strings
 
        it "should parse table access syntax sugar" $ do
            (parse "t.x = 5") `shouldBe` (Block [Assignment [LFieldRef (Var "t") (StringLiteral undefined "x")] [Number 5.0]])
 
@Cinch Not AFAIK.
 
11:24 AM
@CatPlusPlus btw on your website it says "if it's not on the right, don't assume it's my account", but everything is on the left
 
I need to get rid of that undefined in a shortest way possible
 
@sehe Yeah that doesn't work with that word
@OMGtechy I'm bad at directions
 
I want to ignore the comparison on that particular field
 
Also plausible deniability
 
ha
 
11:25 AM
@CatPlusPlus Oh. It works for me.
A clirty rnincl is a joy forever
 
But if it keeps the string literals intact then I don't have to do ugly hack for what I want to do.
 
ugh, but the underlying API for getting data from the shared storage already returns an empty string if there is no value for the given key
so there's no way for me to discern between an empty message and no message at all
w/e, I'll see if I can suggest a change later on
 
Fuck it I'll just generate \nnn for each code unit.
 
see, this room can spend 3 days on bikeshedding a terrible GUI implementation, and completely ignores any questions that require the least amount of thinking
fuck that I'll ask on SO.
 
QuestionManager
 
11:27 AM
No, it's that very few people here know anything about hspec whereas many people here know about C++.
 
@BartekBanachewicz Why what is it
 
@CatPlusPlus look above
 
user image
8
One for LRIO. (That's a Malaysian paper)
 
@BartekBanachewicz Above what
 
11:29 AM
OH MY GOD IT WORKS SO WELL THANK YOU ALL
 
0
Q: How can I easily express that I don't care about a value of a particular data field?

Bartek BanachewiczI was writing tests for my parser, using a method which might not be the best, but has been working for me so far. The tests assumed perfectly defined AST representation for every code block, like so: (parse "x = 5") `shouldBe` (Block [Assignment [LVar "x"] [Number 5.0]]) However, when I moved...

this is the second question on the whole SO
that's so fucking sad.
 
But really why do you want to ignore it
 
@CatPlusPlus it contains source information that's not important for me in this case.
 
Do you really need the Eq instance to use that field then?
 
hmpfh
Eq is derived for Stmt
Also "in this case"
 
11:33 AM
5 years on SO today
I should get a life
 
I might just get rid of that source position thing
 
Make a wrapper type that is an instance of Eq and ignores what you want to ignore.
 
@BartekBanachewicz damn I was about to answer boost::optional too, does haskell not have a concept of none?
 
@Mgetz it does, but that's not an optional field
 
@TonyTheLion l or w?
once you get the other, you probably would spend less time here too ...
 
11:35 AM
you don't "get" a wife
@chmod711telkitty oh... I missed another memo
 
You buy one.
 
user1646075
@PolymorphicPotato you rent them
 
user1646075
until you are evicted
 
Xeo
@BartekBanachewicz How the hell does that even work with undefined? Shouldn't it error out on comparison?
 
Not if you don't use the result of the comparison!
 
11:36 AM
@Xeo it does error out :P
 
Xeo
great success, then
even without hspec
 
lol of course it doesn't work
why would I post the Q if it did :D
 
That's the question
 
Xeo
@BartekBanachewicz The question is, why involve hspec?
Wait, I can guess why
 
shouldBe :: (Show a, Eq a) => a -> a -> Expectation
shouldSatisfy :: Show a => a -> (a -> Bool) -> Expectation
 
11:38 AM
Password:
I feel much better now.
sudo: 3 incorrect password attempts
 
that's what I'll use if it's not possible vOv
I'm not sure how to write this comparison in a compact way though
maybe I could pattern match
 
Write a mapper that strips the information you don't need maybe
 
Xeo
You want to have the AST match a specific pattern, and you want to support wildcards on the RHS, right?
write a helper for that, and then parse ... `shouldMatch` somePattern
 
> "\720\101\108\108\111\440\320\119\111\114\108\100\330"
stdin:1: escape sequence too large near '"'
lolwut :v
 
        (parse "t[\"xyz\"] = v") `shouldSatisfy` tableStringAssignmentAST
            where tableStringAssignmentAST x =
                    case x of
                        (Block [Assignment [LFieldRef (Var "t") (StringLiteral _ "xyz")] [Var "v"]]) -> True
                        _ -> False
this gives me a parse error
FML.
 
11:44 AM
Oh wait, fail.
"\072\101\108\108\111\044\032\119\111\114\108\100\033" works better. :)
 
@CatPlusPlus Uhoh. Son. I think I will have to disown you...
    find -iname '*.cpp' | tee >(echo $(grep -ic manager) managers) >(echo $(wc -l) files)
    1324 files
    1 managers
 
@BartekBanachewicz Yeah no Haskell pattern matching can't do that
There's no equality matching
@sehe Not my code
 
@CatPlusPlus this?
 
@CatPlusPlus wut. you seem to miss my point
Oh. That's because I have hidden it :)
sehe@desktop:~/Projects$ find -iname '*manager.cpp'
./Micha/Love2d/love/src/libraries/Box2D/Dynamics/b2ContactManager.cpp
^ there. The missing clue
 
I have no idea what are you on about
 
11:47 AM
@sehe hey, that's box2d, not Love :P
 
My son apparently has become a gamedev at age 6... Sad, but, you know. Can't show'em any mercy. Life is tough!
 
Make love not box2d.
3
I'm terrible.
People have to repeatedly harass me over e-mail so I can call them back so they can give me money I am entitled to.
 
Xeo
...
 
See, it's not just my health I overlook.
 
11:49 AM
Wait, that's not a good argument.
 
@R.MartinhoFernandes If you need any consolation, look at that twitterfeed I bumped in this morning. You'll love some parts of it. (And abhor the artificial jokes. And be relieved you're not the worst).
 
Xeo
Shutup go see a doctor
 
@R.MartinhoFernandes Oh. That.
@R.MartinhoFernandes Reminds me. I should probably check in with this choir that specifically wanted my IBAN account number (and I thought: they can figure it out. Let's see how long they will wait. I guess they have a lot of patience :))
 
@BartekBanachewicz I have a feeling SYB might help but I never managed to decipher it
 
i feel too unsuccessful to be in this place (Ocean Beach poolside baby)
 
11:52 AM
Apparently it's ok to handle that sort of information over the phone but not over e-mail.
 
I'm the worst with administrative tasks and have an active disgust of invoicing, negotiating or even thinking of money. It just makes me not want to do even stuff that I like.
@R.MartinhoFernandes You mean, you find it easier on the phone?
 
Xeo
@sehe ugh, negotiations...
 
Also, they have my bank details: the money they want to give me is money I gave them in excess by bank transfer.
 
I'm the best at finding ways to spend my money
 
@sehe No, they don't want to discuss it over e-mail. The only thing they say in the e-mails is "talk about our letter dated 5th September" and "not all information should be handed over e-mail".
 
Xeo
11:53 AM
@AlexM. Did you get a bike yet?
 
@Xeo of course not, first I need a GPU, then a console :O
only then will I buy a bike
 
@CatPlusPlus :S
 
@R.MartinhoFernandes They're being obtuse.
 
I might get the bike in February or March because there's no point in riding it over snow and ice anyway
I mean it's an extreme sport like that
 
Xeo
weakling
 
11:55 AM
the PS4 + GTA V bundle will be released in late November
 
Oh, right, yeah, they also sent me a letter.
 
and snow + ice usually shows up in mid-December
so there's no point to buy a bike then to ride it for a few days only
 
Cue snowless winter.
@sehe I didn't get paid for three months because I didn't bother providing some missing details like my tax and health insurance ID. Maybe you're not the worst :P
They threatened to fire me because of that :S
 

« first day (1432 days earlier)      last day (3509 days later) »