Sabtu, 31 Oktober 2015

Diriku Sudah Lama tidak menulis puisi

Sudah lama diriku tidak menulis puisi . . .
 

Sebab puisi bukan caraku berlari dari suatu masalah. . .

ataupun dari jalanan yang sepi . . .

 
Serta mimpi-mimpi tingkat tinggi . . .


Sudah lama diriku tidak menulis puisi . . .

Sebab puisi tak dapat diciptakan . . .

 
Melainkan dilahirkan . . .

 
Oleh malam, sepi, dan perasaan menyendiri . . .

 

Rabu, 28 Oktober 2015

Inikah Yang Dinamakan Rindu?

Berawal dari sebuah telepon disore hari ... Sebuah suara yang lembut kembali menyapa telinga ini . Sudah lama sekali tak mendengar suaranya . Lalu terlontar beberapa kalimat sederhana bahkan mungkin basa-basi saja .
" Halo, kamu lagi dimana ? oh gapapa cuma mau nelepon aja, yaudah aku lagi dijalan nanti aku telepon lagi ya ? "

Lalu telepon diputus . Ya, orang itu, seorang gadis yang setiap malam datang kepikiranku, mengisi mimpi-mimpiku yang sebenarnya aku sendiri tidak pernah bermimpi lagi . Setiap aku bermimpi dimalam ketika tertidur . Selalu ada sosok dia .

Dan sejujurnya aku memang merindukannya . Dan dia hadir walau hanya sebentar .

Aku rindu..
suara lembutnya yang menyapa ku tiap pagi membangunkan aku untuk berangkat kuliah .
merindukan saat-saat aku menjemputnya dulu sewaktu masih sekolah
merindukan rute-rute yang aku lewati bersama
merindukan teriakannya yang mengingatkanku untuk memakai jaket ketika aku pulang

Dan banyak hal yang aku rindukan . Tentu saja aku juga merindukan orangnya . Seorang gadis berinisial " S "

Sampai saat ini dia belum kunjung menelepon kembali seperti apa yang diucapkannya sore tadi . Setelah sebuah pesan singkat tadi sore dia tak lagi muncul .

Mungkin salahku, yang terlalu berharap pada sebuah kesenangan yang fana ........
Inikah Yang Dinamakan Rindu?

Selasa, 27 Oktober 2015

Galau? Ngelakuin Apaan aja sih

Galau itu lagi ngetren ya sekarang ini, sampe banyak yang bilang "Gak Galau Gak Gaul" , lalu kenapa mereka galau ? biasanya terbagi oleh beberapa faktor dan ini yang paling sering :

1.Putus Sama Pacar
2.Jomblo Akut Yang Menahun    <--- ini bukan gua sumpah
3.Dikecewakan Pasangan
4.Ga bisa move on                <--- ini bukan gua juga sumpah deh beneran
5.Bingung mau pake beha dengan motif dan warna apa hari ini

Nah berhubung title "Gak Galau Gak Gaul" udah melekat erat bagaikan campuran power glue, lem uhu, isarplas dan beras ketan, maka ga jarang mereka bangga kalo mereka galau soalnya itu berarti mereka GAUL .
Gaul dijaman sekarang itu aneh, disebut gaul kalo nongkrong diminimarket, giginya di pagerin, jadi tukang foto keliling, pake henpon gede item yang bisa buat nimpuk maling dan menyebabkan pergeseran syaraf otak si maling tersebut .

Ga ngerti  ? Gua juga ga tau barusan gua ngetik apaan !

Menurut KBBI , Kamus Besar Bahasa Indonesia ya bukan Komunitas BlekBeri Indonesia, Galau itu adalah : ga·lau a, ber·ga·lau a sibuk beramai-ramai; ramai sekali; kacau tidak keruan (pikiran); ke·ga·lau·an n sifat (keadaan hal) galau .



Kebanyakan galaunya anak muda itu masalah cinta tapi ada juga sih dari faktor laennya , misal :
Gua suka sama cewe -> cewenya suka sama temen gua -> temen gua suka sama pembantu sebelah -> pembantu sebelah suka sama tiang listrik depan gang -> tiang listrik depan gang udah janda anak 9 -> Galau massal deh


Ciri-ciri orang galau menurut guaitu :
- Suka update / ngetwit kalimat putus asa seperti
 "Tanpa kau disisiku, hanya tiga roda bakar dan autan sachet temanku"
atau
" Tiada guna ku disini, berdiam dalam sepi hanya ditemani baygon cair "

- Update status cengeng tiap 2,5 menit sekali
- Upload foto ekstrim seperti foto lu lagi nyilet tangan, lagi koprol di sutet, lagi ngetos wipol, ngemut kamper dan sebagainya .


Jaman sekarang udahlah gausah galau-galauan segala, gua ga pernah merasa diri gua galau tapi entah temen-temen gua pada suka banget bilang gua galau gua galau . Gua lebih suka dibilang bingung daripada galau, karena gua emang BINGUNG bukan GALAU . Lagian gua juga biasa-biasa aja ga sedepresif itu, dulu iya gua sempet kaya gitu tapi sekarang gua udah sadar, gua mikir kalo dulu gua itu Konyol banget .

"Ngapain gua dulu mewek di line ?"
"Ngapain gua dulu ngomel2 gajelas gara2 patah hati?"
"Ngapain gua bela2in bikin shower pake sireman taneman cuman buat galau?"

Orang yang bisa tenang dan bisa cengengesan disaat masalah dia itu berat itu lah yang disebut dengan GAUL . Jadi keep kalem aja lah , klo emang ga sanggup bisa berdoa menurut agamanya masing2, karena yang MAHA KUASA lah yang tau apa yang terbaik buat kita .

Ngomong apa gua barusan ? kesambet apaan ? Yah pokoknya NO GALAU ! YES MAKAN GRATIS ! 

Selasa, 15 September 2015

Sebuah Butiran Debu

Aku tak pernah merasa kalah dalam penantian ini.
Aku hanya merasa lelah yang teramat sangat.
Setelah mengurungkan hatiku dalam cinta yang tak berjawab.
Aku seperti tertusuk duri yang tak pernah kusadari seberapa dalam meninggalkan luka perih. - See more at: http://little-lazy-me.tumblr.com/#sthash.aHDU5Nw6.dpuf
Aku tak pernah merasa kalah dalam penantian ini.
Aku hanya merasa lelah yang teramat sangat.
Setelah mengurungkan hatiku dalam cinta yang tak berjawab.
Aku seperti tertusuk duri yang tak pernah kusadari seberapa dalam meninggalkan luka perih. - See more at: http://little-lazy-me.tumblr.com/#sthash.aHDU5Nw6.dpuf
Aku Tak Pernah merasa Kalah dalam Penantian ini. aku hanya merasa letih karena terus lari dari masalah
Hampir setahun yang lalu, aku sedang memulai cerita. Sekarang, baru sampai konflik.
Ternyata ,
Aku tak sepenting pikiran ku dimata mu.
Kau anggap aku hanya sebagai butiran debu.
Yang dalam sekali hembus, terbang bersama angin masa lalu.

Aku hampir kehabisan bahan untuk melanjutkannya. Aku bingung. Apa biarkan saja mengambang? Ah, tidak. Semua kisah memiliki penutup.
Dan semoga, cerita ini punya epilog yang baik

Aku tak pernah merasa kalah dalam penantian ini.
Aku hanya merasa lelah yang teramat sangat.
Setelah mengurungkan hatiku dalam cinta yang tak berjawab.
Aku seperti tertusuk duri yang tak pernah kusadari seberapa dalam meninggalkan luka perih. - See more at: http://little-lazy-me.tumblr.com/#sthash.aHDU5Nw6.dpuf
Jakarta , penuh debu,

Rabu, 26 November 2014

Tugas Konsep Bahasa Pemrograman Pak Tri Djoko Wahjono "Asignment Chapter VII"


REVIEW QUESTION

11. What is an overloaded operator?


Answer : Use of an operator for more than one purpose is called operator overloading.


12. Define narrowing and widening conversions.


Answer : A narrowing conversion is one that converts an object to a type that cannot include all of the values of the original type e.g., float to int

A widening conversion is one in which an object is converted to a type that can include at least approximations to all of the values of the original type. e.g., int to float.


13. In JavaScript, what is the difference between == and ===?


Answer : It is the same but === prevent its operands from being coerced.


14. What is a mixed-mode expression?


Answer : A mixed-mode expression is one that has operands of different types.


15. What is referential transparency?


Answer : A program has the property of referential transparency if any two expressions in the program that have the same value can be substituted for one another anywhere in the program, without affecting the action of the program.


PROBLEM SET


11. Write a BNF description of the precedence and associativity rules
defined for the expressions in Problem 9. Assume the only operands are
the names a,b,c,d, and e.


Answer : Precedence: Highest *, /, not

+, -, &, mod

- (unary)

=, /=, <, <=, >=, >

and

Lowest or, xor

Associativity: Left to right

<expression> → <expression> or <or_exp>

| < expression > xor <or_exp>

| <or_exp>

<or_exp> → <or_exp> and <and_exp>

| <and_exp>

< and_exp > → <and_exp> = <expr>

| <and_exp /= <expr>

| <and_exp> < <expr>

| <and_exp> <= <expr>

| <and_exp> >= <expr>

| <and_exp> > <expr>

| <expr>

<expr> → – <unary_expr>

| <unary_expr>

<unary_expr> → <unary_expr> + <term>

| <unary_expr> – <term>

| <unary_expr> & <term>

| <unary_expr> mod < term>

| <term>

< term > → < term > * < factor >

| < term > / < factor >

| not < factor >

| < factor >

< factor > → ( < expr > )

| <operand>

<operand> → a | b | c | d | e


12. Using the grammar of Problem 11, draw parse trees for the expressions
of Problem 9.


Answer :


13. Let the function fun be defined as
int fun(int *k) {
*k += 4;
return 3 * (*k) - 1;
}
Suppose fun is used in a program as follows:
void main() {
int i = 10, j = 10, sum1, sum2;
sum1 = (i / 2) + fun(&i);
sum2 = fun(&j) + (j / 2);
}
What are the values of sum1 and sum2
a. if the operands in the expressions are evaluated left to right?
b. if the operands in the expressions are evaluated right to left?


Answer :

a. sum1 = (10/2) + (3 * 10 - 1) = 5 + 29 = 34

sum2 = (3 * 14 - 1) + (14/2) = 41 + 7 = 49


b. sum1 = (14/2) + (3 * 14 - 1) = 7 + 41 = 49
sum2 = (3 * 10 - 1) + (10/2) = 29 + 5 = 34



14. What is your primary argument against (or for) the operator precedence
rules of APL?


Answer : The operator precedence rules of the common imperative languages are nearly all the same, because they are based on those of mathematics.


15. Explain why it is difficult to eliminate functional side effects in C.


Answer : One reason functional side effects would be difficult to remove from C is that all of C’s subprograms are functions, providing the ability of returning only a single data value (though it could be an array). The problem is that in many cases it is necessary (or at least convenient) to return more than one data value, which is done through the use of pointer actual parameters, which are a means of creating functional side effects



Tugas Konsep Bahasa Pemrograman Pak Tri Djoko Wahjono "Asignment Chapter VI"


REVIEW QUESTION

11. How does JavaScript support sparse arrays?

Answer : Javascript objects are sparse, and arrays are just specialized objects with an auto-maintained length property (which is actually one larger than the largest index, not the number of defined elements) and some additional methods.


12. What languages support negative subscripts?

Answer : Ruby and Lua support negative subscripts.


13. What languages support array slices with stepsizes?


Answer : Ruby, Python, Perl.

14. What array initialization feature is available in Ada that is not available in
other common imperative languages?


Answer : Ada provides two mechanisms for initializing arrays in the declarations statements: by listing them in the order in which they are to be stored, or by directly assigning them to an index position using the => operator, which in Ada is called an arrow.


15. What is an aggregate constant?


Answer : A parenthesized lists of values.



PROBLEM SET



11. In the Burroughs Extended ALGOL language, matrices are stored as a
single-dimensioned array of pointers to the rows of the matrix, which are
treated as single-dimensioned arrays of values. What are the advantages
and disadvantages of such a scheme?


Answer : The advantage of this scheme is that accesses that are done in order of the rows can be made very fast; once the pointer to a row is gotten, all of the elements of the row can be fetched very quickly. If, however, the elements of a matrix must be accessed in column order, these accesses will be much slower; every access requires the fetch of a row pointer and an address computation from there. Note that this access technique was devised to allow multidimensional array rows to be segments in a virtual storage management technique. Using this method, multidimensional arrays could be stored and manipulated that are much larger than the physical memory of the computer.


12. Analyze and write a comparison of C’s malloc and free functions with
C++’s new and delete operators. Use safety as the primary consideration
in the comparison.


Answer : New and delete are type safe (no need for casts), malloc and free are not. Also malloc returns a void* which then has to be cast to the appropriate pointer type. new returns the correct pointer type itself; type safety. malloc requires you to tell the number of bytes to allocate, new figures it out itself.

13. Analyze and write a comparison of using C++ pointers and Java reference
variables to refer to fixed heap-dynamic variables. Use safety and convenience
as the primary considerations in the comparison.

Answer : Java fixed the problem by disallowing to mess around with pointers completely. This will make writing code much more clear and remove the security problem of the pointers.

14. Write a short discussion of what was lost and what was gained in Java’s
designers’ decision to not include the pointers of C++.

Answer : There's a copious amount of documentation out there on this subject so there's no reason to write at length. I should also point out that pointers are a feature of both C and C++.

It's obvious that preventing the use of pointers significantly bolstered the amount of security that programmers could get 'for free' given that issues like stack overruns, memory corruption and inadequate/incorrect freeing of memory (though this is more an attribute of GC than lack of pointers) were largely nullified.

Given that programmers tend to be kind of ornery and resistant to change, preventing a means for direct memory access and easy manipulation of the data within rubbed a lot of programmers the wrong way. Many pointed out that the use of pointers was one of the ways that C/C++ were able to be such a high-level language while still maintaining considerable speed. While assembly language and machine code were still de rigeur amongst people that were looking to squeeze the most amount of speed and memory out of a given program, things like pointers and compilers that effectively optimized C and C++ code did a lot to win people over, not to mention that it's a hell of a lot easier to read.

With Java, however, a lot of those same programmers felt that the security that was gained was offset by the decreases in speed and the fact that a lot of the earlier JIT compilers were pretty pokey didn't help that. For all their faults, Sun's been pretty adamant about listening to the community so they've made a lot of improvements regarding in-place optimization, HotSpot, conditional compilation, etc.

Another problem that came about is the fact that removing pointers made existing C and C++ code hard to port. That's generally pretty true of any new or significantly changed language, however. Eventually people got a handle on how to best replicate pointer usage, tips and tricks got passed around and things improved

15. What are the arguments for and against Java’s implicit heap storage
recovery, when compared with the explicit heap storage recovery
required in C++? Consider real-time systems.


Answer : Single-size Allocation Heap: In a single-size allocation heap, all available cells are linked together using the pointers in the cells, forming a list of available space. Allocation is a simple matter of taking the required number of cells from this list when they are needed. Deallocation is a much more complex process. A heap-dynamic variable can be pointed to by more than one pointer, making it difficult to determine when the variable is no longer useful to the program. Simply because one pointer is disconnected from a cell obviously does not make it garbage; there could be several other pointers still pointing to the cell.

Variable-size Allocation Heap: The initial setting of the indicators of all cells in the heap to indicate that they are garbage is difficult. Because the cells are different sizes, scanning them is a problem. One solution is to require each cell to have the cell size as its first field. Then the scanning can be done, although it takes slightly more space and somewhat more time than its counterpart for fixed-size cells. The marking process is nontrivial. How can a chain be followed from a pointer if there is no predefined location for the pointer in the pointed-to cell? Cells that do not contain pointers at all are also a problem. Adding an internal pointer to each cell, which is maintained in the background by the run-time system, will work. However, this background maintenance processing adds both space and execution time overhead to the cost of running the program. Maintaining the list of available space is another source of overhead. The list can begin with a single cell consisting of all available space. Requests for segments simply reduce the size of this block. Reclaimed cells are added to the list. The problem is that before long, the list becomes a long list of various-size segments, or blocks. This slows allocation because requests cause the list to be searched for sufficiently large blocks. Eventually, the list may consist of a large number of very small blocks, which are not large enough for most requests. At this point, adjacent blocks may need to be collapsed into larger blocks. Alternatives to using the first sufficiently large block on the list can shorten the search but require the list to be ordered by block size. In either case, maintaining the list is additional overhead.

Kamis, 30 Oktober 2014

Assignment Chapter 5


Programming Language Chapter 5
ASSIGNMENT 5
30 Oct 2014
REVIEW QUESTION

11. Q: What are the advantages and disadvantages of dynamic type binding ?
A:
-Advantages = It is more easy to write generic code.
-Disadvantages = High Cost to check type and interpretation

12. Q: Define static, stack-dynamic, explicit heap-dynamic, and implicit heapdynamic variables. What are their advantages and disadvantages ?
A:
- Static -- memory alloc'd before execution. Stays throughout. Adv: runtime efficient, history-sensitive subprograms. Disadv: no recursion.
- Stack dynamic - memory alloc'd from system stack when decl elaborated. Adv: recursion, conserves memory. Disadv: no history sensitive subpgms, less run-time efficient than static.
- Explicit heap-dynamic -- memory alloc'd/freed by pgmer from "heap". Adv: flexible storage mgmt. Disadv: less effiicent than stack-dyn; Error prone in pairing new/delete stmts.
- Implicit heap-dynamic -- heap memory alloc'd/freed by assignments. Adv: highext flexibility. Disadv: run-time cost to maintain all the dynamic attrs; Reduced compiler error detection.

13. Q: Define lifetime, scope, static scope, and dynamic scope.
A:
-Lifetime -- when memory is alloc'd for a variable (when in existence).
-Scope -- portions of pgm variable can be referenced or set.
-Static scope -- scope based on source pgm text (static ancestors).
-Dynamic scope -- scope based on run-time call sequence.

14. Q: How is a reference to a nonlocal variable in a static-scoped program connected
to its definition ?
A:
A reference to a non-locally variable in a static-scoped language with nested subprograms requires a two step access process:

1. Find the correct activation record instance
2. Determine the correct offset within that activation record instance

15. Q: What is the general problem with static scoping ?
A:
Usually too much access. Scope structure destroyed as pgm evolves.

Problem Set

1. Q: Which of the following identifier forms is most readable? Support your decision.
SumOfSales
sum_of_sales
SUMOFSALES

A: Sum_of_sales is the most readable. It is because it’s doesn’t have any problem with case sensitive, because the following identifier does not use any caps lock.

2. Q: Some programming languages are typeless. What are the obvious advantages
and disadvantages of having no types in a language?
A:
a. Advantages:
- The only advantage is that is allows coders to write sloppy programs quickly.

b. Disadvantages:
- You are not in control of the data and variables, the compiler or interpreter is.
- If you mis-assign variables, there is no way for the compiler to catch any of your mistakes. It just “does what you said”, even if it is wrong.
- Supporting programs in a type-less language is much more difficult that in a strongly types one. It is often very difficult to determine what the original programmer wanted to do.

3. Q: Write a simple assignment statement with one arithmetic operator in some
language you know. For each component of the statement, list the various
bindings that are required to determine the semantics when the statement is
executed. For each binding, indicate the binding time used for the language.
A:
(C++)
int count;count = count + 5;
Possible types for count: set at language design time. Type of count: bound at compile time.
Set of possible values of count: bound at compiler design time. Value of count: bound at execution time with this statement. Set of possible meanings for the operator symbol ““:*bound at language definition time.*Meaning of the operator symbol “” in this statement: bound at compile time.
Internal representation of the literal “5”: bound at compiler design time.

4. Q: Dynamic type binding is closely related to implicit heap-dynamic variables.
Explain this relationship.
A: Implicit heap-dynamic variables acquire types only when assigned value, which must be at runtime. Therefore, this variable are always dynamically bound to types.

5. Q: Describe a situation when a history-sensitive variable in a subprogram is
useful.
A: To describe a situation when a history-sensitive variable in a subprogram is useful, suppose that a FORTRAN subroutine is used to implement a data structure as an abstraction. In this situation, it is essential that the structure persists between different calls to the managing subroutine.


Entri Populer