Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
geocar
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
70 ms
·
841.
▲
by
geocar
7y ago
I think that's part of the theory behind q, which trades the monadic (unary) definition of operators for names, so: +: becomes flip, =: becomes group; ?: becomes distinct, and so on. I'm not convinced though, because Python+numpy
842.
▲
by
geocar
7y ago
> ‘Prelude’ is the set of standard functions and types that you don't have to import to use. Python comes with a rich standard library, but most require imports to use. I might not understand this about python. $ python3 P
843.
▲
by
geocar
7y ago
> our native language is much more embedded in the brain than programming languages. I think it's possible that might have more to do with the fact we use "our native language" more. > Yes. And I'd cause even more
844.
▲
by
geocar
7y ago
> But it's an external database with its code and its optimizations. You're completely mistaken. It's not an "external database". That's a regular, ~600kb interpreter download from kx.com Those lines are al
845.
▲
by
geocar
7y ago
> I don't think keeping most types out of prelude should be a downside I don't understand what that means. > I don't really know what "persists the unique index of f" means, but this seems similar to shelve.
846.
▲
by
geocar
7y ago
> Excellent question! Personally, I'd argue that a language cannot be viewed in isolation from the problems it's trying to solve. I'm not sure I'd agree with that, at least not entirely. A language is a tool for think
847.
▲
by
geocar
7y ago
> Why do I need to [approach this with an open mind]? Because those are the standard terms of intellectual discussion. People going into such a conversation without an open mind are called idiots, and they're not worth taking too se
848.
▲
by
geocar
7y ago
> Unless everybody is born learning a language, no we don't. Even 'The one they use the most' varies over time. Nobody is born having learned a language. It's something even babies have to learn and they know nothing!
849.
▲
by
geocar
7y ago
Thank you. The narration is what happens in my brain when I read it. I don't need it in the source files. Keeping the file short is the best way to keep it consistent (what you refer to "getting out of sync")
850.
▲
by
geocar
7y ago
It's a little funny comparing a language with another language+plus-its-entire-ecosystem, but k fares remarkably well I think. Counter could be #:'=: (count each group) c:#:'=: Values would just be dot. Counter[x]&am
851.
▲
by
geocar
7y ago
> The comparison with languages as Chinese is not very appropriate because everybody has a native language. In that sense, programmers have more of a 'tabula rasa' (not completely, of course) that makes for more appropriate com
852.
▲
by
geocar
7y ago
I mean, if you work on a CRUD application, you're kindof stuck where you are. If it's written in Python, I think it's naive to think that your JavaScript knowledge will be very helpful: So many things are just too different.
853.
▲
by
geocar
7y ago
I think that's an interesting experiment, but I don't believe it will produce the results you predict: I haven't written in Postscript for over ten years, but I just picked up some random postscript code and have no problem r
854.
▲
by
geocar
7y ago
> I also don't see the point of optimizing on the number of line of code if the complexity per character is increased (did I just invented a kpi here?) It doesn't increase linearly though. #:'=: is seven characters that me
855.
▲
by
geocar
7y ago
> does it have a wicked lower TCO because you literally have insanely less lines of liability in your code, libraries, dependencies, etc? Yes. q (a language and distribution of k4) has a built-in webserver with websockets, messaging, all
856.
▲
by
geocar
7y ago
> I doubt that K can reduce line count by a factor 1000 though. It adds up! Consider something like this: (defun count (list) (let ((hash (make-hash-table))) (dolist (el list) (incf (gethash (cadr el) hash 0
857.
▲
by
geocar
7y ago
> I think you're completely missing the point here. The assumption wasn't that old code is unreadable, but that you have trouble understanding it after NOT looking at ANY K code for five years. Fair enough. I don't see any
858.
▲
by
geocar
7y ago
> Then it's not perfectly readable. That, or your definition of readable is useless because then any programming language is readable given enough study time. Given a fragment of Chinese, if you do not know Chinese, would you say it
859.
▲
by
geocar
7y ago
> You are making the same arguments as Perl fanatics who used every possible abbreviation in their language 25 years ago. How much of that is even comprehensible now without a major reverse-engineering effort? Perl is inscrutable in a di
860.
▲
by
geocar
7y ago
> https://a.kx.com/a/k/examples/xml.k > Where's the pedagogy? Where are the comments? Most of that document _is_ comments. There's a comment on almost every line, very similar to your perl exa
861.
▲
by
geocar
7y ago
> but without the natural language prose which makes mathematical papers readable A mathematical paper introducing some meaningful worker function uses English because mathematical notation is insufficient for describing computation. Tha
862.
▲
by
geocar
7y ago
> the claims it's perfectly readable, and anyone who says anything otherwise is either stupid, lying, or too poor to understand it are not useful. Yes: It is perfectly readable once you know how , and anyone who says anything other
863.
▲
by
geocar
7y ago
I figured as much, but I feel pretty strongly that every piece of state needs to be accessible to a user or to the server, otherwise you lose control of it and that can war on. I know that for performance reasons, or for privacy reasons,
864.
▲
by
geocar
7y ago
Yes you can. You file what's colloquially known as a "John Doe lawsuit", then serve a subpoena to a third party (such as Namecheap) to obtain that information. You then have the information to amend the pleading and proceed a
865.
▲
by
geocar
7y ago
Much better? I'm not sure about that, but this seems like a fun problem for exploration. Also, 49µsec sounds like a pretty easy target to beat. I used the following in q to build a data set I could play with: \wget https:/&#
866.
▲
by
geocar
7y ago
I agree these performance numbers don't seem great. Using q (another interpreted language; not compiled) I get 5µsec on my Macbook Air: Here's my load script: \wget https://downloads.pwnedpasswords.com/passwor
867.
▲
by
geocar
7y ago
> Hard to beat low level custom coded solutions. Challenge accepted! I used the following in q to download and load the data into a disk object I could mmap quickly: \wget https://downloads.pwnedpasswords.com/passwor
868.
▲
by
geocar
7y ago
I'm not familiar with either of them, but that seems like a lot more code! How does changing the URL trigger a state change? Does the whole page need to reload? In my system, my "Reader" knows this object so it can just call
869.
▲
by
geocar
7y ago
Hey go nuts. Whatever works for you. But if you wanted to use other applications that didn't have such a switch, you might consider looking into a hotkey or an extension. I found this[1] after a quick ddg. Maybe it'll help? [1]:
870.
▲
by
geocar
7y ago
I've thought about something like that, but then what namespace would the keys belong to? Are they just some kind of hidden "superglobal" and if so, how do you reconcile the intention that state be limited to its component? O
More ›