|
TOPS-420 posted:thank you golang for making incorrect floating point rounding a problem in tyool 2017 at first i was going to defend go and say that rounding is annoying and getting exact fp reproducibility is difficult in any language but no, apparently we are talking about normal, user-level rounding, and go just declines to provide a function to do it,
|
# ? Jul 11, 2017 17:02 |
|
|
# ? May 31, 2024 10:08 |
|
Sapozhnik posted:maybe it's different inside apple idk, i haven't come across any major open source c projects that abuse preprocessor macros to that extent. This is from a few weeks back, but I'm guessing you've never done any Gtk/Gnome programming?
|
# ? Jul 11, 2017 17:34 |
|
more like doh-lang
|
# ? Jul 11, 2017 19:38 |
|
rjmccall posted:at first i was going to defend go and say that rounding is annoying and getting exact fp reproducibility is difficult in any language floats are fun and that blog inspired me to polish up my round half up function works in Java and IEEE floating point, easy prey for misguided compilers Java code:
|
# ? Jul 12, 2017 12:41 |
is there something fundamental about programming language design that there are, i think, no modern jit-compiled or interpreted languages with strong type system?
|
|
# ? Jul 17, 2017 10:09 |
|
I think you really confusing strong/weak typing (how much the compiler lets you get away with) vs static/dynamic typing (whether it's checked at compile or runtime). Python is strongly typed for example, if the types don't match you get errors. There's not really any examples of static but weak typed languages - c might count because you can cast anything to anything but in general if you have a compiler and types then you might as well use the compiler to check types. You don't have to though - haskell has an option to defer type errors to runtime only on executed code for example.
|
# ? Jul 17, 2017 10:17 |
|
strong type systems mix poorly with dynamic loading etc., need to then explicitly define interfaces (e.g. sml-stype modules). at that point it gets complicated enough that it is more a matter of no such languages really gaining traction the greater mystery is really why it is so hard for the die-hard fans of truly advanced type systems to understand that it is invariably very poor hci, and wont ever catch on in a capacity where it needs to be possible to hire a person off the street to work with it (without assuming passion or excessive talent, just normal hire-a-suitable-enough-person-to-do-things-for-the-money).
|
# ? Jul 17, 2017 10:21 |
|
Cybernetic Vermin posted:the greater mystery is really why it is so hard for the die-hard fans of truly advanced transportation systems to understand that it is invariably very poor hvi, and wont ever catch on in a capacity where it needs to be possible to hire a person off the street to drive it (without assuming passion or excessive talent, just normal hire-a-suitable-enough-person-to-do-things-for-the-money). it's a good thing that we still go around with horses and buggies, because early cars were complicated! unless you're putting "writing code that doesn't just happen to not be broken for the exact case I'm screwing around with in my REPL/toy test program" as beyond an average programmer, there is no reason that a good type system can't succeed, they've just been almost entirely present in research-type languages, where there's more focus on novel developments than on perfectly refined interactions.
|
# ? Jul 17, 2017 10:29 |
gonadic io posted:I think you really confusing strong/weak typing (how much the compiler lets you get away with) vs static/dynamic typing (whether it's checked at compile or runtime). yeah im not fluent with terminology, just musing why python 3 type annotations are not going past being just suggestions, which seems to be what cybernetic vermin talks about
|
|
# ? Jul 17, 2017 11:06 |
|
cinci zoo sniper posted:is there something fundamental about programming language design that there are, i think, no modern jit-compiled or interpreted languages with strong type system? Lua? I guess you can argue on whether it is strong-typed, but generally you can't do poo poo like add strings and integers together (aside from the proper operator) and it would be regarded as dynamic and strong-typed.
|
# ? Jul 17, 2017 12:51 |
http://adv-r.had.co.nz/Functions.html i have so many questions
|
|
# ? Jul 17, 2017 13:11 |
|
Not sure how i feel about categorizing a type system by the availability of implicit conversion operators or w/e I feel like weakly typed it when youre bash and everything is a string, or some asm where everything is a word
|
# ? Jul 17, 2017 14:04 |
|
Sinestro posted:it's a good thing that we still go around with horses and buggies, because early cars were complicated! the reason is that most code in the world is written by full-time java programmers who would struggle to write a generic class themselves, and it is not the people that will change
|
# ? Jul 17, 2017 14:25 |
|
cinci zoo sniper posted:is there something fundamental about programming language design that there are, i think, no modern jit-compiled or interpreted languages with strong type system? Java? F#? Kotlin? Not sure if these are modern enough. Writing a JIT is so difficult that only languages with massive support can get away with it (wit LuaJIT the most important exception). And for most statically typed languages, you can just write a conventional compiler and get performance as good (or better) at a fraction of the complexity.
|
# ? Jul 17, 2017 14:52 |
you compile java though, so maybe i should've not mentioned jit. basically i wish a statically typed python would be real, and i should probably read some compsci book so i dont pull terms out of my rear end
|
|
# ? Jul 17, 2017 14:55 |
|
yeah basically none of these terms are concretely defined or languages categorised exactly anyway. you're right about it being a trend though, if not a rule. honestly i think it's just that people who don't want to (can't be botherted to) write a compiler they won't write a static analyser into the lang either, but it you have written a compiler it's a lot less effort to put types in.
|
# ? Jul 17, 2017 15:02 |
makes sense. any light programming language theory read suggestions, speaking of? keep in mind ive got just the physics background
|
|
# ? Jul 17, 2017 15:04 |
|
cinci zoo sniper posted:you compile java though, so maybe i should've not mentioned jit. basically i wish a statically typed python would be real, and i should probably read some compsci book so i dont pull terms out of my rear end I mean PyPy is a JIT for Python if that's still relevant to the JIT discussion
|
# ? Jul 17, 2017 15:13 |
|
cinci zoo sniper posted:you compile java though, so maybe i should've not mentioned jit. basically i wish a statically typed python would be real, and i should probably read some compsci book so i dont pull terms out of my rear end for java and c# there are 2 compilation phases. The first is your traditional, ahead of time compilation which is what you're doing with your IDE/build tools. This generates a pile of bytecode that can run on top of the language's VM (jvm for java, clr for c#). Then when the bytecode is executed on the vm, the JIT runs compilations based on the current running environment and the result is optimized for the local platform. This could be any kind of os or hardware optimizations.
|
# ? Jul 17, 2017 15:14 |
MononcQc posted:I mean PyPy is a JIT for Python if that's still relevant to the JIT discussion pypy i know of, even if i dont like significant 3rd party deps. now typing though, there are annotations in 3.x and there is that one library that mimicks them, but nothing strong afaik
|
|
# ? Jul 17, 2017 15:15 |
|
cinci zoo sniper posted:you compile java though, so maybe i should've not mentioned jit. basically i wish a statically typed python would be real, and i should probably read some compsci book so i dont pull terms out of my rear end golang is close tbh garbage collection structural types but yeah
|
# ? Jul 17, 2017 15:22 |
tef posted:golang is close tbh golang would be nice if not for whole idiotic philosophy that results in generics being accessible to vip club only. not that it's the only problem, but the language isn't held back by more than the opinions of chief designers
|
|
# ? Jul 17, 2017 15:25 |
|
the people behind go are all idiots so idk why you would go near it
|
# ? Jul 17, 2017 15:29 |
|
cinci zoo sniper posted:is there something fundamental about programming language design that there are, i think, no modern jit-compiled or interpreted languages with strong type system? no it's kinda the opposite with static vs dynamic, modern compilers and jits are replacing full ahead of time knowledge with inference and profiling and the technology behind the jvm was designed for smalltalk and self, dynamic languages weak vs strong is basically how intentional vs accidental your subclassing is like, you can have a terrible mess of implicit casts in any languages, but structural (or more duck typed) languages often come with things that respond to different protocols (a string is a list, and a bool too!) java having only one type of null is an example of weak typing then you've got nominative vs structural or 'do they have the same name' vs 'do they have the same features' anyway, people are doing JIT over C, specifically to lower FFI costs :v
|
# ? Jul 17, 2017 15:31 |
|
cinci zoo sniper posted:golang would be nice if not for whole idiotic philosophy that results in generics being accessible to vip club only. not that it's the only problem, but the language isn't held back by more than the opinions of chief designers lol you read one tweet and somehow they're keeping generics from the masses
|
# ? Jul 17, 2017 15:32 |
|
cinci zoo sniper posted:you compile java though, so maybe i should've not mentioned jit. basically i wish a statically typed python would be real, and i should probably read some compsci book so i dont pull terms out of my rear end both java and python are first compiled to bytecode and then executed in a vm. the only difference is that python handles the compilation stage transparently if you give it source code to run
|
# ? Jul 17, 2017 15:38 |
|
java: generics were added after GJ/Pizza c#: generics come out in 2.0 go: hey, so for 2.0 we're wondering about how to do generics, and nothing people have proposed have worked out like you have the c++ programmers who want generics, i.e they want to be able to do move constructors and raii you also have a bunch of people used to java etc who just want a Set<X> but you also have the functional weenies who want HKTs like, you have massive co-variance and contra-variance problems to solve when it comes to structural types it's not generics, it's implementing them in a way that makes sense with the interfaces and well, the compiler, on the inside, doesn't have to deal with these constraints a parameterized type is one thing but how that interplays with type inference is actually kinda hard
|
# ? Jul 17, 2017 15:39 |
|
cinci zoo sniper posted:you compile java though, so maybe i should've not mentioned jit. basically i wish a statically typed python would be real, and i should probably read some compsci book so i dont pull terms out of my rear end i write python for my job and the bigger our codebase gets the more i'd like to be using something actually statically typed + with enforced interfaces etc ABCs are nice, type hinting is largely uselss, interfaces are kinda a fudge it'd be nice to have the compiler catch ur mistakes and ur coworkers instead of.... QA/production
|
# ? Jul 17, 2017 15:41 |
|
basically i want to write C# i guess
|
# ? Jul 17, 2017 15:42 |
tef posted:lol you read one tweet and somehow they're keeping generics from the masses what else should i infer from 24/7 anti-go circlejerk everywhere. irl ive seen exactly one go project, and it was some college class project web game backend anyways yikes i only wanted to wonder about static typing in python, r, and similar languages
|
|
# ? Jul 17, 2017 15:43 |
Mr SuperAwesome posted:i write python for my job and the bigger our codebase gets the more i'd like to be using something actually statically typed + with enforced interfaces etc same only my python project is not exactly a job per se, and the codebase is probably laughable by any meaningful standard. same for the job though, but thank god i have to only write scripts in r, not extend r
|
|
# ? Jul 17, 2017 15:47 |
|
Mr SuperAwesome posted:basically i want to write C# i guess or java. mostly c# tho.
|
# ? Jul 17, 2017 15:57 |
|
cinci zoo sniper posted:what else should i infer from 24/7 anti-go circlejerk everywhere. irl ive seen exactly one go project, and it was some college class project web game backend i asked hadley at a meetup whether R would be better with types, he said no
|
# ? Jul 17, 2017 16:19 |
|
julia is a jit-compiled language with a cool multimethod-based type system. seems to be getting some early traction with the matlab crowd ocaml has a p nice interpreter/repl and all the pointless academic type system features
|
# ? Jul 17, 2017 16:21 |
motedek posted:i asked hadley at a meetup whether R would be better with types, he said no
|
|
# ? Jul 17, 2017 16:22 |
|
doesn't julia have some weird mix of 1-based and 0-based indexing 1-based indexing is the dumbest thing
|
# ? Jul 17, 2017 17:02 |
|
Sapozhnik posted:doesn't julia have some weird mix of 1-based and 0-based indexing inconsistent indexing is much worse than 1-based indexing in a language with good built-in functions for list traversal, the indexing scheme reduces to an HCI problem
|
# ? Jul 17, 2017 17:14 |
|
tef posted:you have the c++ programmers who want generics, i.e they want to be able to do move constructors and raii uh no, c++ templates are completely orthogonal to move constructors and raii. templates automate the process of copy pasting the code for FooSet and renaming all the Foo to Bar call a templated method with a new type? generate a completely separate implementation. anyways, contravariance and covariance are problems for languages with type hierarchies, not golang
|
# ? Jul 17, 2017 17:17 |
IMO allow arbitrary indexing
|
|
# ? Jul 17, 2017 17:57 |
|
|
# ? May 31, 2024 10:08 |
|
VikingofRock posted:IMO allow arbitrary indexing rust could even make this zero-cost for regular int indexing, it'd just get inlined. brb building library. e: this package gives you n-dimensional indices: https://docs.rs/ndarray/0.10.0/ndarray/ and i'm not sure there's other use cases for arbitrarily-typed indices. gonadic io fucked around with this message at 18:06 on Jul 17, 2017 |
# ? Jul 17, 2017 18:03 |