--- Log opened Tue Apr 29 00:00:50 2014 |
00:04 | | Serah [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
00:35 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
00:53 | | * Tarinaky is becoming intimately familiar with why she stopped writing C++ a few years ago. |
01:06 | <&McMartin> | Heh. |
01:06 | <@Tarinaky> | So much trudge and memory management. |
01:07 | <&McMartin> | It's not a panacaea but judicious use of shared_ptr makes life much less grim |
01:07 | <@Tarinaky> | My research says that Arduino/AVR doesn't support STL. |
01:08 | <&McMartin> | Mmm. |
01:08 | <&McMartin> | You might still be able to use boost::intrusive_ptr in that case >_< |
01:08 | | gnolam [lenin@Nightstar-o44c9a.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds] |
01:08 | <&McMartin> | It's rarely done, but C++ *can* be used to make code that's easier to manage than C rather than harder. -_- |
01:08 | | * McMartin is a Jaded and Bitter Veteran at this point. |
01:11 | | Tarinaky [tarinaky@Nightstar-e99cts.net] has quit [Ping timeout: 121 seconds] |
01:12 | | Tarinaky [tarinaky@Nightstar-e99cts.net] has joined #code |
01:12 | | mode/#code [+o Tarinaky] by ChanServ |
01:16 | | Derakon[AFK2] is now known as Derakon |
01:30 | < [R]> | Tarinaky: That's the nice thing about the STL, it's all in the headers :p |
01:31 | <@Tarinaky> | Bit late now. |
01:32 | < [R]> | Also it's not like that's the /only/ shared pointer implementation. |
01:32 | | * [R] has one in his copy of Game Coding Complete |
01:44 | | himi [fow035@Nightstar-q9amk4.ffp.csiro.au] has joined #code |
01:44 | | mode/#code [+o himi] by ChanServ |
02:28 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [[NS] Quit: reboot] |
02:29 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code |
02:30 | | mode/#code [+ao McMartin McMartin] by ChanServ |
02:35 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
02:35 | | mode/#code [+o JustBob] by ChanServ |
03:38 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
04:17 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
04:17 | | mode/#code [+o JackKnife] by ChanServ |
04:22 | | Derakon is now known as Derakon[AFK2] |
05:16 | | thalass [thalass@Nightstar-s6dmeo.bigpond.net.au] has joined #code |
05:17 | | mode/#code [+o thalass] by ChanServ |
05:31 | | thalass [thalass@Nightstar-s6dmeo.bigpond.net.au] has quit [Ping timeout: 121 seconds] |
05:31 | | Kindamoody[zZz] is now known as Kindamoody |
05:57 | | thalass [thalass@Nightstar-s6dmeo.bigpond.net.au] has joined #code |
05:57 | | mode/#code [+o thalass] by ChanServ |
06:04 | | ErikMesoy|sleep is now known as ErikMesoy |
06:08 | | RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.] |
06:13 | | RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has joined #code |
06:14 | | celticminstrel [celticminst@Nightstar-ha4ihv.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:31 | < froztbyte> | <McMartin> It's rarely done, but C++ *can* be used to make code that's easier to manage than C rather than harder. -_- |
06:31 | < froztbyte> | for instance, GObject related C code |
06:31 | | gnolam [lenin@Nightstar-o44c9a.cust.bredbandsbolaget.se] has joined #code |
06:31 | | mode/#code [+o gnolam] by ChanServ |
06:31 | < froztbyte> | my first encounter with that left me wat-ing a bit |
06:34 | <&McMartin> | My brief and terrified glances of GObject reminded me more of ObjC than C++ |
07:06 | < froztbyte> | thing is |
07:06 | < froztbyte> | I think ObjC has those as primitives? |
07:06 | < froztbyte> | rather than the magic voodoo shit which GObject does |
07:07 | < froztbyte> | my C/C++ fu is not *amazingly* strong, but aiui, the shit GObject is pulling off is kinda akin to fucking around with vtable shit in C++ |
07:19 | | thalass is now known as Thalass|WT |
07:33 | | Turaiel is now known as Turaiel[Offline] |
07:34 | | Thalass|WT is now known as Thalass|schoolsout |
08:20 | | HotShot [fake@Nightstar-47u.pkr.84.108.IP] has quit [Connection closed] |
08:21 | | AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has joined #code |
08:32 | | Thalass|schoolsout is now known as Thalass |
08:44 | | Kindamoody is now known as Kindamoody|afk |
08:54 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
08:59 | | himi [fow035@Nightstar-q9amk4.ffp.csiro.au] has quit [Ping timeout: 121 seconds] |
09:29 | | Thalass is now known as Thalass|chores |
09:45 | | AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has quit [[NS] Quit: Leaving] |
10:16 | | mode/#code [+o RchrdB] by ChanServ |
10:41 | | Serah [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
10:41 | | mode/#code [+o Serah] by ChanServ |
10:42 | | Serah [Z@Nightstar-484uip.cust.comxnet.dk] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.] |
10:42 | | Serah [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
10:42 | | mode/#code [+o Serah] by ChanServ |
10:44 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
10:58 | | Serah [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
11:01 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
11:01 | | mode/#code [+o JackKnife] by ChanServ |
11:22 | | Syka [the@Nightstar-eri.5ls.156.120.IP] has joined #code |
11:23 | | Syka is now known as NSGuest1225 |
11:23 | | NSGuest1225 is now known as Syk |
11:24 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
11:24 | | mode/#code [+o himi] by ChanServ |
11:29 | | Thalass|chores [thalass@Nightstar-s6dmeo.bigpond.net.au] has quit [Ping timeout: 121 seconds] |
11:31 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
11:32 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
11:32 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
11:38 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
11:41 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
11:55 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
11:55 | | mode/#code [+o himi] by ChanServ |
12:08 | | Hercules [Hercules@Nightstar-o6e.afo.38.1.IP] has joined #code |
12:08 | < Hercules> | Hello. |
12:15 | <@RchrdB> | Good day. |
12:15 | < Hercules> | :D |
12:15 | < Hercules> | Can I know how to prevent DDoS on IRC server ? |
12:16 | <@RchrdB> | With great difficulty. You're running an IRC server somewhere and people are DDoSing it? |
12:16 | < Hercules> | yh |
12:17 | < Syk> | they cant ddos what isnt running |
12:17 | < Hercules> | Someone told me that If I link two irc server on different ip, and it will help to prevent DDoS as both IRC server need to be DDoSed at same time. |
12:19 | < Hercules> | is it true? |
12:20 | < Hercules> | RchrdB ? |
12:21 | <@Tarinaky> | They only need to DDoS the 'main' server for everyone using it to be affected. If you split your user base evenly betweeen the two servers then only half the sdervice will be interrupted I guess... |
12:21 | <@Tarinaky> | But it's not difficult to DDoS more than one address. |
12:22 | <@RchrdB> | The term "DoS" is a little bit generic. Are people connecting thousands of bots to your IRC server to keep it busy, or just flooding its internet connection? |
12:22 | <@Azash> | RchrdB's question is important so you can figure out how to recognize the attackers |
12:22 | < Hercules> | So anyway to stop it, not fully but preventing it on small DDoS attacks ? |
12:23 | <@Azash> | Does fail2ban prevent TCP DoSing too? |
12:23 | <@Azash> | Or is there a similar tool |
12:23 | <@RchrdB> | If it's just flooding the internet connection with some kind of amplification attack then yeah, connecting up multiple IRC servers in different places will give you more aggregate capacity. |
12:23 | < Hercules> | Azash : any program that recognize the attackers and stops it ? |
12:23 | <@Azash> | Also re. servers, if you have two servers then whoever is connected to the target server will still suffer |
12:24 | <@Azash> | If you have more than that, attackers can go for one of the central nodes and at worst cause huge netsplits |
12:24 | <@RchrdB> | Azash, (which happens to freenode all the time ð) |
12:24 | < Hercules> | So, any program for Linux that will reconize and the attackers and prevent it? |
12:25 | <@Azash> | I asked about fail2ban because I'm not sure but there's probably some kind of program that can recognize the more common TCP attacks at least |
12:25 | <@Azash> | If it's on a layer above that, like in the IRC protocol, then I don't know |
12:25 | < Hercules> | oh |
12:26 | < Hercules> | thnx for the great info |
12:26 | <@Azash> | Try googling TCP DoS prevention |
12:26 | <@Azash> | Or TCP DoS block tool |
12:26 | <@Azash> | Or something like that |
12:26 | | * Tarinaky sighs. Well, now I've written my software. All I have to do is write unit tests and make it work :D |
12:26 | <@Azash> | You didn't specify, Hercules, whether it's a straight up DoS or people connecting to your server on a billion IRC bots |
12:26 | <@Tarinaky> | And yes, I know, I am a terrible person for not writing unittests first. |
12:26 | <@Azash> | TDD TDD TDD |
12:27 | < Hercules> | Azash : I know how to prevent Billion IRC bots. |
12:27 | < Hercules> | I have done that before also. |
12:27 | <@Tarinaky> | Azash: I find TDD awkward for developing tabula rasa. |
12:27 | < Hercules> | My floodserv automatically sets the modes that will help to prevent the spam. |
12:31 | < Hercules> | How can I install SYN cookies. |
12:31 | < Hercules> | I found something like that. |
12:32 | <@Azash> | Linux? |
12:32 | <@Azash> | http://www.cyberciti.biz/faq/enable-tcp-syn-cookie-protection/ |
12:32 | < Hercules> | yes |
12:38 | < Hercules> | SYN cookies enabled. |
12:38 | < Hercules> | is they gonna help me to prevent small DDoS attacks ? |
12:40 | <@Azash> | It's going to help prevent some types of DoS |
12:40 | < Hercules> | it not gonna prevent DDoS ? |
12:40 | <@Azash> | There's a lot of different attack types |
12:41 | <@Azash> | It's going to prevent most of the common ones |
12:41 | <@Azash> | But if you still have trouble you need to look a bit more at what's happening |
12:41 | < Hercules> | How I can see from which IP I was DDoSed |
12:46 | | Hercules [Hercules@Nightstar-o6e.afo.38.1.IP] has quit [[NS] Quit: Beep... Beep... Woip...] |
12:54 | | Thalass|chores [thalass@Nightstar-s6dmeo.bigpond.net.au] has joined #code |
12:55 | | Thalass|chores is now known as Thalass |
12:55 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
12:56 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
12:58 | <@Azash> | I think he might be in some deep waters, hope he can swim |
13:09 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
13:09 | | mode/#code [+o himi] by ChanServ |
13:23 | | Turaiel[Offline] is now known as Turaiel |
13:55 | | Turaiel is now known as Turaiel[Offline] |
14:00 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
14:13 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
14:13 | | mode/#code [+o himi] by ChanServ |
14:18 | | * Tarinaky is struggling to remember |
14:19 | <@Tarinaky> | Is "class A;" valid C++ to declare that a class exists, somewhere else, so that I can use its type for parameters without worrying about circular dependancies? |
14:20 | <@Tarinaky> | That sounds wrong now that I think about it. |
14:21 | <@Tarinaky> | Ah. Internet says it's right. |
14:25 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
14:39 | | Datawalke [Datawalke@Nightstar-1b1.i5a.224.199.IP] has joined #code |
14:49 | <&Derakon[AFK2]> | IIRC generally you use "extern class A;" in that situation. |
14:54 | <@Tarinaky> | Reasons Maths has broken me: I have gotten this far and suddenly realised I have absolutely no idea what units I am in. |
15:17 | <@Tarinaky> | 100 compiler errors to fix. |
15:17 | <@Tarinaky> | 100 compiler errors |
15:18 | <@Tarinaky> | You fix up the syntax and add a semi-colon... |
15:18 | <@Tarinaky> | 99 compiler errors to fix |
15:20 | <@Tarinaky> | It'd be easier if cmd.exe let me make the box wider. |
15:20 | <@Tarinaky> | It's like trying to read your mail through a cat-flap :/ |
15:23 | <&ToxicFrog> | o/ 99 minor bugs in the code/99 minor bugs/track one down/and patch it out/103 minor bugs in the code o/` |
15:23 | <&ToxicFrog> | Tarinaky: do not use cmd.exe. Ever. |
15:24 | <&ToxicFrog> | If you have cygwin, use cygwin rxvt. If you don't, use powershell, or install a third-party tty emulator for windows. |
15:27 | <@Tarinaky> | ToxicFrog: Cygwin doesn't want to play nice with mingw and tries to invoke cygwin's native compiler. |
15:28 | <&ToxicFrog> | Oh. Use the mingw rxvt, then. |
15:28 | <&ToxicFrog> | I forgot about that one. |
15:28 | <&ToxicFrog> | (it might be part of MSYS rather than mingw core) |
15:28 | <@Tarinaky> | Also, cygwin doesn't play nice with interactive python. |
15:28 | <@Tarinaky> | Which is another good reason to use cmd.exe sometimes. |
15:28 | <@Tarinaky> | Anyway, TL;DR. Install Gentoo. |
15:28 | <&ToxicFrog> | There's a way you can tell cygwin to use the mingw tools, but I forget what it is. I know that '-mno-cygwin' tells it not to autolink libcygwin1, but I don't think that's equivalent. |
15:29 | <&ToxicFrog> | No. There is no good reason to use cmd.exe. I am dead serious here. |
15:29 | <@Tarinaky> | I'd rather not have to memorise obscure invocations just to do the right thing. |
15:29 | <&ToxicFrog> | Even if you have a good reason to use the cmd shell, cmd.exe is such a godawfully bad terminal emulator that it will take you less time to download and install a better one than to do whatever you were trying to do in cmd.exe. |
15:29 | <@Tarinaky> | It's, maybe, not right... But it's easier. |
15:29 | <&ToxicFrog> | Unless you're just running ping, I guess. |
15:30 | <&ToxicFrog> | (also, cygwin plays just fine with the python REPL, at least the python one. I have no idea what happens if you install a windows native one and then try to invoke it from cygwin, though.) |
15:31 | <&ToxicFrog> | Anyways. If you're using mingw tools, mingw/MSYS comes with a windows native port of rxvt. |
15:36 | <@Tarinaky> | Right now I am too busy trying to be productive to dick around with increasing my productivity. |
15:36 | <@Tarinaky> | Sorry. |
15:36 | <@Azash> | 16:18 <@Tarinaky> You fix up the syntax and add a semi-colon... |
15:36 | <@Azash> | 135 compiler errors to fix |
15:37 | <@Azash> | Oh TF beat me |
15:38 | <@Azash> | Tarinaky: The old savings problem |
15:50 | <@Tarinaky> | It's fine. I'm fixing linker errors now :P |
15:57 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
15:57 | | mode/#code [+o JackKnife] by ChanServ |
15:57 | | * Tarinaky blinks |
15:57 | <@Tarinaky> | Expected ')' before ';' on a lien that doesn't actually contain any semi-colas. |
15:57 | <@Tarinaky> | Colour me perplexed. |
15:58 | <@ErikMesoy> | Check next/previous? |
15:58 | <@ErikMesoy> | I know from experience that missing ; will frequently be reported as complaining about the line after the one missing ; |
15:58 | <@Tarinaky> | I did. |
15:59 | <@Tarinaky> | The line before it is one that doesn't need a semi-cola (function definition~/start block) |
15:59 | <@Tarinaky> | And the one below it... looks correct. |
16:00 | <@Tarinaky> | http://pastebin.com/0Jik9S5N << What I am looking at. |
16:03 | <@Tarinaky> | Oh hang on |
16:03 | <@Tarinaky> | DERP |
16:03 | <@Tarinaky> | Found the issue :) |
16:07 | | Syk [the@Nightstar-eri.5ls.156.120.IP] has quit [Connection closed] |
16:49 | | celticminstrel [celticminst@Nightstar-ha4ihv.dsl.bell.ca] has joined #code |
16:49 | | mode/#code [+o celticminstrel] by ChanServ |
16:56 | | AnnoDomini is now known as Julius |
17:02 | <@Tarinaky> | One test down! |
17:02 | | * Tarinaky cries |
17:06 | <@Alek> | so unhappy about completing tests? |
17:06 | <@Tarinaky> | Took me a while to find the bug that was causing the first test to fail. |
17:06 | | * Alek passes Taki a bottle of Captain Morgan. |
17:06 | <@Tarinaky> | Also it's 5pm and I haven't made as much progress as I really need to have made -.- |
17:07 | <@Tarinaky> | Also not sure how to test a lot of the stuff, sensibly. |
17:32 | | Turaiel[Offline] is now known as Turaiel |
17:33 | | * Tarinaky declares a state of fuck it, that'll do. |
17:45 | | Thalass [thalass@Nightstar-s6dmeo.bigpond.net.au] has quit [Ping timeout: 121 seconds] |
--- Log closed Tue Apr 29 19:16:14 2014 |
--- Log opened Tue Apr 29 19:16:21 2014 |
19:16 | | TheWatcher [chris@Nightstar-ksqup0.co.uk] has joined #code |
19:16 | | Irssi: #code: Total of 37 nicks [20 ops, 0 halfops, 0 voices, 17 normal] |
19:16 | | mode/#code [+o TheWatcher] by ChanServ |
19:16 | | ^Xires [xires@Nightstar-bir6q3.feedthetrolls.net] has quit [Connection closed] |
19:16 | | Irssi: Join to #code was synced in 37 secs |
19:20 | | Turaiel is now known as Tur|Writing |
19:37 | | Tur|Writing is now known as Turaiel[Offline] |
19:46 | | Netsplit *.net <-> *.split quits: Xon, @Orthia, Typherix, @JustBob, @Alek, @celticminstrel, Xirest, @RchrdB, @Azash, RobinStamer, (+1 more, use /NETSPLIT to show all of them) |
19:54 | | Orth_ [quassel@Nightstar-ksqup0.co.uk] has quit [Ping timeout: 121 seconds] |
19:54 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
19:56 | | Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code |
19:56 | | mode/#code [+ao Reiver Reiver] by ChanServ |
19:56 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
19:56 | | mode/#code [+o Syloq] by ChanServ |
19:57 | | Netsplit over, joins: @RchrdB, @Alek, @Orthia, @JustBob, Xon, Typherix, @celticminstrel, RobinStamer, Turaiel[Offline], Xirest (+1 more) |
19:57 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: .] |
19:57 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
19:57 | | mode/#code [+o Syloq] by ChanServ |
20:17 | | Datawalke [Datawalke@Nightstar-1b1.i5a.224.199.IP] has joined #code |
20:18 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
20:18 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
20:37 | | Kindamoody|afk is now known as Kindamoody |
20:41 | | Julius is now known as AnnoDomini |
20:54 | <@ErikMesoy> | http://projectnaptha.com/ This looks promising. |
20:57 | <@celticminstrel> | Indeed! |
21:04 | <@Azash> | I might as well share this here too |
21:04 | <@Azash> | I needed to debug a large rails application today |
21:04 | <@Azash> | And didn't really know how to handle the massive amount of info from just using rdb |
21:05 | <@Alek> | Naptha doesn't seem to work inside Flash though. yet. |
21:05 | <@Azash> | So I did: yes "s" | rake test > step.txt |
21:05 | <@Azash> | Then, in order to get a sequential reference of how classes were accessing each other |
21:05 | <@Azash> | grep "^\\[[0-9]*, [0-9]*\\]" step.txt | sed -E "s/^[^a-z]* in (.*)$/\1/" | uniq > step.calls.txt |
21:06 | <@Azash> | I grepped the lines with the function calls, cut them down to just the file name, and uniq'd so I wouldn't get it muddled with multiple calls within the same class |
21:06 | | Kindamoody is now known as Kindamoody[zZz] |
21:06 | <@Azash> | Then I used my make-shift sequential flow chart/text file to analyze a bit and started culling |
21:06 | <@Azash> | And in about ten minutes I had my 3.2 million line step.txt down to roughly 2000 lines |
21:07 | <@Azash> | Letting me have a detailed view of just the important bits |
21:07 | <@Azash> | It was fun |
21:22 | <@TheWatcher> | "Fun" and "rails", not something you often see together~ |
21:26 | <@Azash> | TheWatcher: Why not? Rails is intuitive and very pleasant to work with, IMO |
21:26 | <@TheWatcher> | Fair enough, good for you! |
21:26 | <@Azash> | What I personally see as the biggest problem is that Rails tutorials are almost invariably horseshit |
21:27 | <@Azash> | Sam Ruby's book is the real deal though |
21:27 | <@TheWatcher> | It probably doesn't help that the majority of my experience with rails ahs been with things like getting behemoths like gitlab to work |
21:28 | <@Azash> | Well, no, no matter how fun a language is to dev in, hacking it into shape will always be a drag |
21:28 | <@Azash> | On a side note, I prefer the more descriptive word used for hacking code to work in Finnish, knifing/stabbing it |
21:29 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
21:29 | <@gnolam> | Has anyone made forks named "Damsel on Rails" or "Twirling Moustaches on Rails" yet? |
21:29 | <@gnolam> | Azash: how... stereotypical. :) |
21:29 | <@Azash> | No, but there is cobol on cogs and bash on balls |
21:30 | <@TheWatcher> | The latter being what you feel like you're doing after using the former~ |
21:32 | <@Azash> | Well played |
22:10 | | Datawalke [Datawalke@Nightstar-1b1.i5a.224.199.IP] has quit [[NS] Quit: ] |
22:18 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
22:18 | | mode/#code [+o Reiv] by ChanServ |
22:23 | | HotShot [HotShot@Nightstar-v7se27.try.wideopenwest.com] has joined #code |
23:11 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
23:36 | <@Tarinaky> | It's probably a bad sign that CSV has replaced JSON as my preferred datafile format :/ |
23:36 | <@Tarinaky> | So much easier to parse q.q |
23:37 | <@Reiv> | CSV is pretty awesome |
23:37 | <@Reiv> | If nothing else it is very fast and very simple indeed |
23:38 | <@Tarinaky> | I know there's a saying that a stupid solution isn't stupid if it works... |
23:38 | <@Tarinaky> | But it feels a bit retro :/ |
23:42 | <@Tarinaky> | Oh Jesus fucking christ. |
23:42 | <@Tarinaky> | Template errors. |
23:43 | <@TheWatcher> | Bah, who needs csv of json when you have libxml2!~ |
23:44 | | * Tarinaky throws an empty energy drink can at TheWatcher. |
23:44 | <@Tarinaky> | Remind me... I have a method which returns a vector<string>. |
23:45 | | * TheWatcher is winged slightly |
23:45 | <@Tarinaky> | The line 'vector<string> record = csv_record(fin);' generates horrible errors from satan's arse. |
23:45 | <@Tarinaky> | What've I forgotten? |
23:47 | <@TheWatcher> | Uh, it returns a vector<string> not a vector<string>* ? |
23:47 | <@Tarinaky> | Should it be? |
23:47 | <@Tarinaky> | The vector is being created in the function csv_record. |
23:48 | <@TheWatcher> | Define "created" if you mean that you just do vector<string> SomeClass::csv_record(....) { vector<string> mystrings; .... return mystrings; } then you're returnign a reference to a local variable |
23:48 | <@TheWatcher> | which is not wha tyou want to do |
23:48 | <@Tarinaky> | No. |
23:49 | <@Tarinaky> | There's no class involved. |
23:49 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
23:49 | <@TheWatcher> | Wait, hold on |
23:49 | <@Tarinaky> | csv_record creates a vector<string> on the stack, stores the a record's fields inside it, and returns the vector. |
23:50 | <@TheWatcher> | You're returning the object, not a reference, so I think it should be copied. |
23:50 | <@Tarinaky> | So I should have vector<string> record(csv_record(fin) );? |
23:51 | <@TheWatcher> | (you probably want someone who isn't actually exhaused answering this, really) |
23:52 | <@Tarinaky> | I'm sure the 'correct' thing to do is to allocate the record on the heap and do memory management and make an otherwise small and elegant program take up more space in my head than it really needs to. |
23:52 | <@TheWatcher> | I'd avoid the confusion and do |
23:53 | <@TheWatcher> | void csv_record(vector<string>& stringlist) { .... } and then do vector<stirng> mystrings; csv_record(mystrings); |
23:53 | <@TheWatcher> | ie: pass a reference to the vector you want to fill in into the function filling it it |
23:53 | <@TheWatcher> | *it in |
23:53 | <@Tarinaky> | Makes sense. |
23:55 | <@Tarinaky> | Apparently that didn't fix it :/ |
23:55 | <@TheWatcher> | You're 'using namespace std;' or sticking std:: infront of them, right? |
23:56 | <@Tarinaky> | using namespace std. |
23:56 | <@Tarinaky> | I think I see the issue. |
23:56 | <@Tarinaky> | I am a derp. |
23:57 | <@Tarinaky> | It's a note, not an error itself. |
--- Log closed Wed Apr 30 00:00:06 2014 |