|
Does anyone have a good resource for gaining an understanding of category theory for code bros who know almost nothing about math? It's OK if this isn't a thing, but if it is I'd appreciate a recommendation for a decent resource.
|
# ? Nov 17, 2016 15:14 |
|
|
# ? May 15, 2024 04:00 |
|
The March Hare posted:Does anyone have a good resource for gaining an understanding of category theory for code bros who know almost nothing about math? It's OK if this isn't a thing, but if it is I'd appreciate a recommendation for a decent resource. I've seen this recommended: https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
|
# ? Nov 17, 2016 16:30 |
|
The March Hare posted:Does anyone have a good resource for gaining an understanding of category theory for code bros who know almost nothing about math? It's OK if this isn't a thing, but if it is I'd appreciate a recommendation for a decent resource. I like Categories For Scientists (edit: here is the current edition of the book from the publisher's website as ugly HTML instead of an ugly pdf) as a gentle/somewhat practical survey of category theory. It may end up being more math-y than you're looking for but it's also free on the internet, so worth taking a peek at. fomo sacer fucked around with this message at 00:46 on Nov 19, 2016 |
# ? Nov 18, 2016 16:18 |
|
Elm seems to be getting better and better at getting rid of everything that I like about it.
|
# ? Nov 19, 2016 00:30 |
|
Elm is great if you like enduring the horrors of front-end web development and the horrors of learning a new gimped language that has no other purpose than the horrors of front-end web development at the same time
|
# ? Nov 27, 2016 18:35 |
|
so what is good way to do front-end web dev if you don't like JavaScript (besides not doing it at all )? Purescript? Typescript? Some ocaml-to-js thing? React? Clojurescript?
|
# ? Nov 27, 2016 22:31 |
|
None, front end is basically forsaken ground. Elm is the best we got, followed by React/Redux.
|
# ? Nov 27, 2016 23:54 |
|
If you like functional programming you might enjoy using React with Flux/Redux (persistent change tracking) and RxJS (FRP-ish). If you prefer Angular 2 you can have static types with TypeScript, and you can use RxJS and/or Redux there as well. Keep in mind that there are always a million alternatives to every library though. Webdev still kind of sucks but it's come a long way.
|
# ? Nov 27, 2016 23:56 |
|
GHCJS is getting better and better, and I've really enjoyed working with Reflex. Also, there's now DWARF debugging support in stack HEAD. Sinestro fucked around with this message at 00:35 on Nov 28, 2016 |
# ? Nov 28, 2016 00:32 |
|
9-Volt Assault posted:so what is good way to do front-end web dev if you don't like JavaScript (besides not doing it at all )? Purescript? Typescript? Some ocaml-to-js thing? React? Clojurescript? HTML, CSS and as little JavaScript as possible. If you're using React you've already lost the battle
|
# ? Nov 28, 2016 13:30 |
|
xtal posted:Elm is great if you like enduring the horrors of front-end web development and the horrors of learning a new gimped language that has no other purpose than the horrors of front-end web development at the same time Eh... it's not gimped that much vv
|
# ? Nov 28, 2016 16:45 |
|
Shinku ABOOKEN posted:Eh... it's not gimped that much vv Does it still only run in browsers because building and learning a language just for front end web dev is straight up farcical Like at least use blaze-react or whatever
|
# ? Nov 28, 2016 18:29 |
|
Elm has a REPL, and has had one for a long time. Also, I'd say that the biggest problem with languages for front-end web dev up to now (Javascript) is that most general functionality is entirely useless for the task at hand, and a language specifically geared to making websites could be - and, in the case of Elm, is - much better.
|
# ? Nov 28, 2016 18:33 |
|
https://github.com/ElmCast/elm-node exists, but I imagine it'll be 'experimental' forever because there are already decent server-side (functional) languages.
|
# ? Nov 28, 2016 18:44 |
|
xtal posted:Does it still only run in browsers because building and learning a language just for front end web dev is straight up farcical JS is straight up farcical, you're right
|
# ? Nov 28, 2016 19:13 |
|
xtal posted:HTML, CSS and as little JavaScript as possible. If you're using React you've already lost the battle If your UI is trivial enough for that advice to work, I recommend giving up and using one of the drag-and-drop WYSIWYG site builder things because you don't have any problems they can't handle
|
# ? Nov 28, 2016 19:46 |
|
99.999% of UIs are that trivial and if you think you're the exception you're probably wrong but knock yourself out
|
# ? Nov 28, 2016 19:54 |
|
xtal posted:Does it still only run in browsers because building and learning a language just for front end web dev is straight up farcical Do you feel the same way about SQL ("building and learning a language just for relational databases is straight up farcical")?
|
# ? Nov 28, 2016 20:00 |
|
NihilCredo posted:Do you feel the same way about SQL ("building and learning a language just for relational databases is straight up farcical")? That's pretty clearly apples-and-oranges. http://www.andl.org is straight up farcical and a better comparison
|
# ? Nov 28, 2016 20:10 |
|
xtal posted:99.999% of UIs are that trivial and if you think you're the exception you're probably wrong but knock yourself out I don't entirely disagree - I think the percentage is somewhat lower depending on how you count, but the people who pay me sure do.
|
# ? Nov 28, 2016 20:39 |
|
xtal posted:99.999% of UIs are that trivial and if you think you're the exception you're probably wrong but knock yourself out The amount of contempt that you have for front end development shows that maybe you shouldn't be weighing in too heavily on it man.
|
# ? Nov 28, 2016 23:50 |
|
Maluco Marinero posted:The amount of contempt that you have for front end development shows that maybe you shouldn't be weighing in too heavily on it man. to be fair, ten minutes on the internet is enough to drive most anyone to contempt
|
# ? Nov 29, 2016 11:41 |
|
http://www.idris-lang.org/towards-version-1-0/ *starts countdown on uninstalling ghc* kujeger posted:to be fair, ten minutes on the internet is enough to drive most anyone to contempt Ten years in this case. gently caress the web
|
# ? Nov 30, 2016 19:27 |
|
kujeger posted:to be fair, ten minutes on the internet is enough to drive most anyone to contempt Because most sites are jenga stacks of Wordpress plugins and many if not most 'web developers' are idiot shitmonkeys who only know how to copy+paste poo poo from SO until something sort of works, but there are decent, well-made sites out there. xtal posted:http://www.idris-lang.org/towards-version-1-0/ quote:A Language with Dependent Types Titillating stuff
|
# ? Nov 30, 2016 19:34 |
|
God, I can't wait for Idris 1.0. It's already a really good language, and I'm interested in the final steps they're taking to get it stable and ready for that milestone. Replacing effects with states is something that might take some getting used to - effects was a much better alternative to MTL, so I wonder what states is going to do to improve upon that?
|
# ? Nov 30, 2016 20:12 |
|
Asymmetrikon posted:God, I can't wait for Idris 1.0. It's already a really good language, and I'm interested in the final steps they're taking to get it stable and ready for that milestone. I would be using Idris already if it had a package manager
|
# ? Nov 30, 2016 20:23 |
|
xtal posted:I would be using Idris already if it had a package manager Well you know what to do! Every language needs a bespoke plugin manager where the config files are a subset of the language itself.
|
# ? Nov 30, 2016 21:06 |
|
What we need to do is make Nix not suck, then this problem will be permanently solved
|
# ? Nov 30, 2016 21:07 |
|
gonadic io posted:Well you know what to do! Every language needs a bespoke plugin manager where the config files are a subset of the language itself. Now I'm wondering how dependent types would effect the expression of packages. Maybe you could have a function code:
packages, which is a version downloaded that matches the specification. You could replace the Nat with a more relaxed bound, perhaps some kind of Version type. ...on second thought, maybe someone can just make a Maven plugin for this stuff. Or just use Nix.
|
# ? Nov 30, 2016 21:28 |
|
Does Idris produce decently efficient code nowadays? Does it have arrays? I remember that it was supposed to be more practical than Agda, but I also heard someone claim that runtime efficiency had gotten derailed a bit along the way. I don't know what to believe anymore!
|
# ? Nov 30, 2016 21:49 |
|
Athas posted:Does Idris produce decently efficient code nowadays? Does it have arrays? I remember that it was supposed to be more practical than Agda, but I also heard someone claim that runtime efficiency had gotten derailed a bit along the way. I don't know what to believe anymore! It's decently efficient. Performance is, by their admittance, not a priority. You can generate more than just C, though. JavaScript, CLR, JVM and LLVM backends are under development by third-parties.
|
# ? Nov 30, 2016 21:56 |
|
app : Vect n a -> Vect m a -> Vect (n + m) a Is this a sort of thing we can expect in Haskell?
|
# ? Dec 1, 2016 12:59 |
|
Jarl posted:app : Vect n a -> Vect m a -> Vect (n + m) a Yes, but not any time soon, and it will probably happen through ugly, arcane language extensions.
|
# ? Dec 1, 2016 13:03 |
|
xtal posted:What we need to do is make Nix not suck, then this problem will be permanently solved I was going to say that nix is already good, but then I remembered how much trouble people seem to have with git, and I admit it's not as good as git. But really, everyone, please use nix.
|
# ? Dec 1, 2016 14:08 |
|
Jarl posted:Is this a sort of thing we can expect in Haskell? You can kind of hack this into Haskell at the moment - if you use the DataKinds language feature, you can get type-level Nats (and other inductive types), which can be used in those kind of type definitions (see this article for more). It's very limited, though.
|
# ? Dec 1, 2016 14:21 |
|
Asymmetrikon posted:You can kind of hack this into Haskell at the moment - if you use the DataKinds language feature, you can get type-level Nats (and other inductive types), which can be used in those kind of type definitions (see this article for more). It's very limited, though. My experience is that it is terrible to use in practice. As an experiment, I had a module in my compiler that I decided to implement using all this type-level magic. While I got it to work, I ended up spending a ton of time proving arithmetic identities (like x+(y-z)=(x+y)-z) to satisfy the type checker. This is also a serious PITA in real dependently typed languages, but they generally have tooling to generate trivial but tedious proofs. I have since replaced it with dynamic checks that fail if my desired invariants are invalidated. Works fine and is much easier to understand and modify.
|
# ? Dec 1, 2016 14:48 |
|
Doc Hawkins posted:I was going to say that nix is already good, but then I remembered how much trouble people seem to have with git, and I admit it's not as good as git. code:
|
# ? Dec 1, 2016 16:40 |
|
Oh, if that's the part that bothers you, then guix uses guile, feel free to use and promote that instead. I care more about spreading functional package management in general, independent of interface. Personally, with Nix-the-language, I've finally reached my usual functional language plateau of ignorant competence where I can write some, and understand most that I read, but not form a useful critique about what should be different.
|
# ? Dec 1, 2016 16:53 |
|
Nix is absolutely glorious, especially for software development, since it makes it very easy to maintain (and share!) a wide variety of different build environments with predictable versions of dependencies and tools available. Also for servers because it's a lot easier to fix/update a system that you haven't touched in two years if the entire system is described by a short stateless config file. The language isn't great, but it's good enough. I'll take some idiosyncratic syntax over stateful package management any day. xtal posted:It's decently efficient. Performance is, by their admittance, not a priority. You can generate more than just C, though. JavaScript, CLR, JVM and LLVM backends are under development by third-parties. That said, dependent types are absolutely glorious and everyone should be very excited about them becoming more accessible. I'm optimistic that Haskell will eventually provide them in a non-awkward way (it's been going that direction for a while), but what I really dream of is Rust someday getting there. Writing arithmetic proofs can be annoying, but real-world code is full of issues arising from people getting simple arithmetic wrong, so it doesn't really seem gratuitous.
|
# ? Dec 1, 2016 19:44 |
|
|
# ? May 15, 2024 04:00 |
|
Genuine question: What's the real world utility of dependent types?
|
# ? Dec 2, 2016 03:51 |