TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: FunctorFlow – An attempt to re-imagine Python libraries

40 点作者 samravshanov将近 6 年前

18 条评论

kristjansson将近 6 年前
The source for the primary package is not published, afaik. The primary entrypoint function is implemented in cython, resisting casual analysis. The stated purpose is to pull (unversioned!) code from the internet and run it, but no mechanism to trust or verify that code is even mentioned.<p>The advisability of the idea aside, the presentation here feels exceedingly and unnecessarily risky
评论 #20609536 未加载
评论 #20608804 未加载
iandanforth将近 6 年前
Hard no. My visceral reactions to this:<p>- Strings are not names. Names help tooling, strings make tooling harder.<p>- A function which takes a string to switch on where behavior radically differs between cases is an anti-pattern.<p>- Imports should be explicit and well organized, not magic and scattered throughout the code.
wrs将近 6 年前
I’m all for improving Python, but as feedback on the minimal website, the impression this gives is you’re working on the npmification of Python libraries. (I don’t mean that as a <i>good</i> thing.)
amelius将近 6 年前
&gt; from functorflow import f, ff<p>Please don&#x27;t give these functions simple names like &quot;f&quot;. I often use these names as generic function names locally. I know I can use &quot;import ... as&quot; but doing so shouldn&#x27;t be necessary and will result in everybody using different names, which will hurt consistency, readability and searchability of code.
uponcoffee将近 6 年前
I was hoping this would combine the best features of existing package managers, but instead this seems to have been made in a vacuum.<p>While making a good package manager&#x2F;community around it is hard, there&#x27;s plenty of hard earned knowledge that&#x27;s been completely ignored here.<p>This seems to make dependency management harder (imports spilled all over the code base, versioning seems non-existent, documentation for this&#x2F;plugins? Twitter is not documentation).<p>How does plugin authoring work? How does distribution and trust work?<p>What problem is this supposed to solve that isn&#x27;t addressed by other package managers (or what does this do better than said package managers)
评论 #20608516 未加载
dymk将近 6 年前
Where are the docs? The “docs” link just forwards to a Twitter account.<p>How would one use this with existing Python packages? Or is this a parallel universe to PIP where libraries need to be written explicitly with FF?<p>The website doesn’t mention how FF packages are versioned or how version restrictions between dependencies are resolved.<p>I see this as quickly becoming full of “left-pad” sized packages, can you analyze a full project to fetch everything ahead of time?
评论 #20607344 未加载
IceDane将近 6 年前
This is just an awful idea all the way through. I&#x27;m baffled by how much effort had been put into this. It&#x27;s almost as if the author went off grid and made this without ever asking anyone if it was a good idea without a second thought for whether it was needed at all. It&#x27;s also obvious to anyone that you cannot just magically make version numbers disappear and expect everything to go well.
评论 #20608755 未加载
np_tedious将近 6 年前
What&#x27;s the target audience?<p>Looks convenient for notebook&#x2F;repl style use (assuming the the editing environment still supports autocomplete&#x2F;correct and other niceties). I might just be stodgy and change averse, but I&#x27;d be a bit less willing to try things like this in production.<p>Landing page or FAQ could possibly benefit from an explanation along these lines.
评论 #20607282 未加载
sergiomattei将近 6 年前
Yeah, this is pretty awful. I don&#x27;t see myself ever using this.<p>1. What&#x27;s the difference between this and just packaging a function as a pip package? The only one I see is just shaving off a few seconds and one less command.<p>2. Where is the code running from for each plugin? Eval&#x27;ing random code just seems like a bad idea. You can argue that it&#x27;s the same as blindly installing a pip package, but this apparently happens each time on runtime and I see no option to check the code beforehand.<p>3. f and ff are pretty bad function names. I see what you&#x27;re doing, but why?<p>4. Dep management issues aren&#x27;t as common as you think they are.<p>5. Lots of these plugins are already in the standard library. XML to JSON is already possible quite trivially with a pip package. Not only that, but this seems like a less flexible version of that - and more obscure. (how to map xml to json?)<p>I&#x27;m giving this a hard pass for me, but looking forward to seeing my doubts cleared. Cheers.
motohagiography将近 6 年前
I find how offended some of the people commenting are really compelling. What is the rationale behind this? Like why do it, then why again?<p>I&#x27;m still open to the possibility this could be brilliant.
评论 #20608927 未加载
ktpsns将近 6 年前
I find the naming of this library confusing and almost clickbait. I don&#x27;t see any kind of Functor (object?) in the API, furthermore what the heck is &quot;flowing&quot;? Seems like a copycat to &quot;TensorFlow&quot;.<p>A better suited name which encodes the core feature, &quot;installationless helper routines&quot;, could really help this library to become actually recognized for what it can provide.<p>Here&#x27;s another comment about the API: I would prefer a syntax like<p><pre><code> f.name_of_function(args) </code></pre> instead of<p><pre><code> f(&quot;name-of-function&quot;, args) </code></pre> The syntactic sugar variant is easy to obtain with Python and has the advantage of much better readability.
AthLado将近 6 年前
For those developers who wish to earn an extra income in their free time while helping MOOC students complete their MOOC courses consider registering as an expert tutor here: <a href="https:&#x2F;&#x2F;moocteas-stage-web.azurewebsites.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;moocteas-stage-web.azurewebsites.net&#x2F;</a><p>Helping others learn while rewarded for doing so.
dharmab将近 6 年前
Lack of versioning support makes this absolutely unusable for anything but sandboxing. And since the imports are scattered all over the code, it&#x27;s hard for security scanning tools to check for vulnerabilities and to update libraries regularly. Pip isn&#x27;t perfect but at least piprot helps me keep libs up to date.<p>This tool was clearly designed in a vacuum.
评论 #20608695 未加载
samravshanov将近 6 年前
Hi HN! Meet FunctorFlow ^_^<p>Think of it like lego blocks for your next tech-toys and hopefully (in the future) for your next big-thing ^_^.<p>If you love tinkering with new toys then give it a try with Repl.it: <a href="https:&#x2F;&#x2F;dev.to&#x2F;t&#x2F;functorflow" rel="nofollow">https:&#x2F;&#x2F;dev.to&#x2F;t&#x2F;functorflow</a>.<p>If you want to meet cool kids like you then join our club at Discord by subscribing to our email-list.<p>...and follow updates at <a href="https:&#x2F;&#x2F;twitter.com&#x2F;functorflow" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;functorflow</a><p>Together, we will re-imagine and re-invent how Python apps should be developed.<p>Lemme know what you think!<p>Have fun!<p>- Sam
评论 #20608139 未加载
holdenweb将近 6 年前
Well, this has all the signs of well-meaning but inexperienced developers seeing a market opportunity without appreciating the many difficult problems that will have to be solved to produce something that is secure, reliable and interoperable with current development ecosystems.<p>Rather than abuse them, we might perhaps use them as an example of the Dunning-Kruger effect.
marcinzm将近 6 年前
So, aside from other comments, doesn&#x27;t this break the already mediocre tab completion side of python? Scrolling through API docs to figure out what exactly that method or argument was called gets really tedious after the 5000th time.
anentropic将近 6 年前
Why?
armitron将近 6 年前
Absolutely terrible. I can see why data science types who use &#x2F; produce a lot of (typically throwaway) Python code might be enamored with this, but as far as the Python language goes, functorflow will be another nail in its coffin if it ever gains mass-acceptance. It will turn the already messy and inconsistent ecosystem into shambles that no sane person will want to build anything robust on top of.<p>With the mass migration of Python developers into Go, this is the last thing that Python needs.
评论 #20608989 未加载
评论 #20607903 未加载
评论 #20607984 未加载