दैसेंजीगाकेदारानयोसा

15 min

language: ja bn en es hi pt ru zh-cn zh-tw

नमस्ते, मैं अक्षम हूँ।
हाल ही में, मुझे लगा कि अगर मैं Go का उपयोग कर रहा हूँ, तो C सीखना बेहतर होगा? और इसके विपरीत, मैं पिछली असफलताओं से सीखना शुरू कर रहा हूँ कि Go और Rust में मेमोरी प्रबंधन के बारे में बहुत अधिक सोचने की आवश्यकता नहीं है। अचानक, मैं SCP के समानांतर प्रसंस्करण संस्करण mscp के स्रोत कोड को देख रहा था और मुझे आश्चर्य हुआ कि यह वापसी मान के रूप में -1 क्यों लौटा रहा है।

$ grep -r 'return \-1' ./* | sort | uniq
grep: warning: stray \ before -
./libssh/doc/guided_tour.dox:                return -1;
./libssh/doc/guided_tour.dox:            return -1;
./libssh/doc/guided_tour.dox:        return -1;
./libssh/examples/keygen.c:     return -1;
./libssh/examples/knownhosts.c:                return -1;
./libssh/examples/knownhosts.c:            return -1;
./libssh/examples/knownhosts.c:        return -1;
./libssh/examples/libssh_scp.c:                    return -1;
./libssh/examples/libssh_scp.c:                return -1;
./libssh/examples/libssh_scp.c:            return -1;
./libssh/examples/libssh_scp.c:        return -1;
./libssh/examples/libssh_scp.c:    return -1;
./libssh/examples/samplesftp.c:            return -1;
./libssh/examples/samplesftp.c:        return -1;
./libssh/examples/scp_download.c:                         return -1;
./libssh/examples/scp_download.c:                 return -1;
./libssh/examples/scp_download.c:         return -1;
./libssh/examples/scp_download.c:        return -1;
./libssh/examples/ssh_X11_client.c:                     return -1;
./libssh/examples/ssh_X11_client.c:             return -1;
./libssh/examples/ssh_X11_client.c:     return -1;
./libssh/examples/ssh_client.c:            return -1;
./libssh/examples/ssh_client.c:        return -1;
./libssh/examples/ssh_server.c:        return -1;
./libssh/examples/sshd_direct-tcpip.c:        return -1;
./libssh/examples/sshnetcat.c:          return -1;
./libssh/examples/sshnetcat.c:      return -1;
./libssh/examples/sshnetcat.c:    return -1;
./libssh/src/agent.c:      return -1;
./libssh/src/agent.c:    return -1;
./libssh/src/agent.c:  return -1;
./libssh/src/auth.c:            return -1;
./libssh/src/auth.c:        return -1;
./libssh/src/base64.c:                             if(!ptr) return -1; \

मुझे लगता है कि मैंने कभी भी निष्पादन परिणाम के वापसी मान के रूप में दो अंकों की संख्या नहीं देखी है,
मुझे याहू चीबिकुरो (Yahoo Chiebukuro) पर 2008 के आसपास के एक उत्तर में -1 का उपयोग करने का कारण मिला, लेकिन यह बहुत विश्वसनीय उत्तर नहीं था, और मुझे केवल हिताची द्वारा जारी uCosminexus Interschema नामक एप्लिकेशन सर्वर और मिडलवेयर उत्पाद के बारे में जानकारी मिली।
C भाषा में निकास फ़ंक्शन की परिभाषा

3 -1 रूपांतरण विफल उपयोगकर्ता एम्बेडेड फ़ंक्शन को पास की गई स्ट्रिंग का वर्ण कोड उपयोगकर्ता एम्बेडेड फ़ंक्शन को पास की गई स्ट्रिंग में एक टर्मिनेटिंग NULL जोड़ा गया है।

और, जब मैंने अंत में return -1 दिया और वापसी मान की जाँच की, तो यह 255 हो गया।

alleycat:[haturatu]:~/git/cmem$ ./a
格納した文字列 : Hi, My sweet hearts
alleycat:[haturatu]:~/git/cmem$ echo $?
255

Go के मामले में

यह Go में os.Exit(-1) देने पर भी समान था, लेकिन ऐसे पैटर्न थे जहाँ यह 254 हो जाता था, और मुझे आश्चर्य हुआ कि ऐसा क्यों था। क्या यह एक अपवाद त्रुटि के रूप में माना जा रहा है ताकि अन्य कार्यों में कोई समस्या न हो, वापसी मान के रूप में 0, 1, 2 और बाकी सभी के लिए -1 लौटाकर और -1 के साथ गतिशील रूप से त्रुटि कोड लौटाकर?
इस तरह की जानकारी अपेक्षाकृत कम है, और यदि Go भाषा में अग्रणी विकास वाली तकनीक की बात करें, तो मुझे लगता है कि यह Go-Ethereum है, लेकिन इसे ध्यान से देखने पर भी...

:~/git/go-ethereum$ grep -r "return \-1"
grep: warning: stray \ before -
crypto/secp256k1/libsecp256k1/src/java/org/bitcoin/Secp256k1Context.java:     if(!enabled) return -1; //sanity check
crypto/secp256k1/libsecp256k1/src/num_gmp_impl.h:        return -1;
crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h:            return -1;
crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h:        return -1;
crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h:        return -1;
crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h:        return -1;
crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h:        return -1;
crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h:        return -1;
crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h:        return -1;
crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h:            return -1;
crypto/secp256k1/libsecp256k1/src/field_5x52_impl.h:            return -1;
crypto/secp256k1/libsecp256k1/src/gen_context.c:        return -1;
crypto/signify/signify_fuzz.go:         return -1
trie/iterator.go:               return -1
trie/iterator.go:               return -1
event/event.go: return -1
event/feed.go:  return -1
common/prque/lazyqueue.go:      return -1
triedb/pathdb/database_test.go: return -1
cmd/devp2p/nodesetcmd.go:                               return -1, errors.New("-limit requires an argument")
cmd/devp2p/nodesetcmd.go:                               return -1, fmt.Errorf("invalid -limit %q", args[i+1])
cmd/devp2p/nodeset.go:                  return -1
cmd/devp2p/dns_route53.go:                      return -1
accounts/abi/bind/bind.go:                              return -1
core/state/snapshot/iterator_fast.go:           return -1
core/state/snapshot/iterator_fast.go:           return -1
p2p/protocol.go:                        return -1
p2p/enode/node.go:                      return -1

करीब से देखने पर, अधिकांश को लाइब्रेरी के भीतर से बुलाया जाता है, और विशाल कोडबेस में केवल उपरोक्त ही हैं। मुझे लगता है कि यह सार्वजनिक कुंजी क्रिप्टोग्राफी कार्यान्वयन स्रोत से कहीं से लाया गया स्रोत है, इसलिए यह वास्तव में Go-Ethereum कोड नहीं लगता है।

एक और चीज जो लंबे समय से विकसित हो रही है वह है Hugo।

:~/git/hugo$ grep -r "return \-1"
grep: warning: stray \ before -
compare/compare_strings.go:             return -1
htesting/test_helpers.go:                       return -1
htesting/test_helpers.go:       return -1
hugolib/filesystems/basefs_test.go:             return -1, nil, err
common/hreflect/helpers.go:             return -1
common/herrors/error_locator_test.go:           return -1
common/herrors/error_locator_test.go:           return -1
common/herrors/error_locator_test.go:           return -1
common/herrors/error_locator_test.go:           return -1
common/herrors/error_locator.go:        return -1
common/herrors/error_locator.go:        return -1
common/herrors/error_locator.go:                return -1
common/herrors/file_error.go:                   return -1
common/herrors/file_error.go:           return -1, ""
common/herrors/file_error.go:   return -1, -1
common/hugo/version.go:                 return -1
common/hugo/version.go:                 return -1
common/hugo/version.go:                 return -1
common/hugo/version.go:                 return -1
common/hugo/version.go:                 return -1
common/hugo/version.go:         return -1
common/hugo/version.go: return -1
common/paths/pathparser.go:             return -1
identity/finder.go:     return -1
resources/page/permalinks.go:                                   return -1
resources/page/pages_sort.go:           return -1, -1
resources/page/pages_sort.go:           return -1, -1
resources/page/pages_sort.go:           return -1, -1
resources/page/pages_sort.go:           return -1, -1
resources/page/pages_sort_search.go:    return -1
resources/page/pages_sort_search.go:            return -1
resources/page/pagination.go:           return -1, errors.New("too many arguments, 'pager size' is currently the only option")
resources/page/pagination.go:           return -1, errors.New(("'pager size' must be a positive integer"))
resources/images/image.go:              return -1
tpl/collections/where.go:       return -1, errors.New("unable to convert value to float")
tpl/collections/where.go:       return -1, errors.New("unable to convert value to int")
tpl/transform/transform.go:             return -1
tpl/internal/go_templates/htmltemplate/transition.go:   return -1
tpl/internal/go_templates/htmltemplate/transition.go:                   return -1, errorf(ErrBadHTML, nil, 0, "%q in attribute name: %.32q", s[j:j+1], s)
tpl/internal/go_templates/fmtsort/sort.go:              return -1 // No good answer possible, but don't return 0: they're not equal.
tpl/internal/go_templates/fmtsort/sort.go:                      return -1
tpl/internal/go_templates/fmtsort/sort.go:              return -1, true
tpl/tplimpl/template.go:                                return -1
tpl/tplimpl/template.go:                        return -1
tpl/tplimpl/shortcodes.go:      return -1
parser/pageparser/pagelexer.go:         return -1
parser/pageparser/pagelexer.go:         return -1
parser/pageparser/pagelexer.go:                                 return -1
parser/pageparser/pagelexer.go:         return -1
parser/pageparser/pagelexer.go:         return -1
parser/pageparser/pagelexer.go: return -1

C में लिखे गए Bash के मामले को देखते हुए

और, चूंकि bash 0, 1, आदि के अलावा अन्य वापसी मान लौटाता है, तो bash के स्रोत को देखने पर...

alleycat:[haturatu]:~/git/bash$ echo $?
130
alleycat:[haturatu]:~/git/bash$ a
bash: a: कमांड नहीं मिला
alleycat:[haturatu]:~/git/bash$ echo $?
127

इस मामले में, return 130 जैसा कुछ होने की संभावना है, लेकिन...

alleycat:[haturatu]:~/git/bash$ grep -r "return [0-9]" | awk '{print $2" " $3}' | sort | uniq | grep ^r
grep: .git/objects/pack/pack-715759b749131276aa4809bba44f79c13feb23ec.pack: binary file matches
return 0
return 0,
return 0.
return 0.0;
return 0;
return 0L;
return 1
return 1,
return 1-no_line_editing;
return 1.
return 10;
return 11;
return 12;
return 13;
return 14;
return 16
return 1;
return 2
return 2;
return 2;;
return 3
return 3;
return 4
return 42
return 4;
return 5
return 5;
return 6;
return 7
return 7;
return 8;
return 99999;
return 9;
alleycat:[haturatu]:~/git/bash$ grep -r "return -[0-9]" | awk '{print $2" " $3}' | sort | uniq | grep ^r
return -1
return -1.
return -1/EINVAL
return -1;
return -25
return -2;

नहीं मिला। कड़ाई से कहें तो, grep -r "return " | grep -oP "return.*" | sort | uniq | grep "[0-9]" अधिक निकाल सकता था, लेकिन यह बहुत लंबा था, इसलिए कृपया उपरोक्त को स्वीकार करें।
तो, यह अभी भी ऐसा लगता है कि त्रुटि कोड गतिशील रूप से उत्पन्न हो रहे हैं।

मैं ऐसी तुच्छ बातों की जाँच इसलिए कर रहा हूँ क्योंकि डिबगिंग एक नरक बनने वाली है, इसलिए मैं पहले से शोध करना चाहता था, और ऐसा लगता है कि Go एक आसान भाषा होने के बावजूद C भाषा से बचा नहीं जा सकता।

दैसेंजीगाकेदारानयोसा

काटो काज़ुहिको का एल्बम लंबे समय बाद सुनते हुए, मुझे दैसेंजीगाकेदारानयोसा नामक गीत का शीर्षक दिलचस्प लगा, और जब मैंने इसकी जाँच की, तो यह कारमेन माकी का कवर निकला।
और मूल स्रोत तेरयामा शुजी का लगता है।
'अगर विदाई ही जीवन है' और 'दैसेंजीगाकेदारानयोसा' कविता: तेरयामा शुजी गीत: कारमेन माकी 1969

अगर विदाई ही जीवन है, तो आने वाली वसंत क्या है?
दूर-दूर धरती के छोर पर खिलने वाली जंगली लिली क्या है?
अगर विदाई ही जीवन है, तो मिलने का दिन क्या है?
कोमल-कोमल सूर्यास्त और दो लोगों का प्यार क्या है?
अगर विदाई ही जीवन है, तो हमने जो घर बनाया वह क्या है?
वीरान-वीरान मैदान में जलने वाली रोशनी क्या है?
अगर विदाई ही जीवन है, तो मुझे ऐसा जीवन नहीं चाहिए।
तेरयामा शुजी 'अगर विदाई ही जीवन है'

जब उदासी आती है, तो मैं कहता हूँ, अकेलेपन का जादू।
बिछड़े हुए व्यक्ति की यादों को भूलने का जादू।
दैसेंजीगाकेदारानयोसा दैसेंजीगाकेदारानयोसा
जब इसे उल्टा पढ़ा जाता है, तो यह वह गीत बन जाता है जो उस व्यक्ति ने मुझे सिखाया था।
विदाई ही जीवन है।
विदाई ही जीवन है।
तेरयामा शुजी 'दैसेंजीगाकेदारानयोसा'

यह छोटी सी भावना और भी अधिक उदासी पैदा करती है।
शायद काटो काज़ुहिको के मूल द फोक क्रूसेडर्स इस जापानी साहित्य के कारण ही थे।

Related Posts