I was watching the video on 'Type Python ,Press enter. What happens'. I thought of checking whether 'strace' can get the fork() system call that he explained in the video.
Unfortunately I couldn't get ....
But i came to know about the write and read system calls when we type the arithmetic operatons on python ... strace log pasted below.
Still I dont know where the calculation is happening.... is there any tool to list which part is calculating it ? where is the fork() ??
brk(0x19ed000) = 0x19ed000
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, ">>> ", 4) = 4
read(0, "1+2\n", 1024) = 4
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 6), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0206e7b000
write(1, "3\n", 2) = 2
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, ">>> ", 4) = 4
read(0, "1+4\n", 1024) = 4
write(1, "5\n", 2) = 2
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, ">>> ", 4) = 4
read(0,
Tuesday, May 31, 2016
Hackers school
This is something programming students can try to collaborate with self motivated programmers.
https://www.recurse.com/blog/77-hacker-school-is-now-the-recurse-center
https://www.recurse.com/blog/77-hacker-school-is-now-the-recurse-center
Monday, May 30, 2016
How to start with RUST LANG in linux machine
I am started hearing about RUST programming language http://doc.rust-lang.org/book/README.html, so thought of give a try 'helloworld' program.
The impressive thing is,the language focus on safety,speed and concurrency.
Rust is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without having a garbage collector, making it a useful language for a number of use cases other languages aren’t good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems
There is very good documentation - http://doc.rust-lang.org
Below is the installation steps, helloworld program . I gave a 'Strace' on the program to see any difference.I couldn't understand any difference :-).. i dont know how to find the difference in speed or concurrency.. need to read more ...
Rust is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without having a garbage collector, making it a useful language for a number of use cases other languages aren’t good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems
There is very good documentation - http://doc.rust-lang.org
Below is the installation steps, helloworld program . I gave a 'Strace' on the program to see any difference.I couldn't understand any difference :-).. i dont know how to find the difference in speed or concurrency.. need to read more ...
Sunday, May 29, 2016
Unconventional way of studying things..
Sometimes I think that I studied lot of things in engineering text books, but don't have any clue on how the concepts/formula derived or how much analysis they put behind on those concepts.That research or hacking experience generally missing in text books. Sorry ..I am not saying school/college text books are bad. We ( as students) always needs to read text books .. but what I am trying to convey is... sometimes textbooks are missing practical possibilities of formulas or concepts.
There comes the importance of unconventional way of studying things.. or the hackers(in good sense) way of mastering the interested areas. Our schools and colleges should give these kind of opportunities for students.
Okay.....
These things came to my mind when I was watching the below video...
She (http://jvns.ca ) explains the tool 'strace'
I tried 'strace' against our normal linux command 'ls'. This actually listed me amazing tracing log ...
This is just an example .All concepts that we are studying/hearing should have unconventional way of mastering it or we should at least try to develop it !!!
None of the computer text books might have taught you on, what actually happens behind the 'ls' command. But the unconventional way is, find out some tool which can list the activities behind 'ls' and mastering what is it doing.... obviously it is very difficult, but it gives you the full concepts behind the 'ls' upto very low/machine level.
Unconventional way of studying things opens opportunities which are not described in most of the text books That gives you the confidence to question the actual concepts or current implementation.
But it will have some initial difficulties and extra research out of your text books or tutorials. But I am sure that there will be always some supporting tools/methods which somebody might have implemented already or you can implement such a method if it's not there!! :-)
Below is the screenshot of 'strace' on 'ls' in command line
some research on each system calls behind means ..
There comes the importance of unconventional way of studying things.. or the hackers(in good sense) way of mastering the interested areas. Our schools and colleges should give these kind of opportunities for students.
Okay.....
These things came to my mind when I was watching the below video...
She (http://jvns.ca ) explains the tool 'strace'
I tried 'strace' against our normal linux command 'ls'. This actually listed me amazing tracing log ...
This is just an example .All concepts that we are studying/hearing should have unconventional way of mastering it or we should at least try to develop it !!!
None of the computer text books might have taught you on, what actually happens behind the 'ls' command. But the unconventional way is, find out some tool which can list the activities behind 'ls' and mastering what is it doing.... obviously it is very difficult, but it gives you the full concepts behind the 'ls' upto very low/machine level.
Unconventional way of studying things opens opportunities which are not described in most of the text books That gives you the confidence to question the actual concepts or current implementation.
But it will have some initial difficulties and extra research out of your text books or tutorials. But I am sure that there will be always some supporting tools/methods which somebody might have implemented already or you can implement such a method if it's not there!! :-)
Below is the screenshot of 'strace' on 'ls' in command line
some research on each system calls behind means ..
LXR Cross Referencer to read linux kernel source code
LXR Cross Referencer
This is the best place to refer one who like to know about linux kernel. http://lxr.free-electrons.com/ LXR Cross Referencer, usually known as LXR, is a general-purpose source code indexer and cross-referencer that provides web-based browsing of source code, with links to the definition and usage of any identifier.I also found the following site is very helpful to start with linux kernels http://kernelnewbies.org/FirstKernelPatch
Saturday, May 28, 2016
Installed wireshark for Networking package analysis
WIRESHARK
Wireshark is a network protocol analyzer. This is actually nice tool which gives opportunity to analyze and understand different network layers. Each packet traffic is diplayed when we start browsing a website.Its very easy to install in Ubuntu using 'Ubuntu Software center'. After installing I used the command and changed to root. I am not sure any alternative way for getting my 'wlan0' wifi internet without changing to root.
sudo dpkg-reconfigure wireshark-common
started wireshark with 'sudo wireshark'
Wireshark is a network protocol analyzer. This is actually nice tool which gives opportunity to analyze and understand different network layers. Each packet traffic is diplayed when we start browsing a website.Its very easy to install in Ubuntu using 'Ubuntu Software center'. After installing I used the command and changed to root. I am not sure any alternative way for getting my 'wlan0' wifi internet without changing to root.
sudo dpkg-reconfigure wireshark-common
started wireshark with 'sudo wireshark'
Thursday, May 26, 2016
Planning to learn networking modules in Linux Kernel
I am just writing this blog to make sure that I will refresh my system programming knowledge. Every time when I start motiviated with some concepts , it used to end in a week :-). Now I am going to try Networking modules in Linux kernel. As you all know , linux is like a ocean and any time we can go do some research and learn .. that what I like in GNU/Linux.
I got some tutorials from Youtube to start with the networking modules in Linux kernel.. don't know the opportunities that I am going to get in this. sharing some of the videos below .
I got some tutorials from Youtube to start with the networking modules in Linux kernel.. don't know the opportunities that I am going to get in this. sharing some of the videos below .
Thursday, May 19, 2016
Django with Angular js
This is very nice document http://django-angular.readthedocs.io/en/latest/angular-model-form.html ,one django learner should practice to get confidence on his/er django web development skills. I am sure the document gives you good learning experience in web development .
What is Django ?
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source https://www.djangoproject.com/
What is Angularjs?
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly.
https://docs.angularjs.org/guide/introduction
http://www.w3schools.com/angular/
What is Django ?
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source https://www.djangoproject.com/
What is Angularjs?
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly.
https://docs.angularjs.org/guide/introduction
http://www.w3schools.com/angular/
Tuesday, May 17, 2016
GeoDjango opens new opportunities for free and low cost geo application
Since google map matrix has pricing plans, web developers are started thinking of an alternative. I guess, you can use https://www.openstreetmap.org/#map=15/10.2708/76.3780 as an alternative since lot of companies and institutions are contributing for it.
Its quite interesting and innovative idea that Django ( python webdevelopment framework) is coming up with module for geographic web application GeoDjango. GeoDjango is an included contrib module for Django that turns it into a world-class geographic Web framework. GeoDjango strives to make it as simple as possible to create geographic Web applications, like location-based services. Its features include:
Django model fields for OGC geometries and raster data.
Extensions to Django’s ORM for querying and manipulating spatial data.
Loosely-coupled, high-level Python interfaces for GIS geometry and raster operations and data manipulation in different formats.
Editing geometry fields from the admin.
Its quite interesting and innovative idea that Django ( python webdevelopment framework) is coming up with module for geographic web application GeoDjango. GeoDjango is an included contrib module for Django that turns it into a world-class geographic Web framework. GeoDjango strives to make it as simple as possible to create geographic Web applications, like location-based services. Its features include:
Django model fields for OGC geometries and raster data.
Extensions to Django’s ORM for querying and manipulating spatial data.
Loosely-coupled, high-level Python interfaces for GIS geometry and raster operations and data manipulation in different formats.
Editing geometry fields from the admin.