Archive for the ‘Ruby’ Category
Posted by jpluimers on 2019/08/20
After blogging on Markdown notes in 2014, Markdown support has come a long way. It also means that the documents written in Markdown has become more complex, and that more tools can render it.
Given the vague aspects of many Markdown dialects, rendering can be troublesome (see my post Babelmark 2 online Markdown checker), so below are some links on some aspects I had trouble with getting right.
Note that there are two markdown linters:
Sometimes, issues are present in one, but not in the other; see:
The command line interface to the Ruby version is easier to install than the JavaScript version as everything is in one gem: mdl, unlike the npm, where the cli is in markdown-cli and the library in markdownlint.
–jeroen
Related:
Read the rest of this entry »
Posted in *nix, *nix-tools, Development, Lightweight markup language, MarkDown, pandoc document converter, Power User, Ruby, Software Development | Leave a Comment »
Posted by jpluimers on 2018/09/25
This is about Ruby anti-patterns, which is a good step to start investigating the own anti-patterns you use in your own development environment:
[WayBack] How not to structure your database-backed web applications: a study of performance bugs in the wild | the morning paper
How not to structure your database-backed web applications: a study of performance bugs in the wild Yang et al., ICSE’18 This is a fascinating study of the problems people get into when using…
Via: [WayBack] How not to structure your database-backed web applications: a study of performance bugs in the wild… – Adrian Marius Popa – Google+
–jeroen
Posted in Design Patterns, Development, Ruby, Software Development | Leave a Comment »
Posted by jpluimers on 2018/06/21
Very often, I see people ask for how to embed multi-line strings in a Delphi source file.
The short answer is: you can’t.
The long answer is: you can’t and if you want you have to hack your way around.
The answer should be: just like any of these languages that do support multiline strings:
- Python
- JavasScript
- Ruby
- C#
Many languages support this through a feature called HEREDOC.
Now in Delphi and other languages like Java are building ugly workarounds like for instance this one: [WayBack] RAD Studio Tip: Using resource scripts to organize project dependencies. – Chapman World.
–jeroen
Posted in .NET, C#, Delphi, Development, JavaScript/ECMAScript, Python, Ruby, Scripting, Software Development | 17 Comments »
Posted by jpluimers on 2017/12/07
Ah, C. The best lingua franca we have… because we have no other lingua francas. Linguae franca. Surgeons general? C is fairly old — 44 years, now! — and comes from a time when there were possibly more architectures than programming languages. It works well for what it is, and what it is is a relatively simple layer of indirection atop assembly. Alas, the popularity of C has led to a number of programming languages’ taking significant cues from its design, and parts of its design are… slightly questionable. I’ve gone through some common features that probably should’ve stayed in C and my justification for saying so. The features are listed in rough order from (I hope) least to most controversial. The idea is that C fans will give up when I call it “weakly typed” and not even get to the part where I rag on braces. Wait, crap, I gave it away.
Great re-read towards the end of the year: [WayBack] Let’s stop copying C / fuzzy notepad
Via: [WayBack] Old and busted: emacs vs vi. New and hot: Language war, everybody against everybody else. – Kristian Köhntopp – Google+
–jeroen
Posted in .NET, APL, Awk, bash, BASIC, C, C#, C++, COBOL, CoffeeScript, CommandLine, D, Delphi, Development, F#, Fortran, Go (golang), Java, Java Platform, JavaScript/ECMAScript, Pascal, Perl, PHP, PowerShell, PowerShell, Python, Ruby, Scala, Scripting, Software Development, TypeScript, VB.NET, VBScript | 3 Comments »
Posted by jpluimers on 2017/11/06
Steps:
- Install the Ruby Installer from rubyinstaller.org/downloads
- Add the directory where Ruby got installed to the user PATH (using
"%windir%\System32\rundll32.exe" sysdm.cpl,EditEnvironmentVariables) in my case C:\Ruby23\bin as I installed Ruby 2.3.1
- Install the CA certificates:
- Download https://curl.haxx.se/ca/cacert.pem to the Ruby directory (
C:\Ruby32)
- Add the environment variable
SSL_CERT_FILE with value C:\Ruby23\cacert.pem (again using "%windir%\System32\rundll32.exe" sysdm.cpl,EditEnvironmentVariables).
If you forget step 3, then you get errors like this:
C:\Users\jeroenp>gem install gist
ERROR: Could not find a valid gem 'gist' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
C:\Users\jeroenp>gem update --system
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
–jeroen
References
Posted in Development, Ruby, Software Development | Leave a Comment »
Posted by jpluimers on 2017/11/03
Via [WayBack] Graph of programming languages influence poster – nice gift idea for programmers… – This is why I Code – Google+:
A network graph with more than a thousand programming languages connected by influence relations. Highly influential languages like Lisp, Smalltalk, C, Java, Pascal, C++, Haskel or Python are shown as larger circles as compared to languages with little influence on others like PHP or Argh!. / The influence relation data was retrieved from Freebase in 2013. This design available on posters and other products. An awesome gift for programmers who are into digital art. • Also buy this artwork on wall prints, apparel, kids clothes, and more.
[WayBack] “Network Graph of Programming Language Influence – White Background” Posters by ramiro | Redbubble
I wonder how they drew the relations and why certain languages are in certain places.
--jeroen
Read the rest of this entry »
Posted in C, C++, COBOL, Development, Haskell, Java, Java Platform, JavaScript/ECMAScript, LISP, Pascal, Perl, PHP, Python, Ruby, Scripting, Smalltalk, Software Development, Turbo Prolog | Leave a Comment »
Posted by jpluimers on 2017/11/02
Quoted in full because even 2.5 years later, it’s just too funny:
- Python: What if everything was a dict?
- Java: What if everything was an object?
- JavaScript: What if everything was a dict *and* an object?
- C: What if everything was a pointer?
- APL: What if everything was an array?
- Tcl: What if everything was a string?
- Prolog: What if everything was a term?
- LISP: What if everything was a pair?
- Scheme: What if everything was a function?
- Haskell: What if everything was a monad?
- Assembly: What if everything was a register?
- Coq: What if everything was a type/proposition?
- COBOL: WHAT IF EVERYTHING WAS UPPERCASE?
- C#: What if everything was like Java, but different?
- Ruby: What if everything was monkey patched?
- Pascal: BEGIN What if everything was structured? END
- C++: What if we added everything to the language?
- C++11: What if we forgot to stop adding stuff?
- Rust: What if garbage collection didn’t exist?
- Go: What if we tried designing C a second time?
- Perl: What if shell, sed, and awk were one language?
- Perl6: What if we took the joke too far?
- PHP: What if we wanted to make SQL injection easier?
- VB: What if we wanted to allow anyone to program?
- VB.NET: What if we wanted to stop them again?
- Forth: What if everything was a stack?
- ColorForth: What if the stack was green?
- PostScript: What if everything was printed at 600dpi?
- XSLT: What if everything was an XML element?
- Make: What if everything was a dependency?
- m4: What if everything was incomprehensibly quoted?
- Scala: What if Haskell ran on the JVM?
- Clojure: What if LISP ran on the JVM?
- Lua: What if game developers got tired of C++?
- Mathematica: What if Stephen Wolfram invented everything?
- Malbolge: What if there is no god?
–jeroen
Read the rest of this entry »
Posted in .NET, APL, Assembly Language, BASIC, C, C#, C++, COBOL, Development, EPS/PostScript, Fun, Go (golang), Java, Java Platform, JavaScript/ECMAScript, LISP, Makefile, Pascal, Perl, PHP, Python, Quotes, Ruby, Rust, Scala, Scripting, Smalltalk, Software Development, T-Shirt quotes, TCL, Turbo Prolog, VB.NET, Visual BASIC, XML/XSD, XSLT | Leave a Comment »
Posted by jpluimers on 2017/09/20
Once you learn that shift/unshift are like push/pop on the other end of the array, you can mentally drop the ‘f’ from the name of the methods to remember which one ‘dumps’ elements and which one ‘inserts’ them. :)
Source: What Does Ruby’s Array#shift do? – Stack Overflow [WayBack]
Via: Originally shared by This is why I Code
Posted in Development, Fun, Ruby, Software Development | Leave a Comment »
Posted by jpluimers on 2016/12/30
When you ship OpenSSL DLLs, you should provide an update mechanism outside of your regular product cycle that updates these shortly after vulnerabilities are fixed.
Few if any products do that. So I made an overview from products and OpenSSL DLL versions I had installed on various systems.
I’m a developer, so the list is biased towards tools I use often.
All of them are vulnerable: [WayBack] https://www.openssl.org/news/vulnerabilities.html
- 1.0.2.h by ContinuaCI 1.8.1.185 PostgreSQL and Avast 12.3
- 1.0.2.g by SourceTree 1.9.x embedded git_local
- 1.0.2d by Git for Windows 2.6.1
- 1.0.2a by SQLite browser 3.7.0
- 1.0.1m by Delphi 10.0 Seattle
- 1.0.1l by Ruby 2.3
- 1.0.1f by SlikSvn 1.8.5
- 1.0.1g by Delphi XE8, Delphi XE7, VMware Workstation OVF tool and Adobe Creative Cloud 2.8.1
- 1.0.0g by Delphi XE6, Delphi XE5, Delphi XE4, Delphi XE3, Appmethod 1.13 and CollabNet SVN Client 1.7.5
- 1.00d by MarkdownPad 2
- 1.0.0 by FinalBuider 7 XE2 and FinalBuilder 7 EE
- 0.9.8za by VMware Remote Console Plug-in 5.1 and VMware Virtual Infrastructure Client 5.1
- 0.9.8y by VMware VIX Workstation 10
- 0.9.8t by Veaam Backup and Replication
- 0.9.8r by ContinuaCI 1.8.1.185 hg support, VMware VIX and VMware Workstation 8.0.2
- 0.9.8q by Veeam Backup Transport, Veaam Backup, xampp 1.7.4 and Replication and VMware Virtual Infrastructure Client 5.0
- 0.9.8o by xampp 1.7.4
- 0.9.8l by xampp 1.7.4
- 0.9.8n by Delphi XE2, Delphi XE and VMware VIX Workstation 7.1.0
- 0.9.8m by VMware VMRC Plug-in, VMware VIX and VMware Workstation 8.0.2
- 0.9.8i by VMware Virtual Infrastructure Client 4.1
- 0.9.8d by Database Workbench Pro 4.4.3, Database Workbench Pro 5.2.4 and VMware vSphere CLI Perl
- 0.9.8b by Adobe Creative Suite 5
- 0.9.7m by VMware VIX server 1.0.9
- 0.9.7l by VMware VIX VIServer 2
- N/A by Adobe Create Suite 5 and VMware VIX server 1
–jeroen
via: [WayBack] Does Delphi installer install OpenSSL dll’s?
PS: Below some Software Archeology related links in the comments.
Posted in .NET, CollabNet, Delphi, Development, DVCS - Distributed Version Control, git, OpenSSL, Power User, Ruby, Security, Software Development, Source Code Management, SourceTree, Subversion/SVN | 7 Comments »