|
Sounds about right!
|
|
|
|
|
To err is human, to correct one's errors is divine. Let's see whether this will be a "you're holding it wrong" kind of situation, or whether this will be implemented.
|
|
|
|
|
see my signature.
To err is human to really elephant it up you need a computer
|
|
|
|
|
The iFanBoysGirls will buy anything and Apple knows it.
|
|
|
|
|
That's not been my experience of the Apple users I know (they're mostly very critical of anything they perceive as not worthwhile) but if believing that makes you feel better, knock yourself out.
Oh, I'm a Windows+Android user, in case you were wondering.
|
|
|
|
|
|
Yeah, it is a bit dumb. It goes back to the days of the original Mac, when Apple made the decision to put the menubar at the top of the screen for some reason, instead of in each top-level window as Windows does, and they (and we) have been stuck with it ever since. They should have grasped the nettle when OS X first came out and changed it, IMO, but it's too late now.
|
|
|
|
|
Paul Sanders (the other one) wrote: put the menubar at the top of the screen As a Windows user, that sounds counter-intuitive.
Of course, Mac users probably think the same thing the first time they use a Windows machine.
Toe-may-toe, toe-mah-toe... let's use the ribbon.
Software Zen: delete this;
|
|
|
|
|
|
I'm in a "sit-back-with-a-hard-cider-and-some-popcorn-and-watch-the-world-burn" sort of mood today .
Software Zen: delete this;
|
|
|
|
|
That would be nice to know what new amazing feature you are talking about. Then I may shout with you or laugh about this ! I am looking forward to get a new MacBook Pro 16" M1 Pro.
PS I am bilingual, I work with both Windows and MacOS .
Gilles Plante
|
|
|
|
|
Menu Extras, soon to be released in the App Store (249.99$), will show the missing menu parts on your Apple Watch.
In the mean time, try rotating your device...
Luc Pattyn [My Articles]
If you can't find it on YouTube try TikTok...
|
|
|
|
|
This bit of code will take an array int[] entries and some text (string or char array or whatever) and tell you whether the text matches the state machine stored in entries
I've effectively packed a DFA state machine into an array of ints, and very efficiently unpack it while matching/walking it because of the way it's encoded. Only downside is encoding the array takes two passes, but the passes are fast.
Here _FetchNextInput(cursor); simply fetches the next UTF32 codepoint off the text input (doing surrogate pair encoding in the process when necessary)
var cursor = text.GetEnumerator();
var ch = _FetchNextInput(cursor);
if (ch == -1) return -1!=entries[0];
var state = 0;
while (ch != -1)
{
var acc = entries[state++];
var tlen = entries[state++];
var m = false;
for (var i = 0; i < tlen; ++i)
{
var tto = entries[state++];
var prlen = entries[state++];
for (var j = 0; j < prlen; ++j)
{
var tmin = entries[state++];
var tmax = entries[state++];
if (ch >= tmin && ch <= tmax)
{
ch = _FetchNextInput(cursor);
if (ch == -1) return -1!=entries[tto];
state = tto;
i = tlen;
m = true;
break;
}
}
}
if (!m) return -1!=acc;
}
return false;
Real programmers use butterflies
|
|
|
|
|
You remind me of the title of Niklaus Wirth's great book from the 1970s:
Algorithms + Data Structures = Programs
Particularly in resource-limited environments, laying your data out right can make all the difference.
(Numerous war stories omitted...)
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
I came across this obituary today:
https://www.legacy.com/us/obituaries/name/mark-sanborn-obituary?id=6461229[^]
I suspect that this is the same Mark Sanborn that maintained the website where you could download a Windows hosts file to block nuisance connections:
Blocking Unwanted Connections with a Hosts File[^]
Can somebody confirm this? The owner of the hosts website has been reporting that he had severe health problems for several months now. He has not updated the hosts file since early March, which is highly unusual. If this obituary refers to the Mark of the hosts file: I appreciated his work and wish him RIP
Get me coffee and no one gets hurt!
|
|
|
|
|
So...life added his name to its own hosts file?
Too soon?
|
|
|
|
|
Is NJ anywhere close to Broomfield, CO?
|
|
|
|
|
Quote: Is NJ anywhere close to Broomfield, CO? In galactic terms, yes.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Jörgen Andersson wrote: Is NJ anywhere close to Broomfield, CO? If you zoom out far enough they are yay distance apart.
|
|
|
|
|
NJ (New Jersey) is northeast USA; it touches New York City.
CO Colorado is almost center of USA.
|
|
|
|
|
Did you update your hosts file?
Start here[^].
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Thank you for the info about the site, I didn't know that - I used a third party software for that.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Okay, so "code synthesis" (what I've heard it called in newsgroups and such but i don't know if there's an official term) is the process of generating code that - to put it simply - looks more like code a human would write than code that is generated.
For example:
if(ch == '\"') {
ch = _FetchNextInput(cursor);
if(ch == -1)
return false;
goto q1;
}
return false;
q1:
if((ch >= '\0' && ch <= '!') || (ch >= '#' && ch <= '[') || (ch >= ']' && ch <= 1114111)) {
ch = _FetchNextInput(cursor);
if(ch == -1)
return false;
goto q1;
}
if(ch == '\"') {
ch = _FetchNextInput(cursor);
if(ch == -1)
return true;
goto q2;
}
if(ch == '\\') {
ch = _FetchNextInput(cursor);
if(ch == -1)
return false;
goto q3;
}
return false;
q2:
return false;
q3:
if((ch >= '\0' && ch <= '!') || (ch >= '#' && ch <= '[') || (ch >= ']' && ch <= 1114111)) {
ch = _FetchNextInput(cursor);
if(ch == -1)
return false;
goto q1;
}
...
return false;
...
Forgive me for the long example, but I couldn't think of a shorter one that I had on hand that would serve. It's not the complete code, but you can see it's generated goto tables, and if you squint you can see they match text.
Humans wouldn't have written code like this - at least not typically, and without enough caffiene.
Anyway, check out just under q1:
q1:
if((ch >= '\0' && ch <= '!') || (ch >= '#' && ch <= '[') || (ch >= ']' && ch <= 1114111)) {
ch = _FetchNextInput(cursor);
if(ch == -1)
return false;
goto q1;
}
that could be
q1:
while((ch >= '\0' && ch <= '!') || (ch >= '#' && ch <= '[') || (ch >= ']' && ch <= 1114111)) {
ch = _FetchNextInput(cursor);
if(ch == -1)
return false;
}
...
And then I find other opportunities to "collapse" code by similarly examining the flow (which i already have state diagrams for in this case, but in the general case you'd build some sort of flow diagram over your generated bits like that and work with it), and then i do it over and over again until there are no more changes to the code/flow
This could yield some pretty cool results. It's nowhere near an article yet. Just an idea I had this morning while working on an update to Reggie.
Real programmers use butterflies
|
|
|
|
|
People can't be trusted to write good code; I prefer computer-generated code.
|
|
|
|
|
I know you're joking, but I agree with that sentiment. Less bugs. Code to a spec. The problem is the code is not "pretty" - this is to make it "pretty" so that once the tool no longer functions anymore the code is hand editable. =) it's next-level codegen.
Real programmers use butterflies
|
|
|
|