16 ms·
How is Ruby different in Japan?
- manmal 9y agoSo, embedded (IoT) and a bit of machine learning is what Japanese developers do with Ruby? The article is a bit thin on the "what they actually do with Ruby aside from Rails" side..
- holydude 9y agoYeah the article is not telling us much. IoT and ML that is it but who, how and where ?
- holydude 9y agoI am wondering why Rubymotion is not more popular in Japan. Is it because it is relatively very expensive or is not enough ruby ro gain momentum?
- sotojuan 9y agoWhat's the Japanese use of (Japanese-developed) apps vs mobile sites?
- hrktb 9y agoThere was already a long history of app development when the smartphones came around, especially in Java, and iOS (or really any Apple product) japanese support was excelent from the start. IMO on the mobile side, there was already a strong native culture that made it a harder sell to go the cross platform route.
- emptybits 9y agoIt's a good question because I understand Japan to be the region in the world where iOS dominates smartphones the most (over 50%?). I know RubyMotion has Android support and it continues to get better but I think it's fair to say RubyMotion is strongest for iOS/macOS work. The company is under new ownership/management since very recently ... perhaps Amir or someone will look at regional situations and gain more mindshare for the platform.
- phamilton 9y agoI think "not Rails" should be expanded a bit, because it risks someone saying "ok, so... sinatra?" Web applications have some very distinct profiles. Most requests: 1. Parse HTTP 2. Parse the request body (likely JSON), build ruby objects from the data. 3. Load data from a datastore, builds ruby objects from the data. 4. Do some manipulation of data. 5. Serialize Ruby objects into a response. Basically, because of the stateless nature of a web request, most of the work done (ignoring IO) is serializing and deserializing data. By not having Ruby be responsible for the state of our application, we make Ruby responsible for fetching and sending the state. Now think about a stateful system (like we would have with embedded Ruby). The state is kept within Ruby for the most part. We don't have to hit a data store to restore state every time we want to do something. This significantly changes the operating profile of the application, and therefore the optimization strategy changes.
- spo81rty 9y agoThis article mentioned Rails is on the decline in popularity. Anyone have any thoughts on the truth of that?
- ZenoArrow 9y agoI don't know about its popularity, but from what I've seen it doesn't seem to be on the hype train anymore. No technology stays on the hype train forever. Of course this is just based on observing trends, it shouldn't dampen your enthusiasm if you've found something that works for you.
- nitrogen 9y agoRails still solves all the problems it solved last year or two years ago. I'm always astonished when teams give into the hype train and replace the two things Rails excels at, templating and database access, with a 10MB frontend JS blob and microservices running in a JVM language. Just use Rails, it scales just fine. Your hand-coded DB layer for your microservice will never be as good as ActiveRecord if you aren't Facebook.
- baddox 9y agoWhy do you say that Rails excels at templating? Ignoring for the moment the obvious differences between server-rendered HTML and JS frontends, the Rails templating doesn't strike me as one of the most prominent solutions Rails provides. The templating is fine, but other than a few niceties (like layout hierarchies and resource-based forms) it's not much more than a thin syntax to embed Ruby eval inside HTML. If I had to pick the top things that Rails excels at, I'd point to ActiveModel and resourceful routing. I know REST isn't the hotness any more, but it sure is great for CRUD web sites or APIs, and Rails makes setting up database models, associations, and REST routes a breeze.
- pmontra 9y agoI also don't think Rails templating is anything special but it's well designed. One strong point is that it's full Ruby, so there is no need to learn another language. This means that one could write the application in the views (just like vanilla PHP) but in my experience nobody does it. Another nice feature is that every instance variable of the controller is available in the view. No need to waste time to declare them and get an extra chance to add some bug (I'm looking at you, Django.) I still remember how good it felt coming from Java Struts in 2005.
- pmontra 9y agoThe Ruby story in Europe is very similar to the American one: Rails, Rails and Rails. However the last thing I wrote in Ruby is a scraper for a web site, a few hours after patching a Rails app I've been maintaining for a customer for at least five years. About more non Rails stuff, I started writing small text processing scripts in Ruby a few years ago. I wrote them in Perl before, but I eventually got more at ease with Ruby, notwithstanding the compact convenience of Perl's while (<>) loop and the implicit input variable. I also made a mruby program run on AWS Lambda just because I could. Interesting but probably not extremely useful in that context (pun intended). I wonder if there will be a second Ruby wave from Japan, if their community keeps growing and their use cases start reaching abroad. Remember that the first wave (Rails) was actually from the USA.
- holydude 9y agoHopefully! The problem with ruby is it's just fine as in good enough but not better or more compelling than X or Y. I hope Crystal changes this or there will be some breakthrough in the mri.
- ZenoArrow 9y agoI expect a second wave is most likely to come if TruffleRuby takes off (perhaps when it has full support for Rails). https://pragtob.wordpress.com/2017/01/24/benchmarking-a-go-ai-in-ruby-cruby-vs-rubinius-vs-jruby-vs-truffle-a-year-later/ https://pragtob.wordpress.com/2017/01/24/benchmarking-a-go-a...
- 9y ago
- nextos 9y agoA decade ago I got introduced to Ruby by writing a static analyzer which used abstract interpretation [1] more or less following the hardcore lattice book [2] as taught by the Nielsons themselves. I used Ruby because my groupmates found Lisp, ML or Haskell too difficult, and Ruby has(had) a very nice Set datatype plus pretty good metaprogramming and DSL abilities. The code was on Github for some time and it was always funny to see recruiters reaching me, looking for people with > X years Rails experience, as they always equated Ruby to Rails. [1] https://en.wikipedia.org/wiki/Abstract_interpretation https://en.wikipedia.org/wiki/Abstract_interpretation [2] http://www.imm.dtu.dk/~hrni/PPA/ppasup2004.html http://www.imm.dtu.dk/~hrni/PPA/ppasup2004.html
- btilly 9y agoIt is worth noting that the original reason for Ruby is that 20 years ago there was no scripting language which could handle Japanese text. Hence a Lisp hacker decided to write a scripting language which could do so using the Smalltalk object model with a library carefully designed to would work a lot like Perl. The result was Ruby.
- euske 9y agoBlatantly false. Perl4 could handle Japanese text perfectly okay in early 90s. Neither Perl or Ruby supported character encoding initially and you had to rely on NKF/KConv etc.
- wodenokoto 9y agoBeing able to handle Japanese and being able to handle character encodings are two very different things. Python 2.7 (byte) strings handle Japanese characters just fine for a lot of cases. I don't think you nor parent have made a clear point for either case
- chongli 9y agoPython 2.7 (byte) strings handle Japanese characters just fine for a lot of cases. Python 2.7 was released in 2010, 15 years after the release of Ruby. At the time of Ruby's release, you were looking at Python 1.0.
- masklinn 9y agoAnd Python 1.0 handled text (in general) in the exact same way Ruby did: by ignoring it altogether and just manipulating bags of bytes.
- fenomas 9y ago> no scripting language which could handle Japanese text. Matz doesn't say this anywhere I can find. He usually says he wanted a more object-oriented scripting language and wasn't satisfied with Perl or Python.
- verisimilidude 9y agoI picked up Ruby in Japan before the era of Rails, back in 2004. There was a lot of enthusiasm around the language in Japan even at that time; it seemed like people were using it for everything. Personally, I knew a bunch of people who were using it for all their command-line tooling. These days, I bet most Western Ruby devs couldn't even tell you what gets does, but back then it was like magic.
- franciscop 9y agoFrom another comment, it seems like it was invented to specifically support Japanese characters. It might have been the only scripting language for a while in Japan so it makes sense that it became popular over there.
- nandemo 9y ago> It might have been the only scripting language for a while in Japan No way. Perl used to be quite popular.
- franciscop 9y ago*with support for Japanese characters
- nandemo 9y agoWhat do you mean? Perl did have support for the (several) standard Japanese encodings.
- ninjabeans 9y agoI have been using it for all my scripting needs almost since it first came out.
- qiqitori 9y agoI currently live in Matsue. When I tell people I am a programmer, even decidedly non-computer people will ask "Ruby?" They have Ruby-branded instant ramen in souvenir shops (with the proceeds going to the/some Ruby association). And they have that billboard as seen in the article.
- Asooka 9y agoBasically this reads as "Ruby was Python with better Japanese documentation and much better string encoding handling for Japanese use-cases". IIRC they came out at about the same time with about the same goals (correct me please), but I wouldn't wish to make programs that have to handle Japanese text in Python 1.
- k__ 9y agoPython 1991 Ruby 1995 But I don't know if Python was good with Japanese text in 4 years after inception.
- jacquesm 9y agoPython only supports native Unicode strings from Python3.
- detaro 9y agoThe default string type is a unicode string since Python3, a special string type for unicode had been part of the language since somewhere in the early 2.x releases (which happened 5+ years before 3.0, in the early 2000s). Not being the default, it of course wasn't generally supported in libraries and still a lot later than Ruby.
- masklinn 9y ago> Not being the default, it of course wasn't generally supported in libraries and still a lot later than Ruby. Ruby has never had text strings at all. It added an encoding property to bytestrings in 2007.
- int_19h 9y agoUnicode strings were added to Python in 2.0 (released in 2000). What changed in Python 3 is that they became the only string type, with what used to be non-Unicode strings effectively becoming immutable byte arrays. However, Japanese often don't want Unicode, because of Han unification, and the associated controversy. Thus, other encodings are often preferred, and languages that can handle them in a transparent way have the advantage. It's largely for this reason that Ruby avoided a Unicode string type for a long time, treating strings mostly as raw byte arrays, with a few places that needed encoding supporting them on an ad-hoc basis. In Ruby 1.9 (2007), they finally added encoding-aware strings; but unlike Python 3, where the encoding is always Unicode, in Ruby the encoding can be anything, and string is bytes + encoding. So you can do UTF-8, but you can also do e.g. Shift_JIS (which many Japanese users prefer). The cost is that it means that e.g. a+b is no longer always valid for two arbitrary strings, if they are in different encodings that cannot be reconciled.
- Lordarminius 9y agoSo thankfully, it would appear that Ruby is kept alive by the Japanese. I have never really understood the craze for Python . I am by no means a guru, but I consider Ruby a far superior language; ( yes, I recognize that the numerous scientific and ML libraries of python make it a logical choice for many projects, but this is sort of like a self fulfilling prophesy) My love for Ruby declared, I have on occasion wished that we had a "strict" feature in the language similar to ES5 that would permit only the use of Ruby's more straightforward features and also exclude deprecated methods and techniques. This might give the language a deserved boost. Does anyone know what the most utilized language in Japan is ? And what framework they use there for web projects, if not Rails ?
- yzmtf2008 9y ago> I consider Ruby a far superior language Have you looked at the C source of Ruby? :) In terms of that, Python is far, far superior to ruby. EDIT: to clarify, CPython is much cleaner than MRI, and has a much-better-documented API for extensions. This is what I believe part of the reason that Python has a much better coverage for scientific packages.
- rurban 9y agoDisagree. I deal with the C parts of Perl, Ruby and Python and better VM's on a daily basis. Ruby has by far the cleanest implementation of the VM. Almost like the VM of a good Lisp/functional lang. Python and Perl are the worst of all, on par with PHP. Ruby is unfortunately also the slowest. But not because of the VM implementation, only because of the everything is a method architecture, even for the simplest primitives. The ruby API is pure and clean, this is what makes it slow. For the python or perl API too much inner state needs to be handled, which makes it slow also. Because you cannot use a better design for data and code. Only php made significant advantages there recently, so you don't have to worry about inefficient data and code, only about the eye blead VM.
- yzmtf2008 9y agoI don't know if I can agree that the Ruby C API implementation is the cleanest -- from my experience I'll say it's very pure, but pure does not really mean clean, and it sometimes (esp. when performance is a concern) makes writing C extensions messy. Python's C API could be argued that it uses too much abstraction, but it definitely makes it that much easier to write extensions.
- uiri 9y agoI'm Canadian. Ruby was my first programming language. I don't know Rails. Now that I know Python, a lot of my first programming projects are the kinds of things that I would use Python for nowadays. American audiences often ask, "why would you want an embedded Ruby?" You might as well ask "why would you want an embedded Python?"... the answer to that is fairly obvious to anyone who knows Python and C, and who has done embedded programming. So why is it less obvious to those same programmers why someone would want an embedded ruby?
- chillacy 9y agoLast week there was a big thread talking about how Arduino was extraneous overhead and we should be using the AVR libraries directly. I think they would have died upon hearing about running a garbage collector on a microcontroller.
- vidarh 9y agoThe lines are rapidly blurring, given that you can fit, and power, an ARM core sufficiently powerful to run Linux (actually, you can run Linux on far smaller systems than that) with a WIFI interface and web server and run Perl on it on an SD card form-factor device... 4 years ago [1]. Of course there are plenty of niches where you still need a much lower power device, but a lot of areas where you needed that a few years back are areas where you can put a much bigger stack now and still do ok. [1] http://maisonbisson.com/post/17379/transcend-wifi-sd-card-hacking-links/ http://maisonbisson.com/post/17379/transcend-wifi-sd-card-ha...
- uiri 9y agoArduino and AVR are 8-bit microcontrollers. ARM chips are 32- or 64-bit CPUs. There are plenty of ARM SoCs out the which can run Linux off of an SD card: raspberry pi and beagle bone black come to mind. There are plenty of use cases where an AVR chip is underkill (e.g. anything that needs parallel processing) and an ARM chip is overkill (e.g. digital thermometer).
- 9y ago
- doktrin 9y agoThis is mostly orthogonal, but I'm yet another dev who loves using Ruby, but absolutely hates Rails. Ruby is a joy to use, whereas Rails is soul sucking, anti fun and overrated. I haven't been paid to write a line of Ruby in over 4 years but I still use it for the occasional hobby project. Not only do I not use Rails for fun, I'd have to be close to starvation before I used it again for profit. Now I feel the urge to dust off my copy of 'Eloquent Ruby' and write some fun code.
- owebmaster 9y agoBack in 2008 Rails was the real fun. And their proposed way of doing web software was mainstream until angularjs exploded.
- bauerd 9y agoAngular is a frontend framework, Rails is a backend framework. Care to elaborate?
- vectorpush 9y agoRails was designed at a time before angular brought the SPA into fashion. SPAs manage state and template rendering on the front-end, so much of the Rails machinery becomes unnecessary. You can still use Rails to implement your JSON API backend, but the simplicity of something like Sinatra is often preferable since you're increasing the complexity on the front. The node+react+webpack combo gave web devs the power to process application states and render the UI on the front-end and the back-end using the same code; a feat that is not possible at all with Rails pushing it a little further out of fashion. Of course, the SPA suffers plenty of criticism, and Rails is still a popular choice with and without an SPA on the front-end, but I think it's fair to say that Rails is no longer the "fun" way to do things (though the most fun doesn't mean the best business or engineering solution).
- jholman 9y agoI agree with all of the major points of your comment, but I have a quibble: > Rails was designed at a time before angular brought the SPA into fashion I dunno that Angular is the relevant point here. Rails (late 2005? I think?) post-dates the public existence of Gmail (public April 2004), a wildly popular SPA. It also post-dates the existence of Google Maps (early 2005). The famous blog post by Jesse James Garrett that coined the acronym "AJAX" is also from early 2005. The thing that Rails does well was already largely-obsolete before Rails was open-sourced. (Though that is one state-of-the-art buggy whip! Very impressive!)
- asveikau 9y agoI am American, and remember the first I heard of Ruby was in '99/2000-ish. I didn't get into it but it sounded interesting. It was presented as a smalltalk-like language with good interop with C, or even objc for OS X apps. Pretty similar to the niches that Python fills. Then it seemed like one day some years later, a very faddish, I will be blunt, charlatan type seemed to dominate that discussion. This is the type that confuses ruby with rails, git with github, the internet with the web. They are using ruby in the same way that the old ASP crowd would have used Visual Basic. I was never involved in any of this, just watching from the sidelines, but it does seem like a bit of a shame.
- deleted 9y ago[deleted]
- ktamura 9y agoRuby definitely owes a big part of its popularity and awareness to Rails. I think all Ruby committers admit this fact. That said, Rails is hardly the only framework that has brought Ruby to the communities outside of Japan. Chef/Puppet/Fluentd played a key role in bringing Ruby to the ops world while books like "Understanding Computing" by Tom Stuart demonstrates Ruby's potential beyond web programming. There's a tangible tension between Rails fanatics and sans-Rails Rubyists, but they have needed each other to get where they are today.
- webbrahmin 9y agoEven in Japan PHP and Java are more popular than Ruby. As per a Japanese headhunter friend of mine who works for a big placement agency there there are about 3 times more PHP jobs & 6 time more Java jobs than Ruby jobs in Japan.
- ninjabeans 9y agoYeah but no one writes their personal projects in those.
- deavmi 9y agoGood to see a good language thrive.