« first day (1629 days earlier)      last day (3544 days later) » 

19:00
@ThePhD yeah, all you have to do is figure out how to pass a Boost.Any object to Lua without a segfault and how to cast it to a type I already know
I like how gcc doesn't warn you if you only ever write to a container... :\ would be nice if it could point out "hey, you spend a lot of time building up this data, then ignore it"
How can it tell
@райтфолд Use the dynamic keyword.
user1804599
Hmm.
what?
user1804599
19:14
Why's it called dynamic?
user1804599
Because the dispatch happens at runtime?
I preferred dynamic over virtual because a) it expresses more clearly what the feature actually means, i.e. the function called is chosen dynamically, and b), I had intentions to re-use the keyword in other places, like perhaps dynamic modules or concepts.
I've got a basic box struct `struct TRectF { double top; double bottom; double left; double right; }`, plus possibly some API garbage in there I can't do anything about.

It would be REALLY nice if I could just iterate over each point as if it were a vector or array. Any way to do that (as opposed to copy-pasting)?

Best I can think of is making an array of pointers to the elements and iterating over that but I'm hoping I can skip that.
@QuestionC lol hungarian notation
19:18
also that
hmm
Heh, did you notice the PacMan on Google maps?
I guess that, since I am on a sockpuppet account, I could go back on Programmers and resume calling people bitches
sounds like a plan with no potential downsides at all
I did not need to see a giant screenshot.
@wilx Is it google's april's fool joke?
19:21
@khajvah Probably, dunno. I just grabbed the picture.
Bah
Lua
@Scrubbins I did.
april fools is dumb and by having a corporate april fools you're just announcing that you're all morons.
@khajvah Yes, but you're pretty low-priority really
@Scrubbins Not as low as you brother wanker.
anyone working on some interesting C++ problem?
19:24
@FilipRoséen-refp pass a Boost.Any object to Sol and any_cast it back to what it was in Lua
Using Sol or Selene
@Cinch nhaa, no fun
sorry
Why does it give me a segfault even
No, so much fun
@FilipRoséen-refp I'm basically copying this guys code to try and implement properties: woboq.com/blog/property-bindings-in-cpp.html
It's not really a 'problem' but it is interesting
user3010322
@Cinch Wait a second.
user3010322
You pass the Boost.Any into lua with sol/selene,
user3010322
19:27
but you any_cast it before you turn it back into a Boost.Any?
user3010322
Where does it segfault? On the Boost.Any code, in your code when you cast it, where?
@FilipRoséen-refp Bonus points if you can figure out a way to implicitly get properties from within a lambda binding that doesn't use the static 'EvaluationScope' in the article. Its the only bit I didn't like but I don't think there's any other way to do it
@Pris could you write a minor paste showing exactly what he's looking for?
user3010322
Ah fuck I have to go get boost for VS 2015 CTP 6.
19:29
hi
user3010322
Welcome home!
I missed the CCC =(
> home
user1804599
@minitech hi
He's not looking for anything. Its a implementation of properties that update themselves. ie.
Property<int> x = 1;
Property<int> y = 2;
Property<int> hyp = [](){ sqrt(x*x + y*y); }

If you update x or y, hyp updates automatically.
19:31
reactive programming?
Yes
Xeo
Xeo
lolz
Sounds interesting
Xeo
Xeo
> Jupiter through the years as telescope tech improves
@ThePhD ty
19:31
@ThePhD I bind an instiated version of boostany
user1804599
@Xeo Jupiter is a star?!
user3010322
@Cinch In a lambda?
It segfaults on the Lys-invoked anycast
hey xeo
user1804599
Jupiter sure is huge-ass.
19:32
The clever bit is that Property derives from a PropertyBase*. There's an internal static PropertyBase* that's used to implicitly set dependencies using the exact syntax I showed above, even though you don't explicitly set them up.
No, I defined a function
want to play multiplayer starbound with me at some point later?
@Rapptz why do you think it segfaults
I have a question
user3010322
Show me an example of what you mean. I want to repro it.
Xeo
Xeo
@Scrubbins Hi. Who are you?
19:32
puppy
@Pris let me grab a smoke and think a bit, I'll get back to you on this
I'm at school right now, but basically:
@Pris I got some ideas about it
Xeo
Xeo
what. why
Boost.Any b("hello");
19:33
@Xeo Because the latest stable update is pretty great.
Xeo
Xeo
No, I mean, why on another account.
sol::state.set("boost_any", b)
oh
because I'm in the swamp right now
oh well I could RDP on to my real machine but I won't do that just to chat
Xeo
Xeo
... just get a usb stick with your keypass database, c'mon
I have it on my phone and it's right here
19:35
sol::state.set_function<std::string(boost::any)>(unpack)
user1804599
I'm a moron.
user1804599
I made == have higher precedence than +.
but that entails logging in with my Google account, which means unlogging my mother's Google account.
Where unpack = boost::any_cast
user3010322
@Scrubbins You can side-by-side login in g-mail.
Xeo
Xeo
19:36
@Scrubbins lol.
@ThePhD I use that for my work account and it's super not suitable for different people's accounts.
user3010322
@Cinch boost::any_cast to... std::string? const char* ?
good shout ThePhD.
it should be boost::any any(std::string("Hello"));
user1804599
> stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
@ThePhD if by that you mean you thought about it for a few seconds and realized glloadgen would save you a bunch of time, then yes ;)
user1804599
19:39
dat address
@Xeo So what do you think? I actually totally love the new Stabround.
user3010322
@Borgleader :D
Lua is dynamic typed
@райтфолд Buffer underflow.
I don't get why you'd want to use Boost.Any tbh
19:39
on a NULL pointer.
Xeo
Xeo
Boost.Any is boring
@Xeo Death Star the size of Jupiter. Now that would be awesome.
user1804599
@Scrubbins hmm.
user1804599
Alright, I really need this assembly dumper.
just ask LLVM to print the LLVM IR.
it'll be easier to handle than assembly (quite a bit actually)
19:41
@Pris would that mean that one would access hyp as obj.hyp and relying on operator T () to do the right thing, or is every property accessed like obj.hyp?
Xeo
Xeo
@Scrubbins Stab-Around?
But sure, why not
haven't played in a while
Xeo
Xeo
long while, actually
stab-around instead of stabround? could work
I guess I prefer Stabround because it feels a bit more natural
stab-around feels kinda forced
@Pris nevermind, I read the source
19:42
@ThePhD yes, std string
@Xeo There's a fair bit more meat to the game now. Before it kinda felt like "Mine, go to new planet, mine, rinse repeat, occasionally bad boss fight"
Xeo
Xeo
yeah
@Rapptz because that's how it is
Xeo
Xeo
Is the start still so slow?
19:44
Now can I do it with Sol with template magic?
And why would the copy ctor fail?
well, you still have to go to the core of the planet you start on and pick up some core fragments
but I believe they nerfed it so that all the starting planets are the smallest size.
and once you've got them then it's quest time at the outpost and the first mission is right up too
and the ore requirements for all tiers of armour is about a third of what it was.
user3010322
Holy titters.
user3010322
Include one boost file and suddenly my compilation times are through the roof.
I'm actually kinda sad that they removed Hunger, though.
well
only kinda.
19:48
@ThePhD what file?
@ThePhD idk what your problem is
I think this time I ought to build a floating base rather than an underground one.
the problem with underground bases in Starbound is the rain :P
user3010322
@Cinch So I get a (VC++) version of a segfault (boost throws an exception) and tells me I can't any_cast because it's not a std::string. Changing it to the line @Scrubbins pointed out (boost::any_cast<std::string> AND initializing boost::any b(std::string("Hello"));) fixes the crash you're referring to.
Xeo
Xeo
@Scrubbins what's it do?
user3010322
@khajvah Nevermind: it was just VS throwing a hissyfit because it was trying to PARSE the entire boost library.
user3010322
19:51
@Cinch The code for the following looks like this (fixed version).
@Xeo Well, the rain actually literally drops water on the ground that can fall into your base and flood it with water :P
@ThePhD Yea, it did sound weird issue. :)
Xeo
Xeo
@Scrubbins hah, nice
user3010322
Remember that "hello" isn't a std::string, it's a const char[6], and that decays into a const char* pointer when passed to functions of any kind (boost::any's constructor included).
@Xeo The water in Starbound is pretty nice- they have water pressure unlike Terraria and you can harvest water with the MM as well as easily get an oxygen suit, plus you can actually swim upwards now
@ThePhD Not necessarily. It doesn't have to decay.
Xeo
Xeo
19:52
sounds like a good bunch of updates happened
Xeo
Xeo
last time I played, something still felt off wrt combat though
it's been improved a lot
there's another combat update coming at some point kinda soonish though
Xeo
Xeo
maybe I'm just too accustomed to Terraria combat
user3010322
@Xeo Janky and hard to aim with anything but guns/arrows?
19:53
shields added a lot to the game I feel
and before you couldn't do shit like aim your sword, which was pretty silly
@ThePhD unpack is a templated funnction
the 2H melee weapons need a bit of a buff though
but they're working on it
You do templates with Sol::set_ function<std::string(boost::any)>
and the tech is a lot improved as well I think
yeah he knows
user1804599
19:55
now you can get "blank tech cards" that give you a tech of your choice from your current ship's tier
instead of having to hunt around for the specific tech you want
user1804599
Except the offsets are wrong.
user1804599
Argh dammit.
user1804599
Nice, now it works very well.
brb
don't start Stabround without me!
user3010322
19:57
@Cinch I templated the function and call the templated version: still no repro (it works fine). Granted, I am running the version of sol on the devel version, but nothing's changed WRT how functions are stored, how function calls are done, etc. etc. The tests are passing for the devel branch and the master branch, so... again, I'll have to wait 'till you get home and have time to show me the specific issue that's making it explode.
user3010322
Granted, with the argument it looks like you're not taking by reference, but by copy... let me try that and see if that works as well.
user3010322
Yeah, still working.
user1804599
86 PushGlobal std::always::infix==
91 PushBoolean true
93 PushBoolean true
95 Call 2
user1804599
For some reason, this segfaults. ;_;
SJD
SJD
19:58
sup! question, does anybody know why 1 - 2 gives me 255? :-? (integer)
unsigned
@ThePhD freaking const char
Freaking compilers
user1804599
@SJD Look up integer overflow.
@SJD it is not an integer. it is an unsigned char
@райтфолд There is no overflow there.
19:59
@ThePhD @Rapptz I love you both
user3010322
@Cinch In C++14 you can make "" string literals into std:: strings by doing "hello"s or something like that.
SJD
SJD
@LightningRacisinObrit even if I declared the variable as int ?
user3010322
... Er.
@SJD the thing you're printing is unsigned char

« first day (1629 days earlier)      last day (3544 days later) »