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
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
Ivan Vlatković
@ivandotv
I have just tried the 4.3.1 version.
and there is no type hinting for derived objects (used the example from the readme)
import stampit from 'stampit'

const Character = stampit({
  props: {
    name: null,
    health: 100
  },
  init({ name = this.name }) {
    this.name = name
  }
})

const Fighter = stampit(Character, { // inheriting
  props: {
    stamina: 100
  },
  init({ stamina = this.stamina }) {
    this.stamina = stamina;    
  },
  methods: {
    fight() {
      console.log(`${this.name} takes a mighty swing!`)
      this.stamina--
    }
  }
})

const fighter = Fighter({ name: 'Thumper' }) // does not know about arguments that are needed
fighter.fight() // does not know about the "fight" method or method arguments
Vasyl Boroviak
@koresar
Mate, if you know how to fix it could you tell us please?
Ivan Vlatković
@ivandotv
Since stampit is a very small library easier thing would be to just rewrite it in typescript than to create .d.ts files by hand. I'll will take a look at the library maybe over the weekend.
Vasyl Boroviak
@koresar
True.
The only reason I see JS is better is performance. And library size.
Currently it's 1.4 kb gripped. But that's not as important. But we have performance unit tests. These better not be broken.
Daniel K.
@FredyC
@koresar do you have some measurement that TS compiled code is somehow slower than the one you write directly in ES5? not sure about size, but I wouldn't expect much of increase
Vasyl Boroviak
@koresar
I doubt TS compiled code will be slower. It's just a reminder that we have perf tests which should pass. That's all
Duane Johnson
@canadaduane
Is there a way to inspect a stamp in the javascript console? e.g. when I create a stamp with const e = stampit(...) and then console.log(e) I get output "function t(r)" in firefox (using parceljs). If I click the down-arrow next to "function t(r)" I can see a few of its properties, but it is intermingled with a lot of stamp-specific functions.
Duane Johnson
@canadaduane
Ah, I see. A stamp comes with all of its functions, but an "instance" is clean. I can live with that.
Vasyl Boroviak
@koresar
@canadaduane well done :)
This page might help a little: https://stampit.js.org/ (scroll down)
Duane Johnson
@canadaduane
Thanks @koresar
BTW I think I've found a bug in the Collision add-on: it seems that in conjunction with get/set style methods, the Collision code calls the methods instead of introspecting.
Duane Johnson
@canadaduane
Issue added here: stampit-org/stamp#79
Duane Johnson
@canadaduane
The documentation server appears to be down: https://stampit.js.org/
Error 1014 Ray ID: 59bc353ec8fc025a • 2020-05-30 23:24:19 UTC
CNAME Cross-User Banned