--- Log opened Mon Jan 19 00:00:13 2015 |
00:21 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds] |
00:50 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code |
00:50 | | mode/#code [+o Alek] by ChanServ |
00:51 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has quit [[NS] Quit: Bye] |
00:52 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has joined #code |
00:56 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has quit [Connection closed] |
00:56 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has joined #code |
01:06 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has quit [[NS] Quit: Bye] |
01:06 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has joined #code |
01:07 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has quit [Connection reset by peer] |
01:07 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has joined #code |
01:07 | | Vorntastic [Vorn@Nightstar-uen1kh.ct.comcast.net] has quit [[NS] Quit: Bye] |
01:41 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
02:30 | | Derakon[AFK] is now known as Derakon |
02:44 | <&ToxicFrog> | McMartin: for like the last ten years MSYS has been "download and run .exe installer, done" |
02:57 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
02:58 | <&McMartin> | I have only found that to be true enough to get anything done when someone else pre-assembled it |
03:03 | <&McMartin> | (Admitted, for the past $LENGTHY my process has been "download Git for Windows and install, done", but getting MSYS to the point where you could run gcc was tragicomic at least through '07 or '08 unless you had Code::Blocks or dev-c++ do it for you) |
03:11 | | Kindamoody[zZz] [Kindamoody@Nightstar-e0h756.mobileonline.telia.com] has quit [Ping timeout: 121 seconds] |
03:30 | | Kindamoody|autojoin [Kindamoody@Nightstar-e0h756.mobileonline.telia.com] has joined #code |
03:30 | | mode/#code [+o Kindamoody|autojoin] by ChanServ |
03:32 | | Turaiel[Offline] is now known as Turaiel |
03:51 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
03:51 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
03:54 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
03:54 | | mode/#code [+o Checkmate] by ChanServ |
04:11 | <@Shiz> | it still is pretty tragic, at least before pacman |
04:11 | <@Shiz> | no idea how it is with pacman |
04:48 | < RobinStamer> | pacman is Arch's package manager |
04:48 | < RobinStamer> | It's absolutely amazing. |
05:01 | <@Azash> | I think he knew that |
05:01 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
05:09 | | himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds] |
05:41 | | gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [[NS] Quit: Gone] |
06:18 | | AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has joined #code |
06:24 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
06:24 | | Turaiel is now known as Turaiel[Offline] |
06:33 | | gnolam [lenin@Nightstar-lhk.n94.131.88.IP] has joined #code |
06:33 | | mode/#code [+o gnolam] by ChanServ |
07:02 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds] |
07:18 | | 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!] |
07:50 | | AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has quit [[NS] Quit: Leaving] |
07:50 | | Kindamoody|autojoin is now known as Kindamoody |
08:09 | < abudhabi> | How do I fire Javascript script from a button? |
08:09 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
08:09 | | mode/#code [+o himi] by ChanServ |
08:10 | < abudhabi> | I'm trying <button onclick="populate()">Populate</button> and it does nothing. |
08:18 | < abudhabi> | Nevermind! |
08:29 | | Orthia [orthianz@Nightstar-ktl.tff.224.119.IP] has quit [Ping timeout: 121 seconds] |
08:34 | | Orthia [orthianz@Nightstar-rs3.6fq.224.119.IP] has joined #code |
08:34 | | mode/#code [+o Orthia] by ChanServ |
08:51 | | gnolam [lenin@Nightstar-lhk.n94.131.88.IP] has quit [Connection closed] |
09:07 | | Orthia [orthianz@Nightstar-rs3.6fq.224.119.IP] has quit [Ping timeout: 121 seconds] |
09:11 | | Orthia [orthianz@Nightstar-p50mbe.callplus.net.nz] has joined #code |
09:11 | | mode/#code [+o Orthia] by ChanServ |
09:16 | | Kindamoody is now known as Kindamoody|out |
09:19 | < abudhabi> | Now I'm having problems firing the script from an onchange property on a select tag. |
09:19 | < abudhabi> | Using a button works. But the onchange does nothing. |
09:30 | < abudhabi> | Argh. It works in everything else, but not in the project. |
09:31 | < abudhabi> | When I write up an example html file, it works. But when I try to paste it into my project, it fails to do anything. |
09:32 | <@TheWatcher> | Are you sure the onchange for the select isn't being grabbed and halted by something else? |
09:33 | < abudhabi> | How do I tell? |
09:33 | <@TheWatcher> | If you're using chrome, inspect the select element, and in the 'event listeners' tab on the right side of the inspect window, see if anything else is listening for change events |
09:35 | <@TheWatcher> | If there are any, hover over the "listenerBody" text to see the function text |
09:36 | < abudhabi> | listenerBody: "function onchange(event) {âµ populate();âµ}" |
09:37 | <@TheWatcher> | That's the only one? Hum. |
09:37 | <@TheWatcher> | Try doing |
09:37 | <@TheWatcher> | onchange="console.log('changed'); populate();" |
09:38 | <@TheWatcher> | And see if that prints anything in the javascript console |
09:39 | < abudhabi> | It prints "changed". |
09:40 | | * abudhabi puts a console.log in the function itself. It is also triggered. |
09:41 | < abudhabi> | If I make a button to trigger the script, it does so. And reloads the page, this time with the changes I wanted. |
09:41 | < abudhabi> | Not sure why it needs to reload the page. |
09:44 | < abudhabi> | Hmm. It seems to do a POST. |
09:45 | <@TheWatcher> | The button is probably doing the submit for the form. |
09:46 | < abudhabi> | It's not a submit, though, it's a button. |
09:47 | <@TheWatcher> | Are you explicitly doing <button type="button">? If not, it may be defaulting to <button type="submit"> |
09:48 | < abudhabi> | Hmmm. |
09:48 | <@TheWatcher> | (the default on firefox and chrome at least is to make it type="submit" if type is not set) |
09:48 | < abudhabi> | I wasn't... |
09:49 | < abudhabi> | When it's explicitly typed button, it does the same as onchange; meaning nothing. |
09:50 | <@TheWatcher> | What is your populate() doing? |
09:54 | < abudhabi> | It's supposed to take the value of the option the user selects, process it, then write a string to an text input field. |
09:55 | < abudhabi> | http://pastie.org/9839789 |
09:59 | < abudhabi> | Mind, the destination field in the actual project is select2 with attendant scripts and stuff. |
10:04 | <@TheWatcher> | and if you stick console.log("Value: "+destination.value); at the end of the function, does it log the right thing? |
10:04 | <@TheWatcher> | Wait |
10:05 | <@TheWatcher> | Check that there isn't a function proviced by the select2 to set the value |
10:06 | < abudhabi> | How do I check that? |
10:07 | < abudhabi> | Hmmm. |
10:07 | <@TheWatcher> | Ah |
10:08 | <@TheWatcher> | The examples show that you need to do |
10:08 | < abudhabi> | The destination DOES get set to the correct value. |
10:08 | < abudhabi> | Hm? |
10:09 | <@TheWatcher> | $example = $("destination"); $example.val(temp.substr(1,temp.length-1)).trigger("change"); |
10:09 | <@TheWatcher> | https://select2.github.io/examples.html "Programmatic access" section. |
10:13 | < abudhabi> | Hrm. That doesn't seem to work. It does nothing. |
10:16 | <@TheWatcher> | Oh, sorry, use $("#destination") |
10:16 | <@TheWatcher> | I always forget that you need the # with jquery... |
10:17 | < abudhabi> | YES. |
10:17 | < abudhabi> | Thank you! |
10:18 | <@TheWatcher> | (And really it could jsut be $("#destination").val(temp.substr(1,temp.length-1)).trigger("change"); if you're not doing anything else) |
11:24 | | * abudhabi debates internally whether to name a function "depopulate" or "ethnic_cleansing". :V |
11:29 | <@TheWatcher> | Is it selective, or doe sit delete all the things? >.> |
11:30 | < abudhabi> | It deletes everything in the input box. |
11:35 | <@TheWatcher> | Ah, ethnic_cleansing() would have to be more discriminating~ |
11:37 | <@Azash> | Shiz: Did you get your thing done btw |
12:30 | | io\-_- [Alexandria@Nightstar-fkokc2.com] has quit [Ping timeout: 121 seconds] |
12:59 | | * TheWatcher eyes this student's answer for this exercise |
12:59 | < abudhabi> | 42? |
13:00 | <@TheWatcher> | Signs it may not be getting a good grade: "malloc.c:2369: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof ..... ' failed.\nAborted |
13:01 | < abudhabi> | malloc ;_; |
13:01 | < abudhabi> | What is it doing? |
13:02 | <&McMartin> | Freaking out after a double-free would be my first guess. |
13:02 | < abudhabi> | I was referring to the student. Why does it need to touch memory handling? |
13:03 | <@TheWatcher> | This is a C programming course |
13:04 | | io\-_- [Alexandria@Nightstar-fkokc2.com] has joined #code |
13:04 | <@TheWatcher> | The question this is an answer to has them building a spellchecker |
13:04 | | io\-_- is now known as iospace |
13:04 | | mode/#code [+o iospace] by ChanServ |
13:06 | <@Tarinaky> | Frankly, anyone who can get their assignment running without segfaults in an /intro/ C course is a ringer. |
13:07 | <@TheWatcher> | Huh? |
13:07 | <@TheWatcher> | The majority of mine do |
13:08 | <@Tarinaky> | What's the expected prerequisites? |
13:08 | <@TheWatcher> | Basic computer literacy |
13:08 | <@TheWatcher> | No programming experience expected at all |
13:08 | <&McMartin> | It's really not that hard |
13:08 | <@Tarinaky> | At my Uni people only got their code to run without exploding after annoying the the advisors with help-vampire level questions. |
13:08 | <&McMartin> | Not for assignment-level stuff |
13:09 | <&McMartin> | That said |
13:09 | <&McMartin> | Once you start having big things, yeah |
13:09 | <@Tarinaky> | And moving statements around so that the program would work by accident rather than design. |
13:09 | <&McMartin> | I TAed the same class twice, once in C++, once in Java |
13:09 | <&McMartin> | office hours the second time were all about the notional course topic |
13:09 | <@Tarinaky> | McMartin: It's not that hard, if, you're actually competent and not a rank-beginner. |
13:09 | <&McMartin> | The first time they were all about template instantiation errors and wild pointers |
13:09 | <&McMartin> | And that was grad level |
13:10 | <&McMartin> | That *said* |
13:10 | <&McMartin> | If the purpose of the course is "here is how memory works in an abstract stored-program computer such as the one C pretends it runs on" |
13:10 | <&McMartin> | This is not some deep madness like monads or first-class continuations |
13:11 | <@Tarinaky> | I just... don't think you're going to witness anything beyond cargo-cult understanding. |
13:11 | <@Tarinaky> | And programs that run by coincidence rather than design. |
13:11 | <&McMartin> | Well |
13:12 | <&McMartin> | To be fair, "cargo cult understanding" is what you're *supposed* to do with malloc and free, because using them correctly means literally doing by hand what compilers should be doing. =P |
13:12 | <&McMartin> | That said, I'm rather a fan of making students learn what the compiler is doing for them, and C is actually a tiny bit too high-level to fully cover that. |
13:13 | <&McMartin> | But all you need to teach is how to build a heap and run a stack from there. |
13:13 | | * Tarinaky shrugs. I don't have any experience in teaching. I've just been on the 'other side of the fence' quite recently. |
13:13 | <&McMartin> | Sure |
13:14 | <&McMartin> | And I've been playing with hilariously strict static languages lately, which is fun because I kind of can't imagine a novice actually using them |
13:14 | <@Tarinaky> | Although I didn't actually do the C class, so my experiences were limited to everyone elses complaints. |
13:14 | <&McMartin> | Sure, every time they get something wrong they'll receive a three-page lecture on precisely why that code violates various invariants... |
13:15 | <@Tarinaky> | But are they going to know what an invariant is~ |
13:15 | <&McMartin> | ... but going from that to structuring something that is legal seems like it might be more work than they could handle |
13:15 | <&McMartin> | Yeah, so, Rust has move semantics, which I have never seen used as universally as it does. If you're tricky you can get away with it |
13:15 | <&McMartin> | A lot of this boils down to "seriously, fuck the heap as hard as we can, which turns out to be pretty hard" |
13:16 | <@Tarinaky> | You don't need pointers, you just need the right datastructures :P |
13:16 | <&McMartin> | But I'm not kidding about "get away with" - I'm pretty sure its reputation will be "Rust programs never crash, because the compiler will never actually give you your code in a runnable form, just tell you why it would crash if you *did* run it" |
13:16 | <@Tarinaky> | Unfortunately implementing the right datastructures typically requires pointers :( |
13:17 | <&McMartin> | I'm not yet convinced that you can really understand what a reference is without also getting pointers. |
13:17 | <&McMartin> | This doesn't mean you go around doing arbitrary pointer arithmetic, but being able to do the equivalent of list surgery in a Lisp would probably suffice |
13:18 | <@Tarinaky> | What's list surgery? |
13:18 | <@Tarinaky> | Insertion/deletion? |
13:18 | <&McMartin> | Destructive updates to reference variables. |
13:18 | <&McMartin> | Possibly introducing aliasing. |
13:18 | <@Tarinaky> | I'm not sure I know what that means. |
13:18 | <&McMartin> | Remember, by default, everything in Lisps is immutable. |
13:18 | <@Tarinaky> | I don't know lisp |
13:18 | <&McMartin> | OK, so, Lisp in two lines of IRC |
13:18 | <@Tarinaky> | Because I am neither a) Academic or b) Over the age of 40. |
13:19 | <&McMartin> | You have your primitive data types, which are the usual ones, and also the "cons cell" datatype, which is basically class ConsCell { Object head, tail; } |
13:19 | <&McMartin> | You usually treat everything as immutable, but you can edit it if you want to, you just generally don't. |
13:20 | <&McMartin> | List surgery is where you use ConsCells to build a linked list in the obvious way ("head"s hold the actual data, and "tail" is the next pointer or NULL), and then you start reassigning tail to build other structures. |
13:20 | <&McMartin> | This is the simplest thing you can build that lets you prove you understand how aliasing works. |
13:21 | <@Tarinaky> | Aliasing is...? |
13:21 | <&McMartin> | (aliasing is where you write a.x = 3 and then b.x suddenly is three because you assigned b to a somewhere and those are references.) |
13:21 | <@Tarinaky> | RIght |
13:21 | <&McMartin> | (a and b are said to be 'aliased' in that case; that is, they point to the same thing) |
13:22 | <&McMartin> | I have gotten the impression that in "not teaching pointers" a distressing number of students aren't encountering the notion of aliasing *either*, and you cannot be a competent programmer even in java without grasping that. You're just spellcasting then too. |
13:22 | <&McMartin> | Also, I'm under 40 and I had to learn a Lisp for my intro programming class |
13:23 | <@Tarinaky> | At my Uni, in the first year, half the year were taught Haskell and half the year were taught to chant 'public static void main' |
13:23 | <&McMartin> | These both seem like poor choices, honestly. |
13:23 | <@Tarinaky> | And both of these streams lead to the same C class. |
13:23 | <&McMartin> | The big advantage of that Lisp dialect is that every relevant piece of the language could be taught in 30 minutes. |
13:24 | <@Tarinaky> | On the other hand, 1) I don't know what dialect that is. |
13:24 | <@Tarinaky> | 2) It's a bit neck-beardy. |
13:24 | <&McMartin> | Yeah, the lower-division set was Scheme (the Lisp dialect) for a high-level overview of theory of computation -> Java (data structures) -> C and assembly (machine organization and What Compiled Code Is Actually Doing) |
13:25 | <&McMartin> | You're going to have to expand on "neckbeardy" |
13:25 | <@TheWatcher> | Back when I was an undergrad the first year was MIPS assembler, SML, Lisp, and C. |
13:25 | <&McMartin> | I'm a gigantic fan of SML's algebraic data types and think more things should use it |
13:25 | < abudhabi> | First year, we had math. :V |
13:25 | <&McMartin> | This is one reason I'm following Rust pretty closely~ |
13:26 | < abudhabi> | There might have been C/C++ Basics For The Incredibly Dense, but I don't recall what year it was at. |
13:26 | <@Tarinaky> | "Teach yourself C++ in 27.5 hours for the profoundly deaf" |
13:27 | | * McMartin generally thinks one should start teaching either at the assembler level or at the level that is basically math and then start moving towards the other end |
13:27 | <&McMartin> | C++, like Perl, is so large that by design the language will not fit into the skull of a single human |
13:28 | | * abudhabi loads up his dox. |
13:28 | <&McMartin> | abudhabi: Well, that, yes, but also 'developers will have working-subsets of the language' |
13:29 | < abudhabi> | Semester 1: English, Humanities, Algebra and Geometry, Discrete Math and Logic, Physics, Theoretical Basics of Informatics, Basics of Programming. |
13:29 | <&McMartin> | Is Theoretical Basics of Informatics stuff like recursion and basic complexity and type theory? |
13:29 | <&McMartin> | Or a bit further on to "how to build OO systems out of nothing but functions and lexical closures"? |
13:30 | < abudhabi> | Semester 2: Physical Education, English, Economics, Physics, Physics Lab, Mathematical Analysis, Probabilistics and Statistics, Computer Circuit Analysis, Circuit Theory, Algorithms and Data Structures. |
13:30 | <&McMartin> | (woo SICP) |
13:30 | < abudhabi> | McMartin: More like Turing Machines. |
13:31 | < abudhabi> | Semester 3: Physical Education, English, Economics, Functions of Complex Variables, Analog Tech, Algorithms and Data Structures, Numerical Methods, Basics of Metrology, Semiconductor Tools and Circuits. |
13:31 | < abudhabi> | er, two more: Digital Tech, Computer Programming. |
13:33 | | * Azash takes turns choking imagemagick and ghostscript |
13:33 | <@Azash> | Why |
13:33 | <@Azash> | I don't even have a good question, just why |
13:33 | < abudhabi> | Semester 4: Physical Education, English, Digital Circuit Processing, Metrology Lab, Electronic Circuits and Elements, Digital Tech, Computer Architecture, Operating Systems, Computer Programming, Computer Programming Project, Microprocessor Tech, Work Practice. |
13:33 | < abudhabi> | Very little programming in general. |
13:34 | <&McMartin> | You never directly train languages for a full degree, IME. The expectation is that a shift of language is a weekend of picking up the differences from what's already known. |
13:34 | <&McMartin> | The exceptions are if a language has something extremely exotic and then the class is in part about that exotic thing, with the language as a medium for it. |
13:34 | <@Azash> | No carpenter studied the use of a hammer for three months |
13:35 | <@Tarinaky> | Although they probably did use a hammer for 3 months. |
13:35 | < abudhabi> | Hmm. My grades suck at start, then start to pick up. |
13:35 | <&McMartin> | The flipside is that carpenter's aren't prone to using a hammer for three months and then denying the existence of saws. |
13:36 | <@Tarinaky> | Saws considered harmful |
13:36 | <@Tarinaky> | Hammers have fewer sharp edges for the inexperienced carpenter to cut themselves on, and an experienced carpenter can cut wood by scoring it first and then breaking it with the hammer~ |
13:37 | <@Azash> | McMartin: However there are some who grow devastating beards and then denounce the evils of the chainsaw for the elegance of the bow saw~ |
13:37 | <@Azash> | Of course, there are also types who will argue for a year and a day whether a hammer or a chisel are better for removing a screw |
13:38 | <@Azash> | Can we make the carpenter the new car metaphor? |
13:38 | <@Tarinaky> | I always like the one about the painter who had 10 years experience painting houses but only 3 years painting houses brown. |
13:38 | <@Azash> | Also motherfffffff- has anyone here set up an imagemagick/ghostscript combo before |
13:39 | <@Tarinaky> | So they hired a car salesman who had 10 years experience selling brown cars. |
13:39 | <@Azash> | Tarinaky: What they needed was a full-stack caravan salesman obviously |
13:39 | | * Tarinaky ticks off full-stack on her buzzword bingo card. |
13:40 | | * Azash ticks off "buzzword" on his denouncement bingo card |
13:41 | | * Tarinaky ticks off denouncement bingo card on her remarkably unimaginative attempts to counter-burn what was never meant as an insult in the first place bingo card. |
13:41 | <@Tarinaky> | I've just never had someone actually use full-stack in a conversation before. |
13:42 | <@Azash> | Full-stack is a term heavy in derision here |
13:42 | <@Azash> | So not many people bring it up |
13:43 | <@Azash> | Here as in the local SCENE |
13:43 | <@Azash> | With a connotation of misunderstood and mismanaged agile |
13:43 | | * Tarinaky giggles at the phrasing of a 'local scene' |
13:44 | <@Tarinaky> | Is it full of java subs :P |
13:45 | | * Tarinaky giggles in her own world. |
13:45 | <@Azash> | I presume the two ideas go hand in hand |
13:46 | <@Tarinaky> | C top C++ power bottom? |
13:46 | <@Azash> | s/ [^ ]{5}// |
13:48 | <@Tarinaky> | Well that's enough of your love life... |
13:48 | <@Azash> | This is mystifying as hell |
13:49 | <@Azash> | ImageMagick is completely able to detect GhostScript when I'm building it |
13:49 | <@Azash> | It tells me Magick::ImageMagickError (Postscript delegate failed `/tmp/foo': No such file or directory @ error/ps.c/ReadPSImage/bar: `(null)'): |
13:49 | <@Azash> | But /tmp/foo exists |
13:49 | <@Azash> | Or is it referring to the (null) |
13:49 | <@Azash> | I'm not sure anymore |
13:50 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code |
13:50 | | mode/#code [+o Alek] by ChanServ |
13:54 | <@TheWatcher> | Azash: and just running `gs` works? |
13:54 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds] |
13:56 | < abudhabi> | Javascript seems even more wild-ass than C with its allowing of anything. |
13:56 | <@Azash> | Yeah |
13:56 | <@Azash> | C is "I'll aliow it, I trust you, Bob" |
13:56 | <@Azash> | JS is "I'll allow it, 'cause fuuuuck yyyoooouuuuu" |
13:56 | <@Azash> | Basically |
13:57 | <@Azash> | TheWatcher: Essentially it seems like IM does build while able to see gs in the path |
13:57 | <@Azash> | So I'm not entirely sure what's going on |
13:57 | | thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has joined #code |
13:57 | | mode/#code [+o thalass] by ChanServ |
13:58 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code |
13:58 | | mode/#code [+o Alek] by ChanServ |
14:03 | <@TheWatcher> | Azash: dry running with -debug? |
14:05 | <@TheWatcher> | *try |
14:08 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
14:08 | | mode/#code [+o Checkmate] by ChanServ |
14:20 | | celticminstrel [celticminst@Nightstar-de4ll6.dsl.bell.ca] has joined #code |
14:20 | | mode/#code [+o celticminstrel] by ChanServ |
14:30 | <@Azash> | TheWatcher: Went home, will try to figure out how to do that from the app tomorrowe |
14:30 | <@Azash> | Thanks |
14:48 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds] |
14:50 | <@TheWatcher> | Why, why do they overcomplicate things so much? >.< |
14:51 | < abudhabi> | Because they don't know the shortcut? |
14:52 | <@Tarinaky> | Because they only have a cargo-cultish understanding of a limited number of 'spells' |
14:52 | <@Tarinaky> | And have to frame every problem into one of those spells |
14:53 | <@Tarinaky> | And then badly apply it because their memory of that spell is limited to a lecture they probably missed, or showed up hungover to |
14:53 | <@Tarinaky> | Basically: a wizard should know better. |
14:54 | <@TheWatcher> | And I'd say that either of those are possible except that this problem lets them almost directly reuse part of the answer to a previous question, and if they failed to answer that sufficiently I've already given them the full answer to it. |
14:54 | <@celticminstrel> | What are we talking about? |
14:54 | <@TheWatcher> | Some of my students. |
14:54 | <@celticminstrel> | Ah. |
14:54 | <@Azash> | I almost took offense until I remembered I don't use that nick here |
14:54 | | Azash is now known as Wizard |
14:55 | < abudhabi> | Because they instantly forget every exercise that they go through. |
14:55 | <@Tarinaky> | Maybe they didn't understand the preceeding question and only understood how to answer it? |
15:17 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code |
15:17 | | mode/#code [+o Alek] by ChanServ |
15:37 | <@Tarinaky> | Things I don't understand. |
15:37 | <@Tarinaky> | Why do I have so many open code reviews. |
15:37 | <@Tarinaky> | Nobody else has this problem :/ |
15:38 | <@Tarinaky> | It can't be that I'm working hard, I spent most of today reading. |
15:38 | <@Tarinaky> | WTF |
15:51 | | elz0rro [cmnd@Nightstar-nelvj0.dyn.optonline.net] has joined #code |
15:56 | | elz0rro [cmnd@Nightstar-nelvj0.dyn.optonline.net] has quit [Connection reset by peer] |
15:57 | | elz0rro [cmnd@Nightstar-nelvj0.dyn.optonline.net] has joined #code |
15:59 | | elz0rro [cmnd@Nightstar-nelvj0.dyn.optonline.net] has quit [Connection reset by peer] |
15:59 | | elz0rro [cmnd@Nightstar-nelvj0.dyn.optonline.net] has joined #code |
16:02 | | elz0rro [cmnd@Nightstar-nelvj0.dyn.optonline.net] has quit [[NS] Quit: - nbs-irc 2.39 - www.nbs-irc.net -] |
16:16 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
16:37 | | gnolam [lenin@Nightstar-afpphi.tbcn.telia.com] has joined #code |
16:37 | | mode/#code [+o gnolam] by ChanServ |
16:49 | <@Shiz> | abudhabi: negative |
16:52 | <@Shiz> | err |
16:53 | <@Shiz> | Wizard: negative |
16:54 | < abudhabi> | You are a meat popsicle? |
16:58 | <@Wizard> | Shiz just had a rather complex CS problem but couldn't find anybody in here who could help |
17:10 | <&ToxicFrog> | ...did they ever actually post it? I don't see anything. |
17:17 | | Kindamoody|out [Kindamoody@Nightstar-e0h756.mobileonline.telia.com] has quit [Ping timeout: 121 seconds] |
17:17 | <@Shiz> | sunday at 1am GMT |
17:17 | <@Shiz> | around 1am |
17:18 | | Kindamoody|out [Kindamoody@Nightstar-e0h756.mobileonline.telia.com] has joined #code |
17:18 | | mode/#code [+o Kindamoody|out] by ChanServ |
17:34 | <&ToxicFrog> | I see nothing. |
17:39 | <@Shiz> | @Shiz â I was tasked with an assignment to translate a certain issue into a network flow problem, but I'm... pretty much stuck and was wondering if anyone had some pointers for me |
17:39 | <@Shiz> | @Shiz â basically the assignment is https://up.shiz.me/MjllNzhi.png |
17:39 | <@Shiz> | @Shiz â my own thoughts on it so far were creating a {compiled, uncompiled} edge for every function and connecting the edges with the capacity of the invocation + runtime costs |
17:39 | <@Shiz> | @Shiz â and connecting every {compiled, uncompiled} vertex with a capacity of 0 |
17:41 | <&ToxicFrog> | Oo. Spicy. |
17:41 | <&ToxicFrog> | What's footnote 1? |
17:41 | <@Shiz> | a function can call itself |
17:47 | <&ToxicFrog> | Hmm. So the cost of an edge would be ((function runtime + call overhead, if any) * call count + compilation cost, if compiled). |
17:48 | <&ToxicFrog> | Runtime and compilation cost depends on whether this function is compiled; call overhead depends on whether its caller is compiled. |
17:48 | <&ToxicFrog> | So you'd need {compiled->compiled, compiled->bytecode, bytecode->compiled, bytecode->bytecode} edges for each call, I think. |
17:50 | <&ToxicFrog> | I don't have any immediate advice for you, but I may hack on this some later, it sounds interesting. |
17:52 | <@Shiz> | hmm |
17:53 | <@Shiz> | it's at least something to go on, the assignment deadline over so i have plenty of time to figure it out now too ;p |
18:46 | <&ToxicFrog> | My first instinct was to do something like create two nodes for each function, one for the compiled version and one for the interpreted one |
18:47 | <&ToxicFrog> | And then set up the edges as described above, and then *waves hands* a miracle occurs and you find the graph subset that picks exactly one node from each pair and has the lowest total edge cost |
18:51 | <@Shiz> | haha |
18:53 | <&ToxicFrog> | (there's probably an algorithm for this in TAOCP) |
18:56 | <@Shiz> | i have that in hardcopy so i might take the next 3 weeks scouring it for one |
18:56 | <@Shiz> | ;p |
19:11 | | Kindamoody|out is now known as Kindamoody |
20:51 | | gnolam [lenin@Nightstar-afpphi.tbcn.telia.com] has quit [[NS] Quit: Z?] |
21:31 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
21:31 | | mode/#code [+o Checkmate] by ChanServ |
21:54 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
22:41 | | Kindamoody is now known as Kindamoody[zZz] |
23:20 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:20 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
23:27 | <~Vornicus> | Some days, the truth of computer science shines so brightly that the light becomes solid and hits you square on the head. "oh, yeah, that thing I was doing research on all last week? Boils down to four lines of code." |
23:28 | < Reiv> | What'd you go and find, Vorn |
23:29 | | elz0rro [cmnd@Nightstar-nelvj0.dyn.optonline.net] has joined #code |
23:32 | | elz0rro [cmnd@Nightstar-nelvj0.dyn.optonline.net] has quit [Connection reset by peer] |
23:32 | <~Vornicus> | So, there's a potential vulnerability in web applications, called CSRF: Cross-Site Request Forging. Long story short, a website can trigger a potent action on another website, via your browser, thus using your cookies, and thus your login session. if Facebook didn't implement CSRF protection, other sites could, without your permission, post on Facebook as you, if you navigated there while also logged in on Facebook. |
23:32 | < Reiv> | cute |
23:33 | <~Vornicus> | The standard tactic to prevent this is to have all potent actions send, in addition to the actual payload, a token that matches your cookies. |
23:33 | < Reiv> | rrrright |
23:34 | <~Vornicus> | This works, because the foreign site can't see Facebook's cookies |
23:34 | <~Vornicus> | So trying to match the CSRF cookie is basically impossible. |
23:35 | <~Vornicus> | Further, every time you *use* a potent action, your CSRF cookie gets reset, and the new page uses that new cookie in its forms |
23:36 | <~Vornicus> | ANd there's the rub: the *new page*. In AJAX actions, there is no new page. |
23:37 | < HTH> | custom http headers bruh :p |
23:37 | | * TheWatcher finally gets off his arse and fixes his InteractiveTimeline extension |
23:38 | <~Vornicus> | So my research has been, lately: how do I make it so my various AJAX actions correctly use the new cookie - and so any non-AJAX actions *also* do. |
23:39 | | * HTH pokes gizmore|2 |
23:40 | | * TheWatcher moves it from Stamford Brook to Lancaster Gate, in a classic District Zonecrossing Switchover |
23:41 | < Reiv> | So far so good |
23:41 | <~Vornicus> | I'd figured it out pretty well for non-form-shaped actions: you're using a callback to even *submit* the data, so tell it to include the cookie's value in the payload. But the other stuff was confusing me. Turns out it's just four lines: when an ajax action completes, go through the page and set the csrf token fields in all the forms to the new cookie value. |
23:42 | | himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code |
23:42 | | mode/#code [+o himi] by ChanServ |
23:42 | < HTH> | there are a lot of ops here :p |
23:42 | <~Vornicus> | We're like that. |
23:43 | <~Vornicus> | Technically about 3/4 of the people who aren't opped are only that way 'cause I haven't bothered to update the list lately |
23:43 | < HTH> | fair enough |
23:44 | | Irssi: #code: Total of 42 nicks [23 ops, 0 halfops, 0 voices, 19 normal] |
23:52 | < Reiv> | Better odds of dealing with idiots and spammers quickly. |
23:52 | < Reiv> | And no particular op can do enough to hurt matters enough to be terribly concerned about mistakes. |
23:52 | < Reiv> | So as long as we know the person, and they're reasonably trustworthy, why not? |
23:53 | < HTH> | oh i dont disagree i just havent seen many channels like that |
23:53 | < Reiv> | Granted, this relaxed attitude may have something to do with the fact that the channel founders were 75% server administrators. <g> |
23:54 | < Reiv> | So any sillyness that might be possible regarding channel highjackery or whatever the usual reason to be cautious exists, is... less relevant. |
23:56 | < HTH> | once again fair enough, just an oddity i felt like pointing out :p |
23:57 | < Reiv> | Indeed. And I was pointing out why the oddity came about, and partly why it was done so freely. |
23:58 | < Reiv> | (Vornicus is not actually the original channel founder either; he's just one of the founding members who kept his nick better registered than I did >_>) |
23:58 | < HTH> | Well thank you for explaining :) |
23:58 | < Reiv> | NP. |
23:58 | < HTH> | Now unfortunately I have to go code something in Java :| |
23:58 | < Reiv> | haha |
23:58 | | * Reiv hands HTH a gun with a single bullet. |
23:59 | < Reiv> | Vornicus: How goes your beautifully constructed E-R diagram, resolving all disputes in code? |
23:59 | < HTH> | I klike this place. |
23:59 | < HTH> | s/klike/like/ |
23:59 | < Reiv> | Then you're welcome to idle. |
23:59 | < Reiv> | We're... good at idling. <g> |
--- Log closed Tue Jan 20 00:00:28 2015 |