Discussion:
[urbit] I made a thing!
c***@gmail.com
2015-12-24 00:50:56 UTC
Permalink
https://github.com/chc4/urporn

It's an image upload site powered by urbit! I stole half of it from /paste,
but that's OK.

Currently it's usable, but has some weird bugs I don't know how to fix.
Uploading an image reloads the page after the urb.send for some reason I
don't understand, along with the callback having err set even though the
host ship processes the moves fine. I also managed to sink my ship by
trying to use it via urbit.org and uploading a big picture: it's now just
stuck spinning at <<ames>> and bail: meme's if I let it run.

Next up is adding custom titles to show in the feed and supporting voting
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Henry
2015-12-24 02:36:20 UTC
Permalink
Nice!

Sent from my iPhone
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from /paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to fix. Uploading an image reloads the page after the urb.send for some reason I don't understand, along with the callback having err set even though the host ship processes the moves fine. I also managed to sink my ship by trying to use it via urbit.org and uploading a big picture: it's now just stuck spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting voting on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google Groups "urbit" group.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Curtis Yarvin
2015-12-24 06:45:48 UTC
Permalink
That's awesome! Well, except it's sad about your ship.

I can't speak to the reload bug; Anton or Galen will need to look at
that. I could speak to the ames bug but I prefer to debug it in the
once and future ames...
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from /paste,
but that's OK.
Currently it's usable, but has some weird bugs I don't know how to fix.
Uploading an image reloads the page after the urb.send for some reason I
don't understand, along with the callback having err set even though the
host ship processes the moves fine. I also managed to sink my ship by trying
to use it via urbit.org and uploading a big picture: it's now just stuck
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting voting on
images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2016-01-14 06:19:35 UTC
Permalink
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting to
upload a large picture via the haptem-fopnys.urbit.org mirror causes the
nginx mirror to respond with "413 Request Entity Too Large", because I have
to have the entire picture in the JSON body instead of being able to stream
it. I suppose I could cut the pokes into chunks, but there's the slight
problem where when I uploaded a slightly smaller image I bail: meme'd
again. My code is trying to un-base64 the file that is poked, but the
parser combinator is 1) very slow (stuck at 100% for a while) 2) eventually
uses up so much memory that it memes. And I'm not sure cutting it into
multiple parts would help any.

Might have to wait for stuff to settle down a bit :(
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to fix.
Uploading an image reloads the page after the urb.send for some reason I
don't understand, along with the callback having err set even though the
host ship processes the moves fine. I also managed to sink my ship by
trying to use it via urbit.org and uploading a big picture: it's now just
stuck spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting voting
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Curtis Yarvin
2016-01-14 06:31:06 UTC
Permalink
Hm, using a parser combinator is not exactly how I'd do base64
decoding of something giant. It shouldn't be O(n) in the input size
but it wouldn't shock me if it is. Probably doing it by hand would be
10 lines of code or less? Also, as a common tool for handling MIME
encoded stuff, it certainly deserves a jet. Just sayin' ;-)
Post by c***@gmail.com
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting to
upload a large picture via the haptem-fopnys.urbit.org mirror causes the
nginx mirror to respond with "413 Request Entity Too Large", because I have
to have the entire picture in the JSON body instead of being able to stream
it. I suppose I could cut the pokes into chunks, but there's the slight
problem where when I uploaded a slightly smaller image I bail: meme'd again.
My code is trying to un-base64 the file that is poked, but the parser
combinator is 1) very slow (stuck at 100% for a while) 2) eventually uses up
so much memory that it memes. And I'm not sure cutting it into multiple
parts would help any.
Might have to wait for stuff to settle down a bit :(
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to fix.
Uploading an image reloads the page after the urb.send for some reason I
don't understand, along with the callback having err set even though the
host ship processes the moves fine. I also managed to sink my ship by trying
to use it via urbit.org and uploading a big picture: it's now just stuck
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting voting
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Anton Dyudin
2016-01-14 07:02:41 UTC
Permalink
I thought we had sifo/ofis? Though those probably still aren't jetted yeah.
(Also how would you propose decoding to be sub- O(n))
Post by Curtis Yarvin
Hm, using a parser combinator is not exactly how I'd do base64
decoding of something giant. It shouldn't be O(n) in the input size
but it wouldn't shock me if it is. Probably doing it by hand would be
10 lines of code or less? Also, as a common tool for handling MIME
encoded stuff, it certainly deserves a jet. Just sayin' ;-)
Post by c***@gmail.com
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting to
upload a large picture via the haptem-fopnys.urbit.org mirror causes the
nginx mirror to respond with "413 Request Entity Too Large", because I
have
Post by c***@gmail.com
to have the entire picture in the JSON body instead of being able to
stream
Post by c***@gmail.com
it. I suppose I could cut the pokes into chunks, but there's the slight
problem where when I uploaded a slightly smaller image I bail: meme'd
again.
Post by c***@gmail.com
My code is trying to un-base64 the file that is poked, but the parser
combinator is 1) very slow (stuck at 100% for a while) 2) eventually
uses up
Post by c***@gmail.com
so much memory that it memes. And I'm not sure cutting it into multiple
parts would help any.
Might have to wait for stuff to settle down a bit :(
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to fix.
Uploading an image reloads the page after the urb.send for some reason I
don't understand, along with the callback having err set even though the
host ship processes the moves fine. I also managed to sink my ship by
trying
Post by c***@gmail.com
Post by c***@gmail.com
to use it via urbit.org and uploading a big picture: it's now just
stuck
Post by c***@gmail.com
Post by c***@gmail.com
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting
voting
Post by c***@gmail.com
Post by c***@gmail.com
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google Groups
"urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:;>.
Post by c***@gmail.com
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:;>.
For more options, visit https://groups.google.com/d/optout.
--
Cabmold delenda est
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Anton Dyudin
2016-01-14 07:06:48 UTC
Permalink
Ah okay O(n) space, all of the parsed bits are going to stick around as
callbacks until you have something to cons them to yes. Perhaps bass avoids
this problem?
Post by Anton Dyudin
I thought we had sifo/ofis? Though those probably still aren't jetted yeah.
(Also how would you propose decoding to be sub- O(n))
Post by Curtis Yarvin
Hm, using a parser combinator is not exactly how I'd do base64
decoding of something giant. It shouldn't be O(n) in the input size
but it wouldn't shock me if it is. Probably doing it by hand would be
10 lines of code or less? Also, as a common tool for handling MIME
encoded stuff, it certainly deserves a jet. Just sayin' ;-)
Post by c***@gmail.com
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting to
upload a large picture via the haptem-fopnys.urbit.org mirror causes
the
Post by c***@gmail.com
nginx mirror to respond with "413 Request Entity Too Large", because I
have
Post by c***@gmail.com
to have the entire picture in the JSON body instead of being able to
stream
Post by c***@gmail.com
it. I suppose I could cut the pokes into chunks, but there's the slight
problem where when I uploaded a slightly smaller image I bail: meme'd
again.
Post by c***@gmail.com
My code is trying to un-base64 the file that is poked, but the parser
combinator is 1) very slow (stuck at 100% for a while) 2) eventually
uses up
Post by c***@gmail.com
so much memory that it memes. And I'm not sure cutting it into multiple
parts would help any.
Might have to wait for stuff to settle down a bit :(
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to fix.
Uploading an image reloads the page after the urb.send for some reason
I
Post by c***@gmail.com
Post by c***@gmail.com
don't understand, along with the callback having err set even though
the
Post by c***@gmail.com
Post by c***@gmail.com
host ship processes the moves fine. I also managed to sink my ship by
trying
Post by c***@gmail.com
Post by c***@gmail.com
to use it via urbit.org and uploading a big picture: it's now just
stuck
Post by c***@gmail.com
Post by c***@gmail.com
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting
voting
Post by c***@gmail.com
Post by c***@gmail.com
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google
Groups
Post by c***@gmail.com
"urbit" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by c***@gmail.com
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Cabmold delenda est
--
Cabmold delenda est
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Anton Dyudin
2016-01-14 07:13:23 UTC
Permalink
—wait no storing the /result/ still necessitates O(n) space. Though I
suppose there is a meaningful distinction between like 5 cons pairs per
character vs. bits in an atom.

(I think the actual problem here is going to be trailing/leading zeroes)
Post by Anton Dyudin
Ah okay O(n) space, all of the parsed bits are going to stick around as
callbacks until you have something to cons them to yes. Perhaps bass avoids
this problem?
Post by Anton Dyudin
I thought we had sifo/ofis? Though those probably still aren't jetted yeah.
(Also how would you propose decoding to be sub- O(n))
Post by Curtis Yarvin
Hm, using a parser combinator is not exactly how I'd do base64
decoding of something giant. It shouldn't be O(n) in the input size
but it wouldn't shock me if it is. Probably doing it by hand would be
10 lines of code or less? Also, as a common tool for handling MIME
encoded stuff, it certainly deserves a jet. Just sayin' ;-)
Post by c***@gmail.com
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting to
upload a large picture via the haptem-fopnys.urbit.org mirror causes
the
Post by c***@gmail.com
nginx mirror to respond with "413 Request Entity Too Large", because I
have
Post by c***@gmail.com
to have the entire picture in the JSON body instead of being able to
stream
Post by c***@gmail.com
it. I suppose I could cut the pokes into chunks, but there's the slight
problem where when I uploaded a slightly smaller image I bail: meme'd
again.
Post by c***@gmail.com
My code is trying to un-base64 the file that is poked, but the parser
combinator is 1) very slow (stuck at 100% for a while) 2) eventually
uses up
Post by c***@gmail.com
so much memory that it memes. And I'm not sure cutting it into multiple
parts would help any.
Might have to wait for stuff to settle down a bit :(
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to
fix.
Post by c***@gmail.com
Post by c***@gmail.com
Uploading an image reloads the page after the urb.send for some
reason I
Post by c***@gmail.com
Post by c***@gmail.com
don't understand, along with the callback having err set even though
the
Post by c***@gmail.com
Post by c***@gmail.com
host ship processes the moves fine. I also managed to sink my ship by
trying
Post by c***@gmail.com
Post by c***@gmail.com
to use it via urbit.org and uploading a big picture: it's now just
stuck
Post by c***@gmail.com
Post by c***@gmail.com
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting
voting
Post by c***@gmail.com
Post by c***@gmail.com
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google
Groups
Post by c***@gmail.com
"urbit" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by c***@gmail.com
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
Cabmold delenda est
--
Cabmold delenda est
--
Cabmold delenda est
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2016-01-14 07:16:37 UTC
Permalink
It also makes me slightly wary of the initial ot:jo parsing. Even if the
base64 decoding is fine and jetted, the json reparsing wouldn't be. It
looks like I'm actually doing /two/ span -> tape -> span roundtrips, in
that case, since json reparsing also trips for parser combinators.
Post by Anton Dyudin
Ah okay O(n) space, all of the parsed bits are going to stick around as
callbacks until you have something to cons them to yes. Perhaps bass avoids
this problem?
Post by Anton Dyudin
I thought we had sifo/ofis? Though those probably still aren't jetted yeah.
(Also how would you propose decoding to be sub- O(n))
Post by Curtis Yarvin
Hm, using a parser combinator is not exactly how I'd do base64
decoding of something giant. It shouldn't be O(n) in the input size
but it wouldn't shock me if it is. Probably doing it by hand would be
10 lines of code or less? Also, as a common tool for handling MIME
encoded stuff, it certainly deserves a jet. Just sayin' ;-)
Post by c***@gmail.com
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting to
upload a large picture via the haptem-fopnys.urbit.org mirror causes
the
Post by c***@gmail.com
nginx mirror to respond with "413 Request Entity Too Large", because I
have
Post by c***@gmail.com
to have the entire picture in the JSON body instead of being able to
stream
Post by c***@gmail.com
it. I suppose I could cut the pokes into chunks, but there's the slight
problem where when I uploaded a slightly smaller image I bail: meme'd
again.
Post by c***@gmail.com
My code is trying to un-base64 the file that is poked, but the parser
combinator is 1) very slow (stuck at 100% for a while) 2) eventually
uses up
Post by c***@gmail.com
so much memory that it memes. And I'm not sure cutting it into multiple
parts would help any.
Might have to wait for stuff to settle down a bit :(
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to
fix.
Post by c***@gmail.com
Post by c***@gmail.com
Uploading an image reloads the page after the urb.send for some
reason I
Post by c***@gmail.com
Post by c***@gmail.com
don't understand, along with the callback having err set even though
the
Post by c***@gmail.com
Post by c***@gmail.com
host ship processes the moves fine. I also managed to sink my ship by
trying
Post by c***@gmail.com
Post by c***@gmail.com
to use it via urbit.org and uploading a big picture: it's now just
stuck
Post by c***@gmail.com
Post by c***@gmail.com
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting
voting
Post by c***@gmail.com
Post by c***@gmail.com
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google
Groups
Post by c***@gmail.com
"urbit" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by c***@gmail.com
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
Cabmold delenda est
--
Cabmold delenda est
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Anton Dyudin
2016-01-14 07:22:56 UTC
Permalink
ot:jo does not involve a round trip, though there is one incurred from httr
cord -> tape -> `json`[%s 'foo'], and one from that -> tape for base64
parsing -> back to mime at some point, yes.
Post by c***@gmail.com
It also makes me slightly wary of the initial ot:jo parsing. Even if the
base64 decoding is fine and jetted, the json reparsing wouldn't be. It
looks like I'm actually doing /two/ span -> tape -> span roundtrips, in
that case, since json reparsing also trips for parser combinators.
Post by Anton Dyudin
Ah okay O(n) space, all of the parsed bits are going to stick around as
callbacks until you have something to cons them to yes. Perhaps bass avoids
this problem?
Post by Anton Dyudin
I thought we had sifo/ofis? Though those probably still aren't jetted yeah.
(Also how would you propose decoding to be sub- O(n))
Post by Curtis Yarvin
Hm, using a parser combinator is not exactly how I'd do base64
decoding of something giant. It shouldn't be O(n) in the input size
but it wouldn't shock me if it is. Probably doing it by hand would be
10 lines of code or less? Also, as a common tool for handling MIME
encoded stuff, it certainly deserves a jet. Just sayin' ;-)
Post by c***@gmail.com
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting to
upload a large picture via the haptem-fopnys.urbit.org mirror causes
the
Post by c***@gmail.com
nginx mirror to respond with "413 Request Entity Too Large", because
I have
Post by c***@gmail.com
to have the entire picture in the JSON body instead of being able to
stream
Post by c***@gmail.com
it. I suppose I could cut the pokes into chunks, but there's the
slight
Post by c***@gmail.com
problem where when I uploaded a slightly smaller image I bail: meme'd
again.
Post by c***@gmail.com
My code is trying to un-base64 the file that is poked, but the parser
combinator is 1) very slow (stuck at 100% for a while) 2) eventually
uses up
Post by c***@gmail.com
so much memory that it memes. And I'm not sure cutting it into
multiple
Post by c***@gmail.com
parts would help any.
Might have to wait for stuff to settle down a bit :(
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to
fix.
Post by c***@gmail.com
Post by c***@gmail.com
Uploading an image reloads the page after the urb.send for some
reason I
Post by c***@gmail.com
Post by c***@gmail.com
don't understand, along with the callback having err set even though
the
Post by c***@gmail.com
Post by c***@gmail.com
host ship processes the moves fine. I also managed to sink my ship
by trying
Post by c***@gmail.com
Post by c***@gmail.com
to use it via urbit.org and uploading a big picture: it's now just
stuck
Post by c***@gmail.com
Post by c***@gmail.com
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting
voting
Post by c***@gmail.com
Post by c***@gmail.com
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google
Groups
Post by c***@gmail.com
"urbit" group.
To unsubscribe from this group and stop receiving emails from it,
send an
Post by c***@gmail.com
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
Cabmold delenda est
--
Cabmold delenda est
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
For more options, visit https://groups.google.com/d/optout.
--
Cabmold delenda est
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2016-01-14 07:34:13 UTC
Permalink
Ah, ok. That's not bad - if the only roundtrip that has to happen is for
the initial json parsing from %eyre, with my code doing cats for base64
decoding, that's fine and hopefully won't trigger any memes. Gunna have to
add a client-side image size check for the nginx error, though.

I also think trailing zeros would be perfectly fine if you parsed directly
from blob -> octs and had the stream length as the number of non-padding
characters. It's only if you parse to @tas and don't keep how long it
should be that it would throw them away (which, unfortunately, is what my
current code is doing, and requires me to change the jpg/png marks to octs
Post by Anton Dyudin
ot:jo does not involve a round trip, though there is one incurred from
httr cord -> tape -> `json`[%s 'foo'], and one from that -> tape for base64
parsing -> back to mime at some point, yes.
Post by c***@gmail.com
It also makes me slightly wary of the initial ot:jo parsing. Even if the
base64 decoding is fine and jetted, the json reparsing wouldn't be. It
looks like I'm actually doing /two/ span -> tape -> span roundtrips, in
that case, since json reparsing also trips for parser combinators.
Post by Anton Dyudin
Ah okay O(n) space, all of the parsed bits are going to stick around as
callbacks until you have something to cons them to yes. Perhaps bass avoids
this problem?
Post by Anton Dyudin
I thought we had sifo/ofis? Though those probably still aren't jetted yeah.
(Also how would you propose decoding to be sub- O(n))
Post by Curtis Yarvin
Hm, using a parser combinator is not exactly how I'd do base64
decoding of something giant. It shouldn't be O(n) in the input size
but it wouldn't shock me if it is. Probably doing it by hand would be
10 lines of code or less? Also, as a common tool for handling MIME
encoded stuff, it certainly deserves a jet. Just sayin' ;-)
Post by c***@gmail.com
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting
to
Post by c***@gmail.com
upload a large picture via the haptem-fopnys.urbit.org mirror
causes the
Post by c***@gmail.com
nginx mirror to respond with "413 Request Entity Too Large", because
I have
Post by c***@gmail.com
to have the entire picture in the JSON body instead of being able to
stream
Post by c***@gmail.com
it. I suppose I could cut the pokes into chunks, but there's the
slight
meme'd again.
Post by c***@gmail.com
My code is trying to un-base64 the file that is poked, but the parser
combinator is 1) very slow (stuck at 100% for a while) 2) eventually
uses up
Post by c***@gmail.com
so much memory that it memes. And I'm not sure cutting it into
multiple
Post by c***@gmail.com
parts would help any.
Might have to wait for stuff to settle down a bit :(
On Wednesday, December 23, 2015 at 7:50:56 PM UTC-5,
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to
fix.
Post by c***@gmail.com
Post by c***@gmail.com
Uploading an image reloads the page after the urb.send for some
reason I
Post by c***@gmail.com
Post by c***@gmail.com
don't understand, along with the callback having err set even
though the
Post by c***@gmail.com
Post by c***@gmail.com
host ship processes the moves fine. I also managed to sink my ship
by trying
Post by c***@gmail.com
Post by c***@gmail.com
to use it via urbit.org and uploading a big picture: it's now just
stuck
Post by c***@gmail.com
Post by c***@gmail.com
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting
voting
Post by c***@gmail.com
Post by c***@gmail.com
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google
Groups
Post by c***@gmail.com
"urbit" group.
To unsubscribe from this group and stop receiving emails from it,
send an
Post by c***@gmail.com
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
Cabmold delenda est
--
Cabmold delenda est
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Cabmold delenda est
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2016-01-14 07:04:23 UTC
Permalink
Indeed, it would be easy to turn the parser into just an accumulator loop.
I just did it with a combinator since it's more idiomatic, and didn't
expect it to balloon memory use so much. In hindsight, not the best thing
to do when it has to turn the blob into a tape for parsing. I assume the
pointer overhead for all those cells is quite a bit.

I'd hesitate to jet out the parsing, since it doesn't exactly look good for
you to have to patch in a hotpath to the interpreter to be able to run a
toy image uploader, but if it's a common usecase could just go in zuse to
replace ofis...

Even if I do that, though, I would have to limit the uploads quite a bit to
play well with your poor urbit.org ship :P Or at least add chunking to the
uploads.
Post by Curtis Yarvin
Hm, using a parser combinator is not exactly how I'd do base64
decoding of something giant. It shouldn't be O(n) in the input size
but it wouldn't shock me if it is. Probably doing it by hand would be
10 lines of code or less? Also, as a common tool for handling MIME
encoded stuff, it certainly deserves a jet. Just sayin' ;-)
Post by c***@gmail.com
So, uh, I was working on this again today since I haven't been on in
forever, and I'm so sure it's such a great idea anymore. Attempting to
upload a large picture via the haptem-fopnys.urbit.org mirror causes
the
Post by c***@gmail.com
nginx mirror to respond with "413 Request Entity Too Large", because I
have
Post by c***@gmail.com
to have the entire picture in the JSON body instead of being able to
stream
Post by c***@gmail.com
it. I suppose I could cut the pokes into chunks, but there's the slight
problem where when I uploaded a slightly smaller image I bail: meme'd
again.
Post by c***@gmail.com
My code is trying to un-base64 the file that is poked, but the parser
combinator is 1) very slow (stuck at 100% for a while) 2) eventually
uses up
Post by c***@gmail.com
so much memory that it memes. And I'm not sure cutting it into multiple
parts would help any.
Might have to wait for stuff to settle down a bit :(
Post by c***@gmail.com
https://github.com/chc4/urporn
It's an image upload site powered by urbit! I stole half of it from
/paste, but that's OK.
Currently it's usable, but has some weird bugs I don't know how to fix.
Uploading an image reloads the page after the urb.send for some reason
I
Post by c***@gmail.com
Post by c***@gmail.com
don't understand, along with the callback having err set even though
the
Post by c***@gmail.com
Post by c***@gmail.com
host ship processes the moves fine. I also managed to sink my ship by
trying
Post by c***@gmail.com
Post by c***@gmail.com
to use it via urbit.org and uploading a big picture: it's now just
stuck
Post by c***@gmail.com
Post by c***@gmail.com
spinning at <<ames>> and bail: meme's if I let it run.
Next up is adding custom titles to show in the feed and supporting
voting
Post by c***@gmail.com
Post by c***@gmail.com
on images (along with a ship blacklist...)
--
You received this message because you are subscribed to the Google
Groups
Post by c***@gmail.com
"urbit" group.
To unsubscribe from this group and stop receiving emails from it, send
an
<javascript:>.
Post by c***@gmail.com
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "urbit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+***@googlegroups.com.
To post to this group, send email to urbit-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...