|
00:06
Manifest0 left
02:10
sibl joined
03:17
sibl left
03:21
sibl joined
04:06
sibl left
04:07
sibl joined
05:59
sibl left
06:04
sibl joined
06:17
sibl left
06:18
sibl joined
07:05
Manifest0 joined
07:58
dakkar joined
09:05
sibl left,
sibl joined
09:27
sibl left
12:59
sibl joined
13:05
sibl left
13:58
apogee_ntv joined
|
|||
| disbot4 | <antononcube> How can I make this code a one-liner? my @s = -2 ... 2; my @p = @s; (^3).map({ @p = @p X @s; }); @p .= map({ .flat(:hammer) }); | 15:25 | |
| <antononcube> Hmm... I forget there is cross... | 15:26 | ||
| <antononcube> cross(@s xx 4) | 15:28 | ||
|
15:35
human-blip left
15:37
human-blip joined
16:35
dakkar left,
dakkar joined
|
|||
| disbot4 | <librasteve> rubber ducking? | 16:41 | |
|
16:44
dakkar left
|
|||
| disbot4 | <antononcube> So, it seems... | 16:53 | |
| <antononcube> The idea was to make a "two-liner" in Raku that produces this graph, which is related to the recently disproved by OpenAI conjecture of Erdos. | 16:54 | ||
| <antononcube> cdn.discordapp.com/attachments/768...d53b8& | |||
| <antononcube> (I cannot do it in less than 4 lines.) | 16:55 | ||
| <librasteve> very pretty … i am curious what the 4 lines are | 17:59 | ||
| <antononcube> use Graph; my @p = cross((-2 ... 2) xx 4).map({ dot-product($_, i <<**>> (0, 1, 4/3, 7/3)) }); my $g = Graph::Relation.new({abs(abs(@p[$^a] - @p[$^b]) - 1) ≤ 1e-8}, ^@p.elems, as => {.Str}, vertex-coordinates => @p.kv.map(-> $k, $v { $k => [$v.re, $v.im]}).Hash); | 19:17 | ||
| <antononcube> 2-lines. But the latest published version of "Graph" needs a separate line to set the vertex-coordinates. | 19:19 | ||
| <librasteve> very nice | 19:25 | ||
| <antononcube> Lots of discussions about that conjecture: - "OpenAI disproves Erdős unit distance conjecture" - "An OpenAI model has disproved a central conjecture in discrete geometry" - Thread on X - My animation - Can be also done in Raku, BTW | 19:29 | ||
|
20:11
apogee_ntv left,
apogee_ntv joined
20:16
apogee_ntv left
20:17
apogee_ntv joined
|
|||
| disbot4 | <comborico> How many characters long can a line be until it should be indented? | 22:38 | |
| <comborico> my @sorted_players = %sets_won.key.sort({ %setswon {$} }).%matches_won.key.sort({ %matcheswon{$} }).reverse; | 22:40 | ||
| lizmat | any length you like, but historically many people limit it to about 80 | ||
| disbot4 | <comborico> (reference there) | ||
| lizmat | two notes here: in Raku you can use hyphens in identifiers, so @sorted-players instead of @sorted_players (this is often referred to as "kebab-case") | 22:41 | |
| disbot4 | <comborico> 80 is challenging. Especially for raku. I wonder if there is a new historical standard. Monitors today are wider. | ||
| lizmat | note that you can split something like: %sets_won.key.sort({ %setswon {$} }).%matches_won.key.sort({ %matcheswon{$} }).reverse; | 22:42 | |
| over multiple lines: | |||
| foo.bar.baz.zippo | |||
| could be: | |||
| foo.bar | |||
| .baz.zippo | |||
| disbot4 | <comborico> I see! But it looks nicer in full length, and better readability to me. | 22:43 | |
| <comborico> I am accustomed to kebab case, coming from LISP. But trying out the other. | |||
| <comborico> If you had to guess what the new standard of characters would be, or what is your preferred length? | 22:44 | ||
| lizmat | some people appear to prefer 132 for some reason | 22:46 | |
| disbot4 | <comborico> Some people like 432 hertz music over 440. | 22:49 | |
| lizmat | personally, I'd like to stick to 80, but then again I'm old school as in my very first programs were written on punched cards with: 80 columns :-) | ||
| disbot4 | <comborico> I usually stick with the old school -- the school of hard knocks. But in this situation, its very tempting to go with the 132 people. haha | 22:50 | |