Minutes 2024-11-14: Difference between revisions
Jump to navigation
Jump to search
(initial commit) |
m (added link for Chomsky hierarchy) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
# Came from RedTeam meeting on LLM jailbreaking |
# Came from RedTeam meeting on LLM jailbreaking |
||
## |
## We won cool stickers! |
||
## LUG stickers #soon |
## LUG is getting stickers #soon |
||
# Ron's talk on Regex! |
# Ron's talk on Regex! |
||
## What is an alphabet |
## What is an alphabet |
||
## Strings are a '''finite''' series of characters |
## Strings are a '''finite''' series of characters |
||
### We typically use "w" to represent strings, for "word" |
### We typically use "w" to represent strings, for "word" |
||
### |
### Lambda (<code>λ</code>) = empty string |
||
## Languages are represented by "L" |
## Languages are represented by "L" |
||
## Machine takes strings (''w'') and determines if it's in the language (''L'') |
## Machine takes strings (''w'') and determines if it's in the language (''L'') |
||
Line 14: | Line 14: | ||
### <code>∅</code> = empty set =<code>{}</code> |
### <code>∅</code> = empty set =<code>{}</code> |
||
### <code>r = hello</code> |
### <code>r = hello</code> |
||
#### |
#### Only accepts the word "hello" |
||
### <code>r = a * b</code> |
### <code>r = a * b</code> |
||
#### <code>L(r) = {"a", "b"}</code> |
#### <code>L(r) = {"a", "b"}</code> |
||
#### The language contains both "a" and "b" |
#### The language contains both "a" and "b" |
||
### Kleene star (''*'') [https://en.wikipedia.org/wiki/Kleene_star] [[https://archive.is/ApuRV archive]] |
|||
### Kleene Star (''*'') |
|||
#### Only way to represent an infinite number of an expression |
#### Only way to represent an infinite number of an expression |
||
#### <code>r = a*</code> |
#### <code>r = a*</code> |
||
Line 29: | Line 29: | ||
###### <code>L{∅} = {}</code> |
###### <code>L{∅} = {}</code> |
||
###### <code>{"d"} ∪ {} = {"d"}</code> |
###### <code>{"d"} ∪ {} = {"d"}</code> |
||
###### You cannot append "nothing" (AKA <code>∅</code>) to a string but you can append an empty string (AKA <code>λ</code>) |
###### You cannot append "nothing" (AKA <code>∅</code>) to a string, but you can append an empty string (AKA <code>λ</code>) |
||
## |
## Grep + Regex |
||
### |
### Grep uses an 'extended' version of regex |
||
### <code>[]</code> - "any of", <code>[abcd]</code>, <code>[0-9]</code> |
### <code>[]</code> - "any of", <code>[abcd]</code>, <code>[0-9]</code> |
||
### <code>[^]</code> - "none of", <code>[^aeiuo]</code> |
### <code>[^]</code> - "none of", <code>[^aeiuo]</code> |
||
Line 38: | Line 38: | ||
### <code>|</code>= + |
### <code>|</code>= + |
||
### <code>+</code> - 1-or-more |
### <code>+</code> - 1-or-more |
||
#### |
#### The Kleene star is essentially '0-or-more' |
||
#### Note post-meeting: I personally use this operator a lot to replace multiple spaces with a single space in text files. For example, in vim, you can do <code>:%s| \+| |g</code> (you need to escape the <code>+</code> in vim) |
|||
## Live demo! |
## Live demo! |
||
### Grepping for strings inside hamlet |
### Grepping for strings inside hamlet |
||
#### <code>grep hamlet</code> |
#### <code>grep hamlet <filename></code> - searching for the string "hamlet" |
||
#### <code>grep 'z.*z'</code> - matching any number of characters between two z's |
#### <code>grep 'z.*z' <filename></code> - matching any number of characters between two z's |
||
##### Specific behavior depends on the implementation, most are greedy |
##### Specific behavior depends on the implementation, most are 'greedy' |
||
###### Ron's own term, meaning they grab the first instance of a match |
|||
##### <code>z.*z</code> would likely match "zz |
##### For a line with "zzz", the expression <code>z.*z</code> would likely match "zz", but some implementations ''may'' match "zzz" |
||
###### Note from post-meeting: both Grep (<code>-G</code>, <code>-E</code>, <code>-P</code>) and ripgrep return "zzz", so maybe it's the other way around? |
|||
#### Matching all lines with 13 words in them |
#### Matching all lines with 13 words in them |
||
## Common Extensions |
## Common Extensions |
||
Line 52: | Line 55: | ||
#### Matches text without being part of the matched text |
#### Matches text without being part of the matched text |
||
#### Replacing all instances of "John Smith" with "Jack Smith" in a text file that also has "John Cena" |
#### Replacing all instances of "John Smith" with "Jack Smith" in a text file that also has "John Cena" |
||
### Replacing all instanced of "hamlet" with "bamlet" using <code>:s/hamlet/bamlet/g</code> in vim |
### Replacing all instanced of "hamlet" with "bamlet" using <code>:%s/hamlet/bamlet/g</code> in vim |
||
## Language Theory |
## Language Theory |
||
### What makes a language regular? |
### What makes a language regular? |
||
Line 58: | Line 61: | ||
## Regular Automata |
## Regular Automata |
||
### Limited state, can only read input once |
### Limited state, can only read input once |
||
## Chomsky hierarchy [https://en.wikipedia.org/wiki/Chomsky_hierarchy] [[https://archive.ph/w6HQw archive]][[File:Chomsky-hierarchy.svg|alt=Image of the Chomsky hierarchy|thumb|331x331px|Chomsky hierarchy]] |
|||
## Chomsky's Hierarchy |
|||
### Regular expressions are at the bottom of this pyramid |
### Regular expressions are at the bottom of this pyramid |
||
### Context-free, Context-sensitive, and Recursively enumerable expressions sit above regular expressions, in that order |
### Context-free, Context-sensitive, and Recursively enumerable expressions sit above regular expressions, in that order |
||
### Turing machines above all of those |
### Turing machines above all of those (not pictured) |
||
### Regular expression cannot replace your programming language |
### Regular expression cannot replace your programming language |
||
### Some regular language implementation decide languages that '''aren't regular!''' >:( |
### Some regular language implementation decide languages that '''aren't regular!''' >:( |
||
Line 69: | Line 72: | ||
## Does Tech teach anything that covers beyond context-free in undergrad? |
## Does Tech teach anything that covers beyond context-free in undergrad? |
||
### no :( |
### no :( |
||
# What WM does Ron use?[[File:Ron Xmonad Screenshot.png|alt=Screenshot of Ron's XMonad setup|thumb|515x515px|Ron's XMonad setup]] |
|||
# What WM does Ron use? |
|||
## Xmonad, customized in a weird way exactly to his liking |
## Xmonad [https://xmonad.org/] [[https://archive.is/IEYAl archive]], customized in a "weird way exactly to his liking" |
||
### A true gentoo user |
### A true gentoo user |
||
# Why do people call gentoo a "meta-distribution"? |
# Why do people call gentoo a "meta-distribution"? |
||
## They call themselves that, but they're really more like a regular distribution |
## They call themselves that [https://www.gentoo.org/get-started/about/] [[https://archive.is/FqmsU archive]], but they're really more like a regular distribution |
||
## Only time Josh ever heard of "meta-distribution" was in reference to Bedrock Linux |
## Only time Josh ever heard of "meta-distribution" was in reference to Bedrock Linux [https://bedrocklinux.org/] [[https://archive.is/6v9Er archive]], since you can install other distributions inside it |
||
# Does Tech teach pumping lemmas? |
# Does Tech teach pumping lemmas in CS curriculum? |
||
## They were supposed to |
## They were supposed to |
||
## Josh doesn't remember it |
## Josh doesn't remember it |
||
## Consensus was it was likely taught and Josh just forgor |
|||
# Allen continues his ventures in gaming on one of the GLRC servers |
# Allen continues his ventures in gaming on one of the GLRC servers |
||
## Why? |
## Why? |
||
Line 83: | Line 87: | ||
## How are you going to get around anticheat? |
## How are you going to get around anticheat? |
||
### "idk" |
### "idk" |
||
# Domino's BOGO deal for more LUG Pizza parties? [https://store.dominos.cards/45683] |
# Domino's BOGO deal for more LUG Pizza parties? [https://store.dominos.cards/45683] [[https://archive.is/PKPk5 archive]] |
||
## WMTU is using this for K-Fest |
|||
## Might make sense for us to use it too, even if we'd be buying fewer pizzas than them |
|||
# Wrapped up briefly talking about recent FOSS drama |
# Wrapped up briefly talking about recent FOSS drama |
||
## Stallman report |
## Stallman report [https://stallman-report.org/] [[https://archive.is/QjlKO archive]] |
||
### Drew report [https://dmpwn.info/] [[https://archive.is/Jev2r archive]] (lol) |
|||
### Drew report |
|||
## Linus is back to his old self on the Linux mailing list |
## Linus is back to his old self on the Linux mailing list |
||
### Russian maintainer stuff [https://lore.kernel.org/all/CAHk-=whNGNVnYHHSXUAsWds_MoZ-iEgRMQMxZZ0z-jY4uHT+Gg@mail.gmail.com/] [[https://archive.is/msHvh archive]] |
|||
### Russian maintainer stuff |
|||
### Bcachefs driver shenanigans [https://lore.kernel.org/all/172816780614.3194359.10913571563159868953.pr-tracker-bot@kernel.org/T/#t] [[https://archive.ph/apHhh archive]] |
|||
### BTRFS filesystem |
|||
### Recent drama surrounding Rust support in the kernel [https://lore.kernel.org/lkml/20240828211117.9422-1-wedsonaf@gmail.com/] [[https://archive.is/cRIjN archive]] |
|||
# |
# Eboard Taco Bell trip |
||
[[Category:Meeting Minutes]] |
Latest revision as of 14:54, 15 November 2024
- Came from RedTeam meeting on LLM jailbreaking
- We won cool stickers!
- LUG is getting stickers #soon
- Ron's talk on Regex!
- What is an alphabet
- Strings are a finite series of characters
- We typically use "w" to represent strings, for "word"
- Lambda (
λ
) = empty string
- Languages are represented by "L"
- Machine takes strings (w) and determines if it's in the language (L)
- Finite Automata
- Example automata that only accepts an even length string
- Regular Expressions
∅
= empty set ={}
r = hello
- Only accepts the word "hello"
r = a * b
L(r) = {"a", "b"}
- The language contains both "a" and "b"
- Kleene star (*) [1] [archive]
- Only way to represent an infinite number of an expression
r = a*
L(r) = {λ, "a", "aa", "aaa", ...}
r = (ab + c)*
ab + c
matches any instance of "ab" or "c"(ab + c)* = L{λ, "ab", "c", "abab", "abc", "cccab", ...}
r = (d + ∅)
L(d) = {"d"}
L{∅} = {}
{"d"} ∪ {} = {"d"}
- You cannot append "nothing" (AKA
∅
) to a string, but you can append an empty string (AKAλ
)
- Grep + Regex
- Grep uses an 'extended' version of regex
[]
- "any of",[abcd]
,[0-9]
[^]
- "none of",[^aeiuo]
?
- "maybe",colou?r
- matches both
color
andcolour
- matches both
|
= ++
- 1-or-more- The Kleene star is essentially '0-or-more'
- Note post-meeting: I personally use this operator a lot to replace multiple spaces with a single space in text files. For example, in vim, you can do
:%s| \+| |g
(you need to escape the+
in vim)
- Live demo!
- Grepping for strings inside hamlet
grep hamlet <filename>
- searching for the string "hamlet"grep 'z.*z' <filename>
- matching any number of characters between two z's- Specific behavior depends on the implementation, most are 'greedy'
- Ron's own term, meaning they grab the first instance of a match
- For a line with "zzz", the expression
z.*z
would likely match "zz", but some implementations may match "zzz"- Note from post-meeting: both Grep (
-G
,-E
,-P
) and ripgrep return "zzz", so maybe it's the other way around?
- Note from post-meeting: both Grep (
- Specific behavior depends on the implementation, most are 'greedy'
- Matching all lines with 13 words in them
- Grepping for strings inside hamlet
- Common Extensions
- Groups
- In Grep, need to use
-P
flag for "Perl" mode (-E
for "extended" does not allow you to use groups)
- In Grep, need to use
- Lookaround
- Matches text without being part of the matched text
- Replacing all instances of "John Smith" with "Jack Smith" in a text file that also has "John Cena"
- Replacing all instanced of "hamlet" with "bamlet" using
:%s/hamlet/bamlet/g
in vim
- Groups
- Language Theory
- What makes a language regular?
- if it can be described using a Regular Expression!
- Regular Automata
- Limited state, can only read input once
- Chomsky hierarchy [2] [archive]
- Regular expressions are at the bottom of this pyramid
- Context-free, Context-sensitive, and Recursively enumerable expressions sit above regular expressions, in that order
- Turing machines above all of those (not pictured)
- Regular expression cannot replace your programming language
- Some regular language implementation decide languages that aren't regular! >:(
^(a(?1)?b)$
- More akin to "context-free" expressions
- Ron will literally murder them (very real and true)
- Does Tech teach anything that covers beyond context-free in undergrad?
- no :(
- What WM does Ron use?
- Why do people call gentoo a "meta-distribution"?
- Does Tech teach pumping lemmas in CS curriculum?
- They were supposed to
- Josh doesn't remember it
- Consensus was it was likely taught and Josh just forgor
- Allen continues his ventures in gaming on one of the GLRC servers
- Why?
- Free power
- How are you going to get around anticheat?
- "idk"
- Why?
- Domino's BOGO deal for more LUG Pizza parties? [6] [archive]
- WMTU is using this for K-Fest
- Might make sense for us to use it too, even if we'd be buying fewer pizzas than them
- Wrapped up briefly talking about recent FOSS drama
- Eboard Taco Bell trip