code logs -> 2013 -> Sun, 06 Jan 2013< code.20130105.log - code.20130107.log >
--- Log opened Sun Jan 06 00:00:08 2013
00:09
< mac>
can someone explain to me how a void function could store something in a reference parameter variable?
00:10
<&McMartin>
Which language?
00:11
< mac>
c++
00:11
<&McMartin>
So, you have, like
00:11
< mac>
I'm confused as all hell because i could have sworn there is no way to send anything from a function that is void
00:11
<&McMartin>
Incorrect
00:11
<&McMartin>
If it is void that just means there's no *return* value, so you can't use it as an expression
00:12
<&McMartin>
void foo(int &a) { a = 3; }
00:12
<&McMartin>
That sets its integer variable parameter to 3
00:12
<&McMartin>
That's what pass by reference means
00:12
< mac>
ok that makes more sence
00:12
<&McMartin>
But you do that with, say
00:12
<&McMartin>
int x;
00:12
<&McMartin>
foo(x);
00:12
<&McMartin>
Now x is 3
00:13
<&McMartin>
You can't go x = foo(2);
00:13
< mac>
getJudgeData(string j,double &); i would need something to be after the & sign right?
00:14
< mac>
my bad void getJudgeData(string j,double &);
00:15 thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has joined #code
00:15
<@rms>
Note you can do the same with pointers. References are just sugar around pointers.
00:18 * Vornicus pokes at Vorntiers for the first time in far too long.
00:19
<~Vornicus>
Okay. I was working on save/load. Still.
00:27
<@simon`>
whenever I look at my BSc project page count and think it looks insufficient, I think of G?del's thesis and its 29 pages.
00:29
<~Vornicus>
that's a good one, yes.
00:35
<@froztbyte>
simon`: it makes me sad that my math muscle is too meh right now to even read G?del's paper without spawning hundreds of tabs to catch up :/
01:02 thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has quit [Ping timeout: 121 seconds]
02:01
<~Vornicus>
DISTRACTION
02:03 * Derakon looks up to mac's question earlier.
02:03
<&Derakon>
Yes, you would need something after the &. Specifically, a variable name.
02:03
<&Derakon>
"int &foo" or "double &foo" or the like.
02:03
<&Derakon>
The & just marks the variable as being a reference.
02:03
<&Derakon>
Which broadly speaking means that the function is not responsible for creating or destroying the variable.
02:03
<&McMartin>
(variable names are optional in prototypes, but not in definitions.)
02:04
<&Derakon>
I generally feel that omitting them from prototypes is bad form.
02:04
<&McMartin>
Well, the key piece here is assigning through it.
02:04
<&McMartin>
Which appears to be the goal.
02:04
<&Derakon>
Yes.
02:04
<&McMartin>
Upir
02:04
<@rms>
He's inconsitant anyways
02:04
<@rms>
He names the string, but not the double.
02:04
<&McMartin>
Your "broadly speaking" applies more to const references than references proper
02:05
<&McMartin>
pass-by-reference is usually more about dataflow, not saving yourself some copy constructor calls.
02:05
<&Derakon>
I guess that was a bad way of explaining it.
02:05
<&Derakon>
"Like a pointer, except you don't have to dereference it" is the way I learned it.
02:07
<&McMartin>
Admittedly, I'm old-fashioned and learned pass-by-reference in a language that didn't officially *have* pointers.
02:07
<&McMartin>
... or objects
02:09
<~Vornicus>
ehich language is this?
02:09
<&Derakon>
Logo~!
02:10
<&McMartin>
Pascal, actually.
02:10
<&McMartin>
It turns out the extension we were using had both of those things, one immediately, the other eventually
02:11
<&McMartin>
We were using Borland Turbo Pascal 5.5
02:11
<&McMartin>
And while it technically has actual pointers they are stupendously clunky to actually use.
02:27
<@gnolam>
I interpreted Dera's "broadly speaking" as an explanation for the "won't be null unless the caller really makes an effort to fuck things up" idiom.
02:31
<&Derakon>
Right. The caller is responsible for creating the variable; it then just exists in the function exactly as it existed in the caller's scope.
02:37
<~Vornicus>
Yay, proper new game generation working!
02:37
<&Derakon>
I forget, are you working on Galactic Vorntiers?
02:37
<~Vornicus>
I am indeed.
02:38
<~Vornicus>
load and save have eluded me so far not least because I get so damn distracted
02:38
<&Derakon>
Heh.
02:38
<&Derakon>
Pyrel still doesn't have them yet.
02:39
<~Vornicus>
Okay, next up is save.
02:45
<~Vornicus>
Okay, stories of job application victory: Vash is sitting next to me applying to various 7-11s in town. 7-11, unlike many chains, doesn't let you apply for jobs in many places at once (as some do, but that can be annoying because there's these things called "hours of availability" that can easily change depending on the location of the store); however, when you attempt to apply for the second
02:45
<~Vornicus>
and subsequent jobs, everything you put into the application the previous time is still there, right down to the "I agree to drug testing" check box.
02:45
<@gnolam>
Drug testing. For 7-11.
02:45
<@gnolam>
WTF?
02:46
<~Vornicus>
fuckin' everything requires a drug test in the US.
02:47 syksleep is now known as Syk
02:49
<~Vornicus>
(vash wonders why I put this in code. I put it in code because it says "these developers actually thought about the interface")
03:09 * Derakon watches an Amiga demoscene project.
03:09
<&Derakon>
It's interesting how many of the...exhibits, I guess, are about 3D rendering.
03:09
<&Derakon>
I guess that was the big challenge in those days.
03:15 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
03:16 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
03:16 mode/#code [+o himi] by ChanServ
03:28 Kindamoody[zZz] is now known as Kindamoody
03:28
<@gnolam>
"Why precalculate 1296 dots when you can do it in realtime?"
03:30
<@gnolam>
(followed by "Did you know that it would take up over 2 megs to do this if it was precalculated?")
03:32
<&Derakon>
Heh.
03:34
<@gnolam>
Man, I remember how impressed I was by the bouncy transparent 3d stuff in "Human Target" back in the day: https://www.youtube.com/watch?v=pi0mI8CvC7Y#t=0m38s , https://www.youtube.com/watch?v=pi0mI8CvC7Y#t=1m48s
03:34
<&Derakon>
What's the target system for that demo?
03:34
<@gnolam>
A500
03:35
<&Derakon>
The one I was talking about was Hardwired, also an Amiga though I don't know which model.
03:35 Nemu [NeophoxProd@Nightstar-5af926d1.asahi-net.or.jp] has joined #code
03:35
<&Derakon>
Fun fact: the creators of that demo then applied their skills to making a game for the Sega Genesis...without having access to a devkit.
03:35
<@gnolam>
If it's from the early '90s, then Amiga 500.
03:35
<&Derakon>
Yeah, '91.
03:35
<@gnolam>
(Or late '80s. But really, the early '90s were the glory days.)
03:36
<@gnolam>
Derakon: !
03:37
<@gnolam>
Jesper Kyd!
03:37
<&Derakon>
I take it that name has especial relevance for you?
03:38
<@gnolam>
Derakon: https://en.wikipedia.org/wiki/Jesper_kyd#Games
03:38
<&Derakon>
...holy crap.
03:38
<&Derakon>
And yeah, I was talking about Sub-Terrania.
03:38
<&Derakon>
Which is balls hard but awesome.
03:43
<@gnolam>
Moving on from the demoscene to game making isn't uncommon, but still. :)
03:43
<&Derakon>
Sub-Terrania is notable for having several bits that look like they came straight from the demoscene.
03:44
<&Derakon>
E.g. the SEGA splash screen has bouncing pixels, and there's 3D-rendered cutscenes.
03:45 * gnolam should go through his Amiga disks some day.
03:45
<@gnolam>
Most of all, I should probably go to bed though.
04:27 harlow [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
04:28 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [Ping timeout: 121 seconds]
04:37 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
05:01 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
05:03 harlow [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [Ping timeout: 121 seconds]
05:06 harlow [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
05:08 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [Ping timeout: 121 seconds]
05:10 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
05:13 harlow [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [Ping timeout: 121 seconds]
05:13 harlow [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
05:22 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
05:23 harlow [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [Ping timeout: 121 seconds]
05:33 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [Ping timeout: 121 seconds]
05:41 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
05:51 harlow [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
05:53 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [Ping timeout: 121 seconds]
05:56 harlow [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [[NS] Quit: Leaving]
06:03 lklkj [lklkj@3CBAD0.BE6D3C.3F963D.CB0708] has joined #code
06:05
< lklkj>
hello world
06:05 lklkj [lklkj@3CBAD0.BE6D3C.3F963D.CB0708] has quit [[NS] Quit: irc2go]
07:00 Syk_ [the@Nightstar-7442d84b.iinet.net.au] has joined #code
07:01 Syk_ [the@Nightstar-7442d84b.iinet.net.au] has quit [[NS] Quit: leaving]
07:01 Syka [the@Nightstar-7442d84b.iinet.net.au] has joined #code
07:02 Syk [the@Nightstar-36aa33a4.iinet.net.au] has quit [Ping timeout: 121 seconds]
07:08 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
07:08 mode/#code [+ao Derakon Derakon] by ChanServ
07:10 ErikMesoy|sleep is now known as ErikMesoy
07:24 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
07:27 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
07:27 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
07:27 mode/#code [+ao Derakon Derakon] by ChanServ
07:28 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
08:22 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!]
09:13 You're now known as TheWatcher
10:17 Kindamoody is now known as Kindamoody|afk
10:34 You're now known as TheWatcher[afk]
11:21
<&McMartin>
Oof
11:21 * McMartin took a little nap at 6 PM which appears to have lasted until 3 AM.
11:29 thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has joined #code
11:30 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has quit [[NS] Quit: ]
12:18
<@froztbyte>
haha
12:18
<@froztbyte>
nice
13:00 * McMartin also eyes his teakettle, which has been making sounds rather alarmingly reminiscent of Within A Deep Forest's Yoga Ball.
13:13 thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has quit [Ping timeout: 121 seconds]
13:20 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
14:11 Kindamoody|afk is now known as Kindamoody
14:18 rms is now known as RStamer
16:22 Nemu [NeophoxProd@Nightstar-5af926d1.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
16:23 Syka is now known as syksleep
16:48 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
16:48 mode/#code [+o celticminstrel] by ChanServ
17:22 You're now known as TheWatcher
17:26
< ToxicFrog>
Oh god, if I make these edits the abstract won't fit on a single page anymore
17:26
< ToxicFrog>
nooooooooooo
17:47
<@TheWatcher>
>.<
17:47
<@Azash>
Dangit
17:47 Derakon is now known as Derakon[AFK]
18:25
<@RStamer>
http://pagead2.googlesyndication.com/simgad/1075635581565983609 <-- This looks familiar for an MMO's adverts...
18:37 Derakon[AFK] is now known as Derakon
19:09
<@Rhamphoryncus>
RStamer: looks pretty horrible
19:10
<@RStamer>
The game?
19:20 Kindamoody is now known as Kindamoody[zZz]
19:33
<@Rhamphoryncus>
The art
19:43 ErikMesoy is now known as Dainna_Cole
19:50 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has joined #code
19:50 mode/#code [+qo Vornicus Vornicus] by ChanServ
19:55
<@gnolam>
"Play Now, My Captain!"
19:55
<@gnolam>
"Help! Save the Vulcans!"
19:56
< Dainna_Cole>
ah, Ebooby
20:06 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
20:53 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Client closed the connection]
20:54 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has joined #code
20:54 mode/#code [+o cpux] by ChanServ
21:21 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Connection closed]
21:27 Vornicus [vorn@Nightstar-221158c7.sd.cox.net] has quit [[NS] Quit: ]
21:36 Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
21:36 Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
21:36 mode/#code [+o Courage] by ChanServ
22:25 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
22:25 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
22:25 mode/#code [+o himi] by ChanServ
22:35 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
22:35 mode/#code [+ao Derakon Derakon] by ChanServ
22:37 Reiv [NSwebIRC@A3BDC3.5BE3EC.B8847E.5ADB9D] has joined #code
22:37 mode/#code [+o Reiv] by ChanServ
22:48 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
22:59 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:01 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [Connection closed]
23:09 Nemu [NeophoxProd@Nightstar-5af926d1.asahi-net.or.jp] has joined #code
23:12 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
23:12 mode/#code [+o himi] by ChanServ
23:17 Dainna_Cole is now known as ErikMesoy|sleep
23:23 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:27 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
23:27 mode/#code [+o himi] by ChanServ
--- Log closed Mon Jan 07 00:00:23 2013
code logs -> 2013 -> Sun, 06 Jan 2013< code.20130105.log - code.20130107.log >

[ Latest log file ]