I am not addressing migration/compatibility in this post. This is addressed in the documents linked in 'previous context'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>GitHub Issues Fetcher</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "F", function() | |
local app = hs.application'firefox' | |
if app ~= nil then | |
app:activate() | |
end | |
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= anObject | |
self isIterable & anObject isIterable | |
ifTrue: [ ^ value = anObject value ]. | |
self class = anObject class | |
ifFalse: [ ^ false ]. | |
^ value = anObject value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Segmentation fault Tue Sep 5 19:23:15 2017 | |
/home/wilfred/Downloads/pharo6.1-64/bin/lib/pharo/5.0-201707201942/pharo | |
Pharo VM version: 5.0-201707201942 Thu Jul 20 20:40:54 UTC 2017 gcc 4.6.3 [Production Spur 64-bit VM] | |
Built from: CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017 | |
With: StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017 | |
Revision: VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $ Plugins: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ | |
Build host: Linux testing-gce-74d10329-bbfd-42e5-8995-b0e3a68c73cb 3.13.0-115-generic #162~precise1-Ubuntu SMP Fri Mar 24 16:47:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux | |
plugin path: /home/wilfred/Downloads/pharo6.1-64/bin [default: /home/wilfred/Downloads/pharo6.1-64/bin/lib/pharo/5.0-201707201942/] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
whileMatches: aStream do: aBlock | |
"Execute block, passing in this instance, for every match in stream. | |
Be extra careful about successful matches which consume no input. | |
After those, make sure to advance or finish if already at end." | |
| wholeMatch reachedEnd | | |
reachedEnd := false. | |
[ self searchStream: aStream ] | |
whileTrue: [ wholeMatch := self subexpression: 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def attach_dyn_prop(instance, prop_name, prop_fn): | |
"""Attach prop_fn to instance with name prop_name. | |
Assumes that prop_fn takes self as an argument. | |
Reference: https://stackoverflow.com/a/1355444/509706 | |
""" | |
class_name = instance.__class__.__name__ + 'Child' | |
child_class = type(class_name, (instance.__class__,), {prop_name: property(prop_fn)}) |
We want to port Remacs to use a regex crate implemented in Rust. The Rust implementations are highly optimised, and this would simplify the Remacs codebase.
The two major crates are Rust’s regex crate, and the fancy-regex crate.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; dashtest2.el --- benchmarking dash -*- lexical-binding: t -*- | |
(defun -first-item-fn (lst) | |
(car lst)) | |
(defalias '-first-item-alias 'car) | |
(defun wh/benchmark () | |
(interactive) | |
(let ((items (-repeat 20 'foo))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; given 1, how do we calculate 3? | |
(length (key-description (char-to-string 1))) | |
(length (key-description (string 1))) | |
(1+ (1+ 1)) | |
(length (number-to-string (ftruncate 1))) | |
(length (number-to-string (fround 1))) | |
(length (number-to-string (ffloor 1))) | |
(length (number-to-string (fceiling 1))) | |
(length (number-to-string (float 1))) | |
(length (number-to-string (sqrt 1))) |
NewerOlder