code logs -> 2015 -> Fri, 16 Jan 2015< code.20150115.log - code.20150117.log >
--- Log opened Fri Jan 16 00:00:25 2015
00:03 Derakon[AFK] is now known as Derakon
00:04
<&Derakon>
My coworker and I wasted about an hour today trying, unsuccessfully mind you, to deal with Windows' inability to handle path lengths longer than 256 characters.
00:05
<&Derakon>
(Trying to transfer an SVN repository that includes a substantial portion of Boost)
00:05
<&McMartin>
Oh
00:05
<&McMartin>
I was going to say "prefix the path with \\?\ and use only backslashes as separators"
00:05
<&McMartin>
That handles pathnames up to 65536 UTF-16 characters.
00:05
<&Derakon>
Tried that, or at least the \\?\
00:06
<&Derakon>
Maybe my coworker used /, I don't remember.
00:06
<&McMartin>
\\?\ paths do not treat / as a path separator
00:06
<&McMartin>
If SVN's internals use / freely, that doesn't help
00:07 * Derakon shrugs.
00:10
<&Derakon>
Thanks for the heads-up; sent my coworker an email.
00:10
<&Derakon>
Maybe it'll help.
00:10
<&McMartin>
My vague memory is that if properly handed the path prefixes, os.path.join and friends do continue to work properly in Python on Windows, but I haven't tested it in extremis.
00:20 Thalasleep is now known as Thalass
01:20
<@gnolam>
Unless you use something actually useful, like pypyodbc.
01:20
<@gnolam>
Which rejects your spaceless reality and substitutes its own.
01:21
<@gnolam>
(I have no idea why.)
01:22
<@gnolam>
(There is /literally/ no reason why paths with spaces shouldn't work in it, but they don't. Not without extra quotes.)
01:24
<&ToxicFrog>
(turns out that it's shelling out to some windows program~)
01:25
<@gnolam>
(Those have no problems with spaces. Only *n?x problems do.)
02:19 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection reset by peer]
02:23
<&ToxicFrog>
(windows command line parsing is a clusterfuck of ad-hoc, program-specific fuckery. I would not merely worry but expect that the command line gets split incorrectly.)
02:33 Turaiel[Offline] is now known as Turaiel
03:01 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
03:01 mode/#code [+o Checkmate] by ChanServ
03:29
<&McMartin>
(CommandLineToArgvW is the One True Way)
03:29
<&McMartin>
(There are also several dozen false paths)
03:44
< Syka>
oh no windows CLI
03:44
< Syka>
i like how cmd.exe is still the best there really is
03:46
< Syka>
so not only do you have wacky clis, but the way you interact with them is all kdjgbdfg
03:51
<&McMartin>
Windows 10 cmd.exe will at least bring it into the twentieth century
03:51
<&McMartin>
Maybe even the early 21st
03:51 Derakon is now known as Derakon[AFK]
03:51
< Syka>
:O I can't wait
03:52
<&McMartin>
The MSYS bash shell isn't awful but it also doesn't usually play well with other components
04:07 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
04:10
<&McMartin>
http://arstechnica.com/information-technology/2014/09/windows-10-command-prompt- finally-gets-dragged-into-the-21st-century/
05:10 Thalass is now known as thalass|TF2
05:23 Turaiel is now known as Turaiel[Offline]
05:44 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds]
06:33 Red_Queen [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
06:33 mode/#code [+o Red_Queen] by ChanServ
06:33 Netsplit *.net <-> *.split quits: @Checkmate, abudhabi, @Orthia, @thalass|TF2
06:35 Netsplit over, joins: @Orthia, @thalass|TF2, abudhabi
06:35 Orthia [orthianz@Nightstar-ecsalt.callplus.net.nz] has quit [Ping timeout: 121 seconds]
06:39 Orthia [orthianz@Nightstar-ecsalt.callplus.net.nz] has joined #code
06:39 mode/#code [+o Orthia] by ChanServ
06:44 thalass|TF2 is now known as Thalass
06:44 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
06:47 Netsplit *.net <-> *.split quits: @Thalass, abudhabi
06:49 Netsplit over, joins: @Thalass, abudhabi
06:49 PinkFreud [WhyNot@Pinkfreud.is.really.fuckin.lame.nightstar.net] has quit [Ping timeout: 121 seconds]
06:51 PinkFreud [WhyNot@Pinkfreud.is.really.fuckin.lame.nightstar.net] has joined #code
06:51 mode/#code [+o PinkFreud] by ChanServ
07:25 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has joined #code
07:32 Netsplit *.net <-> *.split quits: @Thalass, abudhabi
07:34 Netsplit over, joins: @Thalass, abudhabi
07:51 Kindamoody[zZz] is now known as Kindamoody
07:54 Netsplit *.net <-> *.split quits: @Thalass, abudhabi
07:57 Netsplit over, joins: @Thalass, abudhabi
07:59 Thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has quit [[NS] Quit: Leaving]
07:59 Thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has joined #code
07:59 mode/#code [+o Thalass] by ChanServ
08:41 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
08:41 mode/#code [+o himi] by ChanServ
08:50
< abudhabi>
Hmm. Will the same magnet stick harder to a plate of sheet iron than a film of iron foil?
08:50
< gizmore>
why donĀ“t you try it out?
08:52
< abudhabi>
I have none of the three items with me.
08:53
< abudhabi>
I'm just curious how magnets work. :V
08:59
< gizmore>
this question has been asked a lot on the net lately
09:00
< gizmore>
"magnets. how do they work?!"
09:11
<@Azash>
Now here's a quiz for those who haven't heard about this bug yet
09:12
<@Azash>
In the Steam Linux client
09:12
<@Azash>
STEAMROOT="$(cd "${0%/*}" && echo $PWD)"
09:12
<@Azash>
[...]
09:12
<@Azash>
rm -rf "$STEAMROOT/"*
09:15
< abudhabi>
Why are you deleting Steam?
09:15
< abudhabi>
(Aside from draining your money, that is.)
09:16
< gizmore>
sudo rm -rf "$STEAMROOT/"*
09:17
< AverageJoe>
yup
09:19 Kindamoody is now known as Kindamoody|afk
09:24
<@Azash>
Wait, it had sudo too?
09:24
<@Azash>
Oh boy
09:24
<@Azash>
abudhabi: Probably uninstalling, though I recall someone mentioning a --reset parameter
09:31 celticminstrel [celticminst@Nightstar-de4ll6.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
09:50 gizmore [kvirc@Nightstar-8i3eb1.pools.vodafone-ip.de] has quit [[NS] Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
09:53 gizmore [kvirc@Nightstar-8i3eb1.pools.vodafone-ip.de] has joined #code
10:12
<@Tarinaky>
Well as long as you don't allow rm to be sudo'd without a password it'll halt rather than do the potentially dangerous action?#
10:12
<@Tarinaky>
Or is there a sudo bug?
10:19 * abudhabi slogs through CodeAcademy.
10:20
< abudhabi>
Is every course, not just Javascript, an introduction to programming?
10:21
< AverageJoe>
seems that way dont it?
10:21
< AverageJoe>
took me years later to focus on the higher aspects of coding on my own
10:22
< AverageJoe>
like threading and performance tweaks
10:22
< AverageJoe>
The mere concept of your main window just hanging while something happens gives me shudders of my former noobom
10:22
< AverageJoe>
s/noodom/noobdom/
10:22
< abudhabi>
No, I mean CodeAcademy specifically. The course is Javascript, but the first few dozen exercises hold very little new information to someone who's coded in anything resembling C before.
10:22
<@Azash>
Tarinaky: I presume if the line has sudo, which nobody mentioned and the ticket name implied was not the case, the script would also have a way to use it
10:23
<@Azash>
abudhabi: It's mainly an intro to syntax and some other basic stuff but considering Javascript's chaotic stupid alignment I would persevere anyway
10:23
< abudhabi>
I've learned what the syntax for function declaration is. And that Javascript uses === instead of ==. Yet I'm reluctant to skip because I might miss stuff like the === thing.
10:23
< AverageJoe>
its meant to help the newbs
10:55 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has quit [[NS] Quit: Leaving]
11:33
<@Azash>
http://i.imgur.com/jzRHbrj.jpg
11:34 * abudhabi sniggers.
11:37
<@gnolam>
And error code of the day goes to "Puncher needs reset"
11:39
< abudhabi>
Puncher needs food badly.
11:40
<@Azash>
Get ye punch
11:42 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:29
<@gnolam>
Actually, I change my mind. Error code of the day goes to "Portal communication malfunction".
12:32 Syka [the@Nightstar-c409v3.vividwireless.net.au] has quit [Connection closed]
12:33 Syka [the@Nightstar-c409v3.vividwireless.net.au] has joined #code
12:33
< abudhabi>
Better get your crowbar.
12:35
< abudhabi>
"Move 'var' declarations to the top of the function." <- What the fuck does this error message mean?
12:35
< abudhabi>
It complains about "for (var i=0;i<text.length;i++) {".
12:37 Thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has quit [Connection closed]
12:39 thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has joined #code
12:39 mode/#code [+o thalass] by ChanServ
12:49
<@gnolam>
https://github.com/ValveSoftware/steam-for-linux/issues/3671
13:17
< abudhabi>
Hmm. Typing Dvorak-like while being accidentally QWERTY produces a simple cipher.
13:19
<@TheWatcher>
One of these days I should learn dvorak
13:22
< abudhabi>
"Come with me if you want to live" becomes "Ismd ,gkj md gy tsf ,alk ks pg.d".
13:33
< abudhabi>
You can, of course, do the same with these layouts reversed.
13:34
< abudhabi>
"Come with me if you want to live" becomes "Jrm. ,cyd m. cu frg ,aby yr nck.".
13:44 * abudhabi is amused by how mangled I had to make this function for the auto-checker at CodeAcademy to accept it as valid.
13:44
< abudhabi>
http://pastie.org/9835244
13:46
<@TheWatcher>
... wat
13:47
< abudhabi>
They wanted an if-else block. I gave them a comparison. They didn't think of that. :P
13:47
<@TheWatcher>
hah
13:49 Orthia [orthianz@Nightstar-ecsalt.callplus.net.nz] has quit [Ping timeout: 121 seconds]
13:53
<@gnolam>
TheWatcher: an entirely useless skill.
13:53 Orthia [orthianz@Nightstar-ter.c44.224.119.IP] has joined #code
13:53 mode/#code [+o Orthia] by ChanServ
13:54
<@TheWatcher>
Oh?
13:54
< abudhabi>
TheWatcher: Heed not the infidel!
14:04
<@gnolam>
See e.g. http://reason.com/archives/1996/06/01/typing-errors/1
14:04
<@gnolam>
TL;DR: Dvorak is bollocks.
14:06
<@gnolam>
Its claims of superiority are based on biased and uncontrolled tests.
14:07
<@gnolam>
But training improves your speed on any layout, so train your regular QWERTY. And then you don't have to switch keyboard layouts.
14:08 Orthia [orthianz@Nightstar-ter.c44.224.119.IP] has quit [Ping timeout: 121 seconds]
14:09
<@TheWatcher>
gnolam: speed isn't an issue for me, RSI is
14:10
<@gnolam>
Same deal.
14:10
<@TheWatcher>
Fair 'nuff.
14:13 Orthia [orthianz@Nightstar-ecsalt.callplus.net.nz] has joined #code
14:13 mode/#code [+o Orthia] by ChanServ
14:50 celticminstrel [celticminst@Nightstar-de4ll6.dsl.bell.ca] has joined #code
14:50 mode/#code [+o celticminstrel] by ChanServ
16:01 thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has quit [[NS] Quit: g'night!]
16:23
<@celticminstrel>
...is "destroy and reconstruct" a bad idiom to use?
16:23
<@celticminstrel>
That is, something like x.~TypeOfX(); new(&x) TypeOfX();
17:26
<@Tarinaky>
Probably.
17:26
<@Tarinaky>
.reset() should probably be preferred.
17:26
<@Tarinaky>
Because memory allocation is expensive.
17:27
<@Tarinaky>
And depending on the type of x, .reset could be as simple as resetting a sentry.
17:35
<@celticminstrel>
There's no memory allocation involved in that...
17:36
<@Tarinaky>
I'm not familiar with the language then.
17:36
<@celticminstrel>
It's C++.
17:36
<@Tarinaky>
new is a C++ keyword that allocates memory on the heap.
17:36
<@celticminstrel>
That syntax is placement new, which calls the constructor on an existing memory block.
17:36
<@Tarinaky>
Oh
17:36
<@Tarinaky>
I Did Not Known THat.
17:37
<@celticminstrel>
Placement new and explicit destructor calls are kind of arcane. >_>
17:37
<@Tarinaky>
.reset lets you specialise though.
17:37
<@Tarinaky>
For optimisations.
17:38
<@celticminstrel>
I'm not quite sure what you mean by .reset() - are you thinking of the smart pointer classes?
17:38
<@Tarinaky>
There's no guarentee that the destructor/constructor pair won't deallocate/allocate resources behind the scenes.
17:38
<@celticminstrel>
True.
17:38
<@celticminstrel>
The class contains things like maps, vectors, and strings.
17:39
<@Tarinaky>
The STL containers all have functions to reset them to a 0-element version of themselves.
17:39
<@Tarinaky>
But just generically.
17:42 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
17:42 mode/#code [+o Alek] by ChanServ
17:43
<@celticminstrel>
The actual issue is that I have a class that contains members which need to be able to access other members of the class, so I'm putting references in various places.
17:44
<@celticminstrel>
Maybe there's a better way to do this.
17:44
<@Tarinaky>
That sounds like bad design.
17:44
<@Tarinaky>
And I don't mean that in a mean way: just a code smell.
17:45
<@celticminstrel>
Mm.
17:48
<@celticminstrel>
Though, you could say it's a bit like Java inner classes.
17:49
<@Tarinaky>
Im having difficulty saying anything useful with the information I have...
17:49
<@Tarinaky>
Can you not regenerate the other members from an authoratative source like the owning container?
17:50
<@celticminstrel>
I'm not quite sure what you mean.
17:50
<@Tarinaky>
I'm not quite sure what the problem is :/
17:50
<@celticminstrel>
The Party class contains several Characters. Some Character member functions must access members of the enclosing Party.
17:50
<@celticminstrel>
(There's more than that, but that's the most immediate one.)
17:51
<@celticminstrel>
(Also, those aren't the actual class names in the code.)
17:51
<@Tarinaky>
(I got that)
17:51
<@Tarinaky>
And what operation are you trying to perform?
17:52
<@celticminstrel>
Hm?
17:53
<@celticminstrel>
For example, when giving a Character an item, if it's gold, it has to be transferred to the party's gold pool. Is that what you're asking?
17:54
<@Tarinaky>
That requires a pointer to the owning Party class, not another character.
17:54
<@celticminstrel>
Yes.
17:54
<@Tarinaky>
So why do you need pointers to the other characters?
17:55
<@celticminstrel>
I don't.
17:55
<@celticminstrel>
At least, I don't think I do.
17:55
<@Tarinaky>
Oh, of the enclosing arty
17:55
<@Tarinaky>
I misread.
17:55
<@Tarinaky>
Okay.
17:55
<@Tarinaky>
So.
17:55
<@celticminstrel>
That said, if I have a pointer to the owning Party class, I can access the other characters as well.
17:55
<@Tarinaky>
Okay, what's the transform that lead to you performing an in-place allocation?
17:55
<@celticminstrel>
Actually, you might have a slight point here. I'm using references, but if I used pointers it might make things a bit simpler.
17:56
<@celticminstrel>
The answer to that question is the references.
17:56
<@celticminstrel>
Which gives me a choice of either in-place destroy-and-reconstruct or write my own copy assignment operator.
17:56
<@Tarinaky>
Also: if the party is changing, not the characters, that'd imply the characters own the party: not the other way around surely?
17:57
<@celticminstrel>
Huh?
17:58
<@Tarinaky>
Well you're doing an in-place destroy and reconstruct. Which means you're creating a new, different, party...
17:58
<@Tarinaky>
If the party owns the characters, destruction implies the Characters leave memory as well
17:58
<@celticminstrel>
Actually I was doing in-place destroy-and-reconstruct of a Character.
17:58
<@Tarinaky>
Ah.
17:58
<@Tarinaky>
Who has the pointer to the character?
17:58
<@celticminstrel>
The Character is contained by the Party.
17:59
<@celticminstrel>
It's not a pointer.
17:59
<@celticminstrel>
Though I suppose that could change.
17:59
<@Tarinaky>
So you .reset the character to take it back to a blank state smartly...
17:59
<@Tarinaky>
Or you tell the party to remove the character.
18:00
<@Tarinaky>
And as an optimisation you can have the party mark the character as deleted instead of actually deleting it.
18:00
<@Tarinaky>
And reuse the memory later for the new character if you're so inclined
18:00
<@celticminstrel>
Well, technically, that optimization is already in place since it's still a basic fixed-length array.
18:03
<@celticminstrel>
I'm not quite sure whether what you said is supposed to be an observation or a suggestion.
18:04
<@Tarinaky>
IDK. I'm sure you probably have more years and experience under your belt.
18:04
<@celticminstrel>
Maybe?
18:05
<@Tarinaky>
But if the party owns the characters then allocation/deallocation/creation of characters is the responsibility of the Party?
18:05
<@Tarinaky>
So you remove() the character, and add() a new one.
18:05
<@celticminstrel>
Yeah, that's probably how it should be.
18:05
<@celticminstrel>
This was originally written in C.
18:05
<@Tarinaky>
Ah.
18:05
<@Tarinaky>
Godspeed
18:06
<@celticminstrel>
Thanks?
18:41 gizmore|2 [kvirc@Nightstar-5j63s3.pools.vodafone-ip.de] has joined #code
18:43 gizmore [kvirc@Nightstar-8i3eb1.pools.vodafone-ip.de] has quit [Ping timeout: 121 seconds]
19:10 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
19:11 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
19:11 mode/#code [+o Syloq] by ChanServ
19:20 Kindamoody|afk is now known as Kindamoody
20:29 JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [[NS] Quit: ]
20:42 JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code
20:42 mode/#code [+o JustBob] by ChanServ
20:59 Kindamoody is now known as Kindamoody[zZz]
23:10
<&McMartin>
This function's fully qualified name and signature is 2,534 characters long.
23:10
<&McMartin>
Eat your heart out, Java, C++ rules the roost here.
23:10
<&McMartin>
(It's a function called by the std::string constructor)
23:16 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:16 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:50
<@celticminstrel>
For verbosity?
--- Log closed Sat Jan 17 00:00:41 2015
code logs -> 2015 -> Fri, 16 Jan 2015< code.20150115.log - code.20150117.log >

[ Latest log file ]