by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Jason Turner
@lefticus
each version of VS is faster than the last version. if you move to VS2015 then also upgrade to chaiscript 6, as that is significantly faster also
Tharindu Mathew
@mackiem
but native code will be faster? That's not surely possible.
Jason Turner
@lefticus
Why not? Optimizers are always getting better with every new compiler release
plus the C++ standard library is getting more and more optimized with each new compiler release
Tharindu Mathew
@mackiem
so can we optimize our way to 8K output? :)
Jason Turner
@lefticus
Well... there's probably some limit, but we aren't there yet
Tharindu Mathew
@mackiem
Like I can understand something move operaitons being optimized or tail recursion being optimized. But, there's always a limit if you try to make your code as simple as possible
Jason Turner
@lefticus
You're mostly correct, but thinking too low level
The compilers are able to better order operations and use better CPU instructions also
better ordering means better throughput
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)"