Author Topic: BUFFER_LENGTH cannot convert to an integer in 205?  (Read 5185 times)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: BUFFER_LENGTH cannot convert to an integer in 205?
« Reply #25 on: May 31, 2008, 06:46:28 AM »
All the r/r conflicts come from that double COPY_RANDOM btw. (Parser doesn't know which rule to use when doing the empty list production.)
Yeah, I know that by removing the IWD2-ease style COPY_RANDOM this'd be fixed, but I'd rather have unharmful r/r conflicts than break IWD2-Ease.

Of course, it'd be even better if that component was simply DEPRECATED and have its code flushed (since apparently it causes all sorts of CTD by placing nonsensical item combinations all around).

For example: the a @ b operator (List.append a b) you use below is not tail recursive (stack space proportional to length of a) - if you want a faster and not crashing implementation, you need to use List.rev_append (List.rev a) b.
Yep, that's what I actually meant with "Don't know if it's slower". :)
I was just pointing out why stuff in OCaml can break at times - the OCaml devs don't care about making stuff that works 100% of the times, they care about writing 'clean' code.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: BUFFER_LENGTH cannot convert to an integer in 205?
« Reply #26 on: May 31, 2008, 07:05:10 AM »
I was just pointing out why stuff in OCaml can break at times - the OCaml devs don't care about making stuff that works 100% of the times, they care about writing 'clean' code.
That's actually a problem with many academical people. :)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: BUFFER_LENGTH cannot convert to an integer in 205?
« Reply #27 on: May 31, 2008, 08:04:04 AM »
After converting grammar to right associative, 8 s/r and 67 r/r (all r/r caused by COPY_RANDOM sucking pigeon cock).

EDIT: 8 s/r, 0 r/r, without breaking IWD2 COPY_RANDOM (in theory of course). Go me  :)

EDIT: 7 s/r after a tweak in REPLACE_TEXTUALLY blah blah (match length).

EDIT: 5 s/r after forcing parens in PRETTY_PRINT*. Will be reverted if it proves to break mods.

EDIT: 4 s/r after forbidding COMPILE without any file.

EDIT: 3 s/r after tighening the supply_tog in ADD_STORE_ITEM (which only Dev uses anyway).

*: before, you could say plain PRETTY_PRINT or PRETTY_PRINT something. Now, you have to say either plain PRETTY_PRINT or PRETTY_PRINT (something).
« Last Edit: May 31, 2008, 09:01:00 AM by the bigg »
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: BUFFER_LENGTH cannot convert to an integer in 205?
« Reply #28 on: May 31, 2008, 09:05:50 AM »
You seem to have fun optimizing the grammar for the parser. :)
What about putting a comment before the rules, whose main purpose is optimization.

EDIT: 5 s/r after forcing parens in PRETTY_PRINT*. Will be reverted if it proves to break mods.
Maybe we should keep a repository with all the released tp2's to grep through them. :)

Weird, the forum software says 0 downloads for trealparserin.zip but I actually downloaded it a minute ago.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: BUFFER_LENGTH cannot convert to an integer in 205?
« Reply #29 on: May 31, 2008, 09:08:21 AM »
Quote
Maybe we should keep a repository with all the released tp2's to grep through them.
That'd be useful - I have some mods ready for a blanket install for catching many things, but there are many times when I wish I could just grep for difficult constructs  :)
EDIT: however, after parsing, I need to install them all and compare them, to see if behaviour changed (for instance, when moving ocamlyacc -> elkhound I accidentally reversed all associativity, with a parse check wouldn't have caught).

Quote
Weird, the forum software says 0 downloads for trealparserin.zip but I actually downloaded it a minute ago.
I've updated it about 30 times since your download (and I'm uploading it to the beta directory). By the way, would you be interested in having access to the beta forum? It means some slave work every six months or so, and your requests will be prioritized  :)
« Last Edit: May 31, 2008, 09:11:54 AM by the bigg »
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: BUFFER_LENGTH cannot convert to an integer in 205?
« Reply #30 on: June 01, 2008, 12:56:38 AM »
By the way, would you be interested in having access to the beta forum? It means some slave work every six months or so, and your requests will be prioritized  :)
If you think I can be useful there, sure why not. :)

About Nythruns v204 vs. current tp2 parsing: v204 did not have the old parser wrapper, so could be related to the ocamlyacc parser.


Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: BUFFER_LENGTH cannot convert to an integer in 205?
« Reply #31 on: June 02, 2008, 03:49:52 PM »
PM sent to JCompton. The forum will be available here once you're added to the list.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
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)?: