code logs -> 2012 -> Sun, 23 Dec 2012< code.20121222.log - code.20121224.log >
--- Log opened Sun Dec 23 00:00:33 2012
00:10 AbuDhabi_ [annodomini@Nightstar-282783d9.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
00:32
< McMartin_>
It is a C++ joke.
00:35 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has joined #code
00:35 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:35
<@gnolam>
The Lords of COBOL shall lead us to Earth.
00:39 ToxicFrog [ben@Nightstar-7944a253.eng.wind.ca] has joined #code
00:39 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
00:48 Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
00:51 Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
01:01 You're now known as TheWatcher[T-2]
01:03 You're now known as TheWatcher[zZzZ]
01:22 himi-cat [himi@Nightstar-5d05bada.internode.on.net] has joined #code
01:43 * gnolam eyes Intel.
01:43
<@gnolam>
I see their graphics QA is as strong as ever.
01:44
<@gnolam>
"WARNING: 0:8: 'assing' : implict conversion between types allowed from GLSL 1.20"
01:44
<@gnolam>
Yes. Literal copy+paste from their GLSL compiler. :D
01:48
<@Azash>
An additional fun tidbit: "assing", if translated directly into Finnish, translates into a military slang word for people who are doing things cluelessly
01:59
<@gnolam>
And I honestly can't find what it's complaining about.
02:00
< McMartin_>
Can you paste the shader?
02:00
<@gnolam>
It's an int being assigned (sorry, being assed) another int!
02:00
< McMartin_>
0:8 is weird
02:01
<@gnolam>
Standard for loop.
02:01
<@gnolam>
for (int i = -1; i < 2; i++) {
02:01
<@gnolam>
That's where the implict asses come in.
02:03
< McMartin_>
So, is this version 120?
02:04
<@gnolam>
And the asses should be completely implictless. Because no matter what version GLSL you're using, "-1" and "2" should be interpreted as (signed) integer literals.
02:04
< McMartin_>
Yes, that does seem to be the case
02:04
< McMartin_>
That's why I was hoping you could post the shader so I could see if it was instead screwing up the location.
02:06
< McMartin_>
Also, huh
02:06
< McMartin_>
I actually didn't realize that you could declare variables in a for initializer like that in GLSL
02:07
< McMartin_>
(You can; section 6.3 of the spec talks about scoping of variables in such cases)
02:07
< McMartin_>
Anyway, the reason "0:8" struck me as weird is because that would be line 0, column 8.
02:12
<@gnolam>
Other way around.
02:14
< McMartin_>
Yeah, I am unfamiliar with the notation ever doing that.
02:14
< McMartin_>
file:line:column: severity: detail
02:14
<@gnolam>
And it's definitely that line.
02:14
<@gnolam>
But full code for completeness' sake: http://pastebin.com/Lm2dpt1e
02:16
< McMartin_>
Hum
02:16
< McMartin_>
I assume your real shader includes the #version pragma so that it doesn't assume it's GLSL 1.0.
02:16
< McMartin_>
Other than that it looks fine
02:17
< McMartin_>
unless it's being dumb and warning about your explicit cast to float on the line below it
02:17
<@gnolam>
It's a ye olde shader (1.10), so #version wasn't mandatory.
02:18
<@gnolam>
And no. The explicit cast is fine.
02:18
<@gnolam>
I'm just putting this one down to "Intel graphics" and moving on.
02:18
< McMartin_>
As long as it's not blocking you from compiling it, which as a warning I suppose it should not.
02:30 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has joined #code
02:30 mode/#code [+o cpux] by ChanServ
02:48
<@Rhamphoryncus>
I thought old glsl was more neurotic about literal typing
02:51 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
02:52
<@Rhamphoryncus>
But I can't remember how..
02:56
<@gnolam>
It is.
02:56
<@gnolam>
It has almost no implicit conversions.
02:56
<@gnolam>
You can't for example do int foo = 1.0;
02:57
< McMartin_>
As of 1.2 you can however do float foo = 1;.
02:58
<@gnolam>
Well. I should have said "aren't allowed to" rather than "can't". IME, Nvidia's compiler let almost anything slide.
03:13
< Xon>
<Scoot> Is there a way to move user folders in Windows 7? Like, put them on another disk?
03:13
< Xon>
only supported way is at install time, and you need to break out the XML/autoconfig response stuff todo that
03:21
<&ToxicFrog>
You can do it post-install if you're not logged in as that user, too
03:21
<&ToxicFrog>
Pretty sure that's not officially supported, though.
03:29 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [[NS] Quit: ]
04:14 Thalasleep is now known as Thalass
04:27
< mac>
anyone know of a good dissembler?
04:28
< McMartin_>
Fu Ling, the master of deception!
04:28
< McMartin_>
If you want a *disassembler*, IDA Pro is pretty much the best thing for x86/x64 machines.
04:29
< McMartin_>
I think it does some other instruction sets too but I don't recall them offhand.
04:29 Kindamoody[zZz] is now known as Kindamoody
04:39 shawn-p [Shawn@Nightstar-4db8c1df.mo.charter.com] has joined #code
04:54 Nemu [NeophoxProd@Nightstar-70b619c5.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
05:33 McMartin_ is now known as McMartin
05:33 mode/#code [+ao McMartin McMartin] by ChanServ
06:30 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:43 Nemu [NeophoxProd@Nightstar-70b619c5.asahi-net.or.jp] has joined #code
06:47 gnolam [lenin@Nightstar-bb103c17.cust.bredbandsbolaget.se] has quit [[NS] Quit: Gone]
07:21 Vornotron [vorn@Nightstar-221158c7.sd.cox.net] has joined #code
07:24 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has quit [Ping timeout: 121 seconds]
07:25 Vornotron is now known as Vornicus
07:25 mode/#code [+qo Vornicus Vornicus] by ChanServ
07:27 Vornotron [vorn@ServerAdministrator.Nightstar.Net] has joined #code
07:27 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has quit [NickServ (GHOST command used by Vornotron)]
07:28 Vornotron is now known as Vornicus
07:28 mode/#code [+qo Vornicus Vornicus] by ChanServ
07:54 Kindamoody is now known as Kindamoody|out
07:56 AbuDhabi [annodomini@Nightstar-dc07a91d.adsl.tpnet.pl] has joined #code
08:06 gnolam [lenin@Nightstar-bb94485c.cust.tele2.se] has joined #code
08:07 mode/#code [+o gnolam] by ChanServ
08:10 gnolaptop [lenin@Nightstar-92f6087b.cust.tele2.se] has joined #code
08:13 gnolam [lenin@Nightstar-bb94485c.cust.tele2.se] has quit [Ping timeout: 121 seconds]
08:20 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [[NS] Quit: Leaving]
09:03 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
09:04 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [[NS] Quit: Leaving]
09:09 syksleep is now known as Syk
09:17 * Vornicus should really get back to programming Vorntiers.
09:17
<~Vornicus>
The befuddlement over file format and serialization makes me grumpy.
09:22
<~Vornicus>
I could make the game model out of basic types, which would make serialization a snap, but would complicate the other code n that it has to traverse the model object.
09:27
<~Vornicus>
On the other hand I could make the game model out of full strength objects, which makes serialization a pain -- I have to rebuild the model object for json to eat, because the json object glomper is liquid hell -- but gives me the ability to actually write code that feels right once it's in.
09:30
<~Vornicus>
It also doesn't help that I haven't gotten to the point where I feel like I can sensibly include a save feature!
09:34
<~Vornicus>
Or more precisely I don't have anywhere I can sensibly add a hook to call a save feature.
09:49
<~Vornicus>
anyway, bedtime.
09:51 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
10:10 gnolaptop [lenin@Nightstar-92f6087b.cust.tele2.se] has quit [Ping timeout: 121 seconds]
10:29 You're now known as TheWatcher
11:36 Orthia [orthianz@Nightstar-6ca59a6f.callplus.net.nz] has quit [[NS] Quit: Going dooooown...]
11:40 Nemu [NeophoxProd@Nightstar-70b619c5.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
11:52 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code
11:54 Kindamoody|out is now known as Kindamoody
11:55 himi-cat [himi@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
11:56 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
12:26 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:26 mode/#code [+o himi] by ChanServ
12:38 himi-cat [himi@949DD1.9E8DDA.6A1651.577A3A] has joined #code
12:39 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
12:53 himi-cat [himi@949DD1.9E8DDA.6A1651.577A3A] has quit [Ping timeout: 121 seconds]
12:53
<@Tarinaky>
http://www.paulgraham.com/fix.html
12:54 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:54 mode/#code [+o himi] by ChanServ
13:00
< AbuDhabi>
Fun.
13:08 Kindamoody is now known as Kindamoody|out
13:29 ToxicFrog [ben@Nightstar-7944a253.eng.wind.ca] has quit [Ping timeout: 121 seconds]
15:03 Nemu [NeophoxProd@Nightstar-e1d1698e.asahi-net.or.jp] has joined #code
15:17 Nemu [NeophoxProd@Nightstar-e1d1698e.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
15:22 Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [[NS] Quit: ]
15:52 Kindamoody|out is now known as Kindamoody
16:27 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [Ping timeout: 121 seconds]
16:33 Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code
18:12 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
18:12 mode/#code [+qo Vornicus Vornicus] by ChanServ
19:32 Kindamoody is now known as Kindamoody[zZz]
19:40 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
19:42 VirusJTG__ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
20:28 Vornotron [vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:30 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
20:32 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:32 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:32 Vornotron [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
20:37 Vornotron [vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:38 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
20:52
< ErikMesoy>
I keep writing initially the mildly redundant Python pattern ListOptions(), choice=GetChoice(), while choice not in options: [ ListOptions(), choice=GetChoice() ]. Then I usually shorten this by replacing the first two lines with choice=absurd_option. This feels like an inelegant kludge for do-while.
20:52
< Vornotron>
the lack of do is occasionally a pain
20:53
< ErikMesoy>
The top two answers on Stack Overflow for a similar matter suggest first using "while True: [ ListOptions(), choice=GetChoice(), if option is valid: break ]" and repeating the kludge as stuff(), while conditions: stuff()
20:53
< ErikMesoy>
Is break more respected in Python?
20:54
<@Tarinaky>
Why would break be not-respected?
20:54
< ErikMesoy>
from past experience, break sounds like the sort of thing that indicates the programmer isn't in proper control of the loop
20:54
< ErikMesoy>
not quite as bad as goto, but having a similar program of not understanding the control flow
20:54
<@Tarinaky>
There's nothing wrong with break as long as it's arranged legibly.
20:54
< Vornotron>
Break is there when the condition the loop needs to hit is found within the loop
20:55
< ErikMesoy>
*having a similar problem of not understanding the control flow
20:55
<@Tarinaky>
There is nothing wrong with break and continue.
20:56
< Vornotron>
I have a scary loop in my klotski solver that contains a break, a continue, and an else clause.
20:56
<@Tarinaky>
Most of the reasons goto is bad are not properties of break and continue.
20:56
<@Tarinaky>
Having large loops/blocks not broken up in to subroutines is the real problem.
20:56
<@Tarinaky>
If a block fits on a screen-full easily there's no wonkiness from continue and break.
20:56
<@Tarinaky>
And a modern screen-ful is /loads/
20:57
< Vornotron>
(Though the else clause is a failsafe, it only hits that if there is no solution)
20:57
< ErikMesoy>
Right. I hear you, but break still feels icky
20:58
<@Tarinaky>
I say again. There's nothing wrong with break >.<
20:59
<@Tarinaky>
break and continue are probably a bit dodgy if you're trying to do anything pure-functional.
21:00 Syk is now known as syksleep
21:01
< AbuDhabi>
break is fine.
21:19
<@Azash>
Break can be very useful and doesn't lead to comprehension issues like goto
21:24
< ErikMesoy>
Now that's weird. Program wasn't printing, so I put print("Hello, world!") as the very first line. Running it still prints nothing. :-P
21:24
< Vornotron>
impressive.
21:24
< Vornotron>
is this a .pyw, or just a .py so far?
21:25 * Azash suspects output redirection
21:25
< ErikMesoy>
.py
21:25
< Vornotron>
weird
21:26
< ErikMesoy>
IDLE -> Run menu -> Run Module
21:26
< ErikMesoy>
This causes the Python Shell to print out a couple of RESTART and >>>
21:27 * ErikMesoy closes both, reopens, works now. Huh.
21:28 Nemu [NeophoxProd@Nightstar-e1d1698e.asahi-net.or.jp] has joined #code
22:03
<&McMartin>
12:55 < ErikMesoy> Right. I hear you, but break still feels icky
22:04
<&McMartin>
That's an older discipline talking. It was wrong.
22:04
<&McMartin>
break is equivalent to a restricted throw/catch
22:05
<&McMartin>
The idea that functions should only have one way of returning has been discredited either for some years now or "forever", depending on community
22:05
<&McMartin>
The idea that functions should only have one return *point* has been discredited ever since compilers were capable of writing their own function postludes.
22:05
< Vornotron>
"function postludes"?
22:06
<&McMartin>
The part where you clear out the stack space you allocated, call destructors, etc.
22:06
<&McMartin>
In assembler, you really do only want one of those, so you jump to the postlude instead of replicating it.
22:06
<&McMartin>
You don't want more than one RTS instruction generated per function, even with multiple returns.
22:07
<&McMartin>
But one of the old structured programming dicta - which also abhorred break and continue - also abhorred mid-function returns.
22:07
<&McMartin>
Which is sort of past the proverbial Ron Paul threshold; once you start claiming that savings accounts are tyranny, everything else you say about a runaway Federal Reserve gets instantly discredited
22:10
< AbuDhabi>
Wait, what? Why are savings accounts tyranny?
22:11
<&McMartin>
Because the banks take YOUR MONEY and then HAND IT OUT TO OTHER PEOPLE instead of sitting on it like Smaug
22:11
< ErikMesoy>
http://en.wikipedia.org/wiki/Political_positions_of_Ron_Paul only hit for "savings accounts" is "He has also advocated expanding the tax benefits of health savings accounts."
22:11
<&McMartin>
The relevant search terms here are "Ron Paul" "fractional-reserve banking"
22:12
<&McMartin>
"Fractional reserve banking" is the technology that permits savings accounts to exist
22:12
<&McMartin>
Otherwise you aren't a bank, you're a vault.
22:18
< ErikMesoy>
The wiki page on *that* has a broken link to something vaguely titled "Austrian School economics and libertarian criticism of fractional-reserve banking", and when I look that up on the Mises wiki, it has the rather more legitimate-sounding criticism that fractional reserve of of time-unlimited deposits is fraudulent.
22:18
< ErikMesoy>
And no mention of tyranny.
22:20
< Vornotron>
"time-unlimited deposits" would be, um
22:20
< Vornotron>
Savings accounts.
22:21
< Vornotron>
(as opposed to certificates of deposit)
22:22
< ErikMesoy>
As I understand it, the argument is that if I give the bank $10 and the bank says I can have my $10 back at any time and the bank then lends even $1 of that to someone else, the bank is doing something fishy. But if the bank says I have to wait a year to get my $10 back and lends out $9 of it during that year, this is fine.
22:22
< Vornotron>
Right.
22:23
< Vornotron>
But the first thing describes exactly how savings accounts work.
22:24
< ErikMesoy>
Yes, and the criticism that the bank is lying rings true, while the word "tyranny" doesn't appear at any point.
22:24
< Vornotron>
Actually the bank isn't lying, on the small scale
22:25
< Vornotron>
You can indeed go and get your money back at any time.
22:25
< AbuDhabi>
Unless there are way too many of 'you' doing that.
22:26
< Vornotron>
It only fails when there's a run on the bank: when more than their reserve percentage of deposits are demanded before they can pull in some of their accounts.
22:26
< ErikMesoy>
isn't "It only fails when there's a run on the bank" circular/tautologuous?
22:26
< ErikMesoy>
Actually, nvm.
22:27
< ErikMesoy>
Debate aside: How about let's avoid the feedback loop where random nuttiness is attributed to Ron Paul because everyone knows he's nuts and would say something like that because so many nutty statements have been attributed to him because (etc).
22:32
<@Namegduf>
Vornotron: AND when your account balance is above that guaranteed by government.
22:33
< Vornotron>
true
22:33
<@Namegduf>
I'd be comfortable with the idea that banks should explicitly include stuff in a contract prior to taking amounts that aren't guaranteed.
22:34
<@Namegduf>
But that the balance is unguaranteed isn't true as is for most people- it's to the advantage of those who want the government guarantees in question removed not to mention that, but it is a thing which is true and must be included in assessment of the current actions taken in the world as it is.
22:55
<&McMartin>
ErikMesoy: No, use google instead of Wiki.
22:55
<&McMartin>
Though even in the above
22:56
<&McMartin>
The whole point is that this isn't a legitimate criticism. Someone saying "holy shit guys, bank runs are possible, savings accounts are a huge scam" is *instantly* disqualified from having an expert opinion on anything related to banking
22:57
<&McMartin>
Likewise, someone saying, at this juncture, "Come on guys, a function should only have one exit point" is instantly disqualified from expounding on function design
23:08 ErikMesoy is now known as ErikMesoy|sleep
23:12 Nemu [NeophoxProd@Nightstar-e1d1698e.asahi-net.or.jp] has quit [Client closed the connection]
23:12 Nemu [NeophoxProd@Nightstar-e1d1698e.asahi-net.or.jp] has joined #code
23:34 ErikMesoy|sleep is now known as ErikMesoy|sleepless
23:42 VirusJTG_ is now known as VirusJTG
23:52
< ErikMesoy|sleepless>
What should I be doing if I think that I want to eval() a multi-line string? (One of my ideas has me trying to make/read a function from a file that isn't a Python code file.)
23:53
<&McMartin>
So, in general, eval() is a really bad idea because it opens you to the equivalent of XSS attacks
23:53
<&McMartin>
I would probably suggest generating the file and importing that, though.
23:54
<&McMartin>
(Alternately: "have them actually be python code files")
23:54
< Vornotron>
The alternate is what I'd do.
23:54
< ErikMesoy|sleepless>
The reason behind the reason is that I am considering easily extendable dialogue files for editing by non-programmer users.
23:54
< ErikMesoy|sleepless>
Then I'd have a thingy that turned these into Python code.
23:54
<&McMartin>
Ah
23:54
<&McMartin>
OK, so, there are two tricks for that
23:55
< Vornotron>
ew ew ew
23:55
<&McMartin>
One is to be "secretly Python"
23:55
<&McMartin>
The other is to design a domain-specific language and a source-to-source translator into Python
23:55
<&McMartin>
You don't want eval for that either way; this should be happening at mod creation time, more or less, and then locked down
23:56 shawn-p [Shawn@Nightstar-4db8c1df.mo.charter.com] has quit [Client closed the connection]
23:56
<&McMartin>
If I may wax cynical for a moment: targeting "non-programmers" is something of a sucker's game
23:56
<&McMartin>
Non-programmers are both much more clever and and much better at programming than they are generally aware
23:56
<&McMartin>
If they can operate a scripting language, they'll be able to operate Python
23:57
< ErikMesoy|sleepless>
Particularly if they have lots of dialogue to copyedit?
23:57
< Vornotron>
On the other hand - and this is important
23:57
<&McMartin>
I get the impression you're kind of new to programming as a discipline - be aware that DSLs are generally considered pretty advanced
23:57
< Vornotron>
Hey my first kiloline program was a DSL
23:57
< Vornotron>
It was entirely shitty
23:58
<&McMartin>
If this is a "learn to get good at this stuff" project, it's probably wise to backburner that and put it into "be extensible in Python" at first
23:58
<&McMartin>
For dialogue to copyedit, turning a *bunch of tables* into a *bunch of code* is a lot more reasonable
23:58
< ErikMesoy|sleepless>
Here's the thing: I am looking wistfully at an old childhood Visual Basic game that had a DSL allowing for user extensions.
23:58
< ErikMesoy|sleepless>
And the DSL was retarded simple.
23:58
<&McMartin>
Yeah, I suppose I should clarify this a bit
23:58
<&McMartin>
But anyway
23:59
< ErikMesoy|sleepless>
I can agree that this does belong on the backburner, but I also try to look forwards a lot.
23:59
< ErikMesoy|sleepless>
Then I have time to think until I do it.
23:59
<&McMartin>
If your plan is to use eval, then you're probably better off saying "Python snippet goes here"
23:59
<&McMartin>
That also makes you more usable because Python is something they're likely to have already learned, and infix expression notation &c is stuff that already Just Exists.
--- Log closed Mon Dec 24 00:00:48 2012
code logs -> 2012 -> Sun, 23 Dec 2012< code.20121222.log - code.20121224.log >

[ Latest log file ]