Money, regardless of the currencyit is in, seems like a floating-point number. Butit's a mistake to use floats for currency. Float numbers (hence, float objects) are, by definition, inexact real numbers that make use of the double-precision floating-point representation characteristic of the native architecture. Inexact numbers make accountants unhappy. In this article, you’ll beguided through

A while ago, the people from Fullstaq and I started the FullstaqRuby project: aRuby distribution that's optimized for server use cases. Compared to normal MRIRuby, FullstaqRuby uses 50% less memory, is faster, and is easier to install andsecurity-patch because of RPM and DEB packages. What's new? FullstaqRuby is in beta. The initial release (epic 1) only came with the bare minimum. I am happ

Convenient — installRuby without compiling Keep secure — auto-update with APT and YUM Combat memorybloat — save 30-50% memory Speed up — with a better memory allocator Open source, based on MRI From the author of Passenger,Ruby Enterprise Edition Server Edition Now in beta Perfect for traditional infrastructure. Install with DEBs and RPMs. Get Started or learn more Container Edition Coming soon

…and how to fix them 🙂 I have had several opportunities to find and fix varioussecurity issues withinRuby onRails applications over time. Based on my own experience I would like to help you with makingRails apps more secure. At the same time, I hope that you won’t find any of the below issues in any of your apps. If you want to have a better understanding of built-inRuby onRailssecurity me

There’s a new application server on theblock forRubyists -NGINX Unit. As you could probably guess by the name,it’s a project ofNGINX Inc., the for-profit open-source company that owns theNGINX web server. In fall of 2017, they announced theNGINX Unit project.It’s essentially an application server designed to replace all of the various application servers used withNGINX. InRuby’s case, th

先日のRubyKaigi 2017のLTではLLVMベースのCRuby向けJITコンパイラLLRBの話をしました。 5分はちょっとJITの話をするには短かかったですね。 LLRBをふまえた、Cのコード生成への軌道修正 さて、上記の資料にある通り、CRubyのJITにおいてはメインの高速化対象が既に存在するCのコードになるため、 開発の早い段階でパフォーマンスにインパクトを持てるとすればLLVM Passの順番を変えるくらいで、 LLVM IRを直接生成しても最適化上のメリットがほとんどないのでその部分はMJIT と同じくCのコードを生成するように変更したい、という話をした*1。 で、LLRBはC拡張として作るべくちょっと不思議な努力をいろいろやっており、 それらの設計はやってみた結果(コアに直接変更を加えるのに比べ)デメリットの方が大きいと思ったので、 LLRBの失敗を全て生かしつつ、今回
TL;DR-RuboCop良いよ - 入れるだけだと誰も使わないよ - 運用フローに入れると良いよ - 千里の道も一歩からだよRuboCopとはRuboCopはコーディング規約に従っているかをチェックし、コードの品質を保ってくれるgemです。 これ以外にもRuboCopは多様なルールをサポートしており、その中にはバグりやすいコードを回避するようなルールもあります。RuboCopを使う事でコーディング規約に沿っていないコードや、バグを含んだコードを自動である程度抑制でき、レビュー等でそれらの指摘する手間を大きく削減できます。 導入方法gem installrubocop するか、Gemfileに書いてインストールしてください。rubocopコマンドが使えるようになるので、rubocop xxx.rbで解析を実行できます。また、rubocop -a xxx.rbで一部のルールでは自動

Shopifyが出しているBootsnapというgemがあります。説明に書いてある通り、巨大なRuby /Railsのアプリを高速化する為のgemらしいです。 何をやってくれるかというと、Ruby, Active Support、YAMLのメソッドの呼び出しの最適化、及び、キャッシュをしてくれる、というものらしいです。 なお、1.0.0の時点でサポートしているプラットフォームはMacOSとLinuxだけです。Windowsは未対応。 また、Rubyは2.3.0以上のみサポートしています。 require 'bootsnap' Bootsnap.setup( cache_dir: 'tmp/cache', # Path to your cache development_mode: ENV['MY_ENV'] == 'development', load_path_cache: true,
We’ve already learned about the history of Unicode and howit works under the hood. In this final part, we’ll learn the theory and practice of handling Unicode properly. Before we get into practice I’d like to talk a bit about Unicode support inRuby language. If you’re not aRuby developer, feel free to scroll past the first chapter. Unicode +Ruby = 😢This header suggests, thatRuby and Unicode

Ruby にて環境変数の値を使う場合には ENV.fetch を使うと良いのではないか、という小ネタ。 そうすることで環境変数が存在しないエラーを早期に検知できる上、エラーの根本原因が例外に反映されるので分かりやすくなる。 この2行だけでほぼ言い尽くしてしまっているが、以下詳細説明: ENV を使う背景 環境変数を読む理由は色々ありうるが、特にHeroku やDocker などの近代的な PaaS 環境・コンテナ環境において環境変数を読むことが多い。 例えばRuby onRails アプリでDB に接続する場合、接続先のDB のホストやユーザー情報をdatabase.yml に決め打ちするのではなく、Heroku デプロイ時やDocker コンテナ起動時に指定したいということが多いためである。 また、Ruby onRails ではdatabase.yml などの各種設定
We’re taking Hanami to the next level, and we need your help. Become a patron today One-Point-OOOh! 😱 Hanami is a full-stack, lightweight, yet powerful web framework forRuby. Back in the summer of 2012, as a frustrated web developer, I started an experiment to rethinkRuby onRails and tobuild a modern web framework forRuby. Thegoal was to keep all what I consider thegood parts ofRails and

RubyKaigiに行くと本にサインを求められるすごいエンジニアが書いたhaconiwaというmruby製のコンテナエンジン(コンテナ環境構築の基盤ツール)があるのですが、少し試してみようと思って、とりあえず1サーバ上に1万コンテナぐらい動かそうとしてみました。久々に今回は自分の作ったOSSではなく、OSSの検証レポート的な記事になります。 haconiwaは僕の好きなOSSの一つで、それはなぜかと言うと、 haconiwaでコンテナを作る際に、haconiwa実行環境にはコンテナの要素機能が全て入っている必要はない 必要なコンテナの要素機能を簡単に組み合わせて、自分が実現したいコンテナ、あるいは、それに準ずる環境を作れる haconiwaによるコンテナ定義をRubyのDSLで表現でき、動的な設定や組み合わせの設定を簡単にかける ということができるからです。その特性から、CentOS6のよ
■Ruby 2.4.0 で導入予定の Integer Unification まとめRuby 2.4.0 で導入が予定されている Integer Unification が与えるであろうRuby アプリケーションへの影響をまとめておく。 率直には rb_cFixnum や rb_cBignum が 2.4 からは見えなくなるので、それらを参照しているような native gem が対応していなければビルドできないためアプリケーションが動かなくなる。じゃあ、対応したバージョンに全てバージョンアップすればいいじゃん、という話なのだけどbundler が解決してくれる dependency 沼と絡み合って、単純には解決できずに 8 月現在は厳しい状態になっている。 json はRuby がbundle している�バージョンですでに Integer Unification 対応がなされ

Websecurity can be very confusing and frustrating at times. A lot of companies don’t pay enough attention toit until something bad happens and users’ data and safety are compromised.Ruby developers have a wealth of tools for efficient prototyping, testing, and continuous integration that are well known and widely accepted in the community. But what aboutsecurity? An averageRuby developer woul
【AWS reInvent 2025 関西組 事前勉強会】re:Inventの“感動と興奮”を思い出してモチベ爆上げしたいです

リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く