Hacker Newsnew | past | comments | ask | show | jobs | submit | acdw's commentslogin

In CL and Scheme, it's (let ((var1 val) (var2 val)) body...). So parentheses are used for grouping and function/macro application. In Clojure, parens are just used for application, so you have e.g. (let [var1 val var2 val] body...), or (defn foo [x] ..) or (cond testa 1 testb 2 ...).

It takes some getting used to, and I do wish Clojure would do something more like (let [[var1 val] [var2 val]] ... .. though of course then you'd have to figure something else out for destructuring.


I have heard of Smalltalk and it is intriguing but honestly I don't even know how to get started with it lol


It's ok because I'm a hobbyist programmer!


I use Emacs's built-in structural editing bindings, which doesn't have the auto-move-past any kind of paren/bracket thing. Maybe I could add that in.

But I was talking about like, when refactoring, I'll maybe change something from a list to a vector, and I have to change the delimiters at front and back. Or, where electric-pair does do the move-past-all-parens thing when I just spam ), it doesn't do that with ]}]}]]}}]})).


I don't recall the exact name, but I believe it's forward-up-sexp which allows you to jump forward past the next closing delimiter. Though if I'm not mistaken only the backwards one has a default binding.


I see.

Have you ever tried paredit? It’s pretty much a lifesaver for this kind of thing.


This is very much what I meant in the post (hi, I'm the author :P)! CL has maps, but they're a pain to use - not just because of the syntax, but because of the relative dearth of standard library functions to work with them compared to say, lists or even vectors.


Oh I've written an SSG in multiple variations of lisp, as well as sh, make, and most other languages I toy around with. It's been a good "kick the tires" project but I think I need a new one.


HAHAHAH Hell yeah that's praxis baby die mad about it


> What works best for me is no modal editing at all.

I used vim for 8 years and after switching to Emacs, realized that I'm the same. I was spending way more time (in vim) thinking about (to borrow another commenter's metaphor) how I was going to play the notes than what notes I was going to write.


funny, 20 years of vim/evil here and I feel like I never really think about the motions anymore, except maybe when building a macro


I’m in the same boat. I’ve internalized Vim keybindings so much that there’s no friction between thinking and doing on the screen. If I want to place the cursor on the next line, move to the end and add a semicolon, then jump to the end of the file, I just do it. My pet theory is that because Vim keybindings are unintuitive, developing proficiency required building muscle memory, which offloads cognitive load from my brain to my fingers so text editing becomes mechanical rather than cognitive.


I’m the opposite. Emacs never really stick for me, after 3 tries I gave up. Vim is the way.


could you share the code for that? thinking I could set up a fail2ban rule for these ips


its a pathetic piece of php code:

  $db=...
  $sth=$db->prepare("INSERT INTO beacon (time, addr, query, agent, referer) VALUES (FROM_UNIXTIME(?), ?, ?, ?, ?)");
  $sth->execute([
    $_SERVER["REQUEST_TIME"],
    $_SERVER["REMOTE_ADDR"],
    $_SERVER["QUERY_STRING"],
    isset($_SERVER["HTTP_USER_AGENT"])?$_SERVER["HTTP_USER_AGENT"]:NULL,
    isset($_SERVER["HTTP_REFERER"])?$_SERVER["HTTP_REFERER"]:NULL
  ]);


Pathetic? Looks nice and straightforward to me!


seriously, study after study shows that just giving people money is the most effective form of altruism. just give it away. go to your city's homeless shelter and give money away. write a check for your local school board. keep everything anonymous. give it all away.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: