🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:00
reportable6 left,
reportable6 joined
|
|||
Voldenet | Using rakumod files out of zef modules is not very fun | 00:05 | |
Nemokosch | I mean, there is just no directory = package correspondence in Raku, right? | 00:08 | |
no matter if we declare something to be "the root folder" or not | 00:09 | ||
Voldenet | Well, since you can define whatever structure you want… | ||
Nemokosch | not only can you but from what I know, you have to | ||
Is Foo/Bar.rakumod any closer into being a Foo::Bar module than really-funny-filename.xyz? | 00:11 | ||
guifa_ | inasmuch as `use lib …` would interpret Foo/Bar.rakumod in that lib folder as Foo::Bar | 00:14 | |
Nemokosch | well, would it? | 00:15 | |
because the -I flag didn't, as illustrated by grondilu | |||
Voldenet | Foo/Bar would need `use ../Foo` or some similar weirdness | 00:18 | |
in fact, unless you define root dir explicitly, no matter what convention you use, you end up with nonsense and ambiguities all over the place | |||
Like should `use Foo` in `Foo/Bar` use `./Foo.rakumod` or `../Foo.rakumod` when invoked from the parent and both files exist? | 00:19 | ||
Nemokosch | what does the "files" key do in META6? | 00:20 | |
guifa_ | Nemokosh: I just checked it | 00:22 | |
`use lib …` treats directories as namespaces | 00:23 | ||
use lib `foo`; use A; use A::B; use bar::A::X; would load out foo/A.rakumod; foo/A/B.rakumod; foo/bar/A/X.rakumod | 00:24 | ||
Voldenet | What if A did `use B` without explicitly saying `use lib` though? | ||
or B did use X | 00:25 | ||
it could simply use `current .rakumod directory` as reference, or folder defined in `use lib` above | 00:26 | ||
00:26
nort left
|
|||
guifa_ | I believe it uses the folder defined in use lib, because that's what you would use even in modules | 00:28 | |
Nemokosch | use lib sets up a FileSystem compunit repository, no? | 00:29 | |
Voldenet | you can't use `use lib` in modules though | ||
`'use lib' cannot be pre-compiled and thus cannot be used in a module` | |||
guifa_ | My point is why would the naming convention suddenly differ? | 00:30 | |
Unless the module itself uses `use lib …`, I would expect Raku to search for any referenced module name from the root directory given in use lib | |||
so if lib/A/B/C/D.rakumod says `use E`, I would expect it to load lib/E.rakumod | 00:31 | ||
does it in fact load lib/A/B/C/D/E.rakumod ? | |||
Voldenet | It does load… both | 00:34 | |
if there is lib/A/B/C/D/E.rakumod, it gets loaded first | |||
But then when you have E.rakumod in deep structure, how do you load lib/E.rakumod | 00:35 | ||
Nemokosch | > 'use lib' cannot be pre-compiled and thus cannot be used in a module This sounds stupid. Precompilation is meant to be a feature, not a curse. | 00:37 | |
no precompilation exists | |||
guifa_ | Well, there would be the bug to me. Only allow the full name — I don't think I've ever seen the use E to refer to the next deeper one | 00:38 | |
although perhaps one would need `use GLOBAL::E` | 00:39 | ||
based on my quick read of S10, but currently reading S11 which deals more directly with modules | 00:40 | ||
Voldenet | imo in case where both E.rakumod and **/E.rakumod can be loaded, compiler should start complaining | 00:44 | |
it's okay for it to work in such a way, but ambiguities here shouldn't be allowed | |||
guifa_ | (I'm actually now not convinced that S10/S11 say that — I think they're looking for current installed symbols. I think it just doesn't handle it, as the `use lib`statement isn't covered anywhere | 00:45 | |
Nemokosch | github.com/rakudo/rakudo/blob/e5e5...m.pm6#L318 | 00:47 | |
this seems interesting for me at least. The construction of the provides section for distributions without any META6 | |||
1. replace slashes to :: 2. reduce multiple consecutive colons to a length of 2 3. remove the first part of the hierarchy 4. remove anything starting from a dot (? not terribly descriptive) | 00:50 | ||
Voldenet | So apparently what gets loaded is tied to how DIR-RECURSE works | 00:53 | |
I'm not sure how do I feel about that… | |||
before creating `Foo/Foo.rakumod` > {Bar => {rakumod => Foo/Bar.rakumod}, Foo => {rakumod => Foo.rakumod}} | 00:57 | ||
after creating `Foo/Foo.rakumod` > {Bar => {rakumod => Foo/Bar.rakumod}, Foo => {rakumod => Foo/Foo.rakumod}} | |||
Nemokosch | from the directory that contains Foo/ ? | 00:58 | |
Voldenet | Yes | 01:00 | |
I'm under the impression that this all depends in what order you get files | |||
and I'm sort of expecting this to be dictated by filesystem… | |||
so, you can write fusefs to change behaviour of modules loading | 01:01 | ||
Can you feel the horror yet? :D | |||
Nemokosch | Perhaps it would be better if this didn't work at all | ||
Voldenet | Some sanity check `if module exists then die` in the line you've pasted probably | 01:02 | |
there's none of problems if the hash above has no ambiguities | 01:03 | ||
01:04
xinming left
01:05
xinming joined
|
|||
Nemokosch | you know, the funny thing is | 01:09 | |
I took grondilu's sample | |||
raku -I. -e 'say $*REPO.distribution.dist.meta;' | |||
this yields something sane | |||
{api => *, auth => , files => {}, name => /tmp/grondilu-test, provides => {Foo => grondilu-test/Foo.rakumod, Foo::Bar => grondilu-test/Foo/Bar.rakumod}, resources => (), ver => *} | |||
makes sense, right? | |||
when I edit the code to run to actually use Foo::Bar | 01:10 | ||
raku -I. -e 'say $*REPO.distribution.dist.meta; use Foo::Bar;' | |||
the whole thing explodes and I get loads of stuff from /tmp | |||
which coincidentally ruins the correspondence between the supposed file and the namespace | 01:12 | ||
it explodes the same way if I use use lib instead of the I flag | 01:14 | ||
apparently the "use lib" inside Foo::Bar did something funny that retroactively overwrote the repository | 01:17 | ||
Voldenet | I'm betting that the source of this is that it's not explicitly defined anywhere in tests | 01:18 | |
so the behaviour doesn't even have to be the same everywhere | |||
tonyo | -I. and -Ilib do different things | 01:19 | |
Nemokosch | that's good to know | 01:20 | |
but it would be even better if they didn't, probably... | 01:21 | ||
Voldenet | otoh, now I'm pretty convinced that `use lib` is evil | ||
Nemokosch | by the way, I again think that I found why grondilu's snippet was indeed wrong | ||
Voldenet | because it usees Foo::Bar instead of Bar? | ||
Nemokosch | and it demonstrates my former point from a couple of days ago, that implicit namespace declarations are evil | ||
> method talk { use Foo; Foo::talk; } | 01:22 | ||
this is the problem | |||
that Foo is a different Foo | |||
Voldenet | in fact, `unit class Foo::Bar` doesn't seem like something that should be in Bar file | 01:25 | |
Nemokosch | by the way, there is no amount of no precompilation that would keep you from the infamous .precomp folder to show up | 01:26 | |
Voldenet | it should be `unit class Bar; …` and then users of this class should see it as Foo::Bar _if_ loaded in the context of subdirectory | ||
Nemokosch | I don't know, Rakudo is full of that structure | ||
github.com/rakudo/rakudo/blob/main.../Parts.pm6 | |||
I think the mere notion of unit class Foo::Bar is damned, though | 01:27 | ||
it can automagically create a namespace Foo for you | |||
Voldenet | but it barely serves any point – C# had that problem for a long time, where random namespaces were in random locations | ||
It was fixed by tools that help you change namespaces when you move the file… | 01:28 | ||
Nemokosch | I mean, this is worse than the Java-ish "package foo.bar.baz" thing | ||
Voldenet | So, what was the point of even having namespace if it's supposed to mirror the folder structure | ||
Nemokosch | a namespace was born, from thin air | 01:29 | |
Voldenet | I'm not saying that having one file with multiple namespaces is bad | ||
or that Foo.rakumod can't declare Foo::Bar and 5 other classes | |||
but it should be implicit that when namespace is missing, it gets materialized out of thin air | 01:30 | ||
Nemokosch | and now you are damned to have an implicit name conflict with any other symbol (namespace in particular) called Foo | ||
Voldenet | and it should mirror the folder structure | ||
Nemokosch | It's not even obvious whether Foo::Bar would be attached to an existing namespace or a new one | 01:31 | |
Voldenet | m: role A { has $.x }; role B { has $.x; }; class C does A does B { } | ||
camelia | ===SORRY!=== Error while compiling <tmp> Attribute '$!x' conflicts in role '<anon>' composition: declared in both 'B' and 'A' at <tmp>:1 |
||
Voldenet | This is what should happen. | ||
Nemokosch | a new one - that shadows the old one by usual scoping rules | ||
Voldenet | when given `Foo::*`, it should be treated as a namespace, everything under the Foo/ directory must be here | 01:33 | |
in cases of conflicts (e.g. Foo.rakumod having `Foo::Bar` and Foo/Bar.rakumod having `Bar`) errors should stop you | 01:34 | ||
Nemokosch | back to the snippet... it should be suspicious that the same error shows up without any use Foo | ||
so yes... use Foo must appear before unit class Foo::Bar | 01:35 | ||
or else you just use the dummy Foo | |||
I mean... it's very good for my ego that something actually causes problems only days after I bring up how damned this whole concept of implicit namespace declarations is | 01:36 | ||
but would it not be better if somebody took this caveat seriously at least 10 years ago? | 01:37 | ||
Voldenet | probably | 01:38 | |
but I'm betting it was implemented and it worked | |||
Nemokosch | yes, it "worked" :painharold: | ||
I think it was Nick who brought up Chesterton's fence a while ago. How ironic. | 01:39 | ||
Almost every time Raku tries to do something unlike any of the mainstream languages - maybe except for Perl that it was meant to fix, not reproduce - it turns out the other languages had a reason to not do it | 01:40 | ||
Voldenet | dynamic namespaces are difficult, especially if you don't compile whole code | 01:44 | |
for instance, nodejs just doesn't do namespaces, you simply load the js file and assign its exports to something | |||
Nemokosch | There is no shame in that, I think | 01:48 | |
Voldenet | but it's ridiculously hard to precompile and cache things | ||
Nemokosch | I'm pretty sure the result shouldn't be this system, anyway | 01:49 | |
Voldenet | by design you're bound to never beat anything compiled | ||
Nemokosch | well, you know that much of Node is just plain old C++ | 01:50 | |
how do imports work in C#, though? I don't remember. | |||
Voldenet | you reference dll files | 01:51 | |
Nemokosch | how are dll files tied to namespaces? | ||
Voldenet | compiler turns Foo.Bar.Baz into `this is the "foo.dll" or "foo.bar.dll"` | 01:52 | |
Nemokosch | hahaha | 01:53 | |
Voldenet | so, it's all resolved during linking | ||
Nemokosch | so is one namespace turned into one dll? | ||
Voldenet | depends on how you declare projects | ||
you can have one project with multiple namespaces | 01:54 | ||
if there's conflicts (two dlls define the same namespace) you end up with errors | |||
that compiler can't decide | |||
in practice people try to follow the convention of package name following the namespace exported by it | 01:55 | ||
Nemokosch | hm, wait, so are these .NET dll's for kind of static linking as well? | ||
Voldenet | assemblies just define referenced assembly names which are resolved by runtime on first use | 01:56 | |
Nemokosch | usually when I think of dll's, I don't think of the compiler doing anything about the linking | ||
Voldenet | technically you could do static linking with them though | ||
Nemokosch | okay, I don't say it right - it just happened today... | 01:57 | |
so apparently when you build a binary, you can define, at least in this godforsaken CC compiler, where the dynamic libraries should be searched first | 01:58 | ||
it's so much fun to build Pro*C... | |||
Voldenet | existing conventions in dotnet world used to cause pain, since there was 'global assembly cache' that had all the assemblies | 01:59 | |
and saying `use assembly entityframework version 6`, since every version of entity framework was described as `6.0.0` could give you version 6 or 6.2 :) | |||
Nemokosch | 🤣 | 02:00 | |
Voldenet | in which case your app could suddenly throw missing method exception when compiling il code | ||
(since every direct call needs to be turned into actually loaded address) | 02:01 | ||
Nemokosch | so what's the relevance of packages in C#? | ||
Voldenet | Well, dotnet have decided to stop using global assembly cache… ;) | ||
Nemokosch | Are packages like distributions in Raku terminology? | 02:02 | |
Voldenet | Sort of | ||
Now you simply load things from `bin/` which define assembly names, so `bin/EntityFramework.dll` becomes `entity framework version 6` | |||
and when assembly `my business logic version 1.0` loads `entity framework v6`, the runtime tries to fetch loaded one in current assembly load context | 02:03 | ||
if there's package A and B that both use the same assembly name+version with different metadata being loaded, it's possible to load them into separate assembly load context | 02:04 | ||
which causes other problem, `common interface dll` suddenly exports `common interface dll from runtime A.IInterface` and `common interface dll runtime B.IInterface` which are not compatible with each other | 02:05 | ||
even though they are defined by the same file | |||
02:05
linkable6 left,
evalable6 left
|
|||
Voldenet | there's ways to fix that by passing common assembly load context, but it's not very elegant at the moment… | 02:07 | |
02:07
linkable6 joined
|
|||
Voldenet | however, if you use the same assembly versions everywhere within your application, it doesn't feel bad | 02:07 | |
since you don't even have to know assembly load contexts in the first place | |||
Nemokosch | yeah it sounds more like a "hard things possible" thing | 02:08 | |
02:08
evalable6 joined
|
|||
Voldenet | it's even weirder when you throw in native .dll/.so libs to the mix | 02:09 | |
"hard things possible", "easy things easy" really is current state of dll loading in .net though | 02:10 | ||
it used to be "easy things easy… otherwise simply set registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Fusion\LogPath and pray that nobody uses global assembly cache" | 02:12 | ||
02:13
jpn joined
02:17
coleman left
02:22
coleman joined
02:24
razetime joined
03:20
lizmat_ joined
03:23
lizmat left
03:33
gcd left
03:36
razetime left
03:51
theesm left,
derpydoo left
03:52
derpydoo joined,
razetime joined
03:53
theesm joined
03:54
razetime left
04:34
donpdonp- left
05:15
jpn left
06:00
reportable6 left
06:03
reportable6 joined
06:14
tejr left
06:21
grondilu joined
|
|||
grondilu | Hi all | 06:21 | |
tellable6 | 2023-03-24T16:10:43Z #raku <tonyo> grondilu: what's the meta look like in that ? | ||
2023-03-24T23:49:16Z #raku <Voldenet> grondilu: the problem with .rakumod-only modules is that there is no `project root`, so your module could be either Tmp::Foo::Bar or Foo::Bar or Bar depending on the root directory used, which causes ambiguities | |||
grondilu | 😕 | 06:23 | |
ngl it's the first time I read about such thing as a "project root". | |||
06:24
nort joined
|
|||
Voldenet | when you start the file from some directory, missing `META.json` get constructed | 06:24 | |
ofc, things would work if you did this ix.io/4rLE | 06:25 | ||
since Bar in directory Foo becomes Foo::Bar | |||
details github.com/rakudo/rakudo/blob/e5e5...m.pm6#L318 | |||
see > raku -I. -e 'say $*REPO.distribution;' | 06:27 | ||
grondilu | Well, my Foo/Bar example was an attempt to replicate an error I got from a project where there was indeed a META6.json | 06:29 | |
Voldenet | in that case `unit class Foo::Bar;` creates Foo that is empty, so when you `use Foo` later it's, well, empty | 06:32 | |
grondilu | that is just weird. It seems to me I've been using that kind of modules hierarchy for years and I think it's the first time it creates issues. | 06:36 | |
any way, it's ok to name 'Bar' a module located in 'Foo/', instead of naming it 'Foo::Bar', then? The names don't have to reflect the directory structures? | 06:41 | ||
I think I'd rather write 'use Foo;' just before 'unit class Foo::Bar;', as suggested above | 06:46 | ||
I mean often 'Bar' is actually a qualifier for 'Foo', so it doesn't make much sense on its own. Like say 'JSON::Tiny' | 06:47 | ||
06:50
tea3po joined
06:53
teatwo left
07:00
razetime joined
07:05
razetime left
07:10
tejr joined
07:40
Ergo444 joined
|
|||
Ergo444 | hi | 07:41 | |
07:46
lizmat_ left,
lizmat joined
08:08
lizmat left
08:11
lizmat joined,
lizmat left
08:16
abraxxa joined
08:17
Sgeo left
08:19
Ergo444 left,
razetime joined
08:22
abraxxa left
08:26
sena_kun joined
08:45
razetime left
08:58
lizmat joined
09:06
sena_kun left
09:08
sena_kun joined
09:19
lizmat left
09:28
derpydoo left
09:31
jpn joined
09:42
QhpAptyj9hj0RQwM joined
|
|||
grondilu | how do I get out of a react block? `last` does not seem to cut it. | 09:45 | |
09:48
frost joined,
QhpAptyj9hj0RQwM left,
jpn left
09:54
frost left
09:56
jpn joined
10:01
jpn left
|
|||
Nemokosch | grondilu: it's called done | 10:30 | |
10:36
frost joined
10:37
frost left
10:38
QhpAptyj9hj0RQwM joined
10:39
frost joined
10:44
frost left
10:48
ab5tract joined
10:49
QhpAptyj9hj0RQwM left
|
|||
tbrowder__ | grondilu: i have gotten myself in trouble with building modules on the fly during experimentation. i recommend starting a new module project with App::Mii6 (for extra credit, drive it with Mi: | 11:04 | |
Mi6::Helped). that gives you a solid root directory, META6.json, and you're off to a solid project usable throughout our community's structure | 11:06 | ||
*Mi6::Helper | |||
*App::Mi6 | |||
11:09
euandreh joined
|
|||
Nemokosch | not sure if that would have helped with this case | 11:09 | |
anyway, grondilu has a rare talent to hit problematic aspects of code composition in Raku | 11:10 | ||
Not gonna lie, I'm thankful for this one. It has been 2 or 3 days ago when I pointed out that implicitly creating namespaces for something like Foo::Bar::Baz is a can of worms - and here you go. | 11:11 | ||
It's not even healthy to think about it too much... Somebody managed to invent namespaces with the same problems namespaces were meant to solve. It just makes one mad. | 11:15 | ||
grondilu | tbrowder__: tbh I hate module management. I will look up this App::Mii6 thing, but frankly that sounds like yet another layer of complexity. | 11:45 | |
12:00
reportable6 left,
derpydoo joined
12:02
reportable6 joined
|
|||
tbrowder__ | well, if you want others to use your work, you have to meet expected standards, yes? and it makes your like easier, too! | 12:04 | |
try it, you'll like it :-D | 12:05 | ||
*life | |||
anyone use app "termius" on iPad? | 12:06 | ||
12:41
jpn joined
13:01
jpn left
13:29
jpn joined
13:37
jpn left
13:50
jgaz joined
13:52
QhpAptyj9hj0RQwM joined
14:08
jpn joined
14:26
Guest37 joined
14:33
rf joined
14:45
QhpAptyj9hj0RQwM left
14:49
Guest37 left
14:50
QhpAptyj9hj0RQwM joined
15:02
rf left
|
|||
grondilu | ok I'm going to throw a pie in the sky about module management. | 15:16 | |
I wish it was simpler. Like waaaaay simpler. | |||
I wish it basically consisted in including the source code, and just that. | 15:17 | ||
like if you need a Foo module, then you include a "content-based" address of the Foo module. | 15:18 | ||
like an IPFS CID or something. | |||
and that would literally be all. | |||
I honestly fail to see why we need anything else. | 15:20 | ||
Nemokosch | Precompilation? Being able to distribute your individual work in an isolated manner? | 15:22 | |
No, frankly I don't think it's about the complexity in itself. It's about unnecessary voluntaristic approach to many things in this topic. | 15:23 | ||
grondilu | Precompilation? You could put a KID to your compiled module if you really want to. Or your import statement could be in a BEGIN phaser or something. | ||
s/KID/CID/ | |||
regarding compilation, after all binary code is just an other programming language. So in a way it's a slang, isn't it? | 15:26 | ||
Nemokosch | This is an interesting take | 15:27 | |
grondilu | this is something I thought about recently when thinking about chat-GPT's ability to translate code from one language to another. It occurred to me that if it can do that, it could also do compilation since binary code is just an other language. | 15:28 | |
Nemokosch | Idk if it's effective or even sane to represent binary code encoded as text | 15:31 | |
15:31
QhpAptyj9hj0RQwM left
|
|||
grondilu | Nemokosh: I don't think a programming language has to be encoded as text to be considered a programming language. | 15:32 | |
Besides, wasm has a textual representation so it's not like it's an absurd concept. | 15:33 | ||
also good old assembler is pretty close to binary code. | |||
Anton Antonov | 🙈🙊🙉 | 15:35 | |
Can be used to do neural programming. | 15:36 | ||
Nemokosch | I didn't talk about what is considered a programming language, although you are right: binary code probably isn't a programming language by definition | 15:37 | |
grondilu | I said the contrary, that it is a pl | 15:38 | |
Nemokosch | You were right in your misinterpretation 😛 | ||
There is indeed a reason to object to binary code being a pl | 15:39 | ||
The other thing is: native binary code is as unportable as it gets | 15:40 | ||
grondilu | well I guess there has to be a difference otherwise "free and open source code" doesn't mean anything. | ||
well... | 15:41 | ||
there is emulation now, though. | |||
and it's usage is growing. | |||
so one could argue that a vm now can be used to run any machine code. | 15:42 | ||
in a way what it means for some code to be "portable" may become subjective. | |||
though I admit I may be reaching here. | 15:43 | ||
Nemokosch | emulation is costly | 15:44 | |
grondilu | still, it's all the rage these days | 15:45 | |
Nemokosch | I don't have that impression at all tbh | ||
I don't see any convincing level of ARM/x86 interoperability, for example | 15:46 | ||
Anton Antonov | @Nemokosch and @grondilu ChatGPT is "all the rage these days." | ||
grondilu | I mean, isn't MoarVM a VM? | 15:47 | |
Nemokosch | MoarVM is a runtime of its own bytecode, not an emulator | ||
probably you can carry MoarVM bytecode around, as long as you are using the same version on both ends | 15:48 | ||
15:50
rf joined
|
|||
grondilu | btw what do you guys think about chat-GPT? Without going too deep into the long term implications, on the short term I'm looking forward to it being able to translate from one pl to an other. And, as I was discussing, possibly even compile to binary codes such as wasm. | 15:51 | |
It would be quite mind-boggling too if it could de-compile efficiently. Imagine the impact on proprietary software lol | 15:52 | ||
Also wouldn't it be awesome if it could just create a raku compiler out of the specs? | 15:53 | ||
Anton Antonov | @grondilu "[...] being able to translate from one pl to an other." -- I doubt that will work for non-trivial code, if prior -- and recent -- Microsoft at code generation and completion functionalities are taken into account. | 15:54 | |
Granted, I am biased : more or less that is what I am trying to do with my DSLs, so I might claim the competition is underperforming. | 15:55 | ||
grondilu | It can already generate code without having trained specifically to do that. There is no way it won't be able to learn to do it well once it is trained specifically for that with self reinforcment learning. | 15:56 | |
IMHO | 15:57 | ||
Anton Antonov | @grondilu I think some of your statements indicate too much belief in the generative machine learning algorithms. 🙂 | ||
Right, this is what other AI believers think. But, Google hit sparsity problems just with search n-grams, so I think that sparsity problem is going to show up much stronger in programming code generation / completion. | 15:59 | ||
grondilu | well, I play chess and I was impressed by Deepmind's AlphaZero. If I understand correctly, Deepmind used reinforcement learning with self-play, which is very different from how language models are trained. I think both methods will merge eventually ande the result will blow our minds. | ||
ugexe | chatgpt is great at telling you stuff that is wrong but sounds right | 16:01 | |
i can tell chatgpt it is wrong about something, it will agree, and then in a later response it will reiterate the wrong thing i correct it on | |||
chatgpt is great for inventing stories, but even asking it to describe what an e.g. sql statement does it gets things terribly wrong too often | |||
and unless you already knew the answer, you aren't going to know its lying or wrong | 16:02 | ||
Anton Antonov | @ugexe Yeah, I used the following command openai-playground does google guava have shortest path algorithm implementation | 16:03 | |
16:04
jpn left
|
|||
And got the very assertive and wrong answer : > Yes, Google Guava includes an implementation of Dijkstra's shortest path algorithm in its graph library. The algorithm can be accessed through the "ShortestPath' class in the 'com.google.common.graph' package. The 'ShortestPath' class provides methods for computing the shortest path between two nodes in a graph, as well as fin ding the distance between those | 16:04 | ||
nodes. | |||
16:04
jpn joined
|
|||
grondilu | it is not trained to produce a correct output, only a plausible one. But once it is trained to produce correct code, which is possible if the code is verifiable somehow, like with a test suite, then it should perform as well as any human IMHO | 16:05 | |
ugexe | its not hard to produce plausible but incorrect code | 16:06 | |
Anton Antonov | @grondilu " I think both methods will merge eventually ande the result will blow our minds." -- And am very pessimistic about that. 🙂 | ||
grondilu | ugexe: I disagree. It is actally pretty hard, that's why good language models took so much time to show up. | ||
16:06
jgaz left
|
|||
ugexe | i dunno i peer review code like every day and it almost always looks plausible and almost always has something wrong with it | 16:07 | |
Anton Antonov | Also, Chess and Go are easy for Machine Learning -- rules are clearly defined. There is no ambiguity or incomplete information problems. | 16:08 | |
16:09
jpn left
|
|||
ugexe | i actually kind of dread the potential future of having to peer-review jr developers code they are c&ping from an AI helper | 16:09 | |
Anton Antonov | Since you, grodilu and ugexe, are here discussing this -- can you help me naming a Raku module that combines the ML modules in Raku? | ||
grondilu | well, rules for programming languages are pretty well defined too, aren't they? You provide an input, and you expect a precise output. That's why raku can be defined from a test suite, after all. | ||
ugexe | naturally i'll get AI to also do the code review for me | ||
Anton Antonov | I considered "Acme::AI::Fusion" and "Acme::AI::MushUp" . | 16:10 | |
grondilu | Antonov: what is Acme? | ||
Anton Antonov | " well, rules for programming languages are pretty well defined too, aren't they?" -- maybe, but not the problems solved with programming languages. | 16:11 | |
ugexe | Anton: in perl such meta packages i think are called Task::* | ||
Anton Antonov | "Acme" is the name of the company that provides intgeresting devices in the Road Runner cartoons. | ||
Take a look here: raku.land/?q=acme , for better idea of the Raku culture about the "Acme::*" modules. | 16:12 | ||
grondilu | Antonov: I think you misunderstood me. In my mind, at least in the short term, the problems would still be solved by humans. I'm considering Language translation and/or compilation. That does not require problem solving skills apart from precisely language translation/compilation. | 16:14 | |
Nemokosch | ugexe told me that a sort had a sample from the song Woodhenge by Jethro Tull | 16:15 | |
the problem is, I know that song, I'm a huge Mike Oldfield fan, after all... | 16:16 | ||
ugexe | the only sort i promote is sleep sort | ||
Anton Antonov | @ugexe Let me be a more concrete here. We have Raku packages for: utilizing OpenAI, utilizing DeepL, utilizing W|A, generating insults, translating natural language DSLs into programming code, and vice versa. We want to facilitate typical workflows with all that "wealth of AI things." For example, round-trip translations, or different code generations from different languages, or defining chains of fallback | 16:17 | |
mechanisms between the AI-contractions. | |||
I am not sure how "meta" those use case scenarios are. I think that any kind of initial take on those is going to be opinionnated. Hence, I am proposing (the more timidly prefixed) "Acme::AI::*". | 16:20 | ||
ugexe | yeah i'm not sure... sounds like a framework, and those generally have branding type names it seems like | ||
Anton Antonov | @ugexe Right. Well, I can always design a conversational agent and named it accodingly. (E.g. "DSL::English::AIFusionWorkflows".) | 16:23 | |
@grondilu I see. Yes, that kind of incremental text build-up -- via ML algorithms -- was used few decades ago to create poems (in English) with great success. | 16:24 | ||
ugexe | chatgpt suggests the following: PolyglotAI, AI Compose, CodeCraftAI, AI Fallback | 16:25 | |
Anton Antonov | LOL! Cool! | 16:26 | |
Which text did you use as a prompt? | 16:27 | ||
Also, did you use Raku to access ChatGPT? | 16:28 | ||
16:29
jgaz joined
|
|||
Here are my results: | 16:33 | ||
cdn.discordapp.com/attachments/633...MushUp.png | |||
ugexe | I pasted one of your explainations in and told it to name a raku module accordingly | 16:36 | |
I just used their UI | |||
lucs | Here's something interesting, you may have heard about it: arstechnica.com/information-techno...y-over-ai/ | 16:37 | |
Anton Antonov | @lucs Thanks! | 16:38 | |
@ugexe I used my explanation, but I had to add "How to name such framework?" in order to get name suggestions. (As shown in the screenshot above.) | 16:39 | ||
Also -- I am shamelessly self-promoting here -- I used the CLI of "WWW::OpenAI". | 16:40 | ||
16:41
jpn joined
|
|||
lucs | And here's Chomsky's take on such systems: portside.org/2023-03-08/noam-choms...se-chatgpt | 16:44 | |
grondilu | lucs: that man beats machine article is interesting, though I know about a period during which chess grand masters could still beat or draw against machines with a particular style of play. That time is long gone now. | 16:50 | |
lucs | That's because chess is easy ;-) | 16:54 | |
grondilu | well, I love this game but I can easily believe that Go is much more difficult. | 16:57 | |
17:01
ab5tract left
17:03
Ergo444 joined
|
|||
Ergo444 | hi | 17:03 | |
I use fez | |||
I get this | 17:04 | ||
D:\m\p6\template-nest-xs>fez upload | |||
=<< ERROR: Failed to write 46 bytes to filehandle: Bad file descriptor | |||
what could be the problem? | 17:05 | ||
ugexe | probably that you're using windows | 17:06 | |
does fez work on windows yet? | |||
Ergo444 | it worked yesterday | ||
though I updated rakudo today | 17:07 | ||
How can I upload the module then? | 17:12 | ||
17:40
Ergo444 left
17:43
nort left
17:45
grondilu left
|
|||
Nemokosch | Is there no verbose mode for it? | 17:49 | |
17:54
RakuIRCLogger joined
17:58
RakuIRCLogger left
17:59
RakuIRCLogger joined,
jpn left
18:00
reportable6 left
18:03
reportable6 joined,
lizmat joined
|
|||
lizmat | PSA: IRC logging and the irclogs.raku.org should be operational again now | 18:07 | |
18:16
jpn joined
18:50
teatwo joined
18:54
tea3po left
18:57
rf left
19:08
rf joined
19:39
Sgeo joined
19:40
teatwo left,
teatime joined
20:05
euandreh left
20:06
jpn left
20:13
jgaz left
20:19
derpydoo left
20:34
rf_ joined
20:36
QhpAptyj9hj0RQwM joined
20:37
rf left
20:41
QhpAptyj9hj0RQwM left
20:47
QhpAptyj9hj0RQwM joined,
QhpAptyj9hj0RQwM left
|
|||
p6steve | yes - works on my iphone, having a few teething issues on ipad ... probably due to very old model | 20:55 | |
21:29
sena_kun left
21:52
sena_kun joined
22:19
sena_kun left
22:26
rf_ left
22:28
rf_ joined
22:34
Nemokosch joined,
Nemokosch left,
Nemokosch joined
|
|||
Nemokosch | m: $_ = 12; say 14 ~~ $_ * 1; | 22:34 | |
camelia | True | ||
tellable6 | 2023-03-14T12:19:05Z #raku <Xliff> Nemokosch: I know not. That's why I'm asking. :) | ||
2023-03-15T00:16:36Z #raku <tonyo> nemokosch: python has for else | |||
2023-03-16T09:23:02Z #raku <SmokeMachine> Nemokosch: Yes, I think so! :) and I think Raku already has almost everything we would need in a shell. | |||
2023-03-17T15:03:22Z #raku <Woodi> Nemokosch: only one ? crazy :) | |||
2023-03-19T12:47:18Z #raku <XliffMac> Nemokosch: How so? I use the shorthand +@ | |||
2023-03-19T20:11:40Z #raku-dev <SmokeMachine> Nemokosch: but .&{} is not equivalent to .do({}). .do returns the original value, so, 42.do: { $!next = $_ + 1 }; would return 42 and store 43 on $!next… | |||
2023-03-20T16:42:18Z #raku <Voldenet> Nemokosch: well yes, golang is awfully simple and non-abstract, it's nice for doing things | |||
2023-03-22T09:49:56Z #raku <exp> Nemokosch: can you show an example? I'm not aware of anything like that, but boy I haven't heard Coffeescript in a while! | |||
Nemokosch | oh gosh | 22:35 | |
xD | |||
so yeah... I think that snippet actually DOES make sense. It follows the principles of smartmatching. Both regarding implementation (14 is being bound to the $_ of the RHS), and in its higher-level reading (14 can definitely be taken as a value defined by the x * 1 formula) | 22:36 | ||
m: $_ = 12; say 14 ~~ $_; | 22:37 | ||
camelia | False | ||
Nemokosch | This, on the other hand, is not okay. | ||
Somebody, probably in the spirit of "do what I mean", created a corner case with no theoretical foundation, something you absolutely cannot anticipate. | 22:39 | ||
As I hope this is simply a benevolent mistake living outside of the language design, I'm going to open a Rakudo issue for this. | 22:41 | ||
22:41
Nemokosch left
|
|||
gfldex | m: $_ = 12; say 14 ~~ * * *; | 22:58 | |
camelia | Too few positionals passed; expected 2 arguments but got 1 in block <unit> at <tmp> line 1 |
||
gfldex | m: say &(* * *).^can('ACCEPTS')[0].&{.file, .line}; | 23:04 | |
camelia | (SETTING::src/core.c/Mu.pm6 19) | ||
Nemokosch | actually, even 14 ~~ ($_) works | 23:14 | |
now I'm especially not sure if this isn't just a mere bug... | 23:20 | ||
23:41
linkable6 left,
evalable6 left
23:42
linkable6 joined,
evalable6 joined
|