HNHacker News
TopNewBestAskShowJobs

geraldbauer

415 karma · joined July 20, 2015

submissionscomments
geraldbauer··on Types will be part of Ruby 3 stdlib source
Looking through the online docs. Here's another instead of:

   sig {params(new_value: T.nilable(Integer)).void}
... why not simply:

   sig Integer?                  # or
   sig [Option.of(Integer)]=>[]  # longest form in sruby
   sig [Integer?]=>[]            # same as Integer?
geraldbauer··on Types will be part of Ruby 3 stdlib source
For the "do not require" the type annotations / signatures so they can be lazy I would use / recommend a language pragma and not a block. Learn more about language pragmas (works kind like a pre-processor) :-) - https://github.com/s6ruby/pragmas I think you already have made-up your own "magic comments" / language pragma e.g. # type: true and so on.

> I'm not sure we'd make constants with unicode like > BigMap‹Address→Account› for generics, though, how do > you even type that? :)

I see you managed to type it! What's your secret? :-). By the way, you can use the alternate ASCII-style e.g. BigMap.of(Address=>Account).

geraldbauer··on Types will be part of Ruby 3 stdlib source
Instead of:

   sig {params(name: String).returns(Integer)}
... why not simply:

   sig [String]=>[Integer]
Yes, that's just ruby - see https://github.com/s6ruby/ruby-to-michelson/blob/master/cont... for example for live running code (in secure ruby) :-)
geraldbauer··on Sorbet: A fast, powerful type checker designed for Ruby
You're right of course.

Here's the official explanation from the RubyKaigi Sorbet Talk Slide:

- Philosophy: Make experience great - Slowly expand private beta - Mix of small, medium, and large codebases - Once the experience is good for a batch, ship it - Date: Summer 2019

Source: https://sorbet.run/talks/RubyKaigi2019/#/45

geraldbauer··on Types will be part of Ruby 3 stdlib source
FYI: You can add the missing Bool type today :-), use the safebool library / gem - https://github.com/s6ruby/safebool
geraldbauer··on Sorbet: A fast, powerful type checker designed for Ruby
Great inspiring project. Hopefully, open source soon. FYI: sruby - that is (secure) ruby[1] - is an alternative ruby (subset) with an alternative (optional) type annotation syntax e.g. Sorbet's `sig {params(x: Integer).returns(String)}` becomes `sig Integer => String` or `sig [Integer] => [String]`.

Note: Since the sig is "yes, it's just (regular) ruby" code you can create an alias for types e.g. I = Integer, S = String and than use sig I=>S, for example.

[1]: https://github.com/s6ruby

geraldbauer··on Types will be part of Ruby 3 stdlib source
The type signature in (secure) ruby [1] - an alternative ruby (subset) with type (optional) annotation - is `sig Integer => String` or `sig [Integer] => [String]. Since the sig is just ruby you can create an alias for types e.g. I = Integer, S = String and than use sig I=>S, for example. [1]: https://github.com/s6ruby
geraldbauer··on Types will be part of Ruby 3 stdlib source
FYI: For an alternative ruby (subset) with type annotations today see sruby, that is, secure ruby - https://github.com/s6ruby
geraldbauer··on The Rise of No Code
FYI: I've put together an Awesome No Code [1] page over on github. All about the Chief Digital Officer's (CDO) clicky-clicky-clicky dream future. No code. No text. No numbers. Goodbye, code monkeys! Hello, business architects!

[1]: https://github.com/bigkorupto/awesome-nocode

geraldbauer··on Wikibook-Bot – Automatic Generation of a Wikipedia Book
FYI: If you put a bunch of text files (with formatting in the markdown convention) in a folder, that is, a github repo and add _config.yml with the octobook-book-2018 remote theme you will get a book "automagically" build (and hosted on a content delivery network) all for free thanks to GitHub (Pages). See https://github.com/octobook and for more details the talk notes on octobook https://github.com/geraldb/talks/blob/master/octobook.md Cheers. Prost.
geraldbauer··on Using Web Technologies to Print a Book
FYI: As a (free, open source) alternative there's also octobook [1]. See the Yuki & Moto Press Bookshelf [2], for "real world" live examples using the octobook themes. [1]: https://github.com/octobook [2]: http://yukimotopress.github.io
geraldbauer··on Show HN: Markdeck – author cool slides, text-only, offline-ready, collaborative
FYI: Slideshow (S9) is another free (open source) alternative offering themes / template packs for reveal.js, bespoke.js, impress.js ("prezi-style"), s5, s6, shower, and more. See http://slideshow-s9.github.io and https://github.com/slideshow-templates
geraldbauer··on “In 2018 the blockchain/decentralization story fell apart”
FYI: I've collected the best of tweets from two top crypto / blockchain critics. See Best of Bitcoin Maximalist - Scammers, Morons, Clowns, Shills & BagHODLers - Inside The New New Crypto Ponzi Economics [1] by Trolly McTrollface and Crypto Facts - Decentralize Payments - Efficient, Low Cost, Fair, Clean - True or False? [2] by Nouriel Roubini

[1]: https://bitsblocks.github.io/bitcoin-maximalist [2]: https://bitsblocks.github.io/crypto-facts

geraldbauer··on FizzBuzz in ten languages
Fast. Faster. Fastest. The FizzBuzz Gold Standard. Lookup pre-calculated ("hard coded") constants. Don't over-engineer :-):

    def fizzbuzz
       [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14,
  "FizzBuzz", 16, 17, "Fizz", 19, "Buzz", "Fizz", 22, 23, "Fizz", "Buzz", 26,
  "Fizz", 28, 29, "FizzBuzz", 31, 32, "Fizz", 34, "Buzz", "Fizz", 37, 38,
  "Fizz", "Buzz", 41, "Fizz", 43, 44, "FizzBuzz", 46, 47, "Fizz", 49, "Buzz",
  "Fizz", 52, 53, "Fizz", "Buzz", 56, "Fizz", 58, 59, "FizzBuzz", 61, 62,
  "Fizz", 64, "Buzz", "Fizz", 67, 68, "Fizz", "Buzz", 71, "Fizz", 73, 74,
  "FizzBuzz", 76, 77, "Fizz", 79, "Buzz", "Fizz", 82, 83, "Fizz", "Buzz", 86,
  "Fizz", 88, 89, "FizzBuzz", 91, 92, "Fizz", 94, "Buzz", "Fizz", 97, 98,
  "Fizz", "Buzz"]
    end
Source: https://yukimotopress.github.io/fizzbuzz#gold-standard
geraldbauer··on FizzBuzz in ten languages
FYI: I compiled a free (online) anthology / book about FizzBuzz titled "FizzBuzz (1, 2, Fizz, 4, Buzz,...) by Example - There's More Than One Way To Do It" [1]. Note, all examples are in ruby. Enjoy. Happy new year. Cheers. Prost. [1]: https://yukimotopress.github.io/fizzbuzz
geraldbauer··on Portable Text – JSON rich text specification for content editing platforms
The past, present and future of (portable) text is text. No need for wrapping your text in JavaScript Object Notation (JSON) :-) really. Keep it simple. See https://github.com/mundimark/why-text or https://github.com/officetxt/awesome-txt and others :-).
geraldbauer··on The little black book of scams (2016)
I'm the author / editor. Done. Works now with Github pages too. Cheers. Prost.
geraldbauer··on The little black book of scams (2016)
I'm the author. Why not a blog post? The idea is that the page is not frozen / done and gets updated (from time-to-time) and, yes, you (in theory) can contribute too. In practice doesn't really happen.
geraldbauer··on The little black book of scams (2016)
FYI: I've put together an Awesome Initial Coin Offerings (ICO) Truths page. Subtitled The Art of the Steal - The Scammers' Big Lies at https://github.com/openblockchains/awesome-ico-truths . Buyer beware! Cheers. Prost.
geraldbauer··on Ask HN: Any ICO that actually delivers what it promises?
FYI: A while ago I put together an Awesome Initial Coin Offerings (ICO) Truths page - https://github.com/openblockchains/awesome-ico-truths All about the Art of the Steal. Cheers. Prost.

PS: A different take is the "Get Rich Quick "Business Blockchain" Bible - The Secrets of Free Easy Money" (Yes, Free Online Booklet) - https://bitsblocks.github.io/get-rich-quick-bible

geraldbauer··on Medium is a poor choice for blogging
FYI: Instead of the "old / out-dated" Jekyll Now setup by Barry Clark (before packaged themes arrived on GitHub Pages) - you can use the Minima theme (default) and get started in 60 seconds. See Hello, Minima! Theme - Get Started in 60 Seconds @ https://github.com/henrythemes/hello-minima-theme as a ready-to-fork (live) example.

PS: For more ready-to-fork (open source) themes for GitHub pages, see the Dr Jekyll Themes directory / listing (200+ and counting) @ http://drjekyllthemes.github.io

geraldbauer··on Fifty Fizzbuzzes
FYI: You find 20+ in the FizzBuzz by Example - There's More Than One Way To Do It (Free Online Book Edition) - http://yukimotopress.github.io/fizzbuzz
geraldbauer··on Why There Will Never Be Another Red Hat: The Economics of Open Source (2014)
Just a reminder: Never say never. Of course, there will never be another Amadeus Mozart too (in that sense of the word). Greetings from Austria.
geraldbauer··on Show HN: Flexible command line tool to create graphs from CSV data
Awesome. FYI: Find more more CSV tools at the Awesome CSV pages https://github.com/secretGeek/awesomecsv and https://github.com/csvspecs/awesome-csv Cheers. Prost.
geraldbauer··on CSV 1.1 – CSV Evolved (for Humans)
Good point. You're not the first one (even in this thread). To repost:

See the CSVJSON format - http://csvjson.org - Love it. I will add a new variant called CSV <3 JSON shortly to the CSV 1.1 repo and csvreader etc. too.

geraldbauer··on CSV 1.1 – CSV Evolved (for Humans)
The goal of the project is to improve CSV :-) - it's in the title e.g. CSV Evolved and in the version 1.1 (that is, it's not version 2.0). It's about not breaking things - it's about small changes (mostly) for humble humans (not machines).

It's NOT about one universal csv format and the ultimate specification to settle the matter until the end of history etc.

Thanks for the detailed suggestions. I see your points. I appreciate your helpfulness.

geraldbauer··on CSV 1.1 – CSV Evolved (for Humans)
The [strict] RFC 4180 CSV Format memo is way too simplistic and "specifies" a format for machine-reading and writing. It's not a human csv format. What's human? It's a format that you hand edit and so on - thus, you want comments, blank lines, short cuts etc.

Just for the record to quote from the memo:

This memo provides information for the internet community. IT DOES NOT SPECIFY AN INTERNET STANDARD OF ANY KIND. IT DOES NOT SPECIFY AN INTERNET STANDARD OF ANY KIND. IT DOES NOT SPECIFY AN INTERNET STANDARD OF ANY KIND.

Just repeating it three times in case you missed it, see https://www.ietf.org/rfc/rfc4180.txt

geraldbauer··on CSV 1.1 – CSV Evolved (for Humans)
No worries. Thanks for highlighting WSL - whitespace separated literals. The world needs more of this. Keep it up.
geraldbauer··on CSV 1.1 – CSV Evolved (for Humans)
No worries. It's just a write-up for what gets used in football.db, beer.db, world.db, etc. day in, day out. Also remember - as the say it's never too late :-).

[1] https://github.com/openfootball [2] https://github.com/openmundi [3] https://github.com/openbeer

geraldbauer··on CSV 1.1 – CSV Evolved (for Humans)
I think you don't understand :-). A specification doesn't always have to be complicated, that's the point. I'm all for tech notes with all the details. Here's a challenge for you - write a csv parser - I know - it's a daunting task. For inspiration, here's an example from your humble self - https://github.com/csv11/csvreader
← PreviousPage 4 of 9Next →