Git Product home page Git Product logo

approvers / radwimps Goto Github PK

View Code? Open in Web Editor NEW
271.0 15.0 46.0 340 KB

君の then-then-then 世は Promise で Future

License: MIT License

Dart 3.77% Go 4.68% PHP 4.55% Python 12.94% Ruby 2.13% Rust 3.52% Scala 2.98% C# 9.10% JavaScript 5.73% TeX 2.13% Haskell 3.78% Swift 3.37% C 9.12% TypeScript 4.27% Java 5.44% Kotlin 2.54% C++ 8.37% D 3.90% Groovy 4.44% F# 3.24%
code-collection radwimps promise future method-chaining

radwimps's Introduction

RADWIMPS

日本語 English

ルール

  • then().then().then().世()のようなメソッドチェーンで "前前前世" と末尾に改行付きで出力すればOKです。
  • PromiseFuture等の言語機能があればぜひ活用してください。

なお、このレポジトリは、実在するバンド「RADWIMPS」とは何ら関係ありません。

radwimps's People

Contributors

0918nobita avatar allcontributors[bot] avatar eggplants avatar ekusiadadus avatar kahenteikou avatar kawaemon avatar kisaragieffective avatar ko50 avatar laminne avatar loxygenk avatar matteusan avatar mikuroxina avatar mirror-kt avatar nanai10a avatar nanigasi-san avatar narze avatar naturalclar avatar noobest19s avatar raiga0310 avatar sanposhiho avatar shirakia avatar shniubobo avatar shun-shobon avatar siketyan avatar soshiharami avatar sya-ri avatar trackiss avatar uniokaworld avatar yuseiito avatar zonuexe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

radwimps's Issues

日本語を出力できない言語のレギュレーションを決めたい

日本語を出力することができない言語が少なからず存在するだろうし、
英語圏の人からすれば前前前世っていうのはそもそも何、っていう感じになるので
日本語出力ができない場合はZen zen zen seでも可、みたいにしてはどうでしょうか

テスト

必要ですか?

$ echo RADWIMPS | ./test
1c1
< 前前前世
---
> RADWIMPS
NG.
$ echo -n 前前前世 | ./test
1c1
< 前前前世
---
> 前前前世
\ No newline at end of file
NG.
$ echo 前前前世 | ./test
OK.
#!/bin/bash

######
#test#
######

function main() {
  local tmp1 tmp2
  tmp1="$(mktemp)"
  tmp2="$(mktemp)"
  echo 前前前世 > "${tmp1}"
  cat - > "${tmp2}"
  diff "${tmp1}" "${tmp2}"
  [[ $? = 0 ]] && {
    echo OK.
    return 0
  } || {
    echo NG.
    return 1
  }
}
cat - | main
exit $?

[Python] Deal with a breaking change

The changes produced in PR #110 break existing behavior and public APIs. Attributes with no leading underscores are considered public API.

Related: #134 @shniubobo

Difference

Formerly ( ef67d36 ):

$ ipython
Python 3.8.2 (default, May 22 2020, 21:44:03)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.14.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import RADWIMPS

In [2]: RADWIMPS.RADWIMPS.then().then().then().世()
前前前世
Out[2]: RADWIMPS.RADWIMPS

In [3]:
Do you really want to exit ([y]/n)? y
$

And now ( 7cbc601 ):

$ ipython
Python 3.8.2 (default, May 22 2020, 21:44:03)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.14.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import RADWIMPS

In [2]: RADWIMPS.RADWIMPS.then().then().then().世()
Out[2]: 前前前<coroutine object RADWIMPS.世 at 0x106eb48c0>

In [3]:
Do you really want to exit ([y]/n)? y
/Users/takumi/.pyenv/versions/3.8.2/lib/python3.8/site-packages/IPython/core/interactiveshell.py:1445: RuntimeWarning: coroutine 'RADWIMPS.世' was never awaited
  self.user_ns_hidden.clear()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
  • No print() on invocation of RADWIMPS.then()
  • Returns a coroutine instead of RADWIMPS.RADWIMPS
  • Python scolds us on exit

This kind of change will confuse the users of the RADWIMPS module as it is not intended to return async stuff. While it is a joke repository, breaking changes should be carefully considered and avoided.

Improvement

Async APIs are worth having. Forking RADWIMPS.py should solve this issue and rolls back to the code it ought to be. While async modules are named like asyncfoobar.py in general, it's better to name it RADWIMPS_async.py here.

$ cp RADWIMPS.py RADWIMPS_async.py  # queer capitalizing tho ;)
$ git revert 7cbc601
$ git add RADWIMPS_async.py
$ git commit -m "blahblah"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.