VikingofRock posted:It sounds like dicts are out for harambescript? Fortaleza posted:Every declared variable is available globally ‘cause all shots are no-scope lmao
|
|
# ? Nov 11, 2021 08:48 |
|
|
# ? Jun 8, 2024 14:36 |
|
VikingofRock posted:It sounds like dicts are out for harambescript?
|
# ? Nov 11, 2021 08:58 |
|
VikingofRock posted:It sounds like dicts are out for harambescript? Fortaleza posted:Every declared variable is available globally ‘cause all shots are no-scope
|
# ? Nov 11, 2021 10:38 |
|
immediately and reliably crashing the task/thread/unit on errors would be an improvement on a lot of error handling that's going on.
|
# ? Nov 11, 2021 11:15 |
|
fart simpson posted:well, if you mean hiding the messages down on lower levels then no, not really. but that's sort of an explicit choice. nothing in elm is done implicitly, the entire point of the design is to force you to handle every message and every case explicitly and structure the whole program as a single big tree. you can nest your structure by wrapping it but then you still need to pass the wrapped values up to the main structure that lives at the top of your program somehow. so in some sense you need to explicitly route everything still, yeah, and only the entrypoint source file can really have a direct line to the outside world, i doubt that will ever change. Thanks for this clarity - I'm not surprised they've stuck with what felt like an explicit choice at the time. My scenario (that I run into in basically every web app) is composite controls. For example, if we pretend that built in date pickers aren't a thing we can think of that as an example of a component. Maybe it's made of a button to show it, a bunch of links for days/changing months, a button for dismissing the popup thing, etc. The interface for this component if you designed it in isolation would probably be a property for the selected date and perhaps an event/message for when the date has changed. The page using this control doesn't care that it's implemented with a bunch of buttons and links....except in elm it has to because you have to handle all the messages about those internal only controls at the top level. God help you if you assemble composites into other composites. The FP dual would be partially applied functions or something, but that doesn't mesh with pattern matching. I love pattern matching forcing you to cover the whole type, but using it for this feels really weird to me. The answer I got at the time was 'do your composites in web components', which degenerates into the whole markup layer built in web components vs elm, which also seems weird.
|
# ? Nov 11, 2021 19:52 |
|
rjmccall posted:really just the implementation. most generics systems either rely on monomorphization (which requires code duplication, basically template instantiation) or erasure (which requires a fall back onto a common value representation, basically boxing). swift can actually run generic code without boxing anything. among other things, that means it can express some interesting things like dynamic dispatch to a polymorphic function that would be inexpressible in a c++/rust-like system is that actually the language though or is it specific to the implementation
|
# ? Nov 12, 2021 10:44 |
|
I still want a good and modern implementation of the original infix Dylan (with all the updates from the design notes that came after the original book, of course)
|
# ? Nov 12, 2021 10:47 |
|
rjmccall posted:yeah, this came up recently in a grey forum, and this is a much better thread to rant about how much goddamn work has been wasted just because guido thinks performance is the least important thing to prioritize in his language implementation. if it wasn’t something that people were doing for smalltalk in 1986, he’s not interested there are worse aspirations on the other hand “programming language” people seem to focus on the first clause of this sentence to the exclusion of all else: everything is typesafe and zero-overhead, but it takes a year and a day to tell you it won’t even compile because you missed an obscure constraint and it’s entirely impenetrable when you go to maintain it two years down the line but hey your parser also never needs more than one token of lookahead, and really, isn’t that the most important aspect of language design?
|
# ? Nov 12, 2021 10:54 |
i don’t feel that go and rust seek to occupy the same niche, but i may be wrong. to me it seems that rust wants to be a c++ with fewer runtime foot guns, whereas go is basically a faster python with “fearless” scalability
|
|
# ? Nov 12, 2021 11:05 |
it does feel that every “upcoming non web language” is bleeding metal kind of thing, but that’s because if you’re smart enough to design a viable programming language you’re smart enough to not even bother competing against python on its home turf
|
|
# ? Nov 12, 2021 11:07 |
|
cinci zoo sniper posted:i don’t feel that go and rust seek to occupy the same niche, but i may be wrong. to me it seems that rust wants to be a c++ with fewer runtime foot guns, whereas go is basically a faster python with “fearless” scalability The niche that rust and go share is "easier than C++, faster than the VM langs" on the server. The fact that rust doesn't have a GC is irrelevant for this use and almost a hinderance due to the complexity and learning curve that the borrow checker brings. You can see this directly in the calls, like "please give me a haskell but strict", for "please give me rust but with a GC". In practice you can mostly get that effect by throwing around a lot of mutexes and RCs since you absolutely don't care about the last 20% of performance in this case. gonadic io fucked around with this message at 12:11 on Nov 12, 2021 |
# ? Nov 12, 2021 11:53 |
|
Yeah you can totally build stuff in rust without caring a lot about lifetimes. They only come into play when you want to be _really_ performant. That said, writing all of the Arc<Mutex<Lowtax>> can be really noisy. Just being able to directly mark Lowtax as someone who can be garbage collected would be a nice bit of syntactic sugar.
|
# ? Nov 12, 2021 12:04 |
gonadic io posted:The niche that rust and go share is "easier than C++, faster than the VM langs" on the server. The fact that rust doesn't have a GC is irrelevant for this use and almost a hinderance due to the complexity and learning curve that the borrow checker brings. You can see this directly in the calls, like "please give me a haskell but strict", for "please give me rust but with a GC". fair enough, that does make sense
|
|
# ? Nov 12, 2021 12:13 |
|
the two also being new and cool and better for cvs than old boring stodgy langs like c#, java, and python absolutely is a factor too I'll be honest. when you're just in docker on the cloud or whatever you effectively have complete free reign of lang choice
|
# ? Nov 12, 2021 12:19 |
|
Sagacity posted:That said, writing all of the Arc<Mutex<Lowtax>> can be really noisy. Just being able to directly mark Lowtax as someone who can be garbage collected would be a nice bit of syntactic sugar. Well, Rust has type aliases, so I guess you can just dump this in your utils.rs for starters: code:
Side note, "Arc Mutex" sounds like a comic book macguffin.
|
# ? Nov 12, 2021 12:52 |
|
arc mutex is a poor excuse for a real gc, both in terms of usability and practicality. there's efforts going on to develop stuff on in lib-space but not really any interest in doing anything new from the compiler side. just like the comparison to "haskell but strict" it's very much a language design choice and part of the unavoidable trade-off of the lang
|
# ? Nov 12, 2021 13:01 |
|
eschaton posted:is that actually the language though or is it specific to the implementation swift the language allows things that otherwise it would have to disallow there are languages with radically different basic implementation approaches and which therefore offer different basic language guarantees, such as ghc-extended haskell, that allow similar features
|
# ? Nov 12, 2021 18:49 |
|
Cybernetic Vermin posted:immediately and reliably crashing the task/thread/unit on errors would be an improvement on a lot of error handling that
|
# ? Nov 12, 2021 19:15 |
|
gonadic io posted:The niche that rust and go share is "easier than C++, faster than the VM langs" on the server. The fact that rust doesn't have a GC is irrelevant for this use and almost a hinderance due to the complexity and learning curve that the borrow checker brings. You can see this directly in the calls, like "please give me a haskell but strict", for "please give me rust but with a GC". I really like Rust, it hits a lot of sweet spots for me – strongly typed, neat type system, the mild functional-ness thats useful while keeping people from going too crazy with functional patterns, usually low on boilerplate, static binaries, clever little things like ? ... but sometimes I wish there was a garbage-collected version of it, the constraints of the borrow checker make things like tree structures at least an order of magnitude harder to get right, and I'd love to have the ergonomics of the language and the ergonomics of a gc-ed runtime. Not going to happen I guess, but I feel like there's an opportunity for a Rust-ish language that is somewhat less finnicky, at the cost of making some abstractions more expensive, for microservices with complex business logic and such.
|
# ? Nov 12, 2021 19:49 |
|
swift really is trying to fill that niche, and there are people who've had success with it
|
# ? Nov 12, 2021 19:56 |
unforunately swift also appears to have added windows support less than a year ago, and windows support in this case means a seemingly random person that has 150 other repositories releasing windows builds or something, which is really not something to want to see when you shop around with question "so is this useful on non-apple hardware as well". iirc the ide story used to be fairly restricted as well. it's a cool language, but ultimately involves non-technical risk factors that no major language other than c# may invoke, and when that's the comparison i think most people will just settle on having to write an extra hour of magic syntax in rust or whatever
|
|
# ? Nov 12, 2021 20:22 |
|
cinci zoo sniper posted:unforunately swift also appears to have added windows support less than a year ago, and windows support in this case means a seemingly random person that has 150 other repositories releasing windows builds or something, which is really not something to want to see when you shop around with question "so is this useful on non-apple hardware as well". iirc the ide story used to be fairly restricted as well.
|
# ? Nov 12, 2021 20:24 |
|
i can understand that. fwiw, though, the windows support is official, it's not just some random dude in his free time
|
# ? Nov 12, 2021 20:29 |
|
Swift seems perfectly good but it also doesn't seem like it's gotten enough traction outside of the apple ecosystem to be appealing right now for no particular fault of its own. Oh also I forgot kotlin, lol.
|
# ? Nov 12, 2021 20:31 |
mystes posted:Yeah luckily most languages other than swift and c#, like Java, rust, elm, d, and typescript are not heavily reliant on single people/companies. that’s not what i meant (lol at elm and d being considered major languages). what i meant is that as far as im concerned, apple is a hardware business notable for e.g. excluding nvidia cards from their computers or offering barely working software on windows, whereas everyone else, microsoft including, is forced to play at least somewhat nice on all platforms because what they offer is software, and mac users are premium segment. in other words, and i freely admit that i may not be the most attentive follower here, what i mean to say is that apple does not appear to be convincing a lot of people that swift is a language for everyone everywhere, and for me personally it doesn’t help that the only high profile swift project not targeting the apple ecosystem, that i know of, is the tensorflow swift fork that got killed early this year hence, the seeming specifics of windows support for swift do rub me off the wrong way due to the overall context, for the purpose of consider swift as a prime contender for true multi platform development language - i cannot even tell if swift will receive windows updates if that maintainer gets hit by a bus. similarly, i would never consider c# in this specific situation either - see the recent hot reload debacle or dozens of .net and mono and whatever in the gently caress microsoft has pushed out in the recent decade, for example. oracle, as you invoke it, can go gently caress itself for 10000 and 1 reason, but i will never doubt that java will just work anywhere (but i would also not take up a greenfield java project, which i guess i could’ve qualified in a clearer way) i don’t have a problem with single organisation dependency (as opposed to single person), but i definitely do lack facts to believe that apple specifically can consistently deliver quality software on windows
|
|
# ? Nov 12, 2021 20:45 |
rjmccall posted:i can understand that. fwiw, though, the windows support is official, it's not just some random dude in his free time that’s good to hear. not sure if my reading skills are lacking, but it was not apparent if that just isn’t an ardent community volunteer, as the language website credits them separately
|
|
# ? Nov 12, 2021 20:46 |
|
I don't know about swift but I remember having an absolutely awful time trying to do haskell dev on windows (about a decade ago at this point). Cabal/ghc itself worked fine but every third library very much assumed gcc on linux and gave at best token support for msys. It's probably much better now with WSL to be fair.
|
# ? Nov 12, 2021 20:47 |
also, to be explicit, i do not blame windows support topics on why swift is seeing less fraction in server space or outside apple ecosystem - that is just a factor i would personally consider, and one of the more prominently standing out differences if i had to compare it to say go or rust, because it’s otherwise a very solid language i don’t have any meaningful punches to throw at
|
|
# ? Nov 12, 2021 20:50 |
For tree-like structures with parent pointers in Rust, has anyone here tried just throwing everything into a slotmap? That's my plan if I ever run into this problem, so I'm curious what other people's experience with it is.
|
|
# ? Nov 12, 2021 20:53 |
|
When I did this I just boxed all children haskell style and it was "fine". Probably the most ergonomic if you don't care about speed that much and don't need to mutate much (too much Option<Box<Child>> would get real annoying fast)
|
# ? Nov 12, 2021 20:54 |
|
Does apple have a patent on that "if let etcetc = whatever then { code block } else { other block }" syntax? I really wish kotlin would steal it and some other nice stuff I'm probably forgetting
|
# ? Nov 12, 2021 20:56 |
|
brand engager posted:Does apple have a patent on that "if let etcetc = whatever then { code block } else { other block }" syntax? I really wish kotlin would steal it and some other nice stuff I'm probably forgetting absolutely not lol, just off the top of my head rust and haskell have exactly this syntax e: ignore the second half, misread
|
# ? Nov 12, 2021 20:58 |
|
a patent on syntax
|
# ? Nov 12, 2021 20:58 |
|
ErrorInvalidUser posted:a patent on syntax I have confidence this hellworld will produce it at some point
|
# ? Nov 12, 2021 20:59 |
|
It would somehow be less surprising than the ui patents Apple got itself
|
# ? Nov 12, 2021 22:07 |
|
hilariously, i am a co-inventor on a patent on the entire language, taken as a whole. us patent 9,329,844. i'm pretty sure it means absolutely nothing, especially since it's immediately granted under the apache license to anyone who uses the project
|
# ? Nov 12, 2021 22:11 |
|
cinci zoo sniper posted:go is basically a faster python people say this a lot and idgi code:
|
# ? Nov 12, 2021 22:12 |
|
mystes posted:Swift seems perfectly good but it also doesn't seem like it's gotten enough traction outside of the apple ecosystem to be appealing right now for no particular fault of its own. man if apple went for .net instead of doing their own thing it would have owned. fantasy world, I know
|
# ? Nov 12, 2021 22:15 |
|
ErrorInvalidUser posted:a patent on syntax so like the IsNot patent microsoft applied for about 20 years ago? e: https://patents.google.com/patent/US20040230959A1/en lmao
|
# ? Nov 12, 2021 22:16 |
|
|
# ? Jun 8, 2024 14:36 |
|
rjmccall posted:hilariously, i am a co-inventor on a patent on the entire language, taken as a whole. us patent 9,329,844. i'm pretty sure it means absolutely nothing, especially since it's immediately granted under the apache license to anyone who uses the project lol you weren't kidding huh
|
# ? Nov 12, 2021 22:20 |