|
cinci zoo sniper posted:what’s wrong with some stuff just producing generators, rather than fully formed iterables? core functionality should either produce concrete things or have a very pervasive concept of laziness
|
# ? Oct 24, 2018 17:43 |
|
|
# ? May 25, 2024 05:30 |
|
zed's just a troll who says over-the-top things and then claims they were jokes people didn't get
|
# ? Oct 24, 2018 18:15 |
Cybernetic Vermin posted:core functionality should either produce concrete things or have a very pervasive concept of laziness while i would appreciate the second half of what you said in simple english, i don't see how an "out-of-memory" iterable (or a non-recursive call capable coroutine in moonspeak, i believe - or whatever c# iterators are) is not a rather concrete thing
|
|
# ? Oct 24, 2018 18:21 |
ryde posted:Anything write-up of that? Asking... for a friend. sadly i think it was some c-goons itt sharing the hottest takes
|
|
# ? Oct 24, 2018 18:21 |
|
dunno if this is a canonical place to pick up the conversation but, https://www.google.com/search?q=site%3Aforums.somethingawful.com+%22learn+c+the+hard+way%22 suggests https://forums.somethingawful.com/showthread.php?threadid=3481275&userid=180172&perpage=40&pagenumber=30 e: huh, for some reason it found one poaster's poasts? weeeird e^2: it's not obvious how to go from a poast on a "just this person's post" page back to that poast in a chronological listing of poasts e^3: here we go https://forums.somethingawful.com/showthread.php?threadid=3481275&pagenumber=1369&perpage=40#post478672891 prisoner of waffles fucked around with this message at 18:37 on Oct 24, 2018 |
# ? Oct 24, 2018 18:32 |
|
Cybernetic Vermin posted:inserting iterators in random places (in the output of 'map' i find especially egregious) you’re expected to use a list comprehension if you want a list, or a set comprehension if you want a set. I agree it wasn’t necessary to change map but it’s not necessary to use it either
|
# ? Oct 24, 2018 18:55 |
|
MononcQc posted:I recall a team looking at docker early on and it had such comically bad security that it couldn’t reasonably be used for anything that was multitenant. This apparently did not stop some people from building their own platforms with it. By the time docker was safer to use it was already late, and I think Heroku had compromised on offering ‘dockerized builds’ where you could use docker but only if you had used a specific set of base images or something. Not too sure if I remember this right. we’re just getting better at putting a better VM boundary around your collection of containers and a minimal OS. docker is still awful quote:At some point competition became google itself who could sink years of dev time on k8s and you have to turn around to use that rather than competing by writing your own, but you hardly see that coming when you’re right in it. You also have to recall the uncertainty around the time the docker community forked once or twice and asking how long you are signing up to maintain this k8s is just absolutely unnecessary for herokus bread and butter. they should’ve had fargate as a service much earlier. quote:As for functions, I think this was the kind of project that had hit the right mix of very cross-team project where no one could herd the cats, and tech debt in the stack that would prevent enough flexibility to quickly make this work without major modifications to the whole platform. functions is hard logistically because the time constraints require you have warm pools of VMs/bare metal instances provisioned to support your peak aggregate concurrency. unless you as a company already have a pool abstraction in place that allows you to drive cross-product efficiency, you’re throwing $$$ out the window on faas as a platform driver.
|
# ? Oct 24, 2018 18:58 |
|
i don't think i've ever used map() in python, list comprehensions always seemed more natural in js on the other hand with lodash-fp and its auto-currying i've written a bunch of pretty terrible stuff along the lines of code:
|
# ? Oct 24, 2018 20:27 |
|
prisoner of waffles posted:e^2: it's not obvious how to go from a poast on a "just this person's post" page back to that poast in a chronological listing of poasts the question mark gets you there, the upside down one takes you back
|
# ? Oct 24, 2018 20:59 |
|
I do like 60% clojure 40% python and I still think map is almost never the right way to do it in python
|
# ? Oct 24, 2018 20:59 |
joining the seldom-map crowd for python, i do genuinely not remember when was the last time i used map and the gist of my work is "harry potter and financial data collections"
|
|
# ? Oct 24, 2018 21:51 |
|
FamDav posted:functions is hard logistically because the time constraints require you have warm pools of VMs/bare metal instances provisioned to support your peak aggregate concurrency. unless you as a company already have a pool abstraction in place that allows you to drive cross-product efficiency, you’re throwing $$$ out the window on faas as a platform driver. the capacity logistics is supposed to be heroku's core competency tho. it's basically the same problem as shared hosted services, just at a finer granularity
|
# ? Oct 24, 2018 22:37 |
|
most problems with functions iirc had more to do with the fact that the entire platform was built over lightweight containers each having their own small webserver. You could have written functions for it, but that implied changes at every level: pricing, APIs, CLI, routing, runtime, build chain (heroku builds customer apps), logging, monitoring, etc. That's what I meant by a project that is difficult to drive. It requires the involvement of the whole company to create a new platform on the side while maintaining the old one. In fact they were already building another platform (for bigger customers, which ended up being private spaces) at that time, so it would have been a third one.
|
# ? Oct 25, 2018 03:27 |
|
https://www.cs.virginia.edu/~cs415/reading/bacon-garbage.pdf
|
# ? Oct 25, 2018 03:39 |
|
cinci zoo sniper posted:joining the seldom-map crowd for python, i do genuinely not remember when was the last time i used map and the gist of my work is "harry potter and financial data collections" map owns and i use it all the time (it's named Select in c#)
|
# ? Oct 25, 2018 07:03 |
redleader posted:map owns and i use it all the time (it's named Select in c#) im not saying it’s bad, it’s just not necessary in my work to use map specifically
|
|
# ? Oct 25, 2018 07:06 |
|
is map when ya wanna expand a range from this to that without wanting to think
|
# ? Oct 25, 2018 08:23 |
|
i used that poo poo in ue4 blueprints all the time ue4 blueprints are the best language
|
# ? Oct 25, 2018 08:23 |
|
brand engager posted:realistically whats gonna happen is I spend all tomorrow trying to get myself to focus on it while my brain will want to do anything but that. And then I'll end up writing the whole thing at 3am the morning of [still working on it at 4:30 am voice] it do be like that
|
# ? Oct 25, 2018 10:27 |
|
echinopsis posted:is map when ya wanna expand a range from this to that without wanting to think maps, in this instance, take an array and a function, then iterate through that array applying the function to each item, and returning the results in an array
|
# ? Oct 25, 2018 11:27 |
|
AggressivelyStupid posted:maps, in this instance, take an array and a function, then iterate through that array applying the function to each item, and returning the results in an array it returns an iterator in py3, but I’m not sure why you’d ever use it over a comprehension
|
# ? Oct 25, 2018 11:40 |
|
whoops, yeah I've never used it in python over list comprehension because list comprehension is so nice
|
# ? Oct 25, 2018 11:44 |
|
map is lazy and list comprehensions (in python) are not, so theres one good reason also because "not pythonic" is dumb - i use map/filter/fold/etc. all the time in other languages and its irritating that python had to be a snowflake
|
# ? Oct 25, 2018 11:45 |
|
Helicity posted:map is lazy and list comprehensions (in python) are not, so theres one good reason it used to not be lazy, which is what the poster was complaining about iirc and the whole point of this dumb conversation. so now python3 has the ability to be not lazy (list comprehension) and lazy (map, filter, etc)
|
# ? Oct 25, 2018 11:52 |
|
Sweeper posted:it used to not be lazy, which is what the poster was complaining about iirc and the whole point of this dumb conversation gently caress, van rossumed again
|
# ? Oct 25, 2018 11:58 |
|
you can use a tuple comprehension, those are lazy. next you're going to ask "why are tuple comprehensions lazy" or say "that's insanely loving stupid that tuple and list comprehensions (really all other comprehensions) behave that differently" and for that i have no answer
|
# ? Oct 25, 2018 12:51 |
|
Phobeste posted:you can use a tuple comprehension, those are lazy. next you're going to ask "why are tuple comprehensions lazy" or say "that's insanely loving stupid that tuple and list comprehensions (really all other comprehensions) behave that differently" and for that i have no answer
|
# ? Oct 25, 2018 13:09 |
|
mystes posted:Do you mean "generator expression"? probably i guess. that's not what it looks like though
|
# ? Oct 25, 2018 13:21 |
|
it doesn't look like a tuple though. there are no commas and you don't even need the parentheses if it's the single argument to a function. generator expressions and list comprehensions are superior to map and filter, both in readability and performance (at least in cpython), but they came out later which is why you have both
|
# ? Oct 25, 2018 13:51 |
|
I also thought the term "comprehension" was deprecated in python but maybe not.
mystes fucked around with this message at 14:06 on Oct 25, 2018 |
# ? Oct 25, 2018 14:02 |
Phobeste posted:probably i guess. that's not what it looks like though yes it’s generator exprsssion, there are no tuple comprehensions
|
|
# ? Oct 25, 2018 14:15 |
mystes posted:I also thought the term "comprehension" was deprecated in python but maybe not.
|
|
# ? Oct 25, 2018 14:16 |
cinci zoo sniper posted:yes it’s generator exprsssion, there are no tuple comprehensions unless you count tuple() generator expressions or unpacking tuple comprehension (which is tuple(list(generator expression)) syntax sugar)
|
|
# ? Oct 25, 2018 14:20 |
TheFluff posted:i don't think i've ever used map() in python, list comprehensions always seemed more natural this week I’m working on a codebase that’s about 200k of this stuff written in a similar FP library and the writing/debugging of this is Pain. No compiler, because JavaScript, and anything that goes wrong I.e. where a function expects a function instead of an array ... it’s a runtime error with a stacktrace that comes out of the library itself.
|
|
# ? Oct 25, 2018 14:22 |
|
add typescript to get some compile time guarantees. its opt in so you only need to add types for the low hanging fruit
|
# ? Oct 25, 2018 14:26 |
|
I was already beaten to it, but Python does provide lazy comprehensions (expresions?) via (x for x in foo). Also being able to omit the outer parens in something like sum(f(x) for x in foo) is p. nice.
|
# ? Oct 25, 2018 14:55 |
Xarn posted:I was already beaten to it, but Python does provide lazy comprehensions (expresions?) via (x for x in foo). yeah (x for x in too) is formally called a generator expression
|
|
# ? Oct 25, 2018 15:00 |
|
cinci zoo sniper posted:yeah (x for x in too) is formally called a generator expression (poo poo for post in thread)
|
# ? Oct 25, 2018 15:05 |
|
Coffee Jones posted:this week I’m working on a codebase that’s about 200k of this stuff written in a similar FP library and the writing/debugging of this is Pain. No compiler, because JavaScript, and anything that goes wrong I.e. where a function expects a function instead of an array ... it’s a runtime error with a stacktrace that comes out of the library itself. pain? i'll show you pain. code:
in truth, though, this is actually hell on earth. if you happen to call a function like this with too few arguments somewhere, all of your business logic just stops for no apparent reason, with the excution seemingly disappearing into the soulless void. you get no stack trace, no errors, not even "undefined is not a function" - the application just seems to stop, and you have no idea where it stopped or why. this happens because a curried function called with too few arguments returns a new (partially applied) function that takes the remaining arguments, but the actual curried function doesn't get called until all arguments have been provided. nobody ever checks the return value of a js async function because of course they don't, it doesn't return anything useful - you get the return value via the callback, duh. but the callback never gets called, and you have no idea why.
|
# ? Oct 25, 2018 15:06 |
|
|
# ? May 25, 2024 05:30 |
|
Captain Foo posted:(poo poo for post in thread) a bijection on thread
|
# ? Oct 25, 2018 16:18 |