Skip to content

Instantly share code, notes, and snippets.

Compiling diesel_ltree v0.1.0 (file:///Users/kivikakk/kivikakk/diesel_ltree)
error[E0277]: the trait bound `functions::ltree2text_t<functions::lca_t<diesel::expression::bound::Bound<diesel::types::Array<types::Ltree>, std::vec::Vec<functions::text2ltree_t<diesel::expression::bound::Bound<diesel::types::Text, &str>>>>>>: diesel::query_builder::Query` is not satisfied
--> src/tests.rs:92:5
|
92 | LoadDsl::load(ltree2text(lca(vec![text2ltree("1.2.2.3"), text2ltree("1.2.3")])), &connection);
| ^^^^^^^^^^^^^ the trait `diesel::query_builder::Query` is not implemented for `functions::ltree2text_t<functions::lca_t<diesel::expression::bound::Bound<diesel::types::Array<types::Ltree>, std::vec::Vec<functions::text2ltree_t<diesel::expression::bound::Bound<diesel::types::Text, &str>>>>>>`
|
= note: required because of the requirements on the impl of `diesel::query_builder::AsQuery` for `functions::ltree2text_t<functions::lca_t<diesel::expression::bound::Bound<diesel::types::Array<types::Ltree>, s
@kivikakk
kivikakk / test.rs
Last active October 19, 2017 15:14
Compiling diesel_ltree v0.1.0 (file:///Users/kivikakk/kivikakk/diesel_ltree)
error[E0599]: no method named `load` found for type `diesel::query_builder::SelectStatement<tests::my_tree::table, diesel::query_builder::select_clause::SelectClause<functions::ltree2text_t<functions::lca_t<diesel::expression::bound::Bound<diesel::types::Array<types::Ltree>, std::vec::Vec<_>>>>>>` in the current scope
--> src/tests.rs:65:10
|
65 | .load::<String>(&connection)
| ^^^^
|
= note: the method `load` exists but the following trait bounds were not satisfied:
`_ : diesel::query_builder::QueryId`
`_ : diesel::query_builder::QueryId`
@kivikakk
kivikakk / verify.rb
Created August 10, 2017 03:11
sourcepos verifier
#!/usr/bin/env ruby
require 'nokogiri'
doc = File.read(ARGV[0]).split("\n")
xml = Nokogiri::XML(`build/src/cmark-gfm -t xml --sourcepos #{ARGV[0]}`)
xml.css('text, code').each do |el|
from, to = el['sourcepos'].split('-').map {|r| r.split(':').map(&:to_i)}
if from[0] != to[0]
>> e = Enumerator.new do |y|
?> y << 1
>> y << 2
>> sleep 10
>> y << 3
>> end
=> #<Enumerator: #<Enumerator::Generator:0x007ffcd3801100>:each>
>> puts Time.now; puts e.take(1).to_a; puts Time.now
2017-06-15 18:56:15 +1000
1
  1. Hi.

Hello.

Process 4788 stopped
* thread #1: tid = 0xe08a, 0x000000010020dceb Emacs`assq_no_quit(key=153323200, list=4332169555) + 107 at fns.c:1451, stop reason = sign
al SIGSTOP
frame #0: 0x000000010020dceb Emacs`assq_no_quit(key=153323200, list=4332169555) + 107 at fns.c:1451
1448 {
1449 while (CONSP (list)
1450 && (!CONSP (XCAR (list))
-> 1451 || !EQ (XCAR (XCAR (list)), key)))
1452 list = XCDR (list);
1453
Process 3647 stopped [21/4323]
* thread #1: tid = 0x5e96, 0x000000010011030a Emacs`assq_no_quit + 13, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x000000010011030a Emacs`assq_no_quit + 13
Emacs`assq_no_quit:
-> 0x10011030a <+13>: movq 0x5(%rsi), %rsi
0x10011030e <+17>: movl %esi, %ecx
0x100110310 <+19>: andl $0x7, %ecx
0x100110313 <+22>: movl $0x0, %eax
Executable module set to "/usr/local/Cellar/emacs-plus/25.1/Emacs.app/Contents/MacOS/Emacs".
--- /Users/kivikakk/.emacs.d/core/templates/.spacemacs.template 2016-10-12 18:13:15.000000000 +1100
+++ .spacemacs 2016-10-16 18:50:32.000000000 +1100
@@ -36,11 +36,16 @@
;; Uncomment some layer names and press <SPC f e R> (Vim style) or
;; <M-m f e R> (Emacs style) to install them.
;; ----------------------------------------------------------------
- helm
- ;; auto-completion
- ;; better-defaults
+ auto-completion
[alias]
# Note that that /w$/ variants tend to be those *without* -w. Same for
# /n$/ variants where appropriate.
s = status -sb
h = show -w
hs = show --stat
h1 = show -w HEAD~1
h2 = show -w HEAD~2
h3 = show -w HEAD~3
h4 = show -w HEAD~4

B: Yeah, the doctor said it would never grow back, but I mean, I've got a good few inches there now.
L: Well it still tastes the same to me, so …
B: Yeah, I've not been able to notice the difference either.
B: Do you like coffee?
L: I love coffee.
B: Oh, you like coffee, do you?
L: Big fan.
B: Tsk — you, you're a bit of a fan of coffee?
L: Coffee fan!
B: Are you a fan of coffee?