today we were discussing different spacecraft accidents caused by/related to software, discussed Arian-5 case, and I remembered a Soviet case, where there was a problem with decimal separator and Fortran compiler. Decimal separator in USSR was comma, but in Fortran code it should be the dot.
Also, Fortran compiler did not consider using comma instead of the dot as an error, but as different code. And my friend said - the same is possible to do in C++ - and sent me the illustration.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World" << endl;
if (1,2!=1.2)
{
cout << (1,2) << endl;
}
return 0;
}
if you run it, you’ll get
Hello World
2
(:
#safety #programming #mistakes #safe #c++ #code #example #programming-languages #programming_languages #arian #fortran #source
I think, that GPLv3 is a license for which there came historical necessity.
Some people do not want their code to be used to lock devices. These people need a corresponding license.
And, I think that there is a historical necessity for the license, which does not allow to use the software by/for dictatorships/authoritarian regimes.
Because there might be someone who do not want let’s say his software to be used in order to prepare lists of political prisoners. I would not want to help even a soft regime.
The question which comes, then, who/how to decide which regime is authoritarian, which is dictatorship. Should the license contain direct pointers to the number of countries, or to refer to other organization’s assessments.
#software #free_software #open_sourge #gpl #license #code #regime #dictatorship #freedom
very interesting resource for those who are interested in compilers: http://turbopascal.org/turbo-pascal-internals
#internals #compiler #source #code #programming #compilers #pascal #turbo_pascal #book #analysis #reverse_engineering #research
discussing go, one says:
why this func incTwo(a, b int) (c, d int) not (int c, d) incTwo(int a, b);
and why var v2 string not var string v2;
answer:
because compare
int (*(*fp)(int (*)(int, int), int))(int, int) and f func(func(int,int) int, int) func(int, int) int
#go #syntax #grammar #programming #programming_languages #code #notation
#screenshot #freepascal #lazarus #solar_energy #code #pascal #trivial
code is here
#screenshot #freepascal #lazarus #solar_energy #code #pascal #trivial
For the exact reasons the pi-dividers complain about, the planes, in fact, do not crash. Pi-dividers: Please do not apply for a job where my money or my life will depend on your code.
comment from this blog post.
#ada #programming #types #safety #code #pi #typing
that’s my #native machine code. I was able to disassemble nmos #6502 machine code by glance. (: I could also disassemble intel 8080, but it wasn’t native (:
@{ Մուլտիվակ Multivac* ; satenik@spyurk.am} Երք 14 Հնվ 2014 08:34:59 AMT
nice #blog, source #code in #movies (:
In the #film #Terminator, the HUD shows a listing of 6502 assembly language which appears to have been taken from an #Apple II.
նախորդ փոստի համար օդանավի նկարը ստանալու համար գնացի հղումով, ընկա ֆլիքր, իսկ այդ սրիկաները, երեւի գիտեք, անջատել են աջ կտոց ֊ պահել որպես հնարավորությունը, հավանաբար, որ ավելի քիչ մարդ կարողանա քաշել նկարներ։ Այդ պատճառով ինչպես միշտ, սեղմեցի ctrl-u որ պեղեմ հղումը, ու ահա թե ինչ տեսա։ (:
so in order to get an airplane picture from the previous post, I went by the link, and it was flickr, you probably know that they disabled right-click, save as feature in order to prevent some people from downloading pictures. That’s why I always do ctrl-u and get the link to the picture from there. This is what I have found there today.
#flickr #photo #screenshot #jobs #html #hiring #chromium #code #asciiart #ascii-art #ascii #ֆլիքր #ֆոտո #էկրանահան #աշխատանք #քրոմիում
#ինտերնետ ֊ից կոդ պատճենել փակցնելը՝ #լուսանկար ֊ից արտանկարելու պես է։ copy-pasting #code from the #Internet is like drawing a #painting by looking at the #photo.
#Stepanov #STL
http://www.stlport.org/resources/StepanovUSA.html http://norayr.arnet.am/weblog/2010/02/27/պատմություն-սրճի-հոտի-մասին/
A small #hack for embedding #GDB #breakpoints in #C s#ource #code. https://github.com/kmcallister/embedded-breakpoints