egg|nomz|egg changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer.
awang has quit [Ping timeout: 186 seconds]
awang has joined #kspacademia
<EntropicRaptor>
awang: tabs
<EntropicRaptor>
awang: well, unless you have a design document that says spaces.
EntropicRaptor is now known as UmbralRaptor
<UmbralRaptor>
How worried should I be if a Russian Physics professor describes a field (relativistic thermodynamics) as "fun"?
<bofh>
UmbralRaptor: so I think he's right.
<UmbralRaptor>
hrm
<soundnfury>
UmbralRaptor: somewhere between "yikes" and "run, don't walk, to the exit"
<soundnfury>
awang: I wish people would be more specific/precise when criticising "parsing using regexes"; using a regex-based _lexer_ is a _great_ idea. It's parsing using _only_ regexes that's Bad & Wrong
<soundnfury>
regular lexpressions ^_^
<icefire>
regulexpressions
<soundnfury>
yes, that. Have a cookie
<soundnfury>
!wpn icefire
* Qboid
gives icefire a fractal interferometer
<SilverFox>
soundnfury, you said "Bad&Wrong" this pleases me, what is this regex stuff you speak of?
<SilverFox>
everytime I tried to do it I couldn't do it so whatevs
* UmbralRaptor
hugs vim/ed regexes.
<awang>
UmbralRaptor: Well, the nice thing is that there isn't a design document!
<awang>
(yet)
<awang>
I'm going to make one
<awang>
And set up clang-tidy/clang-format while I'm at it
<awang>
soundnfury: I think it's parsing?
<awang>
At first glance it seems like it's trying to decompose different statements
<awang>
Tempted to write a grammar for this
<awang>
Bet I'll mess it up somehow though
<awang>
Looks like there is some lexing going on
<awang>
There's something that matches operators
<awang>
And matches "and", "or", and "of"?
<awang>
There's another thing that... tries to extract things from between quotes?
<awang>
re.compile(r'(?<=")[^"]+|[^"]+(?=")')
<awang>
My regex-fu is rusty
<awang>
And idk what variant Python uses
<soundnfury>
awang: Python has its own regex with blackjack and hookers. Fire up ipython, type "import re" and "re??" for docs
<soundnfury>
wait, just "re?", only one ?
<UmbralRaptor>
help(re) maybe?
<soundnfury>
UmbralRaptor: yeah, that's the same thing. I just like ipython's way of phrasing it
<soundnfury>
let's see, '(?<=")': match if preceded by ". '[^"]+': match one or more non-". '(?=")': match if followed by ".
<soundnfury>
so I think that regex matches '"foo bar bletch' or 'foo bar bletch"', but not '"foo bar bletch"'. But I might be mistaken about the precedence of that |
<awang>
soundnfury: What's the difference between ipython and the regular python repl?
<awang>
Yeah, that's the line, more or less
<awang>
Just gets assigned to a variable
<awang>
Should there be more than one re?
<soundnfury>
awang: ipython is just helpful with stuff like line editing, output history arrays, syntax colouring etc.
<awang>
Ah
<awang>
Definitely downloading that
<awang>
Especially for this project
<awang>
Hmmm
<soundnfury>
OK, having exqerimented a little, that regex matches any string of non-" which is either preceded or followed by a "
<soundnfury>
_but_ how's it being used, re.search() or re.match()?
e_14159- has joined #kspacademia
e_14159 has quit [Ping timeout: 383 seconds]
e_14159- is now known as e_14159
<soundnfury>
(match() won't accept "foo because the leading " isn't part of the matched text, but will accept foo" because it allows junk after the match. search() will accept both, and also "foo".)
<awang>
Only use I can find is findall
<awang>
Uh
<awang>
It's parsing SQL statements?
<awang>
Or SQL-ish statements
<awang>
There's stuff to handle parsing binary ops in parentheses, with precedence?
<soundnfury>
ok, findall() is like search()
Profound has joined #kspacademia
<awang>
So it's relatively ok?
<soundnfury>
uh, not really, it's still a crazy regex
<soundnfury>
assuming no multiline (flags=re.M), it's matching lines containing at least one " and then chopping them up into runs of not-"
<awang>
Better than match(), though
<awang>
?
<soundnfury>
yeah, using match() on that regex would be nuts
<awang>
Doesn't appear to be any flags
<soundnfury>
I think something similar could be achieved with line.split('"') and filtering out empty strings, pleh
<awang>
How hard is it to write a parser in Python, anyways?
<soundnfury>
not that hard, there are proper parsing libraries
<kmath>
<LincolnAtkinson> Just gave a tech talk at work on strings, encodings, #unicode Developer confided afterward "I'm afraid to use stri… https://t.co/uSagUD035w
<bofh>
...and there's another gov't shutdown just now. *headdesks*
StCypher has quit [Ping timeout: 383 seconds]
StCypher has joined #kspacademia
Profound has quit [Read error: Connection reset by peer]
StCypher has quit [Ping timeout: 186 seconds]
egg|mobile|egg has joined #kspacademia
egg|phone|egg has quit [Ping timeout: 186 seconds]
<e_14159>
awang: They didn't bind copy-paste to mouse buttons? :P
<awang>
e_14159: Plz no more ideas :(
<e_14159>
Oh! To the mouse wheel!
<awang>
I now feel pity for the programmers called in to work on scientists' code
<awang>
Noooooooo
<awang>
s/scientists'/scientists' code
<Qboid>
awang meant to say: I now feel pity for the programmers called in to work on scientists' code code
<awang>
Er
<awang>
Had part of my window off screen >_<
<e_14159>
awang: Our student assistant had to debug research code (well, mostly research) which simply caught all exceptions, wrote "EXCEPTION", and continued.
<kmath>
<DrKeithSmith> A trial of double-blind #PeerReview at Nature journals shows authors who opt for double blind get *worse* outcomes:… https://t.co/unaRos19dF
<e_14159>
Wait, you can *choose* double-blind? If you have the infrastructure, why not enforce it?
<UmbralRaptor>
¯\_(ツ)_/¯
<e_14159>
Good answer.
<awang>
e_14159: ON ERROR RESUME NEXT
<e_14159>
ON ERROR RESUME NEXT # screw you all, nobody debugs my program.
<awang>
My heart goes out to that assistant
<awang>
Researchers
* awang
yells at researches from lawn
<e_14159>
My code is documented (probably also sane), and will be published.
<e_14159>
Well, it's not yet documented as well as I'd like, but I've only just submitted the paper.7
<e_14159>
s/7/
<Qboid>
e_14159 meant to say: Well, it's not yet documented as well as I'd like, but I've only just submitted the paper.
<awang>
A rare gem, if HN is to be believed
<awang>
Although with the push to make code more accessible I hope that's changing
<awang>
The comments on that were an interesting read
<UmbralRaptor>
awang: I suspect that the push is primarily in academia. >_>
egg|mobile|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has joined #kspacademia
egg|cell|egg has joined #kspacademia
egg|phone|egg has quit [Read error: Connection reset by peer]
<UmbralRaptor>
Wait, industry is commenting now? I thought the consensus was that "if you need comments, you should get a different job"
* e_14159
runs away from industry
<awang>
UmbralRaptor: I think it's either 1 comment per line of code or if you have any comments at all you're wasting company time by writing code that doesn't execute
<awang>
Depending on your manager
* UmbralRaptor
heasdesks.
<UmbralRaptor>
*headdesks
<e_14159>
Sounds like a shit way to work.
<awang>
I think that's more corporate wheel-in-a-cog programming
<awang>
I'd hope less traditional companies are a bit better
<e_14159>
I wouldn't know, I don't work at a company.
<e_14159>
Well, I do, but it's non-profit and a research institute, so...
<bofh>
A) How did we FIND THEM? B) HOW ARE THEY A THING?!?
<SnoopJeDi>
so, I didn't read the letter in excruciating detail (it's a happy hour link for our drink bounty this week), but AFAICT the crux of their assertion that it's unbound eggsoplanets is the red/blue shifting of the Fe Kα
<SnoopJeDi>
bofh, oh is the paper not open access? I can send it to you if you'd like and it's not on sci-hub or whatever
<SnoopJeDi>
but yea microlensing by planets what the ffffuuuuck
<SnoopJeDi>
AFAIK unbound planets are a pretty ho-hum foregone conclusion in any galactic population though
<SnoopJeDi>
with large enough N you'll definitely build up a population of ejected eggs
* awang
🔪 diffs with all the whitespace
<SnoopJeDi>
awang, for having to clean it up, or legibility?
<awang>
Cleaning it up
<awang>
VS trying to be helpful and failing miserably
<awang>
This branch should have been merged hours ago
<SnoopJeDi>
ah, that sucks. I know some workflows have hooks that check that sort of compliance with a contrib guide
<SnoopJeDi>
awang, could you maybe ignore whitespace with `git-diff` and prepare a cleanup commit that way?
<SnoopJeDi>
(I've never done this, but ugh busywork is my nemesis)
<awang>
SnoopJeDi: Yeah, I'm hoping to get a clang-format pre-commit hook set up
<awang>
s/$/this weekend
<Qboid>
awang meant to say: SnoopJeDi: Yeah, I'm hoping to get a clang-format pre-commit hook set upthis weekend
<SnoopJeDi>
whitespaaaaace 🔪
<SnoopJeDi>
I've only used hooks once, to make sure I didn't commit 100s of MBs of mesh/soln data in my FEM model repo
<SnoopJeDi>
(because version management in things like COMSOL, Ansys, AutoCAD are hot garbage)
<awang>
Ignoring whitespace wouldn't help fixing it, unfortunately
<awang>
Lets me see things that actually changed, but that's pretty much it
<SnoopJeDi>
oh it needs semantically important fixes too? blah
<awang>
Hey, what's wrong with versioning gigantic binary files :P
<awang>
Yes, unfortunately
<SnoopJeDi>
Nothing, except that I get lots of gigantic blobs :P
<SnoopJeDi>
(that I don't necessarily want)
<awang>
New feature implemented, but broke backwards compatibility
<awang>
So the tests are all failing miserably
<SnoopJeDi>
IIRC the hook was just a bash script that checked an env flag and if it didn't find an instruction to commit results, it would open the proprietary zip-alike and strip out that data before committing a blob
<SnoopJeDi>
so I could still save a big-important-result for later dredging up, but most commits were "here were the inputs and meshing scheme, you'll have to re-run the actual simulation though"
<awang>
Yeah... Wish the engineers here had something like that
<SnoopJeDi>
which was fine, 90% of the point I used the VCS was just so that I could look back across the history and see what changes I'd made gradually. Maybe tweaking parameter X didn't do anything back then, but now parameter Y is different so maybe it should be re-explored
<awang>
95% of our backup space is meshes and mesh results :(
<awang>
(I think)
<SnoopJeDi>
we used Vault for like
<SnoopJeDi>
5 minutes
<SnoopJeDi>
I believe our server still runs but jfc Autodesk is bad
<SnoopJeDi>
otoh drawing revisioning is actual hell
<SnoopJeDi>
so you can't really tool your way out of that
* awang
🔪 implicit units
<SnoopJeDi>
I happily let our principal drafter do all the drawing if I can
<awang>
Luckily, I'm insulated from all the drawing and such
<awang>
I'm just the code guy
<SnoopJeDi>
his workflow is actually insane but as long as he's the only person who has to do it
<awang>
Haven't heard of Vault before
egg|phone|egg has joined #kspacademia
<SnoopJeDi>
he thought I was a fucking alien because I used Inventor's Excel feature to parameterize geometry
egg|cell|egg has quit [Read error: Connection reset by peer]
<SnoopJeDi>
and like, actually did the basic geom/trig for constraints in that sheet
<awang>
What, does he do it manually?
egg|phone|egg has quit [Read error: Connection reset by peer]
<SnoopJeDi>
instead of click-click-click "okay constraint solver GLHF"
<SnoopJeDi>
he usually just constrains the everliving fuck out of his drawings
<awang>
(I'm slightly out of my depth) :(
<awang>
Ah
<SnoopJeDi>
which tbf is literally what Inventor is designed for: rapid drawing
<SnoopJeDi>
it's super convenient to not have to solve classic geometry problems like tangent circles blah blah
egg|phone|egg has joined #kspacademia
<SnoopJeDi>
but as that stuff adds up, you can get substantial interactivity delays, and worse the model will likely break at some point
<awang>
Just specify "these circles should be tangent"?
<awang>
Constraint drawers sound useful
<SnoopJeDi>
usually situations where you have two possible solutions to a constraint and something inverts it to choose the other root
<SnoopJeDi>
yea pretty much
egg|phone|egg has quit [Read error: Connection reset by peer]
<SnoopJeDi>
or perpendicular/parallel lines, etc.
<awang>
My last experience with any CAD-related thing was Sketchup
<awang>
Ah
egg|phone|egg has joined #kspacademia
<SnoopJeDi>
and of course "stand this piece off from this other piece by X amount"
<awang>
The CAD version of numerical instability?
<SnoopJeDi>
Most of the drawings on the high-field magnet I designed just used those "classical" dimensions and I did a lot of the geometry myself
<SnoopJeDi>
so that I could later say "oh we need such-and-such extra space for a shim or a quench heater or [wtfever]" and change the param and update everything
<SnoopJeDi>
yea, the algebraic solver is very good but only so good
tawny has quit [Ping timeout: 207 seconds]
<awang>
Just how slow do constraint solvers get?
<SnoopJeDi>
usually only a few-seconds worth of delay, maybe as bad as a few minutes if something is Really Really Wrong
<awang>
That doesn't sound too bad
<SnoopJeDi>
But since it generally does that process for ANY change, even a single second of delay is infuriating
<awang>
Heh
<SnoopJeDi>
gotta respect the UX loop
<awang>
C++ compile times, in a nutshell >_<
<SnoopJeDi>
Micah bumped into it very hard a few months ago when working on the TucoFlyer
<SnoopJeDi>
and I think maybe Fiora has experienced that pain as well
<SnoopJeDi>
I know I've seen her grumble about CAD but it's hard to use any CAD software and *not* grumble :)
<awang>
Oh boy, and now git is getting confused on how to split these diffs :(
<B787_300>
well really 1740 constellations at 96 hours thought the year for the 167040 simulations
<bofh>
by /win 27
<SnoopJeDi>
Neato
<SnoopJeDi>
You might be able to find aggregated stats on pagecount on a professional site, but as long as the content's there and your advisor's remarks are helpful, I think you can weather it.
<B787_300>
bofh: what?
<SnoopJeDi>
I think he started to type something and then intended to switch windows
<SnoopJeDi>
incidentally, conciseness is one of my favorite things about that ApJ letter, bofh. It's a PERFECT level of information for someone doing anything-but-exactly-that
<B787_300>
SnoopJeDi: i mean one paper i reference is from the sister school to mine and it is only 47 pages of content
<SnoopJeDi>
that ref is a thesis?
<B787_300>
yep
<SnoopJeDi>
yea, pagecount is just...a bad measure, unless the thing you care about is how much writing someone did haha
<SnoopJeDi>
It's definitely helpful to know when it's grown impractically large (praise be to judicious use of appendices by responsible authors)
<bofh>
B787_300: disregard, irssi command.
<SnoopJeDi>
there's an Einsteinian bromide about this, isn't there?
<SnoopJeDi>
(or statistically speaking a someone-else bromide that has been misattributed to him)
<SnoopJeDi>
ah yes, Antoine de Saint-Exupery: "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
<B787_300>
SnoopJeDi: oh dude... if i put my full output csv in the appendix it would be like 800 pages long
<B787_300>
(just that appendix)
<SnoopJeDi>
The student who previously worked on my topic had...*checks*...83 pages of source code in her appendix haha
<UmbralRaptor>
Hah.
<SnoopJeDi>
but I meant more pragmatic appendices like proofs of this-or-that property, reviewing theoretical subtleties blah blah
* UmbralRaptor
is reminded of that NTRS paper with 40+ pages of FORTRAN.
<SnoopJeDi>
a good example in accelerator physics would be the unfortunate mixture of ways to express multipoles
<B787_300>
hehehe all my data generaton code is ~800 lines long and generates 334080 reports which then get condensed down to the aforementioned csv
<SnoopJeDi>
most people use the European way anymore, but my boss is one of the stragglers who positively insists on the old American style from the 70s
<B787_300>
thats another thing why in the Lit review chapter do people feel like starting from the bare minimum? almost anyone who reads your paper will have a bachelors in the topic or years of experience
<SnoopJeDi>
Are you speaking about papers, or theses?
<B787_300>
do i really need to know how you go from the two body equation to the SGP4?
<SnoopJeDi>
In the case of the latter, the perhaps-unfortunate truth is that the writing is not really intended to be read, heh.
<B787_300>
theses
<SnoopJeDi>
and if it will be read, the informed reader just uses the table of contents to get to what they want
<SnoopJeDi>
the nice upshot is that students might find a very nice one-stop shop in looking for a result
<SnoopJeDi>
but the actual method of communication in most fields (I don't know AE, mind) is the journals
<SnoopJeDi>
(thus the jokes about theses being a bunch of papers literally pasted together: they usually are and probably ought to be!)
<B787_300>
i mean mine is for the first 3 chapters, ch 4 is allllllll mine. ch 5 is a mix
<SnoopJeDi>
in the context of a thesis it's also important to remember that most committees are pretty diverse, so it can be helpful there too
<B787_300>
for reference CH 1 is motivation, CH 2 is Lit Review, Ch 3 is Methodology, CH 4 is results/analysis CH 5 is conclusion/significance
<SnoopJeDi>
sounds about right
<B787_300>
my committee is pretty monolithicly Engineers who have been working with space stuff for a LONG time
<SnoopJeDi>
fair nuff, context is everything
<SnoopJeDi>
knowing your audience is a skill, not a liability :) If you know your committee doesn't need that information and they don't really request it, there's imo not an obligatory reason to put it in
<SnoopJeDi>
you're writing it primarily to show your competency to them
<B787_300>
i also will know like 95% of the people coming to my defense and all of them are AEs
<SnoopJeDi>
they're gonna have good gotchas, then :)
<B787_300>
which is both a blessing and a curse
<B787_300>
yep SnoopJeDi exactly
<B787_300>
another gripe is i cant bring in my computer with the fata vizulization software on it
<B787_300>
s/fata/data
<Qboid>
B787_300 meant to say: another gripe is i cant bring in my computer with the data vizulization software on it
<SnoopJeDi>
backup slides are a great way to tackle the beartrap questions, imo
<B787_300>
i can tell i have been doing a lot of typing today... my typo rate has gone up
<B787_300>
and this software doesnt look that good in a static mode
<SnoopJeDi>
even if you're *positive* the subject will come up in a talk, there's something to be said for sticking that info in backup slides. you get to say "oh yep I anticipated that" but also have a way to say "okay here's what I have prepped for this and what I have off the top of my head, we have to take this offline if you want to discuss more"
<SnoopJeDi>
assuming it's not critical to the central material that is
<B787_300>
I am just practicing my " I dont know right now, let me double check and get back to you"
<SnoopJeDi>
👍
<SnoopJeDi>
got a practice talk planned with colleagues you trust to give you good feedback?
<B787_300>
like one of the questions i know i am going to get is why are my results so much better than the preceeding research and i only have one answer which in the most consise way of putting it is "the previous research's metric that she based everything off of was an idiotic metric"
<SnoopJeDi>
🔥
<B787_300>
seriously tho
<B787_300>
my and no i dont have a practice scheduled as i have to do it at AFIT or at work and I dont want to do it at work as then i learn things i cant share outside of work
<bofh>
22:33:38 <@B787_300> do i really need to know how you go from the two body equation to the SGP4?
<bofh>
if you have a good reference on that, that'd be *helpful* honestly.