LFUDA changes #47

Closed
nikooo777 wants to merge 12 commits from improvements into master
Showing only changes of commit 9fc96ac01b - Show all commits

View file

@ -66,11 +66,14 @@ func (l *LFUDAStore) Get(hash string) (stream.Blob, error) {
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
// Put stores the blob. Following LFUDA rules it's not guaranteed that a SET will store the value!!!
func (l *LFUDAStore) Put(hash string, blob stream.Blob) error {
err := l.store.Put(hash, blob)
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
if err != nil {
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
return err
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
}
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
l.lfuda.Set(hash, fakeTrue)
has, _ := l.Has(hash)
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
if has {
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
err := l.store.Put(hash, blob)
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
if err != nil {
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
return err
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
}
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
}
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
return nil
}
lyoshenka commented 2020-11-27 22:31:02 +01:00 (Migrated from github.com)
Review

why are Put and PutSD implemented differently?

why are Put and PutSD implemented differently?

lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool
lyoshenka commented 2020-11-27 22:26:46 +01:00 (Migrated from github.com)
Review

seems weird to do this. why not an actual bool, or an empty struct?

seems weird to do this. why not an actual `bool`, or an empty struct?
nikooo777 commented 2020-12-09 19:19:18 +01:00 (Migrated from github.com)
Review

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM.

I since worked with the developer of the library to address this so i believe we can go back to using a bool

the reason I did this was because the library wasn't treating a bool as a 1byte type and it would waste a lot of RAM. I since worked with the developer of the library to address this so i believe we can go back to using a bool