Hacker Newsnew | past | comments | ask | show | jobs | submit | richardxia's commentslogin

Scheme has the lambda special form, predating Python by decades, and its version also allows for multiple parameters in a non-curried way. SICP served as a classical textbook in computer science for multiple generations of students, so I think that a lot of people's first introduction to lambdas as anonymous functions came from Scheme:

https://sarabander.github.io/sicp/html/1_002e3.xhtml#g_t1_00...


And the use of the LAMBDA keyword goes all the way back to John McCarthy's original paper on Lisp from 1960:

https://archive.org/details/recursive-functions-symbolic-exp...


Wow wasn't aware of this long history.

My hot take for which I'm sure I'll get some hate is all languages should just include js-style arrow functions


Probably little hate, it's a long existing style. Haskell, Erlang, the entire ML line of languages, and probably many more have all used it since last century. It came from mathematical notation, and it is concise.


There is a class of hashes known as locality-sensitive hashes, which are designed to preserve some metric of "closeness".

https://en.wikipedia.org/wiki/Locality-sensitive_hashing


Was going to post the exact same thing. I make use of this repeated git blame method all the time, and for everyone who is just learning this for the first time, you'll actually want to write `git blame <commit>~` to go back one commit from the commit hash in the blame, because otherwise you'll still get the same results on the line you're looking at.

Also, if you're using GitHub, their Blame view also a button that looks like a stack of rectangles between the commit information and the code. Clicking that will essentially do the same thing command-line git operation above.


git blame --ignore-rev helps with filtering out meaningless changes in commits.


I've had some success using it in a Django app where I generate a whitelist from my main branch, and then I run vulture on my feature branch just before I open up a pull request. This way, it doesn't matter how many false positives there are because I'm only really trying to check if my changes cause any new issues. It's still not as good as other languages with better static analysis tools, but it's better than nothing.


If your company allows for it, you can early exercise and file a 83(b) election so that even as your options vest over time, you only pay taxes for the spread between your strike price and the fair market value at the date of the early exercise, rather than the date of vesting. The taxes can be 0 if you early exercise when the fair market value _is_ the same as your strike price.

https://www.investopedia.com/terms/e/earlyexercise.asp

https://www.investopedia.com/terms/1/83b-election.asp


You don't even need to leave this planet to find and example of this. In East Asia, red symbolizes prosperity, and the stock market tickers use red to indicate gains.


I will confess I didn't believe you, which makes me ashamed since I work in finance. But then I went to the Shanghai stock exchange and their English language website uses red for losses and green for gains, but if you switch to the Mandarin website, it's the complete opposite. I appreciate that insight.

[1] http://english.sse.com.cn/

[2] http://www.sse.com.cn/


I've always wondered about this.

We have a site dealing with finance for a East Asia audience. It's original audience was Europe with a blue theme (signifies trust etc) and it got extended to Asia (english speaking still). So we just themed it by changing the branding colors to the East Asia organizations color. Which is... red signifying prosperity. As in 10 shades of red.

The site has the typical warning/alert/error message feedback in forms/charts etc... in different reds/oranges/etc. I spent a bit of time trying to find a Asia focused UX guide on color for alerts/errors without luck. Does anyone have suggestions? I've asked a few different culturally native Asians from various countries and just get resigned shrugs.

Note: The messages have icons/text to go with them so it's not a total disaster but it is hard to figure out


They do for crypto-to-crypto trades :)


I would be a little bit careful. I don't know if there's a risk of counterfeiting, but I once bought what I thought was supposed to be a US region Moto X2 but instead got a European region one. The most important difference, besides getting a different power adapter, was the fact that there's actually a different wireless antennae chip, where it did not have LTE bands for my carrier in the US.


Thanks! Yes, I checked that using https://willmyphonework.net/ and it says it will work :) I used in the past (it's pretty normal to buy phones when travelling to Europe or US) and it never failed. Bythe way, Amazon seller is Google, it says "By Google", so I should trust it, right?


While I'm not 100% against humor in a codebase, ever since my company started hiring more engineers internationally, I've become more tuned in to whether a name that uses slang like "yoinker" will be understood by someone who doesn't know English as a first language.


I've been using English as my first language for nearly 20 years and am unfamiliar with "yoinker".

Just googled it and, ... nah, I wouldn't approve that PR!

(Have never heard it used down here in Australia. We've got plenty of other sayings that are local to us though.)


Hehe, I never googled yoinker until just now. I originally heard it on The Simpsons. Here's a SFW Simpsons supercut of "yoink":

https://youtu.be/CJh1hmmLLzw

I suspect there are a lot of words that used to be safe that are less so now :P


That is a fair point.


Linux-capable hardware will be coming out this year.


Where did you find this bit of information?


Some have already shipped[0], though the availability is very limited.

[0] https://www.crowdsupply.com/sifive/hifive1


These have very limited RAM, and won't run Linux.


128MB Flash off-chip, and I know of several Linux distros that can run with under 50MB, so I would say it would be entirely possible to run it.


128 MB Flash, not RAM.

Linux will run in 8 megabytes of RAM if you want. The SiFive board has 16 kilobytes.


What's to stop you connecting up an old SIMM card? The memory won't be fast, but doable.

I saw Flash as the larger limitation, as expanding that is problematic.


> What's to stop you connecting up an old SIMM card? The memory won't be fast, but doable.

There aren't enough pins. Certainly not enough pins accesible in single-cycle reads/writes. Maybe you could multiplex them with external hardware to talk to a SIMM but you'd be talking to memory at single megahertz effectively.

An SDRAM controller in an FPGA on the other side of the QSPI link would be faster, but it'd still be slow. You could get it to work to say you've done it, but it'd run at literal-days-to-boot speeds.

The board (and chip) is meant and marketed for freetards who like Arduinos - so I bought one and so did several of my friends. LEDs were blinked and better futures dreamt of. It's cool. But it's not a workstation chip by any stretch of the imagination.

Hopefully the next version will have a real external memory bus.


I reckon it would be more in the range of minutes (depending on how complete of a linux system we are talking about here). The QSPI peripherial can run at 100MHz if I read the datasheet correctly (so you can read/write data at about 400MBit/s minus overhead). For reference booting linux on an ATmega@24MHz running an ARM emulator and external SDRAM with an memory bandwidth of about 300kbyte/s seems to take about 6 hours [1]. Assuming the SiFive is just as efficient as the ATmega it would take less than a minute (assuming the memory bandwidth is the only bottleneck and not the slow CPU - the SiFive also has 16kB of L1 cache and has a clock rate 10x faster).

[1] http://dmitry.gr/index.php?r=05.Projects&proj=07.%20Linux%20...


OK, maybe it could work. I remembered that ATmega port as slower. Maybe it should be tried.


Just for the records, you can run ELKS, a Linux variant for small processors, on 8086 hardware. Ages ago I successfully booted it on a 8088 based ancient industrial system with less than one megabyte of RAM and two floppy drives (hard disk? what hard disk?!? :). But the Linux a "normal" user would run is a very different thing which would require some more power.

http://elks.sourceforge.net/


I guess it's rather due to the thing not having an MMU


Linux can run on systems that lack an MMU.

https://unix.stackexchange.com/questions/190350/mmu-less-ker...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: