You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
require 'parslet' include Parslet # Constructs a parser using a Parser Expression Grammar parser = str('"') >> ( str('\\').ignore >> any | str('"').absent? >> any ).repeat.as(:string) >> str('"') result = parser.parse %Q("this is a valid \\"string\\"") result # => {:string=>"this is a valid \"string\""@1} A small Ruby library for constructing parsers in the PEG (Parsing Expression Grammar) fashion
Frustrated by those other console editors? You already know what keys to press in your GUI applications to open, save, copy, cut, paste and undo. Why should your console text editor behave differently? Answer: it shouldn't. Welcome to Diakonos, the console text editor with a key mapping you practically already know. Easy to use and easy to configure, but potent in the hands of power users.
書いておかないとやっぱり忘れるので面倒でもいろいろメモを残すようにしよう。 topぽいUIの監視ツールが作りたかったのでncursesを使ってみたけどUTF-8文字列が文字化けして表示できなかったので解決策をメモ。 ncursesはそもそもマルチバイト文字の表示に対応していないので、その対応版であるncurseswを使う必要がある。 多くのディストリビューションではそもそもこれは別パッケージとして提供されているので注意。 基本的にはncurseswはncursesとソースコードレベル互換ぽいので、ncursesのrubyバインディングであるncurses-rubyを適当にいじってncursesw野バインディングとして利用することにする。 ncurses-rubyをncurseswとコンパイル 最新版を以下のサイトからダウンロード。 http://ncurses-ruby.berlios.d
Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
_ [Ruby] RubyConf 2010 キーノート(3) で、最後に「Diversity(多様性)」である。 初日のDave Thomasのキーノートでも3つの重要なこととして、 Diversifyをあげていた。多様性は重要なのである。 とはいえ、多様性はいいことばかりでもない。 Rubyにおける多様性といえば、昨今数々登場している別実装である。 CRuby (1.9, 1.8) JRuby Rubinius IronRuby MacRuby MagLev などなど、多くのRuby実装がある。これら以外にも「Rubyっぽい言語」まで含めると 本当にいくつあるのか見当もつかない。 昔はPythonの人たちに「Ruby(とPerl)は複雑すぎて、別実装は登場しそうにない。 Pythonを見てみろ、CPythonとJytonとIronPythonがある」などと言われたものだが、 今や別実装
chefをインストールして何かしようとするとエラーになる。 [ec2-user@ip-10-xxx-xxx-xxx ~]$ chef-solo -v /home/ec2-user/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- rubygems/format (LoadError)ぐぬぬ。。 調べてみるとGemが2.0でGem::FormatからGem::Packageに変わったから(よくわからん)らしくて、要はChefがまだGem2.xに対応してないってことなのかな?? https://github.com/carlhuda/bundler/commit/20e251acd9bbed0b95d02280
今日は早起きしたのでさくっと作った。 rb-skypemacがRuby1.8でしか動かなかったり、Ruby4Skypeがソースを修正しないと動かなかったり、どのskype gemもリポジトリが公開されてなくてパッチ送れなかったので1から作りなおした。 https://github.com/shokai/skype-ruby https://rubygems.org/gems/skype linuxだとruby-dbus、macだとrb-appscriptを使うんだけどOS毎に別のgemをdependencyに入れるのどうすればいいんだろう・・ gemspecの中でRUBY_PLATFORMを見てspec.add_dependencyしたらローカルでbundle installすると大丈夫だけど、rubygems.org経由でgem installするとlinuxなのにrb-appscrip
2015/11/12 Apache Drill Meetup Tokyo CyberAgent / AMoAd 渡部 優 ( Watanabe Masaru )
Lazy enumeration isn’t magic; it’s just a matter of hard work Ruby 2.0’s new lazy enumerator feature seems like magic. In case you haven’t tried it yet, it allows you to iterate over an infinite series of values and take just the values you want. It brings the functional programming concept of lazy evaluation to Ruby - at least for enumerations. For example, in Ruby 1.9 and earlier you would run i
Jun 2, 201340 likes11,130 viewsAI-enhanced description The document discusses the Fluentd logging system. It includes an explanation of how Fluentd buffers and queues log data before outputting it. The emit method is used to add log data to a chunk, and if the chunk limit is reached a new chunk is created and added to the queue. Once data is in the queue it can be output by the configured plugin.
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
In this tutorial, I’ll walk you through the concept behind using puma + NGINX, plus thorough instructions on setting them up on CentOS and Ubuntu. Concept Many people who come from the old Apache HTTPd day often ask me how reverse proxy + web server work? “It’s different paradigm” Reverse proxy software (such as Varnish or NGINX) would acts as a load balancer that routes all external requests to a
Speed & Concurrency Current Release: 6.6.0 Unlike other Ruby Webservers, Puma was built for speed and parallelism. Puma is a small library that provides a very fast and concurrent HTTP 1.1 server for Ruby web applications. It is designed for running Rack apps only. What makes Puma so fast is the careful use of a Ragel extension to provide fast, accurate HTTP 1.1 protocol parsing. This makes the se
Fixing the Gemfile not found (Bundler::GemfileNotFound) error I was working on an app (bundler, unicorn, Rails3) that had a strange deploy issue. Five deploys (using capistrano) after our unicorn processes had started unicorn would fail to restart, this is the capistrano output: * executing `deploy:restart' * executing `unicorn:restart' * executing "cd /u/apps/dash/current && unicornctl restart" s
AI & MLLearn about artificial intelligence and machine learning across the GitHub ecosystem and the wider industry. Generative AILearn how to build with generative AI. GitHub CopilotChange how you work with GitHub Copilot. LLMsEverything developers need to know about LLMs. Machine learningMachine learning tips, tricks, and best practices. How AI code generation worksExplore the capabilities and be
11/01/20 10:43 Railsの中身がよく分かってないのでどこで対処すべきかうま く判断できない。でも Ruby だからなんとかなるだろうと読 んで踏み出したし、実際なんとかなった。オープンクラス最 高。 11/01/20 10:44 Ruby + githubの組み合わせがとてもよい。モンキーパッチで 対処できるし、最悪本家へのフィードバックが届かなくても github的な意味でforkしてしまえばよい。 11/01/20 10:48 加えてbundlerがステキ。bundlerでforkしたrepository見に いくようにすればアプリ側は何も気にする必要がない。 11/01/20 10:49 PHP + svnのライブラリでパッチ投げて無視された(内容云々 じゃなくてもうメンテ継続してない)ことが何回かあるけど、 この場合面倒くさい。モンキーパッチも作りにくいし、fork
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く