--- Log opened Wed Nov 01 00:00:20 2017 |
00:36 | | Derakon[AFK] is now known as Derakon |
00:57 | | * Mahal grumbles |
00:57 | < Mahal> | I know what I want to do is possible in Powershell, but I don't know what to google tom ake it clear to myself. |
00:58 | < Mahal> | (create a set of data and at the end of the script export it all to csv) |
00:58 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
00:59 | <&ToxicFrog> | "powershell output <data type> as csv"? |
01:00 | < Mahal> | what do I google for <data type> though? |
01:00 | < Mahal> | I mean |
01:00 | < Mahal> | I know how to get a set of variables in a foreach loop |
01:00 | < Mahal> | but I don't know what to do with them at the end of the loop so that they're stashed somewhere to be put in a CSV after I've got all the things |
01:00 | < Mahal> | ie: |
01:01 | <&ToxicFrog> | Oh. I don't know what datatypes powershell has for this. 2d array? |
01:01 | < Mahal> | $things = get-allthisdata |
01:01 | < Mahal> | foreach (thing in things) {get info A about Thing, get info B about thing} |
01:01 | < Mahal> | $things | export-csv things.csv |
01:01 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
01:01 | | mode/#code [+o Alek] by ChanServ |
01:02 | < Mahal> | somewhere between the { and } I need to [save the information in a Something] |
01:02 | < Mahal> | and while I realise this is pretty fundamentally easy programming |
01:02 | < Mahal> | I don't know what to google |
01:04 | <&Derakon> | Array? https://ss64.com/ps/syntax-arrays.html |
01:05 | <&Derakon> | $vals = @(); foreach (thing in things) {$vals += thing} |
01:05 | <&Derakon> | I have zero familiarity with powershell, maybe that semicolon is inappropriate. |
01:05 | < Mahal> | hrm |
01:05 | | * Mahal goes to try it |
01:12 | < Mahal> | thank you, that ... seems to be doing the thing |
01:13 | < Mahal> | I'm not 100% sure, but it seems to be. |
01:14 | <&ToxicFrog> | huzzah |
01:15 | <&Derakon> | \o/ |
01:15 | <&Derakon> | Glad I could help. :) |
01:23 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
01:23 | | mode/#code [+o macdjord] by ChanServ |
01:25 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
01:32 | | Kindamoody is now known as Kindamoody[zZz] |
01:34 | | * Mahal crosses fingers, hits "go" on a large script, hopes her host doesn't implode on RAM or something |
01:34 | < Mahal> | (it probably won't, but you never know your luck when you're doing things for the first time and thus almost certainly stupidly) |
01:46 | | * Mahal waits for /any/ of the results to be not 0. |
01:55 | | Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed] |
02:27 | < Mahal> | oh ffs I am a moron |
02:27 | < Mahal> | I've just realised how I've done the CSV thing in the past |
02:27 | < Mahal> | why I forgot it today I do NOT know |
02:27 | < Mahal> | $things = get-allthedata |
02:28 | < Mahal> | foreach (thing in things) {$do stuff ; $stuff | export-csv} |
02:28 | < Mahal> | derp derp |
02:28 | < Mahal> | specifically |
02:28 | < Mahal> | foreach (thing in things) {$do stuff ; $stuff | export-csv -append} |
03:32 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
03:32 | | mode/#code [+o mac] by ChanServ |
03:34 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
03:51 | | Derakon is now known as Derakon[AFK] |
04:02 | | celticminstrel [celticminst@Nightstar-vp2fqf.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.] |
04:10 | | Vornlicious [Vorn@Nightstar-pe8qp0.sub-70-211-142.myvzw.com] has joined #code |
04:13 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
04:52 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
04:54 | | crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has quit [Ping timeout: 121 seconds] |
04:55 | | crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has joined #code |
04:55 | | mode/#code [+o crystalclaw] by ChanServ |
04:56 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
04:56 | | mode/#code [+o Alek] by ChanServ |
05:52 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
05:55 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
05:55 | | mode/#code [+o Alek] by ChanServ |
06:06 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
06:06 | | mode/#code [+o macdjord|slep] by ChanServ |
06:09 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
06:59 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
07:13 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
07:13 | | mode/#code [+o Alek] by ChanServ |
07:44 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
08:06 | | Kindamoody[zZz] is now known as Kindamoody |
09:54 | | Kindamoody is now known as Kindamoody|afk |
11:48 | | Jessikat [Jessikat@Nightstar-3f0fp3.dab.02.net] has joined #code |
13:43 | | abudhabi [abudhabi@Nightstar-7nkq9k.de] has quit [Ping timeout: 121 seconds] |
13:49 | | abudhabi [abudhabi@Nightstar-7nkq9k.de] has joined #code |
13:49 | | mode/#code [+o abudhabi] by ChanServ |
14:17 | | Vornlicious [Vorn@Nightstar-pe8qp0.sub-70-211-142.myvzw.com] has quit [[NS] Quit: Bye] |
14:17 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
14:31 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
14:36 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
14:36 | | mode/#code [+o Reiv] by ChanServ |
15:14 | | Jessikat` [Jessikat@Nightstar-k7q4oh.dab.02.net] has joined #code |
15:17 | | Jessikat [Jessikat@Nightstar-3f0fp3.dab.02.net] has quit [Ping timeout: 121 seconds] |
15:17 | | * ToxicFrog pokes C++ unhappily |
15:18 | <&ToxicFrog> | I have a std::map<int, std::pair<bool, std::vector<REDACTED*>>> the_map |
15:18 | <&ToxicFrog> | I do something like: auto the_entry = the_map[key]; the_entry.first = true; |
15:18 | <&ToxicFrog> | And then later I check the_map[key].first, and it is false. |
15:19 | <&ToxicFrog> | And as I type this out, I realize that `auto` doesn't infer indirection levels (or at least not always), so I probably need `auto&` or I'll get a back a copy of the entry, won't I, even though operator[] is declared as returning a ValueType&? |
16:17 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
16:19 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
16:19 | | mode/#code [+o Reiv] by ChanServ |
16:56 | < Jessikat`> | Yeah, auto will decay to value semantics |
16:56 | | Jessikat` is now known as Jessikat |
16:57 | < Jessikat> | Which is why you need explicit auto& in range based for loops for mutating operations |
18:02 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
18:04 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
18:18 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
18:19 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
18:19 | | mode/#code [+o Reiv] by ChanServ |
18:55 | | Kindamoody|afk is now known as Kindamoody |
19:32 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
20:06 | | Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Connection reset by peer] |
20:07 | | Kindamoody|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code |
20:07 | | mode/#code [+o Kindamoody|autojoin] by ChanServ |
20:27 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
20:29 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
20:29 | | mode/#code [+o Reiv] by ChanServ |
21:11 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Connection reset by peer] |
21:44 | | Jessikat` [Jessikat@Nightstar-7mbcnu.dab.02.net] has joined #code |
21:47 | | Jessikat [Jessikat@Nightstar-k7q4oh.dab.02.net] has quit [Ping timeout: 121 seconds] |
22:02 | | Jessikat` is now known as Jessikat |
22:12 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
22:12 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
22:13 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
22:23 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
22:23 | | mode/#code [+o Reiv] by ChanServ |
23:53 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
23:58 | | macdjord|slep is now known as macdjord |
--- Log closed Thu Nov 02 00:00:22 2017 |