code logs -> 2012 -> Sun, 28 Oct 2012< code.20121027.log - code.20121029.log >
--- Log opened Sun Oct 28 00:00:45 2012
00:16
<@rms>
http://theoatmeal.com/comics/game_of_thrones
00:16
<@rms>
So true
00:33 You're now known as TheWatcher[T-2]
00:35 You're now known as TheWatcher[zZzZ]
00:37
<~Vornicus>
there was an update to that for iirc new zealanders
00:37
<~Vornicus>
Which was amazing.
00:39
<~Vornicus>
http://theoatmeal.com/pl/game_of_thrones/nz
00:51 RichyB [richardb@Nightstar-86eb1ea3.bb.sky.com] has quit [[NS] Quit: Leaving]
03:07
<&ToxicFrog>
Related Work: done
03:09
< Syk>
Derakon: just write a hg-wrapper for git! :P
03:09
< Syk>
/usr/bin/hg -> /usr/sbin/sanify-git.sh
03:09
< Syk>
:p
03:26 Attilla [Obsolete@Nightstar-c5c74f4b.as43234.net] has quit [[NS] Quit: ]
03:51 Kindamoody[zZz] is now known as Kindamoody
04:01 Thalass [Thalass@C2A270.1179B7.313116.2DEE9C] has joined #code
04:01
< Thalass>
http://www.valvesoftware.com/linuxsurvey.php
04:01
< Thalass>
Linux steam client closed beta applicant survey.
04:12 Thalass [Thalass@C2A270.1179B7.313116.2DEE9C] has quit [[NS] Quit: socialising]
04:43 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:35 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
05:42 Derakon is now known as Derakon[AFK]
05:48 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
05:48 mode/#code [+o himi] by ChanServ
--- Log closed Sun Oct 28 06:27:33 2012
--- Log opened Sun Oct 28 06:27:41 2012
06:27 TheWatcher[zZzZ] [chris@Nightstar-3762b576.co.uk] has joined #code
06:27 Irssi: #code: Total of 22 nicks [13 ops, 0 halfops, 0 voices, 9 normal]
06:27 mode/#code [+o TheWatcher[zZzZ]] by ChanServ
06:28 Irssi: Join to #code was synced in 38 secs
06:29 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
06:30 Orthia [orthianz@Nightstar-6ca59a6f.callplus.net.nz] has joined #code
06:31 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
06:32 Syk [the@Nightstar-7d752098.lnk.telstra.net] has joined #code
06:32 iospace [Alexandria@Nightstar-e67f9d08.com] has joined #code
06:36 Kindamoody|afk [Kindamoody@Nightstar-05577424.tbcn.telia.com] has joined #code
06:36 mode/#code [+o Kindamoody|afk] by ChanServ
06:36 Kindamoody|afk is now known as Kindamoody
06:37 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
06:48
<@Azash>
http://i.imgur.com/ha8er.png
06:50
<~Vornicus>
*price is right loser sound*
06:50 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
06:51 mode/#code [+o himi] by ChanServ
06:52
<@Azash>
Vornicus: At first I just thought "Well, they could give more error details.."
06:52
<@Azash>
Then I noticed the cancel button and my sides split
06:53 * Tamber gets the duct-tape
07:30
< Syk>
LOL
07:31
< Syk>
oh man
07:31
< Syk>
ABC is rebroadcasting Mock The Week <3
08:19 Vash [Vash@Nightstar-fa35b16c.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
08:43
< Syk>
goddamn sublime text 2
08:43 * Syk flips it :|
08:46
<@Azash>
FLIP TABLE *
08:47 Kindamoody is now known as Kindamoody|out
08:50
< Syk>
the command -does- exist
08:51 * Syk cries
08:53
<@Azash>
Wait, it does?
08:53
<@Azash>
Or is it some ST2 command you were looking for?
08:54
< Syk>
i'm trying to wrangle ST2's ADB Logcat plugin into working
08:54
< Syk>
the console says that 'err 2 no file exists'
08:55
< Syk>
in the plugin it seems to get its command from cmd = get_setting("adb_command", ["adb", "logcat"])
08:55
< Syk>
but I can't find anywhere in ST2 to configure that?
08:55
< Syk>
and just running `adb logcat` works
08:56
< Syk>
and I've restarted ST2 in case it didn't pick up on my PATH being corrected
08:57
< Syk>
i think that maybe i might just need to give up and install intellij :|
08:57
<@Azash>
Hm :/ Have you tried giving the full path?
08:58
< Syk>
there's nowhere to configure that, though
08:58
< Syk>
i don't know where it's storing the setting "adb_command"
08:58
<@Azash>
Oh
08:58
< Syk>
the Andrew/Android plugin can find the SDK and i've configured it in there
08:58
< Syk>
and it'll build
08:59
< Syk>
then go "installing to device" and not prompt me for what device I want to push it to
08:59
<@Azash>
:|
08:59
< Syk>
except it's not erroring either
09:00
< Syk>
and if i go "Andrew > Android Managers" it can OPEN the Configure Devices page
09:00 * Syk is just so confused
09:01
< Syk>
ok so
09:01
< Syk>
ST2 = good for latex
09:01
< Syk>
horrible at android
09:03
< Syk>
this is the stuff that annoys me
09:03
< Syk>
when loads of people use something, but i'm the only one it doesn't work for
09:03
< Syk>
so there's no bloody documentation on how to fix it
09:04
< Syk>
i'd just prefer it to segfault and leave me at a flashing prompt, at least then it's truly stuffed and not hiding errors in a console that doesn't open on errors
09:05
< Syk>
at least then it'd not be as insulting as a non-descriptive python error
09:06 * Syk throws Tamber at the problem
09:09 * Tamber explodes.
09:11
< Syk>
there
09:11
< Syk>
that'll show it
09:11 * Azash throws vim at Syk
09:12 * Tamber pelts Syk with ed.
09:12
< Syk>
vim is not a sykhtml approved editor
09:12 * Syk burns it
09:12
< Syk>
what happens when they bring out an improved vim?
09:12
< Syk>
vimim?
09:13
<@froztbyte>
surely that's the fault of the plugin, not of st2? :P
09:13
<@Tamber>
Syk: viim.
09:13
<@froztbyte>
(re logcat)
09:13
< Syk>
froztbyte: well i dunno
09:14
< Syk>
it's looking for a setting in st2
09:14
< Syk>
that doesnt exist
09:14
< Syk>
or if it does, its not working right
09:14
< Syk>
or something
09:14
<@Azash>
Can you modify the plugin?
09:14
<@froztbyte>
afaik plugins are made by the community
09:14
<@froztbyte>
so...yeah, I'd say the plugin's at fault here
09:15
<@Azash>
Syk: What do you want to do? Save the logs to a certain file?
09:15
<@Azash>
Oh wait I see, nevermind
09:15
< Syk>
AAAA
09:15
< Syk>
I THINK I MADE IT WORK
09:16 * Syk explodes in potential happy
09:17
< Syk>
...and then it segfaulted
09:18
< Syk>
WHOO its werkin
09:21
< Syk>
whoooooooo
09:21
< Syk>
so
09:21
<@Azash>
Wooh
09:21
< Syk>
the fix was
09:21
< Syk>
to just manually write in the path to the sdk
09:21
< Syk>
because i have nfi where the setting is coming from
09:22
< Syk>
okay so
09:22
< Syk>
do i celebrate with raspberry vodka, or a cup of tea
09:22
<@Tamber>
Yes.
09:22
< Syk>
tamber they do not mix
09:22
< Syk>
i have tried
09:22
< Syk>
many did not make it through that evening
09:23 * Syk salutes, bagpipes play
09:23
<@Azash>
amazing_grace_bagpipes.flac
09:24
<&McMartin>
It's peppermint tea o'clock
09:24
<@froztbyte>
raspberry vodka is a thing?
09:24
<@froztbyte>
must find.
09:24
<@froztbyte>
Syk: are you rocking windows, linux, or osx there?
09:25
<@Azash>
It's winter here now so it's time for the classic: mint vodka in hot chocolate
09:25
< Syk>
froztbyte: i'm currently programming in my underpants
09:25
< Syk>
if that's a clue
09:25
<@froztbyte>
it is not
09:25
<@froztbyte>
jerith does that too
09:25
< Syk>
...yeah i suppose you're right
09:26 * Syk linux
09:26
<@Azash>
I take it that means Syk is at home, so programming in Linux
09:26
<@froztbyte>
and it might be anything from osx to a direct non-X terminal
09:26
<@Azash>
As opposed to pant-ed and doing work programming on either of the others
09:26
< Syk>
Azash: at work i do Windows programming, yeah
09:26
< Syk>
on uh
09:26
< Syk>
VB.NET >v>;
09:27 * Azash declares himself Sherlock
09:27
<@Azash>
Aw :<
09:27
< Syk>
well it's better than C#
09:27
< Syk>
for one, the APIs seem to be a bit more consise
09:27 * McMartin likes delegates too much
09:27
< Syk>
and it's all slow anyway
09:28
< Syk>
see this is why i don't like myself a lot
09:28
< Syk>
the only language I am good in is VB.NET
09:28
< Syk>
i can make reasonably-working applications in that
09:28
<@froztbyte>
practice practice practice
09:29
< Syk>
and then I go home and write C++ that has been described as "the most ungodly thing I have ever seen"
09:29
<&McMartin>
You can make .NET pretty fast
09:29
<&McMartin>
I mean, Bastion~
09:29
<@froztbyte>
Syk: don't worry, that's because C++ is shit.
09:29
< Syk>
haha
09:29
< Syk>
I am okay in Node.JS though
09:29
<@Azash>
>me looks for work in IT, finds.. colour printer requiring 5 years of former experience, boggles
09:29
<@Azash>
Er, oops
09:29
<@Azash>
Consider that a /me
09:30
< Syk>
and I want a job doing coding stuff, kinda
09:30
< Syk>
but I have helpdesk and sysadmin experience
09:30
< Syk>
which frustrates me
09:31
<@Azash>
Trade you, I want to be a sysadmin but I don't know where I would find such a job
09:31
<@Azash>
While the market here is overflowing with SE positions
09:31
< Syk>
I can't make x do y, but goddamn I can have a computer on your desk in 15 minutes ready to go
09:31
<&McMartin>
On the subject of C# and speed, I give you a .NET-based JIT system for Infocom's old text adventure VM: http://zlr.sourceforge.net/
09:31
<@froztbyte>
<froztbyte> practice practice practice
09:31
< Syk>
froztbyte: yeah
09:31
<@froztbyte>
McMartin: haha, cool
09:31
<@Azash>
Syk: Your best bet is to go fervent codan' and build a portfolio
09:32
< Syk>
i've done a few coding projects
09:32
<@Azash>
Like make a github repo you can give to employers when applying
09:32
< Syk>
wrote my own helpdesk system, FIDS boards, wrote werk's new website, etc
09:32
<&McMartin>
froztbyte: It's currently holding the speed record~
09:32
< Syk>
but none of them are... well, good
09:32
<&jerith>
McMartin: Is JITing zcode really useful?
09:33
<@froztbyte>
Syk: you keep saying "werk", which makes me wonder if it's a habit, or whether you're german/dutch/afrikaans/related?
09:33
<&McMartin>
jerith: Some of the more complex AI routines in I7 produce noticably reply delays
09:33
<&jerith>
McMartin: Ah.
09:33
<&McMartin>
And if you're running on a phone they can be huge.
09:33
< Syk>
froztbyte: Australian
09:33
<@froztbyte>
heh
09:33
<&McMartin>
This was kind of proof-of-concept, but the guy who wrote it also knows both the Z-Machine and the CLR inside and out
09:33
< Syk>
froztbyte: it's just that 'werk' describes my work much better as it's dysfunctional as fuck
09:34
< Syk>
case in point: the place is losing staff like mad and they had to delay the building move by 2 months
09:34
<&jerith>
I can see an optimising native compiler being very useful.
09:34
<&jerith>
But I suppose that means you need to ship the player with the game.
09:34
<&McMartin>
YEah
09:34 * jerith is now convinced.
09:34
<&McMartin>
Of course, if you're targeting a mobile platform, you have to do that anyway
09:35
< Syk>
i am pretty proud of the website i wrote though
09:35
<&jerith>
McMartin: Not necessarily.
09:35
< Syk>
they were like "WE WANT A BETTER ONE" and in a mad scramble to stop them paying some designer fucks $50K again, I wrote it
09:35
<&jerith>
Syk: Is it pretty?
09:36
< Syk>
well, d'ya want to see it? :P
09:36
< Syk>
(I have a demo up)
09:36 * jerith is currently programming platform-agnostic-but-probably-not-Windows stuff on his OSX machine in a shiny new editor he's learning.
09:36
<&jerith>
But I'm wearing more than just myunderpants.
09:37
< Syk>
haha
09:37
<&jerith>
Syk: Sure.
09:37
< Syk>
well technically so am I
09:37
< Syk>
i'm wearing a portal 2 shirt with SPAAAAACE on it
09:37
<&McMartin>
SPAAAAAAAAAAAAAAAAAAAAAAACE
09:37 * jerith is wearing three complete garments.
09:37
< Syk>
jerith: PM incoming
09:37 * jerith redies the PM catcher.
09:37
<@froztbyte>
mandatory re-link of http://wiki.multimedia.cx/index.php?title=8088_Corruption_DAT
09:37
< Syk>
just don't want to post it too publicly as it's still more or less a demo
09:37
< Syk>
the major thing was speed
09:38
< Syk>
i live where 256K broadband still exists
09:38
< Syk>
of course I then have to wreck this functionality with webfonts and images
09:39
< Syk>
BUT it works kind of okay on phones and in lynx
09:39
<@froztbyte>
host the shit locally then
09:39
< Syk>
froztbyte: it's hosted as locally as we can get it (Australia)
09:39
< Syk>
every packet has to go a minimum of 7000KM before hitting any other server
09:39
<@froztbyte>
set up a webserver in your home, serve the webfonts from there, deal with it to mirror anything else
09:39
<@froztbyte>
Syk: I'm familiar with the issues :P
09:40
< Syk>
oh right
09:40
<@froztbyte>
I'm 195ms from just about anything
09:40
< Syk>
nono I mean... client side slow
09:40
< Syk>
the server is fast
09:40
<@froztbyte>
yes, I know
09:40 You're now known as TheWatcher
09:40
< Syk>
but anyway... it's reasonably fast
09:40
< Syk>
and better than the old site
09:40
< Syk>
which was 10s+ to load a page
09:40
<@froztbyte>
clients can't fetch things fast enough because your available bandwidth fails, and you have long tcp latency to take a dump all over your morning
09:41
< Syk>
and ran a version of Apache that was outdated in 2003
09:41
<@froztbyte>
haha
09:41
<@froztbyte>
corporate IT problems are so entertaining
09:41
< Syk>
and they still charged us $4000 or so a year for it
09:41
< Syk>
yeah
09:41
<@froztbyte>
recently our one big telco-corporate was asking for security updates
09:41
<@froztbyte>
because the version number wasn't big enough
09:42
< Syk>
heh
09:42
<@Azash>
Firefox syndrome
09:42
<@froztbyte>
naw
09:42
< Syk>
Azash: Chrome*
09:42
<@froztbyte>
this has been going for years and years
09:42
<&jerith>
Oh, right. I need to learn about setting up local puppet magic in Wikimedia Labs so I can finish this metrics stuff before I leave for India.
09:42
< Syk>
FF only does it because Chrome does it
09:42
<@froztbyte>
policy doc writers have no comprehension of the state of affairs
09:42
<@Azash>
Version 29 changelog: -corrected typo in readme.txt
09:43
< Syk>
hehe
09:43
< Syk>
at work, I had a program I called Droid
09:43
< Syk>
and according to management it "had to stand for something"
09:44
< Syk>
i submitted "Damn Radical Out/In Directory" but my supervisor told me it was stupid :P
09:44
<@Azash>
:P
09:45
<@Tamber>
"Stupid? Compared to 'names have to stand for something'?"
09:45
< Syk>
"syka naming syndrome", my supervisor calls it
09:45
<@Azash>
Directory of Really Ominous Input Data
09:46
< Syk>
the helpdesk system is called OpCom, the website static CMS is a pun on the company name, my task manager is named 'Waveform' for no reason and I once named a version of droid "El Droidacabra"
09:46
< Syk>
aka i come up with stupid names
09:46
< Syk>
i could totally be a gnome developer
09:46 * Syk eyes palimipseresfvewet
09:47
< Syk>
...anyway raspberry vodka time
09:47
< Syk>
i seem to have lost my vodka
09:48
< Syk>
nevermind, found it under the nerf guns
09:52
<@Azash>
You have an awesome apartment, I can tell right now
09:53
< Syk>
Azash: my room just has heaps of shit in it
09:54
<@Azash>
Well yes, that's part of the definition
09:54
< Syk>
a broken Portal 2 cup sitting on a spare 460 next to four hundred teabags
09:54
< Syk>
also, completely unrelated
09:54
< Syk>
http://media.tumblr.com/tumblr_mah66rC32h1qawqek.jpg
09:54
<@Azash>
Wot?
09:55
< Syk>
http://badlyrecreatedanimatedfilmframes.tumblr.com/
09:59
<@Azash>
This is magnificient
09:59
< Syk>
ikr
10:00
< Syk>
http://24.media.tumblr.com/tumblr_mai331qbT61rgbr6wo2_500.jpg
10:00
< Syk>
cannot... stop... laughing
10:00
<@Azash>
That damned smile
10:01
<@Azash>
I like how he ran out of time here
10:01
<@Azash>
https://gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/tumblr_maxfsfYrCA1rgbr6wo 1_500.png
10:01
<@Azash>
https://gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/tumblr_maxfsfYrCA1rgbr6wo 2_500.jpg
10:03
< Syk>
i dunno man
10:03
< Syk>
that toilet looks pretty realistic to me
10:10 mode/#code [+o Syk] by Azash
10:10 * Azash bots roll out
10:14
<@Syk>
today +o in #code, tomorrow, THE WORLD muahaha
10:14
<@Syk>
nah not really
12:45 Attilla [Obsolete@Nightstar-c5c74f4b.as43234.net] has joined #code
13:16 gnolam_ is now known as gnolam
14:07 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
14:12 Vornotron [vorn@ServerAdministrator.Nightstar.Net] has joined #code
14:13 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
14:13 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code
14:17 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
14:30 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
14:30 mode/#code [+o himi] by ChanServ
14:37 ErikMesoy [Erik@Nightstar-5b5b3bc5.80-203-69.nextgentel.com] has joined #code
14:39
<@AnnoDomini>
http://www.youtube.com/watch?v=QPgqfnKG_T4
14:39 * Azash gets grey hairs from a basic HTS mission, grumbles
15:03
<@Tarinaky>
It's great that I live in a world where FPS 'sentry guns' are a real-world thing you can build as a project over a year.
15:03
<@Syk>
heh
15:03 * Syk punches Java in the face c:
15:04 * ErikMesoy punches Lagrange in the face?
15:05
<@Syk>
i guess I need to practice more
15:05
<@Syk>
but I feel that .NET has spoiled me compared to Java's weirdness
15:18
<@Azash>
Java is like that tent which is just as comfy as the other but needs 35 pitons hammered in a certain order or it will collapse as soon as you enter it
15:19
<@Tamber>
.NET is pretty much the same as the Java tent, but uses a different-shaped hammer.
15:19
<@TheWatcher>
Java hates the living (but not quite as much as email)
15:19
<@Tamber>
"...but at least it's not PHP."
15:19 * TheWatcher shudder
15:20 * Azash looks out from his door, sees roommate tipping his rack cabinet over
15:20
<@Azash>
:I
15:20
<@Tamber>
o.0
15:20
<@Azash>
Apparently he is installing wheels on it
15:20
<@Tamber>
If he starts lugging a V8 in, start to worry.
15:21 * Azash also has a rack cabinet
15:22
<@Azash>
We got them via a friend of a friend of a friend whose business was outsourcing their helpdesk or something
15:22
<@Azash>
https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-snc6/166512_4155020312773_1524 599048_n.jpg
15:22
<@Azash>
\:D/
15:24
<@Syk>
Tamber: oh god .NET is not like Java
15:24
<@Syk>
.NET has /actually useful/ standard libraries
15:25
<@Syk>
Java has shit like a String, StringBuffer and StringBuilder
15:25
<@Syk>
.NET doesn't care, it just breaks things
15:26 * Syk explodes off for a min
15:29 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
15:29
<@TheWatcher>
The problem with Java is that it tries to be excessively OO, with the practical result that you get an explosion of classes, none of which entirely do what you want, or you need 20 of them combined in some bizarre and arcane way to do anything (I'm looking at you, Swing)
15:38
<@rms>
java.util.regex.* isn't any better
15:42 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
15:42 mode/#code [+o himi] by ChanServ
15:59 cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [[NS] Quit: Well, most things get better when I kick them!]
16:18 Syk is now known as syksleep
16:41
< ErikMesoy>
What is a reasonable understanding of "approximately zero"? (Context: Write a Lagrange polynomial interpolation function and check that its difference from sin(x) at certain points is approximately zero.) Less than 5%?
16:45
< Vornotron>
It'd do for me.
16:49 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
16:52 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
17:06 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
17:06 mode/#code [+o himi] by ChanServ
17:25 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
17:38 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
17:38 mode/#code [+o himi] by ChanServ
17:49
<@rms>
I'd go for bonus points and allow the user to define that.
17:50
<@rms>
But I tend to overcomplicate everything
17:52 rms is now known as Vasi
17:57
< ErikMesoy>
I very much doubt I would get bonus points for that, because the exercise specifies exactly which parameters the function shall have (which discourages and "approximately zero" there), and the overarching guidelines say that programs should run in full from the command line without stopping to wait for the user. >_>
17:58
< ErikMesoy>
*discourages an
18:07
<@Namegduf>
I think "it is a working approximation of reasonable degree"
18:07 * Namegduf is reminded of the time he simulated sine and cosine with a parabola because it made the shader fastre
18:07
<@Namegduf>
*faster
18:08
<@Namegduf>
It totally worked.
18:11
< Vornotron>
If you're not going past 90deg, it will indeed Totally Work
18:12
< Vornotron>
(though for sine you'll actually want two parabolas because it's got that inflection point. That, or use a cubic which still only has two terms)
18:48
< ErikMesoy>
Current golden hammer: for i in (range(len(
18:48 Kindamoody|out is now known as Kindamoody
18:49
<&jerith>
ErikMesoy: What's that for?
18:49
<&jerith>
If you're just wanting to count things, look at enumerate().
18:49
< ErikMesoy>
jerith: manipulating every element in an array, usually
18:51
< ErikMesoy>
I'm supposed to be able to do this with numpy and say things like x_values = numpy.linspace(-1,1,20), y_values = numpy.sin(x_values) but that throws errors, so instead it's y_values = x_values.copy(), for i in (range(len(y_values)): y_values[i] = numpy.sin(y_values[i])
18:52
< ErikMesoy>
I also tried the simpler "for y in y_values: y = sin(y)" but that didn't actually change the contents of y_values for some reason
18:56
<&jerith>
Yes, that wouldn't change the values.
18:56
<&jerith>
Why not "y_values = [sin(i) for i in x_values]"?
18:57
< ErikMesoy>
Because I was unfamiliar with that method of array construction. Neat!
18:57
<&jerith>
I don't really know numpy, but if you're working with plain Python lists that'll do what you want.
18:58
<&jerith>
It's a list comprehension, shamelessly stolen from Haskell, Erlang, etc.
18:58
< ErikMesoy>
AFAIK from this textbook, numpy is supposed to be basically math with certain shinies like the ability to pass arrays as arguments to math functions like sin(), and get back an array where sin() has been applied to each element.
18:59
< ErikMesoy>
I must be Doing It Wrong somehow.
18:59
<&jerith>
Possibly. numpy is a sharp tool, and it's easy to cut yourself with it.
19:01
<&jerith>
Listcomps are one of my favourite Python features. :-)
19:28 * ErikMesoy calls sys.argv[1], gets "error: name 'sys' is not defined". WTF. The documentation for sys claims that sys is always available.
19:28
<&jerith>
ErikMesoy: "import sys".
19:28
<&jerith>
It's a stdlib module.
19:29
< ErikMesoy>
I appear to have misunderstood "always available". :p
19:30
<&jerith>
You can always import it.
19:30
<&jerith>
And actually, it gets imported as part of the interpreter setup.
19:30
<&jerith>
But you need to explicitly import it in every module you use it in, like any other module.
19:31
<&jerith>
Because implicit imports just make things hard to follow.
19:33 Derakon[AFK] is now known as Derakon
19:33 mode/#code [+ao Derakon Derakon] by ChanServ
19:34
<&Derakon>
ErikMesoy: think of it this way: what if you wanted a variable named "byteorder" or "copyright" or "executable" etc? These are all defined in the sys module.
19:34
<&Derakon>
...mm, no, that's a bad example, because the "sys." prefix is still there.
19:34
<&Derakon>
Anyway, you do have to manually import every module you want to use.
19:36 * Vasi is with ErikMesoy on this. Documentation fail.
19:36
<&jerith>
Which documentation is it?
19:37
< ErikMesoy>
docs.python.org
19:37
<&Derakon>
That's kind of vague. Which specific page?
19:37
<&Derakon>
The top of http://docs.python.org/2/library/sys.html I guess?
19:38
<@froztbyte>
ErikMesoy: `import this`, if you haven't read it yet
19:38
< celticminstrel>
"always available" just means that "import sys" will never throw an ImportError.
19:39
<@froztbyte>
(unless your system is boned somehow)
19:39
<@froztbyte>
(which also helps you find the issue)
19:39
< celticminstrel>
I suppose.
19:39
<&Derakon>
I'll freely admit that the official Python docs have the occasional bad turn of phrase.
19:39
<&Derakon>
For example, "The entire Python program exits when no alive non-daemon threads are left."
19:39
<&jerith>
If the sys module is unavailable, the interpreter isn't going to get as far as your code.
19:40
<@Vasi>
AKA: Python can't be daemonized
19:40
<&Derakon>
(Better put earlier in the page as "The significance of [the daemon field] is that the entire Python program exits when only daemon threads are left.")
19:59
< gnolam>
"The entire Python program exits when no alive non-daemon threads are left." sounds pretty clear to me?
20:12 Kindamoody is now known as Kindamoody[zZz]
20:18 Vash [Vash@Nightstar-b43e074a.wlfrct.sbcglobal.net] has joined #code
20:18 mode/#code [+o Vash] by ChanServ
20:22
<&Derakon>
Gnolam: too many negatives.
20:32
< ErikMesoy>
Python appears to have no writef() similar to printf(). I am truncating in place. Is writef() named something funny that I have missed?
20:38
< gnolam>
ErikMesoy: "This is an integer: {0:d}".format(666)
20:38
< gnolam>
(Also, some other variants.)
20:38
< gnolam>
But .format() has pretty much the full range of printf() syntax.
20:43
<&Derakon>
What is writef supposed to do?
20:44
< ErikMesoy>
Like printf but to file instead of screen
20:44
<&Derakon>
Ah.
20:44
<&Derakon>
filehandle.write("%.2f" % someFloatingPointVariable)
20:49 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
20:52
< Vornotron>
Yeah, use your standard string formatting thingy, like Der and gnolam did, depending on your python version, and just write that.
20:52
< Vornotron>
indeed I didn't even know printf existed as printf
20:59
< celticminstrel>
Um, that's called fprintf, not writef...
20:59
< celticminstrel>
Python can output to files, though.
21:00
< celticminstrel>
In 2.x, it's something like print >> file, I think,
21:00
< celticminstrel>
^Python print
21:00
< Vornotron>
good god
21:00
< Vornotron>
Just use write
21:01
<&Derakon>
handle = open(filename, 'w'); handle.write("Hello, world!\n"); handle.close()
21:01 Vasi is now known as rms
21:04
< celticminstrel>
XD
21:05
< celticminstrel>
But print does have the slight advantage of not requiring you to worry too much about line breaks.
21:05
< celticminstrel>
That said... I always use write myself.
21:05 rms is now known as Vasi
21:05
< celticminstrel>
Mainly 'cause it's easier than trying to remember the print syntax, but still.
21:43
< ErikMesoy>
Finished for tonight, after mucking about in Python classes.
22:04 Vasi is now known as rms
22:14 ErikMesoy is now known as ErikMesoy|sleep
22:37 * froztbyte 's next bit of python files will be as side ideas for the computational investment coursera course
22:37
<@froztbyte>
filters to help me useful tickers, etc
22:38
<@froztbyte>
also, apparently I'm really *really* good at stock allocations
22:39
<@froztbyte>
my toy portfolio that I use in a buy-and-hold game with some other people was out by just under 7% compared to the optimal purchase O_o
22:43
<@froztbyte>
(someone got a bank for me to use as funding? :D)
23:03 * syksleep drops some Monopoly money on froztbyte :P
23:03
<@froztbyte>
that's okay
23:03
<@froztbyte>
keep it coming
23:03
<@froztbyte>
I can make a replacement market out of this, for people whose dog ate it ;)
23:23 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
23:23 mode/#code [+o PinkFreud] by ChanServ
23:25 gnolam is now known as 459AAB97H
23:25 McMartin is now known as 963AACU16
23:25 Orthia is now known as 629AAABGM
23:25 cpux is now known as 629AAABIW
23:25 TheWatcher[zZzZ] [chris@Nightstar-3762b576.co.uk] has joined #code
23:25 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
23:25 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
23:25 McMartin [mcmartin@Nightstar-3895ee8e.pltn13.sbcglobal.net] has joined #code
23:25 Orthia [orthianz@Nightstar-6ca59a6f.callplus.net.nz] has joined #code
23:25 gnolam [lenin@Nightstar-ccbf4b44.cust.bredbandsbolaget.se] has joined #code
23:25 Kindamoody [Kindamoody@Nightstar-05577424.tbcn.telia.com] has joined #code
23:25 ServerMode/#code [+oaoaooo TheWatcher[zZzZ] Derakon[AFK] Derakon[AFK] McMartin McMartin Orthia Kindamoody] by *.Nightstar.Net
23:25 Kindamoody [Kindamoody@Nightstar-05577424.tbcn.telia.com] has quit [OperServ (Session limit exceeded)]
23:26 TheWatcher[zZzZ] [chris@Nightstar-3762b576.co.uk] has quit [Ping timeout: 121 seconds]
23:26 Orthia [orthianz@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds]
23:26 McMartin [mcmartin@Nightstar-3895ee8e.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds]
23:26 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
23:26 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
23:26 gnolam [lenin@Nightstar-ccbf4b44.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
23:26 963AACU16 is now known as McMartin
23:33
< Vornotron>
that as cool.
23:37 629AAABIW is now known as cpux
23:37 Derakon is now known as Derakon[AFK]
23:50 * McMartin sees a casual note in the SA Steam thread, goes and investigates a little in the relevant settings application, finds that he can now run Within a Deep Forest and Knytt Stories and Fallout without aspect distortion.
23:50
<@Reiv>
Ey wot?
23:51
<&McMartin>
There's a toggle in the NVIDIA control panel between letting the display handle aspect correction or making the GPU do it
23:51
<&McMartin>
It turns out my display doesn't do it, so if I go fullscreen in any of those games it does ugly stretching artifacts.
23:51
<&McMartin>
But if I make the GPU do it then all of those games get automatic pillarboxing.
23:53 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
23:53 629AAABGM is now known as Orthia
--- Log closed Mon Oct 29 00:00:00 2012
code logs -> 2012 -> Sun, 28 Oct 2012< code.20121027.log - code.20121029.log >

[ Latest log file ]