Post reply

Warning - while you were reading 4 new replies have been posted. You may wish to review your post.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: jastey
« on: January 28, 2024, 12:37:30 PM »

That sounds cool! Would that be the "WeiDU-Windows-249-x86-legacy.zip" download?
Posted by: Wisp
« on: January 02, 2024, 10:13:09 AM »

The "legacy" build already does not have this problem. Feel free to use that in the meantime.
Posted by: jastey
« on: December 28, 2023, 07:34:16 AM »

Yes, a weidu version that really solves this problem would be really cool. *waves pompons* I know you can do it! <3
Posted by: WanderingScholar
« on: December 14, 2023, 09:12:46 AM »

I know this post is old but is there any update on this? I'm still downgrading WeiDU to v246 every time I need to use gen biffing.

Hopefully it's fixed in v250, if that's released.
Posted by: AL|EN
« on: November 29, 2022, 02:39:50 AM »

Thanks, I was missing the 'local directory as local opam repository' part.

P.S. Yes, I did try to ask the community but the whole process is a mess. There was one guy who help me try to build OCaml 4.07+ for Windows XP including custom patching etc. It was a nightmare and ultimately we failed :P
Posted by: Taimon
« on: November 28, 2022, 09:29:39 AM »

@Taimon Hey, can you share details on how did you build the custom compiler?
Sure, if I can still remember the necessary steps. Some details might be missing.

First I installed cygwin with the necessary packages. I think opam was also in cygwin, otherwise I'm not sure where I got it from.
Then I added the mingw repo as default to opam (opam repository add).
Next step was playing around with the opam switch concept. (Something like a toolchain container.)
To build the custom compiler, I ended up copying the ming repo structure into a local directory, adding it to opam as local repository and then modifying the opam file in the ocaml-variants package I wanted to base my new compiler on. (I think I actually created a new folder in ocaml-variants.)
This new variant can then be used with an opam switch, which in turn is then used to build WeiDU.
(I did some fiddling around with an empty switch and adding the ocaml-variant afterwards, but I don't think this is necessary.)

In the end, it doesn't look so difficult, but the documentation was not very clear on all of this, so I ended up playing around a lot.
Funny thing is, I actually ran into some of your posts on the OCaml board while trying to figure out how to build this. :)
Didn't look like they were really able to help you.
Posted by: AL|EN
« on: November 27, 2022, 12:47:41 PM »

@Taimon Hey, can you share details on how did you build the custom compiler?
Posted by: Taimon
« on: November 20, 2022, 08:41:54 AM »

The XP-compatible build (v249) should, in that case, not have this problem, since it was compiled with OCaml 4.05.
Yes, I don't see the problem with that version.
It behaves very similar to the version I built yesterday. (no mangling of filenames when looping, same PRINT issue)
Posted by: Wisp
« on: November 20, 2022, 05:14:51 AM »

Thanks for looking into this. The XP-compatible build (v249) should, in that case, not have this problem, since it was compiled with OCaml 4.05.
Posted by: Taimon_
« on: November 19, 2022, 02:12:57 PM »

I gave this a try and it looks mostly okay for me:
The BashFor-Loop in Generalized Biffing seems to not mess up the filenames anymore.
But somehow, when I PRINT the filenames, there is still something wrong. (but in a different way than before)

I suggest using at least OCaml 4.08 due to a codepage bug.
If you are using opam, I took the file from ocaml-variants.4.08.1+mingw64 (mingw repo) and added a build-env section (after setenv, before build):
Code: [Select]
build-env: [
  [DEFAULT_STRING = "unsafe"]
  [WINDOWS_UNICODE_MODE = "ansi"]
]
(Please, don't ask how long it took me to figure out how to build a custom compiler ... this was a nightmare.)
Posted by: Taimon_
« on: November 19, 2022, 04:10:02 AM »

I think it is because OCaml added Unicode support for Windows in 4.06.

That means, Sys.readdir is probably returning UTF-8 encoded strings now, which WeiDU is not prepared to deal with appropriately.

Haven't tried it yet, but I suppose the easiest fix would be to use WINDOWS_UNICODE=0 (or set WINDOWS_UNICODE_MODE to "ansi" in opam) when building OCaml to enable legacy mode.
Posted by: Wisp
« on: October 29, 2022, 05:27:00 PM »

I had assumed this problem was due to case manipulations, but that does not seem to be so. String.*case works as expected on Latin-1 input and String.*case_ascii appears to bounds-check itself to have no effect on non-ASCII input. Since neither takes a Latin-1 codepoint and turns it into a garbled 2-byte sequence, the problem would seem to lie elsewhere, but I have not yet looked into it further.
Posted by: Salk
« on: October 05, 2022, 02:07:11 PM »

Always nice to see you, Taimon.

Let's hope Wisp take a look at your suggestion.
Posted by: Taimon_
« on: September 27, 2022, 03:03:01 AM »

This keeps coming up again and probably needs some fix/workaround.

If I understand this correctly, the OCaml function "String.uppercase" is somehow mangling non-ASCII chars in recent OCaml releases.
I wasn't able to find the change in OCaml changelog, but "String.uppercase" seems to be deprecated and will be removed anyway.
One way would be to replace it with "String.uppercase_ascii". If we only want to uppercase 'a'-'z' this should be sufficient.
However, if some mods use chars from CP1252 that can be uppercased (like 'ä' -> 'Ä') and rely on this transformation, then we probably need a different solution.
(Write a replacement function for "String.uppercase" that behaves similar to old OCaml releases?)

For testing, I assume we need to patch line 355 in tpaction.ml (TP_Biff):
Code: [Select]
find_list := (String.uppercase (directory ^ "/" ^ next)) :: !find_list;
and line 54 in biff.ml:
Code: [Select]
[ (size,file,String.uppercase a,String.uppercase b,tau) ]

Maybe someone can give this a try. Getting my build setup running again would probably take a while.

(On a sidenote: For some reason, the "password forgotten" function of the forum software does not seem to work. Or I haven't been patient enough and it still needs more time to send the mail.)
Posted by: Miloch
« on: October 10, 2021, 05:27:47 PM »

That means I know what I have to do: hasten AI update.
Once you hasten the AI update, can you use that AI to hasten the IA update?

(Yes, I know I'm necroing; it's part of the irony.)