DevHeads.net

Talk

Earn $100-$500 per month

Great Offer!!!
Now you can earn $100-$500 per month with virtualofficejob.com.Here has many choice for you.You can get job absolutely free. Visit this page website:<a href="http://www.virtualofficejob.com/affiliate.php?id=FR30366"target="_blank"></a>Free job for you!

Free job

Free job for you!
Are you want any Internet home job?It is perfect job for you. Absolutely free and easy job here. To know more about this Please visit this page website:<a href="http://www.virtualofficejob.com/affiliate.php?id=FR30366"target="_blank"=></a>

Free job

Great offer for you. Are you want to do a Internet job?It's for you.

So try Virtualofficejob.com and enjoy it...

not understanding return statement

Hi all, I need help understanding part of my code. I'm learning about data
structures, at the moment binary search tree.
This code does what I want, but I don't understand return statement in
insert
method. Why @root = root works as it works.

Publish to rubygems.org from Azure DevOps

Hello list,

currently i'm experimenting a little bit with Azure DevOps and specially the Release Pipelines there.

I'm interested to deploy a built Rubygem via gem push to rubygems.org. One of the important things to use that command, is a valid credentials directory (.gem) in /home/username/.gem or C:\Users\username\.gem.
Maybe anyone use Azure DevOps currently fort hat job?

Ruby Quiz - Challenge #8 - Base32 Alphabet - Convert the Super "Sekretoooo" 240-Bit CryptoKitties Genome to Kai Notation - Annipurrsary!

Hello,

It's Friday. Ruby Quiz time! Join us. Let's keep going with a new
Ruby Quiz [1] every Friday. Here we go:

Challenge #8 - Base32 Alphabet - Convert the Super "Sekretoooo"
240-Bit CryptoKitties Genome to Kai Notation - Annipurrsary!

Annipurrsary!

JRuby 9.2.5.0 Released

The JRuby community is pleased to announce the release of JRuby 9.2.5.0

- Homepage: <a href="http://www.jruby.org/" title="http://www.jruby.org/">http://www.jruby.org/</a>
- Download: <a href="http://www.jruby.org/download" title="http://www.jruby.org/download">http://www.jruby.org/download</a>

JRuby 9.2.x is our new major version of JRuby. It is expected to be
compatible with Ruby 2.5.x and stay in sync with C Ruby. JRuby 9.2.0.0 is
our first release for 2.5 support.

If you do find issues then report them on using our issue tracker at
<a href="http://bugs.jruby.org" title="http://bugs.jruby.org">http://bugs.jruby.org</a>. We also encourage users to join our IRC channel
(#jruby on Freenode) and mailing lists.

How to use another script for input.

Hey, all. I've written a script that does a bunch of OpenStack API
stuff. Yay. But now I'm writing a CGI front-end, and I'd like to use
the first script to inform the new one, so to speak.

Threads, Sockets and OSX

I have a little app that is basically the standard threaded TCPServer with
a couple of mutexes to implement a fifo queue. When it runs it goes flat
out for 15-20 seconds and then freezes for 10-15 seconds.

What happened to version 1.2.8 of the logger gem?

Hi everyone,

The logger gem, which has been at version 1.2.8 for 7.5 years, was yanked
from rubygems.org today (2018-12-04) and replaced with version 1.2.7:

<a href="https://rubygems.org/gems/logger/versions/1.2.8" title="https://rubygems.org/gems/logger/versions/1.2.8">https://rubygems.org/gems/logger/versions/1.2.8</a>

This library was not a gem before 1.2.8. The gemspec was added on
2011-05-11:

<a href="https://github.com/nahi/logger/commit/af96ca8fbf9ca1a20812a222c27d5c1ccf5d297e" title="https://github.com/nahi/logger/commit/af96ca8fbf9ca1a20812a222c27d5c1ccf5d297e">https://github.com/nahi/logger/commit/af96ca8fbf9ca1a20812a222c27d5c1ccf...</a>

There has never been an official release of a 1.2.7 version, as told by the
release history on GitHub:

<a href="https://github.com/nahi/logger/releases" title="https://github.com/nahi/logger/releases">https://github.com/nahi/logger/releases</a>

There have been no commits to this repo for more than 6 years.

ruby_parser 3.12.0 Released

ruby_parser version 3.12.0 has been released!

* home: <https://github.com/seattlerb/ruby_parser>
* bugs: <https://github.com/seattlerb/ruby_parser/issues>
* rdoc: <http://docs.seattlerb.org/ruby_parser>

ruby_parser (RP) is a ruby parser written in pure ruby (utilizing
racc--which does by default use a C extension).

Re: Ruby Quiz - Challenge #7 - Type Inference - Convert Strings to Null, Number, Not a Number (NaN), Date & More

It seems that my previous message wasn't delivered due to a couple of MIME
headers or for some other reason. At least I can't see it on either marc.info
or rubytalk.org.

[ANN} HTTPX 0.3.0 released!

https 0.3.0 has been released.

* <a href="https://gitlab.com/honeyryderchuck/httpx" title="https://gitlab.com/honeyryderchuck/httpx">https://gitlab.com/honeyryderchuck/httpx</a>

httpx is a client library for making HTTP requests from Ruby. It has a
simple but highly configurable API to perform single and multiple requests
(supports HTTP/2 as well has 1.1 and 1.0).

One Year CryptoKitties! Copycats Unchained Command Line Tool (& Core Library) Updated

Hello,

To celebrate One Year CryptoKitties! I’ve updated the copycats
command line tool (and core library) - crypto kitties / cats
collectibles unchained [1] - with the latest (official) traits /
cattributes and more.

All copycats tools are free and open source (and all in ruby).

Happy genome genetics 12x4 slicing and 256-bits collecting w/ ruby.

[1] <a href="https://github.com/cryptocopycats/copycats" title="https://github.com/cryptocopycats/copycats">https://github.com/cryptocopycats/copycats</a>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Ruby Quiz - Challenge #7 - Type Inference - Convert Strings to Null, Number, Not a Number (NaN), Date & More

Hello,

It's Friday. Ruby Quiz time! Join us. Let's keep going with a new
Ruby Quiz [1] every Friday.

JRuby 9.2.4.1

The JRuby community is pleased to announce the release of JRuby 9.2.4.1

Homepage: <a href="http://www.jruby.org/" title="http://www.jruby.org/">http://www.jruby.org/</a>
Download: <a href="http://www.jruby.org/download" title="http://www.jruby.org/download">http://www.jruby.org/download</a>

JRuby 9.2.x is our new major version of JRuby. It is expected to be
compatible with Ruby 2.5.x and stay in sync with C Ruby. JRuby 9.2.0.0 is
our first release for 2.5 support.

If you do find issues then report them on using our issue tracker at
<a href="http://bugs.jruby.org" title="http://bugs.jruby.org">http://bugs.jruby.org</a>. We also encourage users to join our IRC channel
(#jruby on Freenode) and mailing lists.

packetgen 3.1.0 released

packetgen 3.1.0 has been released.

* home: <https://github.com/sdaubert/packetgen>
* bugs: <https://github.com/sdaubert/packetgen/issues>
* doc: <https://github.com/sdaubert/packetgen/wiki>

PacketGen provides simple ways to generate, send and capture network
packets.

Supported protocols are: Ethernet, Dot11, Dot1x, ARP, IP, IPv6, GRE,
ICMP, IGMP, ICMPv6, MLD, MLDv2, OSPFv2, OSPFv3, UDP, TCP, SNMP, DNS,
EAP, BOOTP, DHCP, TFTP, HTTP and MDNS.

Changes:

### 3.1.0 / 2018-11-28

* Add Types::Fields.field_defs to get field definitions for a Fields
subclass.
* Deprecate Types::TLV in favor of T

setting_accessors 1.0 - A global key-value-store and database-persisted attribute accessors

Hey!

A while ago I wrote a small gem which let developers assign attributes to
ActiveRecord models which would
automatically be persisted in the database and generally behave like normal
column-based attributes.
It also included a generic persisted key-value-store which could validate /
type cast its entries based
on a global configuration.

While upgrading a big project that used it to Rails 5, it showed that some
of the mechanisms I used to
mimic ActiveRecord’s behaviour did no longer work due to framework changes.
I took this as an opportunity to almost completely refactor the whole gem
an

Curses gem

Who here uses curses?

Let’s talk...

Hal Fulton

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Re: Ruby Quiz - Challenge #6 - Build the Table of Contents (ToC) for Documents in Markdown

Gerald Bauer wrote:

$ ruby ./lib/006a.rb
Run options: --seed 21628
# Running:
.
Finished in 0.003442s, 290.5411 runs/s, 290.5411 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips

$ cat ./lib/006a.rb
require_relative '../006/test.rb'

class RubyQuizTest
def toc(txt)
txt
.lines
.lazy
.select{|l| l.match(/^(#+)\s+(.*)\s*$/)}
.map{|l| [$~[1].length, $~[2]]}
.slice_when{|a, b| a[0] != b[0]}
.to_a
.yield_self do |z|
# <a href="https://en.wikipedia.org/wiki/Overfi" title="https://en.wikipedia.org/wiki/Overfi">https://en.wikipedia.org/wiki/Overfi</a>

Ruby Quiz - Challenge #6 - Build the Table of Contents (ToC) for Documents in Markdown

Hello,

It's Friday. Ruby quiz time! Join us. Let's keep going with a new
Ruby Quiz [1] coding challenge every Friday.
Here we go:

Ruby Quiz - Challenge #6 - Build the Table of Contents (ToC) for
Documents in Markdown

Let's read text documents and build up the table of contents from the
headings hierarchy / tree.

Markdown uses hashtags (`#`) for marking up headings.

CSV Reader (and Type Inference and Data Conversion) Benchmarks (Faster, Fasterer, Fastest) - And the Winner is... String#split

Hello,

I've put together some basic csv reader / parser benchmarks [1].
The "Raw" Read Benchmark returns all strings - no type inference or
data conversion (*)
and the Numerics Benchmark returns all numbers - simple type inference
or data conversion -
it's all numbers - all the time (except for the header row).

Here's the result for the numerics benchmark using the weather
station data from
the University of Waterloo, Ontario, Canada:

n = 100
user system total real
std: 20.781000 0.234000 21.015000 ( 21.039186)
split:

Mastering data structures in Ruby

Hi, I'm about to finish a series of posts on how to implement
traditional data structures in Ruby and I wanted to share with you, friends.

So far, the series covers singly linked lists, doubly linked lists,
circular linked lists,
stacks, queues, sets, hash tables, binary trees, and binary search trees
(and there are a couple more on their way)

I'll leave you the link in case this subject interests you.
<a href="https://medium.com/amiralles/stories/published" title="https://medium.com/amiralles/stories/published">https://medium.com/amiralles/stories/published</a>

Cheers!
Ale Miralles

<a href="http://amiralles.com.ar" title="http://amiralles.com.ar">http://amiralles.com.ar</a>
<a href="https://medium.com/amiralles" title="https://medium.com/amiralles">https://medium.com/amiralles</a>

Hello

Rapid array accesses and garbage collection

I have a small app that uses an Array as a queue. Works well enough but
(seems) to suffer from GC lockouts

Items are added and removed (<< and shift) from the Array frequently and
the queue itself rarely gets very large, 10s to 100s of records, but the
throughput is 100,000s of records

Which is, I assume, causing it to periodically freeze. The question is:

1) Should I manually start GC after every shift operation. Will this trade
off frequent small GC interruptions for less big freezes
2) Should I manually start GC after X shifts.

Performance gap between Ruby MRI and JRuby

Hi,

I just completed writing an application which substitutes FileBeat, for
our Elasticsearch stack.

I wrote it in Ruby 2.5.0, I considered it a good idea to move it under
JRuby because the server where it runs is not under my direct control.
Running it as JRuby would ensure me better protection against future
changes in the server software stack. The idea is: make a .jar of it and
close the story
once and for all.

Since the Java env.

Mega List - Awesome Ruby Meetups & Orgs from Around the World - Updates Welcome!

Hello,

I've moved the collection of awesome Ruby meetups, code learning and
diversity organizations, and more from around the world to a new home
/ repo for making it easier to update / contribute.

See the all-in-one page "front end" mega list @
<a href="https://planetruby.github.io/meetups" title="https://planetruby.github.io/meetups">https://planetruby.github.io/meetups</a>

And find the "back end" source pages in text such as AFRICA.md,
AMERICA.md, ASIA.md, EUROPE.md, PACIFIC.md @
<a href="https://github.com/planetruby/meetups" title="https://github.com/planetruby/meetups">https://github.com/planetruby/meetups</a>

Anything missing? Updates more than welcome.

Cheers.

hoe-bundler 1.5.0 Released

hoe-bundler version 1.5.0 has been released!

* <a href="http://github.com/flavorjones/hoe-bundler" title="http://github.com/flavorjones/hoe-bundler">http://github.com/flavorjones/hoe-bundler</a>
* <a href="https://ci.nokogiri.org/teams/nokogiri-core/pipelines/hoe-bundler" title="https://ci.nokogiri.org/teams/nokogiri-core/pipelines/hoe-bundler">https://ci.nokogiri.org/teams/nokogiri-core/pipelines/hoe-bundler</a>

Generate a Gemfile based on a Hoe spec's declared dependencies.

Changes:

## 1.5.0 / 2018-11-17

Enhancements:

* The `bundler:gemfile` rake task accepts optional arguments to specify the
gem source, and whether to invoke `gemspec`. (Thanks, @adangel!)

SMB plugin for packetgen v0.5.0

* home: <https://github.com/sdaubert/packetgen-plugin-smb>
* bugs: <https://github.com/sdaubert/packetgen-plugin-smb/issues>

packetgen-plugin-smb 0.5.0 is out.

packetgen-plugin-smb adds support for SMB protocol suites to PacketGen.

PacketGen provides simple ways to generate, send and capture network
packets.

Changes:

### 0.5.0 / 2018-10-18

* Add support for Link-Local Multicast Name Resolution (LLMNR).
* Add support for SMBv1 Negotiate command.
* Add SMB#parse?

Ruby Quiz - New "Front End" Website (Pages) @ https://planetruby.github.io/quiz

Hello,

For easy reference (and for your information) - the "back end"
ruby quiz pages in the github repo now also get published (rendered)
on the "front end" thanks to jekyll (and github pages).

See <a href="https://planetruby.github.io/quiz" title="https://planetruby.github.io/quiz">https://planetruby.github.io/quiz</a> for "easy-to-read" pages using
the default primer theme.

Cheers. Prost.

PS: All quizzes are still open - send in your code snippets :-) or
questions and comments for public dicussions.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

GTK3-Class Extensions not possible

Hello,

for some reasons I extend ruby GTK3 class with some functions. This works

very well with ruby-gtk3 2.2.5-4 build1.

Ruby Quiz - Challenge #5 - Crypto Mining - Find the Winning Lucky Number - Nonce (=Number used ONCE) for the Proof-of-Work (PoW) Hash (SHA-256)

Hello,

It's Friday. Ruby Quiz time! Join us. Let's keep going with a new
Ruby Quiz [1] every Friday.
Here we go:

Challenge #5 -Crypto Mining - Find the Winning Lucky Number - Nonce
(=Number used ONCE) for the Proof-of-Work (PoW) Hash (SHA-256)

Let's find the the winning lucky lumber, that is, nonce (=Number used ONCE)
for the proof-of-work (PoW) hash using SHA-256.

Aside: What's a (Crypto) Hash?

Classic Bitcoin uses the SHA256 hash algorithm.

graphics 1.0.1 Released

graphics version 1.0.1 has been released!

* home: <https://github.com/zenspider/graphics>
* rdoc: <http://docs.seattlerb.org/graphics>

Graphics provides a simple framework to implement games and/or
simulations and is designed to follow mathematical conventions, NOT
game programming conventions. Particularly it:

* Uses degrees.
* Draws in quadrant 1 (0-90 degrees).
* Right hand rule: 0 degrees is east, 90 is north, etc.

These allow simple things like Trigonometry functions to work as
expected. It means that all that stuff you were taught in grade school
still work as intended.

Ruby Conferences ‘n’ Camps in 2019 - What’s Upcoming? Anything Missing? (Please Tell)

Hello,

Over at planet ruby - we try the second year running put together a
"definitive" world wide ruby conferences & camps calendar for 2019 [1]
(see 2018 [2] for what happened this year :-) for all to use and
share.

If any ruby conference or camp is missing, let us know here (or
better edit the datafile in yaml [3] on github :-)). Yes, the calendar
page is built with ruby (and jekyll and friends) and all is open
source and dedicated to the public domain (that is, no rights
reserved; use as you please etc.)

Cheers.

graphics 1.0.0 Released

graphics version 1.0.0 has been released!

* home: <https://github.com/zenspider/graphics>
* rdoc: <http://docs.seattlerb.org/graphics>

Graphics provides a simple framework to implement games and/or
simulations and is designed to follow mathematical conventions, NOT
game programming conventions. Particularly it:

* Uses degrees.
* Draws in quadrant 1 (0-90 degrees).
* Right hand rule: 0 degrees is east, 90 is north, etc.

These allow simple things like Trigonometry functions to work as
expected. It means that all that stuff you were taught it grade school
still work as intended.

JRuby 9.2.4.0 Released!

JRuby 9.2.4.0 Released
Tuesday, November 13 2018

The JRuby community is pleased to announce the release of JRuby 9.2.4.0

- Homepage: <a href="http://www.jruby.org/" title="http://www.jruby.org/">http://www.jruby.org/</a>
- Download: <a href="http://www.jruby.org/download" title="http://www.jruby.org/download">http://www.jruby.org/download</a>

JRuby 9.2.x is our new major version of JRuby. It is expected to be
compatible with Ruby 2.5.x and stay in sync with C Ruby. JRuby 9.2.0.0 is
our first release for 2.5 support.

If you do find issues then report them on using our issue tracker at
<a href="http://bugs.jruby.org" title="http://bugs.jruby.org">http://bugs.jruby.org</a>. We also encourage users to join our IRC channel
(#jruby on Freenode) and mailing lists.

Installing Ruby (latest) on Mac Mojave--CoreFoundation/CFString.h not found

To whom it may concern,

I have tried to install Ruby--latest version (cloned from Github) and
2.5.3--using rbenv, rvm and even compiling the source code, but I got an
error, always the same. The error is as follows
`file.c:23:10: fatal error: 'CoreFoundation/CFString.h' file not found

#include <CoreFoundation/CFString.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~`

Would anybody help to solve this problem?

Best regards

P.S. I am not sure if this email is the right place to follow this kind of
problem, SIA.

Re: Ruby Quiz - Challenge #4 - Turn Humanitarian eXchange Language (HXL) Tabular Records into Named Tuples

Gerald Bauer wrote:
$ ruby ./lib/004.rb
Run options: --seed 28092
# Running:
.F
Finished in 0.005780s, 346.0336 runs/s, 346.0336 assertions/s.
1) Failure:
RubyQuizTest#test_level2 [/home/fjc/ruby-quiz/004/test.rb:71]:
--- expected
+++ actual
@@ -1 +1 @@
-[{"sector+en"=>"WASH", "subsector"=>"Subsector 1", "org"=>"Org 1",
"country"=>"Country 1", "sex+targeted"=>["100", "100"], "adm1"=>"Region
1"}, {"sector+en"=>"Health", "subsector"=>"Subsector 2", "org"=>"Org 2",
"country"=>"Country 2", "sex+targ

JRuby 9.2.3.0 Released

The JRuby community is pleased to announce the release of JRuby 9.2.3.0

- Homepage: <a href="http://www.jruby.org/" title="http://www.jruby.org/">http://www.jruby.org/</a>
- Download: <a href="http://www.jruby.org/download" title="http://www.jruby.org/download">http://www.jruby.org/download</a>

JRuby 9.2.x is our new major version of JRuby. It is expected to be
compatible with Ruby 2.5.x and stay in sync with C Ruby. JRuby 9.2.0.0 is
our first release for 2.5 support.

If you do find issues then report them on using our issue tracker at
<a href="http://bugs.jruby.org" title="http://bugs.jruby.org">http://bugs.jruby.org</a>. We also encourage users to join our IRC channel
(#jruby on Freenode) and mailing lists.

Ruby Quiz - Challenge #4 - Turn Humanitarian eXchange Language (HXL) Tabular Records into Named Tuples

Hello,

Let's honor the tradition and post a new Ruby Quiz [1] every Friday.
Here we go:

Challenge #4 - Turn Humanitarian eXchange Language (HXL) Tabular
Records into Named Tuples

Let's turn tabular data using the Humanitarian eXchange Language (HXL)
hashtag convention from array of array of strings
to array of named tuples (also known as hash dictionaries).

Aside: What's Humanitarian eXchange Language (HXL)?

Humanitarian eXchange Language (HXL) [2]
is a (meta data) convention for
adding agreed on hashtags e.g.

JRuby 9.2.2.0 released

The JRuby community is pleased to announce the release of JRuby 9.2.2.0

- Homepage: <a href="http://www.jruby.org/" title="http://www.jruby.org/">http://www.jruby.org/</a>
- Download: <a href="http://www.jruby.org/download" title="http://www.jruby.org/download">http://www.jruby.org/download</a>

JRuby 9.2.x is our new major version of JRuby. It is expected to be
compatible with Ruby 2.5.x and stay in sync with C Ruby. JRuby 9.2.0.0 is
our first release for 2.5 support.

If you do find issues then report them on using our issue tracker at
<a href="http://bugs.jruby.org" title="http://bugs.jruby.org">http://bugs.jruby.org</a>. We also encourage users to join our IRC channel
(#jruby on Freenode) and mailing lists.

csvhuman v0.1 - read tabular data in the CSV Humanitarian eXchange Language (HXL) format

Hello,

I've put together a first version of the csvhuman library / gem [1] that
adds support for the Humanitarian eXchange Language (HXL) to ruby
and lets you read tabular data in the
comma-separated values (CSV) with Humanitarian eXchange Language
(HXL) [2] hashtags format.

Questions and comments welcome.

[1] <a href="https://github.com/csvreader/csvhuman" title="https://github.com/csvreader/csvhuman">https://github.com/csvreader/csvhuman</a>
[2] <a href="https://github.com/csvspecs/csv-hxl" title="https://github.com/csvspecs/csv-hxl">https://github.com/csvspecs/csv-hxl</a>

Cheers.

Rack versions 1.6.11 and 2.0.6 have been released!

Hi everyone,

Rack versions 1.6.11 and 2.0.6 have been released.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

record library / gem v1.2 - named tuples / records with typed structs / schemas

Hello,

I've updated the (new) record library / gem [1] that lets you define
named tuples / records with typed structs / schemas. How?

Step 1: Define a (typed) struct for your records / named tuples.

Re: Ruby Quiz - Challenge #3 - Read the English Premier League (EPL) Standings Table from a Web Page

Gerald Bauer wrote:
$ ruby lib/003.rb
Run options: --seed 2712
# Running:
[["1", "Man City", "10", "8", "2", "0", "27", "3", "24", "26"],
["2", "Liverpool", "10", "8", "2", "0", "20", "4", "16", "26"],
["3", "Chelsea", "10", "7", "3", "0", "24", "7", "17", "24"],
["4", "Arsenal", "10", "7", "1", "2", "24", "13", "11", "22"],
["5", "Tottenham", "10", "7", "0", "3", "16", "8", "8", "21"],
["6", "Bournemouth", "10", "6", "2", "2", "19", "12", "7", "20"], ["7",
"Watford", "10", "6", "1", "3", "16", "12", "

Ruby Quiz - Challenge #3 - Read the English Premier League (EPL) Standings Table from a Web Page

Hello,

Let's honor the tradition and post a new Ruby Quiz [1] every Friday.
Here we go:

Challenge #3 - Read the English Premier League (EPL) Standings Table
from a Web Page [2]

Let's read the English Premier League (EPL) Standings Table
from a web page.

Ruby Quiz Adopts Code of Conduct - Be A Mensch.

Hello,

To help build a strong and welcoming community the (new) Ruby Quiz
[1] has adopted a code of conduct [2].

Happy ruby quiz time. Be a mensch. Cheers. Prost.

[1] <a href="https://github.com/planetruby/quiz" title="https://github.com/planetruby/quiz">https://github.com/planetruby/quiz</a>
[2] <a href="https://github.com/planetruby/quiz/blob/master/CODE_OF_CONDUCT.md" title="https://github.com/planetruby/quiz/blob/master/CODE_OF_CONDUCT.md">https://github.com/planetruby/quiz/blob/master/CODE_OF_CONDUCT.md</a>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Ruby Quiz #1 - Bonus - Three More Difficulty Levels (2, 3, 4) - Commas Inside Quotes and Double Up Quotes in Quotes, ...

Hello,

Thanks for the first three entries - all passing the level 1 test. Yay!

If that was too easy :-) I added three more difficulty levels
to the challenge.[1]
.

### Level 2 - Commas Inside Quotes and Double Up Quotes in Quotes

Let's turn Shakespeare's "literal" Hamlet quote:

```
Hamlet says, "Seems," madam! Nay it is; I know not "seems."
```

into

```
1, "Hamlet says, ""Seems,"" madam! Nay it is; I know not ""seems."""
```

And the test reads:

``` ruby
def test_parse_level2
records = [["1", "Hamlet says, \"Seems,\" madam!

active_record_doctor 1.6.0 - identify database issues before they hit production

Hi!

I'm pleased to announce the release of active_record_doctor 1.6.0.

Why the CSV standard library is broken (and how to fix it) Part VII or What's Your Type? Guess. Again. And Again. And Again. Guess What's a Schema For?

Hello,

I've written a new (and sevenths) episode on why the CSV standard
library is broken (and how to fix it).

The heart of the CSV standard library is the String#split kludge.

What else is dangerously simplistic and naive?

Let's have a look at the built-in type conversion [1].
Will it surprise you? Yes, it is broken, broken, broken. How? Why?

Questions and comments welcome. Cheers.

Why SPAs are usually a waste of time/money

Hey!

I'd like to share an article with you why SPAs are a bad architectural
choice from a business perspective 99% of the time.

<a href="https://www.gregnavis.com/articles/the-architecture-no-one-needs.html" title="https://www.gregnavis.com/articles/the-architecture-no-one-needs.html">https://www.gregnavis.com/articles/the-architecture-no-one-needs.html</a>

Thoughts?

Best regards
Greg Navis

Re: Ruby Quiz - Challenge #2 - Calculate the Bitcoin Genesis Block Hash (SHA-256)

$ ruby lib/002.rb
Run options: --seed 62016
# Running:
.
Finished in 0.002718s, 367.9076 runs/s, 367.9076 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips

$ cat lib/002.rb
require_relative '../002/test.rb'
require 'digest'
class RubyQuizTest
def calculate(v, p, m, t, b, n)
Digest::SHA256.digest(
Digest::SHA256.digest(
[v].pack('V') \
+ [p].pack('H*').reverse \
+ [m].pack('H*').reverse \
+ [t].pack('V') \
+ [b].pack('H*').reverse \

Re: Ruby Quiz is Back - Challenge #1 - Read Comma-Separated Values (CSV) from the "Real World"

$ ruby lib/1.rb
Run options: --seed 19056
# Running:
.
Finished in 0.002289s, 436.9176 runs/s, 436.9176 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips

$ cat lib/1.rb
require_relative '../test/1.rb'
class RubyQuizTest
def parse(text)
text.lines.map do |line|
next if line.match(/^\s*$|#/)
line.strip.split(/\s*,\s*/, -1)
end.compact.map do |cells|
cells.map do |cell|
cell.match(/"(.*)"/) ?

Ruby Quiz - Challenge #2 - Calculate the Bitcoin Genesis Block Hash (SHA-256)

Hello,

To kick start the new Ruby Quiz let's add another "real world" puzzle.

Challenge #2 - Calculate the Bitcoin Genesis Block Hash (SHA-256)

Let's calculate the classic bitcoin (crypto) block hash from scratch (zero).
Let's start with the genesis block, that is block #0
with the unique block hash id
`000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f`.

Note: You can search and browse bitcoin blocks using (online)
block explorers.

How to Speed up Your Tests without Touching the Code

Hey!

I found a nice way of speeding up your test suite (5x in my case) without
touching the code. I described it in an article you can see here:

<a href="https://www.gregnavis.com/articles/how-to-tune-your-database-to-make-tests-faster.html" title="https://www.gregnavis.com/articles/how-to-tune-your-database-to-make-tests-faster.html">https://www.gregnavis.com/articles/how-to-tune-your-database-to-make-tes...</a>

Best regards
Greg Navis

HexaPDF 0.8.0 - Support for box layouting

Hello everybody,

I have released the latest version of HexaPDF, a versatile PDF creation
and manipulation for Ruby. With HexaPDF you can manipulate existing PDF
documents (like merging PDF files, encrypting/decrypting/optimizing
them, changing parts of a PDF file, ...) and create new PDF documents
from scratch.

Details for this release:
<a href="https://hexapdf.gettalong.org/news/2018/hexapdf-0-8-0-box-layout.html" title="https://hexapdf.gettalong.org/news/2018/hexapdf-0-8-0-box-layout.html">https://hexapdf.gettalong.org/news/2018/hexapdf-0-8-0-box-layout.html</a>

Tl;dr:
This latest version adds the needed functionality to layout boxes on
a page inside a frame. Frames represent a rectangular area in which
boxes can be placed.

GTK3 ruby comboboxtext: remove text items

Hello,

I am using GTK3 ruby 2.5.

Why the CSV library is broken (Part VI) - or Fixes in Alternative CSV Libraries or Fast, Faster, Fasterer, Fastest

Hello,

I've written a new (and sixth) episode on why the CSV standard
library is broken (and how to fix it). Let's have a look at fixes
in alternative CSV libraries out there. [1]

The alternative listed are just a start - there are many more.
Any great alternative CSV libaries missing? Please, tell.

Also reprinted from the article (another) classic:

Unfortunately, the csv library is a dead horse.

Syndicate content