This file contains hidden or 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
* What is the Philadelphia JS club? (Joe) | |
* Brief intros, what are you working on, what are you excited about? | |
* Let's talk about deno and bun | |
* Let's watch "10 Things I Regret About Node.js" by Ryan Dahl and talk about it https://www.youtube.com/watch?v=M3BM9TB-8yA | |
* Show and tell | |
* Social hour: move to the Disco room and hang out and chat |
This file contains hidden or 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
for (let radix = 2; radix <= 36; radix++) { | |
const results = {}; | |
for (let count = 0; count < 10000; count++) { | |
const res = Number(String(Math.random()).slice(2)) * Number(String(Math.random()).slice(2)); | |
const lead = res.toString(radix).slice(0, 1); | |
if (!results[lead]) { | |
results[lead] = 1; | |
} else { | |
results[lead] += 1; | |
} |
This file contains hidden or 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
: FIZZBUZZ (n -- ) | |
0 DO | |
I 1 + 15 MOD 0 = IF | |
." fizzbuzz " CR ELSE | |
I 1 + 5 MOD 0 = IF | |
." buzz " CR ELSE | |
I 1 + 3 MOD 0 = IF | |
." fizz " CR ELSE | |
I 1 + . CR | |
THEN THEN THEN LOOP ; |
This file contains hidden or 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
/* This is a template to make sure that the chart.js library is available as a global object wherever it is invoked. | |
* See https://devhints.io/umdjs | |
*/ | |
/* Let's start by defining an IIFE with two parameters — the global context and our library. The missing docblock for | |
* this function would read something like "Checks the runtime environment and adds callback 'factory' (our code) to | |
* the application context 'global' (this). This is necessary to make sure our function is always available to be | |
* invoked as a new Chart(), regardless of where it's run or how it's imported." | |
*/ | |
(function (global, factory) { |
This file contains hidden or 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 doituntildone(data, letter, number, answer): | |
data = int(data) | |
if data >= number: | |
answer += letter | |
data = data - number | |
print('attempting recursion ' + str([data, letter, number, answer])) | |
# I was incorrectly assuming the following line would work: | |
# doituntildone(str(data), letter, number, answer) | |
data, answer = doituntildone(str(data), letter, number, answer) | |
# print([data, answer]) |
This file contains hidden or 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
"""Alright, so it's pretty common knowledge that unicode and python just don't get along. Especially on OS X, apparently? | |
Separating out the sort function from the actual database that you're working with is, in my opinion, an elegant solution, | |
though maybe bad in big-O terms. Anyway, there are a few good options online, but if you don't want to install any libraries | |
(here, I need this particular function to be hyper-portable), you have to consider a lot of different circumstances. | |
Part of this function (the part that actually does something) comes from here: | |
http://stackoverflow.com/questions/2700859/how-to-replace-unicode-characters-by-ascii-characters-in-python-perl-script-giv""" | |
# be sure to import unicodedata |