-
Notifications
You must be signed in to change notification settings - Fork 743
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
Praat: support matrix and string vector type #1820
Conversation
Signed-off-by: syuparn <s.hello.spagetti@gmail.com>
functions_matrix = %w( | ||
linear mul mul_fast mul_metal mul_nt mul_tn mul_tt outer peaks | ||
randomGamma randomGauss randomInteger randomUniform softmaxPerRow | ||
solve transpose zero | ||
) | ||
|
||
functions_string_vector = %w( | ||
empty fileNames folderNames readLinesFromFile splitByWhitespace | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (non-blocking): For performance reasons, we generally encourage using class methods instead of instance variable. Since this has been a pattern of instance variables in this class, I think we can go ahead with this PR. I will do a follow-up MR to refactor these variables to class methods.
For references, we can check Rouge memory usages by running bundle exec rake check:memory
# rouge-memory.tmp
<snipped>
retained objects by file
-----------------------------------
33757 rouge/lib/rouge/lexer.rb
4971 rouge/lib/rouge/regex_lexer.rb
1140 rouge/lib/rouge.rb
424 rouge/lib/rouge/token.rb
274 ruby/lib/lib/ruby/2.7.0/cgi.rb
79 ruby/lib/lib/ruby/2.7.0/cgi/cookie.rb
66 ruby/lib/lib/ruby/2.7.0/cgi/core.rb
64 rouge/lib/rouge/themes/github.rb
63 rouge/lib/rouge/theme.rb
51 rouge/lib/rouge/themes/colorful.rb
48 rouge/lib/rouge/lexers/go.rb
45 rouge/lib/rouge/themes/pastie.rb
42 rouge/lib/rouge/lexers/apple_script.rb
40 rouge/lib/rouge/util.rb
33 rouge/lib/rouge/guessers/disambiguation.rb
32 rouge/lib/rouge/themes/thankful_eyes.rb
31 rouge/lib/rouge/themes/magritte.rb
30 rouge/lib/rouge/lexers/tcl.rb
30 rouge/lib/rouge/themes/base16.rb
27 rouge/lib/rouge/themes/monokai.rb
26 rouge/lib/rouge/themes/molokai.rb
26 rouge/lib/rouge/themes/tulip.rb
24 rouge/lib/rouge/lexers/ruby.rb
24 rouge/lib/rouge/themes/bw.rb
24 rouge/lib/rouge/themes/gruvbox.rb
18 rouge/lib/rouge/lexers/dafny.rb
18 rouge/lib/rouge/themes/monokai_sublime.rb
17 rouge/lib/rouge/lexers/mathematica.rb
17 /Users/tanle/Code/personal/rouge/tasks/check/memory.rake
15 rouge/lib/rouge/lexers/mosel.rb
14 ruby/lib/lib/ruby/2.7.0/set.rb
13 rouge/lib/rouge/lexers/common_lisp.rb
13 rouge/lib/rouge/lexers/praat.rb
...
Thanks for clarifying @Syuparn 👍🏼. I was referencing section 5.7 in the doc, not the version number 🤦🏼♂️ Apology for being misleading. |
Add types introduced in Praat version 6, matrix and string vector).
I also added some sample codes.
Closes #1819