• 3 posts
  • 16 comments
Joined 3 years ago
Cake day: September 15th, 2023
  • You’re the only one giving me a positive answer!

    I do not mind RAID, so i won’t lose data when a drive fails (the most valuable thing will be backups, which i mean, are backups, so not that critical if i can make a new one, but even losing other data would be a bit boring). I think I’d do software RAID tho, so if the controller breaks i wouldn’t have to find the same model, which could be hard for old hardware i guess.

    the other comments scared me about power consumption, so i’ll have to investigate more of it.

  • Old desktop pc would be ideal, for exactly the problems you pointed out. The only thing that is making me consider this is the already included drives, which is where i’d end up spending most of my money (especially now, thanks ai)

    I mean, the same capacity would cost WAY too much more. For a similar capacity + the system i’d have to spend at least double :(

Hi! I’ve never had a server, except for a raspberry that I use as a DNS (pi-hole), but I’ve been wanting it for a long time. The other day I found something that is kinda old, but very cheap, and I’ve been thinking about buying it since then.

It’s an IBM System x3500 M4. It has an E5-2620, 32 GB of DDR3, and 7 wonderful 900 GB SAS hard drives (don’t know if actual hard disk or solid state), which would fulfill all of my linux ISOs needs for at least the next year (probably a bit more), and a RAID controller ServeRAID M5110. All for 210 euros, which I think is very cheap.

From what I know, the E5 is power hungry for modern standards, and the SAS drives are not exactly friendly for replacement parts. How much would that (mostly the SAS part) be a problem?

Also, what can I expect concerning RAID? That is definitely the most concerning thing for me, as I’ve never worked with it.

Another huge part is, I do not care about accessing it from the outside, but I’d be sharing this system with my brother, in another city, so we would have to figure out a way of doing it. Normally I’d use port forwarding, but we’re both behind CG-NAT. Is there any way of not using a third party server as a proxy/VPN/whatever? If not, what service would you recommend for this purpose?

Another thing, my brother just happens to have a probably working, 16 GB ECC DDR3 stick laying around, except that it’s 1600MHz, and the CPU only supports up to 1333MHz. I’m pretty sure that if I’d put two sticks with different frequencies, the CPU would use the lower one, but is that the case even if the CPU does not support the frequency of one of the stick? (in short, would putting the other stick work?)

If you have any other pointers or anything, let me know. Thank you :)

  • Sorry, I didn’t think to add in the post that the translations are in fact of user generated content, and are themselves provided by users.

    Project Fluent is still a good resource tho, thank you.

    And also yeah, I’ll use a better schema for language tags, that’s a clear fault

    Using an ID instead of the text content itself as part of the PK should be a no-brainer. Languages evolve over time, and translations change. PKs should not.

    I still don’t get why having a separate table for languages is useful. I mean, even if the translation changes, the language itself will remain the same, right?

    Oh, right. Taking into account language variants makes VERY obvious why I’d want to use a table to store them.

    people tend to believe that translating is enough to localize. It is not.

    Onestly, I just hope that won’t be something i should have to worry about. The rest of the codebase is as shitty as it gets, and I don’t want to be the one to refactor it for proper localization. I’m implementing a new feature that allows me some degree of movement to think about a good design for that, and new, features, but this is as far as I’ll go (Yes I know I probably sound like an ass but it really is that bad)

  • Shouldn’t that be TextContent(TextContentId, OriginalText)? Something like

    (then you should make the id a primary key, index originaltext and make the id in the other table a foreign key)

    Yup, TextContentId is PK, and I’d set to auto_increment so that i wouldn’t have to worrya bout it.

    Sure, but the you would have to reference the text via TextContentId in your code, which would be very annoying

    Not really, the translations I keep in the database are for entity that would be retrueved from the client with already the translated values instead of ID (should have specified this in the post maybe)

    BTW1/2: the translations on the database are for entities on the db (stuff like user generated content, which will also input the translations). For general text on the page I’m using a specific framework, which would be difficult to use for the user generated content, at least how it’s set up now (it’s angular’s ngx-translate)

Soo I’m working on a database that needs to support multiple languages (two for now, but who knows). I stumbled across this blog post that explains how to develop what it calls a “translation subschema” (haven’t seen it called like this anywhere else so I don’t know if it’s actually how you’d call it), which seems like a very nice way of dealing with things.

I’m not very experienced with DB stuff, so it took me a while to fully understand what it was doing, but now that (I think) I do, I’m wondering if I could just ignore the Languages table, and just use a language field in the tables TextContent and Translations, without loosing any functionality. (except of course having a table listing the available languages, which is not however something I’m interested in)

In my head everything would still work, I’d insert stuff with

INSERT INTO TextContent (OriginalText, OriginalLanguage)
VALUES ("Ciao", "it");

DECLARE TextContentId INT = SCOPE_IDENTITY();

INSERT INTO Translations (TextContentId, Language, Translation)
VALUES (@TextContentId, "it", "Ciao");
INSERT INTO Translations (TextContentId, Language, Translation)
VALUES (@TextContentId, "en", "Hello");

and given a TextContentId, i’d retrieve the correct translation with

SELECT Translation FROM Translations WHERE TextContentId = TCId AND Language = "en"

At this point, I’m thinking I could drop TextContent too, and just have a Translations table with TextContentId, Language, and Translation, with (TextContentId, Language) as primary key.

Am I missing something? I’m trying to simplify this solution but I don’t want to risk making random errors.

Edit: translations on the DB are for user inserted text, which will also provide translations. The client then will only receive text it the correct language.

  • I might be a robot, I don’t know why but i can’t solve the captcha lol

    I’d love to give this a try tho so maybe I’ll come back later

    Just a random idea, but would you consider using anubis instead? (That new thingy that has been popping up lately, for example on the archwiki). I haven’t checked it out but I bet it’s also better on a privacy standpoint in respect to google’s captcha

Hi. I’m working on a project that compiles Rust code to WASM, and uses WASI in Node.js to execute it. After some development, I encountered a segmentation fault happening in the wasi.start() function. Considering that I’m kinda new to Node I was only able to understand that it was happening after the call to the exported WASM method returned.

This happened almost two months ago, and while I thought about reporting this to the node devs (WASI’s also experimental), I was going to move soon and a lot has gone on.

Yesterday I tried to reproduce the bug on my laptop (that is not my usual development environment, which I don’t have access to right now) but I wasn’t able to.

I had to start fresh and install all the necessary tools from zero, so my theory is that there was something wrong in the previous environment. I’m also on Gentoo now, while I was running Arch previously.

Unfortunately I don’t have the means to check on other environments. I tried to reproduce the old environment, installing the same versions of node and rust, with no luck. I also tested this with the latest versions and everything works fine.

This situation is upsetting. I don’t know what’s changed that caused the problem to “disappear”, so i feel uncomfortable considering this solved. What would be the best approach in this situation?

EDIT: I also just tested it on Debian live, and I still wasn’t able to reproduce the segfault