AI and decompilation?

+1. The smarter the language the stupider the coder in my experience. Same goes for smart phones.
--
A lie can travel halfway around the world while the truth is putting on  
its shoes.
Reply to
The Natural Philosopher
Loading thread data ...

Until it doesn't.

A day wasted debugging JavaScript to ascertain why IE was totally different to Firefox.

There was an implicit cast happening in IE which wasn't in Firefox that turned a 1 into a "1"..

Context dependency just adds another layer of complexity and a source of more bugs

--
A lie can travel halfway around the world while the truth is putting on  
its shoes.
Reply to
The Natural Philosopher

... well, if you use crappy interpreted languages with untyped variables then you've chosen to accept that sort of thing as normal.

I much prefer strongly typed languages, so the only language I use that isn't strongly typed is the bash shell script.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

This is a common construction in compiler-generated machine code, if the first function calls another just before return.

bar: .cfi_startproc ... do something call foo ret

foo: .. do more .. ret

If the functions have different stacks, there may be

second function.

--

-TV
Reply to
Tauno Voipio

I recall optimising things like that by changing the last two lines to: jmp foo

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

That's what I intended to say. Try the current release of GCC for ARM Cortex.

There may be a register pop before the jump, to keep the stack correct.

--

-TV
Reply to
Tauno Voipio

It will not, however, accept the original V6 C "a =+ b" ambiguous syntax, so older code may still need to be edited before compilation with a modern compiler.

Reply to
Scott Lurndal

I don't *think* I've ever written that or even seen it in valid code.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

From the V6 C compiler source:

/* * The hash table locations of the keywords * are marked; if an identifier hashes to one of * these locations, it is looked up in in the keyword * table first. */ for (ip=kwtab; (sp = ip->kwname); ip++) { i = 0; while (*sp) i =+ *sp++; hshtab[i%hshsiz].hflag = FKEYW; }

Note also that in that version of the compiler, MOS (member of structure) names were global and could be used with any pointer regardless of type.

formatting link

This makes it difficult to build the original V6 c compiler using a modern compiler :-)

Reply to
Scott Lurndal

Quite!

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Sadly javaScript is all you get in a browser

So do I.

>
--
If I had all the money I've spent on drink... 
..I'd spend it on drink. 

Sir Henry (at Rawlinson's End)
Reply to
The Natural Philosopher

Fair comment. So far when I've needed dynamic web pages, which isn't often, PHP has done everything I've needed.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

or wasm, which can run compiled code from

C C++ C# Kotlin Rust etc

Reply to
Andy Burns

Typescript has stronger typing and executes as standard javascript in the Browser.

---druck

Reply to
druck

Php is fine server side, but to get speed with a decent interactive page you need JavaScript in the browser, even if its just Ajax.

--
The New Left are the people they warned you about.
Reply to
The Natural Philosopher

How can you run code compiled for *86 on a ARM based browser?

--
The New Left are the people they warned you about.
Reply to
The Natural Philosopher

Use an intermediate language and a virtual machine, similar to Java JVM or .net runtime.

Reply to
Pancho

yeah. I looked it up...

--
Future generations will wonder in bemused amazement that the early  
twenty-first century?s developed world went into hysterical panic over a  
globally average temperature increase of a few tenths of a degree, and,  
on the basis of gross exaggerations of highly uncertain computer  
projections combined into implausible chains of inference, proceeded to  
contemplate a rollback of the industrial age. 

Richard Lindzen
Reply to
The Natural Philosopher

So my looking it up was a waste of time ;-)

I've always found web GUI work very difficult. I keep hoping someone will make it as simple a native GUI, but it still seems overly difficult.

Reply to
Pancho

The last time, maybe six months ago, that I needed to use a PHP script was to grab data input through a form on the associated web page, reformat it into a fixed format e-mail and send that via my MTA to a chunk of JAVA that builds requested data files and e-mails them back to the requester. This turned out to be fairly simple once I'd thought up a reasonably bullet-proof way to sanitise the input sufficiently to keep trolls, scammers and other nuisances out without inconveniencing genuine users.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.