this is a very good blog post՝ back to basics about strings in C and Pascal. i suggest you to read it, and now i’ll tell you something else:
in Oberon, Wirth decided to give up on Pascal strings, and use zero terminated strings.
however, there is no need to run by the whole array to find out the length of the string. we don’t even need to have a separate field that holds the length՝ compiler knows the length of the static string.
thus it can do compile time tests. for example we have the following Oberon source՝
MODULE tst;
IMPORT Out;
VAR i: SHORTINT;
str: ARRAY 1024 OF CHAR;
BEGIN
FOR i := 0 TO LEN(str) DO
Out.Int(i, 0); Out.Ln
END;
END tst.
lets try to compile it՝
[2020-09-02 16:00:20] $ voc -m tst.Mod
tst.Mod Compiling tst.
9: FOR i := 0 TO LEN(str) DO
^
pos 102 err 113 incompatible assignment
Module compilation failed.
[2020-09-02 16:00:21] $
voc compiles Oberon source to C, which is very good to illustrate what happens. if we have՝
str: ARRAY 16 OF CHAR;
then the output C code will be՝
static CHAR tst_str[16];
nothing more։ no field for the length.
still, this՝
FOR i := 0 TO LEN(str) DO
will translate to՝
tst_i = 0;
while (tst_i <= 16) {
as i said we know the length at compile time. doesn’t matter if you generate C or assembly, you already know the number, you can put the number to the output assembly code as well.
when we write a function which receives strings, we should not knowt the length of the received string, we just use ARRAY OF CHAR
as an argument՝
MODULE tst2;
PROCEDURE addStrs(VAR a, b: ARRAY OF CHAR);
BEGIN
(* do smth useful here *)
END addStrs;
PROCEDURE test*;
VAR
s0: ARRAY 32 OF CHAR;
s1: ARRAY 64 OF CHAR;
BEGIN
addStrs(s0, s1);
END test;
END tst2.
therefore C code will be՝
static void tst2_addStrs (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len)
{
/* here we think we can do smth useful */
}
void tst2_test (void)
{
CHAR s0[32];
CHAR s1[64];
tst2_addStrs((void*)s0, 32, (void*)s1, 64);
}
as we see՝ the function also gets the length of strings. and if we do LEN(a)
we get the length without any calculations.
now let’s see how dynamic strings work՝
MODULE tst3;
PROCEDURE addStrs(VAR a, b: ARRAY OF CHAR);
BEGIN
(* do smth useful here *)
END addStrs;
PROCEDURE test*(i: INTEGER);
VAR
s: ARRAY 32 OF CHAR;
ps: POINTER TO ARRAY OF CHAR;
BEGIN
NEW(ps, i);
addStrs(s, ps^);
END test;
END tst3.
now we hase a static string՝ s and we allocate a dynamic string with its pointer ps
.
lets assume we don’t know the size of ps^
string (^
means dereference) and we will receive the length of the allocated string as a function argument. it is not known at compile time.
first function remains unchanged, second function gets translated like this՝
static void tst3_addStrs (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len)
{
/* do smth useful here */
}
void tst3_test (INT16 i)
{
CHAR s[32];
struct {
ADDRESS len[1];
CHAR data[1];
} *ps = NIL;
ps = __NEWARR(NIL, 1, 1, 1, 1, ((ADDRESS)(i)));
tst3_addStrs((void*)s, 32, (void*)ps->data, ps->len[0]);
}
the _NEWARR
is a bit more complicated function, which is a part of the runtime.
but we can understand what it does՝ it allocates a space in the heap, and the pointer ps
we get now points to the struct
, which has a data
field and len
field.
this is a runtime information, and in this case we have to keep a separate field for the length of the string.
that’s it.
#oberon #c #pascal #wirth #programming #programming-languages #programming_languages #design #implementation #vishap #voc #compiler #compilation #strings #string #heap #stack #storage #storage-management #storage_management #length
Instead of a flat string, Erlang — oops, did I say Erlang? I meant Elixir — creates a nested list containing four leaf elements that add up to the string we expect: “Hello “, “&”, “amp;”, and " Goodbye”. At first glance this may seem like a pointless complication, but let’s see what the computer thinks about the situation.
If you look at the man page for writev, you’ll see it’s a “gathered write”, which means it writes data from multiple memory locations in a single system call. I wrote a little DTrace script to unpack the writev call we saw earlier, and peek at what that Elixir code is actually doing with this system call.
https://www.evanmiller.org/elixir-ram-and-the-template-of-doom.html
#erlang #elixir #dtrace #write #writev #syscall #string #strings #programming
Every time a new assignment or parameter passing is made, the reference count of the String has to be increased, this is an atomic lock, and is related to memory management, so it’s there whether you’re using simple reference-counting or copy-on-write.
Under a GC, no atomic lock is required, a simple reference (pointer) has to be copied. This is very efficient, locally, but the memory management costs are just deferred to a later garbage collection phase. Since immutable strings don’t have reference to other objects, the GC for them can theoretically happen in parallel without any drawbacks (assuming the GC supports it).
So under a GC, an immutable String type makes a whole lot of sense, as implementing a copy-on-write one requires a lot of effort, and a mutable one is problematic multi-threading wise.
https://www.delphitools.info/2013/05/13/immutable-strings-in-delphi/
#pascal #string #strings #immutable_string #delphi #gc #programming
Inappropriate deallocation of dynamic storage is a well-known source of catastrophic program failures. In the context of nonextensible applications, such as statically linked programs, this problem can (in theory) be mastered by a careful programmer; for extensible programs, it cannot! There is always the possibility that a module may be added to a program later on; such an extension can introduce additional references to objects of which the implementor of the core modules is unaware. Therefore, Oberon neither requires nor allows explicit deallocation of dynamic storage.
#oberon #gc #programming #programming_languages
The language, however, makes veryfew assumptions about the environment. If not available from a given operating system, dynamic module loading, command invocation, and automaticgarbage collection can be introduced by a small run-time system. In principle, it is possible to forego dynamic loading and to create traditional, staticallylinked applications, but this is anachronistic for the challenges of today’s software systems. Automatic garbage collection is indispensable for reliable,extensible software systems and is probably the biggest culture clash between Oberon and other compiled languages such as Pascal, C, or C++.
#oberon #gc #programming #programming_languages
Programming makes me think that people value the things they do because they were hard, not because they were useful. Once I master the hard thing, I’m proud of myself and find it easy to forget that perhaps that damn thing should not have been so hard in the first place. Probably true for a lot of human activities. Stuff should simply be easier, that is all.
because author’s toots expire, i want to put it here. #programming
the world went mad: there is trump in usa, putin in russia, and matrix works over http.
#why #screenshot #programming #compilation #technology #matrix #design
Why I use Object Pascal https://dubst3pp4.github.io/post/2017-10-03-why-i-use-object-pascal/
#pascal #programming #article #object_pascal #design
first of all, the article does not mention the most important thing - modules. pascal has modules. modules were introduced to c++ just in 2017. modules are why you can have type checks across boundaries of modules.
and pascal units are modules. if they do those loadable on demand, that would be cooler.
Pascal is very strict, so the programmer has to differ between subroutines that return values, in Pascal called functions, and subroutines that does not return something, called procedures. Functions and procedures can also be passed to variables or other functions thanks to procedural types.
well, in pascal successors the function
keyword removed, leaving just one procedure
, or to be precise PROCEDURE
because Wirth decided to make successor languages case sensitive and decrease the number of lexems.
It is possible to overload operators for specific types. With this feature, you have the power to define, let’s say, the result of the addition operation of two or more instances of the same class.
That’s one of the reasons why Wirth doesn’t like modern pascal implementations. The author tries to say - Pascal has all the features, while Wirth was trying to create a minimalistic language by following “less is more” principle.
Pascal is modular
okay, he said this. but did not connect to the type checks.
Pascal has good documentation
indeed, freepascal.org documentation is good, understandable and comprehensive.
well, for me Pascal today is like ‘better c++’, but why would i need better c++ if i have Oberon?
i will use it to write gui applications, or if i need to write something very fast and i don’t have libraries for Oboren and time to create libraries or bindings.
#pascal #oberon #modula-2 #wirth #design
i was searching for vector ui libraries, and would like to understand, whether it is a good idea today, and found this library, so cute and nice. https://littlevgl.com/ not what i was searching at all, i was searching for a desktop library.
#programming #technologies #it #embedded #gui #library
btw, firemonkey started as a vector gui library (was called vgscene back then), then got purchased by embarcadero, and now it is a raster library, probably for performance reasons.
interesting, important discussion https://github.com/modula3/cm3/issues/42
i think the requestor is right. may be i need tot initialize the array with other values, why spend time to initialize it to zeros?
#programming #programming_languages #modula #modula-3 #design
First things first: printf is expecting a valid (i.e. non-NULL) pointer for its %s argument so passing it a NULL is officially undefined. It may print “(null)” or it may delete all files on your hard drive–either is correct behavior as far as ANSI is concerned (at least, that’s what Harbison and Steele tells me.)
#programming #c #null
A good language design may be summarized in five catch phrases: simplicity, security, fast translation, efficient object code, and readability.
http://norayr.am/papers/Hoare_Hints.pdf #hoare #programming_languages #design #programming #computer_science
i guess, may be preference for tabs or spaces is connected to how low level person is that, if it’s a person who prefers more granular control, even when not necessary, they would prefer spaces over tabs. #programming #tab #space
this is a very good article https://talks.golang.org/2012/splash.article #golang #go #rob_pike #programming
What I found out was that even though there are frustrating moments when inheritance IS actually the optimal solution, being forced to use composition has helped me think differently about how to structure my code for the better. Inheritance makes it too easy to design yourself into a trap where refactoring becomes extremely expensive even when necessary. Go is designed to make refactoring much easier by doing things like forcing the use of composition.
https://www.quora.com/Why-should-someone-choose-Go-as-his-main-programming-language
#golang #programming
Competitive programming means you are generally skipping some solid philosophies and patterns for stable development. Training to be competitive is thus developing bad habits on purpose.
https://www.quora.com/Computer-Programming-Is-there-any-top-competitive-programmer-using-Go-as-main-language #programming
#robot #programming
http://simula67.at.ifi.uio.no/50years/ 50 years anniversary of Simula, the first object-oriented programming language.
#simula #programming-languages #programming_languages #programming
C, Rust, Pascal and Go are the best in terms of energy consumption!
https://jaxenter.com/energy-efficient-programming-languages-137264.html
#golang #c #rust #pascal #energy #programming-languages #programming_languages #programming
TIL swift allows emojis as variables
yes, that’s a very useful feature of the modern languages, and unicode will allow to use one exact symbol instead of =>, <=, and most importantly ==, by mapping keys, so that we’ll avoid problems like if (a=b)
which is always true. (:
#programming #programming-languages #programming_languages #emoji #unicode
i love rob pike http://users.ece.utexas.edu/~adnan/pike.html
Rob Pike’s 5 Rules of Programming
Rule 1. You can’t tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don’t try to second guess and put in a speed hack until you’ve proven that’s where the bottleneck is.
Rule 2. Measure. Don’t tune for speed until you’ve measured, and even then don’t unless one part of the code overwhelms the rest.
Rule 3. Fancy algorithms are slow when n is small, and n is usually small. Fancy algorithms have big constants. Until you know that n is frequently going to be big, don’t get fancy. (Even if n does get big, use Rule 2 first.)
Rule 4. Fancy algorithms are buggier than simple ones, and they’re much harder to implement. Use simple algorithms as well as simple data structures.
Rule 5. Data dominates. If you’ve chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming.
Pike’s rules 1 and 2 restate Tony Hoare’s famous maxim “Premature optimization is the root of all evil.” Ken Thompson rephrased Pike’s rules 3 and 4 as “When in doubt, use brute force.”. Rules 3 and 4 are instances of the design philosophy KISS. Rule 5 was previously stated by Fred Brooks in The Mythical Man-Month. Rule 5 is often shortened to “write stupid code that uses smart objects”. #programming
apparently, the good style when programming PLC’s or even microcontrollers, is to not write to the ports directly from different functions, but set flags, then have only one function, which looks at the flags and sets ports.
i’ve seen the schneider’s development environment, and apparently you cannot copy the code, let’s say to compare (diff) it in the third party tool. you do everything in one, sluggish, big, slow IDE, not only the code development, but also you write to the device, you read from the device, you configure connection settings, everything.
just the opposite of unix philosophy - do everything, and do it bad.
i guess that’s because most of the developers who use schneider products are electrical engineers, otherwise if they would be programmers, then by being acquainted with the cool development tools and culture, they would not tolerate such a product.
#schneider #plc #programming
i’ve read about this way of debugging. #duck #debug #programming
what i enjoy very much in discussions on our #oberon channel in IRC, is that it becomes obvious that knowing the language, does not mean knowing how to use it, i. e. how to program.
#programming
you use VAR because you want to get the pointer to the array, instead of copying the whole array to the procedure’s stack.
so the suggestion was that if you want to make sure the array won’t be modified, you use “-” mark.
what about optimizations, they say, that in principle compiler can understand that you did not write to the passed array, and instead of passing it to the procedure by value (by copying the whole array), pass it by reference (by copying only pointer to it).
i disagree, because i believe, it is important to mark your intentions. if you intent to make sure you pass it read-only, you pass it with “-”, if you intent to pass it read-write, you pass it just with VAR. passing with ‘OUT’, when you cannot read it, but can only write to it is not supported in Oberon.
@{Antranig Vartanian ; antranigv@spyurk.am} 01.06.2017, 19:08:27
#oberon #programming #language #design ##
Jan was saying that the pull request has to be immediately approved, even if it breaks the code. https://www.youtube.com/watch?v=UdyOOGwSdbs
This is also about so called “instant gratification” which our limbic system likes so much.
#social_architecture #community #programming #open-source #barcampevn #barcampevn17 #software
now it’s better (than the commented version)
@{Antranig Vartanian ; antranigv@spyurk.am} 17.05.2017, 22:29:36
solving https://www.reddit.com/r/dailyprogrammer/comments/68oda5/20170501_challenge_313_easy_subset_sum/
#DailyProgrammer #Oberon #Oberon-2 #voc ##
#programming #screenshot
on memory.
so, garbage collector is a good solution when you have two threads, or two programs that use shared memory, and you need to free memory automatically. it is very hard to do that in other ways (let’s say with smart pointers). which is obvious, one process does not know how the other behaves.
on safety. wow, in rust you have no null pointer. and you cannot dereference it therefore.
#programming
build your own lisp - very good book online http://www.buildyourownlisp.com/ #programming #compiler #lisp #book
Type safety and its strict enforcement is our religion - No blasphemy please.
#programming #religion #blasphemy #screenshot #modula-2 #modula
Beej’s Guide to Network Programming http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html #network #programming
i already have reshared it once from here but would like to share it again. (:
#programming #software #development
A programmer had a problem. He thought to himself, “I know, I’ll solve it with threads!”. has Now problems. two he
#programming #threads
From a software engineering point of view, of course, a program must “work” according to its specifications. But this is not sufficient. The manner in which it is designed and written is as important as whether the program works. The ease with which the software can be changed to upgrade performance, meet additional specifications, or rectify errors that are later discovered is directly related to the quality of design and implementation. The “hot-shot” programmer who can quickly throw together cryptic lines of code that only he or she can understand is of questionable value. The programmer who boasts of using clever tricks to reduce the total number of lines of code has probably missed the point. Computer memory is relatively cheap, whereas the modification of software (a process greatly enhanced by program clarity) is generally expensive. Thus, given a choice between a little less economy of code or greater program clarity, the latter is often preferred.
From the ‘Software Engineering with Modula-2 and Ada’ by Wiener and Sincovec.
#programming #modula-2 #ada #wiener #sincovec #quote
programming is not only about writing the code. (: it’s about ELIMINATING THE CODE! without any pity. #programming
one better than the other.
#book #books #programming #photo #modula #modula-2 #modula-3 #ada #components #algorithms
one of the most important messages for me from Simak’s “City” is that number of speakers matters, size of the community matters. Not that I did not know or acknowledge that, but the book made me sober again about it.
Humanity cannot develop if there’s only one city of us.
Social network cannot develop if there’s not enough people. Diaspora pretty much stuck, because many say ‘it’s lonely here’, life happens at other places, like twitter.
Culture, and national culture cannot develop if there’s not enough people.
(I believe very good example of it are animes and Hayao Miyazaki, or Satoshi Kon. If there would be no possibility to be an animator in Japan, and Hayao would work as an animator in let’s say USA, nobody would allow him to make the films he would like to and as he would like to. There’s a different culture of making films. And there was a necessity in big enough Japanese, local market, to cover anime production costs, in order to make possible sustainable creation of them. And after they have been made, they can be exported to the other countries as is. And people in other countries would appreciate the difference of making.)
Operating system, and even flavour of it (like Sailfish) needs a number of users and developers. (Which it did not get, just like diaspora.)
And of course programming language needs a number of speakers to create an ecosystem around it.
#communities #city #simak #culture #programming
he’s teasing me:
— i don’t have a github account. shell i be ashamed? — no, why would you? — but instead, I have a microsoft visual studio account! — that you should be ashamed of, man, yes.
#github #programming #talk
http://norayr.am/papers/Dijkstra%20-%20Efficient%20String.pdf
by Eelco J. Dijkstra (:
#strings #programming
@{Antranig Vartanian ; antranigv@spyurk.am} told me that he met Paul Vixie, author of vixie-cron. (: Here, in Yerevan. At some conference. And Paul said that he loves Modula-3 and Wirthian languages. And he was writing in Modula-3 and he has an article about it. http://www.redbarn.org/node/20
#Modula-3 #Vixie #programming_languages #programming #Yerevan
yep
#programming
if you are forced to use a subset of the language due to its complexity, then they failed to offer an useful language.
from #oberon room on freenode.
#programming #programming-languages #programming_languages #chat #talk
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
if you write slow program, or you write it in a “slow”, interpreted language, you have to remember, that if it’ll be run on many many computers/devices, then you are responsible for the excess of the consumed energy in the whole world.
go green, use compilers. (: go green, optimize for speed. (:
#programming #energy #go_green #performance
so this is an intentional design decision.
The Airbus and Boeing FBW computers design considerations for generic errors… The ELAC is produced by Thomson-CSF using Motorola 68010 processor, and the SEC is produced by SFENA/Aerospatiale using Intel 80186 processor
Airbus (or the DGAC) was not willing to accept that a fault with the same piece of code in two separate computers could cause the loss of an aircraft.
#programming #airbus #boeing #fbw #elac #design
Generics may well be added at some point. We don’t feel an urgency for them, although we understand some programmers do.
Generics are convenient but they come at a cost in complexity in the type system and run-time. We haven’t yet found a design that gives value proportionate to the complexity, although we continue to think about it. Meanwhile, Go’s built-in maps and slices, plus the ability to use the empty interface to construct containers (with explicit unboxing) mean in many cases it is possible to write code that does what generics would enable, if less smoothly.
https://golang.org/doc/faq#generics
#golang #go #generics #programming
Golang has generics
http://blog.jonathanoliver.com/golang-has-generics/
#golang #programming
I am used to go to Aragats or Sevan to watch, or even catch on camera a falling star during the nights when Earth meets Perseids. However it’s not necessary to wait for perseids or leonids: when you are tired from work, you still may try to catch a star with your camera phone. For instance an animated star when bookmarking a page. I’ve got it at the first try. (: Can you?
#star #screenshot #bookmark #firefox #windowmaker #programming #development #engineering #catchastar (:
C++ is a horrible language. It’s made more horrible by the fact that a lot of substandard programmers use it, to the point where it’s much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do nothing but keep the C++ programmers out, that in itself would be a huge reason to use C.
Linus Torvalds, here.
#linus #linus_torvalds #git #programming_languages #programming-languages #c++ #c #programming
apparently, my forking server example (:
#oberon #hn #screenshot #voc #vishap #irc #example #programming
Even a “FBFeedAwesomeizer” - which alone is a collection of 74 classes and protocols.
This is why the application binary itself is over 114Mb.
on reverse engineering of the facebook application for ios.
http://quellish.tumblr.com/post/126712999812/how-on-earth-the-facebook-ios-application-is-so
#facebook #ios #application #reverse_engineering #programming
very interesting discussion for me https://github.com/modula3/cm3/issues/12
What do you think about implementing properties in Objects?
OBJECT
...
PROPERTIES
intValue : INTEGER READ GetIntValue() WRITE SetIntValue();
I wouldn’t mind adding some things like this as long as they are very obviously simple syntactic sugar for existing operations. This looks like something like that…
shouldn’t it be, though
PROPERTIES
intValue : INTEGER
READ := GetIntValue() : INTEGER
WRITE := SetIntValue(to : INTEGER);
to more closely match the syntax for methods.
Also it won’t work on RECORDs, which is a bit odd.
I suppose it follows the existing property (which I would not want to break) that you can almost always change a T = REF RECORD … to T = OBJECT … without breaking anything, but not the other way around.
#modula #programming #programming_languages #modula-3 #cm3 #modula3 #compiler
why doesn’t graphics on ios lag as much? apparently, it’s because when you put the finger on the screen, it stops every process, except of a couple of important system services. even if you run a browser, and you put finger on screen, it stops unless you raise the finger.
android, on the contrary, tries to divide resources between processes.
this is why we often notice lags on android, and this is why ios seems to work smoothly. we cannot say - faster. it’s not faster, because other processes don’t even work for some time. it’s responsive, and looks faster to the user.
well, at least, this is why it’s often happens, when android user cannot call, or answer the call, while the same situation is not very much common in case of ios.
#android ios #google #apple #programming #operating_systems #scheduler #priority
i love to read threads like this
#oberon #oberon-2 #programming #programming_languages #history #discussion #usenet
A striking example of this phenomenon has recently been provided by Ada. If Ada is going to provide a standard, that standard had better be unambiguously documented. At least two groups have had a go at it; both efforts resulted in formal texts of about 600 pages, i.e. many times longer than needed to ensure the impossibility of ever establishing firmly that the two documents define the same programming language. The fault of the patent unmanageability of these two documents lies neither with the two groups that composed them, nor with the formalisms they have adopted, but entirely with the language itself: only by not providing a formal definition themselves, could its designers hide that they were proposing an unmanageable monstrum. That Ada will decrease the pain of programming and increase the trustworthiness of our designs to within acceptable limits is one of those fictions for which a military education is needed in order to believe in it.
#ada #programming #dod #design #programming_languages #programming #dijkstra
interest in pascal and haskell rises and fades together with study periods.
#screenshot #programming_languages #ada #pascal #haskell #study #programming
executable shared libraries on linux: http://rachid.koucha.free.fr/tech_corner/executable_lib.html
#linux #executable #shared_library #library #programming
It generally takes me some time when talking to people to understand what they mean by terms like “mobile”, “web” and “cloud”. But when I find out, I can help them with it.
#mobile #web #cloud #programming
how C evolved http://pastebin.com/UAQaWuWG
so it wasn’t designed from scratch indeed. it had to pass evolutionary process. and that’s not always about best design.
#C #programming #programming_languages
amazing story on how he wrote a C compiler in 40 days: http://www.sigbus.info/how-i-wrote-a-self-hosting-c-compiler-in-40-days.html
#compiler #programming #programming_languages #language
there is a call, and callback, there is a tease and teaseback.
#callback #programming #relationships
My definition of an expert in any field is a person who knows enough about what’s really going on to be scared.
– P. J. Plauger, Computer Language, March 1983
#expert #plauger #computer_language #quote #programming #computer
i am reading a paper about making a kernel which supports cooperative multitasking, to replace the current A2 kernel which supports more wide spread blocking synchronization. i wonder if they’ve managed to change the kernel and if current A2 has this lock free kernel or not. i remember i have read something about problems they had with drivers - they need to be rewritten to not use interrupts any more.
#multitasking #cooperative_multitasking #theses #paper #a2 #oberon #operating_systems #blocking_synchronization #preemptive_multitasking #parallelism #programming
quote:
— can you explain what is object oriented programming compared to old fashioned procedural programming?
— sure. first of all you can develop an application without knowing how to write code. secondly you can develop in the graphical user interface environment. thirdly you can easily change or debug that code.
it turned out that object-oriented programming means that you can develop an application without knowing how to write code. according to this human, you cannot write an object oriented code without working in gui environment. and you cannot easily change or debug your code, if it’s not object oriented. never stop learning.
#programming #jan_lewis #object-oriented_programming #oop #procedural_programming #simple_explanation #explanation
how microsoft banned third party language compilers.
We are very keen on supporting WinRT with native Delphi & C++ code. Right now, the issues surrounding the WinRT space center around the fact that many OS-supplied APIs which are required by anyone implementing their own language RTL are actually off-limits unless you’re the VC++ RTL DLL. You know, little things like RtlUnwind for exception processing and VirtualAlloc (et. al.) for memory management… Any calls to those APIs from your application will automatically disqualify your application from being an “official” WinRT application capable of delivering through the MS app store.
when I read something like this, or even “how to pay to apple, get keys, and become an officially approved developer”, I have a strong desire to never participate windows/macos/ios development and I feel the freedom I have on GNU+Linux/BSDs, etecetra.
#microsoft #compilers #delphi #embarcadero #winrt #api #programming
IDDEE — Integrated development and documentation and execution environment.
Suggested by Templ for Oberon systems ported to other operating systems.
#oberon #oberon-2 #iddee #ide #templ #operating_systems #blackbox #programming
I woudl like to quote this post, instead of resharing because I don’t agree with everything there. I don’t think we have to forget our native languages, that’s why comparison to the switch from facebook to diaspora, which was made there seems deeply not right to me. I personally value my language, and it doesn’t make me feel good when I acknowledge threats it has.
Also, I have to say that I also fear simplicity in design. Simplicity can mean gaining flexibility and expressiveness, like in case with Oberon operating system and language, and it can mean something like Newlang, the language which was simple but was designed in order to rule those people.
Simplicity can also mean “don’t know what pointer is” which, I believe is wrong, because every programmer should know what pointer is. Simplicity can mean making phonemic orthography, and I am opponent of that. That approach, taken by communists, in my opinion, damaged Armenian orthography and language.
So I believe, simplicity does not always mean good design. However, good design is very often simple. Now the quote.
English vs. Esperanto:
English:
You sang nicely, AND You have sung nicely, AND You had sung nicely, AND You did sing nicely , AND You did use to sing nicely, AND You were singing nicely, AND You used to sing nicely.
Esperanto:
#esperanto #design #simplicity #comparison #english #orthography #phonemic_orthography #language #armenian #oberon #programming #pointer #flexibility #expressiveness
I have managed to port Wirth’s PICL language compiler (which generates code for PIC16F84) to GNU/Linux(used voc to compile it), I mean, it’s possible to run it, compile sample programs with it on my desktop. Now need to make some more improvements and write a manual so that people can use it.
#pic #pic16f84 #embedded #embedded_programming #programming #screenshot #compiler #wirth #picl #programming_languages #hardware #hardware_programming #oberon
I took the 142 rules of the MISRA-C:2004 “Guidelines for the use of the C language in critical systems” and applied them to Oberon-07. I discovered that more than 70% of the rules are not required when programming in Oberon-07. They are either already enforced by the language or are not applicable.
Examples of MISRA rules that are not applicable to Oberon-07:
Rule 14.4: The goto statement shall not be used. (Oberon-07 does not have GOTO)
Rule 14.5: The continue statement shall not be used. (Oberon-07 does not have CONTINUE)
Examples of MISRA rules that are enforced by the design of Oberon-07:
Rule 14.7: A function shall have a single point of exit at the end of the function.
Rule 16.6: The number of arguments passed to a function shall match the number of parameters.
The remaining 30% of MISRA rules that also need to be checked when using Oberon-07 include:
Rule 2.4 (advisory): Sections of code should not be “commented out”.
Rule 20.4: Dynamic heap memory allocation shall not be used.
#programming #oberon-2 #oberon-07 #oberon #misra #safety #safe #guidelenies
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
https://www.youtube.com/watch?v=SjtyifWTqmc
#nmap #mainframe #hack #ettercap #des #john_the_ripper #cryptography #maintp #hacktivity #philip_young #bash #unix #zos #programming
https://www.youtube.com/watch?v=SjtyifWTqmc
#nmap #mainframe #hack #ettercap #des #john_the_ripper #cryptography #maintp #hacktivity #philip_young #bash #unix #zos #programming
The Atari ST was a Motorola M68000 based personal computer, introduced in 1985, quite affordable and for some reason especially popular in Germany, though it also was not unseen in certain circles here in the Netherlands.
The model that probably sold best was the Atari 1040 ST. It had an 8 MHz M68000 CPU and came with a full Mbyte of RAM, which was quite a lot in those days. And even better: you could actually address all that memory from your programs, in sharp contrast with the PC’s of those days, where you had to live with 64 Kbyte segments. This and the fact that the M68000 CPU was so similar to what we used at work in our Unix boxes and workstations, made the Atari ST quite popular amongst technical and scientific users like me.
http://www.beastielabs.net/minix.html
#minix #atari #atari_st #m68k #m68000 #motorola68k #motorola68000 #addressing #memory #atari_1040ST #retro #programming #minix_st
if you write power efficient software on a small microcontroller, you make it sleep for some time, if it has nothing to do, then awake it to continue it’s work. (:
#programming #microcontroller #micro #power
the cure from procrastination.
#procrastination #chat #irc #programming #screenshot #cure
mobile device manufacturers are trying to advertise their products as means of creativity. not only means of consumption. which is also good, because it’s about us. we want to be creative, not only consume.
i would like to say, let’s not forget, that we have amazing tool for creative work, right under ours very nose, but it becomes more and more neglected.
it is banal desktop personal computer.
it has terrific operating systems, well developed, toolkits and frameworks for writing software, diverse tools for creative work - photoshop and gimp, inkscape and illustrator, maya and blender, different cad systems for architects and engineers, cool software to create movies and animations.
btw, it’s symptomatic, that gtk toolkit was created in order to write gimp. (: because if you have such cool programs it means you have cool tools to write them.
on the contrary on mobile we have tools like instagram and picsart (btw, latter is developed in armenia, some of my friends work there, it’s founded by my former chief), and those tools are more like toys, too primitive.
and when you have only mobile device you have much more limited possibilities to learn, to go deeper, if you are curious. if you use windows, you can discover cmd, regedit, download real visual studio, use real professional tools like adobe illustrator, even when pirated. on mobile you cannot have such tools. you cannot make creative work which demands more tools, more efforts, and more knowledge, more personal development. that’s why i liked my n810 with maemo, it was basically hildon over debian, and when you have debian, it means whole gnu/linux world in your hands, you have tools, you can go deeper, do and learn a lot.
so this all beauty - development frameworks, toolkits, creative and professional tools, it’s all now neglected by the society which is amazed with mobile so called apps.
#mobile #desktop #photoshop #gimp #illustrator #inkscape #blender #instagram #picsart #console #tools #programming #gtk #debian #maemo #creativity
The way they write functional programs for decidedly non-functional problems is through a trick called a monad, which I will not explain and nobody understands anyway, but the point is, in the hands of a very clever programmer, functional programming “can” be used in many more places than you would naively expect.
And that is really the problem. It works at first and then it keeps working until suddenly it doesn’t. And this
communismfunctionalism spreads ideologically until yourcountrycodebase is saddled with debt and nobody can bail you out because you have a lot of monads and nobody can understand them.
#structs #classes #functional_programming #imperative_programming #programming #monads #apple #siwft #programming_languages #software #development #design
When module stays loaded and can be manipulated from the “shell” by calling so called commands, i. e. exported functions of that module. That’s very beautiful design, I believe.
https://www.youtube.com/watch?v=byC98PHZR2Y
#oberon #operating_systems #programming #draw #demo #shell #tui #interface #design
— A. is such a nerd. And he’s always alone.
… Five minutes later
— See, what is written on this receipt, that we bought “4.000 tickets”. (we bought four tickets)
— So we could get 4.001 ticket?
— This actually increases entropy.
— Hm?
— Because it does floating point calculation when it’s not necessary therefore spends more time and energy.
— Comon.
— And if the device has no floating point unit and emulates…
— And?
— Imagine millions of such devices, and every one spends more energy than it could.
— You know why A. is always alone? Think about it.
#talk #programming #people
something about new warning message։
#oberon #voc #programming #screenshot
quote of the day:
#programming #race_condition #quote #question #talk
it is an old paper and I like it a lot.
A Comparison of Ada and Pascal in an Introductory Computer Science Course http://www.sigada.org/conf/sa98/papers/murtagh.pdf
#ada #pascal #programming #teaching #education #computer_science #paper
https://www.youtube.com/watch?v=Pe0ZdzO_urU
#interface #gui #turing #a2 #bluebottle #oberon #programming
Operating systems verification http://ssrg.nicta.com.au/publications/papers/Klein_09.abstract
#operating_systems #os #programming #verification #paper
aaa, my pull request accepted!
https://github.com/devi/uxmpp/pull/2#event-293939170
#github #xmpp #uxmpp #programming #jabber
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
if the universe does end when you cast a struct sockaddr_in* to a struct sockaddr*, I promise you it’s pure coincidence and you shouldn’t even worry about it.
http://www.gta.ufrj.br/ensino/eel878/sockets/sockaddr_inman.html
#programming #sockets
critics of go http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
#critics #golang #google-go #go #programming #programming-languages #plan9 #assembler #language #design
Now, modular programming is possible in C, but only if the programmer sticks to some fairly rigid rules:
http://www.modulaware.com/mdlt35.htm
#programming #modularity #modular-programming #modules #C #modula #modula2 #oberon #consistency #safety
my friend have been written a linux kernel module to count traffic which gets through his tor node.
https://github.com/edwardoid/nc_mod
counter data gets available to user as a file in /proc directory.
#linux #network #traffic #counter #tor #kernel #module #programming
Create your own Version of Microsoft BASIC for 6502 http://www.pagetable.com/?p=46
#microsoft #basic #6502 #retro-computing #retro #cc65 #programming
My dad used to say, “Slow down, son. You’ll get the job done faster.” http://ventrellathing.wordpress.com/2013/06/18/the-case-for-slow-programming/ #programming
object oriented ansi c http://www.cs.rit.edu/~ats/books/ooc.pdf
#programming
project oberon 2013 on hacker news https://news.ycombinator.com/item?id=8620053
#oberon #project-oberon #programming #os #operating-systems #hacker-news #book
Using animals as an example (OO people love animals), define mammal and derive giraffe from mammal. Then define a member function mate, where animal mates with animal and returns an animal. Then you derive giraffe from animal and, of course, it has a function mate where giraffe mates with animal and returns an animal. It’s definitely not what you want. While mating may not be very important for C++ programmers, equality is.
https://www.sgi.com/tech/stl/drdobbs-interview.html
#programming #oop #quote
The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.
#programming #oop #erlang #joe-armstrong #quote #coders-at-work #book
the belief is wide-spread that programming is easy, can be learned on the job, and does not require specific training or talent. However, it is not programming in the sense of coding that is the problem, but design. Applications have become very demanding and their tasks complex. Mastering this growing complexity is the primary challenge. To tackle this task requires experience and an explicit ability for abstraction on many levels. It is difficult to learn this, and even more so to teach it. Not every programmer is a born designer.
https://www.simple-talk.com/opinion/geek-of-the-week/niklaus-wirth-geek-of-the-week/
#programming #wirth #design
wow, here Dijkstra writes how he lived at Wirth’s house near Zurich and how he was amazed with he’s works.
#wirth #dijkstra #zurich #modula-2 #modula2 #medos #programming
#fun #cplusplus #virtual-function #destructor #source #programming
#oberon #programming #operating-systems #oberon-v5 #screencast
@{ Փրչրթան✱ Թանաքեան ; norayr@spyurk.am} 11.09.2014, 22:31:53
Oberon V5 կոմպիլյացիա։
#օբերոն #աւբերոն #կոմպիլյացիա #էկրանահան
Donald Knuth interview https://github.com/kragen/knuth-interview-2006
#knuth #interview #story #life #programming #science #art
#debug #debugging #bug #software #hardware #programming #development #history
added an example from Reiser’s book. IFS, Iterated Function System.
@{ Փրչրթան✱ Թանաքեան ; norayr@spyurk.am} 28.08.2014, 14:49:37
աւելացրի Ռայզերի գրքից մի օրինակ։
#վօկ #վիշապ #ծրագրաւորում #նկար #գրաֆիկա #մաթեմ
#voc #vishap #oberon #programming #graphics #math
this is an amazing story about writing software at #apple http://www.pacifict.com/Story/
We got resources that would never have been available to us had we been on the payroll. For example, at that time only about two hundred PowerPC chips existed in the world. Most of those at Apple were being used by the hardware design engineers. Only a few dozen coveted PowerPC machines were even available in System Software for people working on the operating system. We had two. Engineers would come to our offices at midnight and practically slip machines under the door. One said, “Officially, this machine doesn’t exist, you didn’t get it from me, and I don’t know you. Make sure it doesn’t leave the building.”
Greg was lurking outside one day, trying to act casual, when another engineer accosted him and said, “I’m sick and tired of you guys loitering in front of the building every day!” Later he phoned the appropriate bureaucrats on our behalf. I listened to his side of the conversation for twenty minutes: “No, there is no PO, because we’re not paying them. No, there is no contract, because they are not contractors. No, they are not employees; we have no intention of hiring them. Yes, they must have building access because they are shipping code on our box. No, we don’t have a PO number. There is no PO, because we’re not paying them.” Finally, he wore them down. They said to use the standard form to apply for badges, but to cross out Contractor and write in Vendor. Where it asked for a PO number, we were to use the magic words “No dollar contract.” We got badges the next day. They were orange Vendor badges, the same kind the people working in the cafeteria, watering the plants, and fixing the photocopy machines had.
#Graphing-Calculator #powerpc #programming #software #development #skunkworks #clandestine #motivation
There is nothing a mere scientist can say that will stand against the flood of a hundred million dollars. But there is one quality that cannot be purchased in this way — and that is reliability. The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay.
#hoar #computer-science #programming #quality #safety #reliability #price #simplicity #software
Well, Tom and Dick, American citizens knew how to code but have not been able to find a job. Tom failed the drug test. Dick didn’t know how to write the algorithm for identifying douchebags while working for a dating site. He was let go. Raj was hired in his place, who copied snippets of 4 different algos from stackoverflow and somehow made them work by putting in 24 hours of straight work. Dick wanted work life balance. Raj thought work was life. Steve, Raj’s boss still didn’t like him because of his poor communications. He fored Raj and hired Harry, who had great communication skills and wrote ninja-level code. However, Harry was an expensive resource but the company needed him, so they let Steve go and hired Raj back in, because they had too many Project Managers not doing anything and they needed more coders. Raj was happy to have a job, great money, Green card in processing and two cute kids. What Raj didn’t have and what he wanted was the drop dead gorgeous blonde that lived next door. But the blonde wasn’t into Raj so Raj was sad. Blonde loved Steve and once made out with Harry, but Steve and Harry were sad because they didn’t have the money that Raj was making. Mark, owner of facebust had money and girls but he got married way to early and his company had recently acquires Wazzup for 18 billion so he was sad for not being able to monetize it. The founder of Wazzup up was sad as he thought he should have put a bigger sale price on the Table.
The point is, no one is happy. Life isn’t fair. Grow a pair. Work withw what you have. Be the best in what you do. And you will have a job. No matter what the H1B cap is. 10 years ago, most of these valley jobs in social media and such didn’t even exist at this scale. And if you’re really particular about made in usa policy, take your clothes off as I bet your wrinkly ass, your clothes are from Bangladesh and that laptop you work on was made in china. Globalization suckers. We all are a victim of it. and Beneficiaries. Live with it.
#life #happiness #globalization #visas #america #wazzup #blonde #job #work #green-card #programming #h1b #silicon-valley #bangladesh #beneficiaries #marriage #stackoverflow #algorithms
https://lists.inf.ethz.ch/pipermail/oberon/2014/007079.html
#oberon #fpga #programming #operating-systems #hardware-design #computer #photo
work in oberon v4 system (in this example it’s used over windows).
https://www.youtube.com/watch?v=UTIJaKO0iqU
Note how he’s able to compile source which exist only in window (marked by asterisk), how he calls exported module functions from the environment.
#oberon #operating-systems #programming
Autopilot / automatic landing video
The plane starts to appear about 30 seconds into the video.
autopilot is programmed by Shiryaev in #Oberon-07 language.
#oberon #programming #uav #plane #landing #airplane
Niklaus Wirth steuert Ceres-PC mit Oberon @ETH, 27. Mai 2011
https://www.youtube.com/watch?v=HoZuzE7Lq5E
#niklaus-wirth #wirth #ceres #oberon #eth #2011 #operating-systems #video #programming
I know these three guys, who are making that game. One programmer, Bagrat Dabaghian, who have been written also a rendering engine which is used in the game(codes 16 hours per day), one artist(don’t know him well actually) and one composer - Serge (nice one, always liked his works).
http://www.youtube.com/watch?v=0CLU7xfcDDI
it will be first available for iOS and PC/Windows then for Android. #shadowmatic #game #armenia #programming #art #app #ios #android #pc #windows #graphics #render #3d #room #shadow #shadows #games #yerevan #bargat-dabaghian #elkony #el-kony #bagrat-dabaghian #game-making #rendering
the surest way to improve programming productivity is so obvious many programmers miss it. simply write less code!
#modula-3 #harbison #programming #quote #book
wow, polymorphism in limbo reminds templates http://9fans.net/archive/2004/05/373
#limbo #inferno #polymorphism #oop #programming
Most people don’t even know what sysadmins do, but trust me, if they all took a lunch break at the same time they wouldn’t make it to the deli before you ran out of bullets protecting your canned goods from roving bands of mutants.
#mutants #programming #sysadmins #lunch
open source linux compatible hardware for 22 euro
github page
#linux #hardware #open-source #board #olimex #programming #design
Running 4 copies of an operating system at once
Dick explained to me that they were using an operating system from a company called Telesoft. Telesoft, headed by UCSD Pascal author Ken Bowles, was building an Ada compiler on top of its ROS (Renaissance Operating System) product. He told me (and I remember this clearly) that they had the operating system running in single user mode but that they wanted to run it in multi-user mode. At that point I was barely 21 years old. I had written a whole bunch of system-level 6502 assembler code and I had a really good ground-up understanding of the way that contemporary computer hardware worked. After studying the manual for the SUN board, I decided that I could simply break the 2MB of physical memory in to 4 chunks of 512KB each and run 4 copies of the operating system, gaining control via interrupts and device drivers.
#6502 #telesoft #pascal #ada #operating-systems #ucsd-pascal #compiler #ros #renaissance-operating-system #programming #history #computing #programming-languages #sun #intellimac #unix #msx #motorola68000 #68000 #68k #motorola-68k #ibm #stanford #research #memory
բայց եթէ դուք դանդաղ էք գրում, դա դեռ չի նշանակում, որ ձեզ մօտ այս դէպքն է։ ։Ճ
Վերջերս նկատում էի, որ ինչքան շատ եմ փորձ ձեռք բերում, այնքան շատ է նախագծերս աւարտելու կամ որոշակի խնդիրները լուծելու համար ժամանակ պահանջւում։ Ես դեռ չեմ զառանցում։ Պարզապէս կարողանում եմ տեսնել եմ այնքա՜ն տարբեր հնարաւորութիւններ, ուր ինչ֊որ բան կարող է սխալ ընթանալ։ Եւ հնարաւոր սխալները, որ ես յիշում եմ ու գիտեմ, գնալով շատանում են։<br><br>
Պարզ օրինակ․ առաջ այսպէս էր՝ «լաւ, գրենք նիշք»։ Իսկ հիմա ես անհանգստանում եմ իրաւունքների, արգելափակման, զուգահեռութեան, ատոմար գործողութիւնների, տարբեր նիշքային համակարգերի, պանակում բացած նիշքերի քանակի, ժամանակաւոր նիշքերի կանխատեսելի անունների, իմ PRNG֊ի պատահականութեան որակի, գործողութեան կէսին սնուցման սակաւութեան, հասկանալի API֊ի, նրա համար, ինչ ես անում եմ, յստակ ձեռնարկների, եւ այլն, եւ այլն։
աղբիւր
#programming #analysis #paralysis #experience #ծրագրաւորում ###
վիշապ օբերոն կոմպիլյատորի մակոսի պորտը նոր աւարտեցի։ ։Ճ
i’ve just finished macosx port of vishap oberon compiler
#oberon #voc #vishap #compiler #macosx #programming
http://sourceforge.net/apps/mediawiki/cpwiki/index.php?title=Main_Page
#gcc #c #programming #development #gprof #posix #serialization #endianness #boost #indentation
իմ ամենասիրած սքրինսեյւերի յեղինակին գտայ համացանցում
found the author of my favourite screensaver on the web: http://www.complexification.net/gallery/
#screensaver #programming #screenshot #xscreensaver #software #graphics #opengl #ծրագրաւորում #ծա #գրաֆիկա #էկրանահան
Wirth updated he’s Project Oberon sources in February 4, so I decided to track the changes by putting those sources to github. These are changes, mainly in Kernel.Mod https://github.com/norayr/ProjectOberon/commit/86576bbc7b0f8d5153d5b12e4093d1d6310ad72e
#oberon #wirth #kernel #programming #github #git #book #project-oberon #development #software
Lightweight parametric polymorphism for Oberon.
http://research.microsoft.com/en-us/um/people/cszypers/pub/jmlc97.pdf
#oberon #oberon-2 #polymorphism #programming #research #paper #oop #development #software
@{JayTea StillAliver ; jaytea@joindiaspora.com} hey hey, you were interested in translators, this is how translator.am works http://www.translator.am/en/abouttranslator.html
#translator #languages #programming #babel-fish #language
էս տղեն վերջն է, մի հատ էլ լաւ յղում իրենից՝
It’s not a revelation that writing complex patches is more difficult than writing witty one-liners on the Internet. It’s also not a revelation that people who can write complex patches probably shouldn’t be spending time writing witty one-liners on the Internet. (They already know better; they just do it anyway. By “they” I mean “I”.)
http://sealedabstract.com/rants/hey-programmers-we-need-to-talk/
ու հիշեցնում ինձ այս փոստը՝ http://norayr.arnet.am/weblog/2011/10/13/ասք-չերեւացող-մարդկանց-մասին/
#reward #internet #programming #շոյանք #համացանց #գործ
I mean, in iOS world, we don’t believe in garbage collectors, and we think the Android guys are nuts. I suspect that the Android guys think the iOS guys are nuts for manual memory management. But you know what the two, cutthroat opposition camps can agree about? The JavaScript folks are really nuts.
There is absolutely zero chance that you can write reasonable mobile code without worrying about what is going on in system memory, in some capacity. None.
http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/
#garbage-collection #garbage #programming #memory #speed #performance #mobile #research #ios #iphone #ipad #memory-management #memory
essentially on the iPhone 4S, you start getting warned around 40MB and you get killed around 213MB. On the iPad 3, you get warned around 400MB and you get killed around 550MB. Of course, these are just my numbers–if your users are listening to music or running things in the background, you may have considerably less memory than you do in my results, but this is a start. This seems like a lot (213mb should be enough for everyone, right?) but as a practical matter it isn’t. For example, the iPhone 4S snaps photos at 3264×2448 resolution. That’s over 30 megabytes of bitmap data per photo. That’s a warning for having just two photos in memory and you get killed for having 7 photos in RAM. Oh, you were going to write a for loop that iterated over an album? Killed.
http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/
#garbage-collection #garbage #programming #memory #speed #performance #mobile #research #ios #iphone #ipad #memory-management #memory
In particular, when garbage collection has five times as much memory as required, its runtime performance matches or slightly exceeds that of explicit memory management. However, garbage collection’s performance degrades substantially when it must use smaller heaps. With three times as much memory, it runs 17% slower on average, and with twice as much memory, it runs 70% slower.
http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/
#garbage-collection #garbage #programming #memory #speed #performance #mobile #research
building Fenris
#fenris #tracing #development #audit #debug #gdb #screenshot #screenshots #forensics #programming #ascii #ascii-art #assembler #gentoo #windowmaker #larry-the-cow #funtoo #wolf #mythology #art
Brian L. Stuart home contains some pages from the Principles of Operating Systems: Design & Applications, a book, which in particular explores design of Inferno operating system.
http://umdrive.memphis.edu/blstuart/htdocs/index.html
#operating-systems #plan9 #inferno #unix #programming #limbo #design
New edition of Wirth’s book Project Oberon is out. It describes not only built from scratch software(entire operating system and compiler), but design of the hardware as well.
The vast complexity of popular operating systems makes them not only obscure, but also provides opportunities for “back doors”. They allow external agents to introduce spies and devils unnoticed by the user, making the system attackable and corruptible. The only safe remedy is to build a safe system anew from scratch.
http://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.html
#oberon #wirth #niklaus-wirth #risc #programming #fpga #books #programming-languages #compilers #operating-systems #compiler #freedom #design #security #privacy #surveillance #reliability
In programming jargon, Yoda conditions (also called Yoda notation) is a programming style where the two parts of an expression are reversed in a conditional statement. The name for this programming style is derived from the Star Wars character named Yoda, who spoke English with non-standard word order.
https://en.wikipedia.org/wiki/Yoda_conditions
#yoda #conditions #notation #programming #star-wars #order #style
image from wikimedia
So the idea is to tie everything so hard into systemd that alternatives will just be impossible because of undocumented, unportable APIs that are leaky abstractions that make no sense without the thing they fail to abstract?
And why on earth does every daemon now need to be patched? They worked well for the last few decades without such specific hackery.
very good text by Gentoo developer Patrick Lauer about systemd.
http://gentooexperimental.org/~patrick/weblog/archives/2013-10.html#e2013-10-29T13_39_32.txt
#gnu #linux #programming #centralization #control #decentralization #gentoo #systemd #openrc #patrick-lauer #funtoo #dbus #logind #cgroups #kernel #unix #operating-systems #api #abstraction #freedom
in response to an assertion by mr john carmack who is wrong (:
http://www.youtube.com/watch?v=pI4IYRT-Msw
#oberon #render #3d #design #programming #graphics
If Only Borland Had Stuck With Turbo Modula-2 For CP/M
Like Turbo Pascal, Turbo Modula-2 was an Integrated Development Environment including a compiler and Wordstar based editor. On top of this TM-2 added a separate linker and library manager. The most obvious initial difference is the size of an installation: TM-2 takes up 142Kb, compared to TP’s tiny 34Kb. However for this you get a lot more facilities, a bigger library and an altogether more sophisticated system.
http://techtinkering.com/2013/03/12/if-only-borland-had-stuck-with-turbo-modula-2-for-cpm/
#modula-2 #borland #pascal #cpm #retro-computing #programming
The Ultimate Commodore 64 Talk @25C3
http://www.pagetable.com/?p=53
#c64 #commodore #commodore64 #talk #retro #retro-computing #programming #6502 #nmos6502 #8bit #assembler
https://groups.google.com/forum/#!topic/comp.lang.oberon/8Bmb20Ds8Cg
#programming #usenet #1993 #oberon #c #libc #ulms-oberon-compiler #programming-languages #hello-world #write #printf #setlocale
http://www.youtube.com/watch?v=Wn32zePbFpc
Statically Recompiling #NES #Games into Native Executables with #LLVM and #Go
#compiler #retro #6502 #nintendo #mario #zelda #fun #emulation #jamulator #rom #programming
https://github.com/norayr/voc/commit/a3214b81549d7c1d4654c62af52514261ed08ed0
different modules can be now compiled into one elf at once (no separate linking command needed). for example, if M0 imports M1 then
voc -l M1.Mod -s M0.Mod -M
where -l is a global option (show line numbers, I don’t use it, I need only position, and do :goto in vim to get it)
-s means generate symbol file, we need it to compile M0, and check types throughout module boundaries
-M means generate main module and link it statically to libVishapOberon.
#voc #vishap-oberon #oberon #oberon-2 #compiler #linking #programming
Over the past few days I have taken an interest in writing my own linker scripts, start code and a CRT0 (C Runtime) http://www.theresistornetwork.com/2013/09/arm-bare-metal-programming.html
#arm #programming #c #runtime #crt0 #linking
So #go is 16th, thus it took place in top 20 #github languages.
http://adambard.com/blog/top-github-languages-for-2013-so-far/
However last year it was at 13th place. Anyway, I think that’s a great achievement for #golang. #google-go #go-lang #programming #programming-languages #փաստորեն
“I Contribute to the Windows Kernel. We Are Slower Than Other Operating Systems. Here Is Why.” http://blog.zorinaq.com/?e=74
found somewhere in Diaspora* recently.
#windows #kernel #linux #gnu #community #commerce #capital #development #programming #os #operating-systems
Another #script I saw recently was a #perl #script which does two things: 0. checks if it exists
Just saw a #script. The author gets percentage value from the output of other program (df, disk free). Then he compares if it’s greater or equal of 100. #programming
#MagPi possibly will publish #article series about #Ada #programming. Get the first #lesson here #raspberrypi #raspberry-pi
spent several months programming in #Java. Contrary to its authors prediction, it did not grow on me. I did not find any new insights – for the first time in my life #programming in a new #language did not bring me new insights. It keeps all the stuff that I never use in C++ – inheritance, virtuals – OO gook – and removes the stuff that I find useful. It might be successful – after all, MS DOS was – and it might be a profitable thing for all your readers to learn Java, but it has no intellectual value whatsoever. Look at their implementation of hash tables. Look at the sorting routines that come with their “cool” sorting applet. Try to use #AWT. The best way to judge a language is to look at the #code written by its proponents. “Radix enim omnium malorum est cupiditas” – and Java is clearly an example of a #money oriented #programming (#MOP). As the chief proponent of Java at #SGI told me: “Alex, you have to go where the money is.” But I do not particularly want to go where the money is – it usually does not smell nice there.
#Stepanov #STL
http://www.stlport.org/resources/StepanovUSA.html http://norayr.arnet.am/weblog/2010/02/27/պատմություն-սրճի-հոտի-մասին/
On the X axis you see the number of threads that the program creates. On the Y axis you see the arithmetic mean of the run time over 10 runs. The green line is Haskell, the red line is C. Haskell is almost 10 times faster. Control.Concurrent kicked pthreads’ ass, leaving it no chances.
http://10098.arnet.am/?p=147 #haskell #threads #c #comparison #programming #pthread #benchmark #programming-languages
when I read about new cool project built with #raspberry-pi I think - okay - they didn’t do any low level #programming. They used #python, and they have all those #drivers ready to use. If it is considered a tool for #children - then what will they learn, they couldn’t learn by using a #GNU/Linux pc?
That’s why when I read about cheap #Linux boards I afraid that #8bit #microcontrollers won’t be used and thus less and less people would tinker with low level staff. And if they don’t deal with it, they don’t have deep understanding of how it works.
That’s why I appreciate #Arduino, and I hope it won’t be ousted from #market. Actually, that language and #compiler which comes with Arduino is too lame. I never programmed #AVR with that language, I used gcc, and thus Arduino + #gcc is a good #toy for a child. I agree. But I am not so sure about #raspberrypi
#Bjarne-Stroustrup, Designer of the #C++ #Programming Language, to Join #Embarcadero for #Live Conversation During #CodeRage 7 http://edn.embarcadero.com/article/42756
Я не знаю #ООП http://habrahabr.ru/post/147927/ #ծրագրավորում #programming #նախագծում #design #oop
This is what allows us to do #reverse-engineering http://en.wikipedia.org/wiki/Fair_use Also, #eula does not really matter, what matters is the #law of the state. So in practice proprietary software is better than #saas cause one can reverse engineer it, and create a free alternative, like in case with drivers, and practicly there are mostly technical ways to prevent it. #reverseengineering #copyright #law #programming #freedom
Jeder dritte #Deutsche verfügt über Kenntnisse in einer #Programmiersprache http://www.heise.de/newsticker/meldung/Bitkom-Jeder-dritte-Deutsche-verfuegt-ueber-Kenntnisse-in-einer-Programmiersprache-1716836.html?view=zoom;zoom=1 #programming-languages #programming #germany #ծրագրավորում #ծրագրավորման֊լեզուներ #լեզուներ #Գերմանիա #մարդիկ