|
So the correct answer is Prolog, cool.
|
# ? Dec 11, 2012 02:04 |
|
|
# ? May 9, 2024 12:45 |
|
Zombywuf posted:So the correct answer is Prolog, cool. clojure + core.logic
|
# ? Dec 11, 2012 02:20 |
|
bash
|
# ? Dec 11, 2012 02:34 |
|
Zombywuf posted:So the correct answer is Prolog, cool. if software = data structures + algorithms algorithms = logic + control
|
# ? Dec 11, 2012 02:39 |
|
trex eaterofcadrs posted:clojure + core.logic
|
# ? Dec 11, 2012 02:41 |
|
mutability sucks and is stupid immutable structures go 4ever
|
# ? Dec 11, 2012 02:50 |
|
MononcQc posted:immutable data structures are pretty nice to have but also getting well-delimited mutability is a nice tool. I do prefer a clear delimitation between both modes than only mutable if available though. IORef/State 0xB16B00B5 posted:look jsut loving decide what X is already stop changing your mind later int he program i mean whatever it is we know it gon give it to ya
|
# ? Dec 11, 2012 02:52 |
|
yaoi prophet posted:IORef/State Monad stuff, independent data structure allowing modifications or not (what Schemes tend to do now, specifically Racket), clearly-defined semantics about mutability like what Clojure does, strict use of const stuff in Cs, uniqueness types, whatever. I think (and have no data to back it up) that it's fairly important to make mutation very explicit when it happens, to have well-defined semantics between "this is safe" and "this isn't". If you can differentiate between state and identity the way Clojure does it then it's even better. I don't particularly care how it's done, as long as you can do it reliably. It's nice to be able to have a reference to some data structure and know you can make idempotent operations on it, or that it's impossible and you should just not assume you can. I'd generally go for immutable stuff by default and then get mutation or destructive updates when I actually have a real need to, either through performance requirements, or semantic ones. Then again, I work in systems and languages that give this to me by default, so that became my defacto thinking mode.
|
# ? Dec 11, 2012 03:01 |
|
Tiny Bug Child posted:it is union types are really useful code:
|
# ? Dec 11, 2012 03:38 |
|
Tiny Bug Child posted:where would the ability to perform this on types be useful ugh, academics, things are all the same type in a real programming language
|
# ? Dec 11, 2012 03:47 |
|
in an ideal programming language, sure, but like an ideal gas no such thing truly exists
|
# ? Dec 11, 2012 04:02 |
|
Otto Skorzeny posted:now you have 32767 problems Nah, we cool
|
# ? Dec 11, 2012 04:03 |
|
tef posted:ugh, academics, things are all the same type in a real programming language as a way of zeroing in on the perfect platonic ideal of a programming language, i've been kicking around this idea to help further remove the meaningless distinctions between "types": make everything an array. primitives as we currently know them are just arrays of length 1
|
# ? Dec 11, 2012 04:08 |
|
should go back to bits and bytes instead. More general.
|
# ? Dec 11, 2012 04:08 |
|
like if you try to do this: $it = "string"; $it[] = "string2"; php bitches at you, when it should turn $it into array("string", "string2")
|
# ? Dec 11, 2012 04:09 |
|
Tiny Bug Child posted:like if you try to do this: *nods*
|
# ? Dec 11, 2012 04:10 |
|
van der waals of abstraction
|
# ? Dec 11, 2012 04:55 |
|
Tiny Bug Child posted:as a way of zeroing in on the perfect platonic ideal of a programming language, i've been kicking around this idea to help further remove the meaningless distinctions between "types": make everything an array. primitives as we currently know them are just arrays of length 1 what about if you just made everything a function. so like primitives would just be a function that always returns the same value
|
# ? Dec 11, 2012 05:10 |
|
Tiny Bug Child posted:like if you try to do this: shouldn't it turn it into "stringstring2"
|
# ? Dec 11, 2012 05:11 |
tef posted:shouldn't it turn it into "stringstring2" php
|
|
# ? Dec 11, 2012 05:15 |
|
tef posted:shouldn't it turn it into "stringstring2" nah that would be the . operator
|
# ? Dec 11, 2012 05:17 |
|
JawnV6 posted:van der waals of abstraction this joke seems kind of forced.
|
# ? Dec 11, 2012 08:12 |
|
I sort of want to learn python. My "code" skills are ~1yr of SQL dba, and a few years of HTML. I took AP comp sci in high school 12 years ago in C++ and got a 3 on the exam, but I was written and I remember nothing. Where do I start?
|
# ? Dec 11, 2012 08:49 |
|
JosephStalinVEVO posted:I sort of want to learn python. how about here: http://www.learnpython.org/
|
# ? Dec 11, 2012 08:57 |
|
Sang- posted:union types are really useful http://stackoverflow.com/questions/3508077/does-scala-have-type-disjunction-union-types http://www.chuusai.com/2011/06/09/scala-union-types-curry-howard/ this does a thing, somehow. really batshit crazy stuff i wish i understood
|
# ? Dec 11, 2012 08:59 |
|
rotor posted:how about here: Ok but should I buy a new retina mbp so I can code right!?
|
# ? Dec 11, 2012 09:02 |
|
JosephStalinVEVO posted:Ok but should I buy a new retina mbp so I can code right!? no, a thinkpad.
|
# ? Dec 11, 2012 09:05 |
|
really like wtf i'm going to read more scala and come back to that crazy poo poo
|
# ? Dec 11, 2012 09:06 |
|
homercles posted:I thought this would be easily doable via implicit functions doing the mapping but the answers here do it through even nicer means. i dont think strong typing is worth the effort
|
# ? Dec 11, 2012 09:10 |
|
maybe in 2.10 you could implement such a feature more explicitely with macros it would still be butt ugly
|
# ? Dec 11, 2012 09:25 |
|
quote:
zoom quote:
enhance quote:
:∨
|
# ? Dec 11, 2012 09:28 |
|
D34TH ∀
|
# ? Dec 11, 2012 09:30 |
|
tef posted:what about if you just made everything a function. so like primitives would just be a function that always returns the same function
|
# ? Dec 11, 2012 12:47 |
|
JosephStalinVEVO posted:I sort of want to learn python. there's an mit course on itunes u that uses python. that seemed fine but it might be too intro-level for you.
|
# ? Dec 11, 2012 13:34 |
learn ruby instead
|
|
# ? Dec 11, 2012 14:01 |
|
web "developer"status: sass owns so much porting everything over to it
|
# ? Dec 11, 2012 14:05 |
|
tef posted:what about if you just made everything a function. so like primitives would just be a function that always returns the same value Isn't that what Lisp is like? Or OCaml or one of those functional things? VVVV prefect fucked around with this message at 14:33 on Dec 11, 2012 |
# ? Dec 11, 2012 14:12 |
|
|
# ? Dec 11, 2012 14:30 |
|
unwarranted effort post: Lisp and other similar languages are based on the idea of lambda calculus (the function-based everything), but for practical reasons, ditch a lot of "everything is a function" for efficiency reasons. For example, by default, Scheme'S lists are the usual 'cons cell' data structure. You can think of it as a C struct with two pointers (current and next), which are pointers to the current value or the following one: code:
code:
Lambda calculus (untyped) works that way from the beginning, depending on if you allow the notation for anonymous functions to take more than one argument. If not, you need to work your way through currying to get something equivalent. Languages in the ML family (ML, SML, OCaml, Haskell, etc.) instead base themselves on typed lambda calculus, which is significantly more complex, but allows the presence of type systems similar to what these languages have (they tend to pick Hindley-Milner).
|
# ? Dec 11, 2012 14:36 |
|
|
# ? May 9, 2024 12:45 |
|
reimplementing lists as functions to talk about Schemes is my most common use of Schemes
|
# ? Dec 11, 2012 14:41 |