Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 15:06

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 24 07:47

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 23 02:04
    pthom commented #432
  • Jan 18 12:46

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 16 22:27
    ricejasonf commented #434
  • Jan 05 06:22
    ricejasonf commented #330
  • Jan 03 11:40

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 02 00:33
    ricejasonf closed #434
  • Jan 02 00:33
    ricejasonf commented #434
  • Jan 02 00:04
    ricejasonf opened #434
  • Dec 27 2018 13:11

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Dec 22 2018 11:56
    pthom commented #432
  • Dec 22 2018 11:55
    pthom commented #432
  • Dec 21 2018 15:48
    pthom synchronize #432
  • Dec 21 2018 09:19
    sdebionne opened #433
  • Dec 21 2018 00:08
    ricejasonf commented #432
  • Dec 21 2018 00:03
    ricejasonf commented #432
  • Dec 20 2018 23:36
    pthom commented #432
  • Dec 20 2018 23:36
    pthom commented #432
  • Dec 20 2018 23:13
    ricejasonf commented #432
Jason Rice
@ricejasonf
I'm really curious about the use case you have for it
Barrett Adair
@badair
Let me back up then. Is there a type in Hana that's like hana::type but lets you store a value of that type inside? I didn't find one so I made one myself.
Jason Rice
@ricejasonf
Wouldn't that be just an instance of the value of that type?
Barrett Adair
@badair
Yeah. Does hana::type<T> have a member of type T?
bc that's what I need
Jason Rice
@ricejasonf
using Foo = typename my_type::type;
Do your As and Bs have run-time state?
Barrett Adair
@badair
yes
which is what makes Hana so perfect for my use case
Barrett Adair
@badair
this is what I ended up doing:
// todo this shouldn't be necessary
template<typename T>
struct type_v {
    T value;

    template<typename U>
    constexpr auto equal(U) const {
        return std::is_same<T, U>{};   
    }
};
Jason Rice
@ricejasonf
If it was me I would do hana::pair<hana::type<T>, hana::pair<T, V>>
Barrett Adair
@badair
I did that too
Jason Rice
@ricejasonf
was that no good?
Barrett Adair
@badair
I did both at the same time and made a TODO because I didn't implement Hashable
Jason Rice
@ricejasonf
Hashable is only used to decide what bucket a key/value will go in. It still uses Comparable to decide if the key is a match
Barrett Adair
@badair
Sure, but both are required if buckets are needed
Or, both are required
Jason Rice
@ricejasonf
The default for hana::hash is to just lift it to its hana::type
Barrett Adair
@badair
So by default everything is Hashable?
Jason Rice
@ricejasonf
yup :P
Barrett Adair
@badair
I was getting a weird error about something not being hashable
Jason Rice
@ricejasonf
oh.. maybe I am mistaken
I guess there are only implementations for IntregralConstant, type, and string... maybe others
Jason Rice
@ricejasonf
That means a group_by algorithm would have to return a value that is bothComparable and Hashable
If it was Orderable it could be sorted too
Pramod Srinivasan
@domarps
hey everyone, I just posted my issue about a boost python issue here : https://stackoverflow.com/questions/45576378/boost-python-importerror-undefined-symbol. It would be great if I can get feedback on how to resolve this issue.
Jason Rice
@ricejasonf
This is just a stab in the dark, but it appears that you are not actually linking the library. -L merely adds a directory for the compiler driver to search for libraries (I think).
gcc file1.c -Llibs -lmylib -o outfile
@domarps ^
Pramod Srinivasan
@domarps
I didn't understand that comment @ricejasonf. I believe it is an issue with conflicting linkages between different versions of python
Jason Rice
@ricejasonf
I think you need -lboost_python-py34. The -l option is used for linking but you don't have that which explains the undefined reference.
err.. just -lboost_python
Louis Dionne
@ldionne
@domarps Please note this is a channel for Hana, not for general Boost questions. Please direct such questions to the boost-users mailing list.
Jason Rice
@ricejasonf
Searchable does not refine Foldable
Louis Dionne
@ldionne
Sorry, I know I’m a ghost. I’ll try to reply to the issues within a few days, but I’ve been rushing to prepare a talk for tonight.
Jason Rice
@ricejasonf
I figured you are very busy. Sorry if I am being spammy. I found some other stuff to occupy me while that stuff ferments. :D
Post a link to the video of your talk if there will be one.
I'm sure it would be interesting
Louis Dionne
@ldionne
No you’re not spammy at all, I really appreciate the help and involvement.
Jason Rice
@ricejasonf
:+1:
Louis Dionne
@ldionne
There won’t be a video of the talk since this is a local C++ meetup. It’s my CppCon talk basically.
Jason Rice
@ricejasonf
static_assert(sizeof(hana::tuple<hana::int_<42>>) == 1); Is that expected?
Louis Dionne
@ldionne
Yes. What would you expect? That’s the smallest size it can have, right?
An object can’t have 0 bytes in C++.
Jason Rice
@ricejasonf

Ah, that's right. How about this then:

  static_assert(std::is_empty<hana::tuple<>>{});
  static_assert(!std::is_empty<hana::tuple<hana::int_<42>>>{});

Intuitively, I was expecting the latter to be empty because of ebo. Perhaps I need my own has_runtime_state<T> thing.

Louis Dionne
@ldionne
Ehm, I would expect it to be empty.
I think this would be fixed by boostorg/hana#333
Jason Rice
@ricejasonf
Oh, maybe it's not using ebo. ??
    template <typename ...Xn>
    struct tuple
        : detail::operators::adl<tuple<Xn...>>
        , detail::iterable_operators<tuple<Xn...>>
    {
        basic_tuple<Xn...> storage_;
        using hana_tag = tuple_tag;
Louis Dionne
@ldionne
basic_tuple is using EBO, but it’s missing some opportunities for it. I forgot the exact details since it’s been a while.
Jason Rice
@ricejasonf
Would it make sense to put basic_tuple in a storage wrapper and derive from that in tuple?