code logs -> 2009 -> Wed, 09 Sep 2009< code.20090908.log - code.20090910.log >
--- Log opened Wed Sep 09 00:00:18 2009
00:07
<@gnolam>
... and I've succeeded too well.
00:07
<@gnolam>
I've been staring at a spinning cube for 15 minutes now.
00:08
<@Derakon[work]>
Heh.
00:09
<@gnolam>
In my defense, bump mapped hieroglyph are quite pretty. ^-^
00:09
<@Derakon[work]>
What're you doing all this for, again?
00:12
<@gnolam>
Uni.
00:12
<@gnolam>
"Techiques for advanced computer games"
00:12
<@gnolam>
+n
00:30 Derakon[work] [~Derakon@Nightstar-6042.ucsf.edu] has quit [Quit: Leaving]
00:51
< Rhamphoryncus>
Tarinaky: *reads way back* If it would help I could try to convince you Python's whitespace is a good thing ;)
00:54
< Tarinaky>
You can if you want. I mostly just l like the idea of an interpretter for me to test out new functions and classes without having to edit my main code. I tried a package for creating python modules out of C++ code but it didn't work so I just use gdb instead.
00:55
< Tarinaky>
Which is a bit hackish but is probably more useful because then I can immediately step through the code if there is a problem.
00:56
< Rhamphoryncus>
Yeah, if you're just using it for testing you won't really appreciate the language
00:58
< Rhamphoryncus>
btw, it's possible to get gdb with python scripting :)
00:58
< Rhamphoryncus>
(as opposed to using gdb to debug python)
00:59
< Tarinaky>
Rhamphoryncus: It probably is. But I still have the problem that the code the tool generates might not be the same code that I actually want to use.
00:59
< Tarinaky>
I like braces for block delimiting and stuff.
00:59
< Rhamphoryncus>
You misunderstand. I mean gdb itself using python internally as a scripting language
01:00
< Rhamphoryncus>
And you don't like indenting your code?
01:00
< Tarinaky>
I don't like indenting in my interpretters.
01:00 Derakon[AFK] is now known as Derakon
01:00
< Rhamphoryncus>
So stop treating python like an interpreter. Treat it as a serious language
01:01
<@Vornicus>
I are serious coder. Python are serious language.
01:01
<@Vornicus>
:P
01:01
< Rhamphoryncus>
heh
01:01
< Tarinaky>
Okay. As a serious language I don't really see what it has that I want.
01:02
< Rhamphoryncus>
Readability?
01:02
< Tarinaky>
I don't have any trouble reading my code as it is.
01:02
<@Derakon>
Not requiring makefiles?
01:03
<@Vornicus>
An absurdly huge standard library that's pretty well documented to boot?
01:03
< Tarinaky>
I'll grant not having to compile is 'nice' but I don't mind makefiles and C++ has a huge standard library that's well documented >.>
01:04
< Rhamphoryncus>
Python code will typically be substantially shorter than C/C++ code, which is part of its readability
01:04
<@Derakon>
Weren't you earlier complaining about having to write makefiles by hand?
01:04
<@Derakon>
Oh, also: not having to muck about with memory management.
01:04
< Tarinaky>
No. I was under the impression that it was bad form to write them by hand.
01:05
< Tarinaky>
>.< my main problem with python is it's not C++. This is a completely irrational stand to take and I understand this.
01:05
< Rhamphoryncus>
Aye, but I can accept that argument :)
01:06
< Tarinaky>
I like Java more because it's more like C++.
01:06
< Tarinaky>
But Java apps take an age to start which annoys me far more than compiling does.
01:07
< Tarinaky>
s/compiling/portability
01:07
< Tarinaky>
*the portability
01:08 * Vornicus does wonder why java apps still take so long to start in most places.
01:08
< Tarinaky>
I -think- it's just-in-time compilation.
01:08
< Rhamphoryncus>
Vornicus: part atleast is the JIT takes a while to warm up
01:08
< Tarinaky>
Which could probably be solved with some sort of caching I think.
01:09
< Tarinaky>
But then it wouldn't be just-in-time compiling.
01:10
<@Vornicus>
It took forever to start up before and that wsan't jit.
01:10
< Tarinaky>
Initialising the virtual machine?
01:14
< Tarinaky>
Of course. Before JIT there was the problem that -everything- was slow. So it might be that they solved one problem by making another >.<
01:15
< Rhamphoryncus>
yeah, wouldn't surprise me if the VM is the worst of it
01:15
< Rhamphoryncus>
If you do a dummy program then the JIT isn't an issue
01:16
< Tarinaky>
It's been a while since I touched java. I never really got into it.
01:17
< Rhamphoryncus>
wikipedia attributes it to the class library
01:17
< Rhamphoryncus>
and the IO of such
01:19
< Tarinaky>
Sounds about right.
01:23 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Quit: Leaving]
01:25 Vornicus-Latens [Vornicus@Admin.Nightstar.Net] has joined #code
02:05 Vornicus-Latens [Vornicus@Admin.Nightstar.Net] has quit [Ping Timeout]
02:07 Vornicus-Latens [Vornicus@Admin.Nightstar.Net] has joined #code
02:07 Vornicus-Latens is now known as Vornicus
02:45 Orthia is now known as Reivthia
03:07 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
03:19 Attilla [~The.Attil@92.11.3.ns-25900] has quit [Quit: ]
03:25 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has quit [Client exited]
03:43 * ToxicFrog upreads
03:43
<@ToxicFrog>
Oh, Tar left. Aah well.
03:45
<@Derakon>
loc.add(directionToVectorMap[direction].multiply(-depth)).toRealspace()
03:45
<@Derakon>
I think I may be piling a bit too much into that line...
03:52
< Rhamphoryncus>
Only slightly. loc.add(foo) should return None ;)
03:52
< Reivthia>
Have I mentioned how much I love this channel? >_>
03:52
<@Derakon>
Rhamphoryncus: Vector2Ds are meant to be immutable.
03:53
<@Derakon>
Among other things, this excuses using them as keys in dictionaries.
03:53
< Rhamphoryncus>
oooh, so it returns a copy. Sorry, couldn't tell :)
03:54
< Rhamphoryncus>
Is it possible to use the + operator? (loc + directionToVectorMap[direction].multiply(-depth)).toRealspace()
03:54 * Rhamphoryncus wonders if multiply should be renamed scaled
03:54
<@Derakon>
When I wrote the Vector2D class, I didn't feel like looking up the magic names for the +, -, *, etc. operators.
03:54
<@Derakon>
And at this point, it has its tentacles into everything, so while I could change it, it'd be a chore.
03:54
< Rhamphoryncus>
__add__, __sub__, __mul__, __truediv__
03:55 * Derakon nods.
03:56
<@Derakon>
I hope that __truediv__ got renamed in Python 3.
03:57
< Rhamphoryncus>
'fraid not. It used to be __div__ but got separated into __floordiv__ and __truediv__
03:58
<@Derakon>
Tsk.
03:58
< Rhamphoryncus>
The old / operator got split into // and /. The latter only if you use from __future__ import division
03:58
<@Derakon>
So wait, in Python 3, unless I do "from future import division", I can't use the / operator?
03:59
< Rhamphoryncus>
err sorry, in 2.x you use that to switch the / operator
03:59
< Rhamphoryncus>
3.0 does it by default
03:59
<@Derakon>
Ahh, okay, that meshes better with what I'd heard.
03:59
< Rhamphoryncus>
So 1/2 returns 0.5 rather than 0
04:03
<@Derakon>
Ahh, no wonder Jetblade wasn't writing mapfiles.
04:03
<@Derakon>
def writeMap(self, name = None):
04:03
<@Derakon>
return
04:03
< Rhamphoryncus>
heh
04:06
<@Derakon>
And now I remember why I did that. For testing purposes, I was shoehorning the new furniture objects into the scenery tree, but that breaks when it comes time to write the scenery to file.
04:06
<@Derakon>
Since furniture objects aren't scenery objects.
04:23 Consul [~Consul__@Nightstar-1744.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
04:27
<@Derakon>
Success! http://derakon.dyndns.org/~chriswei/games/jbrl/props/tiki1.png
04:33
< Rhamphoryncus>
:D
04:36 * ToxicFrog plays around with love2d
04:47
<@Derakon>
% hg status -am | wc -l
04:47
<@Derakon>
23
04:48
<@Derakon>
Time for a lot of code reviewing...
05:25
<@Derakon>
Man, it's so nice to work with a properly designed codebase.
05:25
<@Derakon>
Jetblade may have its warts, but it uses classes and encapsulation and comments.
05:28
< Rhamphoryncus>
Miracles of modern technology, all! ;)
05:38
<@ToxicFrog>
Ok, awk and dot are awesome.
05:38 Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code
05:38 mode/#code [+o Reiver] by ChanServ
05:38
<@Derakon>
What is dot, TF?
05:38
<@ToxicFrog>
Digraph drawing tool.
05:38
<@Derakon>
Ah.
05:39
<@ToxicFrog>
Takes textual descriptions of digraphs and outputs graphics. Part of graphviz.
05:39
<@ToxicFrog>
Four awk statements to turn a set of ASCII-art tables into a dot file; one command to turn that into a pretty PNG.
05:39
<@Derakon>
Nice.
05:41 Thaqui [~Thaqui@121.98.166.ns-22683] has joined #code
05:41 mode/#code [+o Thaqui] by ChanServ
05:55
<@Derakon>
Email topic: [jetblade] 35 new revisions pushed by derakon on 2009-09-09 04:34 GMT
06:04 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Connection reset by peer]
06:25 AnnoDomini [AnnoDomini@Nightstar-28943.neoplus.adsl.tpnet.pl] has joined #Code
06:25 mode/#code [+o AnnoDomini] by ChanServ
06:32 Derakon is now known as Derakon[AFK]
08:13 Vornicus is now known as Vornicus-Latens
08:57 You're now known as TheWatcher
08:59 Rhamphoryncus [~rhamph@Nightstar-3964.abhsia.telus.net] has quit [Quit: Rhamphoryncus]
10:40 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
10:40 mode/#code [+o gnolam] by ChanServ
11:16 Attilla [~The.Attil@92.11.3.ns-25900] has joined #code
11:16 mode/#code [+o Attilla] by ChanServ
11:53 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Reboot]
11:53 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has joined #code
11:55 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
11:55 mode/#code [+o gnolam] by ChanServ
13:08
< Tarinaky>
Someone suggested a tool called makedepends last night. I've discovered that although my system doesn't appear to have it g++ has some flags that performs the same behavior. I am, however, having trouble working out how I'm meant use this. I'm having a look on google but I'm not really sure what I'm looking for.
13:24 Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: crem_, @gnolam, @Attilla, Vornicus-Latens, @GeekSoldier, ASCII, @Derakon[AFK], Alek, @Thaqui, @Myst, (+7 more, use /NETSPLIT to show all of them)
13:32 Netsplit over, joins: Alek
13:32 Vornicus-Latens [Vornicus@Nightstar-3614.dyn.optonline.net] has joined #code
13:41 SmithKurosaki [~Smith@Nightstar-10289.dsl.teksavvy.com] has joined #code
13:41 mode/#code [+o SmithKurosaki] by ChanServ
13:45
< Tarinaky>
What the fuck. I've not changed a source file and now it's refusing to compile. o.o What's worse is said sourcefile is copied out of a text book and I -know- it worked last time I looked at it.
13:45
< Tarinaky>
I know the packages haven't changed because I've been watching what I update recently.
13:46
< Tarinaky>
This is incredibly frustrating.
13:46
<@TheWatcher>
What's the error you're getting?
13:46
< Tarinaky>
Ah. >.< Figured out what I was doing wrong.
13:57
< Tarinaky>
Okay. So I'm trying to modify an example from a text-book of a yacc specification so that the parser accepts dice expressions (ie '3d6' 'd8+2' etc...) but I'm getting a shift/reduce conflict and I'm not exactly sure why or how to resolve it.
14:04 * TheWatcher can not, alas, assist - has always made a complete pig's ear of yacc stuff
14:04 * Tarinaky wtfs as the example has, once again, stopped working for no discernable reason.
14:08
< Tarinaky>
As best as I can tell what I have on my hard-drive is character-for-character identical to the example and what I had before and it's suddenly stopped working again except with no error o.o
14:09
< Tarinaky>
This is seriously arcane.
14:16 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has joined #Code
14:16 ASCII [~none@Nightstar-27052.dyn.optonline.net] has joined #Code
14:16 Thaqui [~Thaqui@121.98.166.ns-22683] has joined #Code
14:16 AnnoDomini [AnnoDomini@Nightstar-28943.neoplus.adsl.tpnet.pl] has joined #Code
14:16 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
14:16 mode/#code [+o Thaqui] by ChanServ
14:16 Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code
14:16 Myst [~Myst@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #Code
14:16 ServerMode/#code [+o AnnoDomini] by Blargh.CA.US.Nightstar.Net
14:16 mode/#code [+o gnolam] by ChanServ
14:16 mode/#code [-o AnnoDomini] by ChanServ
14:17 Myst is now known as NSGuest-2373
14:23
< Tarinaky>
Stupid netsplits :s
14:24
< Tarinaky>
Any of you any good with yacc/lex? :s
14:40
<@ToxicFrog>
<--
14:41
< Tarinaky>
I was trying to modify an example from a book of a simple calculator parser. It stopped working (it'd just silently fail to do anything). I reverted it back to the code listing in the book but it's still silently refusing to do anything.
14:41
< Tarinaky>
It's compiling without error though. It's just not working and I don't know why. http://tarinaky.pastebin.com/m6faac4a7
14:44 NSGuest-2373 is now known as SouthernMyst
14:45
<@ToxicFrog>
Silently failing at what stage?
14:46
<@ToxicFrog>
Also, sanity check: you're remembering to re-run lex and yacc after reverting those files?
14:46
<@ToxicFrog>
In that order?
14:47
< Tarinaky>
I re-ran lex and yacc.
14:47
< Tarinaky>
parser>>./a.out
14:47
< Tarinaky>
3 + 7
14:47
< Tarinaky>
3 * 8
14:47
< Tarinaky>
2
14:47
< Tarinaky>
That's what I mean by silently failing.
14:50
< Tarinaky>
Also, I should mention that I haven't edited first.l at all.
14:50 * ToxicFrog goes to test locally
14:52
< Tarinaky>
I need to go wash the dishes anyway. bbs.
14:55 Consul [~Consul__@Nightstar-1744.dsl.sfldmi.ameritech.net] has joined #code
14:56 mode/#code [+o Consul] by ChanServ
14:56
<@ToxicFrog>
Tarinaky: when you get back - the pasted code works without alteration on my system.
14:57
<@ToxicFrog>
(well, almost; I added %option noyywrap so I didn't need to provide one. main() is a one-liner that calls yyparse())
14:58 * TheWatcher ponders emacs
15:00 AnnoDomini [AnnoDomini@Nightstar-28943.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
15:01 * Tarinaky is back.
15:02
< Tarinaky>
ToxicFrog: Where does that line go?
15:03
<@ToxicFrog>
Start of first.l
15:03
<@ToxicFrog>
If you have your own yywrap(), you don't need it
15:03
<@ToxicFrog>
And if you don't have either, you'll know because flex will error.
15:04
< Tarinaky>
I have exactly what is in those two files and whatever the libraries come with.
15:04
<@ToxicFrog>
Where's your main()?
15:04
<@ToxicFrog>
Or are you using the one provided by libyacc?
15:04
< Tarinaky>
I was under the impression (both from the text and it having worked before) that if I didn't provide one it'd fall back on one in library somewhere.
15:06
<@ToxicFrog>
Yes, it will.
15:06
<@ToxicFrog>
It works here using the library main, too
15:07
< Tarinaky>
I just tried to use it with noyywrap and it made no difference.
15:07 Attilla [~The.Attil@92.11.3.ns-25900] has joined #code
15:07 mode/#code [+o Attilla] by ChanServ
15:08
<@ToxicFrog>
Yeah, I didn't think it would; I suspect you have a build system failure somewhere
15:09
<@ToxicFrog>
Either you aren't reprocessing/recompiling something that you should be, or the files you're using as input aren't the ones you actually modified
15:09 AnnoDomini [AnnoDomini@Nightstar-29132.neoplus.adsl.tpnet.pl] has joined #Code
15:09
<@ToxicFrog>
Because the code you pasted works.
15:09
< Tarinaky>
parser>>lex first.l ;yacc second.y ; gcc y.tab.c -lfl -ly
15:09
< Tarinaky>
parser>>./a.out
15:09
< Tarinaky>
3+6
15:09
< Tarinaky>
^C
15:10
< Tarinaky>
:s
15:11
< Tarinaky>
That's copy+pasted straight from bash. I'm not doing something stupid there am I?
15:11
< Tarinaky>
(My versions of lex and yacc are both wrappers for flex and bison except with some flags pre-set according to man)
15:13
<@ToxicFrog>
$ flex math.l; yacc math.y; gcc -omath y.tab.c -ly; ./math
15:13
<@ToxicFrog>
3+3
15:13
<@ToxicFrog>
6
15:13
<@ToxicFrog>
Looks fine to me :/
15:13
<@ToxicFrog>
less first.l and second.y to make sure the files you're editing are the same ones you're building?
15:14 * Tarinaky is renaming the files so as to copy+paste what ToxicFrog just did >.<
15:14
< Tarinaky>
parser>>flex math.l; yacc math.y; gcc -omath y.tab.c -ly -lfl; ./math
15:14
< Tarinaky>
2+6
15:14
< Tarinaky>
8
15:14
< Tarinaky>
xD
15:14
<@ToxicFrog>
o.O
15:15
< Tarinaky>
This is seriously arcane.
15:15
<@ToxicFrog>
That shouldn't make any difference!
15:16
< Tarinaky>
Ahah!
15:16
< Tarinaky>
I found the problem/
15:16
<@ToxicFrog>
?
15:16
< Tarinaky>
parser>>flex math.l; yacc math.y; gcc -omath y.tab.c -lfl -ly; ./math
15:16
< Tarinaky>
2+6
15:16
< Tarinaky>
Spot the difference :3
15:16
<@ToxicFrog>
...I'm using flex, you're using lex?
15:16
< Tarinaky>
Nope.
15:16
<@TheWatcher>
-lfl -ly v -ly -lfl
15:17
< Tarinaky>
Yup.
15:17
< Tarinaky>
I didn't think that mattered :s
15:17
<@ToxicFrog>
...I note mine works without -lfl, too
15:17
<@ToxicFrog>
But putting -lfl in front of -ly causes it to fail
15:18
< Tarinaky>
You have %option noyywrap. At no stage did I actually try it without -lfl >.< I didn't realise I didn't need -lfl with noyywrap.
15:18
<@ToxicFrog>
Aah
15:19
< Tarinaky>
I still don't understand why -lfl -ly doesn't work though. But at least I know what the problem is >.>
15:22
<@gnolam>
For GCC, linking order matters.
15:22
< Tarinaky>
I'd ask why, but is it a case of magic?
15:22
<@ToxicFrog>
And both libfl and liby provide main()
15:22
< Tarinaky>
Ahh.
15:22
< Tarinaky>
That makes sense then.
15:23
<@ToxicFrog>
(check this with: nm /usr/lib/libfl.a)
15:23
<@ToxicFrog>
If libfl is linked first and you don't have your own main(), the first one gcc sees will be the one provided by libfl, which is a wrapper around yylex()
15:23
<@gnolam>
But in the general case, because the GCC devs are too lazy/the codebase is too complicated to properly account for dependencies.
15:24
<@gnolam>
Say what you want about MSVS, but linking is something it Does Right (TM).
15:24
<@ToxicFrog>
This has not been my experience~
15:26 * Tarinaky shrugs. I have no interest in a windows vs linux argument >.<
15:26 * Tarinaky uses linux because it comes with more stuff.
15:27
<@ToxicFrog>
Well, it's really a gcc vs msdev argument, since you can run gcc on windows and you can at least run the msdev backend on linux (via wine)
15:27
< Tarinaky>
I'm informed that the ms compiler is the best compiler for Windows (in terms of code efficiency). I don't know if that's changed any since I heard that.
15:29
<@gnolam>
MSVS is also able to do cross-module inlining, which is another reason I consider its linking right and GCC wrong. But mostly I'm sick and tired of GCC linking voodoo (try to compile, get errors, switch the order of some libraries at random, behead black chicken, rinse, repeat). :P
15:30
<@ToxicFrog>
Anyways, regarding conversations yesterday - if you like the interpreter and high-levelness of python but don't care for the whitespace sensitivity, consider playing with Lua. It doesn't have python's huge set of libraries, but takes a lot of language ideas from it (and Scheme and Javascript, mostly) and has a more relaxed syntax.
15:46 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
15:51 Consul_ [~Consul__@Nightstar-1744.dsl.sfldmi.ameritech.net] has joined #code
15:53 Consul [~Consul__@Nightstar-1744.dsl.sfldmi.ameritech.net] has quit [Ping Timeout]
16:00 Consul_ [~Consul__@Nightstar-1744.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
16:07 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
16:08 Syloq is now known as Syloqs-AFH
16:16 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Connection reset by peer]
16:18 Derakon[work] [~Derakon@Nightstar-6042.ucsf.edu] has joined #code
16:23 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
16:24 Syloq is now known as Syloqs-AFH
16:54 Vornicus-Latens [Vornicus@Nightstar-3614.dyn.optonline.net] has quit [Quit: ]
16:54 Vornicus-Latens [Vornicus@Nightstar-3614.dyn.optonline.net] has joined #code
17:08
< Derakon[work]>
Note: when setting up your UI, do not prematurely start capturing stdout and stderr.
17:08
< Derakon[work]>
Otherwise people who come after you will have a very hard time figuring out why your code doesn't work, as it silently fails.
17:09 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
17:13 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
17:13 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Ping Timeout]
17:17 AnnoDomini [AnnoDomini@Nightstar-29132.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
17:18 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
17:19 Syloq is now known as Syloqs-AFH
17:27 AnnoDomini [AnnoDomini@Nightstar-29132.neoplus.adsl.tpnet.pl] has joined #Code
17:27 mode/#code [+o AnnoDomini] by ChanServ
17:38
< Tarinaky>
git is a bit arcane and I have no idea if it's actually doing what I expect it to be doing or not >.<
17:39
< Derakon[work]>
Heh.
17:39
< Derakon[work]>
The only commands I've used on hg are add, remove, revert, commit, update, and push.
17:39
< Derakon[work]>
Oh, and status and diff, of course.
17:40
< Tarinaky>
I've never used it before.
17:41
< Derakon[work]>
What source control have you used?
17:41
< Tarinaky>
mv.
17:41
< Tarinaky>
mkdir and mv.
17:41
< Tarinaky>
:p
17:41
< Derakon[work]>
Tsk.
17:41
< Tarinaky>
Well... technically I mean cp >.<
17:42
< Tarinaky>
But w/e. You get the joke.
17:42
< Derakon[work]>
Okay, the way git and other distributed version control systems work, then, is that you basically get a copy of the entire repository, complete with history on changes made to each file.
17:42
< Derakon[work]>
So say I check in helloworld.py one day.
17:42
< Tarinaky>
I know the theory.
17:42
< Derakon[work]>
Okay.
17:42
< Tarinaky>
I've just... Never actually used one.
17:42
< Derakon[work]>
It's hard to know sometimes.
17:42
< Tarinaky>
git log shows that at least my commit comments are being added.
17:43
< Tarinaky>
But I've no idea if the actual files/deltas are in there.
17:44 You're now known as TheWatcher[afk]
17:46
< Derakon[work]>
Tarinaky: well, clone your git repo to another directory and see what you get.
17:47
< Tarinaky>
I tried checking out a file (after renaming it) and it seems to have worked as expecte.
17:47
< Tarinaky>
*expected.
17:48
< Tarinaky>
It's just I won't trust that it's working until I have a serious situation where I need it. And by that point it'll be too late >.>
17:49
< Derakon[work]>
No, I mean make a clone of your repo.
17:49
< Tarinaky>
What exactly do I need to copy/
17:50
< Derakon[work]>
For example, if your repo's in ~/proj/project1, make a clone of it in ~/proj/project1-test and see if the file is there.
17:50
< Tarinaky>
The .git/?
17:50
< Derakon[work]>
Don't use cp.
17:50
< Derakon[work]>
Use its checkout command
17:50
< Derakon[work]>
Basically you're going to say "Make a git repo by taking the files from this other git repo". I don't know git's commands so I can't tell you the proper invocation.
17:50
< Tarinaky>
is-git-working>>git checkout
17:50
< Tarinaky>
fatal: Not a git repository (or any of the parent directories): .git
17:51
< Derakon[work]>
I believe what you want is "git clone old/repo/path new/repo/path"
17:53
< Tarinaky>
Ahah.
17:53
< Tarinaky>
How do I delete the clone?
17:53
< Derakon[work]>
rm -r its directory.
17:53
< Tarinaky>
I see.
17:53
< Tarinaky>
Cool I guess.
17:53
< Derakon[work]>
I do this step anytime I think I'm ready to push my Jetblade changes to the Google Code repository, just to make certain there aren't any files I forgot to include.
17:54
< Derakon[work]>
It's very handy for comparing what you think the repo looks like to what it actually looks like.
17:54
< Tarinaky>
There -must- be a command that outputs a directory structure to stdout as text.
17:55 * Tarinaky has to leave for food.
17:55
< Derakon[work]>
Um, "find ."?
18:01 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
18:02 Rhamphoryncus [~rhamph@Nightstar-3964.abhsia.telus.net] has joined #code
18:09 * Tarinaky is back.
18:10
< Tarinaky>
git: 'find' is not a git-command. See 'git --help'.
18:10
< Tarinaky>
Did you mean this?
18:10
< Tarinaky>
init
18:12
< Derakon[work]>
...no, I meand the *nix find command.
18:12
< Tarinaky>
I don't understand.
18:12
< Derakon[work]>
You want to know what your directory structure looks like?
18:12
< Derakon[work]>
Run "find ." from the commandline.
18:14
< Tarinaky>
Oh. I meant the directory structure that git is storing.
18:14
< Tarinaky>
But that's the kind of output I mean.
18:23 * Tarinaky idly wonders if ToxicFrog is about.
18:24
< Derakon[work]>
He's been idle for nearly three hours now.
18:24
< Tarinaky>
I'm trying to find some information on using flex/bison with C++. There's just enough floating on google to make it look like it can be done but not enough for me to know how it's done >.<
18:24
< Tarinaky>
Heh. Has it really been 3 hours?
18:26 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Ping Timeout]
18:33
<@ToxicFrog>
murr?
18:34
<@ToxicFrog>
Tarinaky: what do you mean by "the directory structure that git is storing"?
18:34
<@ToxicFrog>
You want to look at the contents of a commit without checking it?
18:34
<@ToxicFrog>
Er, without checking it out?
18:34
<@ToxicFrog>
Or you want to look at git's internal storage structures?
18:34
<@ToxicFrog>
Or what?
18:36
< Tarinaky>
Looking at the contents of [can't think the right word] without doing a git clone.
18:36
< Tarinaky>
Anyway. It doesn't matter.
18:36
< Tarinaky>
repository?
18:36
< Tarinaky>
Meh.
18:36
<@ToxicFrog>
gitk --all?
18:36
<@ToxicFrog>
That will show you all the stored revisions and let you look at the comments and deltas for them
18:36
<@ToxicFrog>
(GUI, though)
18:37
<@ToxicFrog>
There are also options to git log that will show you lists of changes files, or even complete diffs
18:38
<@ToxicFrog>
And if you want to see what a given commit has stored without checking it out, git ls-tree -r <commit>
18:38
< Tarinaky>
I see. Thanks.
18:39
< Tarinaky>
I was wondering if you knew anything about using code generated by flex/bison in a C++ project?
18:39
<@ToxicFrog>
don't~
18:39
<@ToxicFrog>
Well, not really
18:40
<@ToxicFrog>
I tried it once, it didn't go well, but then, I hate C++
18:40
<@ToxicFrog>
I know flex and bison have some support for it
18:40
<@McMartin>
You may have to do the extern "C" stuff
18:40
< Tarinaky>
Same. There's just enough on google to suggest it can be done without actually giving any indication of how to do it >.<
18:41
< Tarinaky>
And from what I can gleam everyone seems to be doing it in very different ways.
18:41
<@ToxicFrog>
Well, reading what the flex/bison manuals have to say about C++ support and the --c++ option may be a good start
18:41
<@ToxicFrog>
http://flex.sourceforge.net/manual/Cxx.html#Cxx
18:42
< Derakon[work]>
grep -E "def|class" sebH.py | wc -l
18:42
< Derakon[work]>
135
18:42
< Derakon[work]>
Aaaargh
18:48
<@McMartin>
^def, surely
18:49
< Derakon[work]>
That won't catch defs inside classes.
18:49
< Derakon[work]>
Or defs inside other defs.
18:49
<@McMartin>
Mm
18:49
< Derakon[work]>
(Similarly, ^class won't catch classes inside defs, which I know he's done)
18:50 * McMartin is mostly concerned about identifiers with "def" in it.
18:50
< Derakon[work]>
Sufficiently uncommon as to be noise for the purposes of that survey.
18:57
<@ToxicFrog>
135 didn't sound unreasonable until I realized there was no -r on that grep >.<
18:59
< Derakon[work]>
Yeah, that's a 1686-line Python file, and as near as I can tell the functions have little to do with one another.
18:59
< Derakon[work]>
I suspect the H stands for Helper.
19:00 * Derakon[work] hacks up the code enough to get it to where it doesn't crash on its own right at the start.
19:01
< Tarinaky>
...In C is int function (void) a synonym for int function () or is this allowed because of the weaker type checking in C?
19:02
< Derakon[work]>
Instead, I get this: http://derakon.dyndns.org/~chriswei/temp2/lappyui.png
19:02
<@ToxicFrog>
The former
19:03
< Tarinaky>
Where can I find the prototype for yyerror?
19:03
< Derakon[work]>
This application does not deal well with having less than its expected...what, 3000x1280 resolution?
19:03
< Tarinaky>
It wasn't in lex.yy.c :s
19:04
< Derakon[work]>
Does this help? http://publib.boulder.ibm.com/infocenter/zvm/v5r4/index.jsp?topic=/com.ibm.zvm.v 54.dmsp4/hcsp4b10106.htm
19:04
< Derakon[work]>
Second result on googling for yyerror.
19:04 Reiver [~reaverta@Admin.Nightstar.Net] has quit [Ping Timeout]
19:05 Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code
19:05 mode/#code [+o Reiver] by ChanServ
19:06
<@ToxicFrog>
Tarinaky: in the manual.
19:06 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
19:06
< Tarinaky>
ToxicFrog: Cheers.
19:06
<@ToxicFrog>
For yacc/bison, that is
19:07
<@ToxicFrog>
In the man page, grep for 'int yyerror'; I forget where it is in the HTML manual.
19:08
< Tarinaky>
Manual says int yyerror(char*).
19:08
< Tarinaky>
But it's complaining about a "deprecated conversion from string constant to char*"
19:08
< Derakon[work]>
What're you passing it?
19:09
<@ToxicFrog>
My copy says 'int yyerror(const char *)'
19:09
<@ToxicFrog>
Which is not the same thing.
19:09
< Tarinaky>
I'm not calling it explicitly. I renamed my yacc specification to 'yy' and am attempting to compile using a c++ compiler instead of a C compiler.
19:10
< Tarinaky>
The linker doesn't seem to like it though.
19:11 Syloq [~Syloq@NetAdmin.Nightstar.Net] has joined #code
19:12 Syloq is now known as Syloqs-AFH
19:12
<@ToxicFrog>
Did you actually tell flex/bison to output C++?
19:13
<@ToxicFrog>
And even if you're not calling it explicitly, if you declare it as taking (char *) but the parser calls it with (const char *), there will be complaints.
19:13
< Tarinaky>
I was on the understanding that changing the file extension to yy did that since the code produced was '.cc'.
19:13
< Tarinaky>
ToxicFrog: I know. I was answering Derakon.
19:13 Syloqs-AFH [~Syloq@NetAdmin.Nightstar.Net] has quit [Connection reset by peer]
19:14
<@ToxicFrog>
http://www.gnu.org/software/bison/manual/bison.html#C_002b_002b-Parsers
19:21 Syloq [~Syloq@NetAdmin.Nightstar.Net] has joined #code
19:22 Syloq is now known as Syloqs-AFH
19:24
< Derakon[work]>
(Incidentally, the entirety of Jetblade has 508 defs/classes, as determined by find . -name "*.py" | xargs grep -E "def .*:|class .*:" | wc -l)
19:28 Syloqs-AFH [~Syloq@NetAdmin.Nightstar.Net] has quit [Ping Timeout]
19:41
< Rhamphoryncus>
Tarinaky: regarding C function declarations, it's actually the other way around. int function (void) is the explicit declaration and int function () is the vague one
19:41
< Tarinaky>
Rhamphoryncus: I never specified which was implicit or explicit.
19:41
< Rhamphoryncus>
I'm using the wrong words
19:41
< Tarinaky>
I just said synonymous :p
19:42
< Rhamphoryncus>
There's a specific meaning for ()
19:42
< Rhamphoryncus>
So (void) is synonymous with what you THINK () should be, but not with what () actually is
19:42
< Tarinaky>
I thought C accepted int foo() as a prototype?
19:43
< Rhamphoryncus>
Your compiler might accept it, but it has some peculiar meaning
19:45
< Rhamphoryncus>
"
19:45
< Rhamphoryncus>
gah
19:45
< Rhamphoryncus>
"The difference in C is that with (void), you're specifying that it has no parameters, while with () you're specifying that the parameters are unspecified unless it is not a functiondeclaration but a functiondefinition, in which case it's the same as (void)."
19:46
< Tarinaky>
I see.
19:47 * Tarinaky has never really played around with actual C so subtleties like this escape him.
19:47
< Rhamphoryncus>
void foo(void); void bar(); void foo(int i) { } // error, different signature void bar(int i) { } // ok, signature was unspecified earlier
19:47
< Rhamphoryncus>
huh, there were linefeeds in there :P
19:49 Derakon[work] [~Derakon@Nightstar-6042.ucsf.edu] has quit [Operation timed out]
19:49
< Rhamphoryncus>
C++ treats those unspecified definitions as void arguments though, which is another reason to avoid using them. Not that you should EVER use them in C
19:55
< Tarinaky>
I have a feeling this might have changed in C99 vs C89 though.
19:56
< Tarinaky>
As iirc they added Function overloading to C99.
19:57
< Tarinaky>
(and a ton of other stuff that 'only works in C++')
21:45 Derakon [~Derakon@Nightstar-6042.ucsf.edu] has joined #code
21:45 mode/#code [+o Derakon] by ChanServ
21:45
<@Derakon>
You know what's a bad sign? A Python function whose first line is this:
21:45
<@Derakon>
global _nx_last, _ncams_last, f, sv1, sv1h1, sv1h1v, sv1h2, sv1h2v1
21:48
<@gnolam>
That's not Python. That's decompiler output. :P
21:48
<@Derakon>
Har.
21:48
<@AnnoDomini>
At least it's not "sv, svv, svvv, ssvvvvv". :P
21:48
<@Derakon>
My best guess is that e.g. sv1h2 translates to "Sizer, vertical weight 1, horizontal weight 2".
21:48
<@gnolam>
Look for a h5n1 in there.
21:49
<@Derakon>
The thing that really annoys me is the f there.
21:49
<@Derakon>
Because I can't very well just do :%s/f/frame/g
21:50
<@AnnoDomini>
gnolam: My chemistry is hazy. Methanol?
21:50
<@gnolam>
That's what editors' "match whole word only" feature is for. :)
21:50
<@gnolam>
AnnoDomini: Bird flu.
21:50
<@AnnoDomini>
Oh.
21:50
<@Derakon>
Google FTW~
21:51
<@gnolam>
Methanol is CH3OH.
21:51 You're now known as TheWatcher
21:51
<@Derakon>
Yo, TW.
21:51
<@AnnoDomini>
My arms send subtle hints to my brain to avoid moving overmuch.
21:51
<@AnnoDomini>
This includes changing windows.
21:52
<@Derakon>
Injured, or just tired?
21:52
<@AnnoDomini>
Tired.
21:52
<@AnnoDomini>
I returned from KM.
21:53
<@Derakon>
Krav Maga?
21:55
<@TheWatcher>
'ullo
21:55
<@AnnoDomini>
Yes.
21:57
<@Derakon>
Anyway, time to unplug the network cable again.
21:57
<@Derakon>
I'm pretty certain that my laptop can't talk to the microscope, but I'd rather not risk ruining someone's experiment until I'm actually certain.
21:57 Derakon [~Derakon@Nightstar-6042.ucsf.edu] has quit [Quit: Leaving]
22:23 Consul [~Consul__@Nightstar-1744.dsl.sfldmi.ameritech.net] has joined #code
22:23 mode/#code [+o Consul] by ChanServ
22:59 Thaqui [~Thaqui@121.98.166.ns-22683] has quit [Client exited]
23:03
<@AnnoDomini>
Hey, guys - have you ever used a laptop for a server?
23:34 Derakon [~Derakon@Nightstar-6042.ucsf.edu] has joined #code
23:34 mode/#code [+o Derakon] by ChanServ
23:35
<@Derakon>
Starting to get something I can actually see, if not work with: http://derakon.dyndns.org/~chriswei/temp2/lappyui2.png
23:41
<@AnnoDomini>
Where's the PETE button?
23:42
<@Derakon>
Part of some code that got added after the pure-Python version was made. I still need to migrate it in.
--- Log closed Thu Sep 10 00:00:32 2009
code logs -> 2009 -> Wed, 09 Sep 2009< code.20090908.log - code.20090910.log >