code logs -> 2015 -> Tue, 10 Mar 2015< code.20150309.log - code.20150311.log >
--- Log opened Tue Mar 10 00:00:47 2015
00:15 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
00:15 mode/#code [+o Checkmate] by ChanServ
00:22 himi-cat [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
00:28 Derakon[AFK] is now known as Derakon
00:33
<&Derakon>
I like how the clock features quantum tunneling~
00:44 Thalass|afk is now known as Thalass
01:18
<~Vornicus>
Yeah, there's a little bit of mess
01:59 Thalass [thalass@Nightstar-h1qmno.eastlink.ca] has quit [Operation timed out]
02:10 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
02:32 himi-cat [fow035@Nightstar-687.6m7.146.1.IP] has joined #code
02:44
<@Reiv>
I am impressed enough I forgive the coding bugs
02:56 himi-cat [fow035@Nightstar-687.6m7.146.1.IP] has quit [Ping timeout: 121 seconds]
03:34 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
03:43 Derakon is now known as Derakon[AFK]
03:45 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Connection reset by peer]
03:47 Thalass [thalass@Nightstar-h1qmno.eastlink.ca] has joined #code
03:47 mode/#code [+o Thalass] by ChanServ
04:08 himi-cat [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
04:21 himi-cat [fow035@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
04:22 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
04:22 mode/#code [+o himi] by ChanServ
04:40 Thalass [thalass@Nightstar-h1qmno.eastlink.ca] has quit [Operation timed out]
04:40 Syka [the@Nightstar-c409v3.vividwireless.net.au] has quit [Ping timeout: 121 seconds]
04:41 macdjord is now known as macdjord|slep
04:42 Syka [the@Nightstar-c409v3.vividwireless.net.au] has joined #code
05:36 celticminstrel [celticminst@Nightstar-gmujup.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:09 Turaiel is now known as Turaiel[Offline]
06:28 Kindamoody[zZz] is now known as Kindamoody
08:50 Kindamoody is now known as Kindamoody|out
09:16
< abudhabi>
Hmm.
09:17
< abudhabi>
I've got a table of records. Each is a message, and has just one recipient. When sending to multiple recipients, several messages that differ mostly by recipient are created.
09:18
< abudhabi>
There is also a group-sending functionality. Write in the group name, and messages for each individual member of the group gets a copy. These get their own records.
09:18
< abudhabi>
How would I go about displaying those group-sent messages as one message?
09:19
< abudhabi>
In the frontend, I mean.
09:19
< abudhabi>
Preferrably in some way that's easy to translate from the database layout.
09:19 * abudhabi pokes Reiv the database-optimizer.
09:45
<@TheWatcher>
(why not have a single message, and associate one or more recipients with that message row (so, one table for messages (id, message text, etc), another table that has message recipients (id, message_id, recipient address))
09:45
<@TheWatcher>
Or one table for messages, one for recipients, and one associating recipients with messages
09:46
<@TheWatcher>
(id, message text, etc), (id, message_id, recipient_id), (id, recipient address)
09:47
<@TheWatcher>
That way you'd always have one message, regardless of whether it had one recipient or a thousand
09:51
< abudhabi>
Because that would require reworking of the database structure upon which the app is built. Possible, but time and effort consuming.
09:53
<@TheWatcher>
Egh. Well, do the dupicate messages have some kind of shared, preferably integer field (some kind of common ID, timestamp, or the like?) so tha tyou can use a GROUP BY on them?
09:56
<@TheWatcher>
You could group by the message text, provided that's the same between messages, but group by on text is slower
09:56
<&Reiver>
what's all this then
09:56
<@TheWatcher>
abudhabi working with a database that isn't in 3NF~
09:57
<&Reiver>
So the database is already built, and is in bad form?
09:57
< abudhabi>
TheWatcher: Not at present, but that's possible to add, as an optional field.
09:57
<&Reiver>
You can force a certain amount of normal-form using prperly crafted SQL.
09:57
<&Reiver>
Skip group by, use DISTINCT and keep your columns carefully tuned.
09:58
<&Reiver>
Many database engines can cheat on DISTINCT where they can't on GROUP BY due to retard reasons; even if they don't it's easier to maintain when that's fundamentally the command you're using.
09:58 * TheWatcher still votes for renormalising; it may be more effort to begin with, but it'll almost certainly be less kludgy and easier to work with in the long run
09:59
<&Reiver>
Don't worry about speed until the query proves to be chugging, it should be a fairly simple one at this point.
09:59
<&Reiver>
If it is a database you're *allowed* to normalise, go for it
09:59
<&Reiver>
That said, sometimes you're breaking normal form in the name of logging
09:59
<&Reiver>
And that's a different kettle of fish altogether.
09:59
<&Reiver>
(I am not sure if this is not currently a corporate database or the like.)
09:59 Orthia [orthianz@Nightstar-424.h9n.160.203.IP] has quit [Ping timeout: 121 seconds]
10:00
< abudhabi>
We also break normal form in order not to have million-item JOINS.
10:00
<&Reiver>
what database dialect?
10:00
< abudhabi>
MySQL.
10:00
<&Reiver>
hm I don't know how the optimisations work on that one
10:00 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has joined #code
10:01
<&Reiver>
I would be inclined to craft a view, if this is a thing you need repeatedly
10:01
<&Reiver>
And run it once, see how long it takes.
10:02
< abudhabi>
Yeah, a view might be a good idea in general. (Never understood what views were or what they were used for when taught that in university.)
10:02
<&Reiver>
Views are "Take a single bit of SQL that you'd use in several places and be able to talk to it as if it was a table"
10:02
<@TheWatcher>
abudhabi: that's because most uni database courses are shit~
10:03
<&Reiver>
Think of them like functions in your code - they still need to be *calculated*, but it's providing commonality and means fixing a bug in one place propigates through the rest
10:03
<@TheWatcher>
(usually taught by someone who gets a hardon for obscure elational algebra and has never touched a real databas ein theri bloody life)
10:03
<&Reiver>
Also, depending on the SQL dialect, the servers can optimise views by caching results, etc
10:03
<@TheWatcher>
*relational
10:04
<&Reiver>
Either way it makes your life easier, and possibly faster
10:04
< abudhabi>
TheWatcher: (I still got through the class in the same way I use Javascript nowadays. I look for an example, make modifications and pray it works, without understanding how it works, repeat as needed.)
10:04
<&Reiver>
Both are worthy goals.
10:04
<&Reiver>
Wheras I am getting close to SQL Guru; my main failing is I don't know enough obscure tricks at this point~
10:05
<&Reiver>
Alas, I can't even write Hello World in python, so yeah >_>
10:05
<@TheWatcher>
Also, I note that MySQL doesn't cache views, at least not as far as I can tell
10:05 Orthia [orthianz@Nightstar-om87tg.callplus.net.nz] has joined #code
10:05 mode/#code [+o Orthia] by ChanServ
10:08
<&Reiver>
TheWatcher: Ah well
10:09
<&Reiver>
Depending on how often this query is needed, and the size vs power of the database, it may or may not be an issue
10:09
<&Reiver>
Again, i don't actually know wheher this is a prototype database or a mature one, etc
10:09
<@TheWatcher>
If query performance is important, some quality time with EXPLAIN [EXTENDED] is a Good Thing
10:10
<@TheWatcher>
signs I haven't had enough tea:
10:10
<@TheWatcher>
chris@azad ~/dashboard/dashboard $ eamcs &
10:37 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has quit [[NS] Quit: Leaving]
10:37
< Tarinaky_>
http://rantonels.github.io/starless/
10:47
<@TheWatcher>
"While it's certainly debatable whether Nolan's Interstellar was actually watchable, not to mention accurate, we can certainly thank the blockbuster for popularizing the particular way the image of an accretion disk is distorted." snrrk
11:33 Xires is now known as ^Xires
11:37 macdjord|slep is now known as macdjord
11:40 Orthia [orthianz@Nightstar-om87tg.callplus.net.nz] has quit [Ping timeout: 121 seconds]
11:42 ^Xires is now known as Xires
11:46 Orthia [orthianz@Nightstar-50a.p2r.98.101.IP] has joined #code
11:46 mode/#code [+o Orthia] by ChanServ
11:50 * abudhabi spends an hour learning that comparing a Long and a Long is different from comparing a Long and a long or a long and a long.
11:52
< Tarinaky_>
What about comparing a long long and a long?
11:53
< Tarinaky_>
Or an unsigned long long guisarme-long.
12:16 macdjord is now known as macdjord|wurk
12:34 Thalass [thalass@Nightstar-h1qmno.eastlink.ca] has joined #code
12:34 mode/#code [+o Thalass] by ChanServ
12:37
< RchrdB>
abudhabi: yeah, Java's semantics suck like that.
12:38
< RchrdB>
The primitive vs boxed numbers distinction is *almost* papered over by auto-(un)boxing but not quite.
13:28
<@iospace>
code comment of the day: "don't like this, it can write to naughty places"
14:03
<&ToxicFrog>
My experience with Java's auto(un)boxing is that it works everywhere except in places where it would actually make the code clearer.
14:08 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
14:08 mode/#code [+o Checkmate] by ChanServ
14:08 Thalass [thalass@Nightstar-h1qmno.eastlink.ca] has quit [Ping timeout: 121 seconds]
14:46 Thalass [thalass@Nightstar-h1qmno.eastlink.ca] has joined #code
14:46 mode/#code [+o Thalass] by ChanServ
15:06 Turaiel[Offline] is now known as Turaiel
15:35 Thalass is now known as Thalass|TF2
16:43 Thalass|TF2 is now known as Thalass
17:37 celticminstrel [celticminst@Nightstar-gmujup.dsl.bell.ca] has joined #code
17:37 mode/#code [+o celticminstrel] by ChanServ
18:23 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
18:23 mode/#code [+o Vash] by ChanServ
18:43
< RchrdB>
FUCKING DISTRIBUTE.
19:15 macdjord|wurk [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
19:28 macdjord|wurk [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
19:28 mode/#code [+o macdjord|wurk] by ChanServ
20:34
< RchrdB>
This is glorious: https://speakerdeck.com/a_matsuda/the-recipe-for-the-worlds-largest-rails-monoli th
21:07 iospace [Alexandria@Nightstar-fkokc2.com] has quit [Connection closed]
21:17 RchrdB [RichardB@Nightstar-v5j366.understood.systems] has quit [[NS] Quit: WeeChat 1.0.1]
21:17 Turaiel is now known as Turaiel[Offline]
21:18 RchrdB [RichardB@Nightstar-v5j366.understood.systems] has joined #code
21:27 iospace [Alexandria@Nightstar-fkokc2.com] has joined #code
21:27 mode/#code [+o iospace] by ChanServ
22:19 * TheWatcher sighs, tries to get his mind into the brain of the weirdo who wrote this code
22:20
<@Tamber>
Yourself from 2 weeks ago?
22:20
<@TheWatcher>
Worse. Me from september last year.
22:21
<@Tamber>
Oh dear.
22:21
<@TheWatcher>
It's okay, it's only c++ ¬¬
22:22
<@Alek>
...
22:22 * Alek gives TW a bottle of Jim.
22:22 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:22 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:24
<@TheWatcher>
Thanks, but I don't drink ;)
22:26
<@Alek>
huh. another coder who doesn't drink. how do you cope? :P
22:27
<&McMartin>
Violence, mostly
22:27
<&McMartin>
(I'm one too)
22:29
<@Alek>
:P
22:29
<@Alek>
violence here too.
22:29
<@Alek>
lot of shooter games. >_>
22:30
< [R]>
Yup.
22:30
< [R]>
Ive a bottle of vodka thatll probably last my life.
22:31
<@Reiv>
Vodka is *awesome* for cleaning whiteboards
22:31
<&McMartin>
Fencing, archery, and challenge videogames
22:31
<&McMartin>
Reiv: Does it have the problem acetone does of devouring the finish?
22:31
<@Reiv>
Nope
22:31
<@Reiv>
As far as I could tell anyway
22:31
<@Reiv>
I didn't drink for my entire time at university
22:32
<@Reiv>
(which is ironic and kind of the wrong way round but there you go)
22:33
<@Alek>
it's probably also good for cleaning electrical contacts. and probably circuit boards too.
22:34
<@Alek>
especially the purer it is.
22:34
<@Alek>
just gotta completely dry it afterwards to get the water off, unless you're gonna distill it to higher proof. I think.
23:28 Derakon[AFK] is now known as Derakon
23:50 Kindamoody|out is now known as Kindamoody
--- Log closed Wed Mar 11 00:00:03 2015
code logs -> 2015 -> Tue, 10 Mar 2015< code.20150309.log - code.20150311.log >

[ Latest log file ]