1 Jun 2023 |
elcaro | It is... I'm really just comparing array langs to things like Numpy (addition in this specific case). I've never had much exposure to Numpy, so it's interesting. eg. doing something like 1‿2+(2‿3‿4⥊0) in Numpy requires the shapes match, like array([[[1]],[[2]]]) + zeros([2,3,4]) (or you can create additional nestings, eg. array([1],[2])[:, newaxis] ) Is this what is truly meant as "rank polymorphism"? I know some people often refer to it when showing, eg. 1 + 1‿2‿3‿4‿5 , which I think is often referred to as "broadcasting" | 00:13:51 |
elcaro | * It is... I'm really just comparing array langs to things like Numpy (addition in this specific case). I've never had much exposure to Numpy, so it's interesting. eg. doing something like 1‿2+(2‿3‿4⥊0) in Numpy requires the shapes match, like array([[[1]],[[2]]]) + zeros([2,3,4]) (or you can create additional nestings, eg. array([1],[2])[:, newaxis] ) Is this what is truly meant as "rank polymorphism" in BQN et al? I know some people often refer to it when showing, eg. 1 + 1‿2‿3‿4‿5 , which I think is often referred to as "broadcasting" | 00:15:06 |
Marshall | In APL or J the only difference between a plain number and a list is the rank; that use doesn't make as much sense in BQN because they have different types (for (<1) + 1‿2‿3‿4‿5 it would). | 00:16:28 |
Marshall | It's definitely true that + is rank polymorphic, and changing the right argument rank/shape in 1‿2+(2‿3‿4⥊0) shows that. | 00:19:17 |
dzaima | rank polymorphism is a property of a function that can only be observed by multiple different invocations of it; so e.g. 1‿2 + 3‿2⥊4 itself doesn't display rank polymorphism, but that along wih 1‿2 + 4‿3‿2⥊4 does, as it displays that + doesn't have just one set of argument ranks that it can accept | 00:23:53 |
dzaima | (the question gets slightly more complicated in statically-typed languages) | 00:24:27 |
elcaro | Thanks, that first sentence makes perfect sense... but those 2 examples you posted don't work? | 00:26:15 |
dzaima | oh duh, wrote the shapes in reverse | 00:26:36 |
elcaro | OK... got it | 00:27:18 |
dzaima | (am typing on phone about to go sleep, can't be bothered to test things or think properly) | 00:29:16 |
elcaro | All good | 00:29:29 |
zyx | thanks a lot. i'll give the windows terminal preview a look, and the header solution is clever. i'll try that too | 03:30:26 |
Brian E#0926 | compiling worked with a warning and some env-var stuff printing. after moving the dlls to the same directory as the bqn.exe, when i run bqn test.bqn (test.bqn containing a hello world program) it just stalls for like 10 seconds and then stops.
i need to stop now though, i need to get ready for a driving test soon! only a fake test for training, not the actual last one. | 12:49:31 |
dzaima | presumably you're not on the develop branch, which should be better? | 12:50:38 |
Brian E#0926 | ahhh i am not. i am on master. i'll test that on the bus ride in about an hour | 12:51:06 |
Brian E#0926 | tested develop branch, and still same issue. when using bqn it does nothing, doesn't even allow typing into the command prompt for about 10 seconds and then the process stops. when using bqn test.bqn same thing, locks up for about 10 seconds and then stops, with no output. i made sure test.bqn has lf line endings. | 14:01:41 |
Brian E#0926 | wait... it works on powershell! | 14:02:21 |
Brian E#0926 | both work on powershell, not on cmd | 14:02:39 |
Brian E#0926 | oh nevermind! powershell just reaches for the enviroment variable global bqn instead of the local one... so ./bqn test.bqn still same issue and same with ./bqn | 14:03:44 |
Brian E#0926 | * oh nevermind! powershell just reaches for the enviroment variable global bqn instead of the local-folder one... so ./bqn test.bqn still same issue and same with ./bqn | 14:03:58 |
dzaima | does ./bqn --help do anything? | 14:15:26 |
Brian E#0926 | it locks up too | 14:27:01 |
Brian E#0926 | i said earlier that they all lock up for about 10 seconds but rn they're consistently delaying for 3 seconds. idk if that helps. | 14:28:17 |
Brian E#0926 | and this applies to all 3 commands that I've tested. | 14:29:01 |
dzaima | presumably some crash handler running | 14:29:09 |
dzaima | oh, I call cbqn_init(); at the start of main before the arg parsing anyway if replxx is enabled, so if something there is to blame, it'd be hit anyway. I guess if that's the case, it'd be worth trying to build without replxx, but I don't really think that'd help | 14:29:59 |
Brian E#0926 | i'll try | 14:46:48 |
Brian E#0926 | oh i may be stupid. i didn't move the newly built bqn.exe into the test folder | 14:50:59 |
Brian E#0926 | oh yay it works!! | 14:53:14 |
dzaima | just got it working in a windows vm too | 14:53:54 |