Stories
Slash Boxes
Comments

SoylentNews is people

Meta
posted by janrinok on Tuesday June 02, @06:29AM   Printer-friendly

kolie has been hard at work producing a logical line for line copy of rehash (written in perl) in Python - including warts where they affect the functioning of the software. This will ensure that the software remains maintainable into the future, and gives kolie a chance to fix some previously unknown bugs.

PyHash is currently running on dev.soylentnews.org. Please take a look and report any problems / observations / comments in kolie's journal. This software is still under development as kolie explains. If you cannot log in with your usual username/password you might have to create a new account on dev.

This discussion was created by janrinok (52) for logged-in users only. Log in and try again!
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 2) by fraxinus-tree on Tuesday June 02, @08:00AM (2 children)

    by fraxinus-tree (5590) on Tuesday June 02, @08:00AM (#1444185)

    500 Internal Server Error Traceback (most recent call last): File "/app/rehash_pipeline/wsgi.py", line 1265, in _application handle(req) File "/app/rehash_pipeline/controllers/login.py", line 664, in handle redirect_to = f"{constants.get('real_rootdir') or ''}/login.pl?op=changeprefs¬e=Please+change+your+password+now!&oldpass={urllib.parse.quote(upasswd)}" UnboundLocalError: local variable 'urllib' referenced before assignment

    • (Score: 2) by JoeMerchant on Tuesday June 02, @12:51PM (1 child)

      by JoeMerchant (3937) on Tuesday June 02, @12:51PM (#1444202)

      I got in, but when I submitted a story:

      500 Internal Server Error Traceback (most recent call last): File "/app/rehash_pipeline/wsgi.py", line 1244, in _application handle(req) File "/app/rehash_pipeline/controllers/submit.py", line 1647, in handle ops[op][1](req) File "/app/rehash_pipeline/controllers/submit.py", line 1544, in saveSub setUserBlock(req, 'submissions', uid) File "/app/rehash_pipeline/controllers/submit.py", line 1379, in setUserBlock block = setUserSubmissionsBlock(req, user) File "/app/rehash_pipeline/controllers/submit.py", line 1296, in setUserSubmissionsBlock cursor.execute( File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 159, in execute result = self._query(query) File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 330, in _query conn.query(q) File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 582, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 847, in _read_query_result result.read() File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1245, in read first_packet = self.connection._read_packet() File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 803, in _read_packet packet.raise_for_error() File "/usr/local/lib/python3.10/site-packages/pymysql/protocol.py", line 219, in raise_for_error err.raise_mysql_exception(self._data) File "/usr/local/lib/python3.10/site-packages/pymysql/err.py", line 154, in raise_mysql_exception raise errorclass(errno, errval, sqlstate=sqlstate) pymysql.err.ProgrammingError: (1146, "Table 'soylentnews.firehose' doesn't exist")

      --
      🌻🌻🌻🌻 [google.com]
  • (Score: 2) by Thexalon on Tuesday June 02, @10:47AM (2 children)

    by Thexalon (636) on Tuesday June 02, @10:47AM (#1444191)

    I was able to log in just fine, and at first glance everything looked good, but without any stories within the last year I can't really help with testing commenting, replying, etc which is of course key functionality for this lot.

    --
    "Think of how stupid the average person is. Then realize half of 'em are stupider than that." - George Carlin
    • (Score: 0) by Anonymous Coward on Tuesday June 02, @11:05AM (1 child)

      by Anonymous Coward on Tuesday June 02, @11:05AM (#1444195)

      Same here, got in, no current stories to comment on. I was planning to see if my usual way of posting anon (while logged in) worked as expected.

      One pending story in the queue, please Editor(s) post this on the front page.

      One comment so far, on the right side of the page the pink/dev version shows:

      You have 10000 Moderator Points.
      You get 10000 points per day, given out at 00:10 UTC.

      Very generous, but I'm guessing this needs to be updated...!

      • (Score: 3, Informative) by janrinok on Tuesday June 02, @11:43AM

        by janrinok (52) Subscriber Badge on Tuesday June 02, @11:43AM (#1444197) Journal

        No, update required. dev is for testing so having unlimited modpoints can be very useful. I'll try to post some recent stories.

        However, they will not be original - this is not intended to replace the main site. Moderate it as much as you wish.

        --
        [nostyle RIP 06 May 2025]
  • (Score: 3, Funny) by PiMuNu on Tuesday June 02, @10:52AM

    by PiMuNu (3823) on Tuesday June 02, @10:52AM (#1444193)

    The pink site (when logged in) :)

  • (Score: 3, Insightful) by SomeGuy on Tuesday June 02, @11:41AM

    by SomeGuy (5632) on Tuesday June 02, @11:41AM (#1444196)

    At a very very quick glance, it looks nice and the page even views in RetroZilla 2.3 (On Windows 95!) so I just want to say thanks for keeping things authentic and sane. Most people these days would go all strategize value-added marketized Web 7.0 synergy and excellence with AI-enabled AI yada yada yada.

  • (Score: 3, Informative) by janrinok on Tuesday June 02, @05:15PM (2 children)

    by janrinok (52) Subscriber Badge on Tuesday June 02, @05:15PM (#1444235) Journal

    Please continue to test dev.soylentnews.org

    --
    [nostyle RIP 06 May 2025]
    • (Score: 2) by JoeMerchant on Tuesday June 02, @08:35PM (1 child)

      by JoeMerchant (3937) on Tuesday June 02, @08:35PM (#1444281)

      Submission worked without a crash message this time, and the previous Error 500 replied submission is also showing as pending now.

      This could use a unit on the time, or possibly an enhancement to show seconds instead of minutes...

      Slow Down Cowboy!
      Dev.SN requires you to wait between each successful posting of a comment to allow everyone a fair chance at posting a comment.

      It's been 1 since you last successfully posted a comment

      --
      🌻🌻🌻🌻 [google.com]
  • (Score: 2) by iWantToKeepAnon on Tuesday June 02, @08:58PM (1 child)

    by iWantToKeepAnon (686) on Tuesday June 02, @08:58PM (#1444284) Homepage Journal
    Clicked it and got

    500 Internal Server Error Traceback (most recent call last): File "/app/rehash_pipeline/wsgi.py", line 2029, in _application from rehash_pipeline.controllers.print import handle File "/app/rehash_pipeline/controllers/print.py", line 3, in from bs4 import BeautifulSoup ModuleNotFoundError: No module named 'bs4'

    --
    "Happy families are all alike; every unhappy family is unhappy in its own way." -- Anna Karenina by Leo Tolstoy
  • (Score: 2) by chucky on Tuesday June 02, @09:11PM (2 children)

    by chucky (3309) on Tuesday June 02, @09:11PM (#1444288)

    Logged in, article showed zero comments, but it had comments. Modded comment up and added one more, still shows zero.

    • (Score: 2) by chucky on Tuesday June 02, @09:20PM (1 child)

      by chucky (3309) on Tuesday June 02, @09:20PM (#1444290)

      Few moments later it shows three, which is correct.

  • (Score: 2) by bzipitidoo on Wednesday June 03, @03:01AM (2 children)

    by bzipitidoo (4388) on Wednesday June 03, @03:01AM (#1444319) Journal

    Tells me I entered the wrong password.

    • (Score: 2) by janrinok on Wednesday June 03, @03:31AM (1 child)

      by janrinok (52) Subscriber Badge on Wednesday June 03, @03:31AM (#1444322) Journal

      I hinted at this in my introduction. Dev is primarily used for testing and it does not copy every live account from the main site. The most likely option is that your account simply does not exist on the dev server. You should be able to create an account with your existing Username but it will almost certainly give you a different UID on the dev server.

      Please let me know if you have any further problems as it is possible that there is someone trying to abuse your existing username on the dev system. Yeah, I know that it would be a childish thing to do, but we do have a couple of community members who enjoy being assholes.

      --
      [nostyle RIP 06 May 2025]
      • (Score: 2) by janrinok on Wednesday June 03, @03:34AM

        by janrinok (52) Subscriber Badge on Wednesday June 03, @03:34AM (#1444323) Journal

        From TFS:

        If you cannot log in with your usual username/password you might have to create a new account on dev.

        --
        [nostyle RIP 06 May 2025]
  • (Score: 2) by chucky on Wednesday June 03, @06:50AM (2 children)

    by chucky (3309) on Wednesday June 03, @06:50AM (#1444330)

    8:50 CEST (6:50 UTC) I’m getting error 404 on dev.soylentnews.org.

    • (Score: 0) by Anonymous Coward on Wednesday June 03, @11:17AM (1 child)

      by Anonymous Coward on Wednesday June 03, @11:17AM (#1444345)

      Same here, https://dev.soylentnews.org/ [soylentnews.org] gives a 404 UTC 11:17 AM

      • (Score: 1) by pTamok on Wednesday June 03, @03:06PM

        by pTamok (3042) on Wednesday June 03, @03:06PM (#1444364)

        And me. After a few attempts, I get the site, but something is not quite right.

  • (Score: 2) by chucky on Wednesday June 03, @08:06PM (7 children)

    by chucky (3309) on Wednesday June 03, @08:06PM (#1444397)

    Tried to make a journal entry, posted, later unable to see it in journal nor in list of latest journal entries.

    • (Score: 2) by kolie on Thursday June 04, @05:51PM (6 children)

      by kolie (2622) Subscriber Badge on Thursday June 04, @05:51PM (#1444455) Journal

      That's odd - I saw you make comments and posts before so I know a bit was working for you. Can you test this again, people have made journal entries so curious what's going on here or if its reproducible.

      • (Score: 2) by chucky on Thursday June 04, @07:27PM (5 children)

        by chucky (3309) on Thursday June 04, @07:27PM (#1444462)

        Just now made a post into my own journal, both subject and body “Test 21:24 CEST”. After save it was visible, then I navigated away from the journal, came back and cannot see it anymore.

        • (Score: 2) by kolie on Thursday June 04, @08:12PM (4 children)

          by kolie (2622) Subscriber Badge on Thursday June 04, @08:12PM (#1444466) Journal
          • (Score: 2) by chucky on Thursday June 04, @08:30PM

            by chucky (3309) on Thursday June 04, @08:30PM (#1444470)

            “Sorry, the requested journal entries were not found.” That’s all.

          • (Score: 2) by chucky on Thursday June 04, @08:44PM

            by chucky (3309) on Thursday June 04, @08:44PM (#1444473)

            Also tried a different browser, made a new post “Test 22:39 CEST”, looks like the problem is the Save button. I clicked Preview, Save button appeared. Clicked Save, it reloaded to the same view (post visible), clicked Save again twice, saw my post twice, navigated away and back to journal = no post there. So, it’s like the Save button doesn’t really save the post.

          • (Score: 2) by chucky on Friday June 05, @05:18PM (1 child)

            by chucky (3309) on Friday June 05, @05:18PM (#1444554)

            Aha, it didn't save when I had comments disabled, once I changed this field to enabled, it saved it.

            • (Score: 2) by kolie on Friday June 05, @06:06PM

              by kolie (2622) Subscriber Badge on Friday June 05, @06:06PM (#1444555) Journal

              I well check out that branch, thank you for the excellent report.

  • (Score: 0) by Anonymous Coward on Thursday June 04, @03:42AM (1 child)

    by Anonymous Coward on Thursday June 04, @03:42AM (#1444411)

    kolie has been hard at work producing a logical line for line copy of rehash (written in perl) in Python - including warts where they affect the functioning of the software. This will ensure that the software remains maintainable into the future, and gives kolie a chance to fix some previously unknown bugs.

    Doesn't perl have a better track record for backward compatibility than python? Wouldn't going from perl to python mean you'd have to touch the code for externally caused breakages more often?

    If you don't like perl you could use an LLM to help you fix the perl code. And as the LLMs get better, they'd get better at helping you.

    Heck maybe rewriting it in Cobol would make it maintainable for even more decades in the future, since not as many hipsters etc are busy breaking backward compatibility in Cobol. 🤣

    Go ask multiple LLMs stuff like this and verify the results:

    Do a comparison of how often Python/Perl/Cobol has broken backward compatibility in practice, as in old code will not work with the new version e.g. if the old code has already specified a version/compatibility level and it still works with the new stuff, it's not counted as breaking.

    Just because more hipsters prefer to make buildings out of clay instead of concrete does not mean that migrating from concrete to clay will actually make things more maintainable for decades.

    FWIW, yes I use python, just like there's often a good reason to use clay instead of concrete to make stuff. But never with the assumption that "This will ensure that the software remains maintainable into the future". When I write stuff in python, it's with the expectation that it'll break within 3 years or even less, and not because my code is broken, but because the new python version broke stuff, or some third party module/etc broke stuff.

    • (Score: 2) by kolie on Thursday June 04, @04:30AM

      by kolie (2622) Subscriber Badge on Thursday June 04, @04:30AM (#1444414) Journal

      I mean how painful was getting rehash working on a modernish version of Apache? We are still missing features and code that was disabled to make the site run at all. There was a ton of headache getting rehash functioning and build-able in a reliable/repeatable manner. Again it's not to say that it couldn't be done but the past stewards of the code base worked with what they had and in practice it hasn't been that smooth. We get weird issues, race conditions, there is DB inconsistencies, it all adds up.

      I don't think anyone understands just how weird the rehash code base is. It's not just Perl. It's nightmare Perl.

      Probably the larger win is using more modular design / refactoring that has built in testing. Could you do it in Perl? Yea. Has anyone stepped up to do so? Seems to be a shortage of the Perl types these days.

  • (Score: 2, Disagree) by Bentonite on Thursday June 04, @04:44AM (10 children)

    by Bentonite (56146) on Thursday June 04, @04:44AM (#1444415)

    Perl was quite easy to maintain - it just keeps working for 20+ years without changes provided reasonable programming.

    Is there a reason why the broken parts of the perl rehash can't be fixed?

    Surely that'll be less work than rewriting from scratch?

    Meanwhile, python can't help but break things between minor versions for no reasons.

    Furthermore, python is slopware now - it's hard to say that projects that don't work with python v3.14.0a4 are free software.

    • (Score: 2) by janrinok on Thursday June 04, @07:51AM (8 children)

      by janrinok (52) Subscriber Badge on Thursday June 04, @07:51AM (#1444421) Journal

      How many people will be able to write perl in another decade? How many are stepping forward to help maintain the perl code and to support the site now? There might be better languages than Python but I think that people will still be using it in the future.

      There are no test routines for the existing perl code and as kolie as stated it is not structured such that it is easy to write them now. So in addition to the rewrite of the rehash code he is also producing some test routines to match the Python code. A benefit of this is that it will be considerably easier to use the Python code as a 'stepping stone' to something else.

      One person has stepped forward to take on the task - kolie. If all you have to offer is criticism and not actual help then your comments are noted but they are not contributing to a long-term solution. I think that kolie has made a sensible choice.

      You can write slopware in any language. It is apparent that you do not like Python. Lets see what you can produce in any language of your choice.

      --
      [nostyle RIP 06 May 2025]
      • (Score: 2) by Bentonite on Thursday June 04, @09:22AM (7 children)

        by Bentonite (56146) on Thursday June 04, @09:22AM (#1444427)

        Any decent programmer can write something decent in any decent language, no matter how many years pass - alas the number of decent programmers is shrinking.

        The reason why no decent programmers are stepping forward to maintain the perl, is because the project is hosted on the deeply unethical and immoral github; https://www.gnu.org/software/repo-criteria-evaluation.html [gnu.org]

        If the site stops using github and for examples puts it onto a cgit and accept commits via a mailing list or soylent news patch comment or whatever that doesn't require proprietary software execution, then I'm sure you'll find that people step forward to help.

        I'll make an offer - if the site ceases to attack humanity by ceasing to use github, I'll go and add whatever specified tests wanted - although that'll take me a significant amount of time.

        Perl is not my language of choice - I prefer GNU C - although if something is already written in a decent language, usually it's a mistake to rewrite it.

        LLM's seem to have trouble vomiting out working perl, but such doesn't have the same problems with python.

        • (Score: 0) by Anonymous Coward on Thursday June 04, @03:19PM

          by Anonymous Coward on Thursday June 04, @03:19PM (#1444450)

          is because the project is hosted on the deeply unethical and immoral github

          It has nothing at all to do with that. There has always been a problem finding people who are prepared to work for the site rather than to just tell others how to do it.

          You don't have to use github. Just download the source and then use your own computer to make the changes. The software will run on your local computer - it does on mine. It will even create a working database for you. Then send the patches to kolie. He can merge them.

          Don't use github as a convenient excuse. Show us what you can do.

        • (Score: 2) by kolie on Thursday June 04, @06:42PM (5 children)

          by kolie (2622) Subscriber Badge on Thursday June 04, @06:42PM (#1444459) Journal
          • (Score: 2) by Bentonite on Friday June 05, @12:57AM (4 children)

            by Bentonite (56146) on Friday June 05, @12:57AM (#1444491)

            It doesn't seem you read the ethical repository evaluation page - if the github frying pan is unacceptable, clearly the worse gitlab fire is more unacceptable.

            I will not support what is wrong - I will not develop and send patches to you if those will be merged onto github or gitlab.

            If you;
            a) Specify which changes are wanted.
            b) State how patches will be accepted and merged in some moral way (I can put changes on and provide access to a cgit for hosting, provided that will be used rather than github or gitlab).

            Then I'll send patches, otherwise I a) can't and b) won't.

            • (Score: 2) by kolie on Friday June 05, @01:40AM (2 children)

              by kolie (2622) Subscriber Badge on Friday June 05, @01:40AM (#1444494) Journal

              It's a self-hosted instance you got an issue using my self-hosted gitlab instance?

              • (Score: 2) by Bentonite on Friday June 05, @06:54AM (1 child)

                by Bentonite (56146) on Friday June 05, @06:54AM (#1444510)

                All versions of gitlab are proprietary software, for 3 reasons.

                0. The way the license is written only licenses the client side JavaScript under MIT expat once it is in obfscript form - the source form is not licensed unless it is "served directly"; https://lab.vern.cc/gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE [lab.vern.cc]

                All client-side JavaScript (when served directly or after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license.

                  Therefore any file that is not served directly in source form (as far as I can tell, no source file is served "directly" - only via indirect methods), that doesn't have another license on it, has no license and therefore is proprietary software.

                It would have been easy to write

                All client-side JavaScript, in source and/or binary forms (after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license.

                so the choice of wording seems intentional.

                1. Even assuming that the client side JavaScript was validly licensed under a free license, the issue is that any software that is served via arbitrary remote code execution is rendered proprietary, as the user does not have the 4 freedoms over the software;
                - The user cannot realistically choose to read or check the software before running it - all they get is huge obfscript blobs, that appears to be different every time.
                - The user cannot realistically choose to keep running an older version - as soon as the page is refreshed, the old version is gone and there's only the new version (maybe the existing version is the same until the admin updates the software, or it's every page load, if the software is designed to randomize obfscript JavaScript each time like gitlab.com (maybe gitlab ce is the same)).
                - The user cannot realistically run a modified version (browsers totally lack tooling to do so and extensions like greasemonkey and Haketilo unfortunately doesn't have the required capability to make programs as big and complex as gitlab's client side JavaScript work).

                2. gitlab is slopware and slopware is proprietary software, as copy-pasting random code and combinations thereof in disregard of the license(s), always results in proprietary software; https://lab.vern.cc/gitlab.com/gitlab-org/gitlab/-/blob/master/CLAUDE.md [lab.vern.cc]

                It appears that all functionality JS git forges offer can be implemented better without JavaScript (see cgit for example).

                Hmm, maybe I'll write a decent git forge, with free issue submission and pull requests (forejo comes close, but falls short).

                • (Score: 2) by kolie on Friday June 05, @06:19PM

                  by kolie (2622) Subscriber Badge on Friday June 05, @06:19PM (#1444556) Journal

                  A file served directly - doesn't specify the means. Technically the git served it directly to me when I downloaded it. If it was served directly it is licensed. It doesn't magically become unlicensed once it stops being served. The intent is clear, whether obfuscated or not, the file in any form once licensed is valid. I'd be required to let everyone know if I distributed it that it's under MIT expat, obfuscated/optimized/original or otherwise. But yea you made your yak shaving clear and moving the goalpost so I'll let you get to that. gnu.org says it's ethical what I am doing so idk about you but you appear to have a problem with JavaScript as a whole and directing me to the gnu.org when the use case specifically is said to be fine is hilarious. glwt.

            • (Score: 2) by kolie on Friday June 05, @03:28AM

              by kolie (2622) Subscriber Badge on Friday June 05, @03:28AM (#1444503) Journal

              Just so we are clear - this is from the own source you linked:

              "We refer to these services by their domain names, rather than their common names (eg: savannah.gnu.org vs. Savannah). That is because the software for most of these services is also available for self-hosting as free software. Installing that software on your own server, and using it yourself, avoids most of these ethical issues (all but A1).

              Therefore, here we address the ethics of the service operators."

    • (Score: 0) by Anonymous Coward on Thursday June 04, @08:35AM

      by Anonymous Coward on Thursday June 04, @08:35AM (#1444425)
(1)