Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 782 783 784 785 786 787 788 789 790 791 792 .. 5022
502,152 events total
2020-10-21 18:51:42 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2020-10-21 18:52:02 <hyperisco> I don't know what I missed in the code repo for process but I cannot see anywhere it adds on ".exe"
2020-10-21 18:52:27 <hyperisco> and CreateProcess in win32 makes no mention of adding this implicitly, in fact it features optional extension
2020-10-21 18:53:14 <hyperisco> and the call to CreateProcess leaves the extension arg NULL, so it could only be part of the command path
2020-10-21 18:53:20 <hyperisco> but nowhere do I see .exe being added to that path
2020-10-21 18:53:42 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-10-21 18:54:22 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-10-21 18:59:56 tnm joins (~tnm@dslb-084-056-234-071.084.056.pools.vodafone-ip.de)
2020-10-21 19:00:50 × LKoen quits (~LKoen@81.255.219.130) (Remote host closed the connection)
2020-10-21 19:01:39 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
2020-10-21 19:02:16 × tv quits (~tv@unaffiliated/tv) (Ping timeout: 256 seconds)
2020-10-21 19:02:35 <hyperisco> the original issue seems to be gone https://github.com/haskell/process/commit/270e43a2138898967da904e3d61a6e2589cb7b1a
2020-10-21 19:03:33 berberman_ joins (~berberman@unaffiliated/berberman)
2020-10-21 19:04:02 <hyperisco> adding .exe is part of https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa ie CreateProcessA not CreateProcess
2020-10-21 19:04:15 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
2020-10-21 19:05:28 <monochrom> Does "documentation for the Windows SearchPath API" say something about this?
2020-10-21 19:05:40 <hyperisco> I mean not part of SearchPathA https://docs.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-searchpatha which is what the process docs link to
2020-10-21 19:05:57 thir joins (~thir@p4febc651.dip0.t-ipconnect.de)
2020-10-21 19:06:49 justsomeguy joins (~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b)
2020-10-21 19:06:49 × justsomeguy quits (~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b) (Changing host)
2020-10-21 19:06:49 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2020-10-21 19:07:28 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Client Quit)
2020-10-21 19:07:40 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2020-10-21 19:07:41 <monochrom> I still think it's simplest to find a way to ensure that "tsc.exe" exists.
2020-10-21 19:08:05 <hyperisco> it really isn't
2020-10-21 19:08:35 <hyperisco> tsc.cmd exists and I can use that if createProcess on tsc throws
2020-10-21 19:08:49 <hyperisco> I just wanted to know where this .exe thing is coming from
2020-10-21 19:09:16 <hyperisco> sstill unclear because process called CreateProcess I assume from windows.h but why do the docs call it CreateProcessA
2020-10-21 19:09:47 <monochrom> Does Windows have some kind of strace? That can speed up the search.
2020-10-21 19:09:54 <hyperisco> https://stackoverflow.com/questions/3060991/what-is-the-difference-between-createprocess-and-createprocessa it is just a macro for unicode vs ascii
2020-10-21 19:10:20 <hyperisco> so that's the end of that… Windows just puts .exe on if there is no extension, thanks Windows… I absolve you process package
2020-10-21 19:10:45 geekosaur suspected as much, because windows
2020-10-21 19:10:58 acidjnk_new2 joins (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
2020-10-21 19:11:16 <hyperisco> I guess that is why npm gives you both tsc and tsc.cmd lol
2020-10-21 19:11:51 <monochrom> It is a legacy thing that traces all the day back to DOS.
2020-10-21 19:12:31 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 19:12:33 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-10-21 19:12:40 × thir quits (~thir@p4febc651.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 19:12:58 seanvert joins (~user@177.84.244.242)
2020-10-21 19:13:00 conal joins (~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 19:13:01 <monochrom> and CP/M. DOS took this idea from CP/M
2020-10-21 19:13:02 <Chousuke> Meaningful file extensions are probably one of those "eh, good enough" choices made way back in the past that you just can't undo.
2020-10-21 19:13:04 <hyperisco> the docs really are linking to the wrong doc page though
2020-10-21 19:13:27 × codygman quits (~codygman@47-184-107-46.dlls.tx.frontiernet.net) (Read error: Connection reset by peer)
2020-10-21 19:13:57 thir joins (~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de)
2020-10-21 19:14:04 <monochrom> On this note actually we suffer a bit from "the victor wrote the history".
2020-10-21 19:14:12 codygman joins (~codygman@47-184-107-46.dlls.tx.frontiernet.net)
2020-10-21 19:15:35 britva joins (~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1)
2020-10-21 19:15:50 tv joins (~tv@unaffiliated/tv)
2020-10-21 19:16:04 <monochrom> There was two viable philosophies back then. Unix philosophy was "a file is a sequence of bytes, minimal metadata and semantics from the OS's POV". That was a singular, minority philosophy actually, all other OSes at the time said "a file is the bytes plus a lot of metadata to tell the OS what the file is intended for".
2020-10-21 19:16:23 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 19:16:31 <monochrom> Then all other OSes lost and Unix won.
2020-10-21 19:16:50 <geekosaur> tell that to Windows
2020-10-21 19:16:52 notnatebtw joins (~nate@110.138.18.157)
2020-10-21 19:16:53 <Chousuke> the latter turned out to be a bad idea because you can lie to the OS and it can't trust the metadata anyway.
2020-10-21 19:16:55 × borne quits (~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
2020-10-21 19:16:57 <hyperisco> sigh but the .cmd depends on knowing its own directory which doesn't seem to work with CreateProcess
2020-10-21 19:17:02 <Chousuke> so the sane thing to do is to ignore it entirely.
2020-10-21 19:17:07 × Athas quits (athas@sigkill.dk) (Quit: ZNC - http://znc.sourceforge.net)
2020-10-21 19:17:49 × thir quits (~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 19:17:59 <monochrom> geekosaur, I mean the philosophy won, even Windows programmers now assume the Unix philosophy and consider extensions to be merely UI.
2020-10-21 19:18:01 thir joins (~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de)
2020-10-21 19:18:39 <geekosaur> but the OS doesn't quite, as witness it adding ".exe" here. plus the hack I suggested which should have told it to use a null extension
2020-10-21 19:19:04 <geekosaur> (and "tsc" should have matched it as a result)
2020-10-21 19:19:23 <monochrom> And yet we actually know, when we're honest, that the Unix philosophy is wrong. Look at how Linux desktop systems have to add back an MIME type system, confessing that metadata about "file types" is right.
2020-10-21 19:19:54 <geekosaur> ^
2020-10-21 19:19:56 × arguapacha_ quits (~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca) (Read error: Connection reset by peer)
2020-10-21 19:20:30 <hyperisco> tsc.: createProcess: invalid argument (Exec format error)
2020-10-21 19:20:37 × DavidEichmann quits (~david@43.240.198.146.dyn.plus.net) (Ping timeout: 264 seconds)
2020-10-21 19:21:00 <geekosaur> lovely. so it found it and tried to treat it as something other than an exe?
2020-10-21 19:21:01 thir_ joins (~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de)
2020-10-21 19:22:52 <hyperisco> If the file name ends in a period (.) with no extension, or if the file name contains a path, .exe is not appended.
2020-10-21 19:23:09 <Chousuke> monochrom: isn't MIME mostly about giving names to file types rather than accompanying each file with a declared type? Unless you're encoding it somehow, I suppose.
2020-10-21 19:23:30 <hyperisco> I don't know what the problem is
2020-10-21 19:23:46 <Chousuke> but even if something claims to be a jpeg image you'd still best not treat it as one until it's been successfully parsed and verified :P
2020-10-21 19:23:53 <hyperisco> SearchPathA doesn't seem to care about trailing periods
2020-10-21 19:24:33 <geekosaur> Chousuke, it's a mapping from extension to file type and utilities that can operate on files of that type. It can also include or work with magic(5) data (that is, identofying files by contents; see the "file" command)
2020-10-21 19:24:43 × thir quits (~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 19:25:05 Pitaya joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 19:26:04 <hyperisco> geekosaur, oh, I see, it is saying the exe is not recognised by Windows, it did find it… ah ha… so presumably the extensionless file is intended for unix systems
2020-10-21 19:27:34 ircbrowse_tom joins (~ircbrowse@64.225.78.177)
2020-10-21 19:27:34 Server sets mode +CLnt
2020-10-21 19:28:26 × Plantain quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
2020-10-21 19:28:48 <geekosaur> ilegal to create such a file but if you specify one for an existing file it means "no extension". extensions are baked in pretty deep
2020-10-21 19:28:52 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
2020-10-21 19:28:58 <Chousuke> geekosaur: right, so it's a mechanism for mapping identified types to applications that can work with those types, and you can use the filename extension to "identify" a file type if you want to. I suppose you'd need such a mapping even if you had the type built-in to the data.
2020-10-21 19:29:11 <monochrom> I don't know and won't be pedantic about whether the MIME RFCs are only about naming file types or more ambitiously promoting attaching such named file types to files.
2020-10-21 19:30:11 <monochrom> But the way Linux desktops do it is in lieu of an OS-sanctioned metadata system, let's look at filenames and a prefix of file contents to reverse-engineer-guess-approximate the real thing.
2020-10-21 19:30:54 <monochrom> And certainly naming/IDing file types is a prerequisite of attaching file types to files in an organized way.
2020-10-21 19:31:09 <geekosaur> also Macs, with an OS-sanctioned way but it's a layer above the core OS
2020-10-21 19:31:22 <geekosaur> and not available to e.g. ghc if it wanted to use it
2020-10-21 19:31:24 <monochrom> The other, most popular file system illustrates what I mean. That file system is widely known as HTTP.
2020-10-21 19:31:43 <hyperisco> okay, so if I use a shell process the .cmd works right… the puzzle pieces are coming together
2020-10-21 19:31:46 Amras is now known as Sarma
2020-10-21 19:31:47 <geekosaur> (it's part of the Cocoa API)
2020-10-21 19:32:02 <hyperisco> annoyingly though I have to construct a shell expression instead of just passing an array of arguments
2020-10-21 19:32:19 <hyperisco> and last I checked that is nigh impossible to do correctly
2020-10-21 19:32:26 <monochrom> I can have an URL that goes "http://foo.com/xyz.pdf", and if the HTTP response header says that the file type of that file is text/html, then it's HTML, not PDF.
2020-10-21 19:33:03 <geekosaur> hyperisco: or portably
2020-10-21 19:33:22 <hyperisco> well it should work on unix because I try calling the executable directly first

All times are in UTC.