|
FamDav posted:uh so you have stack objects which live on the stack thanks for the info but i still don't undersatnd lifetimes are they physical things that exist in the final binaries (exe files) or are they concepts that exist only during compilation? i couldn't get rust to work on windows out of the box and i don't have too much free time to check on linux so i have no idea PS: if any rust developers read this please for gods sake make a windows package that works. stop targeting linux. that poo poo is for webdev startups and they already have
|
# ? Sep 4, 2013 20:35 |
|
|
# ? May 17, 2024 06:42 |
|
Shinku ABOOKEN posted:thanks for the info but i still don't undersatnd lifetimes the lifetime of a variable is used to figure out where in the code to destroy it. borrowed pointers are an attempt to attach a lifetime to a c-style pointer.
|
# ? Sep 4, 2013 20:41 |
|
FamDav posted:uh so you have stack objects which live on the stack this is some bullshit. but maybe they'll come up with something worth stealing for a good language
|
# ? Sep 6, 2013 01:54 |
|
Nomnom Cookie posted:this is some bullshit. but maybe they'll come up with something worth stealing for a good language I don't really care, as I don't use Rust ATM, but I am curious. Also seconding whoever it was that pleaded for a working Windows build/installer for all the right reasons (ITT or wherever I read it).
|
# ? Sep 6, 2013 05:34 |
|
tef posted:in other news lisp was designed with an algol/fortran like syntax, but they started using s-expressions and got used to them this is correct tef posted:lisp's head and tail are ibm assembler instructions, but they got used to them, because they could write caddadddadaadar this is also correct, but i would like to add that anyone who honestly prefers car/cdr to head/tail needs to stop programming IMMEDIATELY this applies doubly so if the reason you like car/cdr is the ability to write caddadadadr
|
# ? Sep 6, 2013 06:05 |
|
FamDav posted:then you have managed pointers which are just reference counted. lol what a complete waste of time.
|
# ? Sep 6, 2013 06:07 |
|
first and rest are for when youre treating conses as lists, car and cdr are for when youre treating conses as cons cells
|
# ? Sep 6, 2013 06:08 |
|
car and cdr are for when you're on a machine where "contents of address register" and "contents of decrement register" mean something you're not they don't stop using them
|
# ? Sep 6, 2013 06:08 |
|
whats a better name for the first/second part of a cons
|
# ? Sep 6, 2013 06:09 |
|
i mean jesus christ if i was an anti-lisp fanatic (and i'm not), i could not come up with a better reason why lisp embraces useless obscurity than car/cdr
|
# ? Sep 6, 2013 06:09 |
|
the better name is head and tail as i've already described, that's literally what a cons is
|
# ? Sep 6, 2013 06:10 |
|
for clarification: lists ARE nothing more than cons cells, the only reason you see a difference in this treatment is that you're used to writing useless cacddadadadadccadadadarr bullshit
|
# ? Sep 6, 2013 06:12 |
|
JewKiller 3000 posted:the better name is head and tail as i've already described, that's literally what a cons is ok so you have a headttttdtddddtail function then
|
# ? Sep 6, 2013 06:12 |
|
no i don't and you shouldn't either human being. write your programs so they're readable, not to minimize the amount of characters you have to type, jesus christ do your loving job, they probably pay you enough.
|
# ? Sep 6, 2013 06:13 |
|
anyway, lisp is a neat idea that has influenced a lot of important poo poo, but without static types a la typed racket, it's a toy. also the main argument for lisp is macros, and those are almost impossible to write correctly. trace through macroexpand until you want to kill yourself. or just use a language with syntax
|
# ? Sep 6, 2013 06:20 |
|
lists are one thing you can build with cons cells. (cons 1 2) isn't a list. write programs so that theyre readable, don't mix abstraction levels and use list terminology for the underlying mechanism
|
# ? Sep 6, 2013 06:20 |
|
i'm coming from the perspective that (cons 1 2) has type int list. if you're not then sorry about your broken mental model. also i think it should be more like cons 1 [2] but i'm an ML programmer so
|
# ? Sep 6, 2013 06:22 |
|
http://docs.racket-lang.org/guide/pairs.html
|
# ? Sep 6, 2013 06:24 |
|
oh so you consider all pairs to be cons cells? very well, then you want fst and snd, not car and cdr
|
# ? Sep 6, 2013 06:25 |
|
because we speak english, not loving ibm 704 assembly
|
# ? Sep 6, 2013 06:25 |
|
fst and snd are okay names
|
# ? Sep 6, 2013 06:26 |
|
i actually didn't know that cons was used for pairs in general in lisp. in ML-land the :: operator is pronounced cons, as in 1 :: [2], and it only works for lists. hence my confusion ML has more syntax, so for a general pair you'd write something like (1, "foo")
|
# ? Sep 6, 2013 06:27 |
|
JewKiller 3000 posted:i actually didn't know that cons was used for pairs in general in lisp. in ML-land the :: operator is pronounced cons, as in 1 :: [2], and it only works for lists. hence my confusion Common Lisp also has static typing I assume your only contact with "lisp" is scheme or elisp because you are wrong about everything
|
# ? Sep 6, 2013 06:30 |
|
JewKiller 3000 posted:i'm coming from the perspective that (cons 1 2) has type int list. if you're not then sorry about your broken mental model. (For realz though: for the longest time I never thought I'd be one of those people who cared real hard about type systems, and I wasn't; then one day I looked into my heart and found Pierce and it's been nothing but the Good News since).
|
# ? Sep 6, 2013 06:32 |
|
common lisp has everything and nobody uses any of it
|
# ? Sep 6, 2013 06:33 |
|
also gently caress you if youre writing car/cdr combinations with any regularity outside of the definition of a function that describes what you're trying to extract
|
# ? Sep 6, 2013 06:34 |
|
regardless of the name you use for car and cdr
|
# ? Sep 6, 2013 06:35 |
|
JewKiller 3000 posted:anyway, lisp is a neat idea that has influenced a lot of important poo poo, but without static types a la typed racket, it's a toy. also the main argument for lisp is macros, and those are almost impossible to write correctly. trace through macroexpand until you want to kill yourself. or just use a language with syntax
|
# ? Sep 6, 2013 06:36 |
|
mnd posted:Hey what's up ML buddy. I like ML lots too, even though I'm still a die-hard Lisp slob; I guess I got religion late in life (PS: I didn't get much religion though). You can ease up on the bad Lisp programming hate though; I'm pretty sure no-one ITT actually writes Lisp if you haven't already, buy both of pierce's books. he's a loving genius, i can't even. i'm totally not on the level of people who care Real Hard, because those people have moved on to coq and agda. but ML is a sweet spot for me. it lets me express the types i want without having to prove any theorems i also like robert harper at cmu, he makes some excellent blog posts under the name "existential type" that advocate for the ML way of thinking
|
# ? Sep 6, 2013 06:40 |
|
mnd posted:I'd just like to say for the record that you can have my macroexpand-1 (and unwind-protect (and call/cc in Scheme)) when you pry it from my cold dead hands. i am not qualified to argue about call/cc but oleg kiselyov certainly is: http://okmij.org/ftp/continuations/against-callcc.html
|
# ? Sep 6, 2013 06:42 |
all lisps are garbage
|
|
# ? Sep 6, 2013 06:47 |
|
garbage collecting, you mean
|
# ? Sep 6, 2013 06:48 |
|
JewKiller 3000 posted:if you haven't already, buy both of pierce's books. he's a loving genius, i can't even. i'm totally not on the level of people who care Real Hard, because those people have moved on to coq and agda. but ML is a sweet spot for me. it lets me express the types i want without having to prove any theorems ML is still the shiz though. Real talk: Standard ML or OCaml? I kinda swing both ways, but I'm still relatively green with OCaml compared to SML (unless you count F#, which I sorta do... but still). I've stopped fighting against the OCaml tide a bit, but I haven't given up on SML either. Bob Harper is the man, have you seen his new book? It's pretty boss. You can still get a "draft" PDF for free off his site. I giggled the other day when I noticed this "draft" PDF had been revised this June with errata and updates post-release.
|
# ? Sep 6, 2013 06:48 |
|
i believe in you sulk. i am sure you were just pointing a property of all lisp runtimes and just forgot to finish your sentence.
|
# ? Sep 6, 2013 06:48 |
Suspicious Dish posted:i believe in you sulk. i am sure you were just pointing a property of all lisp runtimes and just forgot to finish your sentence. yeh the rest of it was collected before it could even be finished
|
|
# ? Sep 6, 2013 06:50 |
|
JewKiller 3000 posted:i am not qualified to argue about call/cc but oleg kiselyov certainly is: http://okmij.org/ftp/continuations/against-callcc.html I do like his delimited continuations implementation for OCaml though, have been tinkering and futzing with that some. Oleg isn't the first to argue against call/cc as a primitive; Felleisen has raised the issue in the past before as well.
|
# ? Sep 6, 2013 06:52 |
|
mnd posted:Yeah, I have both of Pierce's tomes. And I've moved on to Coq (but not Agda yet... still moves too fast for me, too experimental, Haskell still hasn't owned me body and soul yet, and no tactics yet). the folks i know also use coq. i tried, but i'm not very good, it's too hard. coq is hard. hard coq. i use ocaml, but sml is close enough that i could switch if i needed to, and you probably could too! use of ocaml's object system is not very common, especially in library interfaces. there's a bit to learn with the module system i suppose, but otherwise it's just minor syntax differences, and dealing with the absence of eqtypes (god i wish ocaml had haskell-style type classes) i haven't checked out harper's latest book yet, but i will now, thanks!
|
# ? Sep 6, 2013 06:55 |
|
there's a post somewhere about how lisp's flexibility is ultimately its downfall and how any sufficiently complicated lisp will implement 80% of haskell except different lisps will implement a different 80% with differing quality
|
# ? Sep 6, 2013 07:02 |
|
but people also say that any sufficiently complex program will reimplement (badly) 80% of common lisp so if we have 80% of lisp and lisp is 80% of 80% quality then what do we have??? dicks
|
# ? Sep 6, 2013 07:06 |
|
|
# ? May 17, 2024 06:42 |
|
how many people here use ocaml professionally and dont work at jane st
|
# ? Sep 6, 2013 07:18 |