Doing battle with a sudden onset of depression, apparently. Thanks, brain chemistry. Ah well, back to the basics then: Eat right, sleep well, exercise. It’s a familiar bout by now.
Good plan! Take time to enjoy the sunlight if possible, especially when the sun rises/goes down: in my experience it is a good way to be in a good mood in the morning and calm in the evening, and it helps regulate your sleep.
I’m working on my alternative frontend for Medium called Scribe and would love some people to kick the tires. Specifically looking to see if you run into anything that feels broken or missing.
Still aboard a friend’s yacht waiting to deliver her up north next week, so the weekend will be doing jobs and maintenance ahead of that. Possibly explore Falmouth some more, so far have found two decent pubs.
Trying to wrap my head around Lisp macros. I have long had a misconception that that Lisp-2s existed as a weird compromise to allow macros to still be fairly useful in the face of lexical scoping. But I have recently seen evidence that, in fact, the opposite is true, and it is much easier to write correctly behaved macros in a Lisp-1.
I am not a Lisp person, so I’m coming at this pretty blind. I’ve been reading papers about the history of Lisp, and trying to understand where my misconception came from. So far I’ve seen this claim repeated in a few places, but nowhere that includes an example of the “right” way to reconcile lexical scope and quasiquoting. So I have a lot more reading to do…
This really doesn’t have anything to do with Lisp-1 vs Lisp 2 so much as it has to do with hygienic vs non-hygienic macros. Your misconception might stem from the fact that the most common Lisp 2 also has a non-hygienic macro system and the most common Lisp-1 (Scheme) tends to have hygienic macro systems. I think the idea that Lisp-2 makes it “easier” to deal with non-hygienic macros probably has to do with the fact that if you separate the function environment from the regular variable environment, then it is often the case that the function environment is much simpler than the variable environments. Typical programs don’t introduce a lot of function bindings except at top or package level.
This is a very reasonable assumption, but in this case I was only thinking about “classic” quasiquote-style macros, and how they differ in Lisp-1s and Lisp-2s.
I think the idea that Lisp-2 makes it “easier” to deal with non-hygienic macros probably has to do with the fact that if you separate the function environment from the regular variable environment, then it is often the case that the function environment is much simpler than the variable environments.
Yeah, that matches my prior assumption. I was very surprised when I learned how a modern Lisp-1 with quasiquote handles the function capture problem – far more elegantly than the separate function namespace. Then I learned that Common Lisp can do the same thing (in a much more ugly way), and I was very surprised that it is not just the canonical way to deal with unhygienic macros. Now it seems like more of a historical accident that Lisp-2 are considered (by some people) “better” for writing unhygienic macros than Lisp-1s.
I’m probably not explaining this well. I ended up writing a blog post about my findings that is very long, but does a better job of explaining my misunderstanding.
Yep! I’m using Common Lisp as my prototypical Lisp-2 as I try to work through and understand this.
The thing I’m having trouble with is that if you want to call a function in a macro expansion, you have to do the whole funcall unquote sharp quote dance, or risk the function being looked up in the calling code’s scope. It seems CL tried to make this less necessary by saying there are certain functions you cannot shadow or redefine, so you only actually have to do this with user-defined functions, but that seems like such a big hack that I must be missing something.
Its the same thing with variables. Common Lisp macros just don’t know anything about lexical scope. In fact, arguably, they don’t even operate on code at all. They operate on the union of the set of numbers, symbols, strings and lists of the other things. Code denotes something, but without knowledge of the lexical context, the things CL macros transform cannot even come close to being “code”.
This is why I like Scheme macros so much. They operate on a “dressed” representation of the code which includes syntactic information like scoping, as well is useful information like line number of denotation, etc. By default they do the right thing and most schemes support syntax-case, which allows you to have an escape hatch as well. I also personally find syntax-case macros easier to understand.
Countdown to an awesome vacation. We leave tommorow and I will be watching waves from the Atlantic Ocean hit the beach for a much needed break!
More schoolwork to finish up while I’m on vacation sadly, and lots of leisurely time with my wife and our best friends, along with playing some ham radio and whatever else suits my fancy…. I’m sure the priorities will change daily!
Setting up two Cron jobs on my “NAS” (a refurbished ProLiant DL320): a daily RAID health check that notifies via SNS, and a daily backup to S3 Glacier
Continuing to learn Golang and Plan 9 (especially Acme) as I write a polling based notifier for fsnotify on that OS
Teaching my kids to solder
Helping them build a Cyberdeck with kid friendly tools (Dremel, hot glue gun, hacksaw, hand drill, that sort of thing). I’ll be amazed if the parts all survive (old Pi 1B, LCD screen, USB hub, etc.)
Finished my first week of my new job! Super exciting, met a ton of great people and looking forward on-boarding my team with hands-on work! 🚀This weekend I’ll try to sleep a bit :)
I plan to learn llvm-objcopy so that I can fix issues stemming from it. HardenedBSD switched to a more complete set of the llvm compiler toolchain tools, including llvm-objcopy installed as strip. It seems llvm-objcopy is a bit less forgiving in weird situations than elftoolchain’s strip. This causes perl 5.32 to fail to build. That one failure causes the package build process to skip building pretty much all the other 20,000 packages.
I have been reading a lot of technical and management books lately. Today I forgot my Kindle in the office so for the first weekend in almost two years I will not be reading, at least. Which is a shame; I was looking forward to the next book in Gerald Weinberg’s quality software management series, and the next chapter of the Oxford Handbook of Expertise.
On the other hand, this particular weekend I expect to be busy with other things anyway (board games with friends, my turn to clean at my son’s daycare, etc), so maybe this was the best weekend for it to happen.
It’s Thanksgiving weekend up here in Canada. I’m going to head back home (Calgary) and see my parents. Unfortunately, I’ve also got a bit of work… work to do while I’m home. Hoping to take some time on early Saturday morning and burn through it.
Doing battle with a sudden onset of depression, apparently. Thanks, brain chemistry. Ah well, back to the basics then: Eat right, sleep well, exercise. It’s a familiar bout by now.
Good plan! Take time to enjoy the sunlight if possible, especially when the sun rises/goes down: in my experience it is a good way to be in a good mood in the morning and calm in the evening, and it helps regulate your sleep.
Wish you a good recovery !
I’m working on my alternative frontend for Medium called Scribe and would love some people to kick the tires. Specifically looking to see if you run into anything that feels broken or missing.
Looks cool! One idea: replace internal links to medium with their scribe equivalent.
Yeah, good idea. Why didn’t I think of that 😆
I need this in my life. I will try it when I hit the Medium brick wall.
Still aboard a friend’s yacht waiting to deliver her up north next week, so the weekend will be doing jobs and maintenance ahead of that. Possibly explore Falmouth some more, so far have found two decent pubs.
Trying to wrap my head around Lisp macros. I have long had a misconception that that Lisp-2s existed as a weird compromise to allow macros to still be fairly useful in the face of lexical scoping. But I have recently seen evidence that, in fact, the opposite is true, and it is much easier to write correctly behaved macros in a Lisp-1.
I am not a Lisp person, so I’m coming at this pretty blind. I’ve been reading papers about the history of Lisp, and trying to understand where my misconception came from. So far I’ve seen this claim repeated in a few places, but nowhere that includes an example of the “right” way to reconcile lexical scope and quasiquoting. So I have a lot more reading to do…
This really doesn’t have anything to do with Lisp-1 vs Lisp 2 so much as it has to do with hygienic vs non-hygienic macros. Your misconception might stem from the fact that the most common Lisp 2 also has a non-hygienic macro system and the most common Lisp-1 (Scheme) tends to have hygienic macro systems. I think the idea that Lisp-2 makes it “easier” to deal with non-hygienic macros probably has to do with the fact that if you separate the function environment from the regular variable environment, then it is often the case that the function environment is much simpler than the variable environments. Typical programs don’t introduce a lot of function bindings except at top or package level.
This is a very reasonable assumption, but in this case I was only thinking about “classic” quasiquote-style macros, and how they differ in Lisp-1s and Lisp-2s.
Yeah, that matches my prior assumption. I was very surprised when I learned how a modern Lisp-1 with quasiquote handles the function capture problem – far more elegantly than the separate function namespace. Then I learned that Common Lisp can do the same thing (in a much more ugly way), and I was very surprised that it is not just the canonical way to deal with unhygienic macros. Now it seems like more of a historical accident that Lisp-2 are considered (by some people) “better” for writing unhygienic macros than Lisp-1s.
I’m probably not explaining this well. I ended up writing a blog post about my findings that is very long, but does a better job of explaining my misunderstanding.
https://ianthehenry.com/posts/janet-game/the-problem-with-macros/
Have you had a look at Common Lisp yet? I’m learning macros there and it seems straight forward.
Yep! I’m using Common Lisp as my prototypical Lisp-2 as I try to work through and understand this.
The thing I’m having trouble with is that if you want to call a function in a macro expansion, you have to do the whole funcall unquote sharp quote dance, or risk the function being looked up in the calling code’s scope. It seems CL tried to make this less necessary by saying there are certain functions you cannot shadow or redefine, so you only actually have to do this with user-defined functions, but that seems like such a big hack that I must be missing something.
Its the same thing with variables. Common Lisp macros just don’t know anything about lexical scope. In fact, arguably, they don’t even operate on code at all. They operate on the union of the set of numbers, symbols, strings and lists of the other things. Code denotes something, but without knowledge of the lexical context, the things CL macros transform cannot even come close to being “code”.
This is why I like Scheme macros so much. They operate on a “dressed” representation of the code which includes syntactic information like scoping, as well is useful information like line number of denotation, etc. By default they do the right thing and most schemes support syntax-case, which allows you to have an escape hatch as well. I also personally find syntax-case macros easier to understand.
Yeah, I really hate that approach
This has been a horrible week work wise, so I’ll be just chilling, playing Go and practicing the shakuhachi.
Metroid Dread and maybe writing a blogpost about my experience with shorthand.
Oh, damn! I didn’t know that it dropped. That’s kind of exciting.
Can’t wait to play Dread myself (even if, technically, I plan to wait until after my weekend trip).
It feels like Super Metroid in the best ways.
Countdown to an awesome vacation. We leave tommorow and I will be watching waves from the Atlantic Ocean hit the beach for a much needed break!
More schoolwork to finish up while I’m on vacation sadly, and lots of leisurely time with my wife and our best friends, along with playing some ham radio and whatever else suits my fancy…. I’m sure the priorities will change daily!
Finished my first week of my new job! Super exciting, met a ton of great people and looking forward on-boarding my team with hands-on work! 🚀This weekend I’ll try to sleep a bit :)
Just published Command line text processing with GNU Coreutils, so I’m going to relax this weekend (might stay away from book writing for the rest of the month).
I’ve enjoyed reading slice-of-life fantasy novels like The Wizard’s Butler recently, so I’d be looking for more such books to read.
Looks like a pretty good weekend read, good job; I could use a coreutils refresher for sure.
Thanks. And yeah, this works as a reference for me as well :)
Camping! And to keep contributing to Looptober.
I plan to learn llvm-objcopy so that I can fix issues stemming from it. HardenedBSD switched to a more complete set of the llvm compiler toolchain tools, including llvm-objcopy installed as strip. It seems llvm-objcopy is a bit less forgiving in weird situations than elftoolchain’s strip. This causes perl 5.32 to fail to build. That one failure causes the package build process to skip building pretty much all the other 20,000 packages.
I have been reading a lot of technical and management books lately. Today I forgot my Kindle in the office so for the first weekend in almost two years I will not be reading, at least. Which is a shame; I was looking forward to the next book in Gerald Weinberg’s quality software management series, and the next chapter of the Oxford Handbook of Expertise.
On the other hand, this particular weekend I expect to be busy with other things anyway (board games with friends, my turn to clean at my son’s daycare, etc), so maybe this was the best weekend for it to happen.
It’s Thanksgiving weekend up here in Canada. I’m going to head back home (Calgary) and see my parents. Unfortunately, I’ve also got a bit of work… work to do while I’m home. Hoping to take some time on early Saturday morning and burn through it.
Concert with two Danish bands; The Awesome Welles and Kellermensch and putting up lamps Saturday, and go karts on Sunday.
I’m trying to put SQLite onto Hypercore. Pray for me, please, because I know little about the internals about either.
Long weekend, removing carpet in a bedroom to install hardwood floors and fixing a few things in between.
I’m trying to get polynomial commitments solidified in my head
Trying to keep up with school assignments and also fiddling with my own (proof-of-stake) blockchain in Go!
Might finally be giving Fusion360 a try. Found out it has an API, and I’ll finally be needing something to go from design to machined part.
Might also start playing around with PXEboot w/ RPis.