Tuesday, March 31, 2015

Bans: freenode#windows

The following
for /l %%x in (1, 1, 100) do (
  echo %%x
  echo int main^(^) {int a = 0; for^(; a ^< %%x00000 ; a++^); return a;} > prog.c
  gcc prog.c -o p.exe -lm && p.exe
)
caused "gcc failed since p.exe is locked" and before firing Windows report, I asked what can I do in IRC channel. It is obviously Windows issue.

  • 21:16.00
    circ-user-vwR7x
     
    Hi, I have noticed that when I use gcc p.c -o p.exe && p.exe in the loop, the compiler fails occasionally because p file is locked.
  • 21:16.06
    Seligas has quit: Ping timeout: 264 seconds.
  • 21:16.07
    RobinCoyote has quit: Ping timeout: 264 seconds.
  • 21:17.05
    Relapse joined the channel.
  • 21:17.57
    Deihmos has quit: Ping timeout: 256 seconds.
  • 21:18.13
    ariscop_ has quit: Ping timeout: 250 seconds.
  • 21:19.24
    badon has quit: Disconnected by services.
  • 21:19.25
    badon_ joined the channel.
  • 21:19.35
    naph-W joined the channel.
  • 21:19.53
    badon_ is now known as badon.
  • 21:20.04
    circ-user-vwR7x
     
    It seems that windows does not close the process file before proceeding to the next command. Where do I report the bug?
  • 21:20.06
    lcqf joined the channel.
  • 21:20.40
    TheBard
     
    its not Windows problem, if you don't release your file handles properly.
  • 21:24.02
    toxictra_ joined the channel.
  • 21:24.09
    exixt has quit: Quit: - nbs-irc 2.39 - www.nbs-irc.net -
  • 21:24.25
    lewellyn has quit: Ping timeout: 255 seconds.
  • 21:24.35
    Salastil joined the channel.
  • 21:24.45
    circ-user-vwR7x
     
    TheBard: What do you mean releasing file handles properly?
  • 21:25.11
    TheBard
     
    its in the MSDN docs.
  • 21:25.24
    circ-user-vwR7x
     
    go fuck yourself
  • 21:26.27
    kggr has quit: Ping timeout: 256 seconds.
  • 21:26.40
    jackbrown has quit: Ping timeout: 255 seconds.
  • 21:26.55
    kggr joined the channel.
  • 21:26.57
    ulrichard joined the channel.
  • 21:27.05
    toxictrash has quit: Ping timeout: 265 seconds.
  • 21:27.09
    circ-user-vwR7x
     
    Windows terminates my app. I expect that it has closed the streams properly. It is windows bug otherwise.
  • 21:27.21
    Ussat
     
    um..no it isnt
  • 21:28.04
    Minnebo has quit: Quit: Leaving...
  • 21:28.33
    circ-user-vwR7x
     
    Do you mean that Windows does not close handles properly and it is my bug?
  • 21:29.32
    TheBard
     
    Nope. Its all your bug. But it sounds like you have a programming issue there, so ask in the relevant programming channel. Like #cygwin maybe?
  • 21:30.01
    Ussat
     
    no, its a programming issue with YOUR code...so have fun
  • 21:30.24
    circ-user-vwR7x
     
    If I had Windows not closing Photoshop, you would tell that it is a photography issue?
  • 21:30.35
    Ussat
     
    ...
  • 21:30.43
    circ-user-vwR7x
     
    What should I program here?
  • 21:30.45
    rexwin_ left the channel.
  • 21:30.47
    Ussat
     
    go away troll
  • 21:31.11
    circ-user-vwR7x
     
    It is nice when trolls take over a channel and expell users as trolls.
  • 21:31.44
    last_staff joined the channel.
  • 21:32.11
    TheBard
     
    This is an OS support channel, not necessarily developer help. Expecially as you are wandering outside of the basics of app development.
  • 21:32.34
    RobotsOnDrugs
     
    #winapi is probably the most appropriate channel
  • 21:33.12
    sepeck
     
    circ-user-vwR7x: it's not 'Windows' it's your code or the tools.
  • 21:33.19
    circ-user-vwR7x
     
    There is nothing programming here. Why winapi? Which function should I use and why? Which function should I use if windows cannot terminate the approperly?
  • 21:33.24
    last_staff has quit: Client Quit.
  • 21:33.28
    circ-user-vwR7x
     
    App is terminating. It cannot call anything.
  • 21:33.32
    sepeck
     
    we're not a programming channel.
  • 21:33.48
    circ-user-vwR7x
     
    You are not logic channel.
  • 21:34.05
    sepeck
     
    circ-user-vwR7x: we have channel guidelines linked in /topic which you are ignoring
  • 21:34.12
    Aeiortv left the channel.
  • 21:34.23
    sepeck
     
    circ-user-vwR7x: people have tried to sugges t more appropriate channels which you are ignoring for arguments
  • 21:34.37
    circ-user-vwR7x
     
    Which guideline is saying that Windows, unralated to programming questions must be called "programming issues"?
  • 21:35.00
    sepeck
     
    this is about 'Windows' Not everything that RUNS on Windows
  • 21:35.43
    circ-user-vwR7x
     
    If non-programming question is classified as "programming issue" then EVERYTHING RUNNINING ON WINDOWS IS PROGRAMMING ISSUE and you have nothing to support.
  • 21:36.01
    S_SubZero
     
    you clearly seem unhappy with the answers you are getting here, so even if this was ##programming_in_windows_ask_ANYTHING_especially_gcc it's not living up to your expectations so maybe move on?
  • 21:36.11
    sepeck
     
    you are coding an app, the app is crashing, somehow you seem to not get this difference
  • 21:36.27
    sepeck
     
    I strongly suggestyou find a gcc related channel
  • 21:36.59
    naph-W
     
    This makes one long for boot loader or ISO download questions
  • 21:37.00
    circ-user-vwR7x
     
    You seem incapable to distinguish between programming and Windows function. You cannot guide me then. Ok?
  • 21:37.19
    sepeck
     
    I am telling you you are off topic so time for you to move on
  • 21:38.15
    circ-user-vwR7x
     
    I use standard windows batch command processor. It has nothing to do with C programming. It must only terminate my program and compile it once again.
  • 21:39.03
    sepeck
     
    circ-user-vwR7x: oh hey, I missed this earlier. Let's use polite language in channel as well
  • 21:39.06
    WyReSP joined the channel.
  • 21:39.28
    sepeck
     
    < circ-user> Hi, I have noticed that when I use gcc p.c -o p.exe && p.exe in the loop, the compiler fails occasionally because p file
  • 21:39.31
    sepeck
     
    ^^^
  • 21:39.40
    sepeck
     
    You yourself indicatged you were using a program
  • 21:39.55
    circ-user-vwR7x
     
    Yes, because Windows batch executes next command whereas preceeding is unfinished
  • 21:40.10
    circ-user-vwR7x
     
    File is locked by existing p process
  • 21:40.15
    sepeck
     
    not what you asked and then you got argumentative.
  • 21:40.37
    sepeck
     
    as to 'reporting this bug', you would call Microsoft since we are not affiliated with Microsoft
  • 21:41.08
    james0 joined the channel.
  • 21:41.26
    circ-user-vwR7x
     
    when I run gcc && p && gcc && p I expect that preceding command has completed and the files it locked are released. This has nothing to do with C programming.
  • 21:41.46
    kzard joined the channel.
  • 21:41.50
    RobotsOnDrugs
     
    msdn docs were suggested eariler
  • 21:41.51
    Soda has quit: Remote host closed the connection.
  • 21:41.58
    RobotsOnDrugs
     
    lots of information on the platform there
  • 21:42.05
    circ-user-vwR7x
     
    Which Microsoft docs?
  • 21:42.19
    sepeck
     
    if you lock the files, you need to release them properly. It seems whatever you are doing isn't, so you will need to seek those answes to correct the issue with your programs
  • 21:42.32
    circ-user-vwR7x
     
    Did you occupy the channel to say that there is MSDN and google? What should I look for?
  • 21:43.01
    sepeck
     
    you need to find a programming channel. You have been refered to some. try them
  • 21:43.05
    RobotsOnDrugs
     
    handles (as was also suggested earlier)
  • 21:43.13
    circ-user-vwR7x
     
    I did not lock anything. You may be incompetent to know that Windows locks the image file when starts the process.
  • 21:43.16
    sepeck
     
    ##windows-coding, #win32 , ##WinJS or #winapi, or a channel specific to your programming language
  • 21:43.20
    circ-user-vwR7x
     
    I do not lock anything.
  • 21:43.35
    sepeck
     
    circ-user-vwR7x: calling names is not helping you and irritating me so let's stop
  • 21:43.45
    optrusty joined the channel.
  • 21:44.01
    circ-user-vwR7x
     
    Ignoring my point is very helping.
  • 21:44.23
    RobotsOnDrugs
     
    well, we can only guess at what is locked since we don't have your code
  • 21:44.25
    sepeck
     
    let's time. I suggets you move on and try the various resources previously suggested
  • 21:44.31
    sepeck
     
    last time
  • 21:45.49
    circ-user-vwR7x
     
    You do not guess. You invent unexisting file allocation to send me to another channel.
  • 21:46.06
    kzard has quit: Ping timeout: 264 seconds.
  • 21:47.15
    sepeck
     
    welcome to irc. multiplle people disagree with you at them moment. Since you are not getting answers to your satisfaction here, I suggest you avail yourself of the various other suggested resources
  • 21:47.22
    fleshtheworld joined the channel.
  • 21:47.30
    ThugW4ffle has quit: Ping timeout: 250 seconds.
  • 21:48.07
    S_SubZero
     
    i've seen cases where installers report they are 'done' before they are actually done. With MSIs this can screw up a workflow where several MSIs are being installed in a row. For MSIs I have a way to make sure the previous installer finished.
  • 21:48.46
    sepeck
     
    wouldn't hat be an issue withthe installer though S_SubZero?
  • 21:49.04
    sepeck
     
    I know our SCCM admin has some apps they have manual cleanups on
  • 21:49.16
    wisey joined the channel.
  • 21:50.23
    S_SubZero
     
    yeah I don't think it's a Windows problem there
  • 21:50.42
    Huntyz joined the channel.
  • 21:51.53
    naph-W has quit:
  • 21:52.23
    JotaK joined the channel.
  • 21:54.01
    schreiberstein joined the channel.
  • 21:54.13
    cajunctionAI joined the channel.
  • 21:55.12
    dgmurdockiii joined the channel.
  • 21:55.37
    aegisword has quit: Read error: Connection reset by peer.
  • 21:56.01
    aegisword joined the channel.
  • 21:56.26
    Simon1245 joined the channel.
  • 21:56.58
    optrusty has quit: Quit: Be back later ...
  • 21:57.28
    chalcedony has quit: Ping timeout: 256 seconds.
  • 21:57.34
    optrusty joined the channel.
  • 22:01.38
    blizzy joined the channel.
  • 22:01.54
    optrusty has quit: Ping timeout: 245 seconds.
  • 22:02.10
    blizzy
     
    is there anyway to fix this? everytime I plug in my charger, it says that it's the wrong adapter, even though it's not. that's not the problem, the problem is is that my computer then slows down.
  • 22:02.17
    blizzy
     
    this is a Dell.
  • 22:02.30
    sepeck
     
    ##hardware
  • 22:02.37
    kruug
     
    blizzy: sounds like either a ##hardware issue, or a Dell issue
  • 22:02.38
    blizzy
     
    thanks.
  • 22:02.43
    james0 has quit: Remote host closed the connection.
  • 22:02.44
    blizzy
     
    kruug, well, it's Dell.
  • 22:02.54
    blizzy
     
    as the popup basically says that it will slow down.
  • 22:03.04
    kruug
     
    blizzy: contact Dell?
  • 22:03.34
    cubeast joined the channel.
  • 22:04.11
    SunDwarf joined the channel.
  • 22:05.27
    crymore has quit: Quit: Connection closed for inactivity.
  • 22:05.52
    blizzy
     
    ugh, this is annoying.
  • 22:06.16
    Eyes has quit: Ping timeout: 255 seconds.
  • 22:06.51
    WyReSP has quit: Ping timeout: 252 seconds.
  • 22:07.15
    maktm joined the channel.
  • 22:07.37
    Volatix has quit: Ping timeout: 264 seconds.
  • 22:07.45
    maktm
     
    I wanted to know if it is possible to use powershell without it prompting me for a command after every line of code. for example writing in python and being able to edit any part of the script.
  • 22:07.53
    maktm
     
    or is that not what PowerShell should do?
  • 22:08.30
    kruug
     
    maktm: check out PowerShell ISE
  • 22:08.31
    GlenK
     
    not entirely sure what you're after, but use the ide?
  • 22:09.06
    maktm
     
    Exactly what I was looking for. Don't mind my stupidity. Thank you.
  • 22:09.40
    ohxvoa joined the channel.
  • 22:10.02
    sepeck
     
    maktm: also try #powershell
  • 22:10.28
    sepeck
     
    maktm: and some free training resources int he powershell section here: http://www.freenode-windows.org/resources/scripting
  • 22:10.41
    maktm
     
    thank you :]
  • 22:10.47
    A-KO|tablet joined the channel.
  • 22:11.01
    V3DT has quit: Remote host closed the connection.
  • 22:11.30
    Tecnico1931 has quit: Quit: Tecnico1931.
  • 22:12.37
    Mia joined the channel.
  • 22:14.25
  • 22:14.43
    kruug
     
    ok
  • 22:15.07
    A-KO|tablet
     
    circ-user-vwR7x: use start /wait
  • 22:15.09
    A-KO|tablet
     
    dumb dumb
  • 22:16.03
    nyuszika7h
     
    A-KO|tablet: calling users dumb isn't going to help
  • 22:16.03
    cobiashimew joined the channel.
  • 22:16.24
    circ-user-vwR7x
     
    Why? Did you find that in MSDN? Didn't it tell you that batch must be executed in synchronous manner, one command after another? If it does not then how does start /wait can help?
  • 22:16.54
    A-KO|tablet
     
    circ-user-vwR7x: batch files are asynchronous. They execute commands. Using start /wait, which was added I think in XP or Vista, does exactly what you want it to do.
  • 22:17.06
    A-KO|tablet
     
    This has been the behavior in batch files for Windows for decades
  • 22:17.19
    A-KO|tablet
     
    That's why they added "start /wait"
  • 22:17.47
    A-KO|tablet
     
    nyuszika7h: I feel like it's appropriate given that the behavior he's complaining about has been Windows behavior for.....25 years?
  • 22:17.48
    circ-user-vwR7x
     
    do you mean that for for /l %%x in (1, 1, 100) do echo %%x will execute 100 echoes in parallel? Where did you find that?
  • 22:17.49
    A-KO|tablet
     
    30 years?
  • 22:17.49
    ThugW4ffle joined the channel.
  • 22:18.09
    A-KO|tablet
     
    circ-user-vwR7x: && start /wait p.exe
  • 22:18.19
    nyuszika7h
     
    that's not a valid excuse for calling people dumb
  • 22:18.37
    circ-user-vwR7x
     
    Why && start /wait p is better than && p?
  • 22:18.40
    A-KO|tablet
     
    You might also have to do some additional funky stuff. Batch files are incredibly limited, and it's not a good shell environment. Which is why Microsoft moved everything to Powershell.
  • 22:18.53
    A-KO|tablet
     
    Because start /wait will put the script on hold until the p process terminates
  • 22:18.59
    A-KO|tablet
     
    which is what you're asking for
  • 22:19.00
    ByT3b0N3 has quit: Ping timeout: 256 seconds.
  • 22:19.10
    nyuszika7h
     
    circ-user-vwR7x: it doesn't wait for p.exe to quit, it just moves on. just use "start /wait p.exe" as A-KO|tablet said - stop complaining when you get told EXACTLY what you need to do.
  • 22:19.37
    Anti-Pizza has quit: Quit: Leaving.
  • 22:20.21
    circ-user-vwR7x
     
    Then why echo in the loop are not executed in parallel?
  • 22:20.37
    kruug
     
    circ-user-vwR7x: because it's a loop
  • 22:21.07
    kruug
     
    your echo is so trivial that it's done by the time the next iteration starts
  • 22:21.14
    A-KO|tablet
     
    ^
  • 22:21.14
    WyReSP joined the channel.
  • 22:21.21
    circ-user-vwR7x
     
    Any why does substituting echo with p break the loop?
  • 22:21.28
    lcqf has quit: Remote host closed the connection.
  • 22:21.32
    kruug
     
    circ-user-vwR7x: it doesn't break the loop
  • 22:21.43
    A-KO|tablet
     
    Your loop is spawning XXXXX processes of p.exe
  • 22:21.48
    A-KO|tablet
     
    100 processes of p.exe, which is failing
  • 22:22.11
    A-KO|tablet
     
    In fact, it's starting 100 processes of gcc.exe also
  • 22:22.14
    kruug
     
    the loop fires off teh process, then goes to teh next iteration, fires off another process, then goes to teh next iteration, fires off another process...
  • 22:22.16
    kruug
     
    etc
  • 22:22.18
    kruug
     
    so
  • 22:22.20
    kruug
     
    on
  • 22:22.22
    kruug
     
    and
  • 22:22.24
    kruug
     
    so
  • 22:22.26
    kruug
     
    forth
  • 22:22.37
    A-KO|tablet
     
    The loop doesn't care what p.exe is doing, nor what gcc.exe is doing
  • 22:22.42
    A-KO|tablet
     
    And it won't wait for them
  • 22:22.48
    A-KO|tablet
     
    it doesn't care about error conditions, etc.
  • 22:22.50
    circ-user-vwR7x
     
    I have replaced gcc prog.c -o p.exe -lm && p.exe with gcc prog.c -o p.exe -lm && start /wait p.exe and still getting the same error
  • 22:22.59
    A-KO|tablet
     
    Use start /wait gcc
  • 22:23.09
    ariscop__ has quit: Ping timeout: 252 seconds.
  • 22:23.28
    kruug
     
    yeah, `start /wait` needs to be at the beginning of the line
  • 22:23.47
    kruug
     
    why are you recompiling and running the same thing 100 times anyways?
  • 22:23.54
    A-KO|tablet
     
    malware? :D
  • 22:24.41
    circ-user-vwR7x
     
    start /wait gcc prog.c -o p.exe -lm && p.exe results in 'p.exe' is not recognized as an internal or external command for every 3rd iteration and Access is denied for every 3rd iteration
  • 22:25.06
    circ-user-vwR7x
     
    I am recompiling it million of times
  • 22:25.11
    nyuszika7h
     
    use 'start /wait' for both of them
  • 22:25.12
    A-KO|tablet
     
    start /wait gcc prog.c -o p.exe -lm
  • 22:25.13
    dan2k3k4 joined the channel.
  • 22:25.15
    A-KO|tablet
     
    start /wait p.exe
  • 22:25.22
    nyuszika7h
     
    nobody told you to remove 'start /wait' from the other one
  • 22:25.39
    \mSg joined the channel.
  • 22:25.49
    kruug
     
    circ-user-vwR7x: WHY are you rcompiling the same thing and then running it, though?
  • 22:26.05
    circ-user-vwR7x
     
    kruug: that is a demo of the bug
  • 22:26.08
    qu4nt1n joined the channel.
  • 22:26.13
    kruug
     
    it's not a bug, though
  • 22:26.16
    Randall_ joined the channel.
  • 22:26.23
    kruug
     
    well, it is, but it's a fixed bug
  • 22:26.26
    circ-user-vwR7x
     
    start /wait gcc prog.c -o p.exe -lm && start /wait p.exe results in 'p.exe' is not recognized as an internal or external command for every 3rd iteration and Access is denied for every 3rd iteration
  • 22:27.11
    Randall_
     
    Is this an appropriate channel for asking questions about windows development
  • 22:27.22
    Mark|Wrk is now known as Mark|Wrk|Away.
  • 22:27.32
    circ-user-vwR7x
     
    Now, you demonstrated your level of competence below the bottom.
  • 22:28.08
    _tv_ has quit: Read error: Connection reset by peer.
  • 22:28.10
    circ-user-vwR7x
     
    I do not know which 30 years of dev you are talking about but sleep 1 in the loop executes serially, not asynchronously also.
  • 22:28.28
    TheBard
     
    Randall_, if its programming related, try one of the language channels, or ##windows-coding #winapi
  • 22:28.34
    kruug
     
    no, that pauses the thread, circ-user-vwR7x
  • 22:28.43
    Randall_
     
    Cool Thank yout TheBard
  • 22:29.18
    circ-user-vwR7x
     
    Can you imagine: p.exe does pause the thread also!
  • 22:29.50
    circ-user-vwR7x
     
    as well as gcc and all other commands in the batch
  • 22:29.57
    Relapse has quit: Quit: Trying to focus..
  • 22:30.07
    kruug
     
    no it doesn't
  • 22:30.15
    kruug
     
    since those are external tools outside of your script
  • 22:31.33
    circ-user-vwR7x
     
    Who are you trying to cheat?
  • 22:32.09
    circ-user-vwR7x
     
    I have checked, increasing the delay in the p.exe file so that it does not terminate immediately. And I am having p.exe appearing one after another, not all together.
  • 22:32.14
    sepeck
     
    circ-user-vwR7x: I am not going to warn you again about this.
  • 22:32.39
    kruug
     
    circ-user-vwR7x: it's your issue, not Microsofts and not ours
  • 22:32.54
    Slacko_Live_CD has quit: Ping timeout: 264 seconds.
  • 22:33.29
    circ-user-vwR7x
     
    Start.exe was introduced exactly to execute external programs asynchronously. The default mode is blocking.
  • 22:33.44
    Haricophile joined the channel.
  • 22:34.32
    circ-user-vwR7x
     
    kruug: I understand. This channel exists exclusively to misinform the people and explain them that thir (windows) problems are their own, not your or Windows problems.
  • 22:34.38
    ChanServ gave channel operator status to sepeck.
  • 22:34.39
    sepeck gave +q to *!*@sushi.pld.ttu.ee.
  • 22:34.39
    sepeck took channel operator status from sepeck.
  • 22:35.06
    Baronawesome has quit: Quit: ZNC - http://znc.in.

No comments: