Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced Unicode non-ASCII codepoints from x86.csv #24

Merged
merged 1 commit into from
Sep 9, 2014

Conversation

coruus
Copy link
Contributor

@coruus coruus commented Sep 7, 2014

The presence of Unicode non-ASCII codepoints caused building to fail on Ubuntu 13.10 with default package versions. (That is, system built according to instructions in repo.)

All of these characters appear to be in the descriptions of the instructions, so this shouldn't have any impact on correctness.

Here's the script I used to fixup x64.csv; licensed CC0 if you want to incorporate in ODS-extraction process.

#!/usr/bin/python
"""Replace some Unicode characters in x64.csv"""
import sys

REPLACEMENTS = [
  (u'\u03c0', u'pi'),
  (u'\u2013', u'-'),
  (u'\u2014', u'-'),
  (u'\u2217', u'*'),
  (u'\u201d', u'"'),
  (u'\u201c', u'"')]

def do(ifn, ofn):
  with open(ifn, 'rb') as f:
    u = f.read().decode('utf-8')

  for c, repl in REPLACEMENTS:
    u = u.replace(c, repl)

  s = u.encode('ascii')

  with open(ofn, 'wb') as f:
    f.write(s)

if __name__ == '__main__':
  do(sys.argv[1], sys.argv[2])

…ing to fail on Ubuntu 13.10 with default package versions.
@bchurchill
Copy link
Member

Hi Coruus,

I think we used to build this on Ubuntu 13.10 without problems. When we get a chance we'll investigate this (I'll add an item in the tracker); it's possible there's something missing from our build documentation. @eschkufz will have the final say in the matter; we'll keep you posted.

@eschkufz
Copy link
Contributor

eschkufz commented Sep 9, 2014

It makes sense that this is an issue. The text descriptions of the instructions were copy-pasted from a pdf version of the intel manual. I'm totally fine merging this in, since it sounds like all it doesn't affect functionality at all and will help more people use our code.

@eschkufz
Copy link
Contributor

eschkufz commented Sep 9, 2014

There is a larger issue here, which is that this is just a stop-gap, and that everytime we edit the spreadsheet, we end up exporting it to .csv by hand. This means that whatever fixes we end up merging right now will have to be re-merged the next time around as well.

A longer-term solution is to transition over to using just the csv file and ditching the spreadsheet all together. We can change the tab characters so that the whole thing is more readable/editable. I'll add this as a longer term issue.

Berkeley, can you merge this request? You probably have a better idea than I do right now what branches are in what state and for some reason I can't find the network graph on github right now. Feel free to close whenever you want.

bchurchill added a commit that referenced this pull request Sep 9, 2014
Replaced Unicode non-ASCII codepoints from x86.csv
@bchurchill bchurchill merged commit 284e8e2 into StanfordPL:berkeley Sep 9, 2014
@bchurchill
Copy link
Member

All things said and done, I've merged this into all the branches. I've also created a separate 'develop' branch for features or things that need more testing. The 'berkeley' branch is really just for my experiments and is becoming pretty hacky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants