Live data from Hacker News

The Bipolar Lisp Programmer (2007)

marktarver.com

81–90 of 136 posts

Re: The Bipolar Lisp Programmer (2007)

#81

I'm exactly this type of student. 18 yo, just starting university next month. Any advices? Every single thing in the article fits my life so far, the boredom, the pointlessness of all things, the ease of brilliance, 1 to 1, sans the sadness because I'm still hopeful that the world can be fixed and am still an idealist. (I attribute this to my faith.) My classmates always envied how little or none I work for the same…

Diversify, socialize, and start things before they're due*.

Take classes / sit in on lectures from different fields (art history, painting, russian literature, architecture/furniture making... the list goes on, just make sure it's interesting to you). If you've got AP credits racked, your entire first year's worth of requirements just got freed. Use them piece-by-piece over your semesters to explore other avenues rather than graduating a year early. Don't be afraid of 300/400 level classes as a sophomore (assuming you're solid for the first 3 semesters). It's a great way to better integrate with upper classmen while you're still a fledgling.

Join clubs that do different forms of the work you're interested (applications of theory vs problem sets), or entirely different skillsets**. You should be able to meet people above and below you, enabling avenues to learn and teach.

*I never did figure out how deadlines work.

**E.g. sports. "The mind cannot exist without the body" - Morbeus

Re: The Bipolar Lisp Programmer (2007)

#82
post #28

Earlier quoted context omitted.

ADDENDUM: I love Lisp but I want to clarify that its secret sauce is that it enables exploratory programming: programming from inside the system. While most languages are akin to preparing a detailed blueprint and executing it (then stop to update the blueprint and try again), exploratory programming is like sculpture. You have an unformed mass full of unrealised potential, and you slowly carve it to shape. The ADHD/…

"The ADHD/Bipolar mind of the article isn't great at making plans, it's great at following its gut instinct, making shit up step by step." Which is why I do best with the command line, piping outputs and rapidly iterating to get the output I want. And why I struggled so much writing Python in a larger, more complex script/app. I wanted to constantly run and rerun the smaller parts to get each one just right. Unfortun…

> I wanted to constantly run and rerun the smaller parts to get each one just right.

One one hand, as you alluded too, I've found unit tests are a great solution to this. Kill two birds with one stone - rapidly iterate on a chunk of code and come out of it with solid test coverage.

It's too bad that's not very feasible in gamedev most of the time with so much going on in the world, but over time I think that environment improved my skills to where it's less of a problem.

Re: The Bipolar Lisp Programmer (2007)

#83
post #2

I quite enjoyed this article, but I reckon they're talking about ADHD rather than "bipolar" mind. Seen under that lens, I resonate with his caricature. Focus is a precious, rare resource outside my control. Mainstream languages, made for collaboration in big teams rather than maximum personal freedom, soon impose restrictions that kill hyperfocus. The "unused variable is an error" is the most egregious of them that I…

> but I reckon they're talking about ADHD rather than "bipolar" mind

I think while some of the people he describes may have ADHD, very few people with ADHD are this person. His description resonated with me as a particular archetype, one that often makes their way into grad school eventually. Often enough to be recognizable.

I also don't think the author meant these people are bipolar in a medical sense, but used "bipolar" as the success+failure designation, perhaps unfortunate terminology.

Re: The Bipolar Lisp Programmer (2007)

#84
post #71
post #37

Earlier quoted context omitted.

Imagine this: You start a fresh REPL session with a vague idea of something you want to build. You have good tooling that enables you to write code in your favourite editor and pipe it to the REPL through a socket. You write a couple of functions and send them to the REPL. You call them a few times with some test arguments, maybe define a couple global variables while testing, and realize one of the functions doesn't…

What happens when you want to share the thing you built with somebody else? If I type a defun into a REPL, is there a good way to get source code back out again? Because there's a problem I've run into several times when writing Lisp (I use SLIME): I decide to refactor some stuff, so I rewrite some stuff, maybe remove a function or two from the source as part of that. Things seem to be working fine. I save my .lisp f…

[deleted]

Re: The Bipolar Lisp Programmer (2007)

#85
post #71
post #37

Earlier quoted context omitted.

Imagine this: You start a fresh REPL session with a vague idea of something you want to build. You have good tooling that enables you to write code in your favourite editor and pipe it to the REPL through a socket. You write a couple of functions and send them to the REPL. You call them a few times with some test arguments, maybe define a couple global variables while testing, and realize one of the functions doesn't…

What happens when you want to share the thing you built with somebody else? If I type a defun into a REPL, is there a good way to get source code back out again? Because there's a problem I've run into several times when writing Lisp (I use SLIME): I decide to refactor some stuff, so I rewrite some stuff, maybe remove a function or two from the source as part of that. Things seem to be working fine. I save my .lisp f…

> When I develop in a compiled language

"batch compiled from scratch"

OTOH, most usage of Common Lisp is compiled, often by an incremental in-image compiler

> because oops I was actually still calling that deleted function somewhere

Typically Lisp IDEs have features like Edit Callers and/or List Callers. I would

1) "Edit Callers" -> this walks me through all functions which use this function, I change the functions and I can edit/compile them

2) When I'm done, I use "Undefine Function", which then undefines the function from the running Lisp.

Re: The Bipolar Lisp Programmer (2007)

#86
post #37

Earlier quoted context omitted.

Imagine this: You start a fresh REPL session with a vague idea of something you want to build. You have good tooling that enables you to write code in your favourite editor and pipe it to the REPL through a socket. You write a couple of functions and send them to the REPL. You call them a few times with some test arguments, maybe define a couple global variables while testing, and realize one of the functions doesn't…

This is the kind of thing that should be included in language tutorials! It particularly resonates with me because I think so many project teams neglect the Developer Experience. In my opinion DevOps should be more about making coding, testing and deploying as frictionless as possible.

when this term first came out, it really seemed like that was the point

now it just seems like a hundred children you have to pacify and get to bed before you can even start working

Re: The Bipolar Lisp Programmer (2007)

#87
post #28
post #2

I quite enjoyed this article, but I reckon they're talking about ADHD rather than "bipolar" mind. Seen under that lens, I resonate with his caricature. Focus is a precious, rare resource outside my control. Mainstream languages, made for collaboration in big teams rather than maximum personal freedom, soon impose restrictions that kill hyperfocus. The "unused variable is an error" is the most egregious of them that I…

ADDENDUM: I love Lisp but I want to clarify that its secret sauce is that it enables exploratory programming: programming from inside the system. While most languages are akin to preparing a detailed blueprint and executing it (then stop to update the blueprint and try again), exploratory programming is like sculpture. You have an unformed mass full of unrealised potential, and you slowly carve it to shape. The ADHD/…

what about gnumeric, observablehq, jupyter, the unix shell, and the browser console (firebug and its clones)

admittedly it's hard to save the state of the page after you hack on it in the browser console, but jupyter doesn't really have that problem

Re: The Bipolar Lisp Programmer (2007)

#88

I'm exactly this type of student. 18 yo, just starting university next month. Any advices? Every single thing in the article fits my life so far, the boredom, the pointlessness of all things, the ease of brilliance, 1 to 1, sans the sadness because I'm still hopeful that the world can be fixed and am still an idealist. (I attribute this to my faith.) My classmates always envied how little or none I work for the same…

I think you're right to be concerned. I coasted through secondary school with a 4.0..and when I reached undergrad I didn't have the tools to apply myself. I wasn't a big fish in a small pond anymore, I was near the bottom of the heap. first year I did ok, but by the end of the second I was irrecoverably lost.

my advice is to figure out what you want to get out of it. sure, maybe you need a degree, but that's a really big space. most of it seems like a pointless sysiphysian exercise. but there are some really great teachers and peers in there, and a lifelong passion if you can find it.

Re: The Bipolar Lisp Programmer (2007)

#89
I remember this chestnut from back in the day. Sounds like a discipline issue. If Lisp really is the programming language that appeals to people with discipline issues, then were I a hiring manager a fondness for Lisp would be a no hire.

Re: The Bipolar Lisp Programmer (2007)

#90
post #71
post #37

Earlier quoted context omitted.

Imagine this: You start a fresh REPL session with a vague idea of something you want to build. You have good tooling that enables you to write code in your favourite editor and pipe it to the REPL through a socket. You write a couple of functions and send them to the REPL. You call them a few times with some test arguments, maybe define a couple global variables while testing, and realize one of the functions doesn't…

What happens when you want to share the thing you built with somebody else? If I type a defun into a REPL, is there a good way to get source code back out again? Because there's a problem I've run into several times when writing Lisp (I use SLIME): I decide to refactor some stuff, so I rewrite some stuff, maybe remove a function or two from the source as part of that. Things seem to be working fine. I save my .lisp f…

> If I type a defun into a REPL, is there a good way to get source code back out again?

this used to be the normal way of programming in lisp repls (like in 01980) but maybe this is good enough

    * (defun tri (n) (loop for i from 1 to n summing n))
    TRI
    * (describe 'tri)
    COMMON-LISP-USER::TRI
      [symbol]

    TRI names a compiled function:
      Lambda-list: (N)
      Derived type: (FUNCTION (T) (VALUES NUMBER &OPTIONAL))
      Source form:
        (LAMBDA (N)
          (BLOCK TRI
            (LOOP FOR I FROM 1 TO N
                  SUMMING N)))
> When I go to load my code back in, I get errors, because oops I was actually still calling that deleted function somewhere -- it "worked" before because the old function was still hanging out in the image.

so a thing you can do in that case is to delete it from the image at the same time

well, you can't really delete it from the image, but you can remove the function binding of the symbol, and since normally in common lisp implementations function calls indirect through the symbol (which is why you can replace the definition with a newer one) deleting the function binding is enough

    * (defun tri0 (n) (tri (1+ n)))
    TRI0
    * (tri0 4)
    25
    * (tri0 5)
    36
    * (fmakunbound 'tri)
    TRI
    * (tri0 5)

    debugger invoked on a UNDEFINED-FUNCTION @52A00674 in thread
    #:
      The function COMMON-LISP-USER::TRI is undefined.

    Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

    restarts (invokable by number or by possibly-abbreviated name):
      0: [CONTINUE      ] Retry calling TRI.
      1: [USE-VALUE     ] Call specified function.
      2: [RETURN-VALUE  ] Return specified values.
      3: [RETURN-NOTHING] Return zero values.
      4: [ABORT         ] Exit debugger, returning to top level.

    ("undefined function" 6)
    0] 
as rainer pointed out, slime has a command for this (i barely use cl myself, you know much more than i do)
Post reply on HN