- 
                Notifications
    You must be signed in to change notification settings 
- Fork 159
Port ruby data_generator.rb to Julia #258
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
          
     Merged
      
      
    
                
     Merged
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    This reduces the number of dependencies needed when regenerating the C code. The new code also separates C code generation from unicode data analysis somewhat more cleanly which should be better factored for generating a Julia version of the data files in the future. The output is identical to the original Ruby script, for now. Some bugs which were found in the process are noted as FIXMEs in the Julia source and can be fixed next.
| Bump. Any interest in this? | 
    
  c42f 
      added a commit
        to c42f/UnicodeNext.jl
      that referenced
      this pull request
    
      Dec 21, 2023 
    
    
      
  
    
      
    
  
* Data generator from JuliaStrings/utf8proc#258 * Partial porting progress of utf8proc functions to Julia * Some APIs from Base.Unicode and Unicode stdlib
              
                    stevengj
  
              
              reviewed
              
                  
                    Dec 21, 2023 
                  
              
              
            
            
              
                    stevengj
  
              
              reviewed
              
                  
                    Dec 21, 2023 
                  
              
              
            
            
              
                    inkydragon
  
              
              reviewed
              
                  
                    Jan 2, 2024 
                  
              
              
            
            
              
                    stevengj
  
              
              reviewed
              
                  
                    Jan 2, 2024 
                  
              
              
            
            
              
                    stevengj
  
              
              reviewed
              
                  
                    Jan 2, 2024 
                  
              
              
            
            
              
                    stevengj
  
              
              reviewed
              
                  
                    Jan 2, 2024 
                  
              
              
            
            
| Nice, looks like we're good to go here. | 
              
                    stevengj
  
              
              reviewed
              
                  
                    Jan 2, 2024 
                  
              
              
            
            
| Thanks for working on this. Care to open up PRs for the FIXMEs? | 
| 
 Will do! | 
  This was referenced Jan 4, 2024 
      
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This reduces the number of dependencies needed when regenerating the C code by removing ruby from the tool chain. In addition, the bootstrapping requirement that libutf8proc needs to be built before CharWidths.txt can be generated is removed. The new code also separates C code generation from unicode data analysis more cleanly.
The output C code is identical to the original Ruby script, for now. Some bugs which were found in the process are noted as FIXMEs in the Julia source and can be fixed next.
This version of the script should also be better factored for generating a Julia version of the data file in the future (see JuliaLang/JuliaSyntax.jl#381 for the somewhat unfortunate reasons that this seems like a good idea).