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

1D Convolutions: Hardcoded code strings #833

Open
4 tasks
stormofice opened this issue Aug 21, 2021 · 3 comments
Open
4 tasks

1D Convolutions: Hardcoded code strings #833

stormofice opened this issue Aug 21, 2021 · 3 comments
Labels
Problem This is a problem in the archive or an implementation.

Comments

@stormofice
Copy link
Contributor

Bug Report

Description

A few code strings in this chapter are not backed by the implementation dependent code under code/.
Changing these to rely on the language specific implementation will improve consistency with the other code (for example if length() is not a function in another language).

Screenshots

The aforementioned strings have been marked up here:
image

For Algorithm Archive Developers

  • The bug can be reproduced
  • The bug can be fixed (if not, please explain why not in a comment below)
  • There is a timeline to fix the bug
  • The bug has been fixed (Please link the PR)
@stormofice stormofice added the Problem This is a problem in the archive or an implementation. label Aug 21, 2021
@leios
Copy link
Member

leios commented Aug 24, 2021

I don't really know how to solve this issue. We could have a language method at the start of the file that allows us to create html variables or something that we then slot in to the text?

So like

{% method %}
{% sample lang="jl" %}
    set variables to i, j, k
{% common %}
    Set variables to some other name
{% endmethod %}

Sorry it's hand-wavey. Still thinking about it!

@jiegillet
Copy link
Member

jiegillet commented Aug 31, 2021

Honestly, I would probably change the text to say something like:

Finally, as we mentioned before, it is possible to center bounded convolutions by changing the location where we calculate the each point along the filter. This can be done by offsetting the filter signal

Because depending on the language, that line you reference may look vastly different. I'm working on a Haskell version and it's not there at all.

@leios
Copy link
Member

leios commented Aug 31, 2021

To be honest, it said that originally, then I changed it due to feedback. I am happy to change it back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Problem This is a problem in the archive or an implementation.
Projects
None yet
Development

No branches or pull requests

3 participants