00:03:17
| <mbalho> | ok YAY i can start using indexeddb in my app now |
00:05:24
| * levelbot | quit (Remote host closed the connection) |
00:05:36
| * mrevil | quit (Remote host closed the connection) |
00:05:40
| * levelbot | joined |
00:05:51
| <levelbot> | [npm] level-js@1.0.0 <http://npm.im/level-js>: leveldown/leveldb library for browsers |
00:06:23
| <mbalho> | levelbot: y u say it twice |
00:06:23
| <dominictarr> | hij1nx: merged into 4.1.8 |
00:06:49
| <levelbot> | [npm] level-hooks@4.1.8 <http://npm.im/level-hooks>: pre/post hooks for leveldb |
00:07:12
| <dominictarr> | hmm, npm updates each doc several times to publish |
00:07:17
| <rvagg> | mbalho: did you --force publish or something? |
00:07:23
| <dominictarr> | once to update metadata, then to upload |
00:07:37
| <dominictarr> | maybe the publish was just slow. |
00:07:40
| <rvagg> | he should only pick up on each specific publish & unpublish |
00:07:59
| <rvagg> | mind you, on unpublish he'll just blurt out the latest version so that's a bit opaque |
00:08:19
| <dominictarr> | rvagg: are you using follow, or just hitting the _changes feed |
00:08:36
| <mbalho> | rvagg: nope just published once |
00:09:40
| <rvagg> | dominictarr: https://github.com/rvagg/node-npm-publish-stream - uses http://isaacs.iriscouch.com/registry/_design/app/_view/updated?include_docs=true&startkey={DATE} |
00:09:57
| <rvagg> | updated view lists ordered by publish date |
00:10:07
| <rvagg> | tiny data set, easy to poll |
00:10:14
| <dominictarr> | right |
00:12:34
| * levelbot | quit (Remote host closed the connection) |
00:12:53
| * levelbot | joined |
00:12:54
| <levelbot> | [npm] level-js@1.0.0 <http://npm.im/level-js>: leveldown/leveldb library for browsers |
00:12:54
| <levelbot> | [npm] level-hooks@4.1.8 <http://npm.im/level-hooks>: pre/post hooks for leveldb |
00:13:15
| <rvagg> | ookkaayy... maybe he's getting it wrong ? |
00:13:36
| <mbalho> | levelbot: you're drunk, go home |
00:15:20
| <rvagg> | mm, he's going to regurgitate that I reckon, {"id":"level-js","key":"2013-05-03T23:54:02.934Z","value":1}, i.e. that was a while ago |
00:18:50
| <rvagg> | mbalho: https://github.com/rvagg/node-abstract-leveldown/pull/4 |
00:19:31
| <mbalho> | rvagg: cool will test |
00:19:41
| <mbalho> | lolz bufferificationifying |
00:20:28
| <mbalho> | rvagg: yep all my stuff still passes |
00:20:38
| <mbalho> | rvagg: sorry i took those out |
00:21:06
| <rvagg> | np, will mergifyicate |
00:21:27
| <hij1nx> | dominictarr: cool. the patch that i added isn't supposed to address anything other than the case where you are saying 1. I want to do something else, 2. I dont care about adding to the batch, 3. dont veto this put |
00:22:11
| <dominictarr> | you can do add(false) |
00:22:23
| <dominictarr> | which mean cancel this item. |
00:22:56
| <mbalho> | rvagg: can you give me the etymology of awesomodulme |
00:22:57
| <levelbot> | [npm] abstract-leveldown@0.2.0 <http://npm.im/abstract-leveldown>: An abstract prototype matching the LevelDOWN API |
00:23:03
| <mbalho> | woot |
00:23:24
| <hij1nx> | dominictarr: you cant do add(false) because that cancels the item |
00:23:46
| <rvagg> | mbalho: heh, googled for a reference and found it |
00:23:49
| <rvagg> | mbalho: wasn't me! |
00:24:02
| <dominictarr> | you want to veto the whole batch? |
00:24:19
| <hij1nx> | dominictarr: i dont want to veto anything |
00:24:34
| <dominictarr> | oh, right. so you just return and don't call add() |
00:25:20
| <hij1nx> | dominictarr: what if I want add to be async? |
00:25:34
| <hij1nx> | dominictarr: anyway, what im saying is that add should be async |
00:25:50
| <dominictarr> | agree, but it isn't like that currently |
00:25:57
| <hij1nx> | dominictarr: otherwise its not very useful |
00:26:16
| <levelbot> | [npm] level-js@1.0.0 <http://npm.im/level-js>: leveldown/leveldb library for browsers using IndexedDB |
00:26:22
| <mbalho> | (that was a publish -f) |
00:26:24
| <dominictarr> | it's still useful, but not as useful, maybe... |
00:26:31
| <dominictarr> | but much less complex also. |
00:26:33
| <rvagg> | mbalho: heh, was just about killall BOT |
00:27:38
| <mbalho> | rvagg: mayeb add memdown too? |
00:27:59
| <hij1nx> | dominictarr: i also assumed it was async and didnt read all the code, but you're saying you didnt make it that because you think it would be too complex to buffer other inbound operations? |
00:28:16
| <rvagg> | mbalho: ah yeah, that started off as a proof-of-concept but it's actually pretty neat |
00:28:41
| <dominictarr> | hij1nx: that is correct. |
00:29:18
| <dominictarr> | but mainly because that was what I needed to get map-reduce to work, which was what I was working towards at the time. |
00:29:20
| <hij1nx> | dominictarr: ok, so maybe i'll write an incr module |
00:29:45
| <hij1nx> | dominictarr: or... level-extend |
00:30:05
| <dominictarr> | I'm keen to make hook async |
00:30:15
| <dominictarr> | rvagg and I have been discussing this |
00:31:07
| <hij1nx> | any ideas so far for keeping it atomic? |
00:31:11
| <dominictarr> | I'm just saying that it I didn't make it async to begin with, because it was out of scope |
00:31:26
| <dominictarr> | yeah - so it would need to lock all the keys in the batch |
00:31:38
| <dominictarr> | until the batch is processed |
00:33:23
| <hij1nx> | dominictarr: hmm, if the keys are locked, how would a server handle concurrent requests to the same keys? |
00:33:28
| <hij1nx> | buffering? |
00:33:45
| <hij1nx> | buffering is pretty unsafe |
00:33:48
| <dominictarr> | letting gets through is probably okay |
00:33:52
| <hij1nx> | that was what i tried today |
00:34:01
| <dominictarr> | yeah buffering |
00:34:22
| <hij1nx> | hmm... |
00:34:24
| <hij1nx> | brb |
00:34:40
| <dominictarr> | I'm going to bed, let me know how it goes. |
00:34:48
| * dominictarr | quit (Quit: dominictarr) |
00:36:11
| * mrevil | joined |
00:44:36
| * mrevil | quit (Ping timeout: 252 seconds) |
00:54:27
| * st_luke | joined |
00:56:05
| <levelbot> | [npm] abstract-leveldown@0.2.1 <http://npm.im/abstract-leveldown>: An abstract prototype matching the LevelDOWN API |
00:57:55
| <levelbot> | [npm] memdown@0.1.0 <http://npm.im/memdown>: An drop-in replacement for LevelDOWN that works in memory only |
01:35:26
| * werle | joined |
02:05:54
| * levelbot | quit (Remote host closed the connection) |
02:06:26
| * levelbot | joined |
02:18:35
| * mrevil | joined |
02:44:56
| * werle | quit (Quit: Leaving.) |
02:48:23
| <mbalho> | rvagg: whats the story with levelup in the browser? |
03:00:18
| <rvagg> | mbalho: that's your story to write |
03:01:26
| <rvagg> | mbalho: var db = levelup({ db: leveljs }) |
03:01:41
| <rvagg> | you'll have to exclude leveldown from the build tho, or replace it with something |
03:01:55
| <rvagg> | there's a couple of require('leveldown') |
03:02:06
| <rvagg> | 0.9 was going to be the optional-leveldown release but I hit a slight snag |
03:02:13
| <rvagg> | need to post on the 0.9 tracking issue about it |
03:03:17
| <levelbot> | [npm] lev@0.3.3 <http://npm.im/lev>: commandline and REPL access for leveldb |
03:06:08
| <rvagg> | mbalho: hang on and I'll give you some code to work with better |
03:15:17
| <levelbot> | [npm] lev@0.3.3 <http://npm.im/lev>: commandline and REPL access for leveldb |
03:18:43
| * neben | quit (Quit: Page closed) |
03:41:31
| * mrevil | quit (Remote host closed the connection) |
03:58:32
| * werle | joined |
04:05:18
| <rvagg> | https://github.com/rvagg/node-levelup/pull/129#issuecomment-17427325 (mbalho) |
04:05:25
| <mbalho> | woot |
04:06:02
| <rvagg> | let me know how it goes; this will be interesting |
04:10:58
| * ralphtheninja | quit (Ping timeout: 268 seconds) |
04:14:31
| <mbalho> | rvagg: hmm when doing either of these two ways https://github.com/rvagg/node-levelup#leveluplocation-options-callback i get "open() requires a callback argument" |
04:14:42
| <mbalho> | rvagg: db = levelup('foo', { db: require('./') }) |
04:14:50
| <mbalho> | or with a cb at the end |
04:19:10
| <rvagg> | mbalho: that's coming from here: https://github.com/maxogden/level.js/blob/master/index.js#L15 |
04:19:18
| <rvagg> | level.js needs to accept options as the first argument to open() |
04:19:26
| <rvagg> | that's obviously not in the abstract-leveldown tests eh? |
04:20:28
| <rvagg> | mbalho: no, it is, there's a few tests for it, see https://github.com/rvagg/node-abstract-leveldown/blob/master/abstract/open-test.js#L43 |
04:20:34
| * st_luke | quit (Read error: Connection reset by peer) |
04:21:00
| <rvagg> | mbalho: you're just testing .args(), perhaps you should run all open() tests: https://github.com/maxogden/level.js/blob/master/test.js#L14 |
04:21:13
| * st_luke | joined |
04:21:40
| <rvagg> | tho the tests might need adjusting for the errorIfExists:true case I suppose.. |
04:22:33
| <rvagg> | anyway! the point is that levelup won't ever call open() without an options first argument, callback second |
04:26:26
| <levelbot> | [npm] abstract-leveldown@0.2.2 <http://npm.im/abstract-leveldown>: An abstract prototype matching the LevelDOWN API |
04:26:29
| <rvagg> | ok, abstract-leveldown@0.2.2, use that and put in require('abstract-leveldown/abstract/open-test').open(factory, tape, testCommon) in your test file |
04:28:32
| <rvagg> | scratch that |
04:28:53
| <rvagg> | it shouldn't have to deal with optional arguments, it *must* accept a options argument as the first arg |
04:28:56
| <levelbot> | [npm] abstract-leveldown@0.2.3 <http://npm.im/abstract-leveldown>: An abstract prototype matching the LevelDOWN API |
04:31:06
| * rvagg | does a PR |
04:34:43
| <rvagg> | grr.. that's not right either |
04:34:45
| <rvagg> | crud |
04:34:56
| <mbalho> | rvagg: oh oops |
04:35:03
| <rvagg> | needs to be optional |
04:35:05
| <mbalho> | rvagg: i just copied the parts of abstract leveldown that memdown were using IIRC |
04:36:28
| <mbalho> | rvagg: but i should probably test all the abstract ones eh |
04:36:34
| <rvagg> | ohhhh |
04:36:38
| <rvagg> | _open, not open |
04:36:39
| <rvagg> | hang on |
04:42:03
| * mrevil | joined |
04:46:43
| * mrevil | quit (Ping timeout: 260 seconds) |
04:55:16
| <levelbot> | [npm] abstract-leveldown@0.3.0 <http://npm.im/abstract-leveldown>: An abstract prototype matching the LevelDOWN API |
04:57:44
| <rvagg> | mbalho: https://github.com/maxogden/level.js/pull/5 |
04:57:45
| <rvagg> | boom |
04:58:32
| <rvagg> | not sure if require('util') is kosher in browserify tho |
04:58:43
| <mbalho> | yae it is |
04:58:45
| <rvagg> | just for inherits |
04:58:51
| <mbalho> | oh nice util.inherits(Level, AbstractLevelDOWN) |
04:58:59
| <mbalho> | some people require('inherits') |
04:59:02
| <mbalho> | but i dont really care |
04:59:17
| <mbalho> | util is slightly larger than inherits but with inherits you have to add a dep |
05:01:06
| <levelbot> | [npm] memdown@0.1.1 <http://npm.im/memdown>: An drop-in replacement for LevelDOWN that works in memory only |
05:01:11
| <rvagg> | ya, so all your validation cruft is done by AbstractLevelDOWN now and you don't need to worry about optional arguments, types and whatever, that was the original goal of AbstractLevelDOWN anyway |
05:01:36
| <mbalho> | cool |
05:01:42
| <mbalho> | i think i knew that but forgot |
05:01:47
| <rvagg> | you have your own custom _isBuffer() and _checkKeyValue() which made it complicated, so I just exposed them up the chain for you to override them |
05:02:27
| <mbalho> | coooool levelup inits now |
05:02:39
| <rvagg> | excellent! |
05:02:47
| <mbalho> | now how do i hook up the levelup tests... |
05:02:56
| <rvagg> | ugh |
05:03:07
| <mbalho> | haha |
05:03:25
| <rvagg> | that's tricky cause they *were* buster tests which should be ok in the browser, now they are buster-move tests cause buster was broken in 0.10, buster-move uses tap, but it could be switched to tape |
05:03:35
| <rvagg> | but buster now works again in node 0.10 but I haven't tried it |
05:03:54
| <rvagg> | Raynos wanted buster-move to use tape instead of tap so I'm cool with that |
05:03:55
| <mbalho> | wow |
05:04:10
| <mbalho> | attack of the testing modules |
05:04:13
| <rvagg> | .. but they're not exposed as nicely as abstract-leveldown |
05:04:27
| <mbalho> | gotcha |
05:04:28
| <rvagg> | ANYWAY, in theory if you have a working leveldown API then it should just work |
05:04:36
| <mbalho> | yea |
05:04:41
| <mbalho> | ill try some stuff |
05:04:54
| <rvagg> | if I were you I'd just implement some very basic tests for each feature just to make sure |
05:15:18
| <mbalho> | rvagg: is this chanining API accurate? https://github.com/rvagg/node-levelup#dbcreatewritestreamoptions |
05:16:32
| * Pwnna | quit (Ping timeout: 256 seconds) |
05:19:21
| <mbalho> | rvagg: also if you just do 'db.createWriteStream()' should it spit out all rows? |
05:19:36
| <mbalho> | rvagg: i meant ReadStream |
05:26:39
| <mbalho> | rvagg: ahhh it was cause levelup was passing -1 as the limit |
05:26:56
| <mbalho> | rvagg: ill just do this._limit && this._limit > 0 in level.js |
05:35:48
| <rvagg> | yes, that chaining API should be accurate |
05:36:44
| <mbalho> | rvagg: k, cause it was setting something to an Error when i copy pasted it, so i put the stream instance in front of all method calls and it started working |
05:37:04
| <rvagg> | mm.. yeah, there's something up |
05:37:16
| <rvagg> | maybe .write() doesn't return an instance |
05:37:18
| * rvagg | checks |
05:37:46
| <rvagg> | oh right.. of course |
05:37:52
| <rvagg> | .write() returns a boolean on standard streams |
05:37:52
| <rvagg> | doh |
05:37:56
| * rvagg | fixes the example |
05:39:25
| <mbalho> | heh |
05:40:05
| <mbalho> | ok so writeStream and readStream and keyStream and valueStream work |
05:41:09
| <mbalho> | and batch |
05:41:14
| <mbalho> | and get and put |
05:41:16
| <mbalho> | woot |
05:41:50
| <rvagg> | fixed |
05:41:55
| <rvagg> | example |
05:42:24
| <rvagg> | tho dominic reckons I should use 'end' events in stream examples, he's probably right |
05:42:56
| <rvagg> | mbalho: pull in sublevel, or map-reduce and do something crazy and see if it still works |
05:43:19
| <mbalho> | heh |
05:47:26
| <levelbot> | [npm] level-js@1.0.1 <http://npm.im/level-js>: leveldown/leveldb library for browsers using IndexedDB |
07:49:28
| * dominictarr | joined |
07:49:38
| * st_luke | quit (Remote host closed the connection) |
07:50:14
| * st_luke | joined |
07:58:34
| <juliangruber> | mbalho: https://github.com/chrisdickinson/bops |
08:40:13
| * werle | quit (Quit: Leaving.) |
09:05:12
| <Raynos> | rvagg: tape works in 0.10 now :) |
09:05:28
| * dominictarr | quit (Quit: dominictarr) |
09:08:57
| * werle | joined |
09:31:20
| <rvagg> | Raynos: yeah, saw that, great news |
09:31:33
| <rvagg> | now it just needs t.type() and a few other goodies to nicify it a bit more |
10:15:53
| * ralphtheninja | joined |
10:16:48
| * ralphtheninja | quit (Client Quit) |
10:16:54
| * ralphthe1inja | joined |
10:45:44
| * st_luke | quit (Remote host closed the connection) |
12:33:19
| * werle | quit (Quit: Leaving.) |
12:37:33
| * dominictarr | joined |
12:38:31
| * ralphthe1inja | changed nick to ralphtheninja |
14:01:19
| <dominictarr> | rvagg: hij1nx so what if you just replicated the shopping cart to the client? then you could process it lazily and the need for reliability in the server is much reduced. |
15:17:58
| * levelbot | quit (Remote host closed the connection) |
15:18:17
| * levelbot | joined |
15:19:11
| * levelbot | quit (Remote host closed the connection) |
15:19:30
| * levelbot | joined |
15:20:24
| * levelbot | quit (Remote host closed the connection) |
15:20:40
| * levelbot | joined |
16:35:58
| * mrevil | joined |
16:40:54
| * mrevil | quit (Ping timeout: 264 seconds) |
16:58:37
| <mbalho> | dominictarr: does multilevel do sync or just one off replications? |
16:58:55
| <dominictarr> | it's just a client |
16:59:17
| <dominictarr> | github.com/dominictarr/level-master |
16:59:22
| <dominictarr> | that does sync |
16:59:31
| <dominictarr> | but you need two way sync... |
16:59:31
| <dominictarr> | no, |
16:59:38
| <dominictarr> | you make the server the slave. |
17:00:59
| <dominictarr> | this has been on my todo list, though. |
17:01:12
| <dominictarr> | problem is that my todo list is so wide... |
17:01:38
| <mbalho> | hah |
17:02:10
| <mbalho> | why isnt your to do list in a gist or something? |
17:02:40
| <dominictarr> | aha. it should be. |
17:03:09
| <mbalho> | or at the bottom of this https://github.com/rvagg/node-levelup/wiki/Modules |
17:05:20
| * Pwnna | joined |
17:06:07
| <dominictarr> | I'm writing a gist just now |
17:14:46
| * ultimatebuster | joined |
17:16:20
| * Pwnna | quit (Disconnected by services) |
17:24:04
| <dominictarr> | mbalho: here is a short list |
17:24:05
| <dominictarr> | https://gist.github.com/dominictarr/5518153 |
17:24:20
| <dominictarr> | the rest is stashed some where in my subconcious |
17:24:48
| <dominictarr> | some of those are in progress |
17:29:05
| <mbalho> | dominictarr: sweet! |
17:29:26
| <dominictarr> | there is probably twice as much as that, really |
17:29:43
| <mbalho> | dominictarr: im gonna use browerified levelup to store data in browser for my video game hosting thing now |
17:30:01
| <dominictarr> | sweet - |
17:30:02
| <mbalho> | dominictarr: the parts that i'm interested in that are missing is a way to sync the binary data to a server and replicate it into your browser |
17:30:08
| <dominictarr> | I am working on the server part for you |
17:30:11
| <mbalho> | dominictarr: woot |
17:30:18
| <dominictarr> | but it's the weekend right now |
17:30:26
| <dominictarr> | so I work on mad science to relax |
17:30:49
| <mbalho> | youre so corporate lately |
17:30:51
| <mbalho> | :P |
17:32:15
| <mbalho> | https://github.com/tonistiigi/uint8 |
17:39:06
| * ultimatebuster | changed nick to Pwnna |
18:36:27
| <levelbot> | [npm] level-js@1.0.2 <http://npm.im/level-js>: leveldown/leveldb library for browsers using IndexedDB |
18:36:40
| <mbalho> | rvagg: feature request for levelbot: also put last git commit in the message when a new version is released |
18:48:03
| * Pwnna | quit (Ping timeout: 245 seconds) |
18:52:45
| <owen1> | i just found out about level.js. what's the main usecase for it as oppose to using indexedDB? is it for offline apps that need synching? |
18:53:24
| <mbalho> | indexeddb doesnt work with any of the `npm search level` stuff |
18:54:18
| <owen1> | ok. so it lets me use the rich eco-system around leveldb |
18:54:29
| <mbalho> | yep exactly, its just so you can write code that works in browser and in node |
18:54:47
| <mbalho> | also the indexeddb api is crazy and nobody in their right mind would prefer it :D |
18:54:53
| <mbalho> | i found out it was designed by orace |
18:54:55
| <mbalho> | oracle* |
19:01:59
| * Pwnna | joined |
19:03:31
| <owen1> | ahhah |
19:03:43
| <owen1> | now it all make sense (: |
19:17:48
| * Pwnna | quit (Ping timeout: 256 seconds) |
19:47:17
| * Pwnna | joined |
20:15:03
| * mrevil | joined |
20:29:07
| * chrisdickinson | joined |
20:29:19
| <chrisdickinson> | o/ |
20:29:35
| <mbalho> | rvagg: cross env buffer abstraction: https://github.com/chrisdickinson/bops |
21:11:39
| * Pwnna | quit (Ping timeout: 252 seconds) |
21:20:22
| <mbalho> | chrisdickinson: any reason you didnt use the Buffer API exactly for bops? |
21:20:40
| <chrisdickinson> | mbalho: how so? |
21:20:53
| <chrisdickinson> | (the `from` / `to` stuff? or `subarray` vs. `slice`?) |
21:20:57
| <mbalho> | chrisdickinson: i think if buffer-browserify got rewritten using typed arrays it could be awesome, only diff from node is that .slice would be a copy and they'd be 0 filled |
21:21:29
| <chrisdickinson> | so, the problem with buffer-browserify is that it has to work anywhere browserify works |
21:21:33
| <chrisdickinson> | i.e., in places with no typed arrays |
21:21:44
| <chrisdickinson> | (hah, "i.e." -> "IE") |
21:21:55
| <chrisdickinson> | bops is typed-array centric in the browser |
21:22:08
| <chrisdickinson> | and that .slice-being-a-copy thing is a real killer |
21:22:19
| <chrisdickinson> | typed arrays support .subarray |
21:22:40
| <chrisdickinson> | and i decided to go with that naming since that's really what's going on (even with Buffer objects) |
21:22:55
| <chrisdickinson> | ("slice" implies a copy) |
21:23:50
| <chrisdickinson> | plus, to base buffer on top of typed arrays in browserify, you'd have to do some pretty hacky stuff |
21:24:03
| <chrisdickinson> | (particularly stuff that could negate the perf improvement down the line) |
21:24:32
| <chrisdickinson> | (you'd have to pull a Uint8Array constructor out from another realm, decorate its proto -- which there's been talk of not doing any optimizations for "modified" typed arrays) |
21:32:10
| <mbalho> | chrisdickinson: it could feature detect if typed arrays and use a typed array backend else use the current Object based implementation |
21:39:04
| * mrevil | quit (Remote host closed the connection) |
21:44:17
| <mbalho> | chrisdickinson: ah but i guess its a dealbreaker that we cant make [] fast |
21:44:32
| <chrisdickinson> | yeah ): |
21:44:33
| <mbalho> | chrisdickinson: saac says there used to be .get(index) and .set(index) but they took em out |
21:45:03
| <mbalho> | issaac |
21:45:04
| <chrisdickinson> | also, typed arrays work so much better with the native dom apis |
21:45:42
| <chrisdickinson> | and if we did a mixed-mode approach -- basing buffer on typed arrays where available, and on arrays where not -- suddenly you couldn't rely on a given behavior when giving a "buffer" to a native api |
21:46:01
| <chrisdickinson> | it's kind of a horrible (having to do something like bops) |
21:46:05
| <mbalho> | ahh |
21:46:06
| <chrisdickinson> | but hopefully it's relatively painless |
22:08:55
| * Pwnna | joined |
22:24:18
| * st_luke | joined |
22:35:00
| * st_luke | quit (Remote host closed the connection) |
22:39:48
| * mrevil | joined |
22:47:21
| * mrevil | quit (Ping timeout: 252 seconds) |
23:44:07
| * mrevil | joined |
23:48:57
| * mrevil | quit (Ping timeout: 276 seconds) |