Simon blogs

Started by Simon, October 18, 2015, 06:05:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Simon

Quote from: Colorful Arty on February 12, 2018, 07:01:18 PMPython Type Errors over C/C++ Segmentation faults

In a good system, the segfaulting/type-mismatching code doesn't even compile in the first place. See earlier posts. :lix-glare:




Order

To compose a piece of email,

1. attach file.
2. Write body.
3. Write subject. If subject is hard to write, prune the body and it will become clearer.
4. Pull in the recipients and send.

To reply to email,

1. attach file.
2. Prune prune prune the other person's bloat.
3. Reply to pruned quotation.

The human mind is exceptionally good at detecting patterns, but has a terribly hard time formulating rules to explain patterns.

E.g., email composed in a different order than I presented. You type the prose that nobody cares about, then fail to attach the file because it's 100 % clear what you have to do and it's boring to do it. The human mind skips over this step because there is a glaring pattern here: We always attach the file that we made earlier.

E.g., copypasta of code, leading to long functions. The function has conceptual segments that aren't abstracted away. Even if it's clear to the writer because they know about the segments, it's not clear to the first-time reader; the first-time reader must assume that everything depends on everything. The cure here is to forcefully refactor anything that gets too long.

E.g., procrastination of dull work. If thesis is roughly finished and only debugging, writing introduction, proofreading etc. is to be done, the work is no fun. We don't want to do it. The pattern here is: Do random things until you have enough for the thesis, then add chrome and turn it in. The chrome is considered standard, but this time, there is no shortcut/catch-all solution, unlike with the earlier examples. Thus, procrastinate.

-- Simon

Simon


Colorful Arty

Or alternatively, you could just get a wireless mouse. ;)
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Simon

I use the mouse only occasionally, every 10 minutes for a couple seconds. Wireless mice love to sleep whenever I'm not mousing and then take time (0.2 seconds or longer?) on the first input because they must reconnect. This means that most of my wireless mouse inputs have massive lag.

I switched back to cable mice to end this madness. Maybe wireless mice for over 100 euros do better, I haven't tried any of those.

-- Simon

Colorful Arty

That's fair. My problem is that I lost the USB connector for my wireless mouse, but since I use a laptop, wired mice are quite nice for me.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

mobius

#110
I've been using pic #3 for a long time now and haven't had any problems with the extra cord pushing; maybe it depends on type of cord or mouse. Also I wrap my cord around the legs of the keyboard. I guess that's more like a loop.

I used to use wireless mouse but occasionally I'd knock it off the table. Now if it falls the cord keeps it from hitting the floor and breaking. :D
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Ryemanni

Finally someone mentions this problem, I've been struggling with this forever. I used to work with pic 3, but the cable kept pushing my mouse forward, so I ended up with pic 4. It's the most acceptable solution for now, but still feels a bit hack-ish. ???

grams88

A while back a couple of years ago I used to have the old mouse with the ball in it where you had to sort of give it a clean to get the gunk out of it so it moves a lot better. It actually worked quite well for myself but a lot of people or family members were complaining and wanting me to get a wireless mouse.

The tape idea with the loop seems to do the trick. At the moment I've got a wireless mouse where you have to change the batteries or recharge the batteries when the batteries run out.  The USB mouse is a good way to get round the battery issue.

Simon

Quote from: Raymannipic 4. It's the most acceptable solution for now, but still feels a bit hack-ish. ???

Hah, yeah. It's still a hack. It's merely the least-worst option that I found.




Shift + RMB = cmd here!

On Windows, in the file browser, you can right-click to create directory, create new file, etc., but a super-important command has always been missing: Open shell in this directory. The answer is to hold Shift while right-clicking. This gives many more options in the context menu, and one of them is to open a shell with that directory as the working directory.

<SimonN> optimally, you could right-click into any directory in the Windows file browser, and select a context menu option that opens a shell in this directory
<SimonN> it's probably possible to make this, but Windows doesn't offer it by default, which makes me sad
<Forestidia> SimonN, I've looked shortly through the web and there is a way to open cmd prompt in a folder: shift+right-click and then you have the option. Never thought of this possibility I have to admit.
<Forestidia> shift+right-click generally seems to give you more options like copy path if you have a file selected.
<kieranmillar> Wow, all these useful right-click options, hidden behind an unnecessary extra step
<kieranmillar> My life has been changed forever


Thanks for pulling this gem from the net! This is super useful to remote-troubleshoot people's problems -- omits the need to explain working directories, cd directory, and cd...




Type popcorn where it belongs

Around 5-10 posts earlier in here, I've ranted about D's lack of a non-null class reference. This bugged me enough to write my own post on the D forums.

That's a much better use of the fiery passion than a mere rant-post on Lemmings Forums. :lix-grin: It generated some nice discussion, with adequate popcorn for a language feature discussion. Even more importantly, I got a lot of answers from smart people, and some have attacked related issues with their own small libraries. I'll look into these solutions!

-- Simon

Simon

#114


Shoelace bowknot into firm knot

I tie my shoelaces with the standard bowknot that most people use, and that the image shows. This holds well for me. To open this bowknot, you pull either loose end, e.g., the yellow loose end. This will pull the yellow loop through the knot and thus the knot falls apart.

Now, the mystery: When pulling on the loose end to remove the loop, there is a 10 % chance that the knot will not easily open, but instead transform into a very tight knot that is painful to open. This happened to me on two days in succession, and that's last straw. I will search the web about this problem.

Surprisingly, it's hard to find. Lots of sites describe how to tie shoelaces, but opening them seems to be no issue for anyone. I assume that in those 10 % of cases, I had already tied the bowknot wrongly in the first place by mistake, which will then lead to the firm knot problem on opening much later.

<geoo> I encounter this issue more frequently than 10%. I believe what happens is that the loose end you pull on went through one of the loops
<geoo> or maybe both of them must have gone through the respective loops of the other color


-- Simon

ccexplore

Interesting, I had long kinda sidestepped all this by basically never untying shoe knots:  either the shoe doesn't use laces to begin with, or I tied them just loose enough that I can take the shoe on and off w/o retying/untying.  Granted, I'm a bit of a couch potato, I imagine if I'm more athletic I probably can't get away with loose lacing quite as easily.

nin10doadict

I have encountered this shoelace problem too, but never really gave it much thought... I just kinda accepted it as one of those annoying facts of life, like how most people only have one hand that works well and the other just kinda... :-\
"Oh, one hand's all that works good? Ok! If you bought your body at Sears, you'd take it back and complain. 'Look, this hand throws the ball way out there, this one throws it way over there. Why?'" -Gallagher

Simon

#117
I believe geoo is correct: The bowknot transforms into a nasty knot because the pulled loose end is entangled with a loop. This tangle happened over the many hours during which we haven't paid any attention to the shoe. Sadly, if this theory is correct, we cannot fix the initial knotting in any way -- it would have been nice to learn another way to tie shoes and thus prevent the problem altogether.




Eiderdaus Patience

Around 2009 to 2013, I was interested in card solitaire a.k.a. patience games.

Several games have a tableau to untangle sequences of cards; a common type of tableau move is moving available cards to build descending sequences. These games then have a separate foundation area where cards eventually must be played in strict ascending sequence.

In early 2011, I invented my own game to ditch separate foundations; instead, every single card acts like a foundation pile. I toyed with the number of tableau columns and different allowed cards to fill empty columns, and I was very satisfied with the results: The game seems to have reasonable depth, and the rules are simple enough that I still know them perfectly after all these years.

I was lousy in naming; eventually the name Eiderdaus Patience stuck, but I'm not happy with this name.

Rules of Eiderdaus Patience
Eiderdaus Patience

Game mechanics last modified in 2011-03.
Wordings/clarifications last modified in 2018-03-10.

I've invented this solitaire in early 2011. I place this game into the public domain. Everybody shall be able to play the game, then modify and distribute its rules as they see fit. -- Simon

Deck

This solitaire game is played with 1 standard deck of 52 cards.

Layout

All cards are dealt openly, and each card can be inspected at any time. Deal 10 tableau piles spread downwards; i.e., the cards in each pile overlap each other half-way. The leftmost two piles contain 6 cards each, whereas the other eight piles contain 5 cards each.

Object of the Game

In four tableau columns, assemble the four suites (13 cards of the same suit) in ascending ladders from ace in the back to king at the front. (The remaining six tableau columns will be empty when the game is won.)

Play

All play takes place in the 10 tableau colums. There are no separate foundation piles or cells.

The frontmost card of each column is available for transfer to another column.

You may build down regardless of suit.

You may also build up in suit.

If the frontmost cards of a column form an ascending ladder in suit, they are available for transfer as a unit to another column. You can move the whole ladder in this fashion, or any frontal part of it. Example: The frontmost cards of a column are 3S, 4S, 5S, 6S, 7S, 8S, with the 3S in the back and the 8S in front. The four frontal cards -- 5S, 6S, 7S, 8S -- can be lifted for transfer to a 6C or a 6H as a downwards build. Alternatively, all six spades can be lifted for transfer to a 2S as an upwards build.

Into empty tableau columns, you may only move any single available king, any single available ace, or by an available correctly-assembled ascending same-suit ladder starting from an ace.
Remarks and Hints
Notes

It is never legal to transfer descending ladders as a unit, whether they are of the same suit or not. However, if the descending ladder is of the same suit, it can be repacked card by card to a different column.

The win rate of this game should be around 1/2, but I haven't tracked my wins and losses so far. Luckily, most of the unsolvable deals turn out unsolvable already after a few initial moves.

The idea for this solitaire was: Why do we need foundation piles in other games? What happens if we combine standard downwards-building with a rule that makes all cards behave like foundations, i.e., allow the next-higher card of the same rank to be built on it?

Advice

It is favorable to have a fair share of each rank available for building. The game flow depends on repacking sequences to different colums, in order to dig out required cards and create spaces. If three or all four cards of one rank are buried deeply, it can get impossible to repack. Thus, after a few initial moves, examine the tableau and decide which cards or columns should be unburied, and which others can be left alone at first.

Be careful not to make too many changes of build direction on the same pile, especially when cards required to untangle these many builds are buried behind the builds in the same pile.

Empty tableau columns are not as valuable as in other games because they can only be filled by kings or aces. Creating a few spaces is crucial to get rid of aces and kings somewhere else, but this is not your primary goal.

Same-suit ladders can be repacked card by card to a different pile, reversing the order of the ladder. Take advantage of doing this only up to a certain point of the ladder, exposing its interior cards. These can be useful to move otherwise stuck cards onto.

-- Simon

mobius

Quote from: Simon on March 05, 2018, 01:21:28 PM


Shoelace bowknot into firm knot

I tie my shoelaces with the standard bowknot that most people use, and that the image shows. This holds well for me. To open this bowknot, you pull either loose end, e.g., the yellow loose end. This will pull the yellow loop through the knot and thus the knot falls apart.

Now, the mystery: When pulling on the loose end to remove the loop, there is a 10 % chance that the knot will not easily open, but instead transform into a very tight knot that is painful to open. This happened to me on two days in succession, and that's last straw. I will search the web about this problem.

Surprisingly, it's hard to find. Lots of sites describe how to tie shoelaces, but opening them seems to be no issue for anyone. I assume that in those 10 % of cases, I had already tied the bowknot wrongly in the first place by mistake, which will then lead to the firm knot problem on opening much later.

<geoo> I encounter this issue more frequently than 10%. I believe what happens is that the loose end you pull on went through one of the loops
<geoo> or maybe both of them must have gone through the respective loops of the other color


-- Simon

I tie different kind of knots at my job and encounter pretty much the exact same phenomenon I would say about 10-20% of the time. I encounter it with shoes too but not often. It only happens when I'm rushing.

Either it gets looped or you've simply crossed over another string you didn't think would cause an issue. Although a different theory I have is that;
-You turned the knot around. It seems like this shouldn't matter for a shoelace knot; yet it happens in the same way. It's definitely applicable to say; the slip knot. You can tie it (but don't pull tight yet), now turn around so you face the knot from the opposite side, if you try to tie it or pull it tight quickly chances are you'll mess it up because you're pulling the wrong string or in the wrong direction.

In any case, I've found the solution (works 100% of the time for me): patience. Never rush to tie or undo the knot. I've never had it happen when I'm taking my time and following each step correctly.

I always try to avoid tangles; it can take you an extra 5 minutes to tie it slower; but it can take you 20+ minutes to fix a tangle.

thanks for the cool knot website :thumbsup:
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Simon

#119
Quote from: mobius on March 11, 2018, 03:53:40 AM
(works 100% of the time for me): patience. Never rush to tie or undo the knot. I've never had it happen when I'm taking my time and following each step correctly.

I like this very much. This extends to general guidelines for proficiency. When you first learn a system, you toy around and make mistakes, sometimes even mistakes on purpose, to learn how the system reacts.

Then you focus on avoiding mistakes, even if it is expensive and takes a lot of time. Only over many repetitions, speed will come as a side effect while you focus on avoiding mistakes. You might not even notice the gradual improvements.






When you stream on twitch, you can set your streamed game to Lix. :lix-evil:

twitch only allows games registered in the Giantbomb wiki, and I've applied for a page there, it got approved. The Lix page on Giantbomb is still empty and I should fill it eventually.






Split off from this thread: Lemmings 3D block structure.

-- Simon