« first day (2284 days earlier)      last day (2662 days later) » 

8:00 PM
also github.com/dolphin278/genetic, but it isn't as well documented
 
well thank you alot :)
 
My video is more for KSP people. Not the best intro to genetic algorithms by itself.
 
user1596138
@Loktar lol fastest repo ever
 
user1596138
Debtor included*
 
I wrote a very simple genetic algo solver once, it was neat.
Not quite as simple as it initially looks, but definitely not a complicated thing.
it didn't use spaceships, though :(
 
user1596138
8:03 PM
@Loktar I legit saw that happen to a Omaha cop before thanksgiving
 
user1596138
Well he didn't get drug... Mostly just caved in
 
user2620028
@jhawins and how pissed was he
 
user1596138
He didn't see it and neither did the truck driver. He was out assisting another accident which is why the truck had a tight spot to get through... Another driver saw and got out and told him the truck driver.
 
user1596138
He had like a 6 foot lift gate so he was long behind the axles he wasn't just a complete idiot..
 
you do you update yarn?
download a new installer?
 
8:11 PM
go through the system package
it will bitch at you if you install or update through npm, so I've always assumed it will do the same if you try to self-update
 
still tryin to fix my fiddle.. is it just me or is fiddle slow today...? :P
 
yarnpkg.com/en/docs/cli/self-update *"Note: self-update is currently not available, which means updates must be done manually. See issue #1139 for details."&
 
is >=! a valid operator? or do I drop the = ?
 
it's a valid pair of operators
what comparison do you want, in english?
 
I'm looking for "not equal to or less than"
Wait..
 
8:21 PM
so, greater than?
 
^
 
Yes... I'm sorry
:(
 
lol
 
suck it sean
 
fine
 
8:23 PM
I think I'm going to fail the math course if this continues lol
 
get yourself a rubber duck
 
That's actually quite effective
I've used my brother as rubber duck up until now
 
it's the same concept as explaining to a 5 year old
just sits still for a lot longer
 
about to interview a sub contractor :D
 
given up on satellites and going into the boat business, eh?
 
8:30 PM
@ssube Same applies to my brother, he has an attention span of 60 seconds.
(18 y/o)
 
lol no we're bringing on some contractor help for our navy maritime project
I'm mostly working with geoJSON right now and ocean charting
 
user1596138
@SterlingArcher I will work on subs for u
 
@Pigman168 definitely get a less energetic rubber duck, then. I've tried that with my roommate and it doesn't work well, it's hard to invest somebody else in a quick technical explanation.
after you practice RDD for a while, you can just use writing the docs as your rubber duck
 
user1596138
Sammiches for my <3ro
 
8:31 PM
True that
 
document -> design (the API) -> (write) test(s) -> implement
 
This is nuts I dont get it how my table is not getting the bootstrap css even though it is loaded last in the <head>, I do however also load jQuery-ui css. Could that be the problem? the font changed to bootstrap's default
 
@Pigman168 That's actually 8 times higher than the average attention span.
 
@KarmaDoe In which situations?
 
Human attention span is 8 seconds average.
All situations
 
user2620028
8:34 PM
@ssube i have done this to someone who actually had an interest in programming and i ended up explaining more about how datastructures and conditions work in programming than about my problem, i forget i even have a problem. Problem solved.
 
For transistent attention
 
user2620028
@KarmaDoe yeah i am generally done 8 seconds into sex. seems legit.
 
The trick is to keep going after orgasm.
 
Well I was thinking of lecture-like situations
 
It may prove hard to keep it hard the first few times.
 
8:36 PM
^ Too true
 
Long lecture like situations or focused attention has the same span, the thing is you choose to refocus on it.
 
Oh I see
His refocus rate declines rapidly then
 
But i get what you said, nothing interests him enough
 
Just when I'm trying to explain my code :P
Can't blame him
 
Maybe you make it boring for him,
 
8:39 PM
Man its so much easier working with an custom made AST than with pure regex
 
then don't use regex
it's not good for anything
 
Just finished a simple dom structure like graph
Which I then use for further processing.
 
user2620028
is there any case where you actually need regex, i have yet to need to learn it for any project i have done
 
@Asperger Told you :)
 
@ssube regex is good
 
8:40 PM
@HatterisMad Like, at all?
 
@MadaraUchiha ya you told me too!
 
@Asperger bullshit. Prove it.
@HatterisMad I can't name a case where regex is the best tool for the job.
 
user1596138
I have abused regex many times.
 
@ssube For matching predictable patterns in strings?
 
user2620028
seems like a quick dirty solution
 
8:41 PM
@MadaraUchiha matching patterns or like a .contains?
 
user1596138
Tho how else do you accomplish what regex accomplishes..?
 
@ssube I use regex to clean up \n from RSA encriptors.
 
@ssube I dont see where the issue is. Regex is a good tool for cases where you match patterns
 
user2620028
@Jhawins in what case
 
user1596138
@ssube That's matching static values
 
8:42 PM
@ssube Sometimes that's not good enough
 
@Asperger it's a very mediocre tool for matching patterns
 
user1596138
@HatterisMad Show me something regexy that you think you know how to do otherwise (in JS)
 
@ssube alternative?
 
it's slow, it can't be read or maintained, and throws you into a second (largely meaningless) syntax for no reason
 
user2620028
@Jhawins to be honest i likely just write out a more verbose solution to what regex would be normally used to solve
 
8:42 PM
@Asperger it depends on the case
 
ok start spitting out alternatives : )
 
user1596138
@HatterisMad Then you would've misused it to use it...
 
user2620028
oh really?
 
@HatterisMad throw it in a helper and matchesPattern(foo) instead of pattern.exec(foo)[1][3]
 
user1596138
@ssube how are you matching dynamic patterns using .contains
 
8:43 PM
.replace(/\r?\n|\r/g,'');
 
@HatterisMad I want to find IDs in texts.
IDs are long hexadecimal numbers in all caps
 
@ssube what alternatives? Still waiting
 
Regex is pretty good for this task
 
0-9 A-F
 
@MadaraUchiha a text search is much better than a regex
1 min ago, by ssube
@Asperger it depends on the case
 
8:44 PM
@ssube How would you do it?
Sure, I guess you could do something like
 
Its obvious that we cant parse an entire dom with regex but for most its an awesome tool
 
user2620028
@MadaraUchiha yeah i never said what i did was a better solution, just saying i never learned it cause i would verbosely solve the problem instead of using regex
 
user1596138
Basically.. If it was possible to use a simple search (static string match in the end) then you shouldn't use regex.
 
@MadaraUchiha real fulltext search
 
text
  .split(' ')
  .filter(word => !Number.isNaN(parseInt(word, 16)))
 
user1596138
8:44 PM
If it wasn't possible.... Regex is your only choice aside from essentially writing your own parser
 
@ssube you didnt name any alternatives though. You can dive into asci and bytes sure xD
 
@Asperger most of the time, there's a better choice
 
@ssube Which you can do easily in JavaScript?
 
@MadaraUchiha nope
 
Case in point.
 
8:45 PM
but is a much better option than regex, which is also not easy
 
@ssube The example I gave is very easy with regex
 
when your options are pulling in a function/helper/library vs a whole different language, I'd go with the helper
 
user1596138
This is one of those arguments where you have to sit in the right position, with your head cocked at the right angle to see your own argument.
 
text.match(/\b[0-9A-F]+\b/g)
Done
 
ooh but now our IDs can have dashes or may show up in the truncated form
 
8:46 PM
@ssube Even better
 
also, the text you're searching has some escaped IDs or phone numbers that look a lot like IDs
 
Here's my example from before
1 min ago, by Madara Uchiha
text
  .split(' ')
  .filter(word => !Number.isNaN(parseInt(word, 16)))
Which would be easier to include your new dash requirement? The regex? Or this one?
Sure, of course you could pull in a library
 
obviously the regex, you wrote that one in the least intuitive possible way
 
But there is such a thing as overkill
@ssube How would you have written it differently?
 
I mean seriously, all parser infos ive read online use regex to some extent
 
8:48 PM
@MadaraUchiha .split(' ') is like assuming everyone has a first and last name
it's a fundamentally flawed start that will prevent you from doing anything else
 
@Asperger Right, because it's the most readily available tool for tokenizing by more complex patterns than "this character" or "this substring"
It's not the best, mind you, but it's the most readily available.
 
I don't think we can escape regex at the bottom level, but for almost every "I want to use a regex for...", it's a Bad Idea.
 
@ssube Again, how would you have written it differently?
 
Combine the tools if it is helpful. For example, suppose you know valid IDs are integers divisible by 3. Then, you can use regex to pull all candidates from the text, and then for each of those, check if it is a valid ID.
 
Given a text with IDs in, and the definition of an ID, find all the IDs in the text.
 
8:49 PM
@MadaraUchiha splitting on a more robust word separator than whitespace, first.
 
@MadaraUchiha agreed. So other than regex do we dive into some byte buffer or asci soup?
 
@ssube Oh, you mean like this? .split(/\b+/)? :P
 
@MadaraUchiha yep!
 
@SterlingArcher no, too much bikeshed coming into play.
 
1 min ago, by ssube
I don't think we can escape regex at the bottom level, but for almost every "I want to use a regex for...", it's a Bad Idea.
 
8:50 PM
Okay. what's next?
You've split
How do you find the IDs?
 
I can't name a better way of matching character classes, unfortunately.
 
Wish javascript supported lookbehinds!
 
Today @MadaraUchiha owned our QA and closed things faster than they could find them :P
 
8:51 PM
@MadaraUchiha assuming the split was good, filtering by length would probably be next, then filtering by words that completely match the character class
 
@BenjaminGruenbaum Pretty sure you owe him a nice bottle of whiskey.
 
then something more specialized to validate the ID itself
 
@ssube Right, but why iterate the resultset again and again and again?
JS doesn't really have transducers
So each .filter() is another needless iteration
 
@MadaraUchiha because you're just as likely to do that much iteration with a regex
 
@ssube But once!
 
8:52 PM
they're not known for efficiency
 
@Trasiva why?
 
@MadaraUchiha plus backtracks and failures
 
Fair enough
 
@ssube they actually are, if you write them well, for splitting strings they're pretty good.
 
@BenjaminGruenbaum Because he's Madara fuckin' Uchiha, and he's a boss.
 
8:52 PM
haha
 
@MadaraUchiha I see some of your points and what you're getting at, but I still say that regex is usually the wrong choice.
 
Still, in some cases, writing a short, simple regex is better than trying to express parsing rules in JS
Sure, the abominations that are date validation or email validations should die
Not to mention HTML parsing
 
I'm also finding that all the cases where I think I wanted a regex, I really wanted a querystring or need a full grammar.
but most of my programs stay well away from parsing random text
regex is a bad solution to a set of bad problems, then was applied to an unrelated set of worse ones
 
@ssube That's fair, I don't do that often too.
 
regex is pretty great for validating regular grammars.
 
8:55 PM
"great" seems like a stretch
 
...
hi everyone
how was your weekends?
 
All this regex hate xD
 
...
hi
 
No one actually needs to validate an RFC email, .+@.+[.].+ is just fine and is pretty readable, although .includes("@") is also good
@ssube depends on your problem set of course.
 
the email RFC is (intentionally) something of a nonsense example, though
since it can be summed up as "yeah, fuckit"
 
8:57 PM
@MadaraUchiha again thanks for that tip. You were absolutely right. It made my life easier. As I said though, had to use a little regex for the lexer
 
@BenjaminGruenbaum why the aversion to escaping?
 
If you only work with queryable data then regex is pointless, when you need to parse odd config files it's pretty great.
 
@KendallFrey [.]. is clearer than \..
 
Or data some data providers give you in unreasonable format.
@KendallFrey personal preference, the other way would have also been readable.
 
@MadaraUchiha I find that subjectively wrong
 
8:58 PM
Regex is like chuck norris lol
 
@KendallFrey Never said it was objectively right vOv
 
@BenjaminGruenbaum that's kind of my point, though. It's useful when you have garbage input, but in a clean system... there isn't much of a place for regex.
 
@KendallFrey and you're welcome to write your RE differently than me.
 
obviously we have a lot of garbage text to read, so they are a practical tool, just an ugly one
 
@ssube In a clean system, you ideally don't work with strings that much
 
8:59 PM
@ssube right, but my systems are usually not that clean since I aggregate a lot of data from different places.
 
You work with your own nicely modelled objects
 
@ssube ugliness is subjective. I'd use a different syntax if I could and it would be as readable to other people.
 

« first day (2284 days earlier)      last day (2662 days later) »