|
I mean otherwise I love it. It's one of the best things they ever produced. But just keep to a schedule!
Real programmers use butterflies
|
|
|
|
|
I am not so certain that is a good idea. The last update of Visual Studio was the worst I have ever received and I still haven't restored full functionality after it. That hosed things up pretty well for me and I refuse to update my other machines since I still have work to do. Hopefully Code has better success with that.
"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?"
|
|
|
|
|
So what you're saying that you would like the VS Code updates to be socially distanced?
|
|
|
|
|
This sounds like a lot of release cycles:
"We have to release features X/1.0, X/1.1, X/1.2, and X/1.4 immediately!"
"What about X/1.3?"
"It's not passed the Pink Sheep 1.7 suite of tests yet. It absolutely can't be released."
"Ooookaaayyyy..."
24 hours pass, and the app is distributed to $117M worth of customers.
"Oh !"
"WHAT?"
"We just figured out that X/1.4 requires one of the changes in X/1.3 and we didn't release them together."
"So, that just means that X/1.4 doesn't work."
"Yeah, but the default behavior on X/1.4 failure is to re-init the customer's data base back to W/0.7 levels. Everything they've done over the last 18 months is lost."
"We are truly ed..."
Software Zen: delete this;
|
|
|
|
|
|
What time (in UTC for easy calculations, please)?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
6PM January 5, Pacific Time (PT) is
2AM January 6, Coordinated Universal Time (UTC)
Ouch! I hope that you are a night owl!
|
|
|
|
|
I used to.
I write it down, but I don't promise anything.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
OriginalGriff wrote: Apparently, it's the doppler effect that causes it: Actually, that would only be true if the cat they dropped down the hole, first, is named doppler.
Whatever it's name, however, it will still make the same noise when hit by a hunk of ice.
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 seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
If you cross Santa with a duck do you get a Christmas Quacker?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Using UK slang: If Mr. Clause is arrested, do they call it Saint Nicked[^] ?
Just hope there aren't any French elves in his shop - they'd be striking by now.
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 seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
No, but I don't want him flying overhead.
|
|
|
|
|
If you cross Santa, you get elephant all from him!
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
OriginalGriff wrote: If you cross Santa
They didn’t cross Santa. They crossed Jesus! (But that’s more about Easter)
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
I needed a way to compare an escaped string coming out of a file with a series of unescaped strings passed to a function to see if one of them matches.
The easy way:
Load the string from the file, unescape it and compare each string in turn.
Pro: easy to code and maintain
Con: Requires the entire string to live in memory, requiring a buffer for it first.
The hard way:
Load the string one character at a time from a file, while deescaping inline, keep a list of pointers to the current location for each string you're checking against, compare and advance each of the string pointers in turn. If one doesn't match, disqualify it by setting its pointer to null, and when you're done see if you wound up with an undisqualified string.
Pro: only needs a character at a time in memory, plus scratch for the pointers
Con: Weird to write and maintain.
Because I'm coding on extremely low memory scenarios, i picked the hard way. I hate this code though, but there is an irresponsible part of me that enjoyed writing it.
Real programmers use butterflies
|
|
|
|
|
Is it a fixed or dynamic list of strings to check.
If it is fixed, us your lex/parser-fu and create a DFA/lexer to check for the strings.
DFAs are very memory efficient, as you know.
"Time flies like an arrow. Fruit flies like a banana."
|
|
|
|
|
The strings are determined at runtime so building a DFA is not desirable.
Edit: It might be possible to pre-bake DFAs for predefined queries but that would be more of a code generation thing. The thing is I don't have the RAM for DFA tables so I'd need it to be compiled.
Real programmers use butterflies
|
|
|
|
|
How about creating a tree from the list of strings characters. Then you could attempt to traverse the tree as the characters come in and if you get to a leaf, you have a match. If you would need to buffer a bit so you can backtrack, but I think you know how to do this.
"Time flies like an arrow. Fruit flies like a banana."
|
|
|
|
|
The biggest concern is RAM. Speed is secondary. I need to use as few bytes as possible for this. The strings are already allocated because 99% of the time the passed in strings are constant so i don't waste bytes reallocating them in a different form. I suppose I could turn the list of strings i'm using into a tree but there are fewer than 5 strings for the average query. Usually one or two, maybe three.
Real programmers use butterflies
|
|
|
|
|
I have a slight suspicion that this 'minimal RAM' has become an obsession with you. I have been working with embedded processors for 10+ year, and seen how available resources have grown for off-the-shelf embedded chips. 10+ years ago, IoT was not a concept, but those chips (or rather: their successors) I worked with ten years ago are those used in IoT things today. Today they are capable, low power, modern.
If you look upon yourself as a masochist, you may of course go for something like a 2903 four-bit bit slice processor (really intended for combining 4 or 8 to a 16- or 32-bit CPU), where you have to write the microcode yourself. If you are not quite as much a die-hard masochist, you may go for an 8-bit CPU with 16 bits memory bus, but only 4096 bytes allocated to RAM.
That is for masochists only. Not The Way to solve a problem, create a solution. If you really need to implement an IoT solution, there are numerous processor alternatives giving you access to lots of resources way beyond what your are talking about.
Your attitude reminds me of the very first international conference I ever visited, on free text search, where one paper showed how they had succeeded in reducing the space requirement for index terms by (slightly less than) one bit per index term. Maybe the technology was great that year, but I have never heard of them later.
For being blunt: Anno 2020, no solution will earn everlasting accolade because it fit in 4K RAM. Not even 16K RAM. If you move up to 64K (or more), that is what everybody is doing. Nothing special about that.
'I managed to fit it into 4K!' is a battle arena left long ago. Sure: Some groups have developed it into an extreme art - you will find a huge collection at pouët.net[^]. One of my favorites is Skyline[^] - do download it to see what they managed to squeeze into 4096 bytes - it it totally unbelievable!
But that is not 'problem solving', not 'usable' in any way. It is just show off: Ain't I clever? Yes, you are, and impressively so.
Now, let us go back to productive world. Let us solve real world problems of today, using tools of today.
|
|
|
|
|
I am targeting 32-bit arduinos. Eventually I will target the 8 bit ones - most of my code is 8 bit ready but i'm saving actually targeting them for now. Regardless, i wanted to get the ram use realistic for those devices
They have varying amounts of ram. The Atmega2560 has 8kB. some others have 32kb. My current monster is 32 bit and has 520kb but that's an exception, not the rule, and it has multiple cores so i'm not the only thread using ram anyway.
I do enjoy the challenge, but it's not for nothing.
Edit: Also, so far I have only been doing very simple queries out of large documents. The less memory they take per, the more complex queries I can compose with them.
Atmegas still sell. ArduinoJson is still used all the time. I have to disagree with you.
Real programmers use butterflies
modified 18-Dec-20 20:32pm.
|
|
|
|
|
honey the codewitch wrote: I will target the 8 bit ones - most of my code is 8 bit ready but i'm saving actually targeting them for now OK, go ahead, but I have a feeling that you are spending resources on designing improved horseshoes.
|
|
|
|
|
I would disagree, as I suspect the author of the popular ArduinoJson library would as well.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: this is one of the weirdest things i've written in a long time Definitely not
|
|
|
|