All Comments

Jas commented on From Finite Integral Domains to Finite Fields:

This was a great read! The explanation of why every finite integral domain is a field was clear and insightful. It's fascinating how the absence of zero divisors and the finiteness of the set combine to ensure that every non-zero element has a multiplicative inverse. Thanks for breaking it down so well.

30 May 2025 09:46 GMT | #482 of 482 comments | View original comment

Kees Serier commented on Guestbook:

Hi Susam,

I tried to figure out how to compile a Lisp program using SBCL and finally found the answer on your website.

Thank you very much!
Keiss

21 May 2025 19:32 GMT | #481 of 482 comments | View original comment

GoldenGuy1000 commented on Elliptical Python Programming:

And I really thought appending strings together and calling exec was the proper way to write code.

I didn't even know you could write integers with Python. I'll start applying these principles in my code post-haste.

11 Apr 2025 16:38 GMT | #480 of 482 comments | View original comment

Mike commented on Programming With DOS Debugger:

Nice article!

10 Apr 2025 21:31 GMT | #479 of 482 comments | View original comment

Gizmore commented on Hacker News Hug of Deaf:

0xBEEB

10 Apr 2025 14:36 GMT | #478 of 482 comments | View original comment

Ritvik commented on Shell Eval:

This was simple and cool. Probably would have experienced this myself but never tried to think it through like this.

10 Apr 2025 12:13 GMT | #477 of 482 comments | View original comment

Jeff Rivett commented on More Contrast, Please:

Thanks for posting this. It sometimes feels like every web developer on the planet is all-in on dark themes, so it's great to see someone doing this kind of analysis. For the record, I've yet to see a dark theme that I can view for more than about 60 seconds before my vision becomes blurry (see boot13.com/firefox/dark-mode-rant/). I encourage developers to provide light theme options, but I also use tools like Tranquility when that's not available.

07 Apr 2025 12:11 GMT | #476 of 482 comments | View original comment

Susam Pal commented on The IndieWeb Doesn't Need to "Take Off":

Hello Matej! This website is primarily written in plain HTML. I also have a little Common Lisp program to add common headers and footers to the pages, generate tag pages, publish web feeds, etc. See github.com/susam/susam.net for the source code.

05 Apr 2025 15:45 GMT | #475 of 482 comments | View original comment

Susam Pal commented on The IndieWeb Doesn't Need to "Take Off":

Thank you, AquariusDue, for your kind words. Unfortunately, I've not had the time to look into the which-key contribution yet. I definitely plan to look into it, but it may take some time. I've been juggling other responsibilities lately, so I'm currently taking a break from open-source maintenance activities. When I can spare the time again, I will focus on reviewing the open PRs PRs for devil-mode.

05 Apr 2025 15:39 GMT | #474 of 482 comments | View original comment

Susam Pal commented on MathB.in Is Shutting Down:

Hi Alexander! The complete set of posts has been archived by the Archive Team.

05 Apr 2025 14:57 GMT | #473 of 482 comments | View original comment

Jim commented on Comfort of Bloated Web:

Speed test!

21 Mar 2025 16:53 GMT | #472 of 482 comments | View original comment

Matej commented on The IndieWeb Doesn't Need to "Take Off":

Yes I agree. Anyway, love the website! What is it made in?

21 Mar 2025 14:48 GMT | #471 of 482 comments | View original comment

AquariusDue commented on The IndieWeb Doesn't Need to "Take Off":

I totally resonate with the sentiment. Nowadays it seems that more people than before are afraid to get into something new for the joy of it unless there's already a broad appeal. Personally I attribute it to a weird kind of "fear of missing out" in which the individual prefers to not commit because of opportunity cost. What if something cooler comes along and what I'm already invested in doesn't catch on? Better do nothing then.

All this basically boils down to mixing external validation with inner joy, I guess?

Off-topic: Thank you for Devil and Emfy. They're great! Emfy really demystified Emacs config the second time I got around to learning Emacs.

And also pretty please with a cherry on top when you have some time to spare will you take a look at the pull request for which-key integration in devil-mode? I apologize in advance for pestering you with this. Also I'm not the author of that pull request just to be clear.

Love your stuff! <3

21 Mar 2025 14:04 GMT | #470 of 482 comments | View original comment

Gliches commented on The IndieWeb Doesn't Need to "Take Off":

Glad to see such communities are still thriving.

21 Mar 2025 11:40 GMT | #469 of 482 comments | View original comment

Alexander Artemenko commented on MathB.in Is Shutting Down:

It would be fair to publish a cast of the database so that content creators can republish their pastes somewhere else.

17 Mar 2025 04:28 GMT | #468 of 482 comments | View original comment

Juan M. Bello-Rivas commented on MathB.in Is Shutting Down:

Thank you. MathB.in was a useful service.

16 Mar 2025 03:09 GMT | #467 of 482 comments | View original comment

Ian Wang commented on MathB.in Is Shutting Down:

Thanks a lot for everything you have done.

13 Mar 2025 16:11 GMT | #466 of 482 comments | View original comment

Miles Baillie commented on MathB.in Is Shutting Down:

Hello, I am a casual user of MathB.in. I must have been using it for over 5 years, and it's been a very useful tool. It's basically the place where I developed my ability to write in LaTeX. So I appreciate you maintaining it up to now, and I understand your reasons for stopping. Best wishes!

28 Feb 2025 09:17 GMT | #465 of 482 comments | View original comment

nixCraft commented on MathB.in Is Shutting Down:

I'm sorry to hear that. The independent web is gradually declining, becoming increasingly controlled by bit tech companies. The original vision and spirit of the independent web are fading away due to many reasons, which is disheartening. Thank you for all your hard work.

27 Feb 2025 17:00 GMT | #464 of 482 comments | View original comment

Skandix commented on MathB.in Is Shutting Down:

It feels a bit sentimental to see it shutting down, but it was a great help for me to easily get help from friends when I was doing my bachelor degree in engineering. But the conclusion for it shutting down is understandable.

27 Feb 2025 00:07 GMT | #463 of 482 comments | View original comment

Lattice commented on MathB.in Is Shutting Down:

Thank you very much for MathB.in. It was immensely helpful while it lasted. Good luck in your future endeavors.

26 Feb 2025 20:52 GMT | #462 of 482 comments | View original comment

Cage commented on MathB.in Is Shutting Down:

Thanks for the efforts you had put in this project!

26 Feb 2025 13:13 GMT | #461 of 482 comments | View original comment

Roger Sen commented on MathB.in Is Shutting Down:

Thanks for everything!

25 Feb 2025 20:52 GMT | #460 of 482 comments | View original comment

Analemma commented on MathB.in Is Shutting Down:

In my maths circle, we used it frequently for quickly brainstorming problems and sharing it among each other often on stream as a lightweight solution. Glad it is open source for future use for private instances. Thank you for the service.

24 Feb 2025 14:30 GMT | #459 of 482 comments | View original comment

John commented on Programming With DOS Debugger:

Excellent article! Very informative.

08 Aug 2024 09:19 GMT | #458 of 482 comments | View original comment

Robert (rsw) commented on Emacs Info Expressions:

Just load the Hyperbole package and remove the space between the manual and node name.

Then in any Emacs buffer you can add "(manual)node" in double quotes, press M-RET with point on that string and display the associated node. This works for Info index entries as well. Keep it simple.

17 Apr 2024 18:54 GMT | #457 of 482 comments | View original comment

Susam Pal commented on Emacs Info Expressions:

Thank you, Karthink, Joost, and Mekeor for the comments! Indeed, with the zero prefix argument, the c key copies the complete info expression! I have added a new section to the post to include this, with credits to you.

14 Apr 2024 19:02 GMT | #456 of 482 comments | View original comment

Mekeor Melire commented on Emacs Info Expressions:

Do you know about the zero-prefix for c (or equally w) in Info-mode? It puts the info s-expression into the kill ring, e.g., personally I always type: C-0 w.

14 Apr 2024 15:05 GMT | #455 of 482 comments | View original comment

Joost commented on Emacs Info Expressions:

There's an easier way: In an info buffer, type M-0 c instead of just c, and Emacs will put the info node's name inside a call to info (i.e., you get (info "(dir) Top") in the kill ring.)

14 Apr 2024 08:46 GMT | #454 of 482 comments | View original comment

Karthink commented on Emacs Info Expressions:

You can use a prefix arg of 0 in the info node — C-0 c or C-u 0 c — to copy the full info expression, i.e., (info "(emacs) Branches") instead of "(emacs) Branches".

13 Apr 2024 22:44 GMT | #453 of 482 comments | View original comment

Aweso commented on Lisp in Vim:

Still the best article on setting up Vim with lisp in 2024. Great resource!

25 Feb 2024 04:04 GMT | #452 of 482 comments | View original comment

Cassepipe commented on Lisp in Vim:

I love the level of details of this write-up.

It assumes nothing and tries really hard to avoid you any papercuts. I wish I had found when I tried to learn Lisp. Between learning the language and all the papercuts I just gave up like I did for so many other niche things that caught my interest.

24 Feb 2024 16:34 GMT | #451 of 482 comments | View original comment

M463 commented on Quicksort with Jenkins for Fun and No Profit:

This is like a flower sprouting out of the ground of an abandoned factory.

25 Jan 2024 23:22 GMT | #450 of 482 comments | View original comment

Ch33zer commented on Quicksort with Jenkins for Fun and No Profit:

Chris, Becoming an expert on jenkins then selling your services as a 'jenkins consultant'.

25 Jan 2024 21:44 GMT | #449 of 482 comments | View original comment

Chris Hare commented on Quicksort with Jenkins for Fun and No Profit:

Anyone know of a version that is no fun and many profit? Asking for a friend.

25 Jan 2024 21:41 GMT | #448 of 482 comments | View original comment

Scruple commented on Quicksort with Jenkins for Fun and No Profit:

I maintain worse Jenkins pipelines than this. Reminds me, I need to restock some whiskey.

25 Jan 2024 20:16 GMT | #447 of 482 comments | View original comment

Max commented on Quicksort with Jenkins for Fun and No Profit:

Awesome! I have seen worse Jenkins pipelines than this.

25 Jan 2024 17:12 GMT | #446 of 482 comments | View original comment

Junnp commented on Quicksort with Jenkins for Fun and No Profit:

This post has awakened ancient pagan demons. Only purification by fire can save us now. Please shut down all of your Jenkins machines before it is too late.

25 Jan 2024 17:11 GMT | #445 of 482 comments | View original comment

Pedroth commented on 0.999...:

Great explanation! Thanks!

12 Jan 2024 22:42 GMT | #444 of 482 comments | View original comment

Susam Pal commented on Loopy C Puzzle:

John, You are absolutely right. Thank you for taking a close look at this post and reporting the off-by-one error in my explanation. I have updated the post now to correct it.

12 Jan 2024 21:38 GMT | #443 of 482 comments | View original comment

Phil commented on Elisp in Replacement String:

A nice intro to a very useful feature.

For more examples and tricks you can do with it, I recommend also reading www.masteringemacs.org/article/evaluating-lisp-forms-regular-expressions.

11 Jan 2024 10:58 GMT | #442 of 482 comments | View original comment

John Tromp commented on Loopy C Puzzle:

The value in variable i decrements to INT_MIN after |INT_MIN| + 1 iterations.

No; i decrements to INT_MIN after |INT_MIN| iterations. For example, if i were a signed 1-bit integer, making INT_MIN equal to -1, than i becomes -1 upon executing --i after the first iteration.

Of course, you're correct that |INT_MIN| + 1 dots are output, due to the extra (and final) iteration starting with i = INT_MIN.

22 Dec 2023 11:46 GMT | #441 of 482 comments | View original comment

Dash commented on Import Readline:

Never heard of rlwrap before. Neat!

09 Aug 2023 22:51 GMT | #440 of 482 comments | View original comment

Joseph Carragher commented on Comfort of Bloated Web:

I wonder how fast this is?

03 Aug 2023 18:54 GMT | #439 of 482 comments | View original comment

Susam Pal commented on Langford Pairing:

Thank you, Ikiatl and Presh, for your comments. The formula for \( c \) indeed had a typo. Although I wrote the correct values for \( c \) obtained from the formula \( c = 4x - 1 \) in the examples, the formula itself was written incorrectly as \( c = 4x - 3. \) I have corrected this to \( c = 4x - 1 \) now. Also, thank you both for your kind words about this post!

12 Jun 2023 07:18 GMT | #438 of 482 comments | View original comment

Presh commented on Langford Pairing:

Wonderful post! I am preparing a video on Langford pairings and your proof was incredibly helpful and written in great detail. Many articles come to the necessary condition and just assume sufficiency which is wrong. Yours is the only article that proves both the necessity and the sufficiency of the condition. The construction of the sequence in your post is wonderful.

By the way, I believe there is a small typo in the formula for \( c. \) It should be \( c = 4x - 1. \)

I found another blog post that references your post: https://vamshij.com/blog/linear-optimization/langford-problem/.

05 Jun 2023 22:45 GMT | #437 of 482 comments | View original comment

Ikiatl commented on Langford Pairing:

I loved your blog post. It is the only convincing explanation and the best explanation that I could find on the web. Found a small error in the proof of sufficiency. I think the value of \( c \) should be \( 4x - 1 \) and not \( 4x - 3. \) Great blog post though!

If I write a blog post about this topic in the near future, I would definitely add a link to your post. Really great work!

18 May 2023 19:11 GMT | #436 of 482 comments | View original comment

Richard Green commented on Comfort of Bloated Web:

It's fast!

10 May 2023 02:31 GMT | #435 of 482 comments | View original comment

Richard Green commented on Comfort of Bloated Web:

Enjoyed the article. Now I want to test the comment speed! :D

10 May 2023 02:30 GMT | #434 of 482 comments | View original comment

Orev commented on From XON/XOFF to Forward Incremental Search:

This is a great explanation, especially the part describing how control codes are mapped to their corresponding letters. I always felt there was probably some logic to it, but the idea never fully materialized into something I thought to investigate. Learning about how to disable XON/OFF is more like a bonus.

08 May 2023 00:34 GMT | #433 of 482 comments | View original comment

Susam Pal commented on Building Common Lisp Executables:

Thank you, Héctor, for your comment! I updated the example program in this post as follows to test the compression feature:

(defun main ()
  (format t "hello, world~%"))
(sb-ext:save-lisp-and-die "hello" :executable t :compression t :toplevel #'main)

Indeed this created an executable that was only 8.1 MB in size whereas without compression the executable size is 35 MB.

10 Apr 2023 07:23 GMT | #432 of 482 comments | View original comment

Héctor commented on Building Common Lisp Executables:

You can greatly reduce the executable size when compiling with SBCL by adding

:compression t

to the following:

(sb-ext:save-lisp-and-die "hello" :executable t :toplevel #'main)
09 Apr 2023 04:59 GMT | #431 of 482 comments | View original comment

whoibrar commented on Temperature Conversion:

I really love the design of the site and the well written post.

31 Mar 2023 18:04 GMT | #430 of 482 comments | View original comment

Rlmoe commented on ChatGPT Explains Some Jokes:

This is one of the funniest analyses I've read in a long time!

23 Jan 2023 18:09 GMT | #429 of 482 comments | View original comment

KDK commented on From XON/XOFF to Forward Incremental Search:

This was a very interesting read! I have personally solved this by using fuzzy finder, which gives a menu/search box with a selection instead of the simplistic string matching of ctrl+r.

If you are a heavy terminal user, I would recommend looking into https://wiki.archlinux.org/title/fzf. I see the built-in search being especially useful on remote/shared machines, where you do not necessarily want to install stuff.

The XON/XOFF feature actually seems quite useful for terminals without scrollback. Or for when you don't have a mouse. Hopefully I'll remember it. Thank you very much for your article!

14 Jan 2023 23:30 GMT | #428 of 482 comments | View original comment

Charles commented on ChatGPT Explains Some Jokes:

This comment creates a humorous and absurd resolution to the setup of the post.

17 Dec 2022 20:02 GMT | #427 of 482 comments | View original comment

Susam Pal commented on Editing Binaries in DOS:

RickyB,

Here is an example DEBUG session from a Windows 98 system that contains the minor modifications to obtain the results demonstrated in this blog post:

C:\>DEBUG C:\WINDOWS\COMMAND\MODE.COM
-S 0 FFFF 'Invalid parameter'
1391:6B58
-D 6B50 6B6F
1391:6B50  65 6E 20 25 31 0D 0A 11-49 6E 76 61 6C 69 64 20   en %1...Invalid
1391:6B60  70 61 72 61 6D 65 74 65-72 20 0D 0A 49 6E 76 61   parameter ..Inva
-E 6B57 10 'No soup for you!'
-D 6B50 6B6F
1391:6B50  65 6E 20 25 31 0D 0A 10-4E 6F 20 73 6F 75 70 20   en %1...No soup
1391:6B60  66 6F 72 20 79 6F 75 21-72 20 0D 0A 49 6E 76 61   for you!r ..Inva
-U 0100 0105
1391:0100 E9482B        JMP     2C4B
1391:0103 80FC04        CMP     AH,04
-D 330 36F
117C:0330  40 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   @...............
117C:0340  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
117C:0350  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
117C:0360  00 00 00 00 00 FF 00 00-00 00 00 00 00 00 00 00   ................
-A
1391:0100 JMP 340
1391:0103
-A 340
1391:0340 MOV AH, 9
1391:0342 MOV DX, 34A
1391:0345 INT 21
1391:0347 JMP 2C4B
1391:034A DB 'Welcome to Soup Kitchen!', D, A, '$'
1391:0365
-N SOUP.COM
-W
Writing 07257 bytes
-Q

C:\>SOUP 0
Welcome to Soup Kitchen!

No soup for you! - 0
C:\>

I hope that helps!

26 Nov 2022 04:08 GMT | #426 of 482 comments | View original comment

RickyB commented on Editing Binaries in DOS:

What are the "minor modifications" needed to work on Windows 98?

25 Nov 2022 01:16 GMT | #425 of 482 comments | View original comment

Beau commented on Web Golden:

The nostalgia is well-placed!

I think old technologies never really die out, but rather shift from popular use to niche use, and often get more interesting during the transition. The pain points of the new and old systems become directly comparable and opting in to the old (or parts of it) becomes deliberate. This site, for example, is handcrafted on purpose, rather than out of necessity (as it would have been on early GeoCities), but still has a GitHub.io mirror - the old and the new live congenially together.

And I love it. Thanks for all the joy.

15 Nov 2022 20:27 GMT | #424 of 482 comments | View original comment

Evo commented on Comfort of Bloated Web:

Keep up the lean web, mate. Simple is always better.

I like your writing style.

06 Nov 2022 05:41 GMT | #423 of 482 comments | View original comment

Googlryas commented on WinPopup:

Vyrotek,

Similar story. I was in the 10th grade, and we had a teacher who, in study hall, would make us all watch a projector of her monitor just reading awful PowerPoint slides about whatever topic she was interested in. I wanted to do my homework in that period since I never did homework at home, but she wouldn't allow it. Other people wanted to quietly socialize but could not. Everyone hated it.

So on one of the computers in the back of the room, I used Windows Task Scheduler to do something akin to net send room-6a-teacher COMPUTER MUST BE REBOOTED IMMEDIATELY every 5 minutes for the duration of the class. The teacher was not very tech savvy. She once claimed to have deleted regedit, because it looked like a Rubik's Cube and she did not want games on her computer. She never ended up figuring out why her computer messed up during our class but it let us have our study hall back as our own.

In the 12th grade I told my computer networking teacher that story and he said he knew exactly what was happening but not who did or why they did, so he did not want to stick his nose in to a study hall. He said, "I should have figured it was you". I took it as a compliment of the highest order.

04 Nov 2022 21:10 GMT | #422 of 482 comments | View original comment

Vyrotek commented on WinPopup:

When I was in high school, we abused net send and managed to blast a "all your base are belong to us" message to every PC on campus.

We suspected it even reached other schools in the district.

Good times.

04 Nov 2022 19:50 GMT | #421 of 482 comments | View original comment

Susam Pal commented on From XON/XOFF to Forward Incremental Search:

Thank you, Peter, for your comments. It took a few changes to get your Bash script to work properly in my shell. Since I do not have PROMPT_COMMAND set in my shell, the evaluation of the following prompt command

PROMPT_COMMAND="$PROMPT_COMMAND; : _IXONOFF"

was causing this error:

bash: PROMPT_COMMAND: line 0: syntax error near unexpected token `;'
bash: PROMPT_COMMAND: line 0: `; : _IXONOFF'

Here is how I modified your script to check if PROMPT_COMMAND is set before expanding it. If it is not set we use the null command : before the semicolon separator.

unset _IXON
PROMPT_COMMAND="${PROMPT_COMMAND:-:}; : _IXONOFF"
function _TRAP_DEBUG {
   if [ "$BASH_COMMAND" = ": _IXONOFF" ]; then
      stty -ixon
      _IXON=1
   elif [ "$_IXON" = "1" ]; then
      stty ixon
      unset _IXON
   fi
}
trap _TRAP_DEBUG DEBUG

To test this, we can add the above script to ~/.bashrc, then run something like ping localhost and confirm that ctrl+s pauses the output, whereas in the shell ctrl+s performs forward incremental search.

25 Sep 2022 10:52 GMT | #420 of 482 comments | View original comment

Goutham Bharadwaj commented on Lisp in Vim:

This is a great article! Thank you so much!

22 Aug 2022 16:23 GMT | #419 of 482 comments | View original comment

Peter commented on From XON/XOFF to Forward Incremental Search:

With respect to the cantrip, the below line in ~/.inputrc might be preferable, as it remaps (forward) i-search to ctrl+^ for all programs using GNU-readline.

"\C-^": forward-search-history

And if you edit ~/.inputrc, consider adding a mapping for kill-region, in my case using an en-US keymap, its esc ctrl+@, and permits to move/copy/erase character regions together with ctrl+y and ctrl+x ctrl+x.

"\e\C-@": kill-region

'nough said,
Peter

14 Aug 2022 17:03 GMT | #418 of 482 comments | View original comment

Peter commented on From XON/XOFF to Forward Incremental Search:

# bash: a small cantrip to disable ixon before readline and
# turning it on again afterwards during command execution
# (assuming trap DEBUG not in use)
#
# inspired by and to extend the article on ixon on
# susam.net/blog/from-xon-xoff-to-forward-incremental-search.html

unset _IXON
# before readline, issue stty -ixon to permit use of ^s for
# incremental search, then reenable it for the next command
PROMPT_COMMAND="$PROMPT_COMMAND; : _IXONOFF"
function _TRAP_DEBUG {
   if [ "$BASH_COMMAND" = ": _IXONOFF" ]; then
      # about to enter readline, thus turn off ixon
      stty -ixon
      # and reenable it for the command from readline
      _IXON=1
   elif [ "$_IXON" = "1" ]; then
      # readline finished, we are about to run its input as command
      stty ixon
      unset _IXON
   fi
}
trap _TRAP_DEBUG DEBUG

echo "test it by ^s/^q the output during the run of the next command"
echo "(use ^c to end)"
find / -xdev 2>/dev/null

echo test ^s incremental search during readline:
: ...

: enjoy,
: Peter
14 Aug 2022 16:47 GMT | #417 of 482 comments | View original comment

Loomx commented on From XON/XOFF to Forward Incremental Search:

As an alternative, use ctrl+f for "forward-inc-search"; it's easier to remember (mnemonic) and means you can still use ctrl+s or ctrl+q for flow control as normal. For example, in Bash:

bind '"\C-f": forward-search-history'
14 Aug 2022 07:33 GMT | #416 of 482 comments | View original comment

Bader commented on Comfort of Bloated Web:

Thank you for this insightful essay!

13 Apr 2022 01:46 GMT | #415 of 482 comments | View original comment

Anonymous commented on Comfort of Bloated Web:

Can you please write a tutorial on how you made this website from beginning to end? I know the code is available but a tutorial with explanations would be useful. Students can learn from it. Your website is one of the best coded websites I have ever come across. Hope you can write a how-to guide about it, maybe you could even publish it as an ebook or something. I would gladly purchase it to learn. Thank you!

07 Apr 2022 19:45 GMT | #414 of 482 comments | View original comment

Corentin commented on Comfort of Bloated Web:

Just wanted to see how fast it is! :D

26 Mar 2022 17:43 GMT | #413 of 482 comments | View original comment

Alex commented on Comfort of Bloated Web:

I am sorry but you brought it upon yourself. We all want to see how blazingly fast it is! :)

26 Mar 2022 08:08 GMT | #412 of 482 comments | View original comment

Anonymous commented on Comfort of Bloated Web:

I love minimal, well formatted websites like this! Want to make my own soon. Let us make the web a better place. Also finally some good pure website with dark mode by default!

16 Mar 2022 14:04 GMT | #411 of 482 comments | View original comment

Bert commented on Comfort of Bloated Web:

I enjoyed reading this post and wanted to see how fast the form is.

16 Mar 2022 11:43 GMT | #410 of 482 comments | View original comment

Aleth commented on Comfort of Bloated Web:

That was fast! :D

15 Mar 2022 11:20 GMT | #409 of 482 comments | View original comment

Aleth commented on Comfort of Bloated Web:

Checking the fastness. Just for fun.

15 Mar 2022 11:20 GMT | #408 of 482 comments | View original comment

David commented on Comfort of Bloated Web:

Obligatory comment test!

14 Mar 2022 16:21 GMT | #407 of 482 comments | View original comment

Max commented on Comfort of Bloated Web:

Hmm. Comments on a separate page. Interesting! :)

14 Mar 2022 07:52 GMT | #406 of 482 comments | View original comment

Person commented on Comfort of Bloated Web:

I had to test this! :)

14 Mar 2022 06:35 GMT | #405 of 482 comments | View original comment

Dan commented on Comfort of Bloated Web:

I appreciate your commitment to simplicity.

14 Mar 2022 02:08 GMT | #404 of 482 comments | View original comment

Zooo-oo-oom commented on Comfort of Bloated Web:

Well it really was fast. I like that you're sticking to your principles. We should encourage users to read output messages and show them that computers don't have to be slow despite having blisteringly powerful hardware.

13 Mar 2022 18:00 GMT | #403 of 482 comments | View original comment

Zooo-oo-oom commented on Comfort of Bloated Web:

Thanks for your article. I really enjoyed it! I, like many, am trying out your comment system.

13 Mar 2022 17:55 GMT | #402 of 482 comments | View original comment

Dusan commented on Comfort of Bloated Web:

Interesting observation, more websites should adapt such techniques, given how much more energy efficient and faster your approach is.

13 Mar 2022 17:37 GMT | #401 of 482 comments | View original comment

Anonymous commented on Comfort of Bloated Web:

I just visited your website for the first time and this motivates me to make stuff this simple (because I'm also a minimalism geek). :)

13 Mar 2022 17:02 GMT | #400 of 482 comments | View original comment

Ninad Pathak commented on Comfort of Bloated Web:

Alright, I need to try out to see! Your website is already super quick, even as I browse through it on my mobile network while traveling through some remote areas. Need to now see how quick this thing is!

13 Mar 2022 13:15 GMT | #399 of 482 comments | View original comment

Josh Doakes commented on Comfort of Bloated Web:

Wow, it is extremely fast!

Also I've recently started learning Common Lisp. It's really nice to stumble upon it organically. You invalidated my fears about CL being useful or reasonable only in large applications and it's really great seeing it in action as a static site generator and comment form provider.

13 Mar 2022 11:13 GMT | #398 of 482 comments | View original comment

Josh Doakes commented on Comfort of Bloated Web:

I too wanted to test how fast the form is. :)

13 Mar 2022 11:11 GMT | #397 of 482 comments | View original comment

KSP Atlas commented on Comfort of Bloated Web:

Nice, Common Lisp! We should really bring back Common Lisp in the world of web design.

13 Mar 2022 10:51 GMT | #396 of 482 comments | View original comment

KeithB commented on Comfort of Bloated Web:

And the improved feedback message in green above the submitted form in green tells me exactly what has happened. Best of luck with it all.

13 Mar 2022 10:48 GMT | #395 of 482 comments | View original comment

KeithB commented on Comfort of Bloated Web:

Yes, of course, I had to leave a comment to try the form.

13 Mar 2022 10:47 GMT | #394 of 482 comments | View original comment

Alexandre B. L. commented on Comfort of Bloated Web:

Great post!

13 Mar 2022 10:34 GMT | #393 of 482 comments | View original comment

Sa'ad commented on Comfort of Bloated Web:

Nice and simple, I like it.

13 Mar 2022 09:15 GMT | #392 of 482 comments | View original comment

Dan commented on Comfort of Bloated Web:

Like the others, I just want to see how fast it is. Sorry for the spam. Great article!

13 Mar 2022 09:11 GMT | #391 of 482 comments | View original comment

How Fast commented on Comfort of Bloated Web:

Quite fast apparently!

"I am surprised to see how much I have written; with stories even a page can take me hours, but the truth seems to flow out as fast as I can get it down." - Dodie Smith
13 Mar 2022 09:09 GMT | #390 of 482 comments | View original comment

How Fast commented on Comfort of Bloated Web:

How fast can it be!

13 Mar 2022 09:07 GMT | #389 of 482 comments | View original comment

Fast Commenter commented on Comfort of Bloated Web:

Is this actually that fast? The page does take a while to load here in ap-southeast-2.

13 Mar 2022 09:05 GMT | #388 of 482 comments | View original comment

Sonam commented on Comfort of Bloated Web:

Damn, this is fast!

13 Mar 2022 07:43 GMT | #387 of 482 comments | View original comment

Sonam commented on Comfort of Bloated Web:

Let's check if this is fast.

13 Mar 2022 07:43 GMT | #386 of 482 comments | View original comment

humanize commented on Comfort of Bloated Web:

Nice article and beautiful website! It's quite funny because I'm working on this kind of CSS and architecture that is somewhere between the 90s and the overbloated web we got nowadays !

Keep up the good vibe! <3

13 Mar 2022 06:55 GMT | #385 of 482 comments | View original comment

Chris Grimmett commented on Comfort of Bloated Web:

Nice! I like simple!

13 Mar 2022 05:48 GMT | #384 of 482 comments | View original comment

Deja commented on Comfort of Bloated Web:

Testing how fast comments go. Nice website!

13 Mar 2022 04:56 GMT | #383 of 482 comments | View original comment

Daniel commented on Comfort of Bloated Web:

I'm sorry for bothering you, as I know you will review this. My point is not to waste your time, but I want to see the comment working, after reading the blog post.

A common talking point among my friends is how we are trained into accepting crappy software, and the most common examples are, of course, bloated websites.

Keep up the good work, I love reading your posts! Looking forward to pressing the button. Sorry again for making you take the time to read this.

13 Mar 2022 04:34 GMT | #382 of 482 comments | View original comment

Nab commented on Comfort of Bloated Web:

UI is clean.

13 Mar 2022 04:13 GMT | #381 of 482 comments | View original comment

Stephen commented on Comfort of Bloated Web:

Could you show a different message on resubmit, informing them that yes, it actually was that fast?

13 Mar 2022 04:12 GMT | #380 of 482 comments | View original comment

Reader commented on Comfort of Bloated Web:

Just needed to see how fast it was and if I could do better! Thanks for the article, gave me something to think about.

13 Mar 2022 03:50 GMT | #379 of 482 comments | View original comment

Russell Heimlich commented on Comfort of Bloated Web:

Just here to see how fast this comment form submits. Cheers!

13 Mar 2022 03:42 GMT | #378 of 482 comments | View original comment

Shon commented on Comfort of Bloated Web:

Sorry for the double posts!

I found the return time on the form was not as fast as I expected. I have a suspicion your duplicates may be partially due to the UI of the form. True: it shows a message saying "comment was submitted successfully", but it also leaves the exact same form up, with all the content. This is both unusual, in my experience, and I think a bit confusing. Why would all content still be available and live for editing if the form was really submitted?

I think people probably hit the "Submit Comment" button multiple times because they are used to the comment content either disappearing after it has been sent, or at least changing appearance, so that it is not longer an input form, but now displays the un-editable content (thus reflecting that the content has been submitted).

I suspect that if you fix this "UI bug", then you'll no longer see those duplicates.

13 Mar 2022 03:39 GMT | #377 of 482 comments | View original comment

Shon commented on Comfort of Bloated Web:

Seems to be an interesting, disappointing, and illustrative case of "worse is better". We get so conditioned to things working sub-optimally, we feel uncomfortable in improved circumstance.

I mainly just wanted to see the swiftness for myself. :)

13 Mar 2022 03:31 GMT | #376 of 482 comments | View original comment

AD commented on Comfort of Bloated Web:

And clear the form after submission! This may be another reason people think your form is broken.

13 Mar 2022 03:18 GMT | #375 of 482 comments | View original comment

AD commented on Comfort of Bloated Web:

Maybe place a note for skeptics? In the success message say something like "Yes, it was fast, it's not broken!"

13 Mar 2022 03:17 GMT | #374 of 482 comments | View original comment

Matthew commented on Comfort of Bloated Web:

You should make it so that if the same client submits the same comment twice in a short period of time with the same message, it will disregard it. Or you can say "yes, it was actually submitted the first time, don't worry," on multiple attempts?

13 Mar 2022 02:25 GMT | #373 of 482 comments | View original comment

Nick commented on Comfort of Bloated Web:

Don't mind me, just testing out this supposedly disconcertingly fast comment form.

13 Mar 2022 02:00 GMT | #372 of 482 comments | View original comment

Dave commented on Comfort of Bloated Web:

Update, it is extremely fast. However, it doesn't clear input which is a bit of a confusing UX when submitted successfully.

13 Mar 2022 01:39 GMT | #371 of 482 comments | View original comment

Dave commented on Comfort of Bloated Web:

I just wanted to try the comment form.

13 Mar 2022 01:38 GMT | #370 of 482 comments | View original comment

Bravery commented on Comfort of Bloated Web:

If this was a trick to get me to post a comment, it worked. :P

Cute story and beautiful blog!

13 Mar 2022 00:50 GMT | #369 of 482 comments | View original comment

Somebody1 commented on Comfort of Bloated Web:

Another thing. When I clicked submit again, the comment didn't disappear from the comment box. Text usually disappears when you click submit, so that is also probably confusing people.

13 Mar 2022 00:34 GMT | #368 of 482 comments | View original comment

Somebody1 commented on Comfort of Bloated Web:

Wow, that is fast. I don't think it is just the JavaScript bloated web that is confusing people. It is also faster than the animations in desktop applications. It makes me wonder, why do OS deliberately add so much latency with their animations?

13 Mar 2022 00:33 GMT | #367 of 482 comments | View original comment

Somebody1 commented on Comfort of Bloated Web:

Is the comment form really that fast? Let me try it.

13 Mar 2022 00:30 GMT | #366 of 482 comments | View original comment

Simon commented on Comfort of Bloated Web:

This is indeed a tiny comment form.

12 Mar 2022 23:47 GMT | #365 of 482 comments | View original comment

Hector commented on Comfort of Bloated Web:

Nice post. I would advice adding a link to this post after posting a comment.

Maybe something like "You don't believe me, do you? Read this!"

12 Mar 2022 23:46 GMT | #364 of 482 comments | View original comment

Will commented on Comfort of Bloated Web:

This is a great article.

12 Mar 2022 23:46 GMT | #363 of 482 comments | View original comment

eyelidlessness commented on Comfort of Bloated Web:

Oh my. Adding to my last comment: I wasn't expecting to see the content of my comment still populated in the form after submitting! Whether people are aware of it or not, they may be confused by this. Despite the success message (people don't read), this may feel more like the experience of getting validation errors before a submission request goes through. Even just making the fields readonly on success would probably help with the confusion.

12 Mar 2022 23:39 GMT | #362 of 482 comments | View original comment

Timothy Stebbing commented on Comfort of Bloated Web:

Ahh I see the problem now. You also have an interaction design issue that makes submitting twice too easy, you leave the form content filled.

In a traditional POST form scenario you're moving the user to a new page that captures the data and says something like "Comment submitted successfully", perhaps with the comment displayed as text. In a bloated javascript website it's typical to hide the form after submission to remove the temptation. (Don't forget oldbies with a propensity to double-click a submit button!)

12 Mar 2022 23:38 GMT | #361 of 482 comments | View original comment

Josh Sisto commented on Comfort of Bloated Web:

You could circumvent this issue by replying with something unique to the user such as IP address. For example, "Comment accepted from IP:xxx.xxx.xxx".

12 Mar 2022 23:37 GMT | #360 of 482 comments | View original comment

Anonymous commented on Comfort of Bloated Web:

Very interesting and inspiring article. Want to test responsiveness of submitting a comment.

12 Mar 2022 23:36 GMT | #359 of 482 comments | View original comment

eyelidlessness commented on Comfort of Bloated Web:

This is a UX phenomenon that comes up from time to time, and sometimes adding an artificial delay does in fact feels better for at least some portion of users. Another solution that might help is a *very* small bit of JS which receives a 204 response (browsers won't navigate on 204), then clears the form/shows success in situ. Sure, it's a *little more* dynamic, and I'm sensitive to adding JS unnecessarily (my site currently has none after build), but it would be a lot less likely to feel like a false positive. You could even add an artificial delay to *displaying* that, as an A/B test just to see if it yields fewer duplicates.

Both those suggestions are partly sincere and partly in jest. I doubt either of them line up with your goals, mostly posting them in case they might benefit other readers. But a fully sincere suggestion which I think might be more suitable: display the received comment or some truncated portion of it as pending in the success response. It's unlikely to add noticeable delay or bloat, but it would confirm that the contents of the comment were actually received. This isn't a substantial difference in the perceived performance, but people have become accustomed to seeing that their action had an *effect* (specifically a side-effect).

Feel free, of course, to totally ignore any and all of this advice. Thanks for having a site that's fast and lightweight!

12 Mar 2022 23:35 GMT | #358 of 482 comments | View original comment

Timothy Stebbing commented on Comfort of Bloated Web:

Terribly sorry for this rather boring comment, bit I simply had to experience your speedy form submit. ;)

12 Mar 2022 23:34 GMT | #357 of 482 comments | View original comment

Josh commented on Comfort of Bloated Web:

That was pretty quick.

12 Mar 2022 23:09 GMT | #356 of 482 comments | View original comment

Josh commented on Comfort of Bloated Web:

Okay I'm sorry but I need to know if this comment form is as instant as proclaimed.

12 Mar 2022 23:09 GMT | #355 of 482 comments | View original comment

Seeing is believing commented on Comfort of Bloated Web:

Wow it really is. Good grief!

12 Mar 2022 23:03 GMT | #354 of 482 comments | View original comment

Seeing is believing commented on Comfort of Bloated Web:

Is this really so blazing fast to be incredible?

12 Mar 2022 23:03 GMT | #353 of 482 comments | View original comment

ElFitz commented on Comfort of Bloated Web:

Wow. Blazing fast.

12 Mar 2022 22:47 GMT | #352 of 482 comments | View original comment

ElFitz commented on Comfort of Bloated Web:

The most hilarious part? You would not be the first one ^^'.

See Curious snippet of code from the official macOS chess app and The UX Secret That Will Ruin Apps For You.

12 Mar 2022 22:46 GMT | #351 of 482 comments | View original comment

Bill Dietrich commented on Comfort of Bloated Web:

Maybe in addition to the success message, display their comment in a read-only block on the page. That way they can see that their comment has been saved.

12 Mar 2022 22:34 GMT | #350 of 482 comments | View original comment

Hady commented on Comfort of Bloated Web:

Forgive me my intrusion. I just sincerely wanted to experience a bloat free comment box. Thank you for not adding an artificial delay.

12 Mar 2022 22:32 GMT | #349 of 482 comments | View original comment

Joko Maxino commented on Comfort of Bloated Web:

Wow so fast commenting!

12 Mar 2022 22:17 GMT | #348 of 482 comments | View original comment

Matt Lee commented on Comfort of Bloated Web:

Redirect the user to a dedicated "success" page?

12 Mar 2022 22:10 GMT | #347 of 482 comments | View original comment

Zeljko Nesic commented on Comfort of Bloated Web:

Magnificent! Perfect!

My UX tip would be to empty and hide the form altogether when you are showing this green success box.

Sorry for the spamming you,
All Best

12 Mar 2022 22:02 GMT | #346 of 482 comments | View original comment

Zeljko Nesic commented on Comfort of Bloated Web:

I think that bloated web is like TV - unhealthy junk that is given to us to accept it as normal.

I praise websites like yours. This void-of-meaning comment is just to check how fast actually does it.

12 Mar 2022 22:01 GMT | #345 of 482 comments | View original comment

Anonymous commented on Comfort of Bloated Web:

Just testing the said comment form to see how fast is fast. :)

Ironically, I was just having a similar conversation with a friend earlier that no matter how much our processors are getting faster, better GPUs etc., the web and software feels like it keeps getting slower. It's almost as if people are just writing worse and non-performant code. Some websites turn my laptop into a rocket ship because WebGL!

12 Mar 2022 21:49 GMT | #344 of 482 comments | View original comment

Just commented on Comfort of Bloated Web:

Cool article! Just testing the speed!

12 Mar 2022 21:38 GMT | #343 of 482 comments | View original comment

Tom Cooks commented on Comfort of Bloated Web:

Sorry to be that guy, but your excellent article made me want to try.

12 Mar 2022 21:37 GMT | #342 of 482 comments | View original comment

Max Kim Tobiasen commented on Comfort of Bloated Web:

You should simply append an "Yes, this website is really that fast" to the text.

12 Mar 2022 21:28 GMT | #341 of 482 comments | View original comment

TeMPOraL commented on Comfort of Bloated Web:

Additionally, I'd suggest modifying the form so that the submit button goes away after successful submission, because it's so tempting to hit it again. (I may be habituated to the bloated web too. It's startling to see it not even blink!)

12 Mar 2022 21:27 GMT | #340 of 482 comments | View original comment

TeMPOraL commented on Comfort of Bloated Web:

Maybe add a note to the success message, along the lines of "Yes, the comment was actually received by the server. Feels too fast to be true? You may have become used to poorly engineered websites being really slow." With the last sentence being a link to this article.

12 Mar 2022 21:25 GMT | #339 of 482 comments | View original comment

Tomasz commented on Comfort of Bloated Web:

You are unfortunately probably going to get many comments testing the speed of your comment submission form. This is one of those.

12 Mar 2022 21:22 GMT | #338 of 482 comments | View original comment

Ahmet commented on Comfort of Bloated Web:

That was really fast!

12 Mar 2022 21:09 GMT | #337 of 482 comments | View original comment

Ahmet commented on Comfort of Bloated Web:

I am testing how fast the comment submission actually is!

12 Mar 2022 21:09 GMT | #336 of 482 comments | View original comment

karmanyaahm commented on Comfort of Bloated Web:

These fast comments are really cool.

12 Mar 2022 21:06 GMT | #335 of 482 comments | View original comment

Same commenter commented on Comfort of Bloated Web:

I think you could improve the UX by putting the success message on top and pushing the content down. Also disable the submit button to avoid double submission.

12 Mar 2022 21:02 GMT | #334 of 482 comments | View original comment

A commenter commented on Comfort of Bloated Web:

I had to test this of course. :)

12 Mar 2022 21:01 GMT | #333 of 482 comments | View original comment

Anonymous commented on Comfort of Bloated Web:

I do apologize, but I wished to see if your form is really as fast as the article claims! :-) I enjoyed your post!

12 Mar 2022 21:01 GMT | #332 of 482 comments | View original comment

Kaappo Raivio commented on Comfort of Bloated Web:

Wow! It's fast!

12 Mar 2022 20:47 GMT | #331 of 482 comments | View original comment

Kaappo Raivio commented on Comfort of Bloated Web:

Well now I just have to test how quick the comment form is. :D

12 Mar 2022 20:47 GMT | #330 of 482 comments | View original comment

Dave commented on Comfort of Bloated Web:

Wow that was pleasant!

12 Mar 2022 20:43 GMT | #329 of 482 comments | View original comment

Dave commented on Comfort of Bloated Web:

That's an interesting problem. I should try commenting to see how fast it is.

12 Mar 2022 20:42 GMT | #328 of 482 comments | View original comment

John Nagle commented on Comfort of Bloated Web:

You're on Hacker News today.

12 Mar 2022 20:37 GMT | #327 of 482 comments | View original comment

Daniel commented on Comfort of Bloated Web:

It's fast!

12 Mar 2022 20:36 GMT | #326 of 482 comments | View original comment

Daniel commented on Comfort of Bloated Web:

Just wanted to see how fast it is.

12 Mar 2022 20:36 GMT | #325 of 482 comments | View original comment

Zoltan Nemeth commented on Toy Traceroute With Ping:

I glad to see this. I sometimes use this to troubleshoot on remote systems with no traceroute available.

20 Feb 2022 10:21 GMT | #324 of 482 comments | View original comment

Alex commented on Andromeda Invaders:

This is so cool! By the way, I got destroyed in the third level.

19 Feb 2022 13:48 GMT | #323 of 482 comments | View original comment

nonrandomstring commented on Toy Traceroute With Ping:

I love snippets like this because they're so useful for teaching. Suits the "Socratic/inductive" method of saying "Oh, if only we had a tool that does this kind of route tracing ... Oh wait a minute ... Hmm what's traceroute do?"

They also demonstrate the Unix philosophy that more complex tools can be built from smaller ones.

19 Feb 2022 11:30 GMT | #322 of 482 comments | View original comment

Ilkka Oksanen commented on Toy Traceroute With Ping:

I remember reading that the creator of the original ping command said he was still slightly annoyed decades after that he didn't also invent traceroute at the same time.

19 Feb 2022 06:50 GMT | #321 of 482 comments | View original comment

Holo Beat commented on Andromeda Invaders:

Level 6. Nice job.

14 Feb 2022 20:43 GMT | #320 of 482 comments | View original comment

memalign commented on Andromeda Invaders:

Thanks for making and sharing this! It's awesome to see a dream fulfilled!

I have a lot of fun making little JavaScript games like this and recently made a way to create sprites using ASCII inline with the code. I call these "pixel-character encoded images" aka PCEImages. I also made an editor web page to help make this ASCII art.

I noticed your sprites are drawn as rectangles in the canvas. PCEImage could hopefully drop in pretty easily if you want to try it out!

14 Feb 2022 20:37 GMT | #319 of 482 comments | View original comment

antirez commented on Andromeda Invaders:

So cool, incredibly fun to be such a simple game. Sounds are a big part.

14 Feb 2022 20:29 GMT | #318 of 482 comments | View original comment

Blable commented on Andromeda Invaders:

Oh gosh, well done mate! I played it just like back-in-the-day... I'm terrible. Level 3.

14 Feb 2022 19:45 GMT | #317 of 482 comments | View original comment

Rune Kaagaard commented on Andromeda Invaders:

Superfun, nice sound design. Maybe try to scale the number of laser pulses with number of ships? The levels are super hard and luck-based the first 10 seconds and then drags on a bit.

Level 7 on first try, mobile.

14 Feb 2022 19:39 GMT | #316 of 482 comments | View original comment

Martin Drapeau commented on Andromeda Invaders:

Playability is great. Simple and addictive. Great job!

14 Feb 2022 18:59 GMT | #315 of 482 comments | View original comment

Patrick Bourke commented on Andromeda Invaders:

I love seeing well-organized code in a single HTML file - very easy to read and comprehend. Kudos!

14 Feb 2022 18:55 GMT | #314 of 482 comments | View original comment

bmsleight_ commented on Andromeda Invaders:

First attempt: level 3. Love the Why you built this!

14 Feb 2022 18:03 GMT | #313 of 482 comments | View original comment

Sokoloff commented on Andromeda Invaders:

Pretty fun for a simple game. Difficulty level ramps up very quickly, perhaps overly so for a situation where eating quarters isn't a goal.

14 Feb 2022 17:41 GMT | #312 of 482 comments | View original comment

Anon1094 commented on Andromeda Invaders:

Good work. I like that the game is contained within a single index.html file.

14 Feb 2022 07:11 GMT | #311 of 482 comments | View original comment

RetroCryptID commented on Andromeda Invaders:

Great demo. Even better documentation when you click over to the project page on GitHub.

13 Feb 2022 17:30 GMT | #310 of 482 comments | View original comment

Fillon commented on Wordle With Grep:

Susam,

Thanks for the explanation. I did not notice earlier that the result has an extra 'e' in a gray tile. You are right. Since the extra 'e' has been evaluated and marked gray, it cannot occur as a repeated letter.

25 Jan 2022 08:08 GMT | #309 of 482 comments | View original comment

Susam Pal commented on Wordle With Grep:

Fillon,

I am aware that there can be repeated letters. In fact, Wordle #219 ("knoll") does indeed have repeated letters. However, in Wordle #217 we can be sure that there is no repeated letter 'e'.

In Wordle #217, after we enter the word "beige" as the second guess, the result has the letter 'e' in a green tile and another occurrence of the letter 'e' in a gray tile. The gray tile containing 'e' confirms that there is no repeated letter 'e'. Here is how the second result looks:

B E I G E

If there were no occurrence of 'e' in an unsolved tile in the result above or if there were another 'e' in a yellow tile, then a repeated 'e' could have been present. But in the result above, we have another 'e' in a gray tile. This gray tile guarantees that the letter 'e' does not repeat in the solution.

23 Jan 2022 23:25 GMT | #308 of 482 comments | View original comment

Fillon commented on Wordle With Grep:

Also, the letter 'e' does not occur anywhere apart from the fifth place.

There can be repeated letters!

23 Jan 2022 14:26 GMT | #307 of 482 comments | View original comment

Jana commented on Wordle With Grep:

I solved them with Awk.

Wordle #217:

$ alias words='awk '/^[a-z][a-z][a-z][a-z][a-z]$/' /usr/share/dict/words'
$ words | awk '/^....e/ && !/[aros]/' | head -n 5
beige
belie
belle
bible
bilge
$ words | awk '/[^e][^e][^ie][^e]e/ && /i/ && !/[arosbg]/' | head -n 5
fiche
indue
lithe
mince
niche
$ words | awk '/[^e]i[^iec][^e]e/ && /c/ && !/[arosbgfh]/' | head -n 5
mince
wince
$ words | awk '/[^e]ince/ && !/[arosbgfhm]/' | head -n 5
wince

Wordle #218:

$ words | awk '/.r.../ && !/[aose]/' | head -n 5
brick
bring
brink
briny
bruin
$ words | awk '/.ri[^c]./ && /c/ && !/[aosebk]/' | head -n 5
crimp

Wordle #219:

$ words | awk '/..o../ && !/[arse]/' | head -n 5
block
blond
blood
bloom
blown
$ words | awk '/.[^l]o.[^k]/ && /l/ && /k/ && !/[arsebc]/' | head -n 5
knoll
23 Jan 2022 10:27 GMT | #306 of 482 comments | View original comment

Phoebos commented on Wordle With Grep:

Nice! I like the systematic approach.

The problem occurs if there are many words that differ from the target word by only one letter, e.g., bears, fears, gears, pears, tears, wears, years - in this case, it would be most useful to create a word using as many of those first letters as possible - for example, "befit" with b,f,t - so that only one guess is used up to find what the first letter is.

22 Jan 2022 15:23 GMT | #305 of 482 comments | View original comment

Alexander Bridges commented on Shell Eval:

Interesting!

15 Jan 2022 23:45 GMT | #304 of 482 comments | View original comment

Andre commented on Simplicity of IRC:

In addition to ALIS, there is also a web search for finding channels and their servers: https://netsplit.de/channels/.

To find new channels, I also found it helpful to aggregate the lists of all channel participants with an Irssi script named jalso.pl from https://github.com/andre-st/irssi-scripts.

10 Jan 2022 02:09 GMT | #303 of 482 comments | View original comment

Layer8 commented on FD 100:

My first programming language (aside from HP-12C routines) was COMAL on the C64. COMAL was advertised as being halfway between BASIC and PASCAL, and it also had Logo turtle graphics and featured a corresponding split screen text/graphics view. Great times.

09 Jan 2022 23:54 GMT | #302 of 482 comments | View original comment

Rain Trees commented on FD 100:

I did the "heathkit" version of programming: Typing in BASIC code for a version of lunar lander on a TRS-80 on the sale floor of my local Radio Shack.

Later I learned to write my own kits. And sometime after that, I got others to pay me for the pleasure - Winning!

09 Jan 2022 23:08 GMT | #301 of 482 comments | View original comment

Hammy Havoc commented on Simplicity of IRC:

I use Matrix and bridge in IRC, and third-party platforms whenever necessary. So much less cognitive load having it all in one place.

09 Jan 2022 22:45 GMT | #300 of 482 comments | View original comment

userbinator commented on Simplicity of IRC:

Everyone should write an IRC client as an exercise in network programming due to its simplicity. The other IM protocol for which I've written a client is early MSNP, which is also text-based and not immensely more complicated than IRC. IMHO all the newer web-based stuff is a horrible mess of abstraction bloat. TCP, and TLS if you want encryption, should be a sufficient base to build upon.

09 Jan 2022 22:08 GMT | #299 of 482 comments | View original comment

Melody Ayres-Griffiths commented on FD 100:

Great article! :) I spend my days developing turtleSpaces, a modern 3D environment for coding in Logo, based on the Apple Logo II implementation (and greatly expanded upon). Like the original Logos it has a REPL and you can just type FD 100 and the turtle will happily move as expected.

It's written in Go, and as such has builds for macOS, Linux and Windows, as well as a WebAssembly build which runs inside of a Javascript-based IDE. We still have a ways to go to reach our goal of a Logo-based multi-player 3D game engine (like Roblox) but you can do a great deal with it as it stands now, including creating STL files for 3D printing and making simple games and animations.

09 Jan 2022 21:24 GMT | #298 of 482 comments | View original comment

Sundar commented on FD 100:

It seems a pretty common thing to have a pleasant nostalgic memory of Logo as a fun introduction to programming. My experience with it was pretty different. I found it pretty pointless and boring at the time. It didn't have any pull on me the way C later did.

Ironically, a big part of what made C fun for me were the Borland conio (console I/O) and graphics libraries. Those were fun only because I could respond to user interactions and make simple games and other playful things. Looking back on it, that was probably the missing ingredient with Logo for me. We were never taught any ways of user input. They were just static programs that did one thing and that feels fundamentally different.

09 Jan 2022 20:58 GMT | #297 of 482 comments | View original comment

Peter Marreck commented on Simplicity of IRC:

Somehow I never heard of Matrix until now. I'm now running Element with a bridge to the Libera IRC network. Thanks!

09 Jan 2022 20:32 GMT | #296 of 482 comments | View original comment

Yeti commented on Simplicity of IRC:

That's why I've said that their work was used, not that they did it.

09 Jan 2022 18:18 GMT | #295 of 482 comments | View original comment

Davisr commented on Simplicity of IRC:

Yeti,

You don't understand what happened at Xerox PARC or what their "GUI" was. Smalltalk wasn't a language. It wasn't a GUI. It was an environment. Its whole point was that it didn't hide anything! It was a completely different paradigm to how computers and their programs are architected today. A Smalltalk system was always meant to be so simple that one could understand, and change, everything about it.

09 Jan 2022 18:12 GMT | #294 of 482 comments | View original comment

Lambdaba commented on FD 100:

Logo gave me a brief taste of functional programming even though back then I did not know the term "functional programming".

This is what Unix pipes did for me. By the time I started programming, constructing programs as series of side effect-free transformations felt perfectly natural. To be precise I did have some previous imperative programming experience and I didn't like it or grok it.

09 Jan 2022 18:07 GMT | #293 of 482 comments | View original comment

Phil Kulak commented on Simplicity of IRC:

I've never really played around with IRC, but I've definitely had the experience the author talks about with Matrix. The server (like mentioned about IRC) is complicated, but interfacing with it as a user or a bot is mostly a few REST endpoints. I've started using Matrix as my go-to interface for new projects. You get I/O for free, plus authentication, user accounts, and multi-device; leaving just the fun stuff.

09 Jan 2022 18:02 GMT | #292 of 482 comments | View original comment

Robin Whittleton commented on FD 100:

We had a Logo turtle at school in the late 80s I guess. I can't remember if it was hooked up to the BBC Micros or the RM Nimbus pseudo-PC that were popular in UK schools at the time. But either way, it seemed amazingly cool.

09 Jan 2022 18:00 GMT | #291 of 482 comments | View original comment

Andrew McWatters commented on Simplicity of IRC:

I never used IRC growing up, to my knowledge, though I'm sure I used it by proxy in software that used it under the hood.

Instead, I grew up with AOL Instant Messenger, and then MSN Messenger which later became Windows Live Messenger, then Skype, Xfire, Pidgin and Trillian as clients, then back to Skype again, and now Discord, which is where I still reside most of the time today.

When I thought about existing chat protocols I wanted to use in game engines and websites that would allow one to connect through existing clients without having to join the game or navigate to the website in question directly, I thought about IRC.

But it seems like people use Matrix now, and it just hasn't caught on to my circle of friends. If I'm not mistaken, it almost seems like FOSS Discord.

I was recently introduced to it by a member of a community of very friendly Quake Mappers. I wonder if there is primarily first a cultural barrier to these technologies and not a technical one. As usually I find more technical people on IRC than on Discord.

09 Jan 2022 17:41 GMT | #290 of 482 comments | View original comment

krallja commented on FD 100:

Llimos,

SYSTEM

09 Jan 2022 17:10 GMT | #289 of 482 comments | View original comment

Llimos commented on FD 100:

Such great memories! Logo, then moving on to Basic on the VTech PreComputer 1000, then GW-BASIC on PC (which to this day I never figured out how to exit! I used to turn the computer off and on again).

09 Jan 2022 16:58 GMT | #288 of 482 comments | View original comment

drewg123 commented on FD 100:

I agree 100% with the author -- logo as a child is what started me on programming. My first programming experience was in ~1981 or so when my elementary school teacher brought an Apple II into our classroom. She was getting her MS in education, and it was on-loan from her college. It was loaded with Apple Logo, and you had to pry me away from it with a crowbar. That was one of the first times I stayed after school willingly. I hounded my parents mercilessly until they finally bought an Apple II clone.

I eventually learned BASIC, and learned debugging and "hacking" by fixing the games that I typed in (incorrectly) from magazines and modifying them to do different things.

09 Jan 2022 16:33 GMT | #287 of 482 comments | View original comment

Erik commented on Simplicity of IRC:

I find Matrix a fine substitute for IRC. Very simple to write clients and bots for. And you get modern features IRC either lack or does not do well.

09 Jan 2022 16:33 GMT | #286 of 482 comments | View original comment

slmjkdbtl commented on FD 100:

This is so amazing. Using absolute minimal primitives to achieve interesting results!

09 Jan 2022 16:21 GMT | #285 of 482 comments | View original comment

Dog Lover commented on Simplicity of IRC:

I used IRC for gaming around 2004 - fond memories!

I recently tried Discord to find programming communities but I just don't get it. When you join a server you are automatically subscribed to all the channels. And apparently you can't leave them, you can only 'silence' them by manually doing that for each channel. After a few days I just gave up as I could not keep up with all the notifications.

09 Jan 2022 15:04 GMT | #284 of 482 comments | View original comment

Anthk commented on Simplicity of IRC:

Usenet too. Getting news and discuss stuff "offline" and fetching/sending the messages once a week it's magical and resting.

09 Jan 2022 14:54 GMT | #283 of 482 comments | View original comment

epalm commented on Simplicity of IRC:

As an aside, can I just say how refreshing this website is? It's 100% content, just text. Now view the HTML source, and be amazed. I daresay the author actually wrote the HTML by hand. I suppose it could be a very conservative and conscientious site generator that even respects line length, but I'd be surprised. Short CSS file for minimal style tweaks, and readable markup. Fitting that the article is about simplicity. When I first learned html (late 90s) this is what it looked like. Very nice.

09 Jan 2022 14:10 GMT | #282 of 482 comments | View original comment

Dmitry Cheryasov commented on Simplicity of IRC:

I'd say it's in the same general box as the simplicity of 8-bit computers booting into Basic interpreter, and the simplicity of Legos.

It's wonderful when you can have your toys in a sandbox where you use and develop them mostly for fun, and for scratching your own itch, away from well-moneyed interests. No need to carefully identify participants. No need to encrypt, or otherwise complicate the implementation. No need to efficiently serve millions of users. No need to add bling to attract more of those who barely cares. (The latter is not the case with Legos lately, though.)

This is why I think that a lot of innovation starts in the fringe, and looks like mostly useless toys, until one of these toys proves very useful for "real world" needs.

09 Jan 2022 14:03 GMT | #281 of 482 comments | View original comment

TiffanyH commented on Simplicity of IRC:

Speaking of simplicity, this blog has a fantastic design. The CSS is only ~30 lines and is largely just applying spacing/padding. No JS, no custom font, etc.

09 Jan 2022 14:03 GMT | #280 of 482 comments | View original comment

Yeti commented on Simplicity of IRC:

In the beginning was the command line. Then the work of the bright people of Xerox PARC was used to hide from users the reality that lied underneath their beloved GUI: computers are just passing around strings of text. Now we yearn for a time when we are just one INT and several MOV away from putting a pixel on a screen, instead of downloading a multi-GB IDE to fiddle for a weekend before we can show a simple window.

09 Jan 2022 13:54 GMT | #279 of 482 comments | View original comment

Johannes Truschnigg commented on Simplicity of IRC:

A number of moons ago, I switched from a company that used IRC for its internal, real-time, ephemeral communication needs to an enterprise shop that used Microsoft Teams to do that (and of course other communication stuff, as the boundaries for what was better kept in Sharepoint, Confluence, Email/Exchange, the legacy Wiki, and/or Teams were never quite clear :)) there.

In the old shop, we eventually had all kinds of important subsystems hooked up to our internal IRC server: Monitoring and alerting. Source control and Wiki activity. The deployment pipeline. Ticket activity reports. All these services were pretty much effortlessly set up to provide useful, real-time status information broadcast to topic-specific channels users could idle in. Everyone could stay informed on topics of their interest, in real time, with no barrier to entry. It was really good, and the implementation completed in a few hours total, for all use-cases, due to IRC's incredible simplicity.

Due to the benefits I had reaped from that setup before, I tried to implement parts of it on/for the MS Teams platform at the then-new job. Getting the Teams Python SDK to implement a bot-like entity running alone proved to be a days-long ordeal, and whatever followed wasn't much more pleasant.

In the end, we let someone set up two email-to-teams-channel-forwards which kinda worked, but suffered from obnoxious, multi-minute relay delays.

As a consequence of the tedious bringup and the latency shortcoming, the "effortless notification" initiative never really got traction.

Not only because of this particular experience I am a firm believer that software/system simplicity is a virtue that can neither be overstated in importance, nor substituted by anything else.

09 Jan 2022 13:25 GMT | #278 of 482 comments | View original comment

Dan Robertson commented on Simplicity of IRC:

It's a real shame how difficult programming is. I don't mean that it is difficult to write difficult things, but that it is difficult to write simple things. Once upon a time, one could download Visual Studio, click about to make a new project in, for example, Visual Basic, draw a GUI in the GUI editor, and click the run button. One could then start adding simple functionality (e.g., working through a book). Or even longer ago when a computer might dump you practically straight into BASIC when you turned it on or you might get access to a mainframe/minicomputer with programming tools already set up. Nowadays, an "easy" introduction could involve the horrific process of installing and setting up Python on Windows (where it is hard to do things other than input/output text) or editing some HTML/JavaScript files where there are more easily possible interactive things but lots of things are difficult like just drawing things or anything that requires a server side.

If you, like me, were wondering what Libera Chat is, it's the moral successor of Freenode with Freenode now being a shell of its former self.

09 Jan 2022 13:16 GMT | #277 of 482 comments | View original comment

Stavros commented on Simplicity of IRC:

Same with SMTP and POP. I would routinely send or get email via telnet when I wanted to debug or delete some messages. They're all very simple protocols.

09 Jan 2022 13:08 GMT | #276 of 482 comments | View original comment

Hoyd commented on Simplicity of IRC:

Nice article. Thanks! :-) I grew up with IRC and realize that it isn't the same any longer. It isn't the place where everyone is, which some social networks seem to be today. The local communities on IRC, a channel for a town used to be the place to be and meet others.

09 Jan 2022 13:06 GMT | #275 of 482 comments | View original comment

Mark Kennedy commented on Simplicity of IRC:

Nickname management is complicated. I like to use the same nickname from multiple IRC clients running on multiple systems. It used to work earlier but not any more. Recovering a nickname after you've forgotten the password is also complicated. If you don't care about nicknames, the issue is moot but maintaining a consistent identity seems important.

09 Jan 2022 12:49 GMT | #274 of 482 comments | View original comment

Aqezz commented on Lisp in Vim:

This is great! I just recently started using Vlime and had been starting SBCL externally but your \rr hotkey has just saved me lots of annoyance!

Same with the interactive debugging, I didn't know you could inspect the call stack like that and evaluate stuff! I only knew about choosing restarts. Thanks for this write up!

09 Jan 2022 01:03 GMT | #273 of 482 comments | View original comment

Toby commented on Vim Sudo Write Trick:

Thanks for the tip! Adding this to my Vim configuration:

com W exe 'sil w !sudo tee "%" > /dev/null' | e!
12 Dec 2021 21:18 GMT | #272 of 482 comments | View original comment

Mario commented on Vim Sudo Write Trick:

This is a nice tip! I ended up adding this to my ~/.vimrc:

command W execute 'silent write !sudo tee "%" > /dev/null' | edit!
11 Dec 2021 18:35 GMT | #271 of 482 comments | View original comment

Jen commented on Vim Sudo Write Trick:

I have got this in my ~/.vimrc now:

command W w !sudo tee "%" > /dev/null
11 Dec 2021 15:19 GMT | #270 of 482 comments | View original comment

Kevin Cox commented on Vim Sudo Write Trick:

I just use vim-eunuch which includes a :SudoWrite in its list of goodies.

Everything in the plugin is pretty easy to live without but in my mind the simple plugin to have everything on-hand is worth it.

11 Dec 2021 11:41 GMT | #269 of 482 comments | View original comment

Malf commented on Peculiar Self-References:

This is the first true "PHPism" I have seen in a "real language". (Is there a name for "we did not want the general thing (e.g., assignment expressions) but we wanted one narrow subset of it (serial assignment), so we implemented that, but with different semantics for no good reason"?)

20 Nov 2021 22:41 GMT | #268 of 482 comments | View original comment

Solar Fields commented on Peculiar Self-References:

Heavyset, I wonder if it's because of their subtlety. I assume you are referencing JavaScript, where the warts are impossible to ignore because you can't write an everyday program as a beginner without running into them. This sort of thing from the article is just not something I would typically be trying to do in the normal course of shuffling data around.

19 Nov 2021 05:22 GMT | #267 of 482 comments | View original comment

Heavyset Go commented on Peculiar Self-References:

Some languages wear the things that make you go WTF on their sleeves. In contrast, Python's surprises pop up slowly over time, and in places where you'd least expect them.

19 Nov 2021 01:20 GMT | #266 of 482 comments | View original comment

Tom Forbes commented on Peculiar Self-References:

Oliver, It is possible now with the walrus operator though:

print(a := 5)
18 Nov 2021 23:57 GMT | #265 of 482 comments | View original comment

Oliver commented on Peculiar Self-References:

It is a fallout of the fact that assignment must be a statement, and cannot be an expression. For example, this is wrong in Python, while it would be allowed in C-like languages:

print(a = 5)
18 Nov 2021 23:54 GMT | #264 of 482 comments | View original comment

Kache commented on Peculiar Self-References:

I think it would be elegant to let assignments be expressions, and from that simple core rule, your parsing naturally follows.

I find it irksome that Python makes a distinction between statements and expressions, instead.

18 Nov 2021 22:24 GMT | #263 of 482 comments | View original comment

Anitil commented on Peculiar Self-References:

I am amazed at how long I have been working in Python and never known that assignment works in this way. I suppose I just avoid parts of the language that I do not understand.

Looking through the archives, it is a really interesting blog in general.

18 Nov 2021 22:06 GMT | #262 of 482 comments | View original comment

Piu Tevon commented on Peculiar Self-References:

The thing I learned today is that multiple assignments are evaluated left-to-right. I assumed it would be the other way around. Like a[0] = a = [0] would have been a lot less surprising.

18 Nov 2021 17:36 GMT | #261 of 482 comments | View original comment

Shellac commented on Peculiar Self-References:

Knome: ... It makes sense ...

Knome,

I think you are overstating that. It is not outright crazy or inconsistent, but I quibble with it being sensible.

18 Nov 2021 14:06 GMT | #260 of 482 comments | View original comment

Ayra commented on Peculiar Self-References:

aaaaaaaaaaaaaaaa

18 Nov 2021 13:44 GMT | #259 of 482 comments | View original comment

Knome commented on Peculiar Self-References:

a = a[len(a)] = a[len(a)] = a[len(a)] = a[len(a)] = a[len(a)] = a[len(a)] = {}

This is knowledge that should have remained hidden.

18 Nov 2021 13:41 GMT | #258 of 482 comments | View original comment

Knome commented on Peculiar Self-References:

Wow. That is surprising. It makes sense but strikes me as the exact opposite of what I would expect looking at the code. I would definitely have expected the binding order to be the more common right-to-left and for the original code to generate a name error, rather than the latter.

18 Nov 2021 13:36 GMT | #257 of 482 comments | View original comment

Blind Mathematician commented on Peculiar Self-References:

This looks like a big oops in language design. Time to upgrade to Python4 for a fix!

18 Nov 2021 13:36 GMT | #256 of 482 comments | View original comment

Roguas commented on Very Remote Debugging:

Qem, That is the thing about functional programming in general. Data is the centerpiece. State is just data. Program is just data. Capture data, feed it locally, and get results.

16 Nov 2021 13:41 GMT | #255 of 482 comments | View original comment

Susam Pal commented on Peculiar Self-References:

Carl, Yes, indeed!

None.__eq__.__eq__.__eq__.__eq__.__eq__ # and so on ...
14 Nov 2021 07:02 GMT | #254 of 482 comments | View original comment

Carl M. Johnson commented on Peculiar Self-References:

Every Python object has an infinitely recursive set of attributes because methods are functions and functions are objects and all objects have methods. It is a fun way to hit a stack overflow chasing them down.

14 Nov 2021 03:52 GMT | #253 of 482 comments | View original comment

Kaushik Ghose commented on Peculiar Self-References:

This is very neat, but I would like to approach it a bit differently. Python allows self-referential objects and is able to handle this gracefully while printing them.

>>> a = {}
>>> a['self'] = a
>>> a
{'self': {...}}
>>> a['self']
{'self': {...}}
>>> a['self']['self']
{'self': {...}}

Python also allows chained assignments.

>>> a = b = c = d = 23.4567
>>> a
23.4567
>>> b
23.4567
>>> c
23.4567
>>> d
23.4567

Also, a dictionary has to be initialized before a key access.

>>> a['k'] = {}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'a' is not defined

So what the following example teaches us is how Python goes about allocating things in a chained assignment.

>>> a = a['k'] = {}
>>> a
{'k': {...}}

Let us look at something else with recursion which is easier for me to illustrate

>>> a = a[0] = [0, 1]
>>> a
[[...], 1]
>>> a = a[1] = [0, 1]
>>> a
[0, [...]]

The operations look like following:

[0, 1] → a
a → a[0]

If we extend the chain (a = b = c = d = ...) what is the pattern?

I could not think of a test that would let me dissociate if what is happening is

a = x
b = a
c = a
d = a
or
a = x
b = a
c = b
d = c

I might think of something tomorrow.

14 Nov 2021 02:31 GMT | #252 of 482 comments | View original comment

Susam Pal commented on Peculiar Self-References:

For those who are wondering what the code in the previous comment does, here is its output:

2
3

When a = self.a = 2 is evaluated, the assignment to self.a triggers the __setattr__ call which tells us that the __init__ method's local variable a has already been updated to 2. That's the first line of output.

When self.a = a = 4 is evaluated, once again the assignment to self.a triggers the __setattr__ call which tells us that the value of local a is still 3. It has not been updated to 4 yet. It gets updated to 4 after the assignment to self.a completes.

Both lines of output demonstrate the left-to-right assignment quite clearly.

13 Nov 2021 20:13 GMT | #251 of 482 comments | View original comment

o11c commented on Peculiar Self-References:

Yeah, Python really messed up the order of multiple assignments. This could be fixed by deprecating arbitrary multiple assignments. Instead, only allow:

Use of "or" rather than "and" is deliberate, to fix an obscure edge case. We can't even limit the restriction to "assignments involving a function call". Notably, self.a = a = {} is not always the same as a = self.a = {}. Proof:

#!/usr/bin/env python3

class Foo:
    def __init__(self):
        self.get_a = lambda: a
        a = 1
        a = self.a = 2
        a = 3
        self.a = a = 4

    def __setattr__(self, name, val):
        if name != 'get_a':
            print(self.get_a())
        self.__dict__[name] = val

if __name__ == '__main__':
    Foo()
13 Nov 2021 16:35 GMT | #250 of 482 comments | View original comment

Oshiar commented on Peculiar Self-References:

XG15, Yet another reason is all the references in LHS expressions are resolved before the inner expression is executed. Thus

a['k'] = a = {}

won't still work.

13 Nov 2021 03:03 GMT | #249 of 482 comments | View original comment

JWMH commented on Peculiar Self-References:

In my opinion, it would make more sense to just treat assignments as expressions, as is done in C-like languages. Maybe I'm just more accustomed to C-like languages, though.

I think that one thing that makes the statement confusing is that the first equals sign serves a purpose completely different from the second equals sign, but both of them are represented by the same character.

12 Nov 2021 22:57 GMT | #248 of 482 comments | View original comment

Qem commented on Very Remote Debugging:

Recently there was a bit of a fuss when people discovered that the Mars Ingenuity helicopter runs Python3. Now I wonder, if its software ever crashes, will people be able to just launch the Python REPL and debug it?

12 Nov 2021 22:09 GMT | #247 of 482 comments | View original comment

XG15 commented on Peculiar Self-References:

This is an interesting example that the internal models of two programming languages can be quite different, even if they ostensibly support the same features.

a = a['k'] = {} is also valid JavaScript syntax, however running it throws an exception and generally works as OP probably expected the statement to work. The reason is that in JS, the statement is parsed as

a = (a['k'] = {})

where (a['k'] = {}) is executed first and also returns the assigned value. Meanwhile in Python, apparently multi-assignment is a grammar production of its own, so the above would be parsed as sort of:

multi-assign(a, a['k']) = {}

and therefore first assign to a, then to a['k'].

12 Nov 2021 21:07 GMT | #246 of 482 comments | View original comment

E12E commented on Very Remote Debugging:

100 million miles

That looks like about 9 light minutes away, so about 18 minute latency! It might be super epic, but doesn't sound super nice. :)

12 Nov 2021 20:44 GMT | #245 of 482 comments | View original comment

Code Glitch commented on Very Remote Debugging:

I've heard this before and it does sound like the most epic hack in the history of programming.

12 Nov 2021 19:32 GMT | #244 of 482 comments | View original comment

Ben Trettel commented on Integrating Factor:

In practice, if I get a differential equation that I don't recognize and I want a closed-form solution, I check out eqworld.ipmnet.ru or one of the books produced by the same folks. It is like looking up integrals in an integral table. You look up the form of the equation you want, then they summarize the solution and cite the proof.

11 Nov 2021 00:17 GMT | #243 of 482 comments | View original comment

Shreekrishna Rao commented on GCD Grid:

This is an amazing post about a book which I have read ages ago but whose cover I didn't even notice!

09 Nov 2021 19:01 GMT | #242 of 482 comments | View original comment

Niccl commented on Microcentury:

FemmeAndroid,

I've always thought that conference talks should have the traffic light system that you get a Toastmasters.

IIRC it's green while you've still got plenty of time, orange when you're within x minutes of the scheduled end, and red once you're at the scheduled end.

I've found from Toastmasters that a nice bright light at the back of the hall is much easier to respond to than a clock or something counting down.

04 Nov 2021 02:00 GMT | #241 of 482 comments | View original comment

Uehreka commented on Microcentury:

FemmeAndroid,

So true! I always rehearse my talks several times with the stopwatch on my phone sitting on a nearby desk, but I feel like that's not an obvious thing to people who are getting started and don't have theatre or public speaking experience.

It's a lot like that quote, "If I had more time I would've written a shorter letter."

03 Nov 2021 19:54 GMT | #240 of 482 comments | View original comment

Steve Perkins commented on Microcentury:

I usually don't like it when people sidestep the content of a link, to go on some tangent about its typography or aesthetics. But damn. This is a gorgeous looking blog, for using only default fonts and minimal CSS.

Apparently the author wrote his own static site builder in Common Lisp, but it's so minimal that the content itself is still written in raw HTML. It feels silly but this just takes me back to happier days (pre-WordPress and pre-social media) and makes me wonder why we lost our way. I dearly miss the feeling of making sites like this (but uglier!) back in the 1990's. Applause.

03 Nov 2021 15:48 GMT | #239 of 482 comments | View original comment

Matko commented on From Perl to Pi:

That Learning Perl book was so much fun that I read it even if I had no real interest in learning Perl.

03 Nov 2021 12:49 GMT | #238 of 482 comments | View original comment

FemmeAndroid commented on Microcentury:

Tome,

At most conferences, the people speaking are not professional speakers, and as such I don't mind them running over.

In my experience, it's hard to time a talk correctly, even with multiple run throughs ahead of time. Standing up in front of a big crowd, even if I've got a stop watch running I can end up going far too quick, or far too slowly, and end up with tunnel vision where I fail to identify and correct the mistake.

Are some of the speakers doing it intentionally? Probably. Did some just fail to prepare? Almost certainly. But things come up, and in the most charitable case, they just stood in front of a bunch of people and communicated something they thought was important. I applaud them for that, and move on.

03 Nov 2021 12:26 GMT | #237 of 482 comments | View original comment

Adam Sangala commented on Microcentury:

Elon Musk says he is willing to spend $6 billion to fight world hunger if all hungry people relocate to Mars. So it could be good idea to calculate how long one milionth of a century on Mars is!

03 Nov 2021 12:16 GMT | #236 of 482 comments | View original comment

Tome commented on Microcentury:

Running overtime is the one unforgivable error a lecturer can make.

This is tangential to the content of the article but I'm continually astonished by the number of speakers who seem to be comfortable (largely at conferences) running over time cutting into their question time, the time of the next speaker, or even worse, lunch! Presumably it's not just me and Rota who feel this way, but it seems like there must be a large contingent of people who are very easygoing about it and quite happy to overrun or listen to overrunning speakers. I would be interested to know the thoughts of other readers.

03 Nov 2021 12:10 GMT | #235 of 482 comments | View original comment

Abriosi commented on Timing With Curl:

This is a very useful post. Thank you very much.

31 Oct 2021 18:45 GMT | #234 of 482 comments | View original comment

TyingQ commented on Timing With Curl:

Had no idea curl could do this. If you need a deeper dive, you can do something similar with Headless Chrome and the Chrome DevTools Protocol.

There's a good example with puppeteer here. There are other snippets there that you can turn into text command line tools too.

31 Oct 2021 12:18 GMT | #233 of 482 comments | View original comment

Karan commented on Timing With Curl:

I use httpstat whenever I've to do the same.

31 Oct 2021 10:57 GMT | #232 of 482 comments | View original comment

CPressLand commented on Timing With Curl:

I do this quite frequently, but use the following Stack Overflow post: https://stackoverflow.com/q/18215389.

This blog post appears to be much of the same, regardless, good information to get out there.

31 Oct 2021 10:10 GMT | #231 of 482 comments | View original comment

Sono Rintracciabile commented on Timing With Curl:

Nice. Had no idea those options where available in curl. Today I learnt!

31 Oct 2021 09:51 GMT | #230 of 482 comments | View original comment

Susam Pal commented on Vim Sudo Write Trick:

RGovostes, Thanks for the interesting idea to make this trick work with nano. Based on your comment, I wrote this script to automatically detect the destination filename when invoked with ^T from nano.

#!/bin/sh
set -e
COMMAND=$(ps -p $PPID -o args=)
FILENAME=${COMMAND#*nano }
printf "Write to $FILENAME? (y/n) "
read ANSWER
[ "$ANSWER" = y ] && sudo tee "$FILENAME" < "$1" > /dev/null

After saving this file to, say, /usr/local/bin/sudowrite, it can be set up for usage like this:

sudo chmod u+x /usr/local/bin/sudowrite
export SPELL=/usr/local/bin/sudowrite

Here is how to test it:

sudo touch foo.txt
nano foo.txt

Now write some text and try to save it by typing ctrl + o followed by enter. The following error should appear:

[ Error writing foo.txt: Permission denied ]

Now type ctrl + t followed by y and enter to save the file successfully using the script we wrote above.

31 Oct 2021 05:31 GMT | #229 of 482 comments | View original comment

RGovostes commented on Vim Sudo Write Trick:

I have often wished there were something equivalent for nano. Of course you can just save to another file and sudo mv it into place.

In the spirit of this trick, you could set the SPELL environment variable to a script that does

#!/bin/sh
read -p "Path: " FILENAME
cat "$1" | sudo tee "$FILENAME"

and then invoke it with ^T from nano. Bonus points: Extract the destination filename automatically from ps -p $PPID -o command= (somewhat portable) or from /proc (Linux).

31 Oct 2021 01:56 GMT | #228 of 482 comments | View original comment

Oars commented on Vim Sudo Write Trick:

Very useful, thanks for sharing.

30 Oct 2021 23:41 GMT | #227 of 482 comments | View original comment

Susam Pal commented on Vim Sudo Write Trick:

LP,

Like I explained in my blog post, the quotes around the percent sign are necessary to keep the filename as a single argument when the filename contains whitespace. If there is no whitespace in the filename, then the quotes are not necessary.

Here is an experiment that demonstrates the purpose of quotes:

  1. Enter the following command to create a filename with a space in it and then open it with Vim:

    sudo touch "foo bar.txt"
    vim "foo bar.txt"
  2. In Vim, insert some text with the following key sequence: i hello <esc>.

  3. Now enter the following command in Vim to save the file:

    :w !sudo tee %
  4. In another instance of the terminal, enter the following command to check the content of the file:

    cat "foo bar.txt"

    The file still appears empty. Nothing was saved to this file.

  5. Now enter the following commands:

    cat foo
    cat bar.txt

    Both files contain the text hello in them.

This experiment shows that due to the lack of quotes around %, the command tee % expands to tee foo bar.txt which ends up writing the content of the buffer to both files foo and bar.txt but not to "foo bar.txt" as we desire.

This is why we need to write tee "%" so that it expands to tee "foo bar.txt" and the content of the buffer is written to the file named "foo bar.txt".

30 Oct 2021 23:00 GMT | #226 of 482 comments | View original comment

LP commented on Vim Sudo Write Trick:

The quotes around the percent sign are unnecessary. The command :w !sudo tee % works just fine. I use it everytime!

30 Oct 2021 20:06 GMT | #225 of 482 comments | View original comment

CRMD commented on Vim Sudo Write Trick:

20+ years of using Unix and vi, and still learning tricks. Love it!

30 Oct 2021 16:58 GMT | #224 of 482 comments | View original comment

Shobha commented on Good Blessings:

Thanks for sharing this Susam. Well said Dr Burt.

30 Oct 2021 03:18 GMT | #223 of 482 comments | View original comment

Type Enthusiast commented on FD 100:

For me, it was QBasic under MS-DOS.

SCREEN 13

is the start of endless possibilities!

I think this kind of experience is missing for kids now – but I'd guess it's more about how ubiquitous computers are, and how there's a lot more between the kid and the computer. When a CLI is your interface, making even rudimentary graphics feels like achieving magic. When your interface is a cell phone or GUI, there's a much larger leap from zero to "feels like magic" – OK, so I made a circle bounce around the screen... there's already an app that does that.

28 Oct 2021 22:57 GMT | #222 of 482 comments | View original comment

Mad Axe commented on FD 100:

Similar sort of experience, although we had no turtle, so it was BASIC on the BBC Micro for us.

10 MODE 7
20 PRINT CHR$141"A text adventure"
30 PRINT CHR$141"A text adventure"

May as well have been the opening bars of Beethoven's 5th, for the infinite and incredible possibilities which followed. Anything. I could make anything. It was the most incredible sensation and realisation - and still is.

28 Oct 2021 19:03 GMT | #221 of 482 comments | View original comment

Creep Gin commented on FD 100:

Me too. I learned Logo in the 90's during 3rd grade. Now thinking back, it was probably an important defining moment in my life because it let me experience creativity through coding and visual feedback (and also the constant discovery of new ways of using the various commands).

28 Oct 2021 16:58 GMT | #220 of 482 comments | View original comment

Chintamani Gawde commented on GCD Grid:

Nice breakdown!

23 Oct 2021 16:24 GMT | #219 of 482 comments | View original comment

DJ Belieny commented on Zero Point Leet Seconds:

Love it! My new reference for speed. 0.1337.

12 Oct 2021 19:36 GMT | #218 of 482 comments | View original comment

Peter Burkimsher commented on FD 100:

Last night I was chatting with my girlfriend (who works as a CAD designer in textile industry) about Logo! Like the author of this post, Logo was my first language, and I was really excited to draw squares, cubes, and rocket ships, between the ages of 7 and 9. I had a lot of fun experimenting with the audio frequency generation as well, composing some basic songs (Ode to Joy, Au Clair De La Lune, Frère Jacques).

Years later, when I was 26, I got to use Logo again! I wanted to draw a time-proportional train map of Taiwan. The distance between each point on the map corresponds to the time it takes a local train to travel that far. It made more sense to do that in Logo than in any other language. So I rewrote a basic Logo implementation in JavaScript and called it TurtleSheet: http://peterburk.github.io/tra/.

I hope that some teachers will see the potential of empowering kids, by giving them real-world data like public transport times, and getting some real designs out.

24 Sep 2021 00:53 GMT | #217 of 482 comments | View original comment

Over commented on FD 100:

This takes me back to https://mitpress.mit.edu/books/turtle-geometry, a great book by Harold Abelson and Andrea DiSessa. It uses turtle geometry to explore college-level maths concepts and biological phenomena such as predator-prey relationships.

23 Sep 2021 23:51 GMT | #216 of 482 comments | View original comment

Munchler commented on FD 100:

DrCode, You can think of it that way, but you can also think of a Logo program as a purely functional computation that follows the monad laws. Here's a Haskell package that implements it: https://github.com/aneilmac/worldturtle-haskell.

23 Sep 2021 22:36 GMT | #215 of 482 comments | View original comment

JHBadger commented on FD 100:

DrCode, Logo is more than the turtle. Brian Harvey wrote a whole series of textbooks for Logo that really stressed the functional aspect of the language: http://people.eecs.berkeley.edu/~bh/v1-toc2.html.

23 Sep 2021 22:26 GMT | #214 of 482 comments | View original comment

Tim commented on FD 100:

Paul, A lot of kids (middle and high schoolers) these days have pet projects like making HTML-based website and writing a discord bot in JavaScript. The fact that our district hands out Chromebooks probably contributes to the trend.

23 Sep 2021 21:55 GMT | #213 of 482 comments | View original comment

Jared Summers commented on FD 100:

DrCode, Well, they say that Logo gave them a taste of functional programming, which is a broader statement than turtle drawing (which, to be fair, is the bulk of the prior discussion). Logo was strongly influenced by Lisp and, consequently, is a multi-paradigm language including functional as one of its paradigms.

23 Sep 2021 21:46 GMT | #212 of 482 comments | View original comment

Paul Naukata commented on FD 100:

This was a great blast from the past. A few friends of mine and I would write down instructions to draw crude pictures in Logo; the usual sorts of things you'd expect from kids.

I'm sure lots of other kids did the same thing; kind of a fun way to sneak into writing programs —a low barrier to entry, and immediate results you could tinker with.

Is there something popular like this today?

23 Sep 2021 21:44 GMT | #211 of 482 comments | View original comment

DrCode commented on FD 100:

Lovely post, though it's weird to end in saying that this "gave me a brief taste of functional programming". Turtle drawing is arguably the most non-functional, stateful programming paradigm ever invented.

23 Sep 2021 21:14 GMT | #210 of 482 comments | View original comment

scohesc commented on FD 100:

Sili, Sort of related to games/graphics programming - There's an open source CAD program called OpenSCAD that allows you to create 3D models with code that can be simple, but gets complex fast. I personally tried using it to create models for 3D printing, but got overwhelmed and decided to go to other tools.

23 Sep 2021 21:09 GMT | #209 of 482 comments | View original comment

MrLeap commented on FD 100:

Sili, It can, and it does, sort of! There's a bit more boilerplate in most environments designed for shipping things, but one of the more high power/terseness activities is writing a shader that can render signed distance fields. The article at https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm compose a few of these together and you can manifest some pretty nuts infinity fractals. Here's a video I made playing with the functions provided: https://twitter.com/LeapJosh/status/1439876813258256385.

23 Sep 2021 20:59 GMT | #208 of 482 comments | View original comment

Sili commented on FD 100:

As someone who hasn't done graphics programming (or anything like this), it's amazing to me how simple directives can yield such things. Is this type of logic still used in games/graphic programming today?

23 Sep 2021 20:34 GMT | #207 of 482 comments | View original comment

HowerJ commented on May the Forth Be With You:

This made me smile. Thank you!

10 Sep 2021 21:03 GMT | #206 of 482 comments | View original comment

Z796 commented on May the Forth Be With You:

Keep Forth fun.

10 Sep 2021 14:27 GMT | #205 of 482 comments | View original comment

Pedrow commented on FD 100:

Baliex, I had an 8256. I read some code in a magazine showing how to draw fractals recursively (they were Koch snowflakes actually) and I had a lot of fun making more complex fractals using that basic recipe. The PCWs had a monochrome screen that was quite hi-res, certainly compared to what I was used to, which worked well for turtle graphics.

09 Sep 2021 08:02 GMT | #204 of 482 comments | View original comment

Abbe commented on FD 100:

That's exactly how I started programming too in 1994. :)

09 Sep 2021 02:33 GMT | #203 of 482 comments | View original comment

Baliex commented on FD 100:

"FD 100" was my introduction to programming too! This short post just brought it all back!

I've remembered for years that there was some for-loop syntax that I'd used as a kid. I knew it wasn't for so seeing REPEAT 360 [FD 1 RT 1] was quite a revelation for me just now! That's exactly what I was writing back then. I think my first instinct at the time was REPEAT 4 [FD 100 RT 90] and from there went on to draw pentagons, hexagons, and then at some point had a eureka moment and tried REPEAT 360 … mind blown!

I was using an Amstrad PCW 8512 and would love to hear from anyone else who had a similar experience.

08 Sep 2021 22:33 GMT | #202 of 482 comments | View original comment

Sedat Kapanoglu commented on FD 100:

I remember reading about Seymour Papert's Logo back in the 80's and getting blown away by how elegant and luxurious the language felt. But, the need to start Logo environment first in order to run a program kept me away from it so I kept working with BASIC and Assembly. That kind of friction matters a lot.

08 Sep 2021 21:30 GMT | #201 of 482 comments | View original comment

Tyler Duzan commented on FD 100:

Logo wasn't the first language I started with (that would be BASIC), but it is one I have many fond memories of from childhood. I used Logo later on to program microcontrollers used with Lego to build simple robots and machines. One of my proudest moments was building a functional prototype of a washing machine with selectable wash cycles. It allowed me to begin understanding many of the things which we find in the world that rely on small embedded electronics to function.

I wish there were programs like this for children these days in school. I know Scratch derived from Lego Logo and there's still things like Lego Mindstorm, but I don't think there are many common programs at least in the US to teach children programming and prototyping using these simple mechanisms.

08 Sep 2021 21:03 GMT | #200 of 482 comments | View original comment

Dvirsky commented on FD 100:

I started with Logo at school and it was a great teaching language and gave me a good basis (e.g. we did a ton of recursive stuff) and a passion for creating things with code.

08 Sep 2021 20:51 GMT | #199 of 482 comments | View original comment

Fullstop commented on Algorithms Channel Migrates to Libera Chat:

Yep, my channel (smaller, about 75 people) was unregistered and now some random unregistered person is an op. If I'm going to have to start over, why would I do it on Freenode after what they just did?

16 Jun 2021 12:57 GMT | #198 of 482 comments | View original comment

Lumost commented on Euler's Formula:

It's a unification of geometry and algebra in 2 dimensions, but generalizations beyond that are scarce. Effectively we're left with a solution where we can represent any space in dimensions modulo 2.

While quaternions and some higher dimensional complex numbers exist, is there a unified formula expressing Euler's formula for arbitrary numbers of dimensions? Is there one for an infinite dimension space?

04 Jun 2021 14:44 GMT | #197 of 482 comments | View original comment

User23 commented on Euler's Formula:

Visual Complex Analysis is the text that introduced me to this concept. The functions \( \cos \) and \( \sin \) suddenly look a lot like accessor functions for a two member object.

04 Jun 2021 13:36 GMT | #196 of 482 comments | View original comment

Cuspy Code commented on Euler's Formula:

In a way it's analogous to how Einstein's \( E = mc^2 \) is a special case of how the norm of the four-momentum is defined in special relativity, which is \( mc = \sqrt{(E/c)^2 - p^2 \}. For the special case of a stationary object we have \( p = 0, \) so \( E = mc^2 \) follows automatically. But the special case is somehow more memorable and more famous, and I believe something similar has happened with Euler's identity.

04 Jun 2021 13:24 GMT | #195 of 482 comments | View original comment

Vishnu Gupta commented on Euler's Formula:

It unifies algebra, trigonometry, complex numbers, and calculus.

I vividly remember my maths teacher impressing us upon what you stated. By far the best math teacher I had. He didn't work out the proof on the board but made us work it out, took us on a journey, him as a guide, so to speak.

04 Jun 2021 13:18 GMT | #194 of 482 comments | View original comment

Rnhmjoj commented on Euler's Formula:

Agreed, the full formula is much more intersting and deep: it shows there is a mapping between the reals and the circle group that preserves the structure (turns addition into multiplication). This concept leads to the very general exponential map of a Lie algebra to a Lie group and Pontryagin duality, which is the essence of Fourier transform.

04 Jun 2021 13:17 GMT | #193 of 482 comments | View original comment

Ollran commented on May the Forth Be With You:

Programming in Lisp or Forth is such fun since you can stretch the programming language itself. For me, the reflective approach keeps the fun in programming.

15 May 2021 06:14 GMT | #192 of 482 comments | View original comment

Long Long commented on Vim Sudo Write Trick:

Wonderful! I could have done with this trick the number of times I've been caught out with this one. Noted with thanks.

08 May 2021 15:27 GMT | #191 of 482 comments | View original comment

Ummwut commented on May the Forth Be With You:

Okay, this is cool.

08 May 2021 00:28 GMT | #190 of 482 comments | View original comment

BFox9900 commented on May the Forth Be With You:

That's fun!

07 May 2021 22:04 GMT | #189 of 482 comments | View original comment

Jens Alfke commented on May the Forth Be With You:

Also, if Yoda were a programmer, I think Forth would be his most favourite programming language. Yoda would say, "A Forth programmer I am. Hrmmm," and he would add two and two with, 2 2 +.

Old bumper sticker I remember seeing in the early 80s: FORTH ❤️ IF HONK THEN

04 May 2021 15:49 GMT | #188 of 482 comments | View original comment

Dennis Ng commented on Lisp in Vim:

Such a great article.

I really wish though there is a button to turn on and off so one can read only about Slimv or Vlime or both.

20 Apr 2021 04:10 GMT | #187 of 482 comments | View original comment

Danto Thomas commented on Global Palindrome Day:

Good information.

08 Jan 2021 17:13 GMT | #186 of 482 comments | View original comment

François Best commented on Microcentury:

We had a running joke in engineering school, that π seconds is close to a nanocentury by around 6 nanomonths, we obviously didnt go that far in calculations, so I wonder if it still holds.

20 Nov 2020 07:26 GMT | #185 of 482 comments | View original comment

Kevin Milner commented on From Vector Spaces to Periodic Functions:

6gvONxR4sf7o said:

Am I also reading it right that the author is saying the axiom of choice is equivalent to the statement that every vector space has a finite basis?

6gvONxR4sf7o, Not quite. The axiom of choice is equivalent to saying every vector space has a Hamel basis, which is to say every element can be represented as a finite combination of elements of the Hamel basis. It doesn't imply that the Hamel basis is finite itself.

24 Oct 2020 22:09 GMT | #184 of 482 comments | View original comment

LopsidedBrain commented on From Vector Spaces to Periodic Functions:

MathematicsPadawan, It is partly historical notoriety. It allows one to prove certain statements that seem counter-intuitive. So proofs that employ it can often be viewed with some skepticism.

Moreover, this axiom is independent of the other axioms in ZFC. It is in fact possible to have entirely self-consistent "worlds" of mathematics, ones where the axiom of choice is true, and ones where it is false.

More details and examples of alternate axioms are in the Wikipedia article: Axiom of choice.

If it seems weird that mathematics can give you contradictory results, remember that the difference only shows up when you deal with some form of infinity (e.g., when performing an operation on an infinitely large set). For any usage of mathematics in the real world, the truth or falsity of this axiom won't give you contradictory results.

24 Oct 2020 20:12 GMT | #183 of 482 comments | View original comment

Hansvm commented on From Vector Spaces to Periodic Functions:

Im3w1l, Well, sure. Without choice there exist models of ZF where those properties hold. Adding choice precludes those models — i.e., it restricts our axioms in a way which prevents certain kinds of unexpected results.

24 Oct 2020 19:32 GMT | #182 of 482 comments | View original comment

6gvONxR4sf7o commented on From Vector Spaces to Periodic Functions:

Shakow, Doh. Thanks.

24 Oct 2020 18:59 GMT | #181 of 482 comments | View original comment

Shakow commented on From Vector Spaces to Periodic Functions:

6gvONxR4sf7o, Identity function means that \( f(x) = x, \) not \( f(x) = 1. \)

24 Oct 2020 18:57 GMT | #180 of 482 comments | View original comment

6gvONxR4sf7o commented on From Vector Spaces to Periodic Functions:

I seem to be missing something. I'm reading this as looking for functions \( f \) and \( g \) from \( \mathbb{R} \) to \( \mathbb{R}, \) such that \( f(x) + g(x) = 1 \) and \( f(x + p) = f(x). \) If I were reading that correctly, then for any periodic \( f(x), \) \( g(x) = 1 - f(x) \) would do, meaning any old periodic function would do. What am I missing?

Am I also reading it right that the author is saying the axiom of choice is equivalent to the statement that every vector space has a finite basis? I don't get how that allows infinite dimensional vector spaces. If not, and it's just that every vector space has a basis that maybe infinite, then what's the justification of the Hamel basis being finite?

I feel like I'm missing a lot between the lines here.

24 Oct 2020 18:55 GMT | #179 of 482 comments | View original comment

Im3w1l commented on From Vector Spaces to Periodic Functions:

Hansvm, If I understand correctly, your examples are undecidable rather than true in ZF. That's why we can add the axiom of choice without getting contradictions.

24 Oct 2020 18:28 GMT | #178 of 482 comments | View original comment

hansvm commented on From Vector Spaces to Periodic Functions:

GenerationP,

There are counter-intuitive results in ZF without choice too:

More or less, our intuition about seemingly obvious ideas is completely thrown off without choice. Banach-Tarski at least has the property that it probably doesn't directly apply to the real world (if you can split an object into probably physically impossible sets and then rejoin them correctly then you can double the volume of the physical object) and so doesn't really violate our intuition — the premise doesn't apply in the real world, so no conclusion really matters. It's like claiming that every element of the empty set is a leprechaun with a pot of gold — it's true, but it doesn't matter in any meaningful sense.

24 Oct 2020 17:56 GMT | #177 of 482 comments | View original comment

qsort commented on From Vector Spaces to Periodic Functions:

MathematicsPadawan, Proofs (at least when they are written "the usual" way) are human-to-human communication, not human-to-machine encoding. A proof depending on the axiom of choice is a more interesting fact than it depending on, say, the axiom schema of specification, so it makes sense that the author might want to say "hey, pay attention to that".

24 Oct 2020 17:39 GMT | #176 of 482 comments | View original comment

GenerationP commented on From Vector Spaces to Periodic Functions:

MathematicsPadawan, Because it gets you applications like this (or the Banach-Tarski paradox), which make you wonder how much it deserves its place. To some extent this is more due to Tertium Non Datur than to the axiom of choice, but my impression is ZF doesn't know enough about infinite sets to get to the really counter-intuitive stuff.

24 Oct 2020 16:25 GMT | #175 of 482 comments | View original comment

MathematicsPadawan commented on From Vector Spaces to Periodic Functions:

The axiom of choice is allowed.

Why does this need to be stated explicitly? Why does the axiom of choice not enjoy the privilege of being a first-class axiom like other axioms? Why do many proofs need to state the assumption of this axiom explicitly before using it?

24 Oct 2020 15:37 GMT | #174 of 482 comments | View original comment

Andi commented on From Vector Spaces to Periodic Functions:

Jerry Bona said, "The axiom of choice is obviously true, the well-ordering principle obviously false, and who can tell about Zorn's lemma?"

24 Oct 2020 12:56 GMT | #173 of 482 comments | View original comment

Vcxy commented on Sticking With MathJax:

Esperent, Isn't the big difference equation numbering? If you actually like to label and eqref stuff, it's not really a replacement. You can get around this I guess, but for me, it's much easier if my basic LaTeX stuff works the same everywhere.

11 Oct 2020 14:21 GMT | #172 of 482 comments | View original comment

Esperent commented on Sticking With MathJax:

Huh, I never knew that. Well in any case the differences are minor so you can just replace align with aligned.

11 Oct 2020 13:01 GMT | #171 of 482 comments | View original comment

Susam Pal commented on Sticking With MathJax:

Yes, the aligned environment is a different environment. The aligned environment is available in MathJax too. This environment is meant to be a part of a larger displayed math block, i.e., it goes between \[ and \] or $$ and $$. The align environment, on the other hand, is a standalone environment that can be used outside displayed math block.

While the aligned environment is supported by both MathJax and KaTeX, the align environment is supported by MathJax only.

11 Oct 2020 12:37 GMT | #170 of 482 comments | View original comment

Esperent commented on Sticking With MathJax:

For some reason in KaTeX you have to use \begin{aligned} instead of \begin{align} but it works.

11 Oct 2020 11:52 GMT | #169 of 482 comments | View original comment

Botyrbjt commented on Hacktoberfest Spam:

Unix Hero, This has become a pet peeve of mine ever since a former co-worker told me his scheme of setting up a cronjob to add a single commit with a timestamp to a project on his Github profile on a daily basis, so future employers would think he was a 10xer or something to that effect.

03 Oct 2020 00:24 GMT | #168 of 482 comments | View original comment

908B64B197 commented on Hacktoberfest Spam:

Justin, This assumes that the spammers can code/contribute in a meaningful way.

02 Oct 2020 23:19 GMT | #167 of 482 comments | View original comment

srtjstjsj commented on Hacktoberfest Spam:

The Physicist, Don't waste your time. The people doing this don't know anything about programming.

There's no reason to ever look at or respond to PR from someone who doesn't at least have their own repo (or at least a fork of a repo) with non trivial commits (at least to a toy/learning project)

02 Oct 2020 16:03 GMT | #166 of 482 comments | View original comment

Falcolas commented on Hacktoberfest Spam:

Why would you need dozens of PRs for this?

To get at least one through the spam filters.

02 Oct 2020 14:44 GMT | #165 of 482 comments | View original comment

DPCX commented on Hacktoberfest Spam:

Justin, The problem is that this takes time. On one PR, sure, okay. But if you have 50 of the spammy PRs, even with copy and paste, this will take several minutes (maybe up to an hour) of a maintainer's day (and really, per day, however long Hacktoberfest goes on). That's time that they're not spending coding or updating docs in a valid way or spending with family. It would probably be tenable if there were some heuristic that was 100% certain that this was a spammy PR, but I'm pretty sure that's not the case.

02 Oct 2020 14:00 GMT | #164 of 482 comments | View original comment

R-W commented on Hacktoberfest Spam:

Unix Hero, Spam is like weeds: it is anything excessive, unwanted, and relatively useless.

02 Oct 2020 13:34 GMT | #163 of 482 comments | View original comment

Johannes commented on Hacktoberfest Spam:

They're doing this so that they can put "I have x amount of accepted pullrequests on github" and fool an employer to hire them.

Yes, I have seen a bunch of those on popular repositories over the years. It is an annoyance, but usually so little, even on popular repos (I contributed much to PHP as example of project size) that it's easy to ignore (or even simply merge if it's somewhat useful, the fooling won't lead them far).

The difference with this marketing stunt is that there is way more active encouragement for that and way more of it at once, multiple a day instead of one every few months.

02 Oct 2020 09:34 GMT | #162 of 482 comments | View original comment

M463 commented on Hacktoberfest Spam:

The major incentive here is a free T-shirt.

...that you can wear to an interview?

02 Oct 2020 09:18 GMT | #161 of 482 comments | View original comment

Xunjin commented on Hacktoberfest Spam:

Unix Hero, The episode name would be something like "haker man" And Ricky (drunk like always) would probably say, "Morty, gonna tell you something, everybody these days call themselves 'programmers/coders/hackers' but all they do is watch a Javascript course, barely, type some stupid shit like 'Hello World' and they feel like a great scientist Morty. You really understand how stupid this is, Morty?! They share that in all the 'social media' trendy moron stuffy like Twitter, a place even more cancerous than me Morty. In the end Morty, burrp, I'm actually the Genius who discovered Time Travel and invented the Portal Gun."

02 Oct 2020 09:07 GMT | #160 of 482 comments | View original comment

Chef Koch commented on Hacktoberfest Spam:

The major incentive here is a free T-shirt.

Why would you need dozens of PRs for this?

02 Oct 2020 08:54 GMT | #159 of 482 comments | View original comment

Danny W commented on Hacktoberfest Spam:

Raxxorrax, These contributions are junk and spam. I don't think any maintainer will be upset if they get 100 legitimate and well intentioned pull requests, but we're talking about spam here.

02 Oct 2020 08:52 GMT | #158 of 482 comments | View original comment

Justin Clift commented on Hacktoberfest Spam:

The Physcist, Yeah. Best approach I can think of would be something like:

Cool, looks like you've getting the hang of creating Pull Requests on GitHub. :)

The actual change here though isn't useful to us. :(

Would you be ok spending some time improving [XYZ] instead? :)

Combine encouragement for the bit they got right, add information on what needs work, and point them in the right direction for fixing it.

Some people will probably just not be bothered, but others might get involved in the suggested way. Hopefully. :)

02 Oct 2020 08:49 GMT | #157 of 482 comments | View original comment

Raxxorrax commented on Hacktoberfest Spam:

Unix Hero, It is for publicity purposes of digital ocean. Gray area, they do incentivize participation in open source but also are responsible for this hug of death.

02 Oct 2020 08:46 GMT | #156 of 482 comments | View original comment

Unix Hero commented on Hacktoberfest Spam:

Bauerd, Good point. I guess that's even worse. Hillarious really. Like something out of a Rick and Morty episode. You couldn't make this up.

02 Oct 2020 08:35 GMT | #155 of 482 comments | View original comment

Bauerd commented on Hacktoberfest Spam:

Unix Hero, The major incentive here is a free T-shirt.

02 Oct 2020 08:05 GMT | #154 of 482 comments | View original comment

Unix Hero commented on Hacktoberfest Spam:

But this is not spam. It's based on morons trying to make it in the software world without any basis that they should be there.

They're doing this so that they can put "I have x amount of accepted pull requests on github" and fool an employer to hire them. To become shit team members or outsourced to become shit offshore team members.

I have seen these kinds in many a project. Real world experience. Real talk.

02 Oct 2020 07:55 GMT | #153 of 482 comments | View original comment

The Physicist commented on Hacktoberfest Spam:

I also received one pull request that I thought was spam, where the author made several nonsensical changes like changing "#Features" into "#Features:" in the README. Now it makes sense.

I'll probably tell thank them for their contribution and point out a few ideas for things that would really help us, instead of merging this just for the sake of Hacktoberfest.

02 Oct 2020 06:26 GMT | #152 of 482 comments | View original comment

Eschborn commented on From Vector Spaces to Periodic Functions:

This is a nice example for why the axiom of choice is controversial. The proof from this blog post only works because of it. However, the result seems counter-intuitive. Let us have a look at whether this is only our intuition being off or whether functions with these properties are just "weird".

When speaking of periodic functions the first that comes to mind is the \( \sin \) function. Can something similar to such a function be used to construct the functions \( g \) and \( h \) from the blog post? If we define them similar to \( \sin \) as periodic and continuous, then the answer is no. Every periodic and continuous function has a maximum value. The sum of two functions with a maximum value has a maximum value. However, the identity is unbounded. The sum can therefore not be the identity.

Okay, so \( \sin \)-like functions are out. What about \( \tan \)-like functions? Take \( \tan(x) \) and \( -\tan(2x) \) for example. Those are not continuous everywhere. Well, we can also rule out many functions like this. Suppose \( g \) and \( h \) are two periodic functions with period lengths \( a \) and \( b. \) If \( \frac{a}{b} \) is rational, then the sum of \( g \) and \( h \) cannot be the identity function. Suppose that \( \frac{a}{b} \) was rational, then \( ab \) is a common period of both functions, i.e., \( g(x) = g(x + ab) \) and \( h(x) = h(x + ab). \) It follows that \( (g + h)(x) = (g + h)(x + ab). \) As \( a \) and \( b \) are non-zero, it follows that \( g + h \) cannot be the identity function. Functions of the form \( a \tan(bx) \) for rational \( b \) thus do not work. Any two periodic functions where you can reason about their sum by just looking at what happens for individual periods are thus ruled out.

My conclusion is that the two periodic functions from the blog post must look "weird".

A common theme with axiom of choice proofs is also that they show the existence of something but give no hint at how this something actually looks like. The proof in this blog post is a good example of this. We know that the functions "exist" but have absolutely no clue about how they look like. It is also an open question whether describing them in any other way than "the function from this proof" is even possible.

24 Sep 2020 09:15 GMT | #151 of 482 comments | View original comment

Hai Vu commented on File Transfer with SSH, Tee, and Base64:

Really nice article. I never thought such things can be done. A use case that I can think of is logging SSH sessions and see what I've done with them.

23 Sep 2020 11:09 GMT | #150 of 482 comments | View original comment

Pavan commented on Obfuscated Main:

I did not know earlier that this post is where this code snippet came from. Really cool reading about it now. This post is from 13 years ago! Wow!

21 Sep 2020 10:09 GMT | #149 of 482 comments | View original comment

Notya Bisnes commented on Combinatorics Coincidence:

Whirligig, Now that you mention it, that's pretty much the case. I don't know why I got hung on the "coincidence" thing. How dumb can I be, haha.

19 Sep 2020 19:41 GMT | #148 of 482 comments | View original comment

Whirligig commented on Combinatorics Coincidence:

Notya Bisnes, I think the story is that they both came up with reformulations of the same problem and asked them to each other over the same lunch. I for one find that quite amusing.

19 Sep 2020 19:25 GMT | #147 of 482 comments | View original comment

JadeNB commented on File Transfer with SSH, Tee, and Base64:

Honestly, I find it distasteful to have to spend time working around somebody's incompetence at securing systems.

Doing it on your time means you delay delivering on your project and you let whoever did this get away with wasting everybody elses time.

Lmilcin,

While it may be distasteful, what's the alternative? Refusing on principle to use a system configured in a way you don't like is way more likely to hurt you than it is to hurt anyone else, especially the person who configured the system.

Even if you are doing work for someone else (which, I think, is not indicated in the post), so that that person will be affected by your principled refusal, there's no guarantee that they're the ones who misconfigured the environment in which you're operating.

17 Sep 2020 16:19 GMT | #146 of 482 comments | View original comment

JadeNB commented on File Transfer with SSH, Tee, and Base64:

Susam, Your patience in (re-)explaining this constraint to everyone in this thread who thinks you don't know your way around standard Unix tools is impressive. :-)

17 Sep 2020 16:13 GMT | #145 of 482 comments | View original comment

Lmilcin commented on File Transfer with SSH, Tee, and Base64:

Honestly, I find it distasteful to have to spend time working around somebody's incompetence at securing systems.

Doing it on your time means you delay delivering on your project and you let whoever did this get away with wasting everybody elses time.

17 Sep 2020 15:55 GMT | #144 of 482 comments | View original comment

Susam Pal commented on File Transfer with SSH, Tee, and Base64:

Djent, I mentioned in my blog post that there is an SSH gateway in between that blocks port forwarding, so your solution is not going to work.

For example, say, I run the following command:

ssh -L 9000:127.0.0.1:8000 HOST

Now when I visit http://127.0.0.1:9000/ on my local system, I get a "connection reset by peer" error. At the same time, on the terminal where I have set up the port forward with the ssh command above, I get this error:

open failed: unknown channel type

The SSH gateway forbids port forwarding as well.

17 Sep 2020 15:36 GMT | #143 of 482 comments | View original comment

Djent commented on File Transfer with SSH, Tee, and Base64:

This seems like a CTF trick. If I were faced with this problem, I would do an SSH local port forward, and then just wget the file, hosted locally with python -m SimpleHTTPServer.

17 Sep 2020 15:35 GMT | #142 of 482 comments | View original comment

Susam Pal commented on File Transfer with SSH, Tee, and Base64:

Silviot, I mention in my blog post that the SSH gateway in between forbids execution of remote commands without a login shell, so your solution is not going to work in such an environment.

17 Sep 2020 15:35 GMT | #141 of 482 comments | View original comment

Silviot commented on File Transfer with SSH, Tee, and Base64:

My solution in these cases:

ssh HOST tar cjf - /path/to/folder | tar xjf -

Basically I ask ssh to execute tar on the remote host to create a compressed archive. ssh will output the archive contents on the local host; this data is then passed on to a local tar for extraction.

17 Sep 2020 15:34 GMT | #140 of 482 comments | View original comment

Susam Pal commented on File Transfer with SSH, Tee, and Base64:

NRClark, I mention in the first two paragraphs of my blog post that the SSH gateway in between forbids execution of remote commands without a login shell, so your solution is not going to work in this environment.

17 Sep 2020 15:27 GMT | #139 of 482 comments | View original comment

NRClark commented on File Transfer with SSH, Tee, and Base64:

The instructions in this article should work, but they're more complicated than necessary maybe. If you don't have scp, you can usually just do something like this:

ssh HOST cat remote_file > local_file
17 Sep 2020 15:25 GMT | #138 of 482 comments | View original comment

Notya Bisnes commented on Combinatorics Coincidence:

I wouldn't call it a coincidence since to me the pseudocode problem is basically a reformulation of the original problem in terms of the recurrence relation.

But the way to solve it is quite neat. Especially the combinatoric argument.

16 Sep 2020 20:07 GMT | #137 of 482 comments | View original comment

BJO commented on Unix Timestamp 1600000000:

leap seconds

Over long periods of time the approximation that a day takes 86400 SI seconds becomes less and less accurate as the rotational period of the Earth changes. I wish calendars would be either purely astronomical in nature or purely SI in nature. Hybrid systems like UTC become more and more messy over time as the amount of adjustment needed increases. We've had ~25 leap seconds in UTC already, and it's a relatively young calendar system.

I also wish we would change the name of the SI measurement "second". An SI second and an astronomical second are two different things, and deserve two different names.

13 Sep 2020 21:12 GMT | #136 of 482 comments | View original comment

Leo Woo commented on Unix Timestamp 1600000000:

I can already hear people from 2033 celebrating 2 billion.

13 Sep 2020 06:32 GMT | #135 of 482 comments | View original comment

Dylan commented on Unix Timestamp 1600000000:

4_100_000_000 - 2099-12-03 16:53:20

We're going to party like it's 2099! Watch out for that Y2K + 100 bug!

12 Sep 2020 18:24 GMT | #134 of 482 comments | View original comment

Eric Barrett commented on Unix Timestamp 1600000000:

The datetime package is one of the best things about Python, and dare I say one of the best general purpose calendar modules ever written. It's just so practical.

12 Sep 2020 17:55 GMT | #133 of 482 comments | View original comment

Akir commented on Good Quality DOSBox Video Capture:

I'm glad that the author thought to correct the aspect ratio for these captures. That's the thing that bugs me about emulating old systems (almost always 'high resolution' PC screen modes); they tend to only want to display a pixel-accurate picture. That's all well and good, but it's not visually accurate; it stretches out the artwork kind of like you're watching old 4:3 TV shows stretched to fit a 16:9 display.

12 Sep 2020 17:46 GMT | #132 of 482 comments | View original comment

Rish commented on Good Quality DOSBox Video Capture:

When I had Windows, I used D-Fend Reloaded to manage my DOS game library. It has no updates since 2015 though. It was pretty good for installing and organizing games. These days we can play them online directly.

Have you tried streaming games in full screen mode? For me it works in window mode only.

12 Sep 2020 16:49 GMT | #131 of 482 comments | View original comment

Diehunde commented on Pointers in K&R:

I don't know. I read the pointers chapter at least 3 times, and I still get confused when I see pointer stuff in real code. The other day, I read the famous regex post by Russ Cox, and it took me a couple of hours to understand the pointer parts of the code even though the algorithm behind it was relatively simple. I guess pointers are just one of those things that for some people make a lot of sense, whereas others struggle with.

11 Sep 2020 14:51 GMT | #130 of 482 comments | View original comment

Dhghomon commented on FD 100:

REPEAT 20 [REPEAT 180 [FD 1 RT 2] RT 18]

It's a great image because it reminds me exactly of what we used to do, especially the REPEAT 180 with RT 2 instead of REPEAT 360 to avoid repeating the circle twice since the circle looks the same anyway on those monitors. Once you move up to RT 3 or more it begins to look a bit more like a polygon.

08 Sep 2020 05:30 GMT | #129 of 482 comments | View original comment

DPisfun0nufispd commented on FD 100:

Thanks for sharing. What a cool story! That must have been a unique time to grow up. Going through adolescence a decade later, computers and the software they ran had advanced significantly enough that the thought of trying to code anything at that age was never even considered.

Your story helped me live through that era vicariously and I can imagine it would have been fascinating to my younger self as well.

07 Sep 2020 23:37 GMT | #128 of 482 comments | View original comment

Microtherion commented on Pointers in K&R:

Rather more surprising, at first sight, is the fact that a reference to a[i] can also be written as *(a+i).

I did not find that all that surprising, but the first time I saw that a[i] can also be written as i[a], I was very irritated.

05 Sep 2020 19:54 GMT | #127 of 482 comments | View original comment

Disown commented on Pointers in K&R:

K&R is easily one of the best CS/programming books. Short, concise and to the point.

Another way to learn pointers is via assembly. Either learn assembly or just look at the disassembled code. Look under the hood and it'll become clearer.

Of course the best way is to write your own C compiler but that may be overkill for most.

05 Sep 2020 16:35 GMT | #126 of 482 comments | View original comment

Hubryan commented on From Vector Spaces to Periodic Functions:

Linear algebra, all powerful.

01 Sep 2020 22:10 GMT | #125 of 482 comments | View original comment

Hillel Wayne commented on Microcentury:

I like this analysis a lot! But there's one more twist to the story: are we even using the right definition of year? There's actually several different ways we can define a year:

For each of these we can define the microcentury as a hundred microyears. So the sidereal microcentury is +35.81 seconds, while the tropical microcentury is +35.69 seconds. The NIST microcentury is +33.6 seconds, while the Julian microcentury is +35.76 seconds (as you calculated).

Personally, I'd define a calendar microcentury as a four-millionth of 400 years to match the leap year cycle. That'd give us +35.692 seconds.

18 Jul 2020 19:07 GMT | #124 of 482 comments | View original comment

Ivo commented on Microcentury:

If we consider optimal attention span, a microcentury is much too long. Two half microcenturies with a pause in between would be better.

18 Jul 2020 10:59 GMT | #123 of 482 comments | View original comment

Thaumasiotes commented on Leap Year Test in K&R:

For those who were curious why these could both work, note that (A && B) || C differs from A && (B || C) in two cases: when A is false, C is true, and B is any value.

But in this case in particular, those differences would create a bug when A is false (the year is not divisible by 4) at the same time that C is true (the year is divisible by 400). Since that can't happen, the bug cannot occur.

01 Mar 2020 22:30 GMT | #122 of 482 comments | View original comment

Jean Marc S commented on Debian Releases and Toy Story:

Mine was a Debian 5. Installed it on a small baremetal server for a client.

The client went away, and so did I.

Then some month ago, the client came back. The Debian 5 is still online and still running (but we plan to move on a new infra with a Buster soon).

29 Feb 2020 21:20 GMT | #121 of 482 comments | View original comment

Winrid commented on Debian Releases and Toy Story:

Debian3, I guess your name gives it away.

My first was Debian 4. Ran it on a 550mhz PIII.

29 Feb 2020 19:44 GMT | #120 of 482 comments | View original comment

K0stas commented on Debian Releases and Toy Story:

I always ordered mine from Walnut Creek!

29 Feb 2020 18:10 GMT | #119 of 482 comments | View original comment

Debian3 commented on Debian Releases and Toy Story:

Mine was Debian 3. Still running all my servers in Debian.

29 Feb 2020 18:08 GMT | #118 of 482 comments | View original comment

Tom commented on Debian Releases and Toy Story:

Yup. I don't have the pleasure of working with Linux at my current job nearly as much as the last one, but Debian was (and still is) my preferred distro for running servers.

29 Feb 2020 18:03 GMT | #117 of 482 comments | View original comment

Geoff Bailey commented on Temperature Conversion:

An alternative approach to the accurate conversions, that may be easier to remember because it is more symmetric, is to first shift the temperatures so that the common value (-40) is the zero point, then scale, then shift back, that is, \begin{align*} f & = (c + 40) \cdot \frac{9}{5} - 40, \\ c & = (f + 40) \cdot \frac{5}{9} - 40. \end{align*} The formula "looks" the same for each direction, just with inverted scaling factors.

29 Feb 2020 12:05 GMT | #116 of 482 comments | View original comment

Garand commented on Debian Releases and Toy Story:

My first Debian install was 2.0. I ordered the CD's (there were 2, as I remember) from an on-line shop that sold burned CDRs with Linux images.

09 Feb 2020 17:40 GMT | #115 of 482 comments | View original comment

smegnose commented on Global Palindrome Day:

Hahahajaha. "Middle Endian"! When will Americans just admit they're the only country that managed to screw up their date syntax. Just switch to ISO already so you can keep the month-day sequence, and no one can possibly mistake which number the year is.

02 Feb 2020 12:24 GMT | #114 of 482 comments | View original comment

snowe2010 commented on Global Palindrome Day:

Wow! Pretty significant since the last one was 908 years ago. Next one isn't for 101 years!

02 Feb 2020 06:38 GMT | #113 of 482 comments | View original comment

Thorrez commented on Global Palindrome Day:

Little endian notation is somewhat mixed endian itself, because it contains 3 numbers, each number by itself is big endian, but the 3 numbers are arranged in little endian fashion amongst each other.

02 Feb 2020 06:08 GMT | #112 of 482 comments | View original comment

skrebbel commented on Global Palindrome Day:

I love the term "middle endianness" and how clearly it highlights how nuts the American date notation is.

FWIW, in my native language, most numbers from 100 and 1000 are pronounced middle endian, so I'm not complaining.

02 Feb 2020 05:42 GMT | #111 of 482 comments | View original comment

ph2082 commented on Global Palindrome Day:

So it happened like 900 years ago and after the next one it will almost take 900 years for it to happen again. And I am alive on one of this rare event. Need to cut cake. :)

02 Feb 2020 03:46 GMT | #110 of 482 comments | View original comment

Sherif commented on Temperature Conversion:

Thanks a lot for sharing this neat trick. I just moved to North America and I just suffer as much. Doubling and adding 30 is awesome.

I came to your blog from another post by someone about MathB.in, love it. Thanks for making it!

03 Jan 2020 07:49 GMT | #109 of 482 comments | View original comment

MimicSquid commented on Sinkholed:

I'm glad that this particular instance was resolved reasonably gracefully, but all it would have taken is a less informed or connected victim and it would have been so much worse.

12 Dec 2019 19:35 GMT | #108 of 482 comments | View original comment

lancebeet commented on Lisp in Vim:

Thank you for the explanation.

08 Dec 2019 19:49 GMT | #107 of 482 comments | View original comment

Susam Pal commented on Lisp in Vim:

The "vim-slime" plugin is not appropriate for my blog post because it is nothing like SLIME. In fact, the word "slime" in "vim-slime" is poorly chosen. It supports none of the SLIME features. It does not even provide the "connected REPL" experience like SLIME, Slimv, or Vlime does. Here are the major reasons why vim-slime is very limited and insufficient as a Lisp development environment when compared to SLIME, Slimv, or Vlime:

  1. It does not understand s-expressions. It can only send the current text paragraph or text selected in visual mode to a terminal running in GNU Screen, tmux, Neovim, etc. Therefore, it cannot send, say, only the current expression or an entire function definition or a top-level form to the terminal.
  2. Since it is language-agnostic and really only sends text from a buffer to a terminal, it does not care whether the text is code or prose. It also does not care if the terminal is running a Unix shell or a REPL. It is the user's responsibility to ensure that the correct REPL is running on the terminal and the corresponding code is being sent from Vim using vim-slime.
  3. Since it does not implement the client-server architecture that SLIME and Swank implement together, it has none of the interactive debugging features of SLIME. It cannot automatically launch the integrated Slime Debugger (SLDB) when an unhandled condition occurs. As a result, all debugging features like inspecting code, inspecting variables, etc. are missing.
  4. Almost all of the SLIME features are missing from it. It does not support displaying argument lists as we type function calls, Common Lisp HyperSpec (CLHS) lookup and completion, describing symbols, cross-referencing, etc.
  5. It does not provide any key-bindings for common tasks such as macro expansion, function tracing, etc.

Swank server is an integral component of SLIME. It is essential to the way SLIME works. A plugin that does not talk to Swank server can hardly be anything like SLIME. Slimv and Vlime on the other hand talk to the same Swank server that SLIME talks to. Slimv and Vlime are re-implementations of the client component of SLIME. They send SLIME commands to Swank just like SLIME does. As a result, Slimv and Vlime are able to support a good portion of the features available in SLIME.

08 Dec 2019 18:32 GMT | #106 of 482 comments | View original comment

lancebeet commented on Lisp in Vim:

I wonder why the author doesn't mention the plugin vim-slime, given that it seems to be more popular than either Slimv or Vlime on GitHub. From what I can gather, Slimv and Vlime are more focused on Lisp with built-in completion and debugging whereas vim-slime is language agnostic and simply recreates just the "connected REPL" behavior of Slime.

08 Dec 2019 15:56 GMT | #105 of 482 comments | View original comment

dcassett commented on Lisp in Vim:

IMHO a very well-written article with great attention to detail. I especially liked the section on paredit with its step-by-step explanation.

08 Dec 2019 14:55 GMT | #104 of 482 comments | View original comment

Samuel Klein commented on Sinkholed:

Thank you for this. We are definitely seeing the declining use of centralized domain-resolution. It has advantages only when it is not itself being gamed, and increasingly companies and governmental orgs have found ways to do just that. At the very least every domain should have dual central + decentral resolutions, and browsers should give you options when the resolutions conflict.

04 Dec 2019 21:35 GMT | #103 of 482 comments | View original comment

Dylan Pyle commented on Sinkholed:

A couple of years ago we lost our domain (see The Duct Tape Holding the Internet Together) due to a registrar (that we were not a customer of) erroneously issuing a suspension. The amount of honor system involved in the whole process, particularly in ccTLDs without as much oversight, was really surprising.

04 Dec 2019 17:01 GMT | #102 of 482 comments | View original comment

vld commented on Sinkholed:

As a small business owner, this terrifies me. Since the TTL for NS records is 48 hours, a domain takeover like this could easily bankrupt a lot of SaaS companies.

What options are there to prevent this? Would a registrar such as MarkMonitor provide at least some notice or protection?

04 Dec 2019 16:57 GMT | #101 of 482 comments | View original comment

monkeynotes commented on Sinkholed:

Someone less technical would likely have no idea what happened to their domain. An individual relying on their web presence for income could be massively impacted by something like this. There really does not seem to be a clear way for someone to a) know what the problem is, and b) get it resolved quickly.

04 Dec 2019 14:01 GMT | #100 of 482 comments | View original comment

Yves Dorfsman commented on Sinkholed:

The scariest part is that it looks like this got resolved quickly only because your tweet got noticed and retweeted. I wonder how long it would have taken otherwise.

04 Dec 2019 13:39 GMT | #99 of 482 comments | View original comment

Tim Nolet commented on Sinkholed:

Props to you by reacting suitably: worried, but calm and measured and not jumping on some Twitter outrage bandwagon.

04 Dec 2019 10:44 GMT | #98 of 482 comments | View original comment

Andy Beaumont commented on Sinkholed:

This was a really good write up, thank you. And congratulations on getting your domain back.

04 Dec 2019 10:03 GMT | #97 of 482 comments | View original comment

jka commented on Sinkholed:

Automated legal actions and takedowns like this introduce a lot of risk of collateral damage but I wonder what the alternatives are.

The investigators would likely argue that notifying domain holders would reduce the chance that they can take down a botnet's infrastructure successfully, which seems likely.

Could there be some maximum time after which the 'rule set' for the auto-takedown code needs to be made open source/public? It must presumably be implemented as software and/or configuration files.

That would at least allow for inspection, confirmation and disputes about how it's implemented, and if this was 30 days or so, it shouldn't risk the takedown effort.

While top-tier network engineers are developing takedowns like this, presumably they'll do a good job of minimizing false positives - but as this case shows, it's not always going to be perfect - and I worry that if it becomes more common, we'll see sloppier implementations.

That could lead to connectivity and access issues for more users (again in an international context). It's great that the situation was resolved in this case but I imagine not all users would be able to raise a complaint at a similar level of technical detail and respectful tone and for it to receive the same amount of attention.

Maybe that's untrue. Maybe injustices really do get amplified by social media and relying on companies to notice this 'works'. It doesn't sit particularly well with me as a remediation process though, and I'm not sure it scales.

04 Dec 2019 09:34 GMT | #96 of 482 comments | View original comment

Richard Kirkendall commented on Sinkholed:

Susam, I'm glad we were able to get this resolved for you and I apologize for the inconvenience and the scare this caused you.

03 Dec 2019 15:57 GMT | #95 of 482 comments | View original comment

Randall Degges commented on Writing Boot Sector Code:

This is a great introduction to writing boot sector code! Really brings back memories. So awesome.

03 Dec 2019 15:57 GMT | #94 of 482 comments | View original comment

Jerome JH commented on FD 100:

How my, so many souvenirs. Especially the one when our teacher took us to the courtyard and had us do the turtle in real life, him giving the instructions.

30 Oct 2019 12:37 GMT | #93 of 482 comments | View original comment

Mike commented on FD 100:

For all you Logo fans out there, you should really play Duskers. It's "Logo meets Aliens".

28 Oct 2019 13:50 GMT | #92 of 482 comments | View original comment

8LJF commented on FD 100:

The true beauty of Logo comes in the realization that you can add your own words to it, and that all these specialist words you devise are themselves first-class citizens of the language, of syntax and status equal to its generic builtins. For example:

TO CIRCLE
REPEAT 360 [FD 1 RT 1]
END

TO FLOWER
REPEAT 20 [CIRCLE RT 18]
END

And so on ad infinitum, until you arrive at a complete custom vocabulary that concisely and precisely expresses the particular concepts and behaviors of interest and importance to you. In doing so, you move from thinking algorithmically (which is glorified spaghetti) to thinking compositionally, which is the key to scalability – managing complexity as your needs and ambitions grow.

Whereas Algol-y languages treat user-defined vocabulary as second-class citizens, beneath their own privileged built-ins. Which is a ridiculous status when you consider which is actually important to the user: precise, powerful, tailored words that describe their particular problem, or the crude primitive undifferentiated building blocks that the language dumps out of the box?

The beauty of bottom-up programming, as any Lisp fule know :), is that it endlessly tests your own understanding of the problem domain: to define effective, productive words you must have some idea of what you're talking about; you can't help but learn the foundations of the problem space as you go. There's a basic humility to this approach; there's nowhere to hide laziness or ignorance.

Whereas in top-down programming it's much too easy for highly-educated highly-paid absolute know-nothings to bullshit eternally, constructing great theatrical class architectures; grand mechanical castles in the sky that look all very difficult and impressive to observers while never saying anything relevant or useful.

That key switch from algorithmic to compositional thinking is not a natural conceptual leap for self-learners – it takes a carefully directed prod at a particular point in the learning curve to jump those rails – but it opens up worlds. #PlatosCave

28 Oct 2019 11:21 GMT | #91 of 482 comments | View original comment

Wiz21C commented on FD 100:

In the same vein:

CALL -151

That was the entry point to Apple 2's "monitor", i.e., bare bones assembler. Not the most beautiful but very evocative. Gave me a sense of power. :-)

28 Oct 2019 06:42 GMT | #90 of 482 comments | View original comment

Mihir Chaturvedi commented on FD 100:

Oh man, PC Logo takes me back down the memory lane. We were introduced to PC Logo in 4th grade. That's about 9 years ago. I instantly fell in love with it. The amount of power I had over the computer - ordering it to draw what I want, how I want, was really exciting.

My father had installed Kubuntu on our home computer which had an amazing suite of educational applications, including KTurtle which was (almost) the same as PC Logo. I got so addicted to it, my father suggested me to create a blog and regularly update it with the drawings and the code for it. And so I did! Good times :).

28 Oct 2019 06:21 GMT | #89 of 482 comments | View original comment

Michiel Trimpe commented on FD 100:

Logo was the best!

I still remember my father 'explaining' me Pythagoras theorem when I was around 5 to show me how to draw the roof of a house on our hand-soldered Philips Apple II clone.

I've been hooked ever since.

The best thing was that 25 years later I opened a Logo emulator again and when faced with having to clean the screen somewhere deep, deep from my muscle memory the right command sprang forward: CLEARSCREEN.

28 Oct 2019 05:52 GMT | #88 of 482 comments | View original comment

Tom commented on Good Quality DOSBox Video Capture:

Wow, Flashback! I too started with Logo. I didn't know that it's related to Lisp.

01 Sep 2019 13:01 GMT | #87 of 482 comments | View original comment

ForOldHack commented on Good Quality DOSBox Video Capture:

Nice work. I was in shock when I saw the splash screen. I had used IBM BASIC from July 1980 until Sept 1983, when I took a Pascal class. I was taking Fortran on the mainframe, Cobol on the mini, and Pascal on a PC. I had seen Logo on a Apple ][ but I was more interested in data processing.

01 Sep 2019 10:20 GMT | #86 of 482 comments | View original comment

Frutiger commented on Writing Boot Sector Code:

That's correct. UEFI firmware will execute a PE image (the same format that Windows executables use) on a FAT32 file system, and can access UEFI services to execute a kernel.

The UEFI firmware may support a CSM (compatibility support module) that can boot a legacy BIOS loader.

04 Aug 2019 17:02 GMT | #85 of 482 comments | View original comment

leo89 commented on Writing Boot Sector Code:

It may work with UEFI if it's set to compatibility mode.

04 Aug 2019 17:00 GMT | #84 of 482 comments | View original comment

non-entity commented on Writing Boot Sector Code:

Boot sector programming has always seemed like one of the cooler ways to play with writing lower level code, but am I wrong to assume it won't work on systems with UEFI?

04 Aug 2019 16:31 GMT | #83 of 482 comments | View original comment

u801e commented on Temperature Conversion:

The way I convert is to remember that 32 °F is 0 °C and then count by "nines" for Fahrenheit to get the desired temperature in Celsius.

32 °F = 0 °C
41 °F = 5 °C
50 °F = 10 °C
59 °F = 15 °C
68 °F = 20 °C
77 °F = 25 °C
86 °F = 30 °C
95 °F = 35 °C

It's also pretty easy to remember that 10 °C = 50 °F and 35 °C = 95 °F if you want to go forward or back from there with the same counting method.

21 Jul 2019 15:36 GMT | #82 of 482 comments | View original comment

michelpp commented on Temperature Conversion:

It doesn't help much for people visiting here in the US, but when I travel outside the country I use this handy rhyme: 30 is hot. 20 is nice. 10 is cold. 0 is ice.

21 Jul 2019 15:20 GMT | #81 of 482 comments | View original comment

Eric commented on Temperature Conversion:

16 °C = 61 °F. Much more useful summer conversion temperature in Ireland.

21 Jul 2019 15:05 GMT | #80 of 482 comments | View original comment

Susam Pal commented on Temperature Conversion:

−40 °C = −40 °F.

A related joke:

Saul: It's −40 outside.

Paul: Fahrenheit or Celsius?

Saul: When it's that cold, it's impossible to tell the difference.

21 Jul 2019 11:46 GMT | #79 of 482 comments | View original comment

Philipps commented on Temperature Conversion:

20 °C = 68 °F
30 °C = 86 °F

21 Jul 2019 11:40 GMT | #78 of 482 comments | View original comment

Phillip B commented on From Vector Spaces to Periodic Functions:

Very nice solution! It is quite interesting that this does not work for \( e^x. \) I wonder if there is any general way to tell for any function.

04 Feb 2019 01:15 GMT | #77 of 482 comments | View original comment

RB commented on ADAC and HE Puzzles from GEB:

Thank you for posting this! Just came here to say that there is a Reddit community at https://www.reddit.com/r/GEB/ that hosts discussion of this book.

07 Feb 2012 03:36 GMT | #76 of 482 comments | View original comment

Peter Desnoyers commented on Clumsy Pointers:

See R. P. Mody. 1992. "On understanding type declarations in C." SIGPLAN Not. 27, 6 (June 1992), 80-83.

It gives a short calculus for understanding pre-ANSI type declarations. Best quote from it: "We are now ready to tackle a famous horror — 'signal' of UNIX".

09 Dec 2011 18:18 GMT | #75 of 482 comments | View original comment

Michael commented on Clumsy Pointers:

I wrote a simple C parser once, and found this page to be very helpful in understanding complex C declarators: https://msdn.microsoft.com/en-us/library/1x82y1z4.aspx.

24 Nov 2011 02:26 GMT | #74 of 482 comments | View original comment

Susam Pal commented on AUTH CRAM-MD5:

Matt, you make a very good point. Yes, the server needs to store the passwords in plaintext in case of CRAM-MD5 authentication so that it can compute the expected response and match it with the received response.

Here is a sample entry in the /etc/exim4/passwd file for the curious:

alice:$1$vRPkzzDi$3sqk2e4Jcgn/YEeB1JqgT1

In case of PLAIN or LOGIN authentication mechanism, the above entry is enough to setup the user 'alice' with password 'wonderland' that has been used in this post. In this example, the second field contains the password hashed with MD5 and a random salt. After the server receives the password from the client, it would compute a hash from the password using the same hashing algorithm and salt (vRPkzzDi in this case) and check that the result matches with the hash in this file.

For CRAM-MD5 authentication mechanism to work properly, we'll need an entry like this in the passwd file.

alice:$1$vRPkzzDi$3sqk2e4Jcgn/YEeB1JqgT1:wonderland

Strictly speaking, the second field is not necessary. It could have been empty since only the third field containing the password in plaintext is used to compute the expected response to the challenge during CRAM-MD5 authentication.

09 Nov 2011 21:20 GMT | #73 of 482 comments | View original comment

Matt Mullins commented on AUTH CRAM-MD5:

The problem with challenge-response authentication, however, is that it requires the server to store passwords in plaintext. There are very few servers I trust enough to store my password without properly hashing it first.

In practice, most systems use PLAIN authentication over a secured connection, such as by SSL, so that it's not susceptible to the man-in-the-middle problem described.

You can also use Kerberos through GSSAPI to trust a single source for authentication tickets. A Kerberos key distribution center does store password-equivalent data as plain-text, but it minimizes the number of systems that need to be protected to such a high degree.

08 Nov 2011 22:28 GMT | #72 of 482 comments | View original comment

Martin DeMello commented on Loopy C Puzzle:

for (i = 0; i + 6; i--)

will stop when i + 6 = 0.

01 Oct 2011 05:11 GMT | #71 of 482 comments | View original comment

Ryan commented on Loopy C Puzzle:

Ah, Sean beat me to it. :(

01 Oct 2011 04:54 GMT | #70 of 482 comments | View original comment

Ryan commented on Loopy C Puzzle:

Ah-ha, a tricky one:

int i;
for (i = 0; i ^= 6; i--) {
    printf(".");
}
01 Oct 2011 04:54 GMT | #69 of 482 comments | View original comment

Sean commented on Loopy C Puzzle:

Changing the loop condition to i ^= 6; is another solution.

01 Oct 2011 04:48 GMT | #68 of 482 comments | View original comment

Ryan commented on Loopy C Puzzle:

int i;
for (i = 0; -i < 6; i--) {
    printf(".");
}
01 Oct 2011 04:46 GMT | #67 of 482 comments | View original comment

Ryan commented on Loopy C Puzzle:

int i;
for (i = 0; abs(i) < 6; i--) {
    printf(".");
}
01 Oct 2011 04:26 GMT | #66 of 482 comments | View original comment

Ankita Shah commented on From Tower of Hanoi to Counting Bits:

Loved it!

28 Sep 2011 20:03 GMT | #65 of 482 comments | View original comment

Franky Gibson commented on From Tower of Hanoi to Counting Bits:

Wonderful! Reminds me of something Euler would think of. Very neat and tidy.

28 Sep 2011 01:55 GMT | #64 of 482 comments | View original comment

Alex Yeilding commented on Calendar Cubes Puzzle:

This only works with one face used for both the 6 and 9.

Both cubes need to have 0, 1 and 2. The remaining six digits can be assigned to the cubes in \( \binom{6}{3} / 2 = 10 \) ways.

There are 5 choices for a number to go on the face opposite the zero. Then put the lowest remaining number on an open face, and there are 3 choices for a number to go opposite that one.

There are 2 choices for how to arrange the final two digits.

So now we are up to \( 10 \cdot 30^2 = 9000 \) unique ways to assign digits to the faces.

01 Aug 2011 02:53 GMT | #63 of 482 comments | View original comment

Pratik Agrawal commented on URL in C:

Good one!

13 Jul 2011 08:53 GMT | #62 of 482 comments | View original comment

Joshua Tobin commented on Magical Chameleons Puzzle:

Some notation: I use tuples \( (r, g, b) \) to represent the numbers of chameleons of each colour at any given time. The transformation \( (r', g', b') \to (r, g, b) \) denotes that the number of red, blue, and green chameleons changed from \( (r', g', b') \) to \( (r, g, b). \) Then I work backwards in time. So, if there are \( (r, g, b) \) chameleons now, the previous transformation must have been one of the following:

Let \( d \) be the number of blue chameleons when the zoologists first arrived.

We know that when the zoologists arrived for the first time, they observed \( (2000, 3000, d). \) We also know that when they arrived for the second time, they observed \( (5000 + d, 0, 0). \) The question is: what are the possible values of \( d? \) I answer this in two parts.

Part 1. The integer \( d \) must be a multiple of 3.

Proof. Let us look at how each number in the tuple change modulo 3 for each possible transformation. For example, without loss of generality, consider the transformation \( (r - 2x, g + x, b + 2x) \to (r, g, b). \) Note that \( -2x \equiv x \pmod{3}. \) So every transformation just adds the same number modulo 3 to each number in the tuple.

We know that we start with \( (2000, 3000, d) \) and reach \( (5000 + d, 0, 0). \) Since the values of green and blue are congruent modulo 3 in the end (both are 0), therefore their values must be congruent modulo 3 at the start. Hence \( d \equiv 0 \pmod{3}. \)

Part 2. If \( d \) is any multiple of 3 we can find a sequence of transformations to go from \( (2000, 3000, d) \) to \( (5000 + d, 0, 0). \)

Proof. Consider \( (r, g, b) \) where \( r \ge 1 \) and \( g \ge 3. \) We can get \[ (r, g, b) \to (r - 1, g - 1, b + 2) \to (r + 3, g - 3, b). \] This means that we can keep taking 3 from the value of green and keep adding it to the value of red. So if we start with \( (2000, 3000, d, \) we can can get \( (5000, 0, d). \)

Similarly for \( r \ge 1 \) and \( b \ge 3, \) we can get \[ (r, g, b) \to (r - 1, g + 2, b - 1) \to (r + 3, g, b - 3). \] So we can keep taking 3 from the value of blue and keep adding it to the value of red. If \( d \) is a multiple of 3, we can use this to go from \( (5000, 0, d) \) to \( (5000 + d, 0, 0). \)

08 Jul 2011 14:49 GMT | #61 of 482 comments | View original comment

Ryan Batterman commented on Shrinking List Puzzle:

Let \( f(x, y) = x + y + xy. \) It can be rewritten as \( f(x, y) = (x + 1)(y + 1) - 1. \) Now, consider an arbitrary set of integers \( A = \{a_1, a_2, \dots, a_n\}. \) Applying the algorithm mentioned in the problem statement to two integers \( a_i \) and \( a_j \) chosen randomly from the set such that \( i \ne j, \) we obtain, \( f(a_i, a_j) = (a_i + 1)(b_i + 1) - 1. \) When this expression is used in subsequent calls to \( f(x, y), \) the \( -1 \) drops, the new number is included in the product and the \( -1 \) gets added again. For instance, using this result and a different number \( a_k \) chosen randomly from the set, we obtain \( f\bigl((a_i + 1)(a_j + 1) - 1, a_k\bigr) = (a_i + 1)(a_j + 1)(a_k + 1) - 1. \) Inductively, this pattern holds, and the algorithm returns a product of all integers in the set minus \( 1. \)

Therefore, the result of the algorithm, when applied to the set \( A \) is \( \prod_{i=1}^n (a_i + 1) - 1. \) If \( A = \{1, 2, \dots, 9\}, \) on applying the algorithm, we obtain \( (1 + 1)(2 + 1) \dots (9 + 1) - 1 = 10! - 1 = 3628799. \)

06 Jul 2011 05:07 GMT | #60 of 482 comments | View original comment

Susam Pal commented on Missing Digit Puzzle:

Yes, the correct answer is 4. There are indeed 25519 ten-digit multiples of 234 which have 0, 1, 1, 2, 3, 4, 5, 7 and 9 as nine of its digits. The remaining digit must be 4. We need not brute force to confirm this. It can be proven logically.

The number 234 is a multiple of 9. So any multiple of 234 is also a multiple of 9. We know that the sum of all digits of a multiple of 9 is a multiple of 9. If we assume the remaining digit to be \( x, \) the sum of the digits of the multiple in question is \( 0 + 1 + 1 + 2 + 3 + 4 + 5 + 7 + 9 + x = 32 + x. \) The only value of digit \( x \) that makes \( 32 + x \) a multiple of 9 is 4.

18 Jun 2011 09:36 GMT | #59 of 482 comments | View original comment

Vikas Burte commented on URL in C:

Simple yet cryptic! Basics!

15 Jun 2011 09:40 GMT | #58 of 482 comments | View original comment

Anuvrat commented on URL in C:

The comment part was obvious but the label part was not. Awesome post!

08 Jun 2011 06:47 GMT | #57 of 482 comments | View original comment

Yuvi Panda commented on URL in C:

Nice one! And yay, I got it under a 10 seconds too. :D

08 Jun 2011 04:20 GMT | #56 of 482 comments | View original comment

Iouri commented on Clumsy Pointers:

There is a website that you can use for this: https://cdecl.org/.

It can take a description like "declare x as pointer to function (array 10 of pointer to function (pointer to int) returning void) returning pointer to function (pointer to int) returning void" and give back its declaration like this:

  void (*(*x)(void (*[10])(int *)))(int *)
07 Jun 2011 05:02 GMT | #55 of 482 comments | View original comment

Abhay commented on URL in C:

Smart hack! Both Kunkunur and Mandeep are correct.

03 Jun 2011 17:44 GMT | #54 of 482 comments | View original comment

Mandeep Sandhu commented on URL in C:

https: makes it a label and the rest is a comment! :P

Nice one!

03 Jun 2011 11:14 GMT | #53 of 482 comments | View original comment

Kunkunur commented on URL in C:

Is it that https: is considered as label and the rest is considered as comment?

03 Jun 2011 10:26 GMT | #52 of 482 comments | View original comment

CH Gowri Kumar commented on Sequence Points:

Well, the reason why the same or similar questions arise is simple. People, out of ignorance, read wrong books and there are very few who can guide them to use the right books and the right platform/environment to learn C. The Indian market is full of books that still teach C using Turbo C and the questions/exercises contain precisely questions about these. Many of the examples in such books include conio.h!

21 May 2011 17:49 GMT | #51 of 482 comments | View original comment

Javin Paul commented on Sequence Points:

There are other features also in other programming languages like threading in Java which is completely dependent on JVM behavior or garbage collection in Java which varies across JVM to JVM.

19 May 2011 10:24 GMT | #50 of 482 comments | View original comment

Vikram Agrawal commented on Missing Digit Puzzle:

The missing digit is 4.

There are 25519 combinations of 0, 1, 1, 2, 3, 4, 4, 5, 7 and 9 which are 10-digit multiple of 234. Interestingly, for the given 9 digits 0, 1, 1, 2, 3, 4, 5, 7 and 9, no digit other than 4 gives a 10 digit combination that is multiple of 234.

14 May 2011 05:20 GMT | #49 of 482 comments | View original comment

Mark Brader commented on Ternary Operator Puzzle:

Oh, everybody knows that.

a = !!a;
07 Apr 2011 03:09 00 | #48 of 482 comments | View original comment

Susam Pal commented on Coefficient of Variation Function in PostgreSQL:

The float8_accum is the aggregate state transition function which maintains an internal state which changes for every new float8 input value.

It requires a three-element array, not just two elements, because it accumulates the sum of squares as well as the sum and count of the inputs. This is so that it can be used for some other aggregates besides avg.

23 Mar 2011 19:03 GMT | #47 of 482 comments | View original comment

Philipp Rautenberg commented on Coefficient of Variation Function in PostgreSQL:

What exactly is float8_accum doing?

23 Mar 2011 12:34 GMT | #46 of 482 comments | View original comment

Arnar Birgisson commented on Polar Bear Puzzle:

The places near the South Pole are infinitely many. Some of them lie on the circle that is \( \left(1 + \frac{1}{2\pi} \right) \) km from the pole. Then you'll walk 1 km towards the pole, then circle it (1 km) and walk back 1 km in the same track away from the pole. Some other of them lie on the circle that is \( \left( 1 + \frac{1}{4\pi} \right) \) km, you do the same but you circle the pole twice. Thus the starting point could be the North Pole or any point that is \( \left( 1 + \frac{1}{2n\pi} \right) \) km from the South Pole, for any positive integer \( n. \)

10 Mar 2011 10:02 GMT | #45 of 482 comments | View original comment

Sivasubramaniam Sivakumar commented on From Diophantine Equation to Fermat's Last Theorem:

Nice!

I would have never thought of this:

This is of the form \( 2(3a^2b + b^3) \) where \( a = y \) and \( b = 3. \) Now \( 2(3a^2b + b^3) = (a + b)^3 - (a - b)^3. \)
19 Jan 2011 17:38 GMT | #44 of 482 comments | View original comment

Mandeep Sandhu commented on Clumsy Pointers:

Nice! The syntax on returning function pointers was a little tricky. Learnt that today! :)

30 Nov 2010 05:56 GMT | #43 of 482 comments | View original comment

Susam Pal commented on Clumsy Equations:

I was calculating the optimal parameters for bloom filters, a space-efficient probabilistic data structure. At RSA, we develop software products for security operations centre (SOC) that parse, index, and query petabytes of security events. We use bloom filters to speed up queries in the querying engine of these products while occupying less storage space than a traditional inverted index.

04 Nov 2010 08:10 GMT | #42 of 482 comments | View original comment

Arun commented on Clumsy Equations:

Just curious about this part,

At work today, while calculating optimal parameters for a data structure, ...

What exactly were you calculating?

04 Nov 2010 07:16 GMT | #41 of 482 comments | View original comment

Jonathan commented on Lucene Java Example:

Hi there! I am a newbie to programming. I have an assignment about indexing using Lucene. It spins my head around. But somehow I found your blog post, copied your code, and it works. Thanks a lot!

09 Oct 2010 04:34 GMT | #40 of 482 comments | View original comment

Jerald Long commented on Stack Overwriting Function:

I think you mean ASLR. On Linux, this can be turned off by running echo 0 > /proc/sys/kernel/randomize_va_space. On Windows, DEP can be turned off at Control PanelSystemAdvancedPerformanceSettings, if I remember correctly.

12 Sep 2010 01:08 GMT | #39 of 482 comments | View original comment

Juan Edwards commented on Stack Overwriting Function:

Good article. This is how buffer overflow is exploited. But I guess, kernel provides some random stack alignment to prevent this.

11 Aug 2010 20:06 GMT | #38 of 482 comments | View original comment

Susam Pal commented on Illiteracy and Digital Weighing Scale:

Prunthaban,

Your solution is pretty much what I had in mind too. I proposed this solution to the factory management and it was successfully implemented in the factory. I have updated my blog post with these details. Thank you for participating in this discussion and offering your solution.

05 Aug 2010 11:21 GMT | #37 of 482 comments | View original comment

Prunthaban commented on Illiteracy and Digital Weighing Scale:

Here is my solution: Most digital scales have a button called "Set to 0". Let us say I want the people to weigh 5.3 kg. I keep 5.3 kg weight on the scale and press "Set to 0". After I remove this weight, it shows "-5.3". Now the worker only needs to pour until the scale shows "0.0". The worker just needs to know "0" to do this. To know whether to pour more or remove from the balance, the worker just needs to look at the "-" sign. If it is there keep pouring, else remove. :-) So the worker can achieve the task by remembering "0.0" and "-" signs.

08 Jul 2010 05:56 GMT | #36 of 482 comments | View original comment

Susam Pal commented on Illiteracy and Digital Weighing Scale:

Veera,

Your solution would work fine if the factory had some control on the design of the digital weighing scale. However in this case, the factory has no control on the design of the digital weighing scale. They have to work with what they have. Therefore your solution will not work in practice.

07 Jul 2010 10:56 GMT | #35 of 482 comments | View original comment

Veera Sundar commented on Illiteracy and Digital Weighing Scale:

The digital balance has to be designed in such a way that a given weight can be preset. When the worker fills the bucket and the total weight reaches the preset value, the digital balance can alert the worker either by showing a green light or by beeping. The worker must be able to notice this alert and stop filling more.

07 Jul 2010 09:47 GMT | #34 of 482 comments | View original comment

Susam Pal commented on Illiteracy and Digital Weighing Scale:

Vivek,

In a beam balance, once a supervisor tells them which weights to use, their job is easy. They only need to keep pouring material until the beam becomes balanced. If the beam tilts towards the pan with the material, then they need to remove material.

With a digital scale, however, the usage becomes more complicated than it sounds in your comment. Let us say the workers are supposed to pour 5.3 kg of material. They pour a little too much material and the scale shoots up to 6.2 kg. Since the workers cannot read the digits, they don't know whether they should keep pouring more material or remove material.

07 Jul 2010 08:56 GMT | #33 of 482 comments | View original comment

MS Vivek Chaitanya commented on Illiteracy and Digital Weighing Scale:

It is difficult for an illiterate worker to use a beam balance too because the worker may not know what denominations of weights to put in one pan.

It is easier for an illiterate worker to use a digital scale because it shows the numbers. You can print all the weights on a paper, give it to them and ask them to put the material until the number in the paper matches the number in the meter.

07 Jul 2010 07:13 GMT | #32 of 482 comments | View original comment

Susam Pal commented on UID Numbering Scheme:

Thank you for the suggestion, Utkarsh! I have sent a document about these points to Nandan Nilekani today. I have updated the blog post too with this update.

31 May 2010 16:24 GMT | #31 of 482 comments | View original comment

Susam Pal commented on Sequence Points:

Veetrag, These kinds of questions actually have a clear answer: they invoke undefined behaviour. When someone writes code that relies on undefined behaviour or tries to predict what it will do, it's often a sign that that there's a gap in understanding of how the language works.

Understanding undefined behaviour is important for any professional software developer working in C. Writing C code without a solid grasp of this concept can lead to software that is fragile and insecure.

27 May 2010 04:37 GMT | #30 of 482 comments | View original comment

Veetrag commented on Sequence Points:

I completely agree with what you are trying to say. I tried to explain the same stuff 6 years back when I was put incharge of designing questions for a programming competition. I tried to explain it to organizers how ambiguous these questions can be, considering the fact that most participants/compilers do not follow the ANSI standard properly. Secondly, these questions are not real test of programming skills, they are just some gimmicks to 'wow' people, real life programming is much different.

27 May 2010 04:31 GMT | #29 of 482 comments | View original comment

Utkarshraj Atmaram commented on UID Numbering Scheme:

Nice observations! Have you mailed these to nandan.nilekani _at_ nic _dot_ in?

25 May 2010 12:44 GMT | #28 of 482 comments | View original comment

Gokul Anand commented on A Kid Who Could Read My Mind:

Good read. Got me into lucid dreams and gave me a chance to feel more human now. :-)

25 Oct 2009 08:33 GMT | #27 of 482 comments | View original comment

Rishabh Puri commented on Obfuscated Main:

Thank you for your blog post. This was beautifully explained. I had come across your code in an Orkut community where someone posted it. So this is the second time I'm reading it and it is still very helpful!

24 Oct 2009 16:27 GMT | #26 of 482 comments | View original comment

Thejesh GN commented on A Kid Who Could Read My Mind:

Interesting.

26 Jul 2009 14:36 GMT | #25 of 482 comments | View original comment

Alfred commented on A Kid Who Could Read My Mind:

Nice one.

07 Jul 2009 06:42 GMT | #24 of 482 comments | View original comment

Utkarshraj Atmaram commented on A Kid Who Could Read My Mind:

Interesting! Wikibooks has a great book on Lucid Dreaming.

03 Jul 2009 13:25 GMT | #23 of 482 comments | View original comment

TKD commented on ADAC and HE Puzzles from GEB:

Thanks man. Started reading GEB last Saturday and I could figure out the "HE" and "HEADACHE" ones but did not realize that "HEADACHE" was also the response to tha "ADAC" puzzle.

Cheers from Argentina,
TKD

08 Jun 2009 13:43 GMT | #22 of 482 comments | View original comment

Paritosh Gunjan commented on ADAC and HE Puzzles from GEB:

Interesting! Now I want to read this book.

18 May 2009 05:46 GMT | #21 of 482 comments | View original comment

Utkarshraj Atmaram commented on Apache Nutch 1.0 Released:

Congrats! Good to see your work being useful to the open source community.

29 Mar 2009 14:47 GMT | #20 of 482 comments | View original comment

Paritosh Gunjan commented on Apache Nutch 1.0 Released:

Hey,

Finally caught up with your blog. Nice posts, quite informative. Have started following your blog.

Cheers!
Paritosh

29 Mar 2009 08:37 GMT | #19 of 482 comments | View original comment

Ankita Shah commented on Apache Nutch 1.0 Released:

Congrats and thanks!

I'm sure it would have been a long wait for a lot of users for configuring their authentication schemes.

29 Mar 2009 00:39 GMT | #18 of 482 comments | View original comment

JB commented on Combinatorics Coincidence:

Interesting discussion. I gained something today by remembering you.

23 Oct 2008 04:00 GMT | #17 of 482 comments | View original comment

Indhu Bharathi commented on Irrational Base:

Maybe the mistake was deliberate to show they geekness/smartness when somebody asks for a clarification :-)

06 Jun 2008 10:55 GMT | #16 of 482 comments | View original comment

Randal L. Schwartz commented on From Perl to Pi:

Glad you enjoyed that bit. That was Tom's humor on that one. I could never have been that clever. :)

27 Apr 2008 02:30 GMT | #15 of 482 comments | View original comment

Abhishek Pathak commented on Character Encoding Bug in Notepad:

Great explanation!

02 Aug 2007 11:50 GMT | #14 of 482 comments | View original comment

Shenika Fernado commented on Guestbook:

I came across your blog. It is really cool. Keep up the great work!

06 Dec 2006 21:29 GMT | #13 of 482 comments | View original comment

Venkat commented on Character Encoding Bug in Notepad:

Nice and detailed explanation of the Notepad bug.

16 Nov 2006 15:43 GMT | #12 of 482 comments | View original comment

Susam Pal commented on Fork Bunny:

Yes, the POSIX specification seems to allow implementations to use non-alphanumeric characters in function names too. Quoting the relevant paragraph from POSIX.1-2001 specification:

The function is named fname; the application shall ensure that it is a name (see the Base Definitions volume of IEEE Std 1003.1-2001, Section 3.230, Name). An implementation may allow other characters in a function name as an extension. The implementation shall maintain separate name spaces for functions and variables.
17 Jun 2006 13:09 GMT | #11 of 482 comments | View original comment

Tejas Dinkar commented on Fork Bunny:

LOL! Who knew that : was a valid function name?

It is not a valid variable name in Bash though. I think it should be a valid fork bomb even without the pipe.

16 Jun 2006 16:51 GMT | #10 of 482 comments | View original comment

Nayan Dodhia commented on Guestbook:

I liked your articles. It is good that you working on assembly language programming. Please do keep us informed if you work more on it.

01 Aug 2005 16:20 GMT | #9 of 482 comments | View original comment

Ashok Kumar Senapati commented on Guestbook:

It is inspiring to see the amazing work. Thanks for such a wonderful website.

02 Sep 2004 02:30 GMT | #8 of 482 comments | View original comment

Berrys Guy commented on Guestbook:

Hello from Illinois! Great website!

06 Mar 2004 08:38 GMT | #7 of 482 comments | View original comment

Seun Ogunbona commented on Guestbook:

Hello from Lagos! I want to know more about how to secure email passwords.

05 Mar 2004 11:49 GMT | #6 of 482 comments | View original comment

Oktay commented on Guestbook:

Your website is perfect. Please teach us more on your website.

02 Mar 2004 12:16 GMT | #5 of 482 comments | View original comment

Mridul commented on Guestbook:

Your website is great.

12 Feb 2004 04:31 GMT | #4 of 482 comments | View original comment

Aby commented on Guestbook:

Nice work on the website. I like the clean design. These days, most new websites have pitch-black backgrounds with moving banners that are hard to read. Yours is clean and easy to follow. The articles are very informative too. I really like your website.

02 Jul 2003 09:38 GMT | #3 of 482 comments | View original comment

Kumar Saurabh commented on Guestbook:

This is a really nice website with a clean layout. Sharing computing articles is a genius way to get your website noticed and attract readers who genuinely care about the subject. Keep up the great work!

06 Feb 2003 14:06 GMT | #2 of 482 comments | View original comment

Ruth Eunice commented on Guestbook:

Great website! Very helpful for those who love learning.

11 Dec 2002 16:06 GMT | #1 of 482 comments | View original comment