1. pathinfo is broken
- Posted by useless_ Apr 19, 2013
- 1652 views
trace(1) object info = pathinfo("C:\\euphoria\\docs\\readme.txt")
[copy-paste from dosbox] info={ {92\,101e,117u,112p,104h,111o,114r,105i,97a,92\,100d,111o,99c,115s}, {114r,101e,97a,100d,109m,101e,46.,116t,120x,116t}, {114r,101e,97a,100d,109m,101e}, {116t,120x,116t}, {67C} } * Press Enter to resume trace [/copy-paste from dosbox]
but according to http://openeuphoria.org/docs/std_filesys.html#_1345_pathinfo:
-- WINDOWS info = pathinfo("C:\\euphoria\\docs\\readme.txt") -- info is {"C:\\euphoria\\docs", "readme.txt", "readme", "txt", "C"}but, it isn't, on winXP, as you can see?
useless
2. Re: pathinfo is broken
- Posted by gbonvehi Apr 19, 2013
- 1610 views
What version of Euphoria are you using?
In latest commit from HG I can read inside filesys.e
-- Returns: -- A **sequence**, of length five. Each of these elements is a string: -- * The path name. For //Windows// this excludes the drive id. -- * The full unqualified file name -- * the file name, without extension -- * the file extension -- * the drive id --So I guess the online documentation is not up to date with the code.
However, the example is still wrong:
-- -- WINDOWS -- info = pathinfo("C:\\euphoria\\docs\\readme.txt") -- -- info is {"C:\\euphoria\\docs", "readme.txt", "readme", "txt", "C"}
Edit: I've just checked 4.0.5 and the behavior is the same as you describe. It's definitely a bug in the documentation.
3. Re: pathinfo is broken
- Posted by useless_ Apr 20, 2013
- 1532 views
What version of Euphoria are you using?
Euphoria Interpreter v4.0.5 development Windows, Using Managed Memory Revision Date: 2013-02-11 02:10:21, Id: 5981:42b209901e89
Edit: I've just checked 4.0.5 and the behavior is the same as you describe. It's definitely a bug in the documentation.
Instead, can pathinfo[1] be the entire path minus the filename? That's what i was looking for, in all the fury to make Euphoria easier, i still do
object savepath = reverse(cmd) savepath = savepath[match("\\",savepath)..$] savepath = reverse(savepath)
Altho i could use rmatch(), i have used the reverse method for 10 years or more. Yeas, there's other ways too.
useless
4. Re: pathinfo is broken
- Posted by BRyan Apr 20, 2013
- 1557 views
object savepath = cmd[1..rmatch(sequence "\\", cmd)-2]
5. Re: pathinfo is broken
- Posted by BRyan Apr 20, 2013
- 1585 views
object savepath = cmd[1..rmatch(sequence "\\", cmd)-2]
correction
object savepath = cmd[1..rmatch("\\", cmd)-2]
6. Re: pathinfo is broken
- Posted by BRyan Apr 20, 2013
- 1540 views
correction number 2
object savepath = cmd[1..rmatch("\\", cmd)]
7. Re: pathinfo is broken
- Posted by useless_ Apr 20, 2013
- 1567 views
correction number 2
object savepath = cmd[1..rmatch("\\", cmd)]
That's why i still do it the way i do it.
useless
8. Re: pathinfo is broken
- Posted by mattlewis (admin) Apr 22, 2013
- 1469 views
Instead, can pathinfo[1] be the entire path minus the filename? That's what i was looking for, in all the fury to make Euphoria easier, i still do
object savepath = reverse(cmd) savepath = savepath[match("\\",savepath)..$] savepath = reverse(savepath)
Altho i could use rmatch(), i have used the reverse method for 10 years or more. Yeas, there's other ways too.
Have you tried pathname?
Matt
9. Re: pathinfo is broken
- Posted by useless_ Apr 22, 2013
- 1440 views
Instead, can pathinfo[1] be the entire path minus the filename? That's what i was looking for, in all the fury to make Euphoria easier, i still do
object savepath = reverse(cmd) savepath = savepath[match("\\",savepath)..$] savepath = reverse(savepath)
Altho i could use rmatch(), i have used the reverse method for 10 years or more. Yeas, there's other ways too.
Have you tried pathname?
Matt
Never heard of it. You are saying pathname isn't in pathinfo? Ironic. Did you know the "See also:" under http://openeuphoria.org/docs/std_filesys.html#_1345_pathinfo doesn't list pathname? Neither does http://openeuphoria.org/docs/std_filesys.html#_1354_dirname . In fact, it looks now like pathname() is an alias for dirname()?
I hit another similar situation an hour or so later, and shelved the whole project. I didn't start it to discover issues, or learn the OS, or learn the new keywords.
useless
10. Re: pathinfo is broken
- Posted by jimcbrown (admin) Apr 22, 2013
- 1433 views
Instead, can pathinfo[1] be the entire path minus the filename? That's what i was looking for, in all the fury to make Euphoria easier, i still do
object savepath = reverse(cmd) savepath = savepath[match("\\",savepath)..$] savepath = reverse(savepath)
Altho i could use rmatch(), i have used the reverse method for 10 years or more. Yeas, there's other ways too.
Have you tried pathname?
Matt
Never heard of it. You are saying pathname isn't in pathinfo? Ironic.
It is in there, but the drive letter is listed separately. (That should still work as an "absolute" path if the current drive is the same one that that path is from.) Docs are buggy, though.
Did you know the "See also:" under http://openeuphoria.org/docs/std_filesys.html#_1345_pathinfo doesn't list pathname? Neither does http://openeuphoria.org/docs/std_filesys.html#_1354_dirname .
More buggy docs. :(
In fact, it looks now like pathname() is an alias for dirname()?
Another bug in the docs. They should be distinguished. The subtle (and undocumented?) difference: pathname() includes the drive letter and colon, but dirname() omits it altogether. Instead, dirname() returns the same kind of stripped path that pathinfo() itself returns.
Someone really needs to file tickets for all of these documentation issues.
I didn't start it to discover issues, or learn the OS, or learn the new keywords.
Understandable.
I hit another similar situation an hour or so later, and shelved the whole project.
Well, I'm suprised that you didn't come up with your own "dos-hacky" way to do it - or at least some 3.11 code to do the job.
11. Re: pathinfo is broken
- Posted by mattlewis (admin) Apr 22, 2013
- 1424 views
Someone really needs to file tickets for all of these documentation issues.
Sure, yeas, that's what will take care of it, more tickets. I'd file tickets, but i don't feel like fighting over them. I'd attempt fixing the docs, but you have your set ways for generating them that i am not allowed to be part of. I'd fix the search system, but last time i coded a search system for every word in the RDS archives, i got zero pats on the back for it. So, my takeaway is that you don't want me to do anything usefull. It's working for you so far.
ZOMG! Zero pats on the back! I don't recall this incident, but helpful help from any source is appreciated by me (and others). You used to have commit permissions, but withdrew for various reasons. I know you think there is a grand conspiracy to keep you out, but there really isn't.
Matt
12. Re: pathinfo is broken
- Posted by jimcbrown (admin) Apr 22, 2013
- 1431 views
helpful help from any source is appreciated by me (and others).
Agreed. I'd go one step further and say that just the act of reporting all of these issues on the forum is still a big help and useful contribution (as it increases the likelyhood that someone will fix them or at least create a ticket for it).
13. Re: pathinfo is broken
- Posted by useless_ Apr 22, 2013
- 1414 views
helpful help from any source is appreciated by me (and others).
Agreed. I'd go one step further and say that just the act of reporting all of these issues on the forum is still a big help and useful contribution (as it increases the likelyhood that someone will fix them or at least create a ticket for it).
And yet you have such an itchy trigger finger for deleting my posts. What is it now, every other post you automatically delete? I have no faith that anything i do to help Matt or Derek would go unpunished by you.
useless
14. Re: pathinfo is broken
- Posted by jimcbrown (admin) Apr 22, 2013
- 1421 views
helpful help from any source is appreciated by me (and others).
Agreed. I'd go one step further and say that just the act of reporting all of these issues on the forum is still a big help and useful contribution (as it increases the likelyhood that someone will fix them or at least create a ticket for it).
And yet you have such an itchy trigger finger for deleting my posts. What is it now, every other post you automatically delete? I have no faith that anything i do to help Matt or Derek would go unpunished by you.
Well, I haven't deleted any posts at all this week, so I think it's off to a good start.
15. Re: pathinfo is broken
- Posted by useless_ Apr 22, 2013
- 1426 views
helpful help from any source is appreciated by me (and others).
Agreed. I'd go one step further and say that just the act of reporting all of these issues on the forum is still a big help and useful contribution (as it increases the likelyhood that someone will fix them or at least create a ticket for it).
And yet you have such an itchy trigger finger for deleting my posts. What is it now, every other post you automatically delete? I have no faith that anything i do to help Matt or Derek would go unpunished by you.
Well, I haven't deleted any posts at all this week, so I think it's off to a good start.
Someone did:
http://openeuphoria.org/forum/121486.wc#121486
And yeas, i think it's very relavant to the topic: you said help is welcome, Matt said help is welcome, but my posts get deleted, ergo i am not welcome.
useless
16. Re: pathinfo is broken
- Posted by jimcbrown (admin) Apr 22, 2013
- 1411 views
Someone did:
http://openeuphoria.org/forum/121486.wc#121486
And yeas, i think it's very relavant to the topic: you said help is welcome, Matt said help is welcome, but my posts get deleted, ergo i am not welcome.
I guess I could argue on a technicality that the post (as reproduced in Matt's quote, if that's the whole thing) and all its child posts are diverging from the original topic of pathinfo in this thread. I'd have to ask the person who actually deleted it for his or her reasoning, though.
Also, I'd draw a significant distinction between a single post (or group of related posts) and the entire person. To use an analogy, a brilliant and kind person may have a bad day and end up writing an angry email that they later end up regretting - but this is by no means typical of that person in general. OTOH, as Matt often points out, trolls (like EUWX) can often be accidently helpful too.
17. Re: pathinfo is broken
- Posted by euphoric (admin) Apr 22, 2013
- 1452 views
I'd have to ask the person who actually deleted it for his or her reasoning, though.
I try to avoid kat's crap as much as possible, and have held myself back for a very long time, but to hear her whine about this grand conspiracy against her sometimes gets to be too much. Straw on the camel's back, etc...
So, deleted post for: Irrelevant whining, persecution complex, etc...
18. Re: pathinfo is broken
- Posted by useless_ Apr 22, 2013
- 1402 views
I'd have to ask the person who actually deleted it for his or her reasoning, though.
I try to avoid kat's crap as much as possible, and have held myself back for a very long time, but to hear her whine about this grand conspiracy against her sometimes gets to be too much. Straw on the camel's back, etc...
So, deleted post for: Irrelevant whining, persecution complex, etc...
Gosh, it's hard to see how throwing words at me like those would cause anyone to think you are anything but the nicest of humans, CK.
useless
19. Re: forum moderation is broken
- Posted by jaygade Apr 23, 2013
- 1373 views
Seriously? It looks like the moderation is broken. Someone is being WAY overzealous here.
20. Re: forum moderation is broken
- Posted by euphoric (admin) Apr 23, 2013
- 1339 views
Seriously? It looks like the moderation is broken. Someone is being WAY overzealous here.
Someone is apparently spamming the forum.
21. Re: forum moderation is broken
- Posted by useless_ Apr 23, 2013
- 1293 views
Seriously? It looks like the moderation is broken. Someone is being WAY overzealous here.
Someone is apparently spamming the forum.
Or maybe they were just trying to get ONE post thru?
useless
22. Re: forum moderation is broken
- Posted by jaygade Apr 24, 2013
- 1321 views
Seriously? It looks like the moderation is broken. Someone is being WAY overzealous here.
Someone is apparently spamming the forum.
Or maybe they were just trying to get ONE post thru?
useless
Yes, my point was that someone was deleting too many posts. They need to stop, or someone needs to stop them from doing so. I don't know if this forum keeps logs, but I think that someone with moderator privileges is abusing his or her power.
I don't always agree with what you say, useless, but I agree with your right to say it in this forum and that it's not "spamming". You have proven yourself over and over again to be a useful contributor to this community.
I don't know who is doing it, but I see a lot of your posts deleted before I get a chance to read them and judge them on their own merits.
Forked into: Overzealous forum moderation
23. Re: forum moderation is broken
- Posted by euphoric (admin) Apr 24, 2013
- 1271 views
Seriously? It looks like the moderation is broken. Someone is being WAY overzealous here.
Someone is apparently spamming the forum.
Or maybe they were just trying to get ONE post thru?
useless
My understanding is you were posting the exact same thing every time, and each time it was deleted because it was useless or inappropriate or otherwise off-topic.
In that circumstance, it's a valid deletion.
24. Re: forum moderation is broken
- Posted by useless_ Apr 24, 2013
- 1248 views
Seriously? It looks like the moderation is broken. Someone is being WAY overzealous here.
Someone is apparently spamming the forum.
Or maybe they were just trying to get ONE post thru?
useless
My understanding is you were posting the exact same thing every time, and each time it was deleted because it was useless or inappropriate or otherwise off-topic.
In that circumstance, it's a valid deletion.
As was your post, which i was responding to, which wasn't deleted, and should be.
useless
25. Re: forum moderation is broken
- Posted by euphoric (admin) Apr 24, 2013
- 1285 views
As was your post, which i was responding to, which wasn't deleted, and should be.
Actually, I was explaining why I deleted your inanity. That is an acceptable post from an admin regarding his actions taken on another post (especially as I was responding to another admin's question).