Better HN
topnewbestaskshowjobs
Log inSign up

frogcoder

423 karma · joined Aug 10, 2013 (13y ago) · 65 submissions

Submissions

comment 5y ago · link · parent

Well, the BDFL is probably the only dictator we all love.

Any decision he made is infinitely more than I could. Because I am just a python user, and an outsider in any decision making process. So for me, he's right all the time. That's a perfect definition of a dictator :)

But I do have wishes. It's like I love my parents but I do want to stay up late sometimes.

Yeah, I totally missed the part he removed reduce from builtin. Sorry about my memory. map, filter, or reduce, it does not matter. As I stated, some problems are better solved functional way. Because Python is such a friendly language, if it includes functional paradigm properly, it would make the functional part more readable than other functional languages.

FP is scary not because it has evil syntax to keep people at distance, it's just an alien paradigm to many. Lot's of non functional languages has functional support, which doesn't make them less readable. E.g. C#, JS. I suspect these languages have helped many understanding FP more. Python could make the jump by including more FP, but not turning into a full-fledged FP.

BTW. I'm still glad reduce is kept in functools.

comment 5y ago · link · parent

Yes! List/Dictionary/Generator comprehension is one big plus for Python, it probably came from the functional world. I use it whenever I can.

> But even the lambda keyword isn't so bad, you can create a dictionary of expressions to call by name, a lot more compact them declaring them the usual way imo: https://github.com/jazzyjackson/py-validate/blob/master/pyva...

lambda keyword is better than nothing, it definitely can be improved. Just imaging using javascript syntax in your example.

> To your point, I only recently learned there's a Map function in Python, while in JS I'm .map(x=>y).filter(x=>y).reduce(x=>y)ing left and right.

I think with the introduction of list comprehension Guido saw map function was no longer needed, that was why he wanted it removed. I don't deny it, but using map and filter sometimes are just easier to read. Say [foo(v) for v in a] vs map(foo, a).

comment 5y ago · link · parent

I strongly think Python should have more functional programming support. Functional Programming Languages are usually scary to look at for many programmers. Python would not only be a good FP introduction to them, it would also benefit greatly.

Years ago I found out the Guido wouldn't let tail recursion included, and even tried to remove map function from built in functions. Therefore I got the impression that python wouldn't have further support in FP. I really wish that is not the case. With the coming pattern matching in 3.10, My hope is high again.

I have very high respect for Guido van Rossum, I'm not here to discredit him. He's one of the authors in PEP 634.

I wish python would have simpler syntax for lambda which is currently using the lambda expression, even JS is doing better on this. A built-in syntax for partial would also be great. It could be even better if we can have function composition.

Some problems are better solved the FP way. It could even make the program more readable which is one of the strengths of Python.

comment 5y ago · link · parent

Site is down. I believe this is the same article by the author.

https://towardsdatascience.com/functools-the-power-of-higher...

comment 5y ago · link · parent

Yeah, everyone wants to chill, even be unproductive sometimes. The difference in China is that this kind of expression is censored online and attacked by the news media. WTF.

comment 5y ago · link · parent

China does something evil.

The U.S. does it too (without giving any evidence).

It's OK China doing it now.

comment 5y ago · link · parent

Yeah, agreed. While I think it's a trashy tabloid, it's also less biased comparing to other media in Taiwan. Since other news sources are also becoming sensationalist and gossipy if not already, I ended up read Apple Daily more often. Not an optimal situation unfortunately.

comment 5y ago · link · parent

I've been enjoying BBC's podcast on this subject. Darknet Diaries also has an excellent podcast episode on it. https://darknetdiaries.com/episode/72/

comment 5y ago · link · parent

I believe most tutoring is forced by parents not voluntarily by the pupils. Having higher and better academic achievements is ingrained in the culture, this is important. The banning would only create black markets for tutoring which can be easily done.

It looks like the online tutoring giants would be affected the most. Since the CCP is having crackdowns on online tech companies, I wonder if the banning could also be part of the crackdown.

comment 5y ago · link · parent

I am no expert, but I think one major reason was Trump. He was a supporter of the lab leak theory. Like many others, I was quick to dismiss anything Trump said, and I am not even American. Everything Trump said sounds like a conspiracy.

I also finds China's strong denying and uncooperativeness of finding out the virus origin is strange. People would not blame any country if the outbreak came from a natural origin, their reaction makes me think something is going on there.

comment 5y ago · link · parent

By totally doesn't look naughty at all is spewing white matter onto human faces, no, not naughty at all.

Yep, I think we are talking about the same episode where star fleet officers do naughty things.

comment 5y ago · link · parent

I just watched a classic Star Trek episode.

I'll try not to give any spoilers for those that have not watched it.

Bunch of human were infected by some kind of plant, they became super healthy but content. The episode deemed the infected ones unproductive, but I think that's some life worth living.

43.

The 'good luck' snack that makes Taiwan's technology behave(bbc.com ↗)

2 points · by frogcoder · 5y ago · discuss

comment 5y ago · link · parent

I upvoted, but I really wanted to down vote you.

comment 5y ago · link · parent

> But in context: > > - Australia has similar laws. > > - Snowden releases showed the US don’t even ask, they just take it. > > So it’s not like there is a huge amount of difference around the world.

I am not familiar with Australia privacy law, could you give me a rough idea what is look like?

Snowdon case made the US government look bad, please don't use the same reason to make the Chinese Communist Party look good or OK.

It's kind weird when something bad happens, everyone just points at the US and says they do that too! The CCP did something bad, Somehow it's OK because the US government did something bad.

If you are an US national and living in the US, you can complain and bitch about your government all you want and not worrying about your safety, hence you can talk about the Snowdon case or berate the president, and things might change. Would you dare doing that in Chinese soil even if your are not Chinese.

comment 5y ago · link · parent

I am seeing this all the time. America is doing this too, why just blame China.

Yes, governments around the world have one thing in common, they are full of ASSHOLES. Actually, in general people are assholes. Bad things tend to happen.

You can have CNN and Fox broadcast different views somethings extreme, and many other media outlets expressing views somewhere between them. Try that in China, you would think twice if you are not even trying to PRAISE the government.

You cannot compare a demacracy to a authoritarian/dictatorship. They certainly always have something in common, the difference is level of oppression. The authoritarian are always on the extreme side, that's why they are called authoritarians.

Comparing demaracies to authoritarian is giving execuses to keep the oppressions going.

It's nice and necessary that you can criticize your government even in public. Don't give dictators execuses when your government pisses you off.

comment 5y ago · link · parent

> most citizens would rather have whatever it takes to have no riots

Isn't it a brilliant tactic deployed by the regime, making people think that freedom of speech equals riot on the street. Like the USA is burning in hell with all the black live matters protest and the capitol protest/riot?

comment 5y ago · link · parent

Every time this came up, I always insisted that it should be called booby tea. Because that's exact what Boba means, large breasts. That's a slang term meaning king of wave, because large breasts move in wave motion.

The pearl tea name came later, due to the vulgarness of it's predecessor I guess.

Now, you can enjoy more next time you suck on those sweet bouncy topioca.

comment 5y ago · link · parent

This reminds me of this Japan only very technically impressive IBM palmtop PC110 from 1995. It's still amazing to see it in action (with side talking phone and fax!)

https://www.youtube.com/watch?v=D-v6kyEDCNo

comment 5y ago · link · parent

Your guess is pretty on the point. TSMC has been jokingly hailed as "The protector of the country" by the Taiwanese media. The chips have military significance for the USA, as it has been trying to avoid China made electronics in all (or most?) equipments.

comment 6y ago · link · parent

I'm no expert on creating a CA. The changelog recently has an episode on Let's Encrypt. It covered a lot about how Let's Encrypt got started. Quiet an amazing job, I think you should listen to it or at least read the transcript.

https://changelog.com/podcast/389

comment 7y ago · link · parent

Although I've been avoiding multiple exists, I don't think the the patten is that bad, just more of personal taste. However, I think it's import to let the readers of the function know what the function mainly do first, insead of the edge cases.

In functional thinking, it's actually very helpful to think of the edge cases and get them out of the way first. When put in coding, I like to think it's more helpful to let the readers know the purpose of the function first, they could dig deeper later if they choose to.

comment 7y ago · link · parent

Well, he built the system, Emacs is the front end. It's just an awkward front end for most of the people, but with proper training, anyone can pick it up, it's not like ask them to maintain the system.

For new formulas, yeah, It's hard to input new formulas, even in spreadsheet. The system is somehow complex, you probably need a UI for new formulas too, even if it's in spreadsheet.

54.

20 Years of Open Source Erlang: OpenErlang Interview with Robert Virding(erlang-solutions.com ↗)

2 points · by frogcoder · 8y ago · discuss

comment 8y ago · link · parent

I used to love Opera until they made the major revision. Funny I just installed Vivaldi browser yesterday, writing this comment on it. Vivaldi is more Opera than Opera, it's no accident the founder is also one of the founders and former CEO of Opera.

comment 8y ago · link · parent

I was wondering about the AEB when the Uber accident happened. It should’ve been equipped with AEB but it still hit a pedestrian. Did they just pull out the whole software and replace it with their own navigation logic?

comment 9y ago · link · parent

This is how China "blocking" web site from most of the world other than China. When many sites are blocked out right, many more are accessible but painfully slow. On the other hand, if you go to any major Chinese site, it would be lightning fast. By doing this, those foreign sites are rendered almost useless.

comment 9y ago · link · parent

here is her ted talk

https://www.ted.com/talks/suzanne_simard_how_trees_talk_to_e...

comment 9y ago · link · parent

Well, if you have home robotics, what stops you from hiring a self driving service to fetch the laptop for you.
123