code logs -> 2015 -> Wed, 18 Feb 2015< code.20150217.log - code.20150219.log >
--- Log opened Wed Feb 18 00:00:46 2015
00:05
<&McMartin>
I DKC'd it up for Hex Inverter
00:05
<&McMartin>
(Sprites output by Blender)
00:10
<~Vornicus>
I'm doing a 3d game in Unity. It's not terribly difficult.
00:13
<@Reiv>
Vornicus: What are you making?
00:13
<~Vornicus>
er, 2d game
00:13
<@Reiv>
ah
00:13
<@Reiv>
Yeah my game is 2D in all but visualisation and maaaybe elevation options
00:13
<@Reiv>
(Which I should probably have because of reasons)
00:15
< MahalWurk>
augh
00:15
< MahalWurk>
I am failing to Excel logic
00:16
< MahalWurk>
please help?
00:16 Kindamoody is now known as Kindamoody[zZz]
00:17
< MahalWurk>
I have a series of text cells, some of which will contain the number 4.
00:17
< MahalWurk>
in the column next them is a number
00:17 Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has quit [Ping timeout: 121 seconds]
00:17
< MahalWurk>
and I want to take an average of the numbers but only if the text cell to the left contained a 4.
00:17
< MahalWurk>
there's a vlookup requirement here
00:17
< MahalWurk>
and my brain ow.
00:22
<@Alek>
I don't remember my excel, but the pseudocode, I think, is roughly thus: for <column>, if <cell> contains "4" or 4, add <cell in next column> to <sum variable>, increment <average counter> by 1. at the end, divide <sum variable> by <average counter> to get the average. that about right?
00:22
<~Vornicus>
SUMIF
00:22
<@Alek>
ooh, nice
00:22 * Vornicus has the nollij
00:23
<@Alek>
wait, she wants the average, not just the sum. and to have an average from the sum, you need to have a count as well.
00:23
<~Vornicus>
well, sumif(texts, numbers, criteria)/countif(texts, criteria)
00:23
<@Alek>
ah, right. XD
00:28
< MahalWurk>
thanks guys
00:45
<~Vornicus>
Reiv: I'm making a side-scrolling shooter except with gravity vs boost mechanics (like jetpack joyride: you normally accelerate downward, but holding a button makes you accelerate upward instead)
00:46 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
00:46 mode/#code [+o Checkmate] by ChanServ
00:49
<@Reiv>
aha
00:50
<@Reiv>
oh that's right, the flappy bird shooter
00:53
<~Vornicus>
Yeah, though flappy bird uses a different movement mechanic (specifically, a tap gives you a specific upward velocity)
00:56 * Reiv muses on a game where the shooting is linked to the boosting.
00:58
<~Vornicus>
No.
01:01
< MahalWurk>
So, uh
01:01
< MahalWurk>
this is what I ended up doing
01:01
< MahalWurk>
=IF([@AVERAGE]<1,(IF(ISNUMBER(SEARCH("4",[@ROOM])),$P$3,(IF(ISNUMBER(SEARCH("8", [@ROOM])),$P$5," "))))," ")
01:01
< MahalWurk>
It's a travesty, I know.
01:01 Derakon[AFK] is now known as Derakon
01:05
< MahalWurk>
I ended up splitting into two formulas, as I only wanted the average IF the cell had a number > 0.
01:28 * Vornicus checks on things in Excel
01:36
<~Vornicus>
Honestly, as it gets more complicated: each row should get a cell that's either TRUE or FALSE, depending on whether it should be counted; then sumif and countif work on that
01:57 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
01:57
<@Alek>
hrm.
01:57
<@Alek>
how about, uh.
01:58
<@Alek>
one of those top-down scrollers... but add A-10 mechanics to the gun. shooting slows you down. and if you slow down too much, you stall and fall.
01:58
<@Alek>
exaggerating for comedic effect, of course. I know the A-10 doesn't quite do that.
02:11
<&Derakon>
Wasn't there a Russian counterpart that actually did have that problem?
02:11
<&Derakon>
When it fired its main gun, there was a race to see if the plane would stall, the gun would overheat/run out of ammo, or the plane would get shaken apart first.
02:12 Thalass|double_augh is now known as Thalass
02:14
<&McMartin>
The Gryazev-Shipunov GSh-6-30.
02:15
<&McMartin>
(Thank you, what-if, "Machinegun Jetpack" edition)
02:15
<&Derakon>
Ah yes.
02:16
<&McMartin>
http://what-if.xkcd.com/21/
02:16
<&McMartin>
It had a thrust-to-weight ratio of 40.
02:17
<&McMartin>
Also, no, Alek, it turns out you were understating it.
02:17
<&McMartin>
"The GAU-8 Avenger fires up to sixty one-pound bullets a second. It produces almost five tons of recoil force, which is crazy considering that itâs mounted in a type of plane (the A-10 âWarthogâ) whose two engines produce only four tons of thrust each. If you put two of them in one aircraft, and fired both guns forward while opening up the throttle, the guns would win and youâd accelerate backward."
02:17
<&Derakon>
Well, the A-10 only has one of them.
02:17
<&McMartin>
Fair enough.
02:18
<&Derakon>
Still, 8 tons of thrust from engines vs. 5 tons from the gun might put you below stall speed.
02:18
<&Derakon>
I mean, if you fired for long enough.
02:19
<@Reiv>
IIRC the plane is built to throttle the engines to 100% while the gun is firing
02:19
<@Reiv>
Which is one of those little engineering headaches that makes me glad I'm not one >_>
02:23
<@Thalass>
https://www.youtube.com/watch?v=t-4mKUD0dEY <-- gun plane. Totally works.
02:39 Turaiel is now known as Turaiel[Offline]
03:44 Turaiel[Offline] is now known as Turaiel
04:03
<@Alek>
omg
04:03
<@Alek>
I was just wondering about it as a concept for a top-down scroller, that was all.
04:36
<&Derakon>
Incidentally, one of the builds in Altitude is a biplane with a massive cannon that you can use to fly, sort of.
04:37
<&Derakon>
(Altitude is a multiplayer 2D plane fighting/sporting game)
04:47
<~Vornicus>
Cave Story, you get (optionally) a gun that lets you fly
04:58 Thalass is now known as Thalasleep
05:00 Thalasleep [thalass@Nightstar-h1qmno.eastlink.ca] has quit [Connection closed]
05:03 Derakon is now known as Derakon[AFK]
05:05 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Connection reset by peer]
05:07 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:07 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
05:07 mode/#code [+qo Vornicus Vornicus] by ChanServ
05:07 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
05:15
<&Reiver>
No-one mentions Luftrausers and the Gungine?
05:19 Turaiel is now known as Turaiel[Offline]
05:26
<@Alek>
Gungan?
05:28 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [[NS] Quit: bbs]
05:32 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [[NS] Quit: No Ping reply in 180 seconds.]
05:34 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
05:34 mode/#code [+o Alek] by ChanServ
05:34 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
05:34 mode/#code [+o gnolam] by ChanServ
05:39 Syka [the@Nightstar-c409v3.vividwireless.net.au] has quit [Connection reset by peer]
05:39 Syka [the@Nightstar-c409v3.vividwireless.net.au] has joined #code
06:37 Kindamoody[zZz] is now known as Kindamoody
06:52 celticminstrel [celticminst@Nightstar-j5b.hci.93.65.IP] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:15 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection reset by peer]
08:16 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
08:31 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has joined #code
08:50 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
08:50 mode/#code [+o Checkmate] by ChanServ
08:53 Kindamoody is now known as Kindamoody|afk
09:06 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has quit [[NS] Quit: Leaving]
09:41 * gnolam ponders buying a ten-gallon hat.
09:44
< AnnoDomini>
To what end?
09:45
<@gnolam>
If I'm going to be cowboy coding, I want to do it in style.~
09:47 Orthia [orthianz@Nightstar-umt.die.224.119.IP] has quit [Ping timeout: 121 seconds]
09:47 Orthia [orthianz@Nightstar-umt.die.224.119.IP] has joined #code
09:47 mode/#code [+o Orthia] by ChanServ
10:05
<@Tarinaky>
Ruby.
10:05
<@Tarinaky>
I have a constant Array I want to use as an initializer for several arrays in the system by creating deep copies.
10:06
<@Tarinaky>
I've tried Array.new( ARRAY ), ARRAY.dup and a bunch of other stuff.
10:06
<@Tarinaky>
But changes to the variable arrays always seems to modify the initializer constant array.
10:06
<@Tarinaky>
Halp?
13:07 Kindamoody|afk is now known as Kindamoody
13:32 thalass [thalass@Nightstar-h1qmno.eastlink.ca] has joined #code
13:32 mode/#code [+o thalass] by ChanServ
14:09
< [R]>
Google says ActiveRecord::Base#clone
14:11
<@Tarinaky>
[R]: Google is wrong. That's the answer if I'm using Ruby On Rails.
14:14
<@TheWatcher>
dup = Marshal.load(Marshal.dump(array))?
14:17
< Shiz>
lol
14:18
< Shiz>
Tarinaky: there is no deep cloning functionality in standard Ruby
14:18
< Shiz>
sadly TheWatcher's method is the best way, or extending Object to provide your own deep_clone implementatino
14:19
< Shiz>
or you can use this: https://rubygems.org/gems/ruby_deep_clone
14:19
< Shiz>
which gives you a deep_clone implementation
14:19
< Shiz>
then you can do ARRAY.clone
14:19
< Shiz>
err rather
14:19
< Shiz>
DeepClone.clone(ARRAY)
14:23
<@Tarinaky>
Noted.
14:39
<@Tarinaky>
http://ptgmedia.pearsoncmg.com/images/9780321440303/samplechapter/Chen_bonus_ch0 2.pdf
16:07 Orthia [orthianz@Nightstar-umt.die.224.119.IP] has quit [Ping timeout: 121 seconds]
16:11 Orthia [orthianz@Nightstar-ifk.vn0.180.202.IP] has joined #code
16:11 mode/#code [+o Orthia] by ChanServ
17:03
<@Wizard>
What Shiz said
17:04
<@Wizard>
You used to be able to deep clone
17:04
<@Wizard>
But if you're using a ruby version where you can, you should be worried
17:05 mode/#code [+o Shiz] by Wizard
17:08
<@Wizard>
Tarinaky: Are you using just Ruby with no frameworks, AR, so on?
17:10
<@Wizard>
If you're strapped for time, use the gem
17:10
<@Wizard>
If you're really really strapped for time and there's a gun to your head, do the marshalling
17:10
<@Wizard>
But you may want to write some of your own clone code if you have the chance in case you have some kind of desired behaviour
17:10
<@Wizard>
For example, avoiding duplicate objects if that would be an issue
17:22 Omega [omegaboot@Nightstar-03ja8q.il.comcast.net] has joined #code
17:22 mode/#code [+o Omega] by ChanServ
17:22 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds]
17:22 Omega is now known as Alek
17:38 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
17:39 mode/#code [+o Vash] by ChanServ
18:44 celticminstrel [celticminst@Nightstar-j5b.hci.93.65.IP] has joined #code
18:44 mode/#code [+o celticminstrel] by ChanServ
18:52 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [Ping timeout: 121 seconds]
19:23 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
19:23 mode/#code [+o gnolam] by ChanServ
19:49 grindhold [quassel@Nightstar-uufabm.zebra.fastwebserver.de] has quit [Connection closed]
19:50 grindhold [quassel@Nightstar-uufabm.zebra.fastwebserver.de] has joined #code
21:06 Turaiel[Offline] is now known as Turaiel
21:29 thalass is now known as Thalass|afk
21:38 Turaiel is now known as Turaiel[Offline]
21:39 Turaiel[Offline] is now known as Turaiel
21:46 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
21:53 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
21:53 mode/#code [+o himi] by ChanServ
21:57 Turaiel is now known as Turaiel[Offline]
22:33 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
22:58 Thalass|afk is now known as Thalass
23:00 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
23:00 mode/#code [+o himi] by ChanServ
23:00 Kindamoody is now known as Kindamoody[zZz]
23:10 Turaiel[Offline] is now known as Turaiel
23:42 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:42 mode/#code [+qo Vornicus Vornicus] by ChanServ
--- Log closed Thu Feb 19 00:00:02 2015
code logs -> 2015 -> Wed, 18 Feb 2015< code.20150217.log - code.20150219.log >

[ Latest log file ]