Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2012-08-15

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

All times shown according to UTC.

Time Nick Message
01:46 zpmorgan joined #pdl
01:46 liddle_piddle_bot Welcome back, zpmorgan
06:40 Agasa hi
06:40 Agasa anyone here?
06:40 zpmorgan howdies :)
06:40 Agasa i'm looking for Mithaldu
06:40 Agasa i'm trying to understand some code he wrote.
06:41 zpmorgan he seems to be idle. what code?
06:41 Agasa an extension for shimmie
06:41 Agasa which is a gelbooru clone.
06:41 zpmorgan ah. can I help?
06:42 Agasa image archive thing. i want to use it to tag scanned documents.
06:42 Agasa the extension is mostly javascript, and it dies silently on my machine
06:42 Agasa no errors or anything
06:43 Agasa i'm sure you can help
06:43 zpmorgan oh, that sounds familiar. I thought it would be a pdl thing
06:43 Agasa no. i'm not even sure what you do here, actually... sorry ^^"
06:43 zpmorgan the other day a friend said the same thing; he was referencing a var alert instead of calling alert() in a jquery callback
06:44 Agasa ah, i see
06:44 Agasa no, this shouldn't contain any jquery stuff
06:44 Agasa never worked with jquery, but i'm fairly sure this has none
06:45 Agasa maybe i can post the code on my dropbox?
06:45 Agasa oh, you guys have a pastebin, can i use it?
06:46 zpmorgan http://scsys.co.uk:8001/pdl
06:46 zpmorgan (I probably won't be able to help)
06:50 Agasa well, better than nothing.
06:51 shadowpaste "Agasa" at 217.168.150.38 pasted "script.js that Mithaldu wrote and doesn't run right on my machine" (79 lines) at http://paste.scsys.co.uk/205496
06:52 zpmorgan that's not jquery?
06:52 zpmorgan maybe you should try loading jquery first.
06:52 Agasa you think there's jquery?
06:53 Agasa um
06:53 zpmorgan var link = $(block).children(":first").attr('href');
06:53 zpmorgan that looks like jquery to me
06:53 Agasa ok, so this weird code is probably using jquery. gee. ok.
06:53 Agasa of course it works not.
06:54 Agasa you managed to help me out against your own expectations.
06:54 Agasa thanks, sir.
06:54 zpmorgan it worked??
06:54 Agasa no idea sir
06:55 Agasa i have to load jquery
06:55 zpmorgan okay, no problem :)
06:55 Agasa not sure where to put it
06:56 Agasa you think the root of the site is a good place?
06:56 zpmorgan I imagine so.
06:56 zpmorgan How are these functions being called?
06:57 Agasa a button calls activate_mass_tagger.
06:57 Agasa that much i verified working.
06:58 Mithaldu Agasa: i wrote a js script?
06:59 Mithaldu wait, is this shimmie stuff?
06:59 Agasa yes! :D
06:59 zpmorgan hi Mithaldu
06:59 Mithaldu why is shimmie stuff in #pdl? :psyduck:
06:59 * zpmorgan :psyduck:
06:59 Agasa because i focused on finding you
06:59 Agasa um
06:59 Agasa sorry.
06:59 Mithaldu hahaha
06:59 Agasa where can we talk?
06:59 Mithaldu whereever, really, i don't mind :D
07:00 Mithaldu i'm just baffled
07:00 Agasa google is my friend! so
07:00 Mithaldu ok, yeah, this is jquery
07:00 Agasa either i rewrite your script kludging some document.evaluates together
07:00 Agasa or i learn how to load jquery
07:00 Mithaldu and it relies on a certain template of shimmie
07:00 Mithaldu shimmie should load jquery on its own
07:01 Agasa evidently it doesn't, i guess?
07:01 Mithaldu if not, just add a script tag loading it to the <head> element
07:01 Agasa fun, how do i do that
07:01 Agasa and also
07:01 Agasa wait.
07:01 Agasa and also, what's a shimmie template?
07:02 Agasa i'm sorry i'm coming here like a torpedo bombarding you with noobish questions.
07:02 Mithaldu it's fine :)
07:02 Mithaldu sorry, i meant theme
07:02 zpmorgan torpedos don't bombard
07:03 Agasa i'm a special air-to-ground torpedo.
07:03 Agasa ok, theme. let's see if jquery is mentioned anywhere in the shimmie code first.
07:03 Mithaldu nah, just load your page
07:03 Mithaldu and look near the top
07:04 Agasa um, in the code?
07:04 Mithaldu at the source of your html page
07:04 Agasa what should i find there?
07:05 Mithaldu something mentioning jquery
07:06 Agasa nope.
07:06 Agasa i find this in
07:06 Agasa <script src='/booru/data/cache/script.1344981826.js' type='text/javascript'></script>
07:07 Agasa inside this script is a lot of stuff,
07:07 Agasa and also jquery.
07:07 Agasa which explains why the code dies silently instead of burning in flames.
07:07 Mithaldu ah :)
07:07 Mithaldu also, not quite
07:07 Mithaldu javascript tends to be quite like php
07:08 Mithaldu also, haha, just saw your query. sorry, i was asleep :)
07:08 Mithaldu honestly, my suggestion is:
07:08 Mithaldu get firefox, firebug, set a breakpoint in my script, then step through things to see what happens
07:08 Agasa that's what i did
07:08 Agasa apparently, it searches for the stuff and finds nothing
07:09 Agasa the default theme is not the right one, i guess?
07:09 Agasa if so, how do i change theme?
07:09 Mithaldu i wrote it a long time ago and don't remember a lot
07:09 zpmorgan does it use a url to search for images?
07:10 zpmorgan if so, firebug has a network tab.
07:10 Mithaldu i used the lite theme
07:10 Mithaldu zpmorgan: it searches for elements on the html page
07:10 Mithaldu divs and such
07:10 zpmorgan ok
07:10 Mithaldu Agasa: you can set the theme in the administration of shimmie, the config is stored in the database
07:10 Mithaldu zpmorgan: still good advice though, the network tab is <3
07:11 zpmorgan it's the best tab by far
07:12 Agasa it'd be a wonderful thing if we could change shimmie to make it work with any theme
07:12 Agasa such a functionality shouldn't be restricted to just a theme
07:12 Agasa it'd be sufficient to set the div ids to something fixed, i guess...
07:14 Mithaldu it is a bit of a hack and meant for a specific site i was working on
07:15 Agasa i see. it's worthy of improvement.
07:16 Agasa maybe i can try with your permission, once i have time?
07:16 Mithaldu pull requests welcome :D
07:16 Mithaldu (i don't even know where you found it)
07:16 Agasa it's included in the main shimmie package.
07:17 Mithaldu uh!
07:18 Agasa Shish told me he doesn't use it, and that i should ask the original author (which was in the very convenient header)
07:18 Agasa and so here i am
07:18 Mithaldu https://github.com/shish/shimmie2/blo​b/master/ext/mass_tagger/main.php#L14
07:18 Mithaldu *cough*cough*
07:18 Agasa what?
07:18 Mithaldu read the line i linked :P
07:19 Agasa yes, delicious
07:19 Agasa now i need to change the theme
07:19 Agasa a new challenge
07:19 Agasa oh well, thanks sir.
07:20 Mithaldu haha
07:20 Mithaldu np
07:20 Mithaldu so we don't risk annoying the channel, i'm also available in #shimmie now :)
07:21 Agasa it's empty?
07:27 Mithaldu nah, you found me :P
08:30 zpmorgan woo! My app got a rating!
08:30 zpmorgan 4 stars!
08:30 zpmorgan https://play.google.com/store/apps​/details?id=com.zpmorgan.treeornot
09:08 Mithaldu how does it work
09:10 zpmorgan ai::nerl perceptron classifier exported to a few operations in c
09:11 zpmorgan it's actually not that easy to compute 60 hard-coded 50000-dimension dot products
09:12 Mithaldu what the christ
09:12 zpmorgan using an accumulator variable, it's over 3 million lines
09:12 Mithaldu i have no idea what you just said :D
09:13 zpmorgan okay, a feedforward neural network can be vectorized. each neuron just computes a simple function of a dot product.
09:13 zpmorgan the input vector to the perceptron is the image, so each channel of each pixel is one dimension
09:14 zpmorgan 128*128*3 = ~50000 dimensions
09:14 zpmorgan all that in one c file is 3 million lines. gcc is nowhere near able to handle that.
09:15 zpmorgan it would take forever to compile anyways, so for now I randomly drop 99.9% of the weights :)
09:16 zpmorgan it's not even wired up in the app, but on my laptop it gets 35 out of 50 correct in the test set.
09:17 zpmorgan Mithaldu, does that still not make sense?
09:17 zpmorgan ai::nerl is a perl/pdl library I wrote & rewrote the other day
09:23 opkick joined #pdl
09:23 opkick [AI-Nerl] zpmorgan pushed 8 new commits to master: http://git.io/cRzquA
09:23 opkick [AI-Nerl/master] have spew_cost die if no x,y supplied. - Zach Morgan
09:23 opkick [AI-Nerl/master] this is not a good commit. paranoid copying returns. - Zach Morgan
09:23 opkick [AI-Nerl/master] lambda in spew_cost is settable. - Zach Morgan
09:23 opkick left #pdl
09:24 Mithaldu zpmorgan: kind of
09:24 Mithaldu i still don't understand why there'
09:24 Mithaldu s an app then that doesn't actally have functionality
09:24 zpmorgan to probe the android market
09:24 zpmorgan and to advance the platform
09:25 zpmorgan I didn't make ai::nerl & all this android code to have a tree detector
09:25 Mithaldu the poor trees will be so disappointed :(
09:26 zpmorgan don't tell them

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