--- Log opened Tue Dec 23 00:00:50 2014 |
00:36 | | Derakon[AFK] is now known as Derakon |
02:34 | <@Reiv> | SQL |
02:34 | <@Reiv> | WHY MUST YOU FORSAKE ME |
02:34 | | * Reiv sets it on fire. Then kicks it. Then sets it on fire again. |
02:35 | <@Reiv> | I have an IN(:Parameter) |
02:35 | <@Reiv> | I have had a million such things in the past |
02:35 | <@Reiv> | So why does *this* one error out if you pass it more than precisely one arguement |
02:35 | <&Derakon> | Did you spell the name of the parameter consistently? |
02:35 | <@Reiv> | That is why I was using an IN() darnit |
02:36 | <@Reiv> | It works as intended if I pass the paremeter one or zero inputs (at which point I have an IS NULL capturing it) |
02:36 | <~Vornicus> | Sounds like, uh |
02:36 | <@Reiv> | It is apparently having a heart attack over having multiple options. Inside an IN(). |
02:36 | <~Vornicus> | Sounds like the parameter is coming in as an arrayish |
02:36 | <@Reiv> | It is and does |
02:37 | <~Vornicus> | If that's the case, a typical implementation would assume the second argument is spurious |
02:38 | <@Reiv> | nyet, it's passing them in a format that ends up being comma'd lists |
02:38 | <@Reiv> | This is something I have literally done over a hundred times |
02:38 | <@Reiv> | But /today/ it is being a pillock |
02:38 | <~Vornicus> | uh huh |
02:38 | <@Reiv> | "invalid relational operator" |
02:38 | <@Reiv> | ... wait that's an odd one to get as an error |
02:39 | <~Vornicus> | Yeah, that is an odd one. |
02:39 | <&Derakon> | Missing a paren somewhere~? |
02:39 | <~Vornicus> | What's the whole query? |
02:39 | <@Reiv> | ... I shall share it, but I warn you, you may yet be blinded by its glory |
02:39 | <&Derakon> | Can't be worse than some commandlines I've strung together. |
02:41 | <@Reiv> | I'm actually not sure if I'm being sarcastic~ |
02:41 | <@Reiv> | http://pastebin.starforge.co.uk/671 here is the offending query |
02:43 | <@Reiv> | (I wonder if Vorn can figure out what the first subquery is doing without thinking too hard) |
02:43 | <@Reiv> | (I was pretty proud of that one) |
02:48 | | * Vornicus reads it and figures it out: "each of the last 12 months" |
02:50 | <~Vornicus> | The offending line is 19? |
02:50 | <~Vornicus> | And the problem is that if you hand P_LOCATION an array with more than one element, it explodes? |
02:50 | <@Reiv> | Correct |
02:51 | <@Reiv> | And yeah, that little query lets me return a list of the last 12 months, so even if there are no rows, it still shows up with otherwise-blank lines. Useful for automated graphs. |
02:51 | <~Vornicus> | Also, while that one *is* fun, I understood it instantly. SQL's kind of impressive, it's surprisingly easy to read |
02:53 | | * Vornicus thinks |
02:53 | <@Reiv> | I'd hoped as much. That little query sits in my metaphorical toolbox now. |
02:54 | | * celticminstrel gave up after about 5 seconds. |
02:55 | <~Vornicus> | This is unfortunately not exactly in my expertise here; my stored procedure mojo is minimal, mostly because about 90% of the time I see people using them I get mad~ |
02:56 | <@celticminstrel> | I think I used them in my databases class... I haven't used them since, though think I haven't done anything particularly complicated since then either. |
02:56 | <@Reiv> | Vornicus: Yeah, that's fair |
02:56 | <@Reiv> | This isn't really a stored procedure, I guess |
02:56 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
02:56 | <@Reiv> | It's SQL that sits neatly in the background of a web presentation portal, and draws a graph when requested. |
02:57 | <@Reiv> | I make a *lot* of graphs. >_> |
02:57 | <~Vornicus> | Hee. |
02:57 | <&McMartin> | A milestone is reached: https://hkn.eecs.berkeley.edu/~mcmartin/retro/coreflight_a1.d64 |
02:57 | <&McMartin> | The tunnels are a little too narrow if I'm going to also have enemies to shoot at, but even at their current width it's too easy without them. |
02:57 | | * simon_ set up a Tor hidden service: http://24w5pujhagv55cxn.onion/ |
02:57 | < simon_> | now I just have to find something useful to put on it. |
02:58 | <@Reiv> | Iiiiiii am not sure I want to click that |
02:58 | < simon_> | Reiv, in your regular browser, it will do nothing. |
02:58 | <~Vornicus> | Reiv: I'm imagining what would happen if I turned all my excel sheets into web pages; the sheer number of graphs would be stunning. |
02:58 | < simon_> | Reiv, in a browser with Tor support, it will just display a "Hello, World!" screen without ever leaving the Tor network. |
02:59 | <@Reiv> | fair enough |
02:59 | <~Vornicus> | Also I'd make about 50 extensions to whatever chart library I'd pick |
02:59 | <@Reiv> | Vornicus: I would believe it |
02:59 | <@Reiv> | In this case I am building the reporting system for a new health&safety system |
02:59 | < simon_> | I thought I'd make a game that imitates The Silk Road... so, buy/sell drugs and make a profit. :) |
02:59 | <@Reiv> | And it seems that every table of figures that people want to see, they want to see a chart to go with it for pattern-spotting |
03:00 | <@Reiv> | simon_: And have a way to make it entirely clear this is a *game*, right >_> |
03:01 | <~Vornicus> | heh. randomly I remember an incident in like 4th grade |
03:02 | <~Vornicus> | <Vorn> Look, these numbers are pretty close to a straight line. <Science teacher> How can you tell? you haven't graphed them. <Vorn> ...why would I need a graph? |
03:04 | < simon_> | Reiv, well, there was the "Random Darknet Shopper" art project that bought random things off The Silk Road and had it mailed. but yeah, I imagine this game will be without the aid of actual illegal stuff ;) It became an interesting art installation, though: https://wwwwwwwwwwwwwwwwwwwwww.bitnik.org/r/ |
03:05 | | * Vornicus pokes at the query |
03:05 | <~Vornicus> | I don't see itt |
03:06 | <~Vornicus> | I suspect there's a type mismatch somewhere, but I can't tell from here; are you poking this proc by hand? |
03:07 | <@Reiv> | I can feed it arbitary values for testing, if that's what you mean |
03:07 | <~Vornicus> | like this is the kind of thing -- how do I put this |
03:08 | <@Reiv> | It is getting the parameters filled by another query, however |
03:10 | <~Vornicus> | This might be something where your parameter is coming in [[a],[b]] instead of [a, b], where joining arrays isn't happening, they're just being glommed in a super-array |
03:15 | <@Reiv> | That's... possible |
03:15 | <@Reiv> | Why would [[a]] not throw the same error then? |
03:17 | <~Vornicus> | Automatic flattening? I dunno |
03:18 | <~Vornicus> | In Python, doing (tuple(a), tuple(b)) gives a tuple of two tuples; doing (tuple(a)) gives a single tuple with a in it |
03:19 | <@Reiv> | well |
03:19 | <@Reiv> | what I'm feeding it is |
03:19 | <@Reiv> | http://pastebin.starforge.co.uk/673 |
03:19 | <~Vornicus> | (tuple(a),) is a two-level tuple) |
03:20 | <@Reiv> | And an equivalent one for Site, abliet with the extra parameter stripped out and the SELECT changed accordingly |
03:22 | | * Vornicus examineexamineexamines |
03:23 | <~Vornicus> | I don't know, that appears to be a single-column result |
03:23 | <~Vornicus> | Which would act like a single-level array for the purposes of IN |
03:27 | <~Vornicus> | So, nope. you got me |
03:36 | <@Reiv> | Don't worry, I got me too~ |
03:36 | <@Reiv> | I mostly posted in here as a venting of frustration, not to seek bona fide technical help |
03:36 | <@Reiv> | I appreciate the effort, though! |
03:36 | <@Reiv> | (Not being rude in that, it's just I'm more used to being the guy bugfixing other peoples SQL at this point~) |
03:37 | <@Reiv> | (It's an odd feeling to be the Resident Expert, even if in a toy language) >_> |
03:43 | <@celticminstrel> | ...SQL is a toy language? |
03:57 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds] |
03:59 | <~Vornicus> | Yeah no |
03:59 | <~Vornicus> | It's very good at what it does |
04:01 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code |
04:01 | | mode/#code [+o Alek] by ChanServ |
04:01 | <~Vornicus> | Other languages strive to be as talented as SQL is at solving problems in its domain. Not many succeed. |
04:04 | <~Vornicus> | (this is why, instead of trying to beat SQL at its own game, you see modules specifically designed to interact with databases *in SQL*) |
05:10 | | Derakon is now known as Derakon[AFK] |
05:26 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
05:35 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
05:35 | | mode/#code [+o himi] by ChanServ |
05:51 | | AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has joined #code |
05:53 | | celticminstrel [celticminst@Nightstar-jeiu0g.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
05:56 | | thalass [thalass@Nightstar-9ai58o.bigpond.net.au] has quit [Ping timeout: 121 seconds] |
06:38 | | thalass [thalass@Nightstar-9ai58o.bigpond.net.au] has joined #code |
06:38 | | mode/#code [+o thalass] by ChanServ |
06:42 | | Harlow [harlow@Nightstar-04f.4po.201.71.IP] has joined #code |
06:43 | < Harlow> | Generic question, which is better as a email service POP or IMAP, (usage: immediately print emails as receipts upon receiving the email) |
07:11 | | Harlow [harlow@Nightstar-04f.4po.201.71.IP] has quit [[NS] Quit: This computer has gone to sleep] |
07:12 | <@froztbyte> | wat |
07:15 | | Kindamoody[zZz] is now known as Kindamoody |
07:19 | | Harlow [harlow@Nightstar-04f.4po.201.71.IP] has joined #code |
07:27 | | froztbyte [froztbyte@Nightstar-frrora.za.net] has quit [[NS] Quit: upgrades] |
07:41 | | froztbyte [froztbyte@Nightstar-frrora.za.net] has joined #code |
07:41 | | mode/#code [+o froztbyte] by ChanServ |
07:56 | | Harlow [harlow@Nightstar-04f.4po.201.71.IP] has quit [[NS] Quit: BED] |
09:15 | | Kindamoody is now known as Kindamoody|afk |
09:17 | | Orthia [orthianz@Nightstar-fdm.ne6.184.203.IP] has quit [Ping timeout: 121 seconds] |
09:22 | | Orthia [orthianz@Nightstar-d0r.s18.184.203.IP] has joined #code |
09:22 | | mode/#code [+o Orthia] by ChanServ |
09:51 | | AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has quit [[NS] Quit: Leaving] |
10:01 | < abudhabi> | I think my Raspi is fried. |
10:03 | < abudhabi> | It won't power on. |
10:04 | < abudhabi> | It might be the AC/USB PSU, though. |
10:19 | < abudhabi> | It is! |
12:35 | | gnolam [lenin@Nightstar-afpphi.tbcn.telia.com] has joined #code |
12:35 | | mode/#code [+o gnolam] by ChanServ |
13:04 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
13:04 | | mode/#code [+o Checkmate] by ChanServ |
14:25 | < abudhabi> | Whee. Got a new charger. |
14:25 | <@iospace> | annoying: Can't use "Whenever sqlerror" to set a variable to 1 to indicate failure |
14:42 | | macdjord|slep [macdjord@Nightstar-c0i1dq.cable.rogers.com] has quit [Ping timeout: 121 seconds] |
14:52 | < simon_> | does anyone here know if it's possible to take an ELF executable and statically inline a specific library? (or, rather, during compilation, request that it should only be static with regards to a particular library)? |
14:53 | < simon_> | sorry -- for the latter of these, I'm talking GHC. |
15:06 | | Kindamoody|afk is now known as Kindamoody |
15:59 | <@iospace> | mwuhahahah VICTORY IS MINE |
16:04 | | celticminstrel [celticminst@Nightstar-jeiu0g.dsl.bell.ca] has joined #code |
16:04 | | mode/#code [+o celticminstrel] by ChanServ |
16:36 | | Orthia [orthianz@Nightstar-d0r.s18.184.203.IP] has quit [Ping timeout: 121 seconds] |
16:41 | | Orthia [orthianz@Nightstar-fdm.ne6.184.203.IP] has joined #code |
16:41 | | mode/#code [+o Orthia] by ChanServ |
17:49 | | Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has joined #code |
17:50 | < Vorntastic> | Harlow isn't here; I'd pick imap, because pop tends to have knockon effects at the server. |
17:55 | <&ToxicFrog> | POP is pretty much never the right answer these days, yeah |
17:55 | <&ToxicFrog> | If you want POP-like "delete messages upon read" semantics for IMAP you can still do that |
18:10 | <@froztbyte> | simon_: I don't really know if that's possible in the general case, much less the specific example you mention |
18:10 | <@froztbyte> | it might be possible if you basically handcode the linker steps |
18:10 | <@froztbyte> | but that sounds painful |
18:12 | <@froztbyte> | it is a question of mild curiousity though, let me know if you find the answer |
18:14 | < simon_> | froztbyte, I thought a sufficient (and by no means ingenious) compiler could do it on a per-library level. |
18:14 | <@froztbyte> | simon_: like we have so many of those |
18:15 | <@froztbyte> | I don't think it's beyond the realm of possibility (presuming that ELF allows for that) |
18:15 | <@froztbyte> | but I don't recall ever running into that before |
18:18 | < simon_> | froztbyte, well, ELF clearly allows for it. compiling something statically simply means putting a blob of machine code inside your executable that would otherwise have been in a shared object. but usually you say "I want all of my libraries inlined in my executable" or "I want none of them!" - and GHC seems to default to "I want all the Haskell-specific libraries, but not external libraries like libc." |
18:19 | <@froztbyte> | simon_: I'm well familiar with the normal uses :) |
18:19 | <@froztbyte> | barely touched ghc before, though |
18:19 | < simon_> | I was dealing with a bad case of libffi (an external C library) having different versions on my own Arch box and on my Debian server. |
18:19 | <@froztbyte> | don't run arch |
18:19 | <@froztbyte> | it's bad for you |
18:19 | < simon_> | I know. :( |
18:19 | < simon_> | I've been happy with it for years now. but I'm not happy any more. |
18:19 | < simon_> | stuff breaks. |
18:19 | <@froztbyte> | haha |
18:19 | <@froztbyte> | well |
18:19 | < simon_> | my graphics card driver is having a severe rash... |
18:19 | <@froztbyte> | that, at least, is a constant observation |
18:20 | <@froztbyte> | although the degree may differ |
18:20 | < simon_> | 20% of the time, when I switch into Emacs, it goes crazy and paints garbage everywhere. |
18:20 | <@froztbyte> | nice |
18:20 | < simon_> | Firefox is full of garbage drawing once in a while, too... people think "I'm hacking" when they see it. |
18:20 | <@froztbyte> | hahaha |
18:21 | < simon_> | what do you run? |
18:21 | < simon_> | I'm tempted to go the Debian way. I've never run it successfully on a laptop, though... maybe I'll just go back to Ubuntu and hate myself and see it break on the next distupgrade. |
18:22 | <@froztbyte> | I have 2 OSX laptops (because I'm too lazy to try figure out what to do to debian/bootcamp it, and also mildly stingy on resources); my home microserver is jessie, my desktop is sid, and my proper in-other-places servers are wheezy |
18:22 | <@froztbyte> | so basically "debian" is the tldr |
18:22 | < simon_> | I do run Debian on my desktop computer, but I hardly use it. |
18:23 | <@froztbyte> | I find that debian a) pretty much Jus Twerks, b) never tries to "helpfully" get in my way, c) isn't full of weird random braindamage |
18:23 | < simon_> | I think Debian doesn't come with enough nice small details that are useful on a laptop. stuff I'd normally be happy without on a server. |
18:23 | <@froztbyte> | it's hard to articulate (c) without specific rants that sound like nitpicks |
18:24 | <@froztbyte> | but, for instance, just last week I wasted 2 hours on random ubuntu boot bullshit on some NUCs. install debian, done in 20 minutes |
18:24 | <@froztbyte> | simon_: mm. I've only had a debian laptop again for a short while in recent history, but it was pretty sorted at that time |
18:25 | <@froztbyte> | what kind of things do you have in mind? |
18:25 | < simon_> | well... stuff like dealing with suspend mode, auto-wifi, hmm... |
18:25 | <@froztbyte> | power issues are things I haven't had in a damn long time, but that may be due to owning older gear. I can't comment on new things |
18:25 | <@froztbyte> | NetworkManager makes a goddamn lot of sense on laptops |
18:25 | <@froztbyte> | (or any computer that switches between networks a lot) |
18:26 | < simon_> | ugh. I'd rather choke in cat5! |
18:26 | <@froztbyte> | no, seriously |
18:26 | < simon_> | arch actually has a pretty nice ncurses-based network manager. |
18:26 | <@froztbyte> | it works extremely fucking well |
18:26 | < simon_> | it doesn't get in my way. |
18:26 | <@froztbyte> | there's a bunch of other options as well, obviously |
18:26 | <@froztbyte> | but it really works *extremely* well |
18:26 | < simon_> | well... my experience with NetworkManager on ubuntu is that it gets in my way constantly, whenever it doesn't simply crash. |
18:26 | <@froztbyte> | yes, cf. aforementioned (b) :) |
18:27 | <@froztbyte> | that's my experience with pretty much anything ubuntu |
18:27 | <@froztbyte> | NM is more complex, I'll readily admit that any time |
18:27 | < simon_> | I agree that NetworkManager's front-end is very convenient. saving all my connection info without editing files. but I don't like its need to reconnect and re-DHCP whenever there's a tiny fluke on the network. |
18:27 | <@froztbyte> | but it's been a fair while since it's fucked up anything for me |
18:27 | <@froztbyte> | simon_: I *think* that's gotten better |
18:27 | < simon_> | running simply wpa_supplicant, whenever the connection drops, wpa_supplicant finds it and my DHCP is unaffected. |
18:28 | <@froztbyte> | simon_: I've noticed that it does a couple-of-seconds hold on things these days |
18:28 | <@froztbyte> | seems like a flap dampening kind of move |
18:28 | <@froztbyte> | haven't gone to see if that was a specific change or something that can be set or whatever, though |
18:29 | < simon_> | I really like the way my computer will re-attach to the network without my network manager telling the system that "OKAY, WE'RE PULLING DOWN THE NIC! EVERYTHING IS OFFLINE! WAIT FOR DHCP! INCOMING! OKAY, IT WAS THE SAME ADDRESS AS BEFORE!" :) seems exceedingly unnecessary and many of my ongoing connections will die. |
18:29 | | * McMartin attempts to convert component video color values to RGB, gets endless lolz. |
18:29 | <@froztbyte> | haha |
18:29 | <@froztbyte> | simon_: yeah |
18:30 | <@froztbyte> | simon_: to be fair, I'm in an odd position |
18:30 | < simon_> | what I did a while back was set the network-part of my home-LAN to the same as my school LAN, so whenever I got an IP address at school, I could just shut down the laptop, go home and my DHCP lease would be valid in two places :P |
18:30 | <@froztbyte> | simon_: I'm grumpy old greybeardy about things like "why the fuck do I need 2GB baseline to do anything with a GUI on any reasonably supported $x?" |
18:30 | <@froztbyte> | simon_: but pragmatic about other things |
18:31 | < simon_> | froztbyte, I think I'm way too detail-oriented about these things. most of my lecturers don't even bother to change the default Ubuntu background logo. |
18:31 | <@froztbyte> | haha |
18:31 | <@froztbyte> | well |
18:31 | <@froztbyte> | do you have any particularly lengthy dhcp delays? |
18:31 | <@froztbyte> | it should only take 1~2s tbh |
18:31 | <@froztbyte> | if that |
18:31 | <@froztbyte> | anything outside of that is a bad network and/or shitty wifi association speed |
18:31 | < simon_> | yes, at school. usually takes like 10 seconds. |
18:32 | <@froztbyte> | jfc what |
18:32 | < simon_> | it certainly is. |
18:32 | <@froztbyte> | go stab your network people |
18:32 | < simon_> | it all started when they outsourced the IT department to faculty level. |
18:32 | <@froztbyte> | are they transcribing your arp requests and sending them over to the router by post dove? |
18:33 | < simon_> | now all the cool computer scientist dropouts from the old IT departments have quit and there's only incompetent people left who run Microsoft solutions. recently one of my lecturers missed a deadline for submitting an article for peer-review because the mailserver silently dropped his email. so he had to mail it privately past deadline. |
18:34 | <@froztbyte> | that kind of thing pretty much sounds like something that should be squarely on the university's tab |
18:34 | < simon_> | they'll give you "supercomputers" for benchmarking stuff and will not tell you that they're virtualized with a bunch of other crap. |
18:34 | < simon_> | squarely on the university's tab? what do you mean? |
18:35 | <@froztbyte> | any courier/postage fee, any potential late-entry penalties, etc |
18:35 | <@froztbyte> | and when I say "university", I mean "the department that caused it" |
18:36 | < simon_> | they're trying to make the university more effective by centralizing a lot of services. which means that removing the dedicated CS IT dept. is a huge step down. |
18:36 | <@froztbyte> | (because sudden budget drains will become very rapid responses to fixing things in an environment like that) |
18:36 | <@froztbyte> | simon_: lulz |
18:36 | <@froztbyte> | well, all that said |
18:36 | <@froztbyte> | I'm off |
18:36 | < simon_> | alright, cheers. |
18:36 | <@froztbyte> | time to (finally) watch Interstellar |
18:37 | <@froztbyte> | glhf |
18:37 | | * simon_ should get around to that. |
18:37 | <@froztbyte> | do lemme know if you find the answer to the linker stuff (outside of ghc) |
18:50 | | Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has quit [[NS] Quit: Bye] |
18:50 | | Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has joined #code |
19:13 | | macdjord [macdjord@Nightstar-c0i1dq.cable.rogers.com] has joined #code |
19:13 | | mode/#code [+o macdjord] by ChanServ |
19:17 | | Ogredude_ is now known as Ogredude |
19:17 | | mode/#code [+o Ogredude] by ChanServ |
20:51 | | Kindamoody is now known as Kindamoody[zZz] |
21:09 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
21:09 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
21:09 | | mode/#code [+o JustBob] by ChanServ |
22:22 | | Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has quit [Ping timeout: 121 seconds] |
22:22 | | Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has joined #code |
22:57 | | Vornlicious [Vorn@Nightstar-vl0gr2.sub-70-215-15.myvzw.com] has joined #code |
22:57 | | Vornmazing [Vorn@Nightstar-39ntb7.sub-70-215-13.myvzw.com] has joined #code |
22:59 | | Vornlicious [Vorn@Nightstar-vl0gr2.sub-70-215-15.myvzw.com] has quit [Operation timed out] |
23:00 | | Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has quit [Ping timeout: 121 seconds] |
23:06 | | Vornmazing [Vorn@Nightstar-39ntb7.sub-70-215-13.myvzw.com] has quit [[NS] Quit: Bye] |
23:38 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:38 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
--- Log closed Wed Dec 24 00:00:06 2014 |