code logs -> 2015 -> Tue, 20 Jan 2015< code.20150119.log - code.20150121.log >
--- Log opened Tue Jan 20 00:00:28 2015
00:33
<~Vornicus>
Reiv: I haven't looked at it in the past few days
00:35
<~Vornicus>
Yeah, this channel was originally "teach Reiv's biologist friend about doing statistical work in Python"
00:35
<~Vornicus>
But that was 12 years ago~
00:45 thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has quit [[NS] Quit: kthnxbai]
01:01
< simon_>
haha
01:02
< simon_>
I was looking for a channel for discussing Project Euler when I was on my 1st year of CS. that was 8 1/2 years ago.
01:03
< Reiv>
geez you haven't been here that long have you
01:03
< HTH>
I feel like im a child compared to most here
01:04
< simon_>
I don't think I ever registered with NickServ.
01:05
< Reiv>
no I don't think you did
02:31 Turaiel[Offline] is now known as Turaiel
03:03 * ToxicFrog waves to HTH
03:03
< HTH>
Hi ToxicFrog
03:34
< Reiv>
HTH is known to TF?
03:34
< HTH>
Not that I am aware of, the only people I know of in this chan is gizmore and xires
03:36
< Xires>
because stuff
03:36
< Reiv>
Fair enough, no harm done
03:36
< Reiv>
Well, pretty sure you've gotten the idea of what it's about. Welcome, have fun.
03:36
< Reiv>
It's in my mind probably my most successful channel.
03:36
< Reiv>
In that it has a topic and has actually managed to stick with it. :p
03:37
< HTH>
well I'll tell you for free that this channel is the most mature I'm a part of
03:37
< HTH>
*that I'm
03:39
< Reiv>
Bonus.
03:39
< Reiv>
What do I get for a nickel? :p
03:39
< Xires>
the name of the least mature channel?
03:40
< HTH>
Thank you Xires for the witty response I was failing to come up with :p
03:40
< Xires>
anytime
03:41
< HTH>
ugh i think instead of unit testing this code here and thus filling my machine with more java related garbage ill just push it to my uni account and run it all tommorow
03:42 * Vornicus fiddles with the last few details of the database design
03:48 Orthia [orthianz@Nightstar-p50mbe.callplus.net.nz] has quit [Ping timeout: 121 seconds]
03:55 Orthia [orthianz@Nightstar-cjc.die.224.119.IP] has joined #code
03:55 mode/#code [+o Orthia] by ChanServ
04:02
<~Vornicus>
there. 19 tables, and I'm not sure this graph is planar.
04:06
<~Vornicus>
...it's planar!
04:07 * Vornicus boogies, screenshots
04:15
<~Vornicus>
http://imgur.com/gwj11qw
04:15
<~Vornicus>
And now that I've done that I know I missed one: the resource price track.
04:18
<~Vornicus>
Reiv Reiv Reiv
04:20
< Reiv>
wut
04:20
< Reiv>
what about it
04:21
<~Vornicus>
you wanted erd. Behold
04:21
<~Vornicus>
(I don't have tools that make pretty ones available. so I made it in libreoffice. uh.
04:21
< Reiv>
Oh, /well done/
04:21
< Reiv>
That'll do nicely
04:22
< Reiv>
Now let's actually see
04:22
< Reiv>
Your issue is the resource price track? Fairly simple
04:22
<~Vornicus>
I just forgot about it until I put the screenshot up
04:22 * Reiv nods
04:22
<~Vornicus>
I know how to do it~
04:22
< Reiv>
You have two tables; the reference progression and then the game state
04:23
< Reiv>
Korea is a complication probably best handled by just duplicating the resources.
04:23
<~Vornicus>
forgot that one too~
04:23
< Reiv>
CoalN and CoalS instead of Coal
04:23
<~Vornicus>
(the resource bank's stores)
04:23
< Reiv>
Right, good thing I just answered it huh~
04:24
< Reiv>
Map | Resource | Spot | Cost
04:24
< Reiv>
USA | Coal | 1 | 2
04:24
<~Vornicus>
well, I would have discovered it in the process of writing stuff~
04:24
< Reiv>
It does make the Korean one sllllightly messy, but I think it's cleaner than trying to add a special column to deal with it
04:25
<~Vornicus>
"wait, where the hell am I storing the... how did I forget this"
04:25
< Reiv>
haha yes
04:25
< Reiv>
Oh, you'll want a key on that one too, but I guess MapResourceSpot could natural key it
04:26
<~Vornicus>
yeah, the big one there is that in Korea's purchase and refill callbacks I translate between the two.
04:28
< Reiv>
Reasonable.
04:30
< Reiv>
But hey, that's a workable table structure at first glance
04:30
<~Vornicus>
(usually, there's no translation between player coal and map coal, and when you do refills you have to count up the map coal and the player coal to figure out whether you can replace them all; in korea, you translate from s-coal or n-coal to regular coal, and then when refilling you count both s-coal and n-coal to know how much to refill)
04:31
< Reiv>
Fair enough
04:47
< simon_>
I have a problem.
04:48
< HTH>
we all do
04:48
< simon_>
http://shine.eu.org/sogemaskine/sogemaskine.html - this search engine is lagging because I'm being stupid. basically, whenever a tag is selected in the dropdown, the following computation is made:
04:48
< simon_>
foreach (tag in select) { if (intersection(posts_that_contain[tag], current_search_results) > 0) enable(); else disable(); }
04:48 * Vornicus translates page to english
04:48
< simon_>
(I want to disable the select options that will give zero results by checking)
04:48
< simon_>
haha
04:48
< simon_>
yeah, don't mind the language.
04:48
<~Vornicus>
974 visions!
04:49
< simon_>
it's full of buzzwords. I'm just making the javascript!
04:49
< simon_>
my problem: the way I'm currently figuring out if I should enable/disable a single select option is by doing a bunch of inefficient array-based set operations..
04:51
< simon_>
there might be several dozen tags that have hundreds of matches. for each of those, it calculates the intersection with perhaps hundreds of results.
04:51
<~Vornicus>
so you've got: 974 objects; each object has several tags; you wish to, when several tags are selected, disable unselected tags for which, if that tag were selected, no objects would match the complete tag combo.
04:51
<~Vornicus>
Yes?
04:51
< simon_>
yup!
04:51
<~Vornicus>
How many tags does the most-tagged object have?
04:52
< simon_>
biggest one I found is 634.
04:52
<~Vornicus>
Holy cats.
04:52
< simon_>
yeah some tags are just used by everyone
04:52
< simon_>
sorry
04:52
< simon_>
wrong way around!
04:54
< simon_>
84.
04:54
< simon_>
someone put 84 tags in a facebook post. *sigh*
04:54
<~Vornicus>
Still pretty big. Okay I think I know how to do this
04:54
< simon_>
the average is more like 5-10.
04:55
<~Vornicus>
hmmmm. Okay best way I can think of to handle this, actually: take your filtered list of all the objects that match all your tags; foreach of those, add every tag on that post to a set
04:56
<~Vornicus>
Then, check against that set when deciding whether to disable
04:56
<~Vornicus>
Set's easiest to implement as a plain object: s[key] = key
04:57
< simon_>
ah. so when adding a tag, check only the not-already-disabled ones, and when removing a tag, check only the not-already-enabled ones?
04:57
< simon_>
wait, no.
04:58
< simon_>
I get it.
04:58
< simon_>
yeah.
04:58
< simon_>
that's nice.
04:58
<~Vornicus>
Build your easy to check structure first; then use the structure that's easy to check to do the checking~
04:58
< simon_>
that'll be less expensive even if I have to do it on every addition/removal of a single tag.
04:59
< simon_>
thanks a lot!
05:09 Derakon is now known as Derakon[AFK]
05:20 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:34 Turaiel is now known as Turaiel[Offline]
06:16 celticminstrel [celticminst@Nightstar-de4ll6.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:23 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
07:58 Orthia [orthianz@Nightstar-cjc.die.224.119.IP] has quit [Ping timeout: 121 seconds]
08:01 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
08:02 Orthia [orthianz@Nightstar-gk7ip5.callplus.net.nz] has joined #code
08:02 mode/#code [+o Orthia] by ChanServ
08:04 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
08:04 mode/#code [+o himi] by ChanServ
08:12 Kindamoody[zZz] is now known as Kindamoody
08:34 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has joined #code
09:25 Kindamoody is now known as Kindamoody|out
09:38
<@Wizard>
http://i.imgur.com/SomyaMT.png
09:40
<@TheWatcher>
snrk
09:43
<@Wizard>
via Shiz https://up.shiz.me/YzdmNmY4.png
09:50
< abudhabi>
>annoying but
10:04 * Tarinaky sighs. Time off work can't come soon enough -.-
10:31 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has quit [[NS] Quit: Leaving]
12:10
<@Wizard>
I just wanted to get a rails view working
12:10
<@Wizard>
Why am I reading C source code
12:11
<@TheWatcher>
Native code module?
12:12
<@Wizard>
TheWatcher: I was more bemoaning how badly the situation devolved
12:13
<@TheWatcher>
Oh
12:13
<@TheWatcher>
Whereas I'd class that as /improving/, but I hate ruby, so~
12:33
<@Wizard>
TheWatcher: ImageMagick sauce is not the most pleasant
12:35
<@TheWatcher>
Ah, right
12:35
<@TheWatcher>
Yeah, I can't disagree with that at all
12:41
<@Wizard>
status=(ghost_info->run_string)(interpreter,"systemdict /start get exec\n", 0,&code);
12:43
<@Wizard>
Not included in paste: mysterious linebreak before the zero; oscillating indentation and three conflicting indentation styles; the fact that initing the PS module is roughly a hundred lines of code about as legible as that with no comments beyond the usual "put in X, get Y" method commenting
14:00 celticminstrel [celticminst@Nightstar-de4ll6.dsl.bell.ca] has joined #code
14:00 mode/#code [+o celticminstrel] by ChanServ
16:05 Vorntastic [Vorn@Nightstar-ohum2n.sub-70-215-14.myvzw.com] has joined #code
16:06
< Vorntastic>
JQuery is loading late, but it's the first script tag, and it's not marked async, and it is making me angry. WHHYYY
16:15 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
16:15 mode/#code [+o Checkmate] by ChanServ
16:21 * Vorntastic fights with it.
16:23
<@Shiz>
Wizard: # print 42
16:50
< Vorntastic>
Gnaaaaar, it's actually something loading jQuery a second time whyyyyyyyyyyyyyyyyyy
17:03 abudhabi is now known as Julius
17:18 Vorntastic [Vorn@Nightstar-ohum2n.sub-70-215-14.myvzw.com] has quit [[NS] Quit: Bye]
17:22
<@Wizard>
Shiz: Wot
17:22
<@Shiz>
(comment)
17:22
<@Wizard>
Right
18:14 Turaiel[Offline] is now known as Turaiel
19:47 Kindamoody|out is now known as Kindamoody
20:42
<@Shiz>
http://txt.shiz.me/YTg2ZjNk
20:42
<@Shiz>
fun with glibc's shitty ldd implementation
20:52 Turaiel is now known as Turaiel[Offline]
22:15 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
23:03 Kindamoody is now known as Kindamoody[zZz]
23:32 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:32 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:50 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code
23:50 mode/#code [+o himi] by ChanServ
--- Log closed Wed Jan 21 00:00:44 2015
code logs -> 2015 -> Tue, 20 Jan 2015< code.20150119.log - code.20150121.log >

[ Latest log file ]