Skip to content

Instantly share code, notes, and snippets.

Advanced SQL
<https://www.slideshare.net/MarkusWinand/modern-sql?ref=https://modern-sql.com/slides>
slide 3: `LATERAL`
slide 12: `GROUPING SETS`
slide 19: `WITH`
slide 45: `WITH RECURSIVE`
slide 71: `FILTER`
slide 75: `PARTITION BY`, `OVER` (/`OVER ORDER BY`)
slide 105: `WITHIN GROUP`
[20:57:31] <Ven``> we have (potentially) a lot to discuss. Should we start by bikeshedding, discussing viable implementations, ..?
[20:59:05] <rhendric> Not sure those conversations are separable. Implementation should inform design at least somewhat. Maybe we should start with goals?
[20:59:20] <Ven``> OK, fair enough.
[20:59:37] <rhendric> As in, is this the beginning of an eventual full support of types in Flow and/or TypeScript format?
[20:59:46] <rhendric> Is this a stopgap measure to make things a little more usable?
[21:00:03] <rhendric> Something else or in between?
[21:00:24] <Ven``> Definitely full support. Though not necessarily in the very beginning.
[21:00:57] <Ven`> I don't mind if I don't get e.g. object types and class types in the early beginning.
[21:01:03] <Ven`> Inference itself would help alleviate that
[21:01:31] <rhendric> Ideally, yes.
@vendethiel
vendethiel / Commentated.scala
Last active May 26, 2020 11:02 — forked from SystemFw/Lib.scala
Shapeless: derive Slick's GetResult for arbitrary case classes
import slick.jdbc.{GetResult, PositionedResult}
import scala.annotation.implicitNotFound
import scala.reflect.runtime.universe.TypeTag
/**
* A type class that allows the user of GenericGetResult to support their own type.
* This is mostly used to support `newtype`s (like wrappers around UUIDs).
*
* A user just has to use the helper to make the type known to GenericGetResult.
CREATE TABLE `phpbb_notifications` (
notification_id INT NOT NULL AUTO_INCREMENT,
notification_type INT NOT NULL,
notification_user_id INT NOT NULL COMMENT 'user id receiving notification',
notification_date DATE COMMENT 'when happened the notification',
notification_data TEXT COMMENT 'JSON of the data (title of post, or whatever)',
notification_trigger_user INT COMMENT '(May be) the user who triggered the notification',
notification_read TINYINT COMMENT 'Was the notification read?'
);
.global _start
.text
_start:
pushq %rbp
movq %rsp, %rbp
movabsq $str1, %rdi
movabsq $str2, %rsi
#movl $str2_size, %ecx
# models
class Models
constructor: (@db) ->
channel: (name) -> new Channel(@db, name)
# channel
class Channel
constructor: (@db) ->
my @a = ('99 bottles', 'take one down', '98 bottles');
for @a {
say "$^a of beer on the wall, $^a of beer.$^b, $^c of beer on the wall.".tc;
}
my @b = ('99 bottles', 'take one down', '98 bottles'), ('98 bottles', 'take one down', '97 bottles');
say @b.perl;
for @b {
say "$^a of beer on the wall, $^a of beer.$^b, $^c of beer on the wall.".tc;
}
@vendethiel
vendethiel / console-snippet.js
Created October 7, 2015 08:38
All my languages are belong to my repos
// distinct names of the languages you have github repos in
// use it on github.com/NAME?tab=repositories
var xs = [];
Array.prototype.slice.call($$('.repo-list-stats'))
.map(function (x) { return x.innerHTML.split(/\s+/)[1] })
.filter(function (x) {
if (~xs.indexOf(x) || x[0] == '<') return false;
xs.push(x);
return true;
});
@vendethiel
vendethiel / aom.json
Last active August 29, 2015 14:23
aom!1
[
{
"name":"Greeks",
"gods": [
{
"name":"Zeus",
"excerpt": "Zeus is the god of weather, with lightning, thunder, rain, and thunderstorms attributed to him. Later he became associated with justice and the law."
},
{
"name":"Hades",
@vendethiel
vendethiel / gist:02b7fc9684c67b786ed8
Created May 23, 2015 10:09
debugger::ui::commandline
Unhandled exception: ctxlexpad needs an MVMContext
at src/gen/m-CORE.setting:13040 (./perl6/rakudo/install/share/perl6/runtime/CORE.setting.moarvm::33)
from src/gen/m-CORE.setting:13151 (./perl6/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:AT-KEY:95)
from src/gen/m-CORE.setting:3756 (./perl6/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:postcircumfix:<{ }>:30)
from lib/Debugger/UI/CommandLine.pm:735 (./perl6/rakudo/install/share/perl6/site/lib/Debugger/UI/CommandLine.pm.moarvm::82)
from src/gen/m-CORE.setting:10092 (./perl6/rakudo/install/share/perl6/runtime/CORE.setting.moarvm::558)
from src/gen/m-CORE.setting:10015 (./perl6/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:reify:58)
from src/gen/m-CORE.setting:9931 (./perl6/rakudo/install/share/perl6/runtime/CORE.setting.moarvm::95)
from src/gen/m-CORE.setting:9927 (./perl6/rakudo/install/share/perl6/runtime/CORE.setting.moarvm::229)
from src/gen/m-CORE.setting:9901 (./perl6/rakudo/install/share/perl6/runtime/CORE