--- Log opened Wed Jun 24 00:00:56 2015 |
01:08 | | Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Connection reset by peer] |
01:10 | | Thalass|TF2 is now known as Thalass|Mayor |
01:13 | | Red_Queen [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
01:28 | <&Derakon> | ZSNES 1.51 has an exploit allowing a malicious ROM to execute code in the host computer. http://tasvideos.org/forum/viewtopic.php?t=16844&highlight=&sid=88f240ded8b10384 24d7e735260bc84a |
01:28 | <&Derakon> | Bet you never thought your console emulator would need to be properly sandboxed, huh? |
01:33 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: ] |
01:38 | | catadroid [catalyst@Nightstar-vem8fl.dab.02.net] has joined #code |
01:51 | | Meatyhandbag [sebastianfe@Nightstar-b1r.1br.73.97.IP] has quit [Client exited] |
02:28 | | macdjord|slep is now known as macdjord |
03:04 | | Meatyhandbag [sebastianfe@Nightstar-b1r.1br.73.97.IP] has joined #code |
03:07 | | * Vornicus hunts around for a thing he saw once... |
03:08 | <~Vornicus> | it was a set of game mechanic ideas; the most notable thing that stood out to me was that he used a "cards" abstraction for pcg systems |
03:08 | <@Tarinaky> | Oh God damn Google, using my smut-binge activity to populate youtube recommended channels with embaressing shit. |
03:08 | | * Vornicus gives Tarinaky incognito mode |
03:09 | <@Tarinaky> | I don't want incognito mode. Because then I'm f***ed if I want to find the same smut twice. |
03:10 | | Meatyhandbag [sebastianfe@Nightstar-b1r.1br.73.97.IP] has quit [Ping timeout: 121 seconds] |
03:10 | <@Tarinaky> | (inb4 save everything: how I feel regarding particular genres of smut depends on whim and I may not have saved something I later decide I really liked on reflection) |
03:11 | <~Vornicus> | Alternative 2: use a second chrome account |
03:11 | <@Reiv> | uh, yeah |
03:11 | <@Reiv> | SEgregation is the key |
03:11 | <@Reiv> | Else it really will remember all your dirty little secrets. |
03:11 | <@Tarinaky> | My life is not segregated. I look at porn when I get bored >.> |
03:12 | <@Reiv> | ... and you can't be bothered to click three buttons? |
03:12 | <@Reiv> | And if that's the case, then Google is providing you with exactly what is sensible! After all, you might have been bored when you visited the website, right? :p |
03:12 | <@Tarinaky> | I can't click three buttons retroactively. |
03:13 | <@Reiv> | So learn to click 'em in future, and purge what you can. |
03:13 | | Meatyhandbag [sebastianfe@Nightstar-b1r.1br.73.97.IP] has joined #code |
03:13 | <@Reiv> | And, uh, be less of a doofus in future, so you have less need of retroactive regrets. |
03:13 | <@Tarinaky> | I'm a doofus? |
03:14 | <~Vornicus> | surfing smut on your normal account? doofustacular |
03:15 | <@Tarinaky> | I'm not used to maintaining military grade opsec around my pornographic habits. |
03:15 | <@Reiv> | Internet hygiene: Just as important as the real world version for not embarrassing your mother! |
03:15 | <@Reiv> | Since when is 'if you want to keep a history, open up a different browser' military grade opsec |
03:15 | <@Tarinaky> | Oh I assure you, my mother's embaressment is nothing to do with my porn and everything to do with her just being a nasty person. |
03:16 | <@Tarinaky> | And on that bombshell, I'm going to bed. |
03:16 | <~Vornicus> | Knowing what military grade opsec actually entails, this ain't close |
03:16 | <@Reiv> | Oh man, my cousin is headed to the US |
03:16 | <@Reiv> | The bits he can and can't say must make for *glorious* fun in his head |
03:21 | | Turaiel [Brandon@Nightstar-8lr.ml4.192.12.IP] has quit [[NS] Quit: Bouncer terminated] |
03:22 | | Turaiel [Brandon@Nightstar-8lr.ml4.192.12.IP] has joined #code |
03:32 | | Thalass|Mayor is now known as Thalass |
03:35 | | Thalass is now known as Thalass|slep |
03:37 | | Meatyhandbag [sebastianfe@Nightstar-b1r.1br.73.97.IP] has quit [Ping timeout: 121 seconds] |
03:43 | | Meatyhandbag [sebastianfe@Nightstar-b1r.1br.73.97.IP] has joined #code |
04:01 | | Thalass|slep [thalass@Nightstar-hfr.psa.114.24.IP] has quit [Ping timeout: 121 seconds] |
04:12 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
04:39 | | macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [[NS] Quit: Reboot.] |
04:56 | | macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code |
04:56 | | mode/#code [+o macdjord] by ChanServ |
05:12 | | Derakon is now known as Derakon[AFK] |
06:56 | | celticminstrel [celticminst@Nightstar-b6hgh7.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:37 | | Kindamoody[zZz] is now known as Kindamoody |
07:47 | | GreenGuy [GreenGuy@Nightstar-fik25i.gnomino.eu] has joined #code |
08:05 | | catadroid` [catalyst@Nightstar-29kua5.dab.02.net] has joined #code |
08:07 | | catadroid [catalyst@Nightstar-vem8fl.dab.02.net] has quit [Ping timeout: 121 seconds] |
08:58 | | kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code |
09:01 | | ErikMesoy [Erik@Nightstar-ki97ss.customer.cdi.no] has joined #code |
09:01 | | mode/#code [+o ErikMesoy] by ChanServ |
09:04 | <@ErikMesoy> | Mumble mumble grumble. I'm between testing gigs at the moment; this means homeboss wants me to write as many buzzwords as possible describing what I did on my summer vacation^^WW last gig. |
09:04 | <@ErikMesoy> | So "I tested on Mac and Windows computers" becomes "I performed comparative tests across multiple hardware and software instances in order to detect rare defects that only showed up in a limited range of conditions" warble warble warble etc. |
09:06 | <@ErikMesoy> | I'm supposed to fill half a page with this sort of wordy nonsense about how I didn't just "write tests based on use cases", but I received use cases, broke them down into individual narrow requirements and converted these to actionable suitspeak suitspeak suitspeak. |
09:08 | <@ErikMesoy> | I have a hard time saying "actionable" with a straight face. |
09:08 | < abudhabi> | Actionable sounds lawyerish. |
09:09 | <@froztbyte> | ErikMesoy: functional evaluations with a cross-platform comparative verification procedure, the deliverables of which allowed you to gain a thorough view of high-impact defects - the elimination of which will drastically improve your product! |
09:09 | <@gnolam> | If what you're doing is actionable, maybe you shouldn't be doing it.~ |
09:12 | <@ErikMesoy> | froztbyte: Exactly. |
09:16 | <@froztbyte> | ErikMesoy: "my assessment is comprehensive and correct", is what you're intending to communicate? |
09:18 | | * ErikMesoy wonders if it would be out of line to say that the "actionable" things were used to "perpetrate" relevant actions. |
09:28 | <@ErikMesoy> | froztbyte: I think I'll steal a few of those words like "verification" and "comprehensive" and drop them in randomly, it seems suitable impressive while not actually committing to any verifiable assertions. Also "integrated" to describe the bug tracker. It probably was integrated in something. |
09:33 | <@froztbyte> | ErikMesoy: http://qdb.codehash.net/quotes/311 |
09:43 | <@ErikMesoy> | froztbyte: But why do people associate Krugersdorp with inbreeding? |
09:46 | <@froztbyte> | ErikMesoy: the best way I could attempt to describe this is as "joburg's detroit" |
09:47 | <@ErikMesoy> | Huh. Did this change recently, or did I just miss it? Because I don't remember any such stereotype from when I lived in joburg ca. 15 years ago. |
09:48 | <@froztbyte> | about 2 years after that, I'd say :) |
09:49 | <@froztbyte> | so if you lived there, then I guess you'll follow the next bit: Roodies high is /noted/ for the amount of stabbings that go down, and (back when I was in high school) commonly joked about as the place where you could get laid if nowhere else worked |
09:49 | <@froztbyte> | it just gets worse when you get closer to K-town |
09:50 | <@froztbyte> | if you take a side drift via Muldersdrift then you get a shitton of wedding venues, and a bunch of people who literally can't get their lives off of living on that set of plots around there |
09:50 | | * TheWatcher eyes that qdb link |
09:50 | | macdjord is now known as macdjord|slep |
09:51 | <@TheWatcher> | The thing that gets me about that? Not the quote itself, not the layout.. no, it's the fact that they give a credit for the magnifying glass |
09:52 | <@TheWatcher> | They could have mde one in less time than it would have taken to write the credit... |
09:53 | <@froztbyte> | TheWatcher: mithrandi isn't a design person |
09:53 | <@froztbyte> | TheWatcher: also: https://github.com/mithrandi/lambdacircus |
10:17 | | RchrdB [RchrdB@Nightstar-952.jvr.168.194.IP] has joined #code |
10:19 | | ErikMesoy1 [Erik@Nightstar-ki97ss.customer.cdi.no] has joined #code |
10:21 | | ErikMesoy [Erik@Nightstar-ki97ss.customer.cdi.no] has quit [Ping timeout: 121 seconds] |
10:39 | | Thalass|slep [thalass@Nightstar-hfr.psa.114.24.IP] has joined #code |
11:04 | | Meatyhandbag [sebastianfe@Nightstar-b1r.1br.73.97.IP] has quit [Connection closed] |
11:09 | | Meatyhandbag [sebastianfe@Nightstar-vnd.59c.73.97.IP] has joined #code |
11:16 | | Meatyhandbag [sebastianfe@Nightstar-vnd.59c.73.97.IP] has quit [Ping timeout: 121 seconds] |
11:16 | | Kindamoody is now known as Kindamoody|afk |
11:20 | | Meatyhandbag [sebastianfe@Nightstar-vnd.59c.73.97.IP] has joined #code |
11:22 | | Thalass|slep is now known as Thalatwerk |
11:24 | | Meatyhandbag [sebastianfe@Nightstar-vnd.59c.73.97.IP] has quit [Ping timeout: 121 seconds] |
11:28 | | Meatyhandbag [sebastianfe@Nightstar-5sb.59c.73.97.IP] has joined #code |
11:28 | | Thalatwerk [thalass@Nightstar-hfr.psa.114.24.IP] has quit [Ping timeout: 121 seconds] |
11:31 | | catadroid` is now known as catadroid |
11:32 | | kourbou is now known as kourbou|foodz |
11:42 | | Meatyhandbag [sebastianfe@Nightstar-5sb.59c.73.97.IP] has quit [Ping timeout: 121 seconds] |
11:45 | | ErikMesoy1 is now known as ErikMesoy |
11:45 | | mode/#code [+o ErikMesoy] by ChanServ |
11:53 | | kourbou|foodz is now known as kourbou |
11:53 | <@TheWatcher> | froztbyte: wait |
11:53 | <@TheWatcher> | that QDB is writtenin haskell? |
11:53 | <@TheWatcher> | I'm not sure whether to be impressed or terrificed. |
11:56 | <@TheWatcher> | ... apparently, rendered unable to type |
11:57 | <@Tamber> | "Terrificed" sounds like a good word. Just need to figure out what it's mangling "terrified" with. |
12:01 | <@TheWatcher> | It is so terrific that it terrificed me~ |
12:03 | <@Tamber> | :D |
12:03 | <@Tamber> | It is a brilliant word, then. |
12:17 | | Meatyhandbag [sebastianfe@Nightstar-5sb.59c.73.97.IP] has joined #code |
12:26 | | kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection reset by peer] |
12:30 | <@TheWatcher> | (Of course, I probably shouldn't comment on people writing web code in haskell given my madness of choice) |
12:32 | | * RchrdB eyes TheWatcher. |
12:32 | < RchrdB> | It's not Prolog.~ |
12:33 | < RchrdB> | I've got a tiny IRC bot running on a private server, written in Prolog. |
12:33 | | * TheWatcher blinks |
12:33 | < RchrdB> | Prolog is notably not very good at I/O or TCP and I am not good at Prolog. The bot sucks. |
12:34 | < RchrdB> | also, strings are rather awkward in the old version of SWI Prolog I was using. |
12:35 | <@TheWatcher> | ?- crazy(RchrdB). |
12:35 | <@TheWatcher> | Yes |
12:36 | < RchrdB> | You forgot the full stop after "Yes". ;) |
12:37 | <@TheWatcher> | :P |
12:37 | < RchrdB> | There are a bunch of things I really like about Prolog. It has the nicest metaprogramming of any PL that I've ever tried using. |
12:37 | < RchrdB> | Adding predicates is just assert(predicate(parameter):-condition,condition). |
12:39 | < RchrdB> | reflecting on existing predicates is just "clause(:Head, ?Body)" |
12:40 | < RchrdB> | and you've got pattern-matching right there, so there's no manual "car" "cadr" "caadaaddr"'ing in to inspect all the individual pieces of the data that represents a given bit of program. |
12:42 | < RchrdB> | OTOH: I can't find its equivalent of "IORef", swipl has a pretty-reader for strings, so typing "aB" anywhere will input [97,66] (great) but the debugger doesn't have any facility that I found for pretty-printing [98,65] as "bA". |
12:42 | < RchrdB> | it's a mite slow... |
12:43 | | * TheWatcher sighs, demonstrates to a student how he can guarantee to crash his program with a simple '-'. |
12:45 | <@TheWatcher> | (int count; scanf("%d", &count); Foo *thingies[count]; - le sigh) |
12:46 | < RchrdB> | Is that a declaration of a variably-sized (runtime-sized) array or is that an expression? |
12:47 | <@TheWatcher> | The former |
12:47 | < RchrdB> | AIUI the semantics of variable-sized arrays are a bit weird and I'm not sure that any case other than setting the size of an array directly from a function parameter actually works? |
12:48 | < RchrdB> | (and that is dubious too, since user input can be unboundedly large easily, the stack won't be, so use the heap.) |
12:50 | <@TheWatcher> | Variable length automatic arrays are allowed in C99 (but not C89), dosn't need to be anything special. |
12:50 | <@TheWatcher> | However, negative values for the array size will segfault |
12:50 | <@TheWatcher> | and just using the user's input as-is with no checking is always a hilarious mistake. |
12:51 | < RchrdB> | It's undefined behaviour rather than guaranteed segfault, right? |
12:51 | <@TheWatcher> | Probably by the spec, but it causes a merry crash in all the isntances I've run into it. |
12:51 | < RchrdB> | The IMHO most newbie-unfriendly part of C is that the definition of UB allows things to *appear* to work, which means that they can't actually confirm whether their code has any semantics at all by mere testing. |
12:54 | | * TheWatcher checks the spec |
12:55 | <@TheWatcher> | Yeah, it just says that the size "shall have a value greater than zero" but doesn't specify what to do if it doesn't |
13:08 | < RchrdB> | That'll be UB, then. |
13:09 | <@TheWatcher> | Yep. |
13:09 | < RchrdB> | int i; sscanf("-", "%d", &i); /* is defined to leave 0 in i, right? */ |
13:10 | < RchrdB> | "check the return value from scanf, you dolt" is obviously the correct answer, but I'm just slightly interested to know if writing Foo *thingies[count] is triggering a crash with count=0, which is of course UB. |
13:12 | <@gnolam> | Tamber: "terrificed" is obviously derived from "terrifice", the art of terrifying someone.~ |
13:12 | <@Tamber> | :D |
13:12 | < catadroid> | ^.^ |
13:12 | < RchrdB> | :D |
13:26 | | kourbou_ [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code |
13:26 | | kourbou_ is now known as kourbou |
13:37 | | catadroid` [catalyst@Nightstar-ejsb28.dab.02.net] has joined #code |
13:37 | | catadroid [catalyst@Nightstar-29kua5.dab.02.net] has quit [Connection closed] |
13:48 | <@Wizard> | Isn't it nice to see trainees as they learn and advance? |
13:48 | <@Wizard> | I just got to teach the one beside me a fundamental problem-solving method and you could see the joy of discovery in his eyes |
13:48 | <@Wizard> | Almost gets a tear in my eye |
13:49 | <@Wizard> | (he made a revert-revert and I had to show him git reset --hard HEAD~2) |
14:00 | < catadroid`> | :) |
14:27 | | GreenGuy is now known as GreenGuy|MC |
14:35 | | catadroid [catalyst@Nightstar-amtka2.dab.02.net] has joined #code |
14:38 | | catadroid` [catalyst@Nightstar-ejsb28.dab.02.net] has quit [Ping timeout: 121 seconds] |
14:40 | <@froztbyte> | TheWatcher: so I shouldn't show you https://github.com/mithrandi/lambdacircus/tree/ghcjs-client then? |
15:42 | | celticminstrel [celticminst@Nightstar-b6hgh7.dsl.bell.ca] has joined #code |
15:42 | | mode/#code [+o celticminstrel] by ChanServ |
15:52 | | Checkmate [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code |
15:52 | | mode/#code [+o Checkmate] by ChanServ |
16:00 | < catadroid> | fixed my alignment issue. much more neutral about the whole thing being ordered and less chaotic |
16:05 | < RchrdB> | froztbyte, â¦so someone (you work with?) added a layer of creamy AJAX to it, with the client-side code written in Haskell and compiled with GHCJS? :D |
16:15 | <@froztbyte> | friend of mine |
16:15 | <@froztbyte> | he just wanted to see if he could make it all run in the browser |
16:15 | <@froztbyte> | (the answer is yes) |
16:15 | <@froztbyte> | but yeah, pretty much |
16:16 | <@froztbyte> | it's kinda crazy |
16:23 | < RchrdB> | weeeeeell |
16:25 | < RchrdB> | It'll look significantly less crazy whenever someone figures out an equivalent for DWARF in javascript. <3 |
16:26 | | * RchrdB gestures at http://fitzgeraldnick.com/weblog/62/ |
16:57 | | ErikMesoy [Erik@Nightstar-ki97ss.customer.cdi.no] has left #code [] |
17:43 | | starkruzr [jtd@Nightstar-4sb.f2r.204.98.IP] has joined #code |
17:44 | < starkruzr> | hi guys. if anyone here speaks PHP, can you tell me what to Google to find examples of simple PHP apps that listen for things to be curled to them and then put them in a MySQL DB? all I can find is examples of PHP being the one doing the curl-ing, which is no good. |
17:54 | < RchrdB> | curl makes HTTP requests. |
17:54 | < RchrdB> | from PHP's point of view, a HTTP request that comes from someone running 'curl' looks about the same as a HTTP request coming from a browser. |
17:54 | < RchrdB> | so the answer to "how do I make PHP respond to requests made via curl?" is the same answer as "how do I make PHP respond to requests from a web browser"? |
17:55 | < RchrdB> | whiiiich is a thing that I assume you already know the answer to |
17:57 | < RchrdB> | e.g. if I run "curl http://localhost:8080/api.php?test=1", that will cause a similar HTTP GET request to be made to as if I had typed that URL into a web browser |
17:58 | < RchrdB> | e.g. if I run "curl -F test=1 http://localhost:8080/api.php", that will cause a similar HTTP POST request to be made as if I had clicked "submit" on a <form method="POST" action="http://localhost:8080/api.php"><input type="hidden" name="test" value="1" /><input type="submit" /></form> on a web page |
17:58 | < RchrdB> | starkruzr, does the above make any sense? |
17:59 | < starkruzr> | I do not know that answer, but that's helpful :) |
18:00 | < starkruzr> | for background: I am trying to write something simple (and internal) to record build results from DeployStudio -- specifically, start and end times. I have a MySQL DB which has four fields to update -- serial (primary key), hostname, start time, end time |
18:01 | < starkruzr> | I had this working fine by running a php script *on the host being built*, except then I booted into the netboot environment to test it and discovered php wasn't part of the netboot environment |
18:01 | < starkruzr> | the netboot environment is very spartan but I'm pretty sure it has curl, at least |
18:02 | < starkruzr> | so it sounds like really what I need to Google for is something like "php process simple form data?" |
18:06 | < starkruzr> | RchrdB: just tagging you so I know I'm getting the right idea :) |
18:07 | < GreenGuy|MC> | you could probably use Python for this |
18:08 | < GreenGuy|MC> | nevermind, you'd have to install a library |
18:09 | < RchrdB> | GreenGuy|MC, no need for external libraries just to take http requests: Python has a webserver in its stdlib. |
18:09 | < RchrdB> | not an astoundingly good one but it's okay |
18:10 | < starkruzr> | I could install a library on the server side, no problem |
18:10 | < RchrdB> | starkruzr, yes it sounds like you're going down a perfectly reasonable path. |
18:10 | < RchrdB> | although |
18:11 | < RchrdB> | if you don't already know PHP so you have to learn some new programming language anyway, why not learn a nicer one? >_> |
18:11 | | * starkruzr snorst |
18:11 | | * starkruzr snorts, too |
18:12 | < starkruzr> | I have no preference for the language to do this, really |
18:12 | < starkruzr> | and I'd be happy to learn Python |
18:12 | < starkruzr> | again, it's just a matter of finding examples to scam |
18:13 | < RchrdB> | Well, they're your braincells to burn as you wish. ^^ |
18:20 | <&ToxicFrog> | Writing a simple webserver that responds to GET or POST requests and updates a db with a schema that simple is going to be pretty simple in any language, even if it doesn't have an httpd library |
18:20 | <&ToxicFrog> | So I also cast a vote for python |
18:24 | <&ToxicFrog> | There's a built in basic web server: https://docs.python.org/3/library/http.server.html |
18:25 | <&ToxicFrog> | You could also use something like web.py, which is another dependency but gives a really nice simple API, from what I've seen: http://webpy.org/docs/0.3/tutorial |
18:25 | <&ToxicFrog> | (comedy option: do it using thttpd + bash cgi) |
18:26 | < starkruzr> | heh |
18:26 | | Derakon[AFK] is now known as Derakon |
18:29 | < RchrdB> | CGI is pretty civilised. |
18:29 | < RchrdB> | Comedy option: do it using bash and its magical /dev/tcp/... pseudo-devices. |
18:29 | < RchrdB> | or bash and netcat |
18:29 | < RchrdB> | (it has been done, don't) |
18:30 | <&ToxicFrog> | RchrdB: CGI is pretty civilized, using bash for webapps isn't |
18:30 | < RchrdB> | uncivilised relative to what? |
18:31 | <&ToxicFrog> | Pretty much any modern HLL? |
18:31 | <&ToxicFrog> | I wouldn't write a webapp in bash for the same reason I wouldn't write one in C: it's way too easy to accidentally introduce some kind of horrifying security flaw. |
18:31 | < RchrdB> | Modulo shellshock, I don't think using bash for webapps is less civilised than using bash for writing pretty much any other form of program. |
18:32 | <&ToxicFrog> | Let's be honest here, bash is pretty ugly for any non-trivial program, and I say that as someone who has in fact written medium-sized programs in bash. |
18:32 | < starkruzr> | I like that this is the sort of channel in which we don't subscribe to the conceit that "scripts" are somehow less than "programs" |
18:32 | < RchrdB> | Strongly agree. |
18:33 | < RchrdB> | We've had to pretty much enforce a "no bash scripts" rule in work. |
18:33 | < starkruzr> | Wow. |
18:33 | < RchrdB> | Not only the security issues but shell scripts are unportable as fuck. |
18:33 | < starkruzr> | Instead you use? |
18:33 | < RchrdB> | Python. |
18:33 | | * starkruzr sudo pip install web.py |
18:34 | < starkruzr> | That was so fast I barely noticed the delay. |
18:34 | <&ToxicFrog> | starkruzr: these days "scripting" has mutated as a term to largely mean "code that is embedded in and used to control a larger program written in a different language" (e.g. lua scripting in games) and less as a synonym for "interpreted" |
18:34 | < RchrdB> | er, did you already do that? |
18:34 | < starkruzr> | Yes, just now. |
18:34 | <&ToxicFrog> | Which is semantic drift I am pretty well in favour of |
18:34 | < starkruzr> | ToxicFrog: indeed |
18:34 | < RchrdB> | starkruzr, I would recommend not doing that; it's safer to install python-virtualenv with apt-get or whatever, and then use virtualenvs so that you get sandboxed library installs. |
18:35 | <@celticminstrel> | I should try Lua. |
18:35 | <@celticminstrel> | I mean, from the other side. |
18:35 | < starkruzr> | Safer in terms of what? |
18:35 | < starkruzr> | Note that this is going to be used for this and only this. |
18:36 | < RchrdB> | starkruzr, on RedHat/Fedora, the incantation "sudo yum install python-virtualenv" will install virtualenv, then I can type "virtualenv ./v", and that will make a directory ./v with a fake Python interpreter in it |
18:36 | <&ToxicFrog> | celticminstrel: the other side? |
18:36 | | * starkruzr is on Ubuntu Server anyway |
18:36 | < RchrdB> | then I can do "v/bin/pip install web.py", without sudo |
18:36 | <@celticminstrel> | I've written Lua scripts for use in Wesnoth and possibly Grimrock. That's not what I'm talking about. |
18:37 | < RchrdB> | and if it turns out that it e.g. installed a version of web.py that I didn't want, or I got that package database messed up somehow, I can just rm the created virtualenv directory, and recreate it from scratch. |
18:37 | <&ToxicFrog> | celticminstrel: as in, from the side of the person embedding the lua interpreter in their program? |
18:37 | <@celticminstrel> | Yes, that. |
18:37 | <&ToxicFrog> | RchrdB: if pip actually fucks up enough that "just make a chroot for everything" is a serious suggestion, I propose that the real answer is "don't use pip, install through your OS's package manager instead" |
18:38 | <&ToxicFrog> | (which is in fact that I do, with zero problems so far) |
18:38 | <&ToxicFrog> | celticminstrel: it has a pretty civilized API. |
18:38 | < RchrdB> | virtualenvs are not chroots. |
18:39 | < RchrdB> | Mixing python packages from Ubuntu/Debian/Redhat repos with python packages installed manually with 'pip' is a proven way to get into weird states where things don't work |
18:39 | <@celticminstrel> | At one point I was also considering trying Python from that side (using Boost), but I kinda suspect Lua would be easier. |
18:40 | < RchrdB> | such as "oh dear I accidentally installed a library which is incompatible with one of the utilities on my computer" |
18:40 | <@celticminstrel> | Plus, I think I like Lua a bit better for scripting (it's more JavaScripty). |
18:40 | < RchrdB> | or "oh dear I accidentally upgraded a library which my distro came with" |
18:42 | | Meatyhandbag [sebastianfe@Nightstar-5sb.59c.73.97.IP] has quit [Ping timeout: 121 seconds] |
18:42 | <&ToxicFrog> | RchrdB: right, my solution here is just to use the package manager for everything rather than installing some stuff through pip and some through zypper and running into weird issues like that. |
18:43 | <&ToxicFrog> | (The one exception to that being Calibre, which comes bundled with its own customized versions of "standard" python libraries and dies messily without them >.<) |
18:43 | <&ToxicFrog> | celticminstrel: it was specifically designed for that purpose and as a result tends to be a lot nicer for it than python, yes. |
18:43 | < starkruzr> | is pip somehow intrinsically bad for some reason? |
18:43 | <&ToxicFrog> | Also plays nicer with threads. |
18:44 | < catadroid> | I just described the work I did s couple weeks ago as 'communing with Malbolge' |
18:44 | <&ToxicFrog> | starkruzr: eh, it's yet another package manager that doesn't integrate with the system package manager |
18:44 | | Meatyhandbag [sebastianfe@Nightstar-giq.1br.73.97.IP] has joined #code |
18:44 | <&ToxicFrog> | So say you install web.py through pip and also through apt-get. Now you have two different versions! Or the same versions with two different build-time configurations, say. |
18:45 | <&ToxicFrog> | And then you 'import web' in your program. Which one does it get? It is a mystery. |
18:45 | < starkruzr> | okay, that seems like a problem one would reasonably want to avoid. |
18:45 | < starkruzr> | ... is it not solved with "just use one of these?" |
18:45 | < starkruzr> | like, I'm the only admin on this box. |
18:45 | < starkruzr> | so. |
18:46 | <&ToxicFrog> | So, install web.py through apt-get if available. |
18:46 | < RchrdB> | Yes. (Using only pip) and (using only apt-get install) are both viable strategies. |
18:46 | <&ToxicFrog> | ^ that |
18:46 | < RchrdB> | virtualenv makes the "using only pip" strategy easier. |
18:46 | < starkruzr> | ToxicFrog: your choice being one of "why not simply use the fewest number of package managers one can," i guess? |
18:46 | <&ToxicFrog> | starkruzr: exactly |
18:46 | <@celticminstrel> | I installed psycopg2 with yum. |
18:47 | <@celticminstrel> | I have no idea if it's available with pip. |
18:47 | < RchrdB> | celticminstrel, thpoilerth: yeth. |
18:47 | <@celticminstrel> | Why lisping? |
18:47 | <&ToxicFrog> | I would rather use just zypper, even if I have to enable optional repos for it, than install some stuff through zypper and some through pip and some through cpan and some through luarocks and and and... |
18:47 | | * starkruzr always wonders about the prevalence of RHEL/CentOS rather than Ubuntu in most Serious Work Environments⢠|
18:48 | < RchrdB> | albeit you may need to have a C compiler and the -devel version of postgres handy in order to install it from pip. |
18:48 | <&ToxicFrog> | (exception: Leiningen's dependency management for Clojure) |
18:48 | <&ToxicFrog> | starkruzr: RHEL has actual support agreements with SLAs and stuff |
18:48 | < starkruzr> | doesn't Canonical? |
18:48 | < RchrdB> | Canonical is quite recent. |
18:48 | < starkruzr> | hrm. |
18:48 | <&ToxicFrog> | It also has a strong emphasis on stability over uptodateness, which is annoying if you want to use cutting-edge tech but great if you're managing a fleet of 50,000 machines. |
18:48 | < starkruzr> | I had thought they were always selling support. |
18:49 | <&ToxicFrog> | CentOS is based on RHEL (or vice versa), which is good if you don't have the need/budget for actual support but still want to be able to use public RHEL materials as a reference and value that stability. |
18:49 | < RchrdB> | Canonical was started in 2004. Debian and RedHat are both a lot older than that. |
18:50 | < RchrdB> | I think CentOS and RHEL did some kind of reverse project merge and now CentOS is effectively staging for RHEL like how OpenJDK is for Oracle JDK? |
18:50 | < RchrdB> | don't quote me on that but they did have a big kerfluffle and a bunch of generically-optimistic press releases, about a year ago |
18:51 | < RchrdB> | also, if your soul just doesn't work for some reason then you might accidentally find yourself liking CentOS. |
18:52 | <&ToxicFrog> | Yeah, I don't really pay attention to how RHEL/CentOS works, this is just my vague understanding of it |
18:52 | < RchrdB> | e.g. "yum" is different to "apt-get" and in a couple of ways nicer |
18:52 | <&ToxicFrog> | (I run SUSE Tumbleweed at home and work is all Ubuntu) |
18:52 | <@celticminstrel> | CentOS isn't the only one to use yum. |
18:52 | < RchrdB> | "chkconfig" in CentOS 6 was significantly nicer than whatever the equivalent in Debian 7 was |
18:53 | < RchrdB> | now they've all changed to systemd unit files so whatever |
18:54 | < RchrdB> | celticminstrel, it's RHEL/CentOS, Fedora and⦠SuSE? |
18:54 | <&ToxicFrog> | Yeah, Fedora is also yum-based, or was last time I used it |
18:54 | <&ToxicFrog> | SUSE is zypper |
18:54 | < RchrdB> | Oh. SUSE used to be rpm-based. |
18:54 | <&ToxicFrog> | Which I actually like more than either yum or apt-get |
18:54 | <&ToxicFrog> | Oh, it's still rpm-based |
18:54 | <@celticminstrel> | Those three might be related somehow. I forget. |
18:54 | <&ToxicFrog> | But it doesn't use yum as a frontend to rpm |
18:54 | < RchrdB> | Ah huh. Is it nicer? |
18:54 | <&McMartin> | Fedora recently shifted from yum to something also rpm-based called dnf |
18:55 | <@celticminstrel> | Bah. |
18:55 | <@celticminstrel> | I like yum though. |
18:55 | <@celticminstrel> | I suppose it might not affect existing systems. |
18:55 | <&ToxicFrog> | RchrdB: I personally think so |
18:56 | < catadroid> | did not finish? |
18:56 | <&McMartin> | Beats me |
18:57 | <&McMartin> | it seems to do the "sit around and resync everything in response to every command" thing less |
18:57 | <&McMartin> | But maybe it's doing that on cronjobs |
18:57 | <@celticminstrel> | ? |
18:58 | < RchrdB> | well |
18:58 | < catadroid> | every one of the 7 commits I've made today have included the word weasel |
18:58 | < catadroid> | I am the consummate professional |
18:58 | < RchrdB> | basically the tl;dr on this entire conversation is "there exist a number of Linux package managers, and they're all nice enough that it's slightly difficult to have strong opinions on which is better, but seriously fuck Windows Update" |
18:58 | < RchrdB> | seriously, fuck Windows Update |
18:59 | <@celticminstrel> | I also know of at least three command-line Mac package managers. |
18:59 | < RchrdB> | aka "the shitball that makes my laptop warm itself up just because I left a Win8 VM lying open doing nothing" |
18:59 | <@celticminstrel> | Can't you just disable it? |
19:00 | < RchrdB> | That would defeat the goal of having a secure, up to date Windows machine. |
19:00 | <@celticminstrel> | Oh. |
19:00 | <@celticminstrel> | I suppose it could. |
19:00 | | * celticminstrel has it set to notify but not download, I think. Although that's Win7. |
19:01 | <@celticminstrel> | Also, Firefox, why do you keep hanging for no reason. |
19:01 | <@celticminstrel> | Why is a script in chrome://browser/content/... unresponsive. |
19:02 | < RchrdB> | because many developers, much data, so unforeseen consequences, wow |
19:02 | | kourbou is now known as kourbou|foodz |
19:02 | <@celticminstrel> | What does places.js even do. |
19:03 | < RchrdB> | catadroid, your commit messages accuse whom of weaseldom? |
19:04 | < RchrdB> | :D |
19:05 | <@celticminstrel> | Oh, looks like it's related to the bookmarks/history/whatever window. |
19:16 | | catadroid [catalyst@Nightstar-amtka2.dab.02.net] has quit [Ping timeout: 121 seconds] |
19:17 | | catadroid [catalyst@Nightstar-vuk5nv.dab.02.net] has joined #code |
19:22 | | ErikMesoy [Erik@Nightstar-ki97ss.customer.cdi.no] has joined #code |
19:22 | | mode/#code [+o ErikMesoy] by ChanServ |
19:35 | | kourbou|foodz [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection reset by peer] |
19:42 | | * starkruzr is slowly working his way through webpy |
19:42 | < starkruzr> | this is, I suspect, deceptively easy. |
19:42 | < starkruzr> | I am waiting for something to go on fire. |
19:43 | < starkruzr> | also, since this thing seems to run its own webserver, I have two questions: 1) is there no equivalent of just a Python library for Apache like PHP has? it has to be its own thing? |
19:44 | < starkruzr> | 2) how do I ensure this starts at boot and stays running? |
19:45 | <@celticminstrel> | What is webpy anyway... |
19:46 | | GreenGuy|MC [GreenGuy@Nightstar-fik25i.gnomino.eu] has quit [Connection closed] |
19:46 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
19:46 | < starkruzr> | suspiciously easy-to-use web server library for Python |
19:46 | <@celticminstrel> | There's a Python thing for Apache similar to PHP, it's called WSGI. Mind you, I say "similar", but it works very difrerently. |
19:46 | <@celticminstrel> | I have no idea how or if that relates to web.py. |
19:46 | <@celticminstrel> | (Or rather, mod_wsgi) |
19:46 | < starkruzr> | hrm. |
19:47 | <@celticminstrel> | I know the wsgi modules in Python include a server implementation. |
19:47 | | * starkruzr scratches head |
19:52 | < RchrdB> | starkruzr, slightly involved topic, but whatever |
19:53 | < RchrdB> | you may know what CGI is? It's a standard for turning a HTTP request into a set of environment variables, a program invocation, and interpreting some data that is placed on that program's stdin, and interpreting whatever data comes out of that program's stdout |
19:53 | < RchrdB> | or it's a standard for invoking (shell or whatever) programs in response to HTTP requests |
19:54 | < RchrdB> | WSGI is a similar standard for invoking functions written in Python in response to HTTP requests |
19:56 | < RchrdB> | There are a variety of providers for the WSGI specification! mod_wsgi is one that runs inside Apache, for example. There are several WSGI servers that run as a process by themselves and receive HTTP requests on a socket, such as "waitress" and "gunicorn". |
19:58 | < RchrdB> | I am led to believe that mod_wsgi tends to behave poorly under load because apache is normally tuned for serving static files. |
19:58 | < RchrdB> | and apache's response to, e.g. 25 incoming concurrent http requests is to start 25 server processes |
19:59 | < RchrdB> | invoking 25 concurrent copies of your application code... |
19:59 | < RchrdB> | ...and it's usually more efficient to invoke approximately *one* copy of your application code per available CPU core (possibly plus a few, if there's a reasonable chance that they might block waiting for disk access) |
20:00 | < starkruzr> | okay, that makes sense. |
20:00 | < RchrdB> | ...running under something such as gunicorn or uwsgi (both are efficient, multi-process wsgi servers) |
20:00 | < RchrdB> | ...and proxy traffic into those from apache or nginx or something |
20:01 | < RchrdB> | kinda similarly to how everyone doing high-performance PHP tells you to use nginx with FCGI proxying to a fixed number of PHP processes |
20:02 | < RchrdB> | (with an opcode cache, since PHP doesn't include one out the box) |
20:02 | <@celticminstrel> | Opcode cache? |
20:02 | <@celticminstrel> | I think the most important question here though is: is web.py wsgi-based? |
20:03 | < RchrdB> | I haven't checked but I'll eat my hat if it isn't. |
20:03 | < RchrdB> | yep |
20:04 | < RchrdB> | like most Python web frameworks, web.py gives you an easy way to create a WSGI app object (which is just a thing that has a __call__(environ, start_response) method) |
20:05 | < RchrdB> | and as a convenience, I think it has some easy way to invoke it in development with a built-in WSGI web server |
20:06 | < RchrdB> | web.py, Flask, Pyramid, Django and pretty much all the modern python web frameworks work like this so that you can happily use them with any of the WSGI web servers like gunicorn, uwsgi, waitress, etc. |
20:06 | <&ToxicFrog> | RchrdB: yes, and the page I linked actually has an example of such |
20:06 | < RchrdB> | Nice. |
20:06 | <&ToxicFrog> | And honestly for an internal tool like this I'd probably just run the built-in webserver rather than set up a separate WSGI-enabled httpd to host it inside |
20:07 | | catadroid [catalyst@Nightstar-vuk5nv.dab.02.net] has quit [Ping timeout: 121 seconds] |
20:07 | <&ToxicFrog> | starkruzr: how to start it on boot and keep it running: what distro and version? If it's recent, write a systemd unit file for it and 'systemctl enable' it. If it'd not recent, write a SysV init script for it and use your local equivalent of chkconfig. |
20:07 | < RchrdB> | celticminstrel, "opcode cache": out the box, mod_php re-parses the invoked source .php file and every php file it include() or include_once()s, on every request |
20:08 | < RchrdB> | celticminstrel, this makes e.g. wordpress run amusingly slow out the box. |
20:09 | < RchrdB> | If you set up an add-on such as "APC", it can do something slightly more sensible and actually keep the PHP VM bytecode between requests. |
20:09 | < RchrdB> | ToxicFrog, right. |
20:10 | < starkruzr> | Ubuntu, and dear God |
20:11 | < starkruzr> | I was hoping it was going to be easier than that |
20:11 | < RchrdB> | starkruzr, if you're writing an internal tool and your performance requirements are, like, 1 rq/s and your application code is a dozen lines that complete in less than 1ms (all of which sounds entirely reasonable in your use case), then worrying about optimal deployed performance is silly because even the crummy wsgi server that comes bundled with stock Python will be more than fast enough by a couple orders of magnitude. |
20:11 | < RchrdB> | What Ubuntu? |
20:11 | < starkruzr> | RchrdB: sure |
20:11 | < starkruzr> | 15.04. |
20:11 | < RchrdB> | That'll be systemd, then. |
20:12 | < starkruzr> | yeah |
20:12 | < starkruzr> | just every time I have tried to do something with systemd I've gotten it wrong |
20:12 | < RchrdB> | If you really, REALLY hate systemd then I think supervisord might be easier to configure. |
20:12 | <&ToxicFrog> | starkruzr: easier? Writing a systemd unit file for this sort of thing is really easy |
20:12 | < RchrdB> | or maybe not |
20:12 | <&ToxicFrog> | It's like ten lines of config file, 'systemd enable <name of service>', done. |
20:12 | < RchrdB> | ToxicFrog, well that's pleasingly nicer than having to write a frigging sysv init script :x |
20:12 | <&ToxicFrog> | Yes. |
20:13 | < starkruzr> | I think it was all the "requires" or "depends" or whatever it was that kept tripping me up |
20:14 | <&ToxicFrog> | As an example, here's the unit file for the doomrl http server: https://gist.github.com/anonymous/591173dac50312a16168 |
20:15 | < starkruzr> | right, then |
20:16 | <&ToxicFrog> | It should probably have a Requires=network-online.target or similar, but multi-user already brings up the network, so *shrug* |
20:16 | < starkruzr> | PIDFile: is this something I determine? ExecStart: is this literally the command to run the thing, or is it something else? Restart: this restarts the job if it dies, yes? WantedBy: if I put "multi-user.target" here does that just essentially mean "do this when I start the system?" |
20:17 | <&ToxicFrog> | PIDFile is "this program writes its actual PID to this file; systemd should read the file once it starts up to determine what PID it has, rather than trusting it not to fork or some such". You probably don't need to worry about that. |
20:18 | <&ToxicFrog> | ExecStart is "run exactly this command to start the service". |
20:19 | <&ToxicFrog> | Restart=always is "restart this when it exits no matter how it exited". There are other settings you can use to, e.g., restart it if it crashed but not if it exited normally. |
20:19 | <&ToxicFrog> | WantedBy under [Install] is used by 'systemctl enable'; it basically means '"enable" this service by adding it to the list of things that multi-user mode starts, and "disable" it by removing it from that list' |
20:20 | < RchrdB> | ...i thought part of the point of systemd was that it no longer needed to trust pidfiles at all because it started each daemon under a unique cgroup? |
20:20 | <&ToxicFrog> | RchrdB: yeah, but that lets it say "everything in this cgroup is part of the service" |
20:21 | <&ToxicFrog> | The PIDFile lets it also say "...and this specific process is the 'main' process and the one you should look at first if things are on fire" |
20:21 | <@celticminstrel> | "on fire" |
20:21 | < RchrdB> | am I right in understanding that the nice thing about systemd is that you can run a program as a daemon under it without having to do any of the traditional weirdness like double-forking? AIUI it's like supervisord or daemontools in that you can just stay in the foreground and log to stdio, and everything works. |
20:21 | < RchrdB> | ah cool |
20:21 | <&ToxicFrog> | RchrdB: yeah, but some programs will fork unconditionally and can't be told not to do so |
20:22 | <&ToxicFrog> | In this case I don't think thttpd forks, but it writes the pidfile regardless, so might as well document that in the unit file |
20:22 | <@celticminstrel> | thttpd? |
20:22 | <@Tamber> | Well, thppppd to you, too! |
20:22 | <&ToxicFrog> | Honestly I didn't put a lot of effort into setting up thttpd, I just wanted something to serve a bunch of static files and it fit the bill |
20:22 | <&ToxicFrog> | celticminstrel: Tiny HTTPD. |
20:23 | <@celticminstrel> | Ah. |
20:23 | <&ToxicFrog> | In this case, the software serving http://phobos.ancilla.ca:8666/ |
20:24 | <@celticminstrel> | That doesn't look very static. |
20:25 | <&ToxicFrog> | It entirely is. |
20:25 | <&ToxicFrog> | It's a bunch of static HTML that is generated afresh by the doomrl telnet server whenever someone finishes a game. |
20:25 | <@celticminstrel> | Ah. |
20:28 | <@celticminstrel> | Why is Firefox started directly from the root launchd, while everything else with UI is started by a different launchd... |
20:28 | <@celticminstrel> | (Well, except an Adobe installer. Why is that even open?) |
20:28 | < RchrdB> | ToxicFrog, sure, that makes sense. |
20:29 | < RchrdB> | I just think the old Unix convention of "every single process must independently reimplement these specific 9 unix daemonisation steps WITHOUT ANY ERRORS NO MATTER HOW SUBTLE, the first of which is fork()ing twice and..." is, in retrospect, silly. |
20:29 | <&ToxicFrog> | Oh, I agree. |
20:29 | < RchrdB> | and e.g. Ritchie et al worked so hard to give us stdio streams, why NOT use just |
20:29 | <@celticminstrel> | Why forking twice? |
20:30 | <&ToxicFrog> | But there's a lot of code out there that does do this, and writing your init system in such a way that it can't cope with such programs would be incredibly stupiud. |
20:30 | < RchrdB> | ofc, so kudos to systemd for coping regardless :) |
20:31 | < RchrdB> | *just use them for logging so that debug-logging and production-logging can be the same easy syscall, and logging policy (rotation, etc) can be passed off to some other tool and configured uniformly, rather than every tool having its own arcane syntax-of-the-week for how to make log rotation work⦠|
20:31 | <@celticminstrel> | Isn't Ritchie the R in K&R? |
20:31 | < RchrdB> | yes |
20:31 | <&ToxicFrog> | Yes. |
20:32 | <&ToxicFrog> | He's also the R in the R&T who created UNIX. |
20:32 | < RchrdB> | celticminstrel, fork()ing twice is some arcane bollocks about detaching from your controlling terminal. |
20:34 | < RchrdB> | You "have" to do something silly like fork(), then the child from the 1st fork calls fork() again, and the grandchild process will implement the actual daemon. |
20:34 | <&ToxicFrog> | The first fork() detaches it from the controlling terminal and causes the child to be reparented to init, which is usually sufficient. |
20:34 | < RchrdB> | oh, it's so that you end up with init being your parent, right. |
20:35 | <@celticminstrel> | Which apparently Firefox also does for some reason. |
20:35 | <&ToxicFrog> | The second fork makes it possible, via some arcana I don't understand, to ensure that the child can't even acquire a controlling terminal even by accident; it's basically an extra layer of safety. |
20:36 | <&McMartin> | And by arcane bollocks you of course mean "doing anything else in any conceivable design is literally insane" because the Internet has turned everything into treehouse fights |
20:36 | <&McMartin> | (Whatever happened to the systemd butthurt set-the-internet-on-fire movement anyway) |
20:36 | <&ToxicFrog> | (they're still around, but no-one listens to them anymore because systemd has turned out to be pretty great~) |
20:38 | <&McMartin> | Something on my Fedora system has been either hanging on poweroff or shutting down too soon, such that everything halts but then the final ACPI command isn't sent to the system |
20:38 | <&ToxicFrog> | RchrdB: anyways, AIUI, the first fork + the parent exiting is all you actually need for daemonization (and how I always wrote my daemons), the second fork just makes sure someone can't (e.g.) tell it to open /dev/tty* and end up connected to an actual terminal someone is about to type ^C in. |
20:41 | < RchrdB> | o_O |
20:41 | < RchrdB> | Cute. |
20:41 | <&ToxicFrog> | starkruzr: heading home now, let me know if you have any more systemd questions |
20:43 | < RchrdB> | Historically I've run daemonic processes by having them stay in the foreground and running them under supervisord. |
20:43 | < RchrdB> | Pleasingly easy, works fine under weird operating systems like OS X. |
20:45 | < RchrdB> | McMartin, sorry, the "arcane bollocks" dismissal was mostly just about the fact that I find it weird that so many reimplementations-by-hand of the unix daemonisation process exist. I never got why the unix-using community didn't take the obvious step of semi-standardising on, like, libdaemon.so or something. |
20:46 | <&McMartin> | RchrdB: Oh, I'm not actually contradicting you here, I was mostly grousing about The Perfidy Of The Internet and what people will get used to :) |
20:46 | < RchrdB> | (I have no idea if there does exist something called "libdaemon.so" and if there is, I meant a hypothetical one rather than a specific one.) |
20:46 | < RchrdB> | heh |
20:48 | <&ToxicFrog> | RchrdB: yeah, these days I just host all my daemons under systemd and it's much more civilised |
20:48 | <&ToxicFrog> | I mean back in the 90s when I was just learning about daemons |
20:49 | < RchrdB> | the 90s were very much the bad old days. |
20:50 | < RchrdB> | Did you start out on Suns or BSD or something? |
20:50 | | Meatyhandbag [sebastianfe@Nightstar-giq.1br.73.97.IP] has quit [Client exited] |
20:50 | <&McMartin> | Man, in the 90s I was hacking CONFIG.SYS files and poking into A000:000 |
20:50 | | * McMartin thinks |
20:50 | <&McMartin> | ... I guess by '96 I had access to labs that were running HP-UX of all things |
20:51 | <@Tamber> | When people start reminiscing about the Old Days of computing, I get the feeling that I missed out on all the neat new-frontiers stuff. ...probably for the best, though. :p |
20:52 | <&McMartin> | I do have a fondness for vintage computing, personally, but that's a very different beast |
20:52 | < RchrdB> | The nice thing about the past being the past is that you get to take advantage of all the stuff they did back then. |
20:53 | <@Tamber> | Quite so. |
20:53 | <&McMartin> | An awful lot of stuff from the 90s is basically "today but much more cramped and unpleasant" |
20:53 | < RchrdB> | e.g. sure, it sucks that Moore's Law is no longer doubling the singlethreaded performance of our computers every year-and-a-half |
20:53 | <&McMartin> | Hacking on 80s machines is about commanding very special-purpose hardware, though, and that is way more appealing. |
20:53 | < RchrdB> | on the other hand, the performance of our computers is awesometastic right now because we already have the compounded multiple-decades of Moore's Law past. |
20:54 | <&McMartin> | It's possible that had I gotten seriously into Amigas or Atari STs or whatever I could get them to do neat things and enjoy it but I strongly suspect that would feel like programming for, say, MacOS System 7 would be |
20:54 | <&McMartin> | Which is to say, ick. |
20:54 | <&ToxicFrog> | RchrdB: I grew up on SysV, yes. |
21:03 | < RchrdB> | good for you |
21:03 | | * RchrdB has yet to grow up ;) |
21:03 | <@Tamber> | Don't do it, it's a trap. |
21:04 | | mode/#code [+ooooooooooooooo abudhabi tripflag Attilla NSGuest24044 simon_ RchrdB VirusJTG Xon catalyst grindhold Turaiel EvilDarkLord khyperia [R] starkruzr] by Tamber |
21:15 | <@starkruzr> | \o/ |
21:15 | | * starkruzr uses his powers for evil |
21:16 | | macdjord|slep is now known as macdjord |
21:18 | <@RchrdB> | McMartin, A000:0000 is where the framebuffer is mapped on an IBM PC? |
21:21 | <&McMartin> | The MCGA/VGA 320x200x256 one, yeah. |
21:22 | <&McMartin> | The text/color videomatrix was at B800:0000 and honestly saw rather more use from me. |
21:22 | <&McMartin> | It might be worth a laugh to put gas or nasm into 16-bit mode and throw together some .COM files for old times' sake, but ehn |
21:26 | <@RchrdB> | amd64 gas is *kinda* surprisingly nice, in my weird opinion. |
21:27 | <@RchrdB> | poke some numbers into the first few registers and invoke "syscall" and away you go~ |
21:27 | <&McMartin> | Well, it doesn't have the 20 years of inertia of not-AT&T syntax the way 16- and 32-bit x86 asm do. |
21:27 | <&McMartin> | Well, the 16-bit stuff would be less syscall and more int 10h or int 13h or int 22h~ |
21:39 | <@starkruzr> | okay so |
21:39 | <@starkruzr> | I just want to make sure it's actually this easy |
21:39 | <@starkruzr> | curl --data "param1=value1¶m2=value2" http://example.com/thing.php |
21:39 | <@starkruzr> | in my PHP script, $_POST[param1] will now magically be "value1?" |
21:42 | <@RchrdB> | Yes, but you need to make sure that value1 and value2 are already URL-encoded. |
21:42 | <@starkruzr> | ok, meaning what? |
21:43 | <@starkruzr> | oh |
21:43 | <@RchrdB> | e.g. curl --data "param1=%26param3%3Dwhatever" http://example.com/thing.php is how you would go about getting $_POST["param1"] to be literally the string "param3=whatever" |
21:43 | <@starkruzr> | right |
21:44 | <@starkruzr> | well |
21:44 | <@TheWatcher> | http://www.url-encode-decode.com/ may help |
21:44 | <@starkruzr> | with another %26 on the end |
21:44 | <@starkruzr> | it looks like curl has a --data-urlencode for this |
21:45 | <@RchrdB> | ye-es |
21:45 | <@RchrdB> | I am not 100% sure that using it is entirely safe because it does questionable things if the first character is an '@'. |
21:45 | <@starkruzr> | ah. |
21:45 | <@starkruzr> | that will not happen here, but that's good to remember in the future. |
21:47 | <@RchrdB> | on closer reading of the manual, I think that this is safe: curl --data-urlencode "param1=$value1" --data-urlencode "param2=$value2" http://example.com/thing.php |
21:48 | <@starkruzr> | excellent |
21:48 | <@starkruzr> | and when it gets to PHP, it will already be "normal?" |
21:48 | <@starkruzr> | i.e. decoded? |
21:50 | <@RchrdB> | I'll be severely surprised if it isn't. |
21:51 | <@RchrdB> | I wouldn't put it past PHP's designers to be so bad at making a useful programming language that maybe the answer is actually no, though. |
21:52 | <@TheWatcher> | It does |
21:53 | <@RchrdB> | Good. |
21:55 | <@starkruzr> | Whew. |
21:56 | <@starkruzr> | do I need '' or anything around the values? |
21:56 | <@starkruzr> | like --data-urlencode "param1='stuff'" |
21:56 | <@TheWatcher> | no |
21:56 | <@starkruzr> | or similar? |
21:56 | <@starkruzr> | better and better |
21:56 | <@TheWatcher> | Actually, wait |
21:57 | <@TheWatcher> | $_GET and $_REQUEST get passed through urldecode |
21:57 | <@starkruzr> | ... |
21:57 | <@TheWatcher> | but I think $_POST may not be |
21:57 | | * TheWatcher double-checks |
21:58 | <@starkruzr> | http://stackoverflow.com/questions/3384168/php-not-decoding-post |
21:58 | <@starkruzr> | it looks like POST does urldecode |
21:58 | <@starkruzr> | (this guy was encoding twice for some reason) |
21:59 | | Kindamoody|afk is now known as Kindamoody |
21:59 | <@RchrdB> | presumably calling encodeURIComponent() manually before passing the data to a library that was calling encodeURIComponent() for them again. |
21:59 | <@starkruzr> | Yeah. |
22:00 | <@starkruzr> | oh god oh god. if this works I will Paypal each of you a dollar, I swear to God. |
22:00 | <@RchrdB> | I have a better idea: stick around and help the next newbie to show up. |
22:01 | <@TheWatcher> | Well, in this test on 5.6.9: <?php echo "Got thing: ".$_POST['foo']; ?> when I do ` curl --data-urlencode "param1=Thiog%3Ahere%23there" http://starforge.co.uk/int/test2.php` I get |
22:01 | <@RchrdB> | or just stick around and be fun to talk to. :) |
22:01 | <@TheWatcher> | Got thing: Thiog%3Ahere%23there |
22:01 | <&ToxicFrog> | starkruzr: Did you end up dropping python and using php in the end? |
22:01 | <@TheWatcher> | so |
22:01 | | * starkruzr can do that too |
22:01 | <@starkruzr> | ToxicFrog: Yeah, Python is going to require too much setup for me to justify it in the roughly 3 hours I have to complete this task |
22:01 | <@TheWatcher> | Gah, I mean `curl --data-urlencode "foo==Thiog%3Ahere%23there" http://starforge.co.uk/int/test2.php` |
22:02 | <@RchrdB> | TheWatcher, yes, data-urlencode takes raw data and urlencodes it for you, if you use tcpdump or wireshark to look at the what goes over the TCP connection when you run "curl --data-urlencode param1=Thiog%3Ahere%23there", you'll see that it's double-urlencoded. |
22:02 | <&ToxicFrog> | starkruzr: aah. |
22:02 | <@TheWatcher> | ... oh, yeah |
22:02 | <@TheWatcher> | Don't mind me |
22:02 | <@starkruzr> | Oh, I see what happened there. |
22:02 | <@RchrdB> | it's --data that assumes your data is already-urlencoded and does questionable things with @ characters at the starts of value strings |
22:02 | <@TheWatcher> | Yeah, if I actually engage my brain, it works |
22:03 | <@TheWatcher> | Apparently I should not be doing codythings right now. |
22:03 | <@starkruzr> | A friend of mine gave me some really nice pre-sanitizing mysqli code ot use |
22:04 | <@starkruzr> | So I've been chopping that up for these purposes. |
22:04 | | * ToxicFrog nods |
22:04 | <@RchrdB> | I strongly recommend picking up the use tcpdump or wireshark, and strace, and maybe ltrace, as soon as possible, because those kinds of tools make it much easier to see what a program is really doing regardless of what the documentation says it does. ;) |
22:04 | <@starkruzr> | Like there's XSS protection in here and so on. |
22:04 | <@RchrdB> | like, not in the next 3 hours |
22:04 | <@starkruzr> | Right. |
22:04 | <&ToxicFrog> | I didn't realize you were under such a tight time limit. |
22:04 | <@RchrdB> | but they're all really neat tools so soonish |
22:04 | | * starkruzr also has to learn Chef at some point, so there's that |
22:04 | <@starkruzr> | And I think Chef is Python-based? |
22:05 | <@RchrdB> | Chef is written in Ruby. |
22:05 | <&ToxicFrog> | If at some point you find yourself adding to this, I strongly recommend rewriting it in not-PHP rather than unleashing another non-trivial PHP project on the world. |
22:05 | <@starkruzr> | ToxicFrog: Yeah. |
22:05 | <@starkruzr> | I actually took a day off today so I could work. |
22:05 | <@starkruzr> | (Wrap your head around that.) |
22:06 | <@RchrdB> | At first glance that sounds like you might have an accidentally-abusive employer if that's the case. o_O |
22:06 | <@RchrdB> | Hopefully I'm just misreading that. |
22:06 | | RchrdB [RchrdB@Nightstar-952.jvr.168.194.IP] has quit [[NS] Quit: Leaving] |
22:07 | <@starkruzr> | My boss, I'm pretty sure, thinks I'm useless, and so refuses to listen to me when I tell him things like "no, trying to do this by dropping files in network locations with bash scripts and then processing the files later, just so you can be satisfied that I 'accomplished something today,' is a Very Bad Ideaâ¢." |
22:07 | <&McMartin> | Didn't you say you mostly did sysadmin work? |
22:07 | <@starkruzr> | Yes. |
22:07 | <&McMartin> | Isn't a day where nothing happens a day where the sysadmin did the best possible job at their most important job? |
22:08 | | * starkruzr merely arches an eyebrow. |
22:08 | <@Tamber> | Not if you're confusing motion for progress. |
22:08 | <&McMartin> | Tamber: Right, but, well |
22:08 | <@starkruzr> | We have an Agenda, you see, with Tasks on it which must be accomplished. |
22:08 | <&McMartin> | IT's whole remit is "stuff needs to not be on fire" |
22:08 | <&McMartin> | Thus, a day that ends with "stuff on fire: 0%" is The Best Day. |
22:09 | <@starkruzr> | Sure. But in his defense(?), there are many things we could be doing better. This is part of attempting to do that. |
22:09 | <@Tamber> | Sure, but that being successfully accomplish relies on IT not being managed by an incompetent who defines things going right as: "busy people in seats"~ |
22:09 | <&McMartin> | Tamber: well, that would be fine, really |
22:11 | <@starkruzr> | which curl |
22:11 | <@starkruzr> | oops |
22:11 | <@Tamber> | The curly one! |
22:14 | <&ToxicFrog> | Playing DoomRL counts as "busy", right~ |
22:14 | <@Tamber> | :) |
22:14 | <@Tamber> | As long as it looks like work... |
22:15 | <@starkruzr> | I have to be honest -- I LOVE this stuff. I can't remember the last time I was this excited about freaking *working*. |
22:15 | <@Tamber> | :D |
22:15 | <@starkruzr> | And this is SUPER basic stuff. |
22:15 | <@Tamber> | Everything's basic, at one point. :) |
22:16 | <@Tamber> | You just keep sticking basic things together in the right ways, and suddenly you have all this complexity! |
22:16 | | Thalatwerk [thalass@Nightstar-hfr.psa.114.24.IP] has joined #code |
22:16 | <&ToxicFrog> | Sounds like you should transfer to more engprod/SRE/SWE style stuff >.> |
22:16 | <@starkruzr> | SRE/SWE? |
22:16 | <@starkruzr> | engprod, for that matter? |
22:16 | <@starkruzr> | I would really like to move towards devops. (Hence my need to learn Chef) |
22:17 | <&ToxicFrog> | SWE: Software Engineer; SRE: Site Reliability Engineer, the people who write the software and install the hardware that keeps the datacenters running. |
22:17 | <@starkruzr> | Ooh, yes. |
22:18 | <&ToxicFrog> | EngProd: Engineering Productivity, the people who write the software that the SREs and SWEs use to write software -- version control integration, custom compilers, and the like. |
22:18 | <@starkruzr> | Like, I have all of this TechOps/sysadmin experience. I have to imagine combining that with some basic development facility has to make me pretty useful to somebody. |
22:19 | <&ToxicFrog> | programming is hella useful to sysadmins in general, IME. |
22:19 | | * starkruzr has screwed around with PowerShell quite a bit too |
22:19 | <&McMartin> | That's, like, the *entire* Perl community, and PowerShell, yeah |
22:19 | <&ToxicFrog> | This reminds me, time to update ancilla |
22:19 | <&McMartin> | And about 80% of the Python community |
22:27 | <@starkruzr> | DEAR |
22:27 | <@starkruzr> | SWEET |
22:27 | <@starkruzr> | MOTHER |
22:27 | <@starkruzr> | OF GOD |
22:27 | <@Tamber> | Don't invoke her; you don't want to deal with the tentacles, or sigils. You'll end up like TheWatcher, over there... |
22:27 | <@TheWatcher> | Oi! |
22:28 | <@Tamber> | :D |
22:28 | <@Reiv> | Did that need four lines |
22:28 | <@starkruzr> | THE HIIIIIILLS ARE ALIIIIIVE WITH THE SOUND OF WORKING THINGS |
22:28 | <@Tamber> | ("...tanks, mostly.") |
22:28 | <@starkruzr> | Reiv: yes |
22:28 | <&McMartin> | Man, this subproject is really making me appreciate Java more -_- |
22:28 | <@starkruzr> | ... really? Why? |
22:28 | <@Reiv> | Because he's not in Java |
22:29 | <@Reiv> | And Java is not actually a crime |
22:29 | <&McMartin> | Because about 90% of my work here is stuff that Java's database layer would have done automatically without anybody anywhere having to care |
22:29 | <&McMartin> | It's mostly data marshalling/unmarshalling bullshit, which is why I'm writing programs to do it for me |
22:29 | <&McMartin> | But Java includes the capability to say "find the field in this object the source code names "foo" and set it to 3, please" |
22:30 | <&McMartin> | Which makes all that be, like, one loop that somebody else wrote 15 years ago and then nobody ever maintained because they *didn't need to* |
22:30 | <&McMartin> | It's also the thing that when people come along to "improve" it that gets you the AbstractBeanMarshallerFactoryFactory, which is why it so often comes under fire |
22:31 | <@TheWatcher> | Isn't that missing a Factory?~ |
22:32 | <&McMartin> | That's future work, in case additional convenience is needed. |
22:32 | <&McMartin> | For some of the cases where you'd just throw Hibernate or similar at it in Java I've come up with some fairly nice C++ solutions that give you a nice fully-typed interface but also fuckups are detected at compile time, which the reflection-based systems *can't* really do |
22:32 | <&McMartin> | But now I'm a level down in C and trying to shoehorn C++ into this part turns out to make it worse, so... |
23:17 | | Kindamoody is now known as Kindamoody[zZz] |
23:31 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:31 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
23:32 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: ] |
23:46 | | catadroid [catalyst@Nightstar-ej6mle.dab.02.net] has joined #code |
23:46 | | Thalatwerk is now known as Thalass|TF2 |
--- Log closed Thu Jun 25 00:00:11 2015 |