by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Tharindu Mathew
@mackiem
right, as a CS person, we learn that order matters a lot
Jason Turner
@lefticus
The trivial examples we all like to show on Compiler Explorer are still trivial. Once a program reaches non-trivial size the complexities are much too hard for us to reason about generally speaking
Tharindu Mathew
@mackiem
hmmm, very interesting
so it's a never ending source of research I guess
Jason Turner
@lefticus
It is. Plus also I know something as simple as std::string is something like 3x faster from MSVC 2013 to MSVC 2017
Tharindu Mathew
@mackiem
really? wonder for what operations
seems to be across the board, that is what the results were for a JSON parser
I'm sure billy would answer questions on twitter if you asked
Tharindu Mathew
@mackiem
I wonder whether we can find ways to squeeze more perf out of gfx cards as well
Jason Turner
@lefticus
@anprogrammer any word on that pull request, I'm quite curious
Tharindu Mathew
@mackiem
@lefticus, with Summer approaching I'd like to see whether I can help this project out. Can I request a small contribution doc maybe with some high level details of architecture, which issues are best to work on, etc.?
Jason Turner
@lefticus
@mackiem I don't really have an architecture doc to point you at, but I have two suggestions
  1. There's the docs that need to be updated, like the cheatsheet and perhaps some architecture doc
  2. ChaiScript 6.0 has an optimization framework that starts with the AST and optimizes it at parse time. It is almost limitless for possibilities for transformations and optimizations that can be performed
Germán Méndez Bravo
@Kronuz
Trying to update to my project to use c++1z and it's complaining about something I just can't figure out: https://ghostbin.com/paste/vh5os any idea?
(Chaiscript 6.0)
Chris Kaminski
@ckaminski
My understanding is that 6.0 is not 1z/17 compatible.
Switch to the develop branch.
Germán Méndez Bravo
@Kronuz
oh, that must be it then
let me try
Germán Méndez Bravo
@Kronuz
There's a bunch of new things in c++17
Germán Méndez Bravo
@Kronuz
@ckaminski that did work (using development branch) thank you! :)
Jason Turner
@lefticus
I really really need to tag a release for 6.1 to get all of the improvements out to everyone
Chris Kaminski
@ckaminski
Pretty please.
Jason Turner
@lefticus
My work and travel schedule has not given me much time for ChaiScript lately, but I can probably do something in the next week or two to wrap up a release
Peter Repukat
@Alia5
is there some inbuilt method for checking types of derived classes?
something along the lines of
if (Derived* derived = dynamic_cast<Derived*>(base))
Peter Repukat
@Alia5

nevermind...

something different though, are namespaces removed in v6.0.0?
I can still find it in the cheatsheet...

Jason Turner
@lefticus
they were added after 6.0
jhihn
@jhihn
Hey Jason, you're a really smart guy. I thought I knew C++ until I saw your videos. I was wondering though, have you ever thought about an automated tool to scan C++ code and "optimize" it? There's so much optional decorator stuff that could be applied automatically I think, like const, noexcept, references, etc. It would output full properly decorated code. Or is there something like this already? It's kinda like a linter but not.
Jason Turner
@lefticus
cppcheck will get you close. Nothing right now will tell you when something could/should be noexcept tho
and I don't know how hard it would be to write something that could detect that
jhihn
@jhihn
Well, I think you'd "just" have to scan all the things and know which ones throw exceptions, then back it up the hierarchy.
Thanks, I'll check cppcheck.
One annoyance I just discovered, because I work in multiple languages any given day, is the C++14 initializer syntax. Where JS uses var z = {} c++ is int z {6}. Not being able to use an '=' between the name and the value bugs me. And then there's "int x(6)" which would also be shared.
they look so close.
Jason Turner
@lefticus
jhihn
@jhihn
Hey yeah, I saw that in your videos. It's pretty amazing stuff.
Ooh I see what you mean. Was on mobile. Had to zoom in.
Jason Turner
@lefticus
it's not common usage, but it works the same way, as far as I can tell anyhow
Germán Méndez Bravo
@Kronuz
I'm having an issue using chaiscript since I started using string_view... I have a custom object which has operator[] receiving a string_view, and I configured a chaiscript class for that object in which I also added the operator "[]" to t_funcs
the issue is I'm getting an error when I run my script, saying it "Can not find appropriate array lookup operator '[]'. With parameters: (MyObject, const string)"
ans sure there isn't, as I declared (MyObject, string_view), but not the other one... now, in MyObject I can't declare both const std::string& and std::string_view, as it would result in ambiguities
how should I go about fixing this?
Germán Méndez Bravo
@Kronuz
got it! I just added a conversion from string to string_view
(sounds so obvious) :P
Stefan Agartsson
@Zephyrox_twitter
Guys I'm totally lost in ampersands, static casts, shared pointers and too much coffee! How can I add this method to Chaiscript:
template <typename T, typename... Args> std::shared_ptr<T> CreateComponent(Args... args)
It exists in Entity class
This is what I have come up with, but it doesn't work: chai->add(chaiscript::fun(static_cast<std::shared_ptr<DummyComponent1> (Entity::*) ()>(&Entity::CreateComponent<DummyComponent1>)), "CreateDummy1");
Stefan Agartsson
@Zephyrox_twitter
Never mind I'm an idiot, we shall never speak of this again!
Peter Taylor
@emersont1
hi, i'm not sure what i'm doing wrong but when i try to add a function that is a lambda i get a error: no matching function for call to ‘fun<std::__cxx11::string(bool)>( ... ::<lambda(bool)>) would me having the scripting engine as a unique_ptr cause this?