« first day (2024 days earlier)      last day (3010 days later) » 

7:00 PM
@ArtOfCode it's not random films. it's all films about vehicules.
halp Rust is stupid¹
> rust is stupid
@ConorO'Brien The parser class is what picks out the relevant information, like username, user id, message content, etc.
@El'endiaStarman Like, I literally need the raw stuff--the basic words
@ConorO'Brien You could almost do that with regex, in fact.
@El'endiaStarman I am doing it with regex.
I have the parsing down--I just need the raw text.
7:05 PM
Yeah, you'll be missing a few closing </div> tags, then.
@El'endiaStarman this is for a predictive text corpus.
I'll filter out all html tags and stuff
difference between parsing and filtering.
@TùxCräftîñg This isn't parsing, though.
@ConorO'Brien geobits does
@EᴀsᴛᴇʀʟʏIʀᴋ oh?
7:09 PM
Regex can't be used to parse HTML in essence because it can't keep track of how far its recursed. Thus you'll always have problems with stuff like nested <div>s. If what you're looking for doesn't have that problem, then you can use regex. In this case, Conor is looking for everything between <div class="content"> and </div>, basically.
Also, 1 minute ago I hit 2k!
Dat zalgo SO regex html thingy answer.
7:13 PM
Lol
4427
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ
How do I parse html with without zalgo singing the soung that ends the world
my favorite stack overflow question
@RohanJhunjhunwala tokenize html with regexs, and then parse with a recursive parser
@TuxCrafting why??? Just use the proper tools for it
a tokenizer and a parser... ?
7:15 PM
From what I understand shouldn't you avoid trying to parse html with regular expressions.
why do i get a mismatched type error with let var: f64 = 0; ಠ_ಠ
@RohanJhunjhunwala Ye
HTML is provably not pasable with regular expressions
@TùxCräftîñg cuz 0 is integer?
because html is technically a cfg
7:16 PM
try 0.?
halp Rust is stupid
that is a good public service message to run far far away from loosely typed languages :D
14 mins ago, by TùxCräftîñg
halp Rust is stupid¹
<p>paragraph<div>div is true HTML. It shows two different paragraphs.
halp Rust module system is stupid
7:17 PM
@RohanJhunjhunwala depends
valid html isn't
@ReleasingHeliumNuclei it's invalid html
proof: ids need to be unique
CFGs can't encode that
@TùxCräftîñg take the oxygen away and you don't have to worry about oxidation anymore
.____________.
@orlp

http://stackoverflow.com/a/1758162/5167161
1504
A: RegEx match open tags except XHTML self-contained tags

NealBI think the flaw here is that HTML is a Chomsky Type 2 grammar (context free grammar) and RegEx is a Chomsky Type 3 grammar (regular grammar). Since a Type 2 grammar is fundamentally more complex than a Type 3 grammar (see the Chomsky hierarchy), you can't possibly make this work. But many will ...

7:20 PM
@TùxCräftîñg w3.org/TR/html5/syntax.html#optional-tags p's and last elements' end tags can be omitted
@RohanJhunjhunwala well that answer is wrong in the strict sense
html ID attributes need to be unique
CFGs can't express that
if you allow invalid html
then yes
<div id="test"></div><div id="test"></div>
this is illegal html
will it work in a browser?
<div id="test"></div><div id="toast"></div>
this is legal html
yes it will work in a browser
7:21 PM
Will illegal html still produce output?
@RohanJhunjhunwala my code snippet?
so will anything really
so then, isn't it provable that regexes can't parse all html?
@RohanJhunjhunwala in html everything produce output
I understand that
<foo>GARBAGE</foo> will still output, and thus is technically valid html. A regex html parser would have to parse it.
also see this relevant answer
875
A: RegEx match open tags except XHTML self-contained tags

Justin MorganDon't listen to these guys. You actually can parse context-free grammars with regex if you break the task into smaller pieces. You can generate the correct pattern with a script that does each of these in order: Solve the Halting Problem. Square a circle (simulate the "ruler and compass" metho...

7:25 PM
> Almost there - just divide the whole thing by zero. Easy-peasy.
( ͡° ͜ʖ ͡°)
htnnl is vveird
Oops
But that doesn't change the fact.
:p
why on the earth i get stars for this ಠ_ಠ
@RohanJhunjhunwala Maybe read the next highest-voted answer. Depending on Conor's situation regex may be enough, maybe not.
ಠ¯ಠ
Rust is more stupid than itself
> is like asking Mr. Bean to write an operating system
3 mins ago, by TùxCräftîñg
why on the earth i get stars for this ಠ_ಠ
@Helka Homba, yes, I do not disagree, that can work. I am saying that under most use cases one shoot avoid using regular expressions to parse html. While under sertain circumstances you can get away with it, it should be avoided in favor of a more practical apporach. But in the end a regex can be a vaible solution on some hyml
> hynnl
is better
7:32 PM
> waible
Comon nod eferiwon häs dhime for lucking ät de kybord
I have a Bash question if one of the resident experts is around (cough @Dennis cough).
@flawr hwat
@AlexA. Gesundheit
@Dennis Hello
7:35 PM
Hi!
Oh sorry, I mean chirp
3
Feel free to chirp your question.
Okay so I'm trying to Bash. I have a file full of garbage with a piece I'd like to extract.
x = [
    "a", "b",
    "c", "d",
]
I need the crap between the brackets
with the quotes and commas removed
jammed into an array
7:37 PM
a b c d
there you go ^
@AlexA. What else is in the file?
Is there only one crap with brackets around it?
nope
@flawr is that real?
@HelkaHomba Flawless
@AlexA. And you want all of them?
7:39 PM
Nope, just the one that starts with x =
@RohanJhunjhunwala Yep, some are really good at imitating sounds.
@flawr This is me. People always tell me I have a disturbing laugh for a bird.
And here we see alex with his dog:
@flawr that's crazy, it sounds so artificial. But thats usch a preety bird so friendly :D
cat file | awk '/x = [/{f=0} f; /]/{f=1}' | sed -e 's/"//g" -e 's/,//g'
Not tested
7:43 PM
@flawr have you heard of a kookaburra?
@AlexA. Could the stuff between quotes contain ]?
Nope
All lowercase letters
@flawr I'm sure this isn't Alex. Look at his SE profile.
It's not Australia. ;)
@ReleasingHeliumNuclei Something in here is unmatched because when I press enter it prompts for more input
@RohanJhunjhunwala Never met one in person, but heard of them
7:45 PM
omg Rust is stupid it not allow _ as a identifier
@Rust plz fix urself
I actually saw one when I went there for vacation, at the zoo, both inside of a cage, and a wild one.
@TùxCräftîñg It uses _ as the fallback case for match blocks, so it can't be used as an identifier
@TuxCrafting what legitimate reason is there for _ as an identifier
_ => ...
even java wised up and deprecated it
7:47 PM
those mutable/immutable bindings are mindfcking me
brb
somebody pinged me
I still haven't figured out Rust's str/String/&str fiasco
@AlexA. sed -n '/test1/,/test2/p' | sed -e 's/"//g" -e 's/,//g'? :/
I checked the log and apparently somebody said they were me...?
Copied from SO
7:48 PM
I do not have and have never had a second account here; whoever said that was flat out lying
@JoeZ. it was a joke
@AlexA. x=($(tr -d \\n|grep -Po '(?<=x = )\[.*?\]'|grep -Po '\w+'))
it's one I fail to see the humour in, unfortunately
@Downgoat halp github borked but blag no halp
@JoeZ. In fact, impersonating another user is a big no-no network-wide
@Dennis My grep doesn't have -P ;-;
7:50 PM
@AlexA. Install a better OS. One second.
grep (BSD grep) 2.5.1-FreeBSD
Wow someone who runs BSD
OS X is based on FreeBSD
I'm on OS X
7:52 PM
os x is objectively best os
Oh...i had hope
why would you hope somebody used freebsd
Isnt OS X' new name mac OS?
Yeah
@AlexA. So now it is PriceyBSD ?
2
7:53 PM
It was MacOS, then it was OS X, now it's going back to macOS
@flawr Haha basically
@AlexA. x=($(tr -d \\n|grep -Eo 'x = \[[^]]*\]'|grep -Eo '\w+'|tail -n+2))
I have to declare -a x first, right?
I'm tempted to try triple-booting Mac, Linux and Windows...
No.
@ArtOfCode Why not TempleOS...
7:55 PM
@flawr why not what now
that's why
@ArtOfCode I have a Bootcamp Windows partition but my girlfriend and I used the same copy of Windows for our partitions, so whenever we both boot into Windows, Windows freaks the fuck out.
It accuses us both of being thieves
@AlexA. what's new?
Technically only one of is since it's a legitimate copy of Windows
isn't that a standard part of installing Windows?
@JoeZ. Just to let you know, as someone who saw the message out of context without reading through the transcript, I immediately assumed it was a joke. Not to say it's funny, but to let you know I doubt many people took it for a serious statement.
7:56 PM
it calls you every criminal under the sun
and then you get a virus that tells you that you have to pay the police $100 because you've been watching bestiality or something equally weird
@Dennis Where do I put the filename?
@ArtOfCode osxmasterrace
@ArtOfCode Bonzi Buddy is a tattle tale
@EᴀsᴛᴇʀʟʏIʀᴋ wat
"OS X master race," I think is what he meant
7:59 PM
oh
Yeah, still a nope on that one. I'm dual-booting Ubuntu and Windows.
@AlexA. That reads from STDIN. Either redirect STDIN or prepend cat <filename>| to the tr command.
> isn't that a standard part of installing Windows?
i can tell you like ubuntu a bit better
Arch Linux masterrace
@EᴀsᴛᴇʀʟʏIʀᴋ they all have their place
8:01 PM
I set up an ElementaryOS VM recently and I quite like it.
Mac's place is currently squashed under Windows' heel, in the mud, but hey, it's a place.
@ReleasingHeliumNuclei Is Linux not holy enough for you? Do you really need Arch Linux?
@Dennis The output of echo $x is blank :(
@flawr you took that seriously? i mean, the whole masterrace things?
Lol, I don't even know what a masterrace is.
8:03 PM
it means WE ARE BETTER THAN YOU LOL U SUCK
@flawr It's what the Nazis considered themselves to be, which they used to justify ethnic genocide
Oh, I always assumed it was some sort of racing race.
Ok well that explains a lot
Well, you know, gotta go fast
8:04 PM
@ReleasingHeliumNuclei exempt
After all, what is this, One Fast, One Furious?
If nazis are after you, you sure do.
@EᴀsᴛᴇʀʟʏIʀᴋ exempt
@AllGuitarristsHere: Do you play classical music?
No, I've always wanted to learn classical guitar but I've never been able to read music well enough to do it.
Also all of my guitars are steel strung, and classical guitars are nylon strung
8:06 PM
@AlexA. Is that because they are from the old days before steel was invented?
But steel strings do not per se inhibit you from playing classical music?
@flawr Yup, mainly exempt. disappears
@AlexA. Swell. Try removing the tail command.
@zyabin101 What the heck is this supposed to mean?
@flawr I'm exempt
8:08 PM
@zyabin101 From what?
@flawr No, but the tone is way wrong with steel strings. Plus classical guitars have more space between the strings than typical steel strung guitars.
@flawr from that.
From the guitar question thing.
@trichoplax Actually guitar strings, as with the strings of other instruments, used to be made from cat guts.
@zyabin101 u wot m8
@AlexA. Like tennis rackets?
8:09 PM
Tennis rackets used to be made of cat guts?
Brutal
Only the strings...
@AlexA. Oh I didn't know that, so the non-classical guitars are meant to be played with picks only?
@flawr Not necessarily. Plenty of people play "regular" guitars without a pick. But classical guitars are basically never intended to be used with a pick.
@Dennis Still blank
@AlexA. Haha, I've been doing everything wrong then :D
8:11 PM
xD
That's not to say you can't; everyone has their own unique style of playing ;)
Perhaps it'd be a good idea to take lessons at some point.
@AlexA. And if you replace the + with a *?
@AlexA. But first you have to be able to play at all=)
@Dennis Same thing
@flawr Well, I suppose that does help, yes :P
plz halp how do i create a vector with n empty elements in Rust?
Vec::<u8>::with_capacity(n) dont work
8:13 PM
@AlexA. Does the file look exactly like you described? It's working fine for me, even with POSIXLY_CORRECT.
@flawr Case in point: youtu.be/6eLARjLNsiU
(Phone|I've) gotta sleep, see you around.
@Dennis Well, it's testname instead of x and stuff like linalg and fft instead of a, b.
Otherwise yes
@everyonewhoprograminoxygenpropelledlanguage plz halp
@AlexA. NUUUUUUUUUU
that's just mean. :/
8:17 PM
@AlexA. Also exactly one space between testname, =, and [?
uh
yes
@EᴀsᴛᴇʀʟʏIʀᴋ You should probably avoid studying history...
yes
i've already seen bad things done to cats
@Dennis It's this for reference
8:20 PM
@AlexA. That says testnames with an s at the end.
Work for me.
$ x=($(< choosetests.jl tr -d \\n|grep -Eo 'testnames = \[[^]]*\]'|grep -Eo '\w+'|tail -n+2))
$ echo ${x[@]}
linalg subarray core inference keywordargs numbers printf char string triplequote unicode dates dict hashing iobuffer staged offsetarray arrayops tuple reduce reducedim random abstractarray intfuncs simdloop vecelement blas sparse bitarray copy math fastmath functional operators path ccall parse loading bigint bigfloat sorting statistics spawn backtrace priorityqueue file read mmap version resolve pollfd mpfr broadcast complex socket floatapprox datafmt reflection regex float16 combi
If that doesn't work, try this. x=($(<choosetests.jl tr -d \\n|grep -Eo 'testnames = \[[^]]*\]'|grep -Eo '[a-z]*'|tail -n+2))
I think \w is a GNU extension.
I get testnames :/
Dark
Even without the tail?
8:24 PM
>.<
@Dennis Well, it doesn't work for me locally to test but I'll ultimately be running it on an Ubuntu VM, so maybe that's okay. I'll boot up my Ubuntu VM and see what happens.
@HelkaHomba star 4 you (cant star)
The url makes it look like I have 67 stars
8:29 PM
@HelkaHomba is me
how you get picture
get out of my house
no vulpines allowed
brb telling them to move security cameras
^ YouTube videos with YOLO in their URL
(case insensitive cuz' gOoGlE)
halp how do i default value on arguments with rust
8:44 PM
@AlexA. is this accurate depiction of baby magpie?
 >(ö)<
you're missing the constant "feed me feed me" chirping
wat
Rust is stupid
guys, maybe a stupid question, but what does the chat name "Nineteenth byte" stands for?
tried to google it, and the closest I found to programming puzzles was a dude asking how to find the 19th byte of a file he downloaded
The Nineteenth Hole is a thing in (normal) golf
8:48 PM
ooooh
and fun fact: The Nineteenth Byte is 19 bytes long
thanks!
haha
1
A: Print an alphabet wave

IanCC (86 bytes): for(int c=-11,n=-26;++n<1;){while(c++){printf("%c%c",90+n,n?91+n:65);}c=-11;puts("");} My first attempt on a Code Golf challenge. Some answers are really impressive!

why the spces at the start?
@IanC
I think I "overspaced" when identing it as a code :p
just edited it!
@Rust u r stupid
8:52 PM
You know, once I went to a planet on NMS where the sentinels (small flying robots with lasers) were actively hostile
Not very helpful considering that I was trying to find a place to save the game
> (small flying robots with lasers)
@TùxCräftîñg yes, NMS has small flying robots with lasers
i want this game
@TùxCräftîñg It's like US$60
60€ exempt
8:55 PM
you also need a fairly powerful computer to run it
i think my laptop can run it
8GB of ram, GTX950M and i7
Yeah, it's been running with only a few lag spikes since I set the max FPS to 60
@TùxCräftîñg that should be plenty
@IanC One of the original moderators, dmckee, named it. In regular golf, the nineteenth hole refers to the bar at the end of the golf course. And we count things in bytes. Thus The Nineteenth Byte was born.
2
@AlexA., I get it now! Creative name :)
8:59 PM
Yeah! We are forever indebted for his contribution both to the initial health of the site as well as to naming the most important part of PPCG.

« first day (2024 days earlier)      last day (3010 days later) »