computational linguist more like bomputational bimgis

  • 0 Posts
  • 22 Comments
Joined 7 months ago
cake
Cake day: April 2nd, 2024

help-circle

  • For a lot of English speakers, the “had” and “have” in contractions is completely omitted in certain contexts. It’s more prevalent in some dialects (I’m in the south US and it’s more common than not). Usually “had” is dropped more than “have”.

    Also, English can drop the pronoun, article, and even copula for certain indicative statements. I think it’s specifically for observations, especially when the context is clear.

    looking at someone’s bracelet “Cool bracelet.” [That’s a]

    wakes upsigh Gotta get up and go to work…” [I’ve]

    “Ain’t no day for picking tomatoes like a Saturday.” [There]

    “No war but class war!” [There’s]

    “Forecast came in on the radio. Says there’s gonna be a hell of a lot of rain today.” [It said -> Says/Said]

    “Can’t count the number of Brits I’ve killed. Guess I’m just allergic to beans on toast.” [I; I]

    “House came tumblin’ down after the sinkhole opened up” [The]

    “I’d” can be “I would”, mainly if used with a conditional or certain conjunctions/contrastive statements (if, but, however, unfortunately). Also when preceding “have” – e.g. “I’d have done that”. Because “I had have” doesn’t make sense, nor does “I had <present tense>” anything. “I’d” as in “I had” is followed by a past participle.

    “I’d” is usually “I had” otherwise, forming the past perfect tense. But in “I’d better”, it’s a bit confusing because “had better” is used in a different sense – the “had” here comes from “have to” (as in “to be necessary to”) and can be treated as both a lexical verb and an auxiliary verb. “had better” is a bit of a leftover of more archaic constructions.




  • It would be a pain for developers, but firefox and chrome using a gig of ram to view webpages and play videos is horrendous even with isolated design.

    That can’t be helped. Hard to explain well without knowing how much CS you’re familiar with, but basically in order to guarantee security/user safety you have to sandbox each tab (basically running an entirely separate container program for each tab which constantly checks for illegal memory access to prevent it from being exploited), all separately running their own interpreters for javascript/typescript, HTML, CSS, all of which are very resource intensive (mainly javascript/typescript). There’s not really any getting around this, no matter how well you design your browser.

    Now, theoretically, with the growing popularity/advances in WebAssembly, and increase in usage of frameworks/graphics APIs like WebGPU, you could completely get rid of that sandboxing and completely get rid of the extremely slow javascript and html/css, in favor of completely using safe, compiled Rust programs. There’s active research using versions of WASM which only accept completely safe code (mainly safe Rust code) so using memory bugs generated from user error to access data in different tabs becomes impossible (aside from potential unaddressed bugs in Rust itself obviously) and you don’t need to sandbox each tab – the program practically sandboxes itself. Then you could potentially have browsers with thousands of tabs perform perfectly fine, assuming each of the websites is programmed competently.

    But that’s not going to happen, because billions of users rely on HTML/CSS and JS, and it’s not pretty to transition away from. Getting rid of it would be like getting rid of pointy shoes, or getting rid of US Customary Units in the US, it’s just not happening no matter how much benefit it would bring to users. It’s not so much of a browser company issue as it is everyone ever would complain and potentially trillions of dollars of damage would be done. Also frontend web devs can barely punch out a “hello world” program in JS so there’s no way most of them are gonna be touching Rust or Haskell or something.


  • sparkle@lemm.eetoProgrammer Humor@programming.devaverage day in NPM land
    link
    fedilink
    Cymraeg
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    3 months ago

    Web bloat in a nutshell and why we need to switch to things like Web Assembly more than ever. It’s not WASM, but I used Laminar which is a Scala.js library, and it’s the absolute pinnacle of (frontend) web development. Scala in general is just really great for idiomatic web code, its flexibility is unbeatable.

    Another amazing alternative would be anything Rust. In fact I’ve used that much more than Scala for web. I’ve mainly used Leptos for full-stack and and Actix for backend, but I’ve seen Dioxus and Axum in good use and they both seem really great too.

    Apparently Lemmy uses Leptos for its UI so… that’s a +1.








  • I think that’s good when the objective is to improve the language. One key thing that holds many languages back is that they’re stuck with historical baggage, and it can be pretty difficult to replace/remove “outdated” stuff without breaking everything.

    I do not want to be stuck using Python 2, or Scala 2 (although there exist people who use Scala 2 instead of Scala 3).


  • I agree that the slow compile times are pretty bad (maybe even deal-breakingly for large projects). I think it’s kind of necessary for a language with as powerful of a syntax as Scala though, it’s pretty absurd how expressive you can get. Maybe if it didn’t target the JVM, it’d be able to achieve way faster compile times – I don’t really see a point of even targeting JVM other than for library access (not to say that that isn’t a huge benefit), especially when it has relatively poor compatibility with other JVM languages and it’s nearly impossible to use for Android (don’t try this at home).

    Even more so, I think that null handling isn’t nice – I wish it were more similar to Kotlin’s. One thing I’m really confused as to why Scala didn’t go all-in on is Either/Result like in Rust. Types like that exist, but Scala seems to mostly just encourages you to use exceptions for error propogation/handling rather than returning a Monad.

    A more minor grudge I have is just the high-level primitive types in general – it’s pretty annoying not being able to specify unsigned integers or certain byte-width types by default, but if it really is an issue than it can be worked around. Also things like mutable pointers/references – I don’t actually know if you can do those in Scala… I’ve had many situations where it’d be useful to have such a thing. But that’s mostly because I was probably using Scala for things it’s not as cut out to do.

    With the tuple arguments point, I get it but I haven’t found it much of an issue. I do wish it wasn’t that way and it consistently distinguished between a tuple and an argument list though, either that or make functions take arguments without tuples like in other functional languages or CLI languages (but that’d probably screw a lot of stuff up and make compile times even LONGER). I saw someone on r/ProgrammingLanguages a while back express how their language used commas/delimiters without any brackets to express an argument list.

    I think an actually “perfect” language to me would basically just be Rust but with a bunch of the features that Scala adds – of course the significant functional aspect that Scala has (and the clearly superior lambda syntax), but also the significantly more powerful traits and OOP/OOP-like polymorphism. Scala is the only language that I can say I don’t feel anxious liberally using inheritance in, in fact I use inheritance in it constantly and I enjoy it. Scala’s “enum”/variant inheritance pattern is like Rust enums, but on crack. Obviously, Rust would never get inheritance, but I’ve found myself in multiple situations where I’m thinking “damn, it’s annoying that I have to treat <X trait> and <Y trait> as almost completely serparate”. It would especially be nice in certain situations with const generic traits that are basically variants of each other.

    Plus, I’ve always personally liked function overloading and default arguments and variadics/variadic generics and stuff, but the Rust community generally seems to be against the former 2. I just really hate there being a hundred functions, all a sea of underscores and adjectives, that are basically the same thing but take different numbers of arguments or slightly different arguments.

    The custom operators are a double-edged sword, I love them and always use them, but at the same time it can be unclear as to what they do without digging into documentation. I guess Haskell has a similar problem though, but I don’t think Scala allows you to specify operator precedence like Haskell does and it just relies on the first character’s precedence. I would still want them though.

    How it goes now, though, is I use Scala 3 for project design/prototyping, scripting, and less performance-sensitive projects, and Rust for pretty much everything else (and anything involving graphics or web). Scala has good linear algebra tooling, but honestly I’ll usually use C++ or Python for that most of the time because they have better tooling (and possibly better performance). I would say R too, but matplotlib has completely replaced it for literally everything regarding math for me.




  • JS or really anything you’d make a web app in (I use Rust with something like Dioxus/Yew/Leptos/Tauri), C#/.NET (I use F# because OO-style languages are ugly and a hot mess, especially C# and Java), Java/JVM (I use Scala whenever I can and Kotlin otherwise), C++ with GTK or Qt. There are a lot of options but obviously anything that’s not C++ or web is gonna give you a lackluster experience (though I have a thing against web apps and will go through a lot of hoops to have my application use a native interface)