The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2017-06-07

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:15 marty joined #mojo
00:19 stryx` joined #mojo
00:44 itaipu joined #mojo
00:47 tchaves joined #mojo
01:01 marty joined #mojo
01:07 marty joined #mojo
01:09 cheako joined #mojo
01:13 cheako joined #mojo
01:23 aborazmeh joined #mojo
02:25 cheako joined #mojo
02:43 noganex_ joined #mojo
02:52 kiwiroy joined #mojo
03:04 cheako joined #mojo
03:06 kiwiroy joined #mojo
03:12 itaipu joined #mojo
03:24 kiwiroy joined #mojo
03:49 kiwiroy joined #mojo
03:54 tencendur joined #mojo
04:04 dboehmer_ joined #mojo
04:14 maschine joined #mojo
05:30 eseyman joined #mojo
05:42 tyldis Is there some more clever way to name anon subs with Mojo than prefix them all with a call to Sub::Util::set_subname?
05:42 disputin joined #mojo
05:43 tyldis Having sub names in my JSON logs helps with context :)
05:43 disputin1 joined #mojo
06:07 disputin joined #mojo
06:07 dod joined #mojo
06:10 inokenty-w joined #mojo
06:13 dod joined #mojo
06:29 logioniz joined #mojo
06:31 logioniz Hi can anyone help with the problem in this topic.
06:31 logioniz https://groups.google.com/forum/#!topic/mojolicious/IT1IYgpnTkg
06:31 logioniz ?
07:07 AndrewIsh joined #mojo
07:12 trone joined #mojo
07:43 Vandal joined #mojo
07:44 dod joined #mojo
08:14 CandyAngel If I am going to make 2 modules, one for a server and one for a client, what naming convention should I go with? ::Service/::ServiceServer or ::ServiceClient/::ServiceServer?
08:15 CandyAngel Or maybe ::Service::Server.. like Mojo::IRC::Server
08:16 arcanez the latter seems sane
08:16 arcanez tim toady.
08:16 purl Iterating over the keys of a hash is like clubbing someone to death with a loaded Uzi
08:18 CandyAngel I wonder if I can use websockets to make a browser-based client actually
08:18 CandyAngel Might be a good chance to learn websocket stuff
08:19 CandyAngel And improve my javascript
08:31 aborazmeh joined #mojo
08:53 prg joined #mojo
08:57 rshadow joined #mojo
09:01 logioniz joined #mojo
09:40 sivoais joined #mojo
09:46 kiwiroy joined #mojo
10:04 salv0 joined #mojo
10:06 kes joined #mojo
10:07 kes maybe someone will be interested in. When I dump   result of $db->query( ... ) with DDP::np I got core dump when script finish
10:11 sri CandyAngel: https://github.com/kraih/mojo-pg/blob/master/examples/chat.pl
10:13 CandyAngel sri: That's what I was going to start with :)
10:17 p1n34ppl3 joined #mojo
10:17 p1n34ppl3 hi
10:17 purl hey, p1n34ppl3.
10:20 coolo someone confused nick name and password?
10:23 sri *******
10:24 batman pineapple :)
10:25 nic hint: try rot13 next time :)
10:25 p1n34ppl3 Hello. I am using the second snippet from http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Non-blocking and I don't know how I could fetch two websites sequentially (they depend on each other) within the $ua->get($url => sub {});. Could you tell me what I could do without making the entire $fetch blocking? Basically I want to run multiple instances of $fetch = sub {}; in parallel. In the
10:25 p1n34ppl3 original code I am using threads which works perfectly but someone told me to use Mojo, so I'd like to make it work using it.
10:26 p1n34ppl3 nic: that's not too different
10:26 nic do you have some minimal example code?
10:26 batman how can you run them in parallell if they depend on each other?
10:26 p1n34ppl3 I'll just use /dev/random
10:27 p1n34ppl3 batman: The inner two gets depend on each other, not the $fetch outer get.
10:27 nic you see, that description doesn't help me visualise it at all
10:28 nic "depend on each other" could mean so many things
10:28 batman p1n34ppl3: is this inside a web app, or in a standalone script?
10:28 logioniz joined #mojo
10:28 p1n34ppl3 executed sequentially, wait till the first get finishes before the second gets get executed
10:28 p1n34ppl3 standalone script
10:28 batman ok. have you looked at "delay" ?
10:29 batman maybe http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Concurrent-blocking-requests could be useful?
10:30 nic p1n34ppl3: If you don't have a running ioloop, just remember to use "->wait"
10:30 nic (which in my head is 'start' :) )
10:30 sri think he wants a delay with 3 steps though, more like this with an added first step http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial#User-agent
10:31 sri and ->wait i suppose
10:32 p1n34ppl3 https://slexy.org/view/s2HZ3hkKbY <- this is the version that works as intended and trying to do the same with the recent snippet from Cookbook#Non-Blocking
10:33 p1n34ppl3 err
10:34 p1n34ppl3 imagine another fetch_parse_tree inside the test
10:34 batman sri: do you remember when you talked about some module that you can run "alien" code in perl? something similar to inline::c
10:34 batman i can't remember the name :/
10:34 nic lol, I was just trying to remember the name of that 30 min ago :)
10:35 nic "the deam of C libs with XS" :)
10:35 nic s/with/without/
10:35 pink_mist C::Blocks?
10:36 pink_mist FFI::*?
10:36 pink_mist C::TinyCompiler?
10:36 batman yes! ffi :)
10:36 batman thanks
10:37 nic \o/
10:39 pink_mist =)
10:40 logioniz Могу я обсудить с кем-нибудь мою проблему в google groups?
10:40 logioniz Oh, sorry, i copy wrong part from translater.
10:40 logioniz Can I talk to someone about my problem in google groups?
10:41 nic ask and see if anyone answers
10:42 logioniz Problem called "Have a problem with Mojo::IOLoop::TLS"
10:42 logioniz https://groups.google.com/forum/#!topic/mojolicious/IT1IYgpnTkg
10:43 logioniz After run script i have "SSL accept attempt failed error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol"
10:45 logioniz Does anyone have the same problem?
10:46 logioniz Does anyone have the same problem, after run script and run curl once?
10:48 batman looks very complicated... why don't you just add {tls => 1} to Mojo::IOLoop->server ?
10:49 logioniz No, use Mojo::IOLoop::TLS is required. I try to delete as more as possible code to make it more clear (simple)
10:50 batman why is it required?
10:50 logioniz I think there are bug. May bug in IO::Socket::SSL.
10:50 logioniz Or may be bug in my code :-)
10:54 tchaves joined #mojo
10:56 logioniz If you enable the debug mode, you can make sure that SSL does "accept" more than once like this:
10:56 logioniz ssl::accept  = -1
10:56 logioniz ssl::accept  = -1
10:56 logioniz ssl::accept  = -1
10:56 logioniz ssl::accept  = 1
10:56 logioniz handshare done
10:56 logioniz s/handshare/handshake/
10:58 pink_mist pasting that much into the channel is considered very rude, please don't do that again
10:59 logioniz Well, it seems to me already said this before
11:00 pink_mist I still do not understand _why_ you need to use Mojo::IOLoop::TLS directly. what is wrong with passing tls => 1 like batman suggested?
11:01 logioniz http://paste.ubuntu.com/24800038/
11:03 * batman gives up (since logioniz doesn't want to answer questions)
11:03 logioniz I establish 2 connection
11:04 logioniz I establish 2 tls connection at once
11:04 rshadow joined #mojo
11:08 logioniz Because in the full version of the program, not every client needs to work on tls.
11:18 logioniz Need anything else to explain?
11:19 logioniz This output i have when enable ssl debug
11:19 logioniz http://paste.ubuntu.com/24800038/
11:28 logioniz So. i want to say, that problem occure when use two upgrade to TLS at the same time. One upgrade must be server upgrade.
11:30 dod joined #mojo
11:35 logioniz batman, you need to explain something else?
11:35 logioniz batman, need to explain something else?
11:37 karjala_ joined #mojo
11:45 logioniz pink_mist, need to explain something else?
11:57 stryx` joined #mojo
12:13 CandyAngel So.. dualvars are dangerous :P
12:21 logioniz joined #mojo
12:22 CandyAngel say $dv is a dualvar. If you use it when building a hash with $hash = (), it uses the number.. but if you then use it as a key when looking it up $hash{$dv}, it uses the string
12:23 CandyAngel Or.. not, now I am confused :P
12:23 CandyAngel Ohh, I see, never mind
12:23 dod joined #mojo
12:26 _Janos joined #mojo
12:37 itaipu joined #mojo
12:41 gizmomathboy joined #mojo
12:54 jberger batman see also FFI::Platypus and NativeCall
12:54 jberger The
12:55 jberger The latter being sugar for the former
12:57 pink_mist I thought NativeCall was a perl6 thing 0_o
12:58 pink_mist guess it exists for perl5 too?
12:59 rshadow joined #mojo
12:59 tencendur joined #mojo
13:02 perlpilot pink_mist: yeah, TIL that too
13:16 pink_mist https://github.com/kraih/mojo/blob/master/Changes#L6 =~ s/compount/compound/
13:17 sri nooooooooo
13:17 purl ┻━┻︵ (°□°)/ ︵ ┻━┻
13:25 Pyritic joined #mojo
13:36 kiwiroy joined #mojo
13:39 Armen goedemorgen
13:40 karjala_ Is there a way to do a "diff" on a complex data structure, in order to find what exactly it is that changed, and record it and send this modification somewhere else?
13:40 karjala_ (wrong channel, eh? sorry)
13:43 Intern42 joined #mojo
13:44 aborazmeh joined #mojo
13:45 Armen you could... recursive loop over the data structure, constructing a path for each value, then compare the result between the two structures
13:45 Armen I wonder if there's an Xpath-like thing for perl objects?
13:47 maschine joined #mojo
13:47 batman karjala_: Test::Deep has cmp_deeply()
13:48 Armen oh, neat. That will do it.
13:48 mishanti1 karjala_: Test::Differences is also neat.
13:48 purl okay, mishanti1.
13:49 karjala_ Thanks people
13:59 rshadow joined #mojo
14:01 gryphon joined #mojo
14:13 tencendur joined #mojo
14:23 jberger I wish there was some way to take that output and generate a json-patch
14:23 jberger but I've looked before and there doesn't seem to be
14:25 itaipu joined #mojo
14:29 CandyAngel So, I did the refactoring to move the packet parsing out of ::Connection.. and at least some of the packets set connection-specific attributes.. *flops*
14:34 sri this works too :)
14:34 sri perl -MText::Diff -MMojo::Util=dumper -E 'say diff \dumper({foo => "bar", baz => [1, 2, 3]}), \dumper({foo => "bar", baz => [3, 2, 1]})'
14:36 jberger heh, that's kinda clever
14:37 jberger actually, given that the Test:: modules were brought up
14:37 jberger Test2 must have something because it emits those pretty differences tbales
14:37 jberger tables
14:38 dod joined #mojo
14:38 sri having messed with the suse package of cpanminus yesterday, i think App::cpanminus on CPAN is currently technically illegal
14:39 jberger ?
14:39 sri because of the fatpacking
14:39 sri which removes license and copyright information
14:42 sri fatpacking is a legal mess
14:42 jberger ugh
14:43 jberger yeah, that a tough one
14:44 preaction that sounds fixable...ish
14:44 sri for the suse package the fatpacked code gets stripped out and replaced with external deps on the real modules
14:46 jberger I think the non-fat-packed script is in the repo someplace
14:47 jberger shouldn't be too hard to do
14:47 jberger but yes, I can see that distros would probably have to do that now that you mention it
14:47 sri anyone wo distributes the package
14:54 dod joined #mojo
15:03 karjala_ jberger, if i understood correctly, Vue.js compares the current vDOM (a complex JS object) with the new version of the vDOM (a slightly different JS object) to figure out the minimal number of DOM manipulatinos that need to be done to update the page.
15:03 karjala_ it's doing a diff
15:04 jberger sure
15:04 jberger there are plenty of libraries that generate diffs of structures
15:05 CandyAngel Aw, it's a shame ::Transaction::_finish can't get call ::Transaction::_read() at the end with the leftovers
15:05 jberger but I have yet to see on that generates a JSON-Patch and the few I've seen trying are all indeed javascript
15:05 karjala_ isn't a diff the same as a patch?
15:05 karjala_ o
15:05 CandyAngel can't just call*
15:05 jberger karjala_: https://tools.ietf.org/html/rfc6902
15:06 PryMar56 joined #mojo
15:06 jberger CandyAngel: I think there is an event that does something like that
15:06 jberger but you are getting to areas I'm MUCH less sure of
15:07 sri CandyAngel: that API is not particularly polished since it's so rarely used directly
15:08 CandyAngel It's okay, I just thought I'd found somewhere I could remove duplicate code, but because _read() outputs the chunk in debug as though it has been read from the server, it would be confusing
15:08 CandyAngel And changes 2 lines into a sub call, which could be slower anyway
15:08 sri being efficient is the main priority there
15:09 CandyAngel Yeah, I can imagine
15:09 CandyAngel Just trying to think how I can map how Mojolicious does Websockets to how to handle how this chat protocol/setup works
15:10 CandyAngel Effectively, the connection is "generic" until it gets a packet saying it is $servertype
15:12 CandyAngel Which for websockets, is in the tx, but for this, I'd have to "remember" it in case the tx gets recreated
15:23 tencendur joined #mojo
15:24 jberger CandyAngel: https://github.com/kraih/mojo/blob/8f6e21410f240b3a055d3c42a270382a7fc3a676/lib/Mojo/Server/Daemon.pm#L161-L163
15:25 jberger that's what I was thinking of
15:25 jberger perhaps that's what you are already looking at
15:25 CandyAngel Yeah, that's what I had seen
15:26 dod joined #mojo
15:27 jberger I think mentally I conflated that with the unexpected event, which is for 1xx not for leftovers
15:36 itaipu joined #mojo
15:38 sri btw. i was not right on fatpacking
15:38 sri cpanminus has its own perl minifying mechanism that removes legal notices
15:39 PopeFelix joined #mojo
15:41 PopeFelix Non-Mojo curiosity: If I pass 0xA4A6 into encode('UTF-8', $str), I get 0xC2A4C2A6. Can anyone tell me why that happens?
15:42 pink_mist because you encode a codepoint to utf8?
15:42 PopeFelix Sure, I get that. But why "C2" specifically?
15:43 PopeFelix I'm curious as to what's happening under the hood. :)
15:44 pink_mist that's how those bytes map to utf8?
15:44 PopeFelix Where does that map come from?
15:45 pink_mist uh
15:46 pink_mist http://www.fileformat.info/info/unicode/char/00a4/index.htm the a4 codepoint is encoded as 0xC2 0xA4 in utf8
15:46 pink_mist http://www.fileformat.info/info/unicode/char/00a6/index.htm the a6 codepoint is encoded as 0xC2 0xA6 in utf8
15:46 PopeFelix oh! Thanks!
15:48 pink_mist and the map comes from the utf8 encoding format
15:48 PopeFelix right
15:50 cheako joined #mojo
15:51 CandyAngel Okay, this might be more of a websocket question than Mojo, but as far as I can tell, if there are no frames on the connection anymore, Mojolicious finishes the transaction and closes the websocket
15:52 tencendur joined #mojo
15:52 CandyAngel Wouldn't that sometimes close it prematurely, just because a server_read happened to end at the end of a frame?
15:54 jberger "cpanminus has its own perl minifying mechanism that removes legal notices" :o
15:55 sri CandyAngel: only after a timeout
15:55 sri since the websocket protocol is stateless
15:56 sri waiting idle is actually a very important feature for websockets
15:56 CandyAngel Yeah, that's why I think that is the part of Mojolicious I have to emulate for this client I'm making
15:57 CandyAngel While there is a little bit of "query/response" at the start, then it becomes "either can send at any time"
15:59 CandyAngel I'm looking at parse_frame() and I see that it returns undef if there isn't a whole frame there.. but that looks like it makes server_read finish the websocket
15:59 rshadow joined #mojo
16:00 CandyAngel Oh, they've been removed
16:00 CandyAngel Apparently I'm looking at old code, sorry!
16:01 CandyAngel Like.. I had ::Transaction::Websocket with the latest code and ::Websocket from like.. 6.10 or something -.-
16:03 CandyAngel OKay maybe not. Let me link to the bit I'm looking at, if you don't mind telling me how I'm being stupid
16:04 CandyAngel https://github.com/kraih/mojo/blob/master/lib/Mojo/Transaction/WebSocket.pm#L137-L138
16:05 CandyAngel https://github.com/kraih/mojo/blob/master/lib/Mojo/WebSocket.pm#L144
16:06 CandyAngel If parse_frame() doesn't have a full frame, it returns undef, which calls "finish and last".. right?
16:08 CandyAngel s/full frame/whole packet/
16:08 itaipu joined #mojo
16:09 sh14 joined #mojo
16:11 cheako joined #mojo
16:12 CandyAngel Ehhh.. I think I have figured it out >.<
16:12 CandyAngel When it returns undef, it leaves the loop >.<
16:13 * CandyAngel is stupid :P
16:13 jberger the low level code is easy to get lost in
16:13 jberger don't beat yourself up over it too much
16:13 sri it's cool to have more people who understand that code though \o/
16:13 jberger (not a comment on the code quality, mind you, it is just doing low level stuff)
16:14 jberger indeed, CandyAngel++
16:14 CandyAngel Yeah but I should know that: while (my $val = undef)
16:14 jberger oh, guess that means you get invited to the next refactoring virtual-hackathon
16:14 CandyAngel Doesn't execute. That's standard perl stuff
16:15 CandyAngel Er, doesn't execute an interation of the loop.. thing
16:15 CandyAngel iteration*
16:15 CandyAngel Can I blame the heat?
16:15 CandyAngel That's my excuse. My brain has underclocked so it doesn't cook
16:15 jberger http://imgur.com/b7pOX75
16:16 jberger :-P
16:16 sri hehe, i still kind of want this in master... but at the same time i don't want to pay the performance cost... https://github.com/kraih/mojo/compare/channels/master
16:16 jberger IIRC there was still something outstanding in there wasn't there?
16:17 CandyAngel Well, you should know that if I can help, I will
16:18 jberger sri: some of that did get merged though
16:18 jberger Mojo::WebSocket for example
16:18 sri jberger: yea, some abstraction regarding multiple streams per connection
16:18 jberger yeah, that sounds familiar
16:20 sri yea, it's not actually that much code to change anymore
16:20 sri we've done a lot of the basic cleanup already
16:21 jberger how horrific would it be to rebase that branch?
16:21 sri hehe
16:21 sri not a clue
16:28 irqq joined #mojo
17:13 rshadow joined #mojo
17:20 cheako joined #mojo
17:39 Armen I'm looking at vuejs for the paste front-end, but based on yesterday's conversation, I'm worried that it will not work nicely with js disabled
17:40 Armen I do really like what I'm seeing in vuejs though
17:42 jberger none of the front-end frameworks will work well without js
17:42 preaction no js will work nicely with js disabled. people do not disable js anymore.
17:43 Grinnz uhh
17:43 Grinnz i know people do :P
17:43 Armen well, at least CandyAngel does
17:43 preaction the browser support for disabling js is a lot better, so people can do it on a per-site basis. if your site needs js, they can enable it for your site
17:44 jberger mostly I think people use ad blockers and tracking blockers
17:44 Pyritic joined #mojo
17:45 preaction i don't cater to people who don't enable js anymore. that's my opinion and you're free to totally ignore it, but progressive enhancement / graceful degradation are both pipe dreams and hugely increase the amount of dev time you'll spend
17:45 Armen perhaps just redirecting to the "raw" view is good enough for the few nojs use cases?
17:45 Grinnz i agree, generally
17:46 Grinnz but it differs for the use case of the site
17:46 CandyAngel If you need javascript to show the raw content of a paste, you're doing it wrong
17:46 CandyAngel Like "cooking your dinner with a nuclear bomb" level wrongness
17:46 Armen well it wouldn't be raw if it required a front-end script to display
17:47 arcanez do all these js frameworks provide a free <noscript>?
17:47 CandyAngel Yeah, but guess what? I know at least one pastebin site where you can't get to the raw without JS enabled
17:47 Armen when I say "raw" I mean it to be something you can pull in with wget/curl and make sense of
17:47 CandyAngel because the link to it is.. powered by JS
17:48 jberger CandyAngel: ok, that's excessive
17:48 jberger is that the ubuntu one?
17:48 CandyAngel No, the Blender one
17:49 CandyAngel Armen: By all means, make the pastebin site *you* want
17:50 CandyAngel If I want a JS-less one, I can make it myself :P
17:50 Intern42 joined #mojo
17:51 Armen CandyAngel: actually my goal is to learn (about mojolicious, vuejs, whatever other new technology I decide to use for this)
17:51 Armen and it is an interesting question
17:51 Armen what if you have no js. Will you get a blank page?
17:51 CandyAngel Only make the one I would want to use (functional fallback) if you want me to go around telling people how awesome you are
17:52 CandyAngel Most pastebins that require JS just look broken and have random bits not work
17:52 CandyAngel Like pasting will work, but "View Raw" or "Edit" don't
17:52 jberger I think a pastebin needing a front-end framework is a bit of an interesting case
17:52 Armen edit seems rather essential
17:52 Armen view raw... not even supported in my nodejs version, actually
17:53 jberger oh, but if you are allowing editing then yes, that makes more sense
17:53 Armen actually the "view raw" functionality makes me a bit nervous, I feel like there are angles for abuse there that I might not be seeing
17:53 jberger if you don't have view raw, how do you wget the file contents?
17:54 Armen you don't. Well, there's a cli tool (also nodejs) for the old version to get/post pastes
17:54 jberger that's pretty unusual
17:54 sri <noscript>Welcome to GeoCities!</noscript>
17:54 CandyAngel :P
17:54 jberger sri++
17:55 Armen jberger: same as the mojolicious version, the nodejs version was an experiment
17:55 Armen it functions, but it is very bare-bones
17:55 jberger Armen: and presumably the cli tool still uses HTTP to request the file, so it must just have some way to identify itself
17:57 orev joined #mojo
17:58 Armen it really didn't do much in the way of security, since I am the only known user of the tool ;)
17:59 trone joined #mojo
17:59 disputin joined #mojo
18:00 rshadow joined #mojo
18:05 stryx` joined #mojo
18:16 D joined #mojo
18:16 jberger oh, so by cli tool you mean it just read the local db or something?
18:17 D when hypnotoad reloads, do all dependencies get reloaded too?
18:17 jberger D: what do you mean by dependencies?
18:17 jberger library dependencies?
18:17 purl library dependencies are automatically generated by checking what it links against
18:18 D yes
18:18 jberger purl forget library dependencies
18:18 purl jberger: I forgot library dependencies
18:18 jberger yes, it is an entirely new process
18:18 D that's what I thought, thanks
18:18 jberger np
18:22 Pyritic joined #mojo
18:35 Armen jberger: no it used node's http module to make get/post requests
18:36 Armen by the way, does anyone have experience deploying a mojolicious application on redhat openshift?
18:42 CandyAngel Hmm.. Mojo::Daemon::Server uses $self->{connections}{$id} = {} to store connection specific information. That seems like the right place to put the server type the connection is against..
18:48 irqq joined #mojo
18:54 cheako joined #mojo
19:03 cheako joined #mojo
19:09 jhawley031 joined #mojo
19:15 CandyAngel Does Mojolicious have TCP keepalive on Mojo::IOLoop->client's?
19:16 pink_mist TCP keepalive?
19:16 purl well, TCP keepalive is a sort of ping/pong beneath the application layer.
19:16 pink_mist I think Mojo is strictly in the application layer
19:16 pink_mist sounds like something that would be up to your network stack
19:18 CandyAngel I thought there was a TCP keepalive that didn't involve sending packets with data?
19:19 jstores0711 joined #mojo
19:20 pink_mist yes?
19:20 purl yes is the answer to the latest question
19:20 pink_mist it's still not in the application layer
19:21 CandyAngel Oh, never mind
19:21 CandyAngel I was just watching the packet capture and it actually logs out of one of the servers
19:21 CandyAngel That explains why I wasn't seeing the "emulated" keepalive to that server :P
19:23 cheako joined #mojo
19:24 pink_mist if you're using linux, this seems to be the document to how to make use of it: http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html
19:24 cheako joined #mojo
19:25 cheako joined #mojo
19:29 cheako joined #mojo
19:32 PopeF joined #mojo
19:36 cheako joined #mojo
19:52 miller joined #mojo
19:57 jberger mojo does HTTP keepalive
19:59 jberger Armen: then you kinda did implement a raw view
20:00 Armen jberger: I implemented an API endpoint that returned a JSON structure that gets parsed by the CLI tool before echoing the "raw" paste
20:01 Armen but for this iteration I think I'd rather add support to existing paste cli tools
20:01 jberger most paste cli tools just handle the upload
20:01 Armen right, but my mojo implementation will have a raw view
20:02 jberger most people just use wget for download
20:02 jberger right exactly
20:02 jberger we're on the same page
20:02 Armen I will just need to be careful not to leave it vulnerable. I've seen some suspicious pastes in the current version
20:03 jberger the problem of running a paste site
20:03 jberger spammers gonna spam
20:03 Armen I guess the best I can do is probably serve raw files with "text" mimetype and disallow CORS
20:04 Armen spam is one thing, I don't want to be a conduit for spreading malicious code
20:05 cheako joined #mojo
20:05 Armen that actually reminds me of another feature I was missing - I should add a "report" functionality to deal with spam
20:11 disputin joined #mojo
20:18 maschine i'm using google's recaptcha for my app - seems to work pretty well.  I have tons of suspicious activity in my logs ("passwords.html, admin.html, /backdoor/ etc), but nothing has gotten through.
20:18 maschine sometimes it even blocks me while testing, so I have to disable it. :p
20:19 Armen I'm not certain I want a captcha thing on my paste site
20:19 Armen not that it would be that unusual
20:19 maschine unless it flags you as a spammer, it's pretty painless - you just click a checkbox and that's that.
20:20 maschine not like the ones that make you read a garbled up string of characters (which don't work anyway)
20:21 Armen recaptcha does that sometimes though (try to open using a known vpn for example)
20:23 pink_mist Armen: yeah, but if you use a VPN you kindof have it coming :P
20:31 batman I get zero spam via App::mojopaste
20:31 mishanti1 Only pirates use VPN right?
20:32 batman My js hack works quite well :)
20:33 sri mishanti1: or german netflix customers trying to watch house of cards :,(
20:34 mishanti1 sri: hehe. Yeah. Same thing going on in Norway. The Norwegian Netflix does not have the most exciting selection. Or so I've been told.
20:36 jberger wasn't netflix the company that used to complain loudly about geographic restrictions on content being anachronistic
20:36 batman Armen/jberger: https://github.com/jhthorsen/app-mojopaste/blob/master/script/mojopaste#L219
20:37 jberger batman that's a neat trick
20:42 Armen batman: that works - but it will break for browsers that don't have js enabled. And I'm honestly kind of surprised there aren't bots sophisticated enough to get through that
20:42 Armen if your "bot" were running as a content-script, it could simply trigger a click on the save button and get past this
20:42 mishanti1 jberger: I think they want to open up, but still have rightsholders to fight with. Also they have been a bit dumb about how they license their own content.
20:43 batman Armen: I don't know anyone that doesn't have js enabled, hehe
20:44 * Armen waves the nojs stick at CandyAngel again
20:46 itaipu joined #mojo
20:55 Armen well, time to go home. Hopefully I'll have time to put together the UI for this paste thing
21:26 disputin joined #mojo
21:33 CandyAngel Mew?
21:33 purl rumour has it Mew is a mailreader for emacs that doesn't install cleanly into ~/elisp
21:34 CandyAngel Oh
21:34 CandyAngel Maybe I should change my nick to NoJSAngel or something
21:37 itaipu joined #mojo
21:58 rshadow joined #mojo
22:11 PopeFelix joined #mojo
22:23 cheako joined #mojo
22:33 disputin joined #mojo
22:44 stryx` joined #mojo
22:47 CandyAngel Err
22:48 CandyAngel Never mind, I'll ask for advice when I get to that bit :P
22:50 CandyAngel One of the packet types is a special one that is basically the merging of multiple packets of the same type into one
22:50 CandyAngel Was thinking I could basically emit that as separate requests, as though they were individual
22:59 rshadow joined #mojo
23:31 kiwiroy joined #mojo
23:44 CandyAngel Oh!
23:45 CandyAngel I could parse the first one and then dump the rest in leftovers as separated packets
23:45 CandyAngel Perfecto
23:49 CandyAngel Or, it could just break them up and leave them in leftovers which might be even neater

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary