Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 26 2020 19:15
    char0n commented #348
  • Nov 26 2020 11:59
    koresar commented #348
  • Nov 25 2020 11:48
    char0n commented #348
  • Oct 19 2020 00:05

    koresar on master

    Fix badge - bundle size (compare)

  • Jun 08 2020 23:55
    koresar commented #352
  • Jun 05 2020 16:15
    PopGoesTheWza commented #352
  • Jun 04 2020 22:34
    koresar commented #352
  • Jun 04 2020 17:30
    jdittrich commented #352
  • Jun 04 2020 01:28
    basejump commented #351
  • Jun 03 2020 11:26
    jdittrich commented #352
  • Jun 02 2020 22:19
    koresar commented #352
  • Jun 02 2020 22:19
    koresar commented #352
  • Jun 02 2020 17:30
    jdittrich commented #352
  • Jun 02 2020 03:42
    koresar commented #352
  • Jun 01 2020 18:11
    jdittrich opened #352
  • May 31 2020 11:14
    koresar closed #351
  • May 31 2020 11:14
    koresar commented #351
  • May 31 2020 08:55
    koresar commented #351
  • May 30 2020 20:39
    basejump opened #351
  • Feb 17 2020 06:11

    koresar on master

    README refresh: remove bower, u… (compare)

Vasyl Boroviak
@koresar
Stamp's main task is to avoid inheritance chain.
davide-talesco
@davide-talesco
I see the fact the prototype chain is flat, but I thought Instanceof stamp was doing the duck typing for me! :smile: ! Thanks! these stamps are awesome!!
Vasyl Boroviak
@koresar
No worries mate. Happy to help!
Daniel K.
@FredyC
hey @koresar ... I had to dive into older project using stamps and I feel a bit confused right now ... I got so used to regular getters lately, but this seems is not working with stamps right? I can only use more verbose property descriptors
const PaymentRequest = compose(
    Storage,
    {
        init(request) {
            this.request = request
        },
        props: {
            get accountId() {
                return this.request.x_account_id
            },
        }
    }
)
this kinda fails upon composition because Object.assign apparently tries to evaluate those getters right away
Vasyl Boroviak
@koresar
@FredyC Geters and setters are functions, so I recommend to put them to "methods".
If that's not going to work for you then I am looking forward to hearing your suggestions. What should we do?
Daniel K.
@FredyC
yea, it's not working either, because methods are assigned as well ... I am not entirely sure if it's possible to copy getter to a different object, I am surprised it's even executed at this point
I guess don't worry about it, I've used ugly descriptors for now
Vasyl Boroviak
@koresar
I want to fix that. I saw people having getters and setters.
Ivan Vlatković
@ivandotv
stampit looks great, what is the status on the typescript integration?
Daniel K.
@FredyC
@ivandotv I don't think there is any active development for stampit anymore, I might be wrong ... yea I stopped it using because of lack of TS, it's definitely non-trivial thing to do with such dynamic objects
Ivan Vlatković
@ivandotv
@FredyC The library looks great, I starred it a long time ago, and now came back to it, because I have some crazy inheritance hierarchy that I want to replace.
I see there is some action on the repo regarding the typescript types and there is @types/stampit but trying it in codesandbox I got no type hinting.
@FredyC And of course I want to use it with mobx :)
Daniel K.
@FredyC
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/stampit/index.d.ts
there are definitely some types in place, could be working, CodeSandbox sometimes takes time to "heat up" with TS
Vasyl Boroviak
@koresar
Hey, stampit is under active development.
We've released a fresh new d.ts support just few weeks ago
Ivan Vlatković
@ivandotv
that's nice to hear
is it published? under what name?
Vasyl Boroviak
@koresar
3 months ago we released the built in support of JS getters and setters
@FredyC the development never stopped.
Ivan Vlatković
@ivandotv
I see it's included in the package, but what should I use stampit or @stamp/it?
Vasyl Boroviak
@koresar
First one is universal, but mainly built for Frontends
Second one is a clone which is going to be rewritten in the most modern way with TypeScript
Ivan Vlatković
@ivandotv
I'm looking to use the same code on both frontend and backend
Vasyl Boroviak
@koresar
Both will work either side
Ivan Vlatković
@ivandotv
What do you recommend? starting from scratch.
Vasyl Boroviak
@koresar
Although, I recommend "stampit" because it's tiny in size and is compatible with all things "@stamp/..."
I think I forgot to publish v4.3.1 with the new types file. Oops
Ivan Vlatković
@ivandotv
I've tried using the stampit library on codesandbox and it wasn't working (4.3.0) and @stamp/it 1.1.0
Vasyl Boroviak
@koresar
You stampit?
I have no idea what is "stamp" library
Ivan Vlatković
@ivandotv
Yeah I meant stampit
Vasyl Boroviak
@koresar
If you have more details on what is "wasn't working" it would be great. Imagine still learning to read minds.
😂
Imagine =I'm
Ivan Vlatković
@ivandotv
I will try the library tommorrow in TS , and I'll get back to you
Vasyl Boroviak
@koresar
👍
Ivan Vlatković
@ivandotv
Any performance concerns about the library?
Do you have any experience with mobx5? It uses proxies to do its magic
Will the usage of proxies be a problem?
Vasyl Boroviak
@koresar
If you are going to create millions of objects per second then it will be slow. But if less than that - you're good.
Probably proxies are not an issue
Ivan Vlatković
@ivandotv
I will try to mix the two libraries together and I'll report back here.
thanks for the hard work.
Vasyl Boroviak
@koresar
Because stampit generates regular plain text objects.
Thank you very much. I appreciate
Vasyl Boroviak
@koresar
stampit v4.3.1 with improved TypeScript support was just published
https://github.com/stampit-org/stampit/tree/v4.3.1
Ivan Vlatković
@ivandotv
great, I will test it as soon as I get some free time
Vasyl Boroviak
@koresar
Thanks for reminding me to publish it
Daniel K.
@FredyC
@koresar thanks for heads up, that is great to hear there is such progress, now I am torn apart
lately, I started discovering XState for writing business logic, it's about state machines
it's essentially another way of composition with nice vizualizer
need to think if stamps can fit somewhere in there :)
Vasyl Boroviak
@koresar
Just googled it. Wow