[#365153] synchronize a "mocked" clock in a distributed system — Chuck Remes <cremes.devlist@...>

I've been banging on a problem for a few days now and don't feel any closer to solving it. I'm hoping some of the big brains on the ruby ML can shed some light. Following are a few paragraphs with a brief system overview before I state the problem. I apologize in advance for this question being only tangentially related to Ruby the language. :)

13 messages 2010/07/01
[#365164] Re: [Q] synchronize a "mocked" clock in a distributed system — Tony Arcieri <tony.arcieri@...> 2010/07/01

On Thu, Jul 1, 2010 at 3:10 PM, Chuck Remes <cremes.devlist@mac.com> wrote:

[#365214] RubyGoLightly Progress Report — Eleanor McHugh <eleanor@...>

I seem to have been missing in action for the best part of six months so =

14 messages 2010/07/02

[#365320] Why am I not getting the expected output? — Abder-rahman Ali <abder.rahman.ali@...>

I have the following code: http://pastie.org/1032525, but always getting

11 messages 2010/07/06

[#365351] best way to make .rb into an executable for linux? — David Ainley <wrinkliez@...>

I have a pretty basic .rb script that I would like to turn into an

11 messages 2010/07/06

[#365374] Hashes don't allow preceding commas by design? — Iain Barnett <iainspeed@...>

This is the output from irb that shows ruby 1.9.1 doesn't like hash =

12 messages 2010/07/07

[#365413] What is meant by those lines of code in this script? — Abder-rahman Ali <abder.rahman.ali@...>

I came across the following script from "Why's poignant guide to Ruby".

9 messages 2010/07/07

[#365504] FIRST PROGRAMMING PROBLEM Array — Francisco Martinez <calabazag@...>

Hi...I'm trying to solve a very simple exercise but this is one of my

12 messages 2010/07/09

[#365513] what about allowing to specify, which end belongs to which start? — Jan Lelis <prog@...>

Hi Ruby mailing list,

24 messages 2010/07/09
[#365541] Re: what about allowing to specify, which end belongs to which start? — Caleb Clausen <vikkous@...> 2010/07/10

On 7/9/10, Jan Lelis <prog@janlelis.de> wrote:

[#365548] Re: what about allowing to specify, which end belongs to which start? — Robert Klemme <shortcutter@...> 2010/07/11

On 10.07.2010 17:54, Caleb Clausen wrote:

[#365551] Re: what about allowing to specify, which end belongs to which start? — Caleb Clausen <vikkous@...> 2010/07/11

On 7/11/10, Robert Klemme <shortcutter@googlemail.com> wrote:

[#365555] Re: what about allowing to specify, which end belongs to which start? — Robert Klemme <shortcutter@...> 2010/07/11

On 11.07.2010 13:32, Caleb Clausen wrote:

[#365574] Re: what about allowing to specify, which end belongs to which start? — Caleb Clausen <vikkous@...> 2010/07/11

On 7/11/10, Robert Klemme <shortcutter@googlemail.com> wrote:

[#365570] How to pass a hash as a param to a method called through eval? — Alex Stahl <astahl@...5.com>

Hi Folks - I've got a data-driven app I'm building, and I'd like to be

14 messages 2010/07/11

[#365615] Try Ruby is back online. — andrew mcelroy <sophrinix@...>

Greetings,

10 messages 2010/07/12

[#365721] Ruby garabage collector — Abder-Rahman Ali <abder.rahman.ali@...>

In the "Why's poignant guide to Ruby" book, it states the following:

22 messages 2010/07/13

[#365752] What does this do? — Abder-Rahman Ali <abder.rahman.ali@...>

I have this portion of code from "Why's poignant guide to Ruby" book.

12 messages 2010/07/13

[#365828] click a javascript dialog window in Firefox — Mario Ruiz <tcblues@...>

Hi,

9 messages 2010/07/14

[#365844] Return nothing when looking outside the bounds of 2D array? — Shawn W_ <shawnw@...>

I have a 2D Array. I have written a method

22 messages 2010/07/14
[#365850] Re: Return nothing when looking outside the bounds of 2D array? — w_a_x_man <w_a_x_man@...> 2010/07/14

On Jul 14, 3:56=A0pm, Shawn W_ <sha...@internode.on.net> wrote:

[#365853] Re: Return nothing when looking outside the bounds of 2D array? — Shawn W_ <shawnw@...> 2010/07/15

Thx. Don't quite understand that code. I tried plugging in some nils but

[#365869] Re: Return nothing when looking outside the bounds of 2D array? — Shawn W_ <shawnw@...> 2010/07/15

A better way to describe it.

[#365871] Re: Return nothing when looking outside the bounds of 2D array? — Dave Howell <groups.2009a@...> 2010/07/15

I was going to suggest using the 'case' statement instead of all those =

[#365938] Re: Return nothing when looking outside the bounds of 2D array? — Shawn W_ <shawnw@...> 2010/07/16

Okay, just found out that...

[#365944] Re: Return nothing when looking outside the bounds of 2D array? — Martin DeMello <martindemello@...> 2010/07/16

On Fri, Jul 16, 2010 at 11:11 AM, Shawn W_ <shawnw@internode.on.net> wrote:

[#365847] Ruby best practice for "always on" app/service? — yermej <yermej@...>

I'm building an app that will essentially be a web service client. It

10 messages 2010/07/14

[#365988] client-side Ruby on iPad/iPhone? — Jeff Pritchard <jp@...>

I've seen jRuby and IronRuby, and really want to use them since i really

12 messages 2010/07/17

[#366015] ruby abstraction — "James O'Brien" <jeob32@...>

Hi,

17 messages 2010/07/18

[#366053] LoadError: no such file to load -- tk — Rich Leblanc <rl001@...>

I'm trying to install Ruby on a 64 bit Windows 7 machine following this

46 messages 2010/07/19
[#366063] Re: LoadError: no such file to load -- tk — Roger Pack <rogerpack2005@...> 2010/07/19

[#366082] Re: LoadError: no such file to load -- tk — Rich Leblanc <rl001@...> 2010/07/19

Roger Pack wrote:

[#366085] Re: LoadError: no such file to load -- tk — Eric Christopherson <echristopherson@...> 2010/07/19

On Mon, Jul 19, 2010 at 3:26 PM, Rich Leblanc <rl001@pacbell.net> wrote:

[#366086] Re: LoadError: no such file to load -- tk — Rich Leblanc <rl001@...> 2010/07/20

Eric Christopherson wrote:

[#366135] Re: LoadError: no such file to load -- tk — Roger Pack <rogerpack2005@...> 2010/07/20

[#366140] Re: LoadError: no such file to load -- tk — Rich Leblanc <rl001@...> 2010/07/20

Roger Pack wrote:

[#366147] Re: LoadError: no such file to load -- tk — Roger Pack <rogerpack2005@...> 2010/07/20

Rich Leblanc wrote:

[#366153] Re: LoadError: no such file to load -- tk — Rich Leblanc <rl001@...> 2010/07/20

Roger Pack wrote:

[#366179] Re: LoadError: no such file to load -- tk — Rich Leblanc <rl001@...> 2010/07/21

Rich Leblanc wrote:

[#366115] Count occurences of vars in array — Vitaliy Yanchuk <fuksito@...>

Hello, everyone.

18 messages 2010/07/20
[#366116] Re: Count occurences of vars in array — Jean-Julien Fleck <jeanjulien.fleck@...> 2010/07/20

Hello,

[#366120] Re: Count occurences of vars in array — Vitaliy Yanchuk <fuksito@...> 2010/07/20

Jean-Julien Fleck, thanks.

[#366152] Can't get ruby 1.9 to work after install on OSX — Musdev Musdev <devrubygem@...>

Hello

12 messages 2010/07/20

[#366196] how to make "gem install rmagick" work? — Jian Lin <blueskybreeze@...>

I wanted to install rmagick on Win7 but it can't install:

10 messages 2010/07/21

[#366226] Text to Binary — Umm Whyshouldisay <kipthemudkip@...>

Hi! I'm new to the forums. I'm also a bit new to Ruby. I already know

13 messages 2010/07/21

[#366254] finding last line in a file — Ted Flethuseo <flethuseo@...>

Hi everyone,

15 messages 2010/07/22
[#366256] Re: finding last line in a file — Urabe Shyouhei <shyouhei@...> 2010/07/22

Take a look at the doc for File.readline.

[#366257] Re: finding last line in a file — Urabe Shyouhei <shyouhei@...> 2010/07/22

(2010/07/22 14:08), Urabe Shyouhei wrote:

[#366319] Typical Ruby (non-rails) project structure. — Carl Jenkins <carljenkins@...>

What is/are the best-practice(s) for a Ruby project structure?

18 messages 2010/07/22

[#366418] Ruby books designed especially for beginngers — Kaye Ng <sbstn26@...>

Hey experts, i need your advice.

12 messages 2010/07/24

[#366611] Which Ruby is in use? — Hassan Schroeder <hassan.schroeder@...>

Is there a way to tell from within a program which executable is being

23 messages 2010/07/27
[#366614] Re: Which Ruby is in use? — "Joseph E. Savard" <joseph.savard@...> 2010/07/27

[#366617] Re: Which Ruby is in use? — Hassan Schroeder <hassan.schroeder@...> 2010/07/27

On Tue, Jul 27, 2010 at 2:20 PM, Joseph E. Savard

[#366620] Re: Which Ruby is in use? — Joel VanderWerf <joelvanderwerf@...> 2010/07/27

Hassan Schroeder wrote:

[#366622] Re: Which Ruby is in use? — Hassan Schroeder <hassan.schroeder@...> 2010/07/27

On Tue, Jul 27, 2010 at 3:10 PM, Joel VanderWerf

[#366624] Re: Which Ruby is in use? — Joel VanderWerf <joelvanderwerf@...> 2010/07/27

Hassan Schroeder wrote:

[#366625] Re: Which Ruby is in use? — Hassan Schroeder <hassan.schroeder@...> 2010/07/27

On Tue, Jul 27, 2010 at 3:52 PM, Joel VanderWerf

[#366626] Re: Which Ruby is in use? — Joel VanderWerf <joelvanderwerf@...> 2010/07/27

Hassan Schroeder wrote:

[#366629] tool to compare DB schema against DDL file — Fabian Marin <fmg134s@...>

First of all any feedback from you guys will be of tremendous help.

14 messages 2010/07/28

[#366727] my script just read one line? — Junhui Liao <junhui.liao@...>

Dear all,

19 messages 2010/07/29
[#366729] Re: my script just read one line? — Jes俍 Gabriel y Gal疣 <jgabrielygalan@...> 2010/07/29

On Thu, Jul 29, 2010 at 1:43 PM, Junhui Liao <junhui.liao@uclouvain.be> wro=

[#366766] Re: my script just read one line? — Junhui Liao <junhui.liao@...> 2010/07/29

Dear Jes炭s Gabriel y Gal叩n and all,

[#366774] Re: my script just read one line? — Jes俍 Gabriel y Gal疣 <jgabrielygalan@...> 2010/07/30

On Fri, Jul 30, 2010 at 1:58 AM, Junhui Liao <junhui.liao@uclouvain.be> wro=

[#366784] Re: my script just read one line? — Junhui Liao <junhui.liao@...> 2010/07/30

[#366786] Re: my script just read one line? — Jes俍 Gabriel y Gal疣 <jgabrielygalan@...> 2010/07/30

On Fri, Jul 30, 2010 at 2:18 PM, Junhui Liao <junhui.liao@uclouvain.be> wro=

[#366792] Re: my script just read one line? — Junhui Liao <junhui.liao@...> 2010/07/30

Dear Jes炭s Gabriel y Gal叩n,

[#366755] .any?{} Behavior — John Sikora <john.sikora@...>

I find the following behavior interesting (so interesting that I

28 messages 2010/07/29
[#366797] Re: [].all?{} and [].any?{} Behavior — Rick DeNatale <rick.denatale@...> 2010/07/30

On Thu, Jul 29, 2010 at 5:27 PM, John Sikora <john.sikora@xtera.com> wrote:

[#366809] Re: [].all?{} and [].any?{} Behavior — Josh Cheek <josh.cheek@...> 2010/07/30

On Fri, Jul 30, 2010 at 10:49 AM, Rick DeNatale <rick.denatale@gmail.com>wrote:

[#366837] Mocking a method with a block — Fernando Guillen <fguillen.mail@...>

Hi people,

12 messages 2010/07/31

ANN: Sequel 3.13.0 Released

From: Jeremy Evans <code@...>
Date: 2010-07-01 15:31:24 UTC
List: ruby-talk #365125
Sequel is a lightweight database access toolkit for Ruby.

* Sequel provides thread safety, connection pooling and a concise
  DSL for constructing SQL queries and table schemas.
* Sequel includes a comprehensive ORM layer for mapping records to
  Ruby objects and handling associated records.
* Sequel supports advanced database features such as prepared
  statements, bound variables, stored procedures, savepoints,
  two-phase commit, transaction isolation, master/slave
  configurations, and database sharding.
* Sequel currently has adapters for ADO, Amalgalite, DataObjects,
  DB2, DBI, Firebird, Informix, JDBC, MySQL, ODBC, OpenBase, Oracle,
  PostgreSQL and SQLite3.

Sequel 3.13.0 has been released and should be available on the gem
mirrors.

= New Plugins

* A json_serializer plugin was added that allows you to serialize
  model instances or datasets to JSON using to_json.  It requires
  the json library.  The API was modeled on ActiveRecord's JSON
  serialization support.  You can use :only and :except options
  to specify the columns included, :include to specify associations
  to include, as well pass options to nested associations using a
  hash.  In addition to serializing to JSON, it also adds support
  for parsing JSON to model objects via JSON.parse or #from_json.

* An xml_serializer plugin was added that allows you to serialize
  model instances or datasets to XML.  It requries the nokogiri
  library.  It has a similar API to the json_serializer plugin, using
  to_xml instead of to_json, and the from_xml class method instead
  of JSON.parse.

* A tree plugin was added that allows you to treat Sequel::Model
  objects as being part of a tree.  It provides similar features to
  rcte_tree, but works on databases that don't support recursive
  common table expressions.  In addition to the standard parent
  and children associations, it provides instance methods to get
  the ancestors, descendants, and siblings of the given tree node,
  and class methods to get the roots of the tree.

* A list plugin was added that allows you to treat Sequel::Model
  objects as being part of a list.  This adds instance methods to
  get the next and prev items in the list, or to move the item
  to a specific place in the list.  You can specify that all rows
  in the table belong to the same list, or specify arbitrary scopes
  so that the same table can contain many separate lists.

= Other New Features

* Sequel is now compatible with Ruby 1.9.2pre3.

* Sequel now supports prepared transactions/two-phase commit on
  PostgreSQL, MySQL, and H2.  You can specify that you want to
  use prepared transactions using the :prepare option which
  should be some transaction id string:

    DB.transaction(:prepare=>'some string') do ... end

  Assuming that no exceptions are raised in the transaction block,
  Sequel will prepare the transaction.  You can then commit the
  transaction later:

    DB.commit_prepared_transaction('some string')

  If you need to rollback the prepared transaction, you can do
  so as well:

    DB.rollback_prepared_transaction('some string')

* Sequel now supports customizable transaction isolation levels on
  PostgreSQL, MySQL, and Microsoft SQL Server.  You can specify the
  transaction isolation level to use for any transaction using the
  :isolation option with an :uncommitted, :committed, :repeatable,
  or :serializable value:

    DB.transaction(:isolation=>:serializable) do ... end

  You can also set the default isolation level for transactions via
  the transaction_isolation_level Database attribute:

    DB.transaction_isolation_level = :committed

  If you are connecting to Microsoft SQL Server, it is recommended
  that you set a default transaction isolation level if you plan
  on using this feature.

* You can specify a NULLS FIRST/LAST ordering by using the
  :nulls=>:first/:last option to asc and desc:

    Album.filter(:release_date.desc(:nulls=>:first),
                 :name.asc(:nulls=>:last))
    # ORDER BY release_date DESC NULLS FIRST,
    #          name ASC NULLS LAST

  This syntax is supported by PostgreSQL 8.3+, Firebird 1.5+,
  Oracle, and probably some other databases as well, and makes it
  possible for the user to specify whether NULL values should sort
  before or after other values.

* Sequel::Model.find_or_create now accepts a block that is a yielded
  a new model object to be created if an existing model object is
  not found.

    Node.find_or_create(:name=>'A'){|i| i.parent_id = 4}

* The :frame option for windows and window functions can now be a
  string that is used literally in the SQL.  This is necessary if you
  want to specify a custom frame, such as one that uses a specific
  number of rows preceding or following.

* Savepoints are now supported on H2.

* A :methods_module association option was added, allowing you to
  specify the module into which association instance methods are
  placed.  By default, it uses the module containing the column
  accessor methods.

= Other Improvements

* The :encoding option for the native MySQL adapter should now work
  correctly in all cases.  This fix was included in 3.12.1.

* Sequel now handles arrays of two element arrays automatically when
  using them as the value of a filter hash:

    DB[a].filter([:a, :b]=>[[1, 2], [3, 4]])

  Previously, you had to call .sql_array on the array in order to
  tell Sequel that it was a value list and not a conditions
  specifier.

* Sequel no longer attempts to use class polymorphism in the
  class_table_inheritance plugin if you don't specify a cti_key.

* When using the native SQLite adapter, prepared statements are now
  cached per connection for increased performance.  Previously,
  Sequel prepared a new statement for every query.

* tinyint(1) columns are now handled as booleans when connecting to
  MySQL via JDBC.

* On PostgreSQL, if no :schema option is provided for
  Database#tables, #table_exists?, or #schema, and no default_schema
  is used,  assume all schemas except the default non-public ones.
  Previously, it assumed the public schema for tables and
  table_exists?, but did not assume any schema for #schema.

  This fixes issues if you use table names that overlap with table
  names in the information_schema, such as domains.  It's still
  recommended that you specify a default_schema if you are using a
  schema other than public.

* Unsigned integers are now handled correctly in the schema dumper.

* Sequel::SQL::PlaceholderLiteralString is now a GenericExpression
  subclass, allowing you to treat it like most other Sequel
  expression objects:

    '(a || ?)'.lit(:b).like('Test%')
    # ((a || b) LIKE 'Test%')

* Sequel now supports the bitwise shift operators (<< and >>) on
  Microsoft SQL Server by emulating them.

* Sequel now supports most bitwise operators (&, |, ^, <<, >>) on H2
  by emulating them.  The bitwise complement operator is not yet
  supported.

* Sequel now logs the SQL queries that are sent when connecting to
  MySQL.

* If a plugin cannot be loaded, Sequel now gives a more detailed
  error message.

= Backwards Compatibility

* Array#sql_array and the Sequel::SQL::SQLArray class are now
  considered deprecated.  Use the Array#sql_value_list and the
  Sequel::SQL::ValueList class instead.  SQLArray is now just
  an alias for ValueList, but it now is an Array subclass instead
  of a Sequel::SQL::Expression subclass.

* Using the ruby bitwise xor operator (^) on PostgreSQL now uses
  PostgreSQL's bitwise xor operator (#) instead of PostgreSQL's
  exponentiation operator (^).  If you want exponentiation, use
  the power function.

* Using the ruby bitwise complement operator (~) on MySQL now returns
  a signed integer instead of an unsigned integer, for better
  compatibility with other databases.

* Using nil as a case expression value (the 2nd argument to Hash#case
  and Array#case) will now use NULL as the case expression value,
  instead of omitting the case expression value:

    # 3.12.0
    {1=>2}.case(0, nil)
    # CASE WHEN 1 THEN 2 ELSE 0 END

    # 3.13.0
    {1=>2}.case(0, nil)
    # CASE NULL WHEN 1 THEN 2 ELSE 0 END

  In general, you would never use nil explicitly, but the new
  behavior makes more sense if you have a variable that might be nil:

    parent_id = Node[1].parent_id
    {1=>2}.case(0, parent_id)

  If parent_id IS NULL/nil, then previously Sequel would have
  generated unexpected SQL.  If you don't want a case expression
  value to be used, do not pass a second argument to #case.

* Some internal transaction methods now take an optional options
  hash, so if you have a custom adapter, you will need to make
  changes.

* Some internal association methods now take an optional options
  hash.

* Some Rakefile task names were modified in the name of consistency:

    spec_coverage -> spec_cov
    integration -> spec_integration
    integration_cov -> spec_integration_cov

Thanks,
Jeremy

* {Website}[http://sequel.rubyforge.org]
* {Source code}[http://github.com/jeremyevans/sequel]
* {Blog}[http://sequel.heroku.com]
* {Bug tracking}[http://code.google.com/p/ruby-sequel/issues/list]
* {Google group}[http://groups.google.com/group/sequel-talk]
* {RDoc}[http://sequel.rubyforge.org/rdoc]
-- 
Posted via http://www.ruby-forum.com/.

In This Thread

Prev Next