Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rabarbers
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Ask HN: Looking for a good course to learn proof assistant Lean 4
5 points
by
rabarbers
11mo ago
|
4 comments
2.
▲
by
rabarbers
5y ago
Thanks for explaining! But how about this example: x:42 {x+1}[5] It results in 6 It seems like you can define variables with the name 'x', but when you do not have explicit parameters, then the identifier 'x&#
3.
▲
by
rabarbers
5y ago
I tested and seems, that x is the first implicit parameter, y - second, z - third. It is as stated in their online documentation. When you try following example: {y+x*z}[1;2;3] It gives result: 5 And in Q you cannot define implicit p
4.
▲
by
rabarbers
5y ago
A1 in Javascript pseudocode would be: function A1(x, y) {return x*y + x; } But A2 would be: function A2(y, x) {return y*x + y; } If you do not like the default order of implicit parameters, you can always use Grace~ operator t
5.
▲
by
rabarbers
5y ago
Can you explain the difference little bit more, Maybe using Javascript pseudocode as comparable example? I want to understand how Q is different from KatLang. The problem with me is that I do not know where I can try Q code, therefore I rel
6.
▲
by
rabarbers
5y ago
Link to documentation is broken: https://codigo.so/docs/ (also link to community is broken, but I care more about Documentation link).
7.
▲
by
rabarbers
5y ago
More specifically: the first unknown identifier becomes the first parameter for the closest algorithm defined with {} brackets. Properties (also called named algorithms) are defined as {} context. And KatLang program also is defined as {} c
8.
▲
by
rabarbers
5y ago
According to Q documentation, Q supports only 3 implicit parameters x, y, z: https://web.archive.org/web/20190213035913/http://code.kx.co...
9.
▲
by
rabarbers
5y ago
Yes, the first unknown identifier becomes the first parameter, next unknown identifier becomes next parameter and so on...
10.
▲
by
rabarbers
5y ago
Probably picking the term "perfect" was not the best think I could do. Seems, that others actively fight against it. I still believe that the perfect syntax has both attributes: 1) it is the shortest 2) it is expressive - you can
11.
▲
by
rabarbers
5y ago
You need to carefully pick the right brackets () or {}. You can define an algorithm with both of the brackets, the difference is that () does not capture the parameter, but {} captures the parameter which is used inside the brackets. When Y
12.
▲
by
rabarbers
5y ago
I will do some research on APL and your mentioned 'commute operator', cannot comment on it now. But regarding languages: k/q the issues with them is that they use x, y and z as keywords for the parameters. x is always the fir
13.
▲
by
rabarbers
5y ago
I am mainly inspired by C#. Ok, I can agree, that some things depends on the interpretation. You can think about several returned values as a tuple. In designing Algorithm concept, I was thinking how to decompose or deconstruct a mathematic
14.
▲
by
rabarbers
5y ago
I think, that there is needed Android app - calculator using KatLang syntax. That (or maybe iOS version) would make You care about it. I am planning to use KatLang syntax for physics tests in schools. Physics formulas can be defined using K
15.
▲
by
rabarbers
5y ago
Your OCaml function example looks like feature I call conditional parameters in KatLang (inspired from Erlang). In mathematics exists many different concepts which are called perfect. For example, perfect numbers. God called Lucifer a perfe
16.
▲
by
rabarbers
5y ago
Tuples require object deconstruction syntax. KatLang does not have object deconstruction feature. KatLang has simply deconstructed the function into input and output. In KatLang you define algorithms by specifying inputs and outputs. If You
17.
▲
by
rabarbers
5y ago
Modern math syntax is relatively new, it started to form in 18th century. It is not too late to make some changes. Implicit parameters is only one feature in KatLang. Classic math functions can return only one value, that is why in KatLang
18.
▲
by
rabarbers
5y ago
It is not the same. A1 = x * y + x A2 = y * x + x A1(1, 2), A2(1, 2) returns results 3, 4 If You want to change parameter order, You can use Grace~ operator like this: A1 = x~ * y + x it moves parameter x
19.
▲
by
rabarbers
5y ago
When you have A=x y+x from math perspective it looks like assigning a value to a variable. When You use A(x,y)=x y+x it looks like math function definition. You can look at it as if used variable assignment syntax and changed underlying sem
20.
▲
by
rabarbers
5y ago
KatLang parser is executed as Blazor webassembly app on client side, therefore your entered KatLang code is not sent to the server. But I agree, it needs https, especially when KatLang supports operators like 'load' which can load
21.
▲
by
rabarbers
5y ago
Page does not require any authentication and I wanted to make it simple. But too many people are asking about https, so I will configure https.
22.
▲
by
rabarbers
5y ago
I was obsessed with the perfect syntax. Declaring method parameters in method parameters list is redundant, because the parameters appear in the method body anyway. This approach is not the best in all situations, but for short expressions,
23.
▲
by
rabarbers
5y ago
The author here. I am ready to answer any questions about KatLang. The future plan is to create android app and I hope that it will become the future calculator. I have been postponing android app creation for years, but now KatLang is in g
24.
▲
Show HN: KatLang – Language for Calculations
(katlang.org)
17 points
by
rabarbers
5y ago
|
45 comments
25.
▲
by
rabarbers
12y ago
I started with udacity course: https://www.udacity.com/course/cs262 it teached how to build simple javascript parser.
26.
▲
by
rabarbers
12y ago
I do not understand why should HN be afraid to give reasonable reason for down voting. Looking at picture I also thought that Maryam Mirzakhani is man. I understood my mistake only by reading down-voted comments. Someone is spoiling valuabl
27.
▲
by
rabarbers
12y ago
A) cultures are different and such subjective argument is not enough to use down-vote. If you are some smart ass who want something without emotions, go and chat with your PC, but if you are reading public opinions, do not be surprised that
28.
▲
by
rabarbers
12y ago
Knuth wrote: soon USA will lose domonant positions. His prediction was wrong, which leads me to think that his oppinion about software patents was highly theoretical assuming how it would be if..., because he truly believes that... Such arg
29.
▲
Implicit lambda calculus
(publicationservice.org)
1 points
by
rabarbers
12y ago
|
0 comments
30.
▲
Ask HN: Do you need implicit parameters/arguments?
1 points
by
rabarbers
13y ago
|
0 comments
More ›