--- Log opened Wed Jan 08 00:00:28 2014 |
00:28 | <@JustBob> | Chrome completely fucked my other computer up. |
00:28 | <@JustBob> | It started doing the "can't display this page/reload" thing, followed by about 57 BSoDs and a corrupted boot sector/whateverthefuck. |
00:28 | <@JustBob> | I had to nuke and pave that machine to get it to stop randomly BSoDing on me. |
00:38 | | You're now known as TheWatcher[T-2] |
00:50 | | himi [fow035@Nightstar-q9amk4.ffp.csiro.au] has joined #code |
00:50 | | mode/#code [+o himi] by ChanServ |
00:51 | | You're now known as TheWatcher[zZzZ] |
00:58 | | * thalass gragh |
01:00 | <@thalass> | I've managed to get my little flashcard program to work... but only with the last pair of words in the file. I end up with a two item list (specifically: ['understand', 'connait']). |
01:01 | <@thalass> | What i think i want is a list of these two-item lists (a matrix?), so i can randomly select one pair, then randomly select one of the items in the pair. Still reading on how to make this happen. |
01:05 | <&McMartin> | Are you using = at some point instead of "append"? |
01:05 | <&McMartin> | (You'll have to start by initializing it to []) |
01:17 | <&Derakon> | Your program should look something like this: |
01:17 | <&Derakon> | cards = [] |
01:17 | <&Derakon> | filehandle = open('cards.txt', 'r') |
01:18 | <&Derakon> | for line in filehandle: |
01:18 | <&Derakon> | extract pair of words from line |
01:18 | <&Derakon> | cards.append((firstWord, secondWord)) |
01:18 | <&Derakon> | print random.choice(cards) |
01:19 | <&McMartin> | Actually, he wants to see random.choice(random.choice(cards)) and ultimately reveal the other one |
01:19 | <&Derakon> | Mm, true. |
01:19 | <&Derakon> | Still, the first thing to do is assemble the cards list properly. |
01:19 | <&McMartin> | Aye |
01:20 | | * thalass nods |
01:23 | <&Derakon> | The important things here are 1) using append() to add to the list, and 2) the extra set of parentheses. |
01:24 | <&Derakon> | (firstWord, secondWord) is a tuple. |
01:24 | <&Derakon> | So you end up with a list of tuples, each tuple having 2 words in it. |
01:24 | | * thalass nods |
01:24 | <&Derakon> | Just doing, say, cards.append(firstWord, secondWord) would be a syntax error, I believe. |
01:24 | <&Derakon> | Since you'd be trying to use append to add 2 items to the list at a time, and append only takes 1 item. |
01:24 | <@thalass> | Ah yes. I think i see. |
01:30 | | gnolam [lenin@Nightstar-lgrapr.tbcn.telia.com] has quit [[NS] Quit: Gone] |
01:35 | <@thalass> | I think part of the problem is that my wordlist.txt file is lines like this "hello|bonjour". So the first thing i do is separate the two words with "words = line.split('|')" I could probably fix this by just having each line be "hello, bonjour" |
01:39 | <&ToxicFrog> | No. |
01:40 | <&ToxicFrog> | (firstWord, secondWord) and ("firstWord, secondWord") are not the same thing. |
01:42 | <&Derakon> | Your current file arrangement is ideal, in fact. |
01:42 | <&Derakon> | You can just do |
01:42 | <&Derakon> | firstWord, secondWord = line.split('|') |
01:42 | <&Derakon> | and get the result you want. |
01:42 | <&ToxicFrog> | The idea is to split each line into both words, then pack those two words into a tuple (an immutable container for multiple values); since the tuple is itself a single value, you can then append it to the list. |
01:46 | | frozenspace is now known as iospace |
01:53 | <@thalass> | hrm. |
03:08 | | Orth [Orthia@Nightstar-rkmjmu.ihug.co.nz] has joined #code |
03:10 | | Turaiel[Offline] is now known as Turaiel |
03:31 | | Draak [Godbehere@Nightstar-hl453o.zing-net.ca] has joined #code |
04:10 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
04:31 | | Draak [Godbehere@Nightstar-hl453o.zing-net.ca] has quit [Ping timeout: 121 seconds] |
04:57 | | Derakon is now known as Derakon[AFK] |
05:01 | | Yan_Xiao_Lin [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
05:09 | | RichyB [RichyB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.] |
05:12 | | RichyB [RichyB@Nightstar-c6u.vd5.170.83.IP] has joined #code |
05:17 | | Harlow [harlow@Nightstar-2dbe3d64.il.comcast.net] has joined #code |
05:23 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
05:27 | <@thalass> | Oh woot. Thanks guys. I've managed to get it working. Sleep now, but i'll get it looping tomorrow with some extra options like "exit". :D |
05:29 | | thalass is now known as Thalasleep |
06:13 | | Syka [the@Nightstar-3ee.n40.126.1.IP] has quit [Ping timeout: 121 seconds] |
06:18 | | Turaiel [Brandon@Nightstar-74s.inb.219.141.IP] has quit [Ping timeout: 121 seconds] |
06:18 | | [R] [rstamer@genoce.org] has quit [Ping timeout: 121 seconds] |
06:18 | | [R] [rstamer@Nightstar-d7h8ki.org] has joined #code |
06:18 | | Turaiel [Brandon@Nightstar-vku52k.resnet.mtu.edu] has joined #code |
06:29 | | ErikMesoy|sleep is now known as ErikMesoy |
06:33 | | Harlow [harlow@Nightstar-2dbe3d64.il.comcast.net] has quit [[NS] Quit: BED] |
07:12 | | You're now known as TheWatcher |
07:25 | | himi [fow035@Nightstar-q9amk4.ffp.csiro.au] has quit [Ping timeout: 121 seconds] |
07:31 | | Turaiel is now known as Turaiel[Offline] |
08:10 | | You're now known as TheWatcher[afk] |
08:30 | | Syka [the@Nightstar-6tt.bm3.151.1.IP] has joined #code |
09:26 | | Syka [the@Nightstar-6tt.bm3.151.1.IP] has quit [Connection closed] |
09:27 | | Derakon[AFK] [Derakon@Nightstar-4k2ccr.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
09:45 | | Syka [the@Nightstar-jb6.25j.126.1.IP] has joined #code |
10:02 | | You're now known as TheWatcher |
10:10 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
10:10 | | mode/#code [+o himi] by ChanServ |
10:12 | | You're now known as TheWatcher[d00m] |
10:33 | | You're now known as TheWatcher |
11:06 | | Derakon [Derakon@Nightstar-cb57nb.ca.comcast.net] has joined #code |
11:06 | | mode/#code [+ao Derakon Derakon] by ChanServ |
11:14 | | Vornicus [Vorn@Nightstar-sn7kve.sd.cox.net] has quit [Connection reset by peer] |
11:35 | | Syka [the@Nightstar-jb6.25j.126.1.IP] has quit [Connection closed] |
13:53 | | You're now known as TheWatcher[d00m] |
14:40 | | Yan_Xiao_Lin [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
14:42 | | Thalasleep is now known as Thalass |
15:03 | | You're now known as TheWatcher[afk] |
15:07 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has joined #code |
15:07 | | mode/#code [+o celticminstrel] by ChanServ |
15:15 | | Stalker [Z@Nightstar-ro94ms.balk.dk] has joined #code |
15:27 | | macdjord [macdjord@Nightstar-c0i1dq.cable.rogers.com] has quit [Ping timeout: 121 seconds] |
15:28 | | macdjord [macdjord@Nightstar-c0i1dq.cable.rogers.com] has joined #code |
15:57 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
16:55 | | You're now known as TheWatcher[afk |
16:55 | | You're now known as TheWatcher |
17:16 | | * simon_ did something crazy and signed up to be a TA on the "project development course", which is a five-month course for 1st year CS students where they are encouraged to seek external companies and ask them if they can make any small projects for them. |
17:17 | <@simon_> | it is notoriously poorly run by near-retired professors who can't code and have an academic relationship to project development. |
17:17 | < RichyB> | You're a loony. |
17:17 | <@simon_> | yes. |
17:17 | < RichyB> | Good luck. |
17:18 | <@ErikMesoy> | But will you get points for being a loony? |
17:18 | <@simon_> | ErikMesoy, money points. |
17:18 | <@simon_> | ErikMesoy, it's an insanely well-paid TA position. |
17:18 | <@ErikMesoy> | Right. |
17:18 | < RichyB> | Because no sane person wants to do it? |
17:18 | <@simon_> | in 5 months I'll have earned $6.100 after taxes in effortless mentoring. |
17:19 | < RichyB> | Boy are you ever being ripped off. |
17:19 | <@simon_> | RichyB, no, due to a bug. normal courses only take half a semester and require you to do tons of reading weekly assignments. this course has twice that time and no assignments to read through. |
17:19 | <@simon_> | so... it's a "show up once a week and help people with programming language XYZ." |
17:20 | <@simon_> | I can basically study full time on the side. |
17:20 | <@simon_> | RichyB, as in how? |
17:21 | < RichyB> | Hmmokay, I was assuming your workload was higher. |
17:21 | <@simon_> | yeah |
17:21 | <@simon_> | I guess it doesn't easily compare to a full-time job once I graduate. |
17:22 | <@Thalass> | Nice |
17:23 | <@simon_> | now I just have to come up with my own curriculum for the few hours a week I have to show up. |
17:24 | <@simon_> | http://try.github.io/ looks nice, except it punishes you for running the "wrong" commands. |
17:46 | <@Azash> | simon_: I think you can scratch "effortless mentoring" if it's anything like our SE final |
17:47 | <@Azash> | As you will probably have to supervise their work process and make sure they get somewhere as well as address design issues, help them get over the spaghetti dealing with clients, etc |
17:47 | <@Azash> | Unless you actually got the job description and it just says you're helping with sheer code |
17:55 | | gnolam [lenin@Nightstar-6f8jnc.ictservices.se] has joined #code |
17:55 | | mode/#code [+o gnolam] by ChanServ |
18:40 | | Thalass [thalass@Nightstar-bce70i.eastlink.ca] has quit [[NS] Quit: Leaving] |
18:40 | | Thalass [thalass@Nightstar-bce70i.eastlink.ca] has joined #code |
18:44 | | Turaiel[Offline] is now known as Turaiel |
19:45 | | gnolam [lenin@Nightstar-6f8jnc.ictservices.se] has quit [[NS] Quit: Latrine] |
20:09 | | Turaiel is now known as Turaiel[Offline] |
20:12 | | Harlow [harlow@Nightstar-2dbe3d64.il.comcast.net] has joined #code |
20:14 | | Turaiel[Offline] is now known as Turaiel |
20:34 | | Orth [Orthia@Nightstar-rkmjmu.ihug.co.nz] has quit [Connection reset by peer] |
20:50 | | Turaiel is now known as Turaiel[Offline] |
20:50 | | Turaiel[Offline] is now known as Turaiel |
21:09 | | Turaiel is now known as Turaiel[Offline] |
21:12 | | Vornicus [Vorn@Nightstar-sn7kve.sd.cox.net] has joined #code |
21:12 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
21:23 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has joined #code |
21:23 | | mode/#code [+o celticminstrel] by ChanServ |
21:26 | | gnolam [lenin@Nightstar-162olm.cust.bredbandsbolaget.se] has joined #code |
21:26 | | mode/#code [+o gnolam] by ChanServ |
21:26 | <&McMartin> | Huh, CentOS just got absorbed by Red Hat |
21:26 | <&McMartin> | I have no idea how to react to this |
21:29 | <&jerith> | I thought CentOS was just RHEL with the branding filed off. |
21:30 | <&Derakon> | RHEL without the support, yeah. |
22:01 | <&McMartin> | http://www.chris-granger.com/2014/01/07/light-table-is-open-source/ |
22:01 | <&McMartin> | attn: ToxicFrog primarily but Light Table is a fun toy |
22:03 | <&McMartin> | (I've been following Light Table since it's trying to merge IDEs and REPLs in a way I haven't seen previously) |
22:09 | <@Reiv> | I've heard of that |
22:09 | <@Reiv> | I still want it to actually do Python Properly at which point I would be <3 |
22:09 | | ErikMesoy is now known as ErikMesoy|sleep |
22:18 | <@gnolam> | Oh, right. Speaking of that. |
22:19 | <@gnolam> | Are there any half decent Python IDEs? |
22:19 | <&McMartin> | Nope >_> |
22:20 | <&McMartin> | This is one *other* reason I've been watching Light Table with interest |
22:21 | <@gnolam> | Ach. |
22:21 | < RichyB> | gnolam, I use a mixture of Emacs and crying, myself. |
22:21 | <@gnolam> | Any decent, easy-to-use editors for Mac then? |
22:21 | < RichyB> | All the OS X users here use TextMate for Python. |
22:22 | < RichyB> | I think one person uses Sublime Text. |
22:23 | <@gnolam> | The target audience here is basically... hmm... not exactly Dera's boss, but something along those lines. Has programmed for ages, but rather set in his ways. |
22:29 | < Harlow> | editors for Mac |
22:29 | < Harlow> | Code Runnner |
22:30 | < RichyB> | Neither TextMate nor Sublime are at all painful to use, AIUI. These are Mac-flavoured tools with decent usability and a learning curve like walking down the street, not a learning cliff like vi or Emacs. :) |
22:38 | <@celticminstrel> | I use TextWrangler for Python, which doesn't really count as an IDE but whatever. |
22:41 | <~Vornicus> | I use TextWrangler actually |
22:57 | | Harlow [harlow@Nightstar-2dbe3d64.il.comcast.net] has quit [[NS] Quit: BED] |
23:04 | <@Alek> | "What is the sound of one hand clapping?" *facepalm* |
23:05 | <&McMartin> | Another acceptable answer is slapping the questioner |
23:06 | | Stalker [Z@Nightstar-ro94ms.balk.dk] has quit [Ping timeout: 121 seconds] |
23:07 | | * Vornicus waves his hand around very quickly, producing a clapping sound |
23:07 | | * macdjord snaps his fingers |
23:07 | <@celticminstrel> | Heh. |
23:19 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
23:32 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
23:41 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
23:42 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
23:53 | < [R]> | <gnolam> Are there any half decent Python IDEs? <-- Erik? |
23:54 | < [R]> | Disclaimer: I don't use Python. I don't use IDEs either. |
--- Log closed Thu Jan 09 00:00:44 2014 |