|
also the part you didn't understand was 6502 assembly code.
My favorite 8 bit proc. Because I like you.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I can identify with the desk status - mine is layered in eras, the Jurassic being rather popular. If no one messes with it I can find things where I put them at any time.
However. No, let me put it this way: However !
My code is kept scrupulously organized - long before the term refactoring became popular I would do that as repetitive actions became apparent - cleaning up the inner workings. Comments, too, lest I forget. And, now producing web-based applications, I make sure the user interfaces are actually very few so that I don't sew unnecessary confusion amongst the rabble. Inside my machines, also organized and, withing certain limits, the same from box-to-box. Even in DOS times I used SUBST drives to force uniformity when it wasn't physically available.
Slash and burn - is best reserved for other people's code!
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
my code isn't inelegant. but yeah it's not for the faint of heart
(real world excerpt - not production ready)
public static Lalr1ParseTable ToLalr1ParseTable(this CfgDocument cfg)
{
var start = cfg.GetAugmentedStartId(cfg.StartSymbol);
var pda = _ToLrfa(cfg);
var trnsCfg = _ToLRTransitionGrammar(cfg,pda);
var closure = new List<FA<string, ICollection<LRItem>>>();
var lalrclosure = new Lalr1ParseTable();
var itemSets = new List<ICollection<LRItem>>();
pda.FillClosure(closure);
var i = 0;
foreach (var p in closure)
{
itemSets.Add(p.AcceptSymbol);
lalrclosure.Add(new Dictionary<string, (int RuleOrStateId, string Left, string[] Right)>());
++i;
}
i = 0;
foreach (var p in closure)
{
foreach (var trn in p.Transitions)
{
var idx = closure.IndexOf(trn.Value);
lalrclosure[i].Add(
trn.Key,
(idx, null, null)
);
}
foreach (var item in p.AcceptSymbol)
{
if (Equals(item.Rule.Left, start) && item.RightIndex == item.Rule.Right.Count)
{
lalrclosure[i].Add(
"#EOS",
(-1, null, null));
break;
}
}
++i;
}
var map = new Dictionary<CfgRule, ICollection<string>>(_TransitionMergeRuleComparer.Default);
var follows = trnsCfg.FillFollows();
var rtbl = new List<IDictionary<object, CfgRule>>();
foreach (var rule in trnsCfg.Rules)
{
ICollection<string> f;
if (!map.TryGetValue(rule, out f))
map.Add(rule, follows[rule.Left]);
else
foreach (var o in follows[rule.Left])
if (!f.Contains(o))
f.Add(o);
}
foreach (var me in map)
{
var rule = me.Key;
var lr = _LrtSymbol.Parse(rule.Right[rule.Right.Count - 1]);
var left = _LrtSymbol.Parse(rule.Left).Id;
var right = new List<string>();
foreach (var s in rule.Right)
right.Add(_LrtSymbol.Parse(s).Id);
var newRule = new CfgRule(left, right);
if (!Equals(left, start))
foreach (var f in me.Value)
{
var rr = new string[newRule.Right.Count];
for (var ri = 0; ri < rr.Length; ri++)
rr[ri] = newRule.Right[ri];
var iid = _LrtSymbol.Parse(f).Id;
(int RuleOrStateId, string Left, string[] Right) tuple;
var rid = cfg.Rules.IndexOf(newRule);
if (0 > rid)
System.Diagnostics.Debugger.Break();
if (lalrclosure[lr.To].TryGetValue(iid, out tuple))
{
if (rid != tuple.RuleOrStateId)
System.Diagnostics.Debugger.Break();
}
else
{
lalrclosure[lr.To].Add(_LrtSymbol.Parse(f).Id,
(rid, newRule.Left, rr));
}
}
}
return lalrclosure;
}
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
modified 6-Aug-19 9:18am.
|
|
|
|
|
Well-organized code can be developed only by a committee.
However, it doesn't work and it's never finished, but just look how pretty it all is!
modified 6-Aug-19 14:43pm.
|
|
|
|
|
Sadly, your remark deserves far more upvotes than I have to give.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Sorry, but I'm a great believer in the "Clean Desk" policy.
My desk is always so covered in papers, files, boxes, and other random stuff that dirt can't get anywhere near it.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Okay, but I classify a lot of things as filth.
Like this *waves small stack of papers* 6 page pile of rubbish I spent 3 days implementing before I realized it was someone's homework assignment and not a whitepaper (they really should warn people)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the monster, codewitch wrote: 6 page pile of rubbish I spent 3 days implementing before I realized it was someone's homework assignment and not a whitepaper (they really should warn people) Welcome to CP.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
actually this came out of some university in Israel. That's why i made the mistake. Three students getting at best a D from me, because they got a 1/3 of what they did wrong, and I found out the hard way, by trying to code it.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
|
Yeah, I got taken for a ride. I suck.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
It was so much like me, except for my remaining human parts
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
Are you sure you weren't already replaced?
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I've just put my empty beer can in the robot who will replace the PM.
|
|
|
|
|
CPallini wrote: I've just put my empty beer can in the robot who will replace the PM
The sad thing is that I didn't have to ask "PM of which country?"
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
'Project Manager' was intended. However, 'Prime Minister' fits nicely as well.
|
|
|
|
|
So does president.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
… and whose least circuits you are unworthy to design.
(With apologies to Douglas Adams)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
Electric sheep?
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
|
You were just temporarily disconnected from the Matrix.
We expect no further disruptions and we apologize for any inconveniences.
|
|
|
|
|
As popular demand was crying out for "our own NuGet server", I thought TeamCity 2019 would be the obvious choice for this as it has a built-in NuGet server capability.
After more than a day I managed to get it working for our own built artifacts, but then was puzzled by how to host other .nupkg files on it.
No mention on the TeamCity website how to do this, only after much digging on the internet I found this:
Quote: But I guess it's clear that Team City at the moment doesn't offers full NuGet server capabilities which can be used to establish company's local repository Add existing nuget package to the feed – TeamCity Support | JetBrains[^]
Grrrrr
|
|
|
|
|
|
So I have to make this SOAP (1.1) service so some third party application can connect with our system and request data.
Fine, just tell me what the SOAP service should look like.
So I get a WSDL, which is invalid because two types with the same name have the same namespace (x3).
So I get a new WSDL and right after that a third because the other wasn't correct, which, after testing with the third party application (which I don't have myself), turns out to be incorrect because the namespaces don't match.
And I go back to the old WSDL, which still has the same type names.
I've just implemented the fifth WSDL with XSD's and I have no idea if this is going to work or not.
The version of the WSDL is embedded in the namespace, but apparently it's not possible to just give me that version of the WSDL.
I'm getting different versions in the namespaces, but I just changed the version to match that of the third party application and hope it'll work when I can test this stuff again.
The best part is that this is apparently a standard that's maintained by a work group and I'm the third person to implement this standard (about 10 years after the last implementation)
|
|
|
|