|
cinci zoo sniper posted:thread opinions on r pipes? phone posting so no decent example but it's basically replacing the things about R that make this particularly good are 1) lots of interactive use, so you can just keep stacking piped operations until you get what you want 2) a large fraction of R code has the form code:
|
# ? Jun 30, 2017 16:12 |
|
|
# ? May 25, 2024 11:39 |
|
oops
|
# ? Jun 30, 2017 16:13 |
yeah i do chain pipes for data processing. was just wondering if there are any conventions or something about this since loving up coding as much as i do i cant be sure about anything i stumble upon on my own another operator i find cool is magrittr's %<>% so you can do stuff like code:
quote:The magrittr (to be pronounced with a sophisticated french accent)
|
|
# ? Jun 30, 2017 16:18 |
|
cinci zoo sniper posted:terrible programmer question of the evening: if you're doing that as a primitive progress bar you should switch to tqdm: https://pypi.python.org/pypi/tqdm it is way easier and conveys more info
|
# ? Jun 30, 2017 16:19 |
|
tef posted:this is literally what i said to be fair tef, i do find your point gets lost in pretty frequently
|
# ? Jun 30, 2017 16:26 |
Corla Plankun posted:if you're doing that as a primitive progress bar you should switch to tqdm: https://pypi.python.org/pypi/tqdm this is much better, thanks! i use it as a large printing operation progress bar indeed, and they all are for loops at the base so the "implementation" will be a breeze
|
|
# ? Jun 30, 2017 16:29 |
|
cinci zoo sniper posted:yeah i do chain pipes for data processing. was just wondering if there are any conventions or something about this since loving up coding as much as i do i cant be sure about anything i stumble upon on my own the only convention we have is to try to factor out all the logic into nice clean functions so the actual pipe is just a series of functions. i didn't know about in-place mutation with magrittr.
|
# ? Jun 30, 2017 16:30 |
onwards to other python questions. any one here with specifically bad python 2->3 migration ? ive been sitting on 2.7 for while on this computational project, and 3.x seemed meh, but it feels like its slowly getting there so i might consider porting it at a later stage
|
|
# ? Jun 30, 2017 16:35 |
motedek posted:the only convention we have is to try to factor out all the logic into nice clean functions so the actual pipe is just a series of functions. i didn't know about in-place mutation with magrittr. then i'm up to speed, with singular function calls per line of pipe where possible
|
|
# ? Jun 30, 2017 16:36 |
|
is revulsion a normal reaction to seeing R code?
|
# ? Jun 30, 2017 16:37 |
|
absolutely
|
# ? Jun 30, 2017 16:46 |
|
Shinku ABOOKEN posted:is revulsion a normal reaction to seeing R code? What do you think it stands for? It's entire premise is a free matlab, and matlab is poo poo sooo
|
# ? Jun 30, 2017 16:54 |
|
gonadic io posted:It's entire premise is a free matlab, that's octave quote:and matlab is poo poo sooo truth.
|
# ? Jun 30, 2017 17:35 |
gonadic io posted:What do you think it stands for? it's a better s
|
|
# ? Jun 30, 2017 17:39 |
|
tigerbrew emacs doesn't build on my imac for some reason and i'm mad
|
# ? Jun 30, 2017 20:03 |
i just set up a virtual environment. in a virtual environment. please don't ask anything.
|
|
# ? Jun 30, 2017 21:40 |
|
ok i am real stumped here: i have a sql stored procedure that takes 15 minutes to run if i call it, BUT if i just copy the guts out and run it as a freestanding query it comes back in less than a second (with the same data both times)
|
# ? Jun 30, 2017 21:54 |
|
HoboMan posted:ok i am real stumped here: i have a sql stored procedure that takes 15 minutes to run if i call it, BUT if i just copy the guts out and run it as a freestanding query it comes back in less than a second (with the same data both times) mssql, right? check if the execution plans are the same. also make sure there isn't any type conversion fuckery. like maybe one parameter is an integer and you type it out as such in the query but the sproc treats it as a string (i've seen a report go from seconds to 2+ hours for that reason)
|
# ? Jun 30, 2017 22:50 |
|
HoboMan posted:to be fair tef, i do find your point gets lost in pretty frequently nerds: ugh you can't say that, what do you mean by that nerds: ugh you write too many words the only thing nerds want to read is cheap burns on tech they don't like and gloss over the moment they have to parse a text
|
# ? Jun 30, 2017 23:01 |
|
tef posted:nerds: ugh you can't say that, what do you mean by that it was a good post
|
# ? Jul 1, 2017 00:33 |
|
cinci zoo sniper posted:onwards to other python questions. any one here with specifically bad python 2->3 migration ? ive been sitting on 2.7 for while on this computational project, and 3.x seemed meh, but it feels like its slowly getting there so i might consider porting it at a later stage Python 3 owns if for no other reason than the simplification and improvement of coroutines and generators to make them more chainable. you've posted a lot about workloads that are large datasets without I think a lot of internal relations. coroutines are really good for that because you can do the work piecemeal and lazily by structuring things with generators - think putting a 'yield value' in every for loop iteration and chaining them arbitrarily. and in 3.5 you can even make them async for IO bound workloads! neat. that said 2to3 really runs into trouble with third party library calls, especially around string or bytestring handling because of the Unicode thing. best advice is just say, I'm going to spend today running 2to3 on my code and going down the rabbit hole of what breaks. after spending a day on it you'll at least know how significant the breakage is and how much time you'll have to spend to fix it
|
# ? Jul 1, 2017 01:42 |
|
tef posted:nerds: ugh you can't say that, what do you mean by that it's not the number of words, it's the tone of condescension, as though you're revealing deep truths instead of common knowledge in purple prose
|
# ? Jul 1, 2017 02:50 |
|
JewKiller 3000 posted:it's not the number of words, it's the tone of condescension, as though you're revealing deep truths instead of common knowledge in purple prose distributed systems stuff isn't common knowledge, i learned poo poo and i spent four years workign with them having a post of realtalk that cuts through jargon and trends is good
|
# ? Jul 1, 2017 04:44 |
|
all right let's see if we can figure out how to read these wacky atari analog joyst--oh dammit well i've sussed out how to read if the stick is pressed up so far
|
# ? Jul 1, 2017 07:09 |
|
tef posted:nerds: ugh you can't say that, what do you mean by that im just using regular expressions
|
# ? Jul 1, 2017 07:17 |
|
Luigi Thirty posted:all right let's see if we can figure out how to read these wacky atari analog joyst--oh dammit As far as I can tell: - You read one of the addresses that are mapped to an analog-to-digital channel. Presumably the one corresponding to the axis you want to read... - Ignore the value because it's probably garbage - You get an interrupt some time later, once the ADC has actually done the conversion. - To get the real value you ___________ the ______ which _____
|
# ? Jul 1, 2017 07:38 |
Phobeste posted:Python 3 owns if for no other reason than the simplification and improvement of coroutines and generators to make them more chainable. you've posted a lot about workloads that are large datasets without I think a lot of internal relations. coroutines are really good for that because you can do the work piecemeal and lazily by structuring things with generators - think putting a 'yield value' in every for loop iteration and chaining them arbitrarily. and in 3.5 you can even make them async for IO bound workloads! neat. while lot of async and coroutines stuff flies over my head on theoretical level, the last paragraph is more less what i'm thinking. i've got a couple dozen issues open atm, and one i get them done and make sure i'm aware how things work, i'll just roll with it and see if i can unfuck problems in a week or two. thankfully i don't have many 3rd party dependancies - its numpy/scipy core/matplotlib for almost everything, and some external i/o drivers
|
|
# ? Jul 1, 2017 07:57 |
|
tef posted:nerds: ugh you can't say that, what do you mean by that I said it was a good post! I do think it sounds too much time attacking queues as direct substitutes for request response, rather than considering their drawbacks when used in a more suitable architecture. Replayability is a really powerful testing mechanism (although that's not the only use) and most persistent queues make it super easy. It's possible to do almost the same with some (most?) databases but is much harder to get right.
|
# ? Jul 1, 2017 10:35 |
|
tef posted:the only thing nerds want to read is cheap burns on tech they don't like and gloss over the moment they have to parse a text welcome to yospos
|
# ? Jul 1, 2017 11:08 |
|
cinci zoo sniper posted:while lot of async and coroutines stuff flies over my head on theoretical level, the last paragraph is more less what i'm thinking. i've got a couple dozen issues open atm, and one i get them done and make sure i'm aware how things work, i'll just roll with it and see if i can unfuck problems in a week or two. thankfully i don't have many 3rd party dependancies - its numpy/scipy core/matplotlib for almost everything, and some external i/o drivers i think scipy supports 3.x out of the box so good news there
|
# ? Jul 1, 2017 15:13 |
|
Luigi Thirty posted:all right let's see if we can figure out how to read these wacky atari analog joyst--oh dammit What exactly did you find that's so faded, and can you get another copy?
|
# ? Jul 1, 2017 20:24 |
AggressivelyStupid posted:i think scipy supports 3.x out of the box so good news there yeah they did sometime in mid 3.x push an update introducing python 3 compatibility for the stack.
|
|
# ? Jul 1, 2017 20:48 |
|
Zemyla posted:What exactly did you find that's so faded, and can you get another copy? a scanned copy of the Atari System 1 Hardware & Operating System Description from a filing cabinet in Ireland someone raided when atari closed I don't think I can get another copy, no MAME to the rescue though! this is a digital joystick so if I can rig up something that reads the input port the way it expects it'll work code:
|
# ? Jul 1, 2017 21:19 |
|
emacs update: this is pretty cool and im probably not going to renew my jetbrains subscription at this rate
|
# ? Jul 2, 2017 00:24 |
|
Phobeste posted:Python 3 owns if for no other reason than the simplification and improvement of coroutines and generators to make them more chainable. you've posted a lot about workloads that are large datasets without I think a lot of internal relations. coroutines are really good for that because you can do the work piecemeal and lazily by structuring things with generators - think putting a 'yield value' in every for loop iteration and chaining them arbitrarily. and in 3.5 you can even make them async for IO bound workloads! neat. i bit the bullet a while ago and moved to 3, most of my work's in a repl and i majorly dislike some of the changes like "map no longer returns a list" b/c it messes with my muscle memory pretty terrilbe
|
# ? Jul 2, 2017 00:52 |
|
Wheany posted:welcome to yospos i;m home
|
# ? Jul 2, 2017 00:54 |
|
JewKiller 3000 posted:it's not the number of words, it's the tone of condescension, as though you're revealing deep truths instead of common knowledge in purple prose sorry i don't write like jeff atwood
|
# ? Jul 2, 2017 00:55 |
|
it's a tersely written long read apparently i can only assume americans expect smaller words and more encouragement
|
# ? Jul 2, 2017 00:57 |
|
tef posted:it's a tersely written long read apparently it was a good post this is also a good post
|
# ? Jul 2, 2017 01:00 |
|
|
# ? May 25, 2024 11:39 |
|
it made hacker news people then said 'he's wrong' because 'brokers do work at the edge' and 'everyone knows pubsub is not how you build work assignment' well, everyone except the ampq vendors
|
# ? Jul 2, 2017 01:09 |