00:00:33 | * | vivus quit (Quit: Leaving) |
00:15:32 | * | Sentreen quit (Ping timeout: 240 seconds) |
00:15:42 | * | zippyy joined #nim |
00:26:09 | * | zippyy quit (Ping timeout: 248 seconds) |
00:28:00 | * | Sentreen joined #nim |
00:29:47 | * | rbrt joined #nim |
00:40:04 | * | MJCaley joined #nim |
00:40:36 | * | zippyy joined #nim |
00:47:53 | rbrt | how should i set a variable to the min/max value of a type? like the smallest/largest possible float, etc? |
00:53:02 | FromGitter | <zetashift> @dom96 what did he say about Nim? |
00:53:29 | dom96 | zetashift: he didn't (this time at least :)) |
00:55:41 | dom96 | rbrt: high() and low() |
00:57:50 | rbrt | dom96: oh gotcha, must have missed that when i glanced through the docs. thanks! |
01:12:02 | * | zippyy quit (Ping timeout: 276 seconds) |
01:15:09 | * | zippyy joined #nim |
01:25:12 | * | rbrt quit (Quit: Slán agat) |
01:54:52 | * | marenz__ quit (Ping timeout: 240 seconds) |
01:57:21 | * | MJCaley quit (Quit: MJCaley) |
01:59:01 | * | endragor joined #nim |
02:03:26 | * | endragor quit (Ping timeout: 255 seconds) |
02:09:14 | * | chemist69 quit (Ping timeout: 276 seconds) |
02:11:32 | * | vlad1777d quit (Ping timeout: 255 seconds) |
02:14:32 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:22:35 | * | chemist69 joined #nim |
02:26:01 | * | MJCaley joined #nim |
02:33:00 | * | endragor_ joined #nim |
03:05:57 | * | MJCaley quit (Quit: MJCaley) |
03:05:59 | * | Jesin quit (Quit: Leaving) |
03:07:35 | ftsf | dom96, ooh yeah! LD =) good luck! |
03:07:50 | ftsf | didn't realise it was this weekend! |
03:08:07 | ftsf | i should tidy up NICO before it |
03:10:10 | * | Jesin joined #nim |
03:17:57 | * | zippyy quit (Ping timeout: 240 seconds) |
03:26:07 | * | zippyy joined #nim |
03:32:00 | FromGitter | <Varriount> I wonder what the nimue bindings are like |
03:35:55 | * | zippyy quit (Ping timeout: 250 seconds) |
03:44:39 | * | zippyy joined #nim |
04:08:28 | * | joshbaptiste quit (Ping timeout: 240 seconds) |
04:12:22 | * | zippyy quit (Ping timeout: 264 seconds) |
04:27:06 | * | zippyy joined #nim |
04:27:36 | * | dddddd_ quit (Remote host closed the connection) |
04:35:26 | * | joshbaptiste joined #nim |
04:56:01 | * | zippyy quit (Ping timeout: 248 seconds) |
05:21:30 | * | JappleAck joined #nim |
05:29:07 | * | astronavt joined #nim |
06:23:05 | * | miran joined #nim |
06:24:45 | * | nsf joined #nim |
06:42:50 | * | yglukhov joined #nim |
06:44:50 | * | yglukhov_ joined #nim |
06:44:50 | * | yglukhov quit (Read error: Connection reset by peer) |
06:55:01 | * | Jesin quit (Quit: Leaving) |
06:58:26 | * | libman quit (Quit: Connection closed for inactivity) |
07:00:50 | * | endragor_ quit (Remote host closed the connection) |
07:03:01 | * | yglukhov_ quit (Read error: Connection reset by peer) |
07:03:16 | * | yglukhov joined #nim |
07:03:32 | * | yglukhov quit (Client Quit) |
07:11:43 | * | miran quit (Ping timeout: 250 seconds) |
07:28:52 | * | endragor joined #nim |
07:35:12 | * | xkapastel quit (Quit: Connection closed for inactivity) |
07:37:44 | * | gokr joined #nim |
07:43:48 | * | PMunch joined #nim |
07:47:58 | * | Vladar joined #nim |
07:54:25 | * | miran joined #nim |
07:57:36 | * | livcd quit (Changing host) |
07:57:36 | * | livcd joined #nim |
08:23:32 | * | claudiuinberlin joined #nim |
08:24:57 | * | sendell joined #nim |
08:33:50 | * | endragor quit (Remote host closed the connection) |
08:37:18 | * | couven92 joined #nim |
08:37:46 | * | floppydh joined #nim |
08:42:10 | * | endragor joined #nim |
08:44:10 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
08:45:09 | * | sakalli joined #nim |
08:46:18 | * | claudiuinberlin joined #nim |
08:47:32 | * | claudiuinberlin quit (Client Quit) |
08:48:10 | * | claudiuinberlin joined #nim |
08:49:01 | * | qwertotter is now known as qwertfisch |
08:50:31 | FromGitter | <Varriount> @dom96 Did you change the forum CSS at all? Currently all the topic listings have horizontal scrollbars on my computer. |
08:51:44 | FromGitter | <Varriount> (https://files.gitter.im/nim-lang/Nim/DdJZ/image.png) |
08:57:34 | * | jjido joined #nim |
09:07:35 | * | vlad1777d joined #nim |
09:36:13 | * | skrylar_ joined #nim |
09:48:27 | * | BitPuffin|osx joined #nim |
09:58:18 | * | vlad1777d quit (Ping timeout: 268 seconds) |
10:05:46 | * | sakalli quit (Ping timeout: 264 seconds) |
10:06:29 | FromGitter | <andreaferretti> Did something changed recently in the way `asynchttpserver` extracts the path string? |
10:06:45 | FromGitter | <andreaferretti> I have a strange bug in Rosencrantz |
10:07:32 | FromGitter | <andreaferretti> For those not familiar with how Rosencrantz work it is a little complex to explain, but I will try |
10:07:55 | FromGitter | <andreaferretti> In Rosencrantz, applications are defined by composing routes |
10:08:47 | FromGitter | <andreaferretti> Routes are things that filter the request, extract parameters from it and possibly complete the request by responding |
10:09:00 | FromGitter | <andreaferretti> or reject the request, which is then passed to the next route |
10:10:20 | FromGitter | <andreaferretti> I have a route called `intSegment` which extract an integer from a segment of the path (something between two consecutive `/`) |
10:11:29 | FromGitter | <andreaferretti> it is defined here https://github.com/andreaferretti/rosencrantz/blob/master/rosencrantz/handlers.nim#L75-L85 |
10:12:15 | FromGitter | <andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a1e87ff71ad3f8736436c03] |
10:12:59 | FromGitter | <andreaferretti> the function `inner` receives the string `"3"` in my test |
10:13:19 | FromGitter | <andreaferretti> but when I try `n = s.parseInt` |
10:13:39 | FromGitter | <andreaferretti> I get the exception `invalid integer: 3` |
10:14:01 | FromGitter | <andreaferretti> and if I try `s == "3"` I get `false` |
10:14:21 | FromGitter | <andreaferretti> so the string `s` is not the string `"3"` |
10:14:31 | FromGitter | <andreaferretti> but it prints as `3`, without spaces |
10:15:11 | FromGitter | <andreaferretti> now, this string is the final slice of the request path, which is `/repeat/hello/3` |
10:16:09 | FromGitter | <andreaferretti> so I was wondering whether the request path in `asynchttpserver` is missing the terminator or something that breaks the parsing |
10:17:40 | * | sakalli joined #nim |
10:18:05 | * | PMunch quit (Quit: Leaving) |
10:19:38 | * | PMunch joined #nim |
10:21:01 | Araq | andreaferretti check via 'len' for hidden '\0's in your string |
10:21:06 | FromGitter | <andreaferretti> ok |
10:21:39 | Araq | I'm not aware of any changes in asynchttpserver's behaviour but things are constantly changing and we might have broken something |
10:22:24 | FromGitter | <andreaferretti> in fact `s.len` is 2 |
10:22:34 | FromGitter | <andreaferretti> now, I get `s.len` via |
10:22:39 | FromGitter | <andreaferretti> sorry `s` via |
10:23:15 | FromGitter | <andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a1e8a9387680e6230abe68a] |
10:23:38 | FromGitter | <andreaferretti> so it is a slice `pos .. path.len` of `path` |
10:23:46 | Araq | that is not correct code |
10:23:55 | FromGitter | <alehander42> how can I run a single test in nim suite ? |
10:23:58 | FromGitter | <andreaferretti> where `path` is the string `req.url.path` |
10:23:59 | Araq | final needs to be path.len-1 |
10:24:16 | FromGitter | <andreaferretti> uh you're right |
10:24:24 | Araq | this was recently fixed, the behaviour of '..' did hide this |
10:24:26 | FromGitter | <andreaferretti> I wonder how it did work correctly until now |
10:24:31 | FromGitter | <andreaferretti> ah ok |
10:24:34 | Araq | and the terminating zero needs to die :-) |
10:24:34 | FromGitter | <andreaferretti> great! |
10:25:05 | * | Vladar have ported VoxelSpace engine demo to Nim/SDL2 if anyone interested https://github.com/Vladar4/NimVoxelSpaceDemo |
10:25:13 | FromGitter | <andreaferretti> it works now! |
10:25:19 | FromGitter | <andreaferretti> silly error |
10:25:40 | FromGitter | <andreaferretti> I did not think of that because it was working earlier, so I thought the bounds where ok |
10:25:45 | Araq | happens to everybody. ugh, I think dom's book does document the terminating zero |
10:25:46 | FromGitter | <andreaferretti> thank you Araq |
10:26:44 | FromGitter | <dom96> Araq: what do you want help with? |
10:27:43 | Araq | Vladar: nice, can you do a "magic carpet" game |
10:30:04 | Vladar | that implies half-decent understanding of 3D math which I can't say for myself ) The VoxelSpace algorithm is pretty simple though so it could be done in theory. Keep in mind that this thing will run with software render speed. |
10:31:33 | FromGitter | <dom96> @Vladar cool! I saw that on HN a couple days back, nice to see a Nim implementation :) |
10:32:29 | FromGitter | <alehander42> can I add a test, but tell Nim to skip it in the comment ? |
10:33:43 | Vladar | @dom96 it's always a good challenge to port such stuff to other language =) managed it in about 1.5 days and less than 500 LoC total ) |
10:36:39 | federico3 | Vladar: that's the whole rendering? 50 lines in render() ? :D |
10:36:56 | Vladar | yep, plus line() |
10:36:59 | Araq | alehander42: disabled: "true" in the spec section |
10:39:26 | federico3 | Vladar: perhaps I could use it to render 3D patterns for https://github.com/FedericoCeratto/wave_function_collapse |
10:40:04 | FromGitter | <alehander42> Araq: nice |
10:41:25 | Vladar | federico3: just keep in mind that it uses indexed PNG's as maps and you'll need to modify loadMap() if you want to feed it anything else |
10:42:37 | Vladar | color map is indexed color and height map is 8bit greyscale |
10:42:52 | skrylar_ | voxels? |
10:43:43 | skrylar_ | i have some pdfs for spherical raytracing with distance fields. haven't written a nim impl tho |
10:47:59 | * | JappleAck quit (Ping timeout: 248 seconds) |
10:50:26 | Araq | I'm about to change how the overloading of the dot operator works. instead of |
10:50:43 | Araq | template `.`(x: MyObject; field: static[string]): untyped |
10:50:47 | Araq | the signature will become |
10:50:54 | Araq | template `.`(x: MyObject; field: untyped): untyped |
10:51:06 | Araq | which I feel is much more natural. any opinions? |
10:51:48 | Araq | you can then do forwarding to a nested object in a straight-forward fashion |
10:52:00 | Araq | without any macro machinery |
10:52:17 | couven92 | makes sense |
10:52:19 | Araq | template `.`(x: MyObject; field: untyped): untyped = x.nested.field |
10:52:31 | Araq | # delegate to 'nested' |
10:52:37 | FromGitter | <andreaferretti> as long as it does not break `jsffi` it seems good :-) |
10:52:46 | Araq | I patched jsffi already |
10:52:51 | Araq | to see if it works out |
10:52:51 | FromGitter | <andreaferretti> great |
10:52:59 | Araq | the changes are straight-forward |
10:53:07 | couven92 | could we make {.exportjs.} as an alias to {.exportcpp.}? |
10:53:07 | Araq | plus jsffi doesn't adhere to the spec anyway |
10:53:16 | Araq | it uses static[cstring] |
10:53:25 | Araq | the spec only mentions static[string] |
10:53:27 | couven92 | importjs, importcpp, I mean |
10:53:47 | Araq | couven92: problem is that we don't know what 'importcpp' should be named like |
10:54:03 | Araq | 'importPattern' makes the most sense |
10:54:08 | couven92 | Ah |
10:54:22 | Araq | but then 'importjs' vs 'importPattern' is strange |
10:54:44 | Araq | maybe 'importIdent' and 'importPattern' ? |
10:55:28 | couven92 | Hmm... yeah I see... But right now it's importcpp, so maybe just do a quick-fix? ah, well if you really mind, I guess you could anyways do {.pragma: importjs, importcpp.} |
10:55:59 | Araq | yeah but it's ugly and we should do something |
10:56:09 | Araq | but I don't know what... |
10:56:39 | couven92 | about static[T], can't you theoretically do anything as static? as long as the compiler can create the value at compile-time? |
10:57:21 | Araq | couven92: you can do anything but where else in the language gets an AST converted to a static[string]? |
10:57:31 | couven92 | ah |
10:57:34 | Araq | it's a weird unnecessary special case |
10:57:45 | Araq | that bites for simple delegations |
10:58:15 | couven92 | I guess static[cstring] makes sense though if you're really interesting in emitting a pure C string literal?+ |
10:58:29 | Araq | templates can use astToStr |
10:58:35 | Araq | macros can use repr |
10:58:46 | Araq | you can get the string easily enough |
10:58:47 | FromGitter | <andreaferretti> I am trying to install c2nim on a fresh computer, using `devel` but `nimble install c2nim` fails with ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a1e92e68b3a9e2c0c2f814f] |
10:59:15 | couven92 | @andreaferretti, ran into the same problem yesterday :) |
10:59:24 | livcd | Do i need to do something specific to compile a program for windows 2008 ? |
10:59:28 | FromGitter | <andreaferretti> do you have a solution? |
10:59:54 | Araq | how is 0.16 the devel version? |
10:59:58 | couven92 | nope... It's a regression, someone should file an issue, but was too lazy yesterday and just moved on :P |
11:00:29 | * | JappleAck joined #nim |
11:00:33 | couven92 | Araq, I had this on 0.17.2 |
11:00:37 | FromGitter | <andreaferretti> maybe `c2nim` depends on `nim 0.16`? |
11:00:57 | Araq | it doesn't, it only work with devel -.- |
11:01:27 | couven92 | @andreaferretti, newer Nim is also okay: https://github.com/nim-lang/c2nim/blob/master/c2nim.nimble#L9 |
11:02:03 | couven92 | nimble just installed 0.16.0, because it probably hadn't installed something else yet? |
11:02:10 | FromGitter | <andreaferretti> probably yes |
11:02:26 | FromGitter | <andreaferretti> so should I `nimble isntall compiler`? |
11:02:42 | FromGitter | <andreaferretti> maybe `c2nim` should come with `koch tools` to solve this once and for all |
11:02:46 | couven92 | yeah, I did a `nimble install [email protected] [email protected]` |
11:03:16 | couven92 | and then maybe reinstall c2nim? maybe downgrade to 0.17.0 if that doesn't work |
11:03:41 | FromGitter | <andreaferretti> I am trying to install `compiler` 0.17.2 manually |
11:03:53 | FromGitter | <andreaferretti> Downloaded package's version does not satisfy requested version range: wanted 0.17.2 got 0.17.3 |
11:03:57 | FromGitter | <andreaferretti> uff |
11:04:13 | FromGitter | <andreaferretti> this is what happens when people do not tag github releases |
11:04:36 | couven92 | well compiler is the main nim repo, so that one should be tagged properly |
11:05:11 | Araq | andreaferretti: instead c2nim should work with any kind of compiler version really, the change seems trivial |
11:05:55 | FromGitter | <andreaferretti> trying to install compiler 0.17.3 |
11:06:09 | couven92 | okay, do a `git clone https://github.com/nim-lang/Nim.git -- /tmp/nim-temp && cd /tmp/nim-temp && git checkout tags/v0.17.0 && nimble install -y` |
11:06:14 | couven92 | maybe that helps |
11:06:27 | FromGitter | <andreaferretti> installing [email protected] worked! |
11:07:59 | couven92 | BTW in a nimble file can you specify ranges? like `requires nim >= 0.16.0 < 0.17.2`? |
11:08:15 | Araq | sure |
11:08:30 | couven92 | cool! :) |
11:08:59 | Araq | you then need to ensure your package does compile with 0.16.0, 0.16.2, 0.17.0 |
11:09:12 | Araq | which is why I don't believe in versioning. |
11:09:35 | Araq | it's creates an exponential of combinations you need to test against. |
11:09:56 | Araq | it's intractable. |
11:10:53 | Araq | you need to pin down everything, semantic versioning is a fiction. |
11:11:05 | couven92 | Araq, well, here it's a regression in the API, so in normal situations you'd be able to get a changelog and adjust your dependencies to version ranges where the API stayed the same... |
11:11:29 | livcd | ah on windows 2008 (or at least this server) when i call execCmdEX("powershell.exe Get-Service") it hangs. normal cmd work fine |
11:12:06 | Araq | do you setup your CI to test against every version you claim is working? |
11:12:25 | Araq | no? there you go. it's fiction. |
11:12:26 | couven92 | Araq, no I wouldn't! :P |
11:13:03 | * | jjido quit (Ping timeout: 248 seconds) |
11:13:41 | couven92 | livcd, Get-Service in powershell takes a few seconds before it actually outputs something |
11:19:32 | livcd | couven92: it's instant when invoked directly or on my localhost via nim |
11:21:26 | dom96 | Araq: btw I explain the difference between importc and importcpp in my book as well, in the context of JS :) |
11:21:48 | Araq | the old stuff will continue to work |
11:21:54 | couven92 | livcd, really? Hmm... took some seconds here on my computer... but okay, then I don't know :P |
11:24:25 | * | fraya joined #nim |
11:24:37 | dom96 | "you need to pin down everything" - yep, that's why lock files exist. |
11:26:04 | Araq | do they? ;-) |
11:26:11 | livcd | couven92: it takes 36 milliseconds to finish when invoke with nim or directly from cmd like this powershell.exe Measure-Command { Get-Service } |
11:26:24 | couven92 | cool :) |
11:31:40 | * | marenz__ joined #nim |
11:36:35 | dom96 | Araq: Although yeah, it makes me wonder. Once you have lock files the version requirement specifications really don't seem to matter anymore. |
11:36:55 | dom96 | I'm probably just missing something though |
11:38:16 | Araq | in nawabs I distinguished between tinkerings and reproducible builds and threw away the versions but that's the radical solution nobody agrees with |
11:38:42 | Araq | you tinker until something works and then you pin the build... :-) |
11:40:22 | skrylar_ | thats how you end up with changelog files for version control ._. |
11:40:50 | skrylar_ | i still have badfeels from Go for doing things like that |
11:41:33 | skrylar_ | i fixed a bug in hugo and it was painful because everyone was just importing git repos for dependencies and it was a royal pain in the ass to properly git-bisect the bug |
11:42:18 | Araq | I would replace versions with release dates... |
11:42:34 | Araq | this way they at least have some comparative value |
11:42:50 | skrylar_ | that's probably servicable |
11:43:15 | Araq | and you know version 2016-03-01 was tested with a compiler before that date |
11:47:03 | Araq | and C99 is more meaningful than C# version 6.0 |
11:47:35 | skrylar_ | well |
11:47:58 | skrylar_ | just make sure to either vendor the dependencies or use submodules or some meaningful thing |
11:48:26 | skrylar_ | from experience its a nightmare when you can't bisect a bug easily because every other build requires a chain of other repos to be at unspecified commits |
11:49:01 | Araq | nothing is unspecified in a reproducible build |
11:49:21 | skrylar_ | lol reproducible builds :) |
11:50:14 | Araq | you don't believe in those? |
11:50:44 | skrylar_ | don't those require everyone down the build chain to behave |
11:51:00 | * | astronavt quit (Remote host closed the connection) |
11:51:37 | federico3 | behave? |
11:51:55 | Araq | it's just a collection of git repos. ask every repo about the current commit hash and remember it |
11:52:07 | Araq | that's what nawabs does |
11:52:14 | skrylar_ | there are reproducible builds (security variant) where two unrelated parties compile code and the binaries are checksum identical |
11:52:30 | federico3 | skrylar_: correct |
11:52:52 | skrylar_ | that requires everyone down the line behaves properly (ex. gcc doesn't do something random) |
11:53:21 | dom96 | hrm |
11:53:23 | federico3 | of course |
11:53:35 | dom96 | actually there is a good reason for specifying version ranges |
11:53:43 | skrylar_ | if you mean reproducible as in, other people can build it, then that's just good package management? |
11:54:23 | federico3 | skrylar_: reproducible means identical binaries |
11:54:40 | skrylar_ | federico3, sounds like more trouble than its worth |
11:54:44 | Araq | I mean reproducible as in "others can build it" |
11:54:46 | dom96 | Your dependencies will undoubtedly depend on the same package but a different commit hash of it |
11:55:02 | Araq | the security stuff is a different topic |
11:55:10 | skrylar_ | the security variant is an answer to "trusting trust" |
11:55:17 | federico3 | skrylar_: the current attempts have been widely successful. |
11:55:25 | skrylar_ | the problem is that your CPU runs a secret version of minix which defeats the entire point |
11:55:26 | dom96 | you won't be able to compile then, so you'd fall back onto the version ranges then and pick a commit hash that works for both dependencies... |
11:55:43 | dom96 | lock files are hard |
11:56:07 | federico3 | also some industries has been doing repro builds for decades without much fanfare |
11:56:28 | skrylar_ | federico3, i'm mostly just being cynical in that every CPU is backdoored from day one, which makes security pointless |
11:56:37 | skrylar_ | except maybe SPARC and POWER but good luck getting those |
11:56:40 | federico3 | it's still not pointless |
11:57:15 | skrylar_ | last i read someone finally got a jtag connection and broke in to the management engine, so we're starting to find out just what secret shit intel is doing |
11:57:38 | Araq | it's like the Simpsons episode where Homer wants to buy a stone from Lisa |
11:57:40 | federico3 | skrylar_: it's not that simple |
11:58:13 | Araq | stones are wildly successful in keeping away tigers |
12:00:46 | Araq | the point of "trusting trust" is not "how to castigate yourself for decades", the point is "real security is impossible, deal with it" |
12:01:16 | skrylar_ | thats what the distributed double compilation paper was about though |
12:01:40 | skrylar_ | deterministic builds (that was the security version of 'reproducible' now that i remember) counter a single hacked compiler situation |
12:02:40 | Araq | just try to create a compiler that inserts undetectable backdoors. try it. |
12:02:57 | skrylar_ | thompson did tho |
12:02:58 | Araq | it's a paper tiger, nobody has ever done it successfully. |
12:03:19 | Araq | you need to teach your compiler to miscompile yet-to-be-written disassemblers. |
12:03:46 | dom96 | what, nobody has done it? Seems quite easy to me |
12:03:58 | Araq | then read and understand the paper properly. |
12:04:07 | skrylar_ | dom96, it hasn't been documented as a successful attack in the field, but researchers have done similar things as examples |
12:04:21 | Araq | "similar" things. yes. |
12:04:46 | skrylar_ | the problem is that its just far easier to blackmail/bribe/"convince" a CPU maker to put in secret backdoors than it is to say, manage to con the FSF in to doing it |
12:04:54 | skrylar_ | or even just get microsoft to do it |
12:05:18 | skrylar_ | i have a whitepaper around here somewhere that talks about doing it over firmware updates |
12:05:35 | skrylar_ | anyway |
12:05:51 | skrylar_ | reproducible is good. although i thought that's what ex. bundle files were for (admittedly thats a ruby thing) |
12:06:18 | federico3 | it's much easier to plan malicious code using any other tool as part of a build process once an attacker gains access to a buildbot |
12:06:22 | federico3 | and that happened |
12:06:29 | * | dddddd joined #nim |
12:08:05 | Araq | it doesn't only affect compilers either. a single malicious Linux binary can inspect the running gcc process and make it insert backdoors |
12:08:25 | Araq | again, you might want to try to implement that one. |
12:08:39 | skrylar_ | speaking of, the grsec guys stopped giving out the patch files :/ |
12:09:24 | skrylar_ | seem to have given up on FOSS and are off chasing patents involving code replay attacks |
12:10:28 | Araq | does Linux build on BSDs to prevent that a malicious Linux kernel inspects the gcc that builds the new version of the Linux kernel? |
12:10:59 | skrylar_ | Araq, i mean, if i had enough sus then linux wouldn't build on anything because we would just use BSDs |
12:11:02 | Araq | do the BSDs build on Linux for the same reason? |
12:11:27 | Araq | does anybody really give a fuck about "trusting trust" or is it just an intellectual masturbation? |
12:11:51 | skrylar_ | "linux hackers make something that works right now. BSD hackers spend years trying to make sure the hack is perfect" :P |
12:11:55 | Araq | heck, does anybody really understand that paper... |
12:12:09 | floppydh | skrylar_: perfect ... |
12:12:21 | skrylar_ | i meant hackers as in virus people, but well |
12:12:23 | skrylar_ | it works either way |
12:12:29 | floppydh | someone link the paper again? |
12:12:35 | federico3 | *facepalm* |
12:12:55 | skrylar_ | https://www.schneier.com/blog/archives/2006/01/countering_trus.html |
12:13:06 | floppydh | skrylar_: ty |
12:15:48 | * | Snircle joined #nim |
12:16:58 | skrylar_ | After dealing with IMEs, i have found the situation with fltk to be.. non-plussed. |
12:18:01 | skrylar_ | Mostly in that the choies seem to be Qt (which is a lot of work, will break in 1-2 years when Qt6 happens), GTK (which will break again, same reason) or FLTK (which won't break, but then half the accessibility stuff doesn't work) |
12:18:31 | skrylar_ | Still confused why GTK requires rewrites. |
12:19:15 | skrylar_ | i mean a gui is fundamentally a canvas library with an event pipe |
12:27:21 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
12:32:25 | skrylar_ | lib/nim/system.nim(199, 14) Error: internal error: rrGetSym: no reader found: +2 hmm... |
12:40:33 | dom96 | Araq: The new `..` doesn't support (int, EnumValue.high), should this be supported? |
12:40:59 | dom96 | it definitely works in 0.17.2 |
12:44:15 | flyx | hmm. haven't seen alexday since he asked about NimYAML and I was afk :/. most of his questions were answerable |
12:50:52 | dom96 | and I'm still getting an `type mismatch: got (uint32)` for the items iterator in my code |
13:02:56 | * | Snircle joined #nim |
13:17:52 | FromGitter | <andreaferretti> by the way, I still see some issues with generic concepts |
13:18:26 | FromGitter | <andreaferretti> mostly in my tests (https://github.com/unicredit/alea/blob/master/tests/test.nim) for alea |
13:18:40 | FromGitter | <andreaferretti> I had to comment out a few tests with current devel |
13:19:18 | FromGitter | <andreaferretti> are generic concepts considered mostly working now? |
13:19:32 | * | fraya quit (Quit: Leaving) |
13:19:41 | FromGitter | <andreaferretti> or are they still in course of being finished? |
13:19:53 | * | zippyy joined #nim |
13:21:33 | * | jjido joined #nim |
13:22:29 | jjido | Araq shouldn't versioning work in the opposite direction. |
13:23:50 | jjido | Package Foo version 1.2.0.6, usable with codebase compiled with Foo 1.1 to 1.2.0.6 |
13:30:48 | FromGitter | <andreaferretti> opened an issue https://github.com/nim-lang/Nim/issues/6842 |
13:40:35 | * | zippyy quit (Ping timeout: 240 seconds) |
14:03:12 | * | MJCaley joined #nim |
14:08:31 | * | sakalli quit (Ping timeout: 248 seconds) |
14:10:37 | skrylar_ | well thats neat |
14:11:01 | skrylar_ | i just realized instead of doing a whole MxN table, can just use quickdraw's old region trick for table layouts |
14:11:38 | skrylar_ | one of the things you can do in miglayout is say that ex. one item has some units of grid height, which requires storing collision data somewhere |
14:18:41 | * | floppydh quit (Quit: WeeChat 1.9.1) |
14:18:57 | * | floppydh joined #nim |
14:23:43 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:25:38 | * | zippyy joined #nim |
14:30:01 | * | zippyy quit (Ping timeout: 240 seconds) |
14:41:27 | * | arnetheduck joined #nim |
14:46:23 | FromGitter | <nitely> dom96: some dependency managers have a dependency resolution that will use the correct version for each package, even when pinned. See Cargo |
14:47:02 | dom96 | nitely: so the pinning is ignored? |
14:47:13 | FromGitter | <nitely> it's not |
14:47:36 | dom96 | then I'm not sure what you mean :) |
14:47:43 | FromGitter | <nitely> it has multiple versions of the same package, it even share the depencency if multiple packages depend on the same version |
14:49:19 | FromGitter | <nitely> I've not tried though, just read about it. No idea how they do it |
14:49:50 | * | floppydh quit (Quit: WeeChat 1.9.1) |
14:50:03 | * | floppydh joined #nim |
14:51:55 | * | MJCaley quit (Quit: MJCaley) |
14:53:26 | FromGitter | <nitely> npm and yarn do the same thing, they will just move the dependency to a sub-dir when there's a conflict. I guess that's easier in a dynamic language :P |
14:57:45 | dom96 | I'm pretty sure Nimble does the same thing |
14:57:54 | dom96 | s/does/supports/ |
14:58:07 | dom96 | It doesn't need to move any directories around, just needs to specify the path to the right dep |
14:58:20 | FromGitter | <nitely> it does? then what's the issue with pinning? |
14:58:26 | dom96 | but you can have multiple versions of the same package installed in ~/.nimble/pkgs/ |
14:58:36 | dom96 | The issue is that it's not implemented at all :) |
14:58:41 | FromGitter | <nitely> ahahah |
15:01:09 | FromGitter | <nitely> well then, using `==` would be better than `> ... & < ...`, except for the nim-lang dependency, right? |
15:02:06 | skrylar_ | i thought Araq had put stemmers in the stdlib or something, but if i search for 'nim porter stemmer' there's just one nimble package :b |
15:02:41 | dom96 | nitely: the problem with using `==` is you'll end up with another package that uses `==` for a different version of the same package |
15:02:46 | dom96 | and then you'll have a problem |
15:02:56 | dom96 | I'm curious how this is solved in Cargo |
15:06:43 | FromGitter | <nitely> wait, so "you can have multiple versions of the same package installed in ~/.nimble/pkgs/" but you'll have a problem when using `==`? How so? |
15:08:35 | dom96 | Okay, so imagine that package Jester depends on http == 1.0.1 and package FooBar depends on http == 1.0.2, you want to depend on Jester and FooBar in your package |
15:08:52 | dom96 | Which means that your package would need to be built with http 1.0.1 and 1.0.2, which is impossible |
15:09:27 | dom96 | if Jester and FooBar depend on http >= 1.0.1 & < 1.2 then there is no problem |
15:09:43 | dom96 | we just build with the most recent http package that fits the range |
15:10:12 | jjido | "impossible" |
15:11:42 | dom96 | (impossible in Nim :)) |
15:16:03 | FromGitter | <tim-st> hi, just a short question: what is the expected output of "ä".runeAt(0).char() ? |
15:17:16 | FromGitter | <nitely> dom96: mmh, so you can *not* have multiple version of the same package installed |
15:17:56 | dom96 | You can. |
15:19:28 | FromGitter | <nitely> goodamit :) we have enter an infinite loop |
15:20:11 | FromGitter | <mratsim> @dom96 that's been "solved" for years in distro package manager like pacman: "Incompatible dependencies".--> Done. |
15:20:35 | dom96 | nitely: there is a difference between installation and compilation |
15:21:04 | dom96 | mratsim: that's how Nimble has been solving it since its inception |
15:21:26 | dom96 | but there must be more to it when lock files come into play |
15:21:35 | * | gokr quit (Ping timeout: 248 seconds) |
15:22:46 | FromGitter | <mratsim> I'm using the HoldPkg and IgnorePkg conf a lot for the nvidia-drivers/xorg on Archlinux |
15:23:20 | FromGitter | <mratsim> Dunno if it can help to design the pinning feature. |
15:29:14 | * | zippyy joined #nim |
15:32:59 | skrylar_ | apt has a more in-depth pinning system |
15:33:27 | skrylar_ | 'holds' block all updates against held packages (i think it technically counts as a 'pin' with some ridiculously high weight) |
15:33:56 | skrylar_ | then 'pins' let you set policies for packages like which repo they are actually taken from |
15:34:26 | skrylar_ | so its possible to do things like have debian/stretch be the "default" and then explicit packages are taken from testing/sid |
15:38:47 | FromGitter | <andreaferretti> @dom96 I think that what @nitely means is actually using both versions at the same time |
15:38:53 | FromGitter | <nitely> @tim-st `char` is suppose to be a `uint8`, that Rune (228) is within range. `int(char.high) == 255` however, `char(256)` somehow works... |
15:38:58 | FromGitter | <andreaferretti> you can do this for sure in NPM |
15:39:12 | FromGitter | <andreaferretti> I don't know abot cargo, I guess that with compiled languages is trickier |
15:39:27 | dom96 | andreaferretti: yeah, I understand. |
15:39:50 | dom96 | Are you sure you can do it for NPM? |
15:39:57 | FromGitter | <andreaferretti> sure |
15:40:00 | FromGitter | <nitely> you can now |
15:40:05 | dom96 | how does that work? |
15:40:08 | FromGitter | <andreaferretti> you always could |
15:40:10 | FromGitter | <andreaferretti> simple |
15:40:30 | FromGitter | <andreaferretti> each dependency has a subfolder with all its dependencies, recursively |
15:40:38 | FromGitter | <andreaferretti> hence dependencies form a tree |
15:41:05 | dom96 | interesting |
15:41:15 | FromGitter | <andreaferretti> nowadays there is some form of linearization |
15:41:19 | FromGitter | <andreaferretti> of this tree |
15:41:26 | FromGitter | <andreaferretti> to avoid redundancy |
15:41:28 | FromGitter | <tim-st> @nitely Thanks for your answer. I tried to work between Rune and char and the yielded ord-value in nimlang is 228 and in Python2 it its 132. Currently trying to find out why they are different. |
15:41:53 | FromGitter | <andreaferretti> but version 1 was just like that - every package recursively includes all the deps on the filesystem |
15:42:13 | dom96 | That would work for Nim if it wasn't for how it determines .c output file names. |
15:42:14 | FromGitter | <andreaferretti> notice that this creates a possible problem |
15:42:25 | dom96 | although I'm sure that's not the only problem Nim would face |
15:42:45 | FromGitter | <andreaferretti> if you have two different versions of the same dependency which declare incompatible types |
15:42:52 | FromGitter | <andreaferretti> and the two must interoperate |
15:42:55 | FromGitter | <nitely> @tim-st Python3 returns 228 for `ord("ä")` |
15:42:58 | * | endragor quit (Remote host closed the connection) |
15:44:09 | FromGitter | <nitely> @tim-st mmh, Python2 as well |
15:44:23 | crem | For different reasons. |
15:44:24 | FromGitter | <nitely> *as well/too |
15:44:46 | crem | python2 returns that only if your locale codepage is cp1252 (latin-1) |
15:45:09 | * | endragor joined #nim |
15:45:16 | crem | Because unicode range of 128..255 largely happen to match latin-1 |
15:45:25 | FromGitter | <tim-st> Alright, thanks for your answers. Than it was my mistake! |
15:48:04 | * | skrylar_ quit (Quit: Leaving) |
15:49:03 | FromGitter | <nitely> crem: that should not matter if you decode the input properly... |
15:49:12 | * | endragor quit (Ping timeout: 240 seconds) |
15:49:39 | FromGitter | <nitely> or you have an utf-8 file and do `ord(u"ä")` |
15:51:00 | FromGitter | <nitely> it should always return the right code point (for every unicode character). That's my understanding |
15:51:03 | * | PMunch quit (Quit: Leaving) |
15:51:08 | crem | For unicode, yes. |
15:51:46 | crem | I told that if you just do ord("ä") in python2 and got a number, that's not unicode codepoint number. |
15:51:53 | FromGitter | <tim-st> I did input the code on the console and the resulting value was the ascii value 132 |
15:52:10 | FromGitter | <tim-st> http://www.theasciicode.com.ar/extended-ascii-code/letter-a-umlaut-diaeresis-a-umlaut-lowercase-ascii-code-132.html |
15:52:46 | FromGitter | <nitely> ah, then you had the issue described by crem. You should decode that or use the u"" syntax |
15:53:19 | FromGitter | <tim-st> Thanks, is there any list for the values I actually need to know, like 228 for ä ? |
15:53:24 | FromGitter | <nitely> there are other ways but I think we can only talk about nim here :P |
15:53:35 | crem | btw, there is inaccuracy in dom96's book. It's written that nim's char "cannot store UTF-8 characters and can only store ASCII". :) |
15:53:59 | dom96 | that's not inaccurate |
15:54:12 | FromGitter | <nitely> @tim-st There is the unicode database. |
15:54:25 | FromGitter | <tim-st> ok^^ |
15:55:14 | crem | dom96: It is, as far as I understand char. There is no such thing as "utf-8 character", only codepoints and codeunits (and last ones it can store). And also it can store complete non-ASCII characters in single-byte encodings. |
15:55:36 | FromGitter | <nitely> @tim-st http://www.unicode.org/ucd/ |
15:56:19 | dom96 | Isn't å a UTF-8 character? |
15:56:20 | * | endragor joined #nim |
15:56:25 | dom96 | You cannot represent that with a 'char' |
15:56:35 | crem | It's Unicode character. |
15:56:42 | FromGitter | <tim-st> But the manual says: "A character is not an Unicode character but a single byte" |
15:56:49 | crem | UTF-8 is one of the ways to encode Unicode. |
15:58:07 | dom96 | okay, maybe I should have written "Unicode" |
15:58:57 | FromGitter | <nitely> if char is uint8 and å is 228 then you can use char... |
15:59:32 | FromGitter | <nitely> but this `char(256)` works, not sure why it does... |
15:59:44 | crem | Yes! And also that "it can only store ASCII characters" is not true, although I remember that it could be interpreted in the text the way it's not exclusive. |
16:02:17 | FromGitter | <nitely> `int(char.high) == 255`:\ |
16:02:48 | FromGitter | <tim-st> Thanks for your answers! I have one question left: Is there a performance difference (runtime, memory) when I access a const set defined in the beginning of the file from a proc instead of defining the same set inside the proc again and accessing it from there? |
16:03:58 | FromGitter | <mratsim> Const are replaced by their actual value by the compiler iirc. |
16:05:12 | FromGitter | <mratsim> i.e. f you declare const one = 1 at the beginning of the file or in the proc, you will get the same C code (no const at all and the value inlined where const was used). |
16:07:04 | * | couven92 quit (Quit: Client disconnecting) |
16:07:05 | * | miran_ joined #nim |
16:07:22 | FromGitter | <tim-st> Ok, but e.g. in strutils often {'a'..'z'} is manually written instead of defined it once and referring to the global const value. Why is this if there is no performance difference? |
16:10:23 | * | MJCaley joined #nim |
16:12:50 | * | endragor quit (Remote host closed the connection) |
16:13:56 | * | gokr joined #nim |
16:19:31 | dom96 | there is no const for this because it's easy to write |
16:21:26 | FromGitter | <alehander42> hm, I didn't suspect how differently enum sets are implemented compared to int sets |
16:21:42 | FromGitter | <alehander42> one thing I wonder is, why are they not "packed" |
16:21:47 | * | Trustable joined #nim |
16:21:50 | FromGitter | <tim-st> @dom96 OK thanks, that's all I wanted to know, because I moved from Python and wasn't sure about some things regarding performance. |
16:22:29 | FromGitter | <alehander42> actually nv, |
16:22:33 | FromGitter | <alehander42> nvm it makes sense |
16:25:34 | * | gokr quit (Ping timeout: 264 seconds) |
16:59:12 | * | miran_ quit (Quit: Konversation terminated!) |
16:59:24 | * | sendell quit (Remote host closed the connection) |
17:01:43 | * | nsf quit (Quit: WeeChat 1.9.1) |
17:02:05 | * | JappleAck quit (Ping timeout: 240 seconds) |
17:08:32 | FromGitter | <alehander42> Araq: is there a standard way to somehow mark a function with some flag which is propagadated until codegen ? |
17:10:53 | * | MJCaley quit (Quit: MJCaley) |
17:12:44 | * | jjido quit (Ping timeout: 276 seconds) |
17:13:26 | Araq | alehander42: .magic or .compilerproc depending on your needs |
17:14:08 | * | miran_ joined #nim |
17:14:52 | * | arecaceae quit (Remote host closed the connection) |
17:15:11 | * | arecaceae joined #nim |
17:15:36 | FromGitter | <alehander42> well I need it for the jsgen of async functions, so I am not sure if those are a good fit |
17:17:38 | FromGitter | <mratsim> @alehander42 I’m pretty sure I’ve seen a packed enum somewhere, I don’t remember where though |
17:19:46 | * | JappleAck joined #nim |
17:19:54 | * | couven92 joined #nim |
17:20:07 | FromGitter | <alehander42> no, I was confused about the packed enum thing |
17:20:57 | FromGitter | <alehander42> I was wrong* , it was something about sets of enums, but their impl is actually "packed" maximally |
17:22:29 | * | JappleAck quit (Client Quit) |
17:25:05 | * | PMunch joined #nim |
17:25:16 | enthus1ast | guys, im trying to load a shared objekt, inside the shared obj i have an async function, my loader periodocally calls an "poll" function which in turn calls async poll. Can this work? |
17:28:16 | * | Jesin joined #nim |
17:28:29 | * | d10n-work joined #nim |
17:28:37 | * | zippyy quit (Ping timeout: 258 seconds) |
17:28:46 | dom96 | enthus1ast: I guess so |
17:28:51 | dom96 | Hard to say without more details |
17:29:40 | * | JappleAck joined #nim |
17:29:43 | enthus1ast | let me create a gist |
17:30:34 | * | Jesin quit (Remote host closed the connection) |
17:32:50 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
17:33:03 | couven92 | @tim-st, I have had the pleasure of playing a lot with the unicode module lately :) (I have an ongoing PR there). `char` is uint8, meaning it can take values from 0 to 255. However, ASCI is 7-bit, so only up to 127. So if you have the right codepage printing a char with values between 128 and 255 will work nicely. Now `Rune` is actually a 32-bit integer storing the codepoint value **which is different to the UTF-8 bytes**! Converting a Rune to |
17:33:03 | couven92 | a char will truncate the value to 8-bits. Converting a char value to a Rune will zero extend 8-bit to 32-bit (and for latin codepages this will work). However, `"ä"` is actually rewritten by Nim to a byte string with **two** bytes, that represent the UTF-8 pattern for the `"ä"` rune. The first byte will be in the range 128-255 (i.e. outside ASCII) to signal one UTF-8 continuation byte. The second byte will probably be a fairly small number. |
17:36:17 | couven92 | also note that conversions from Runes to char (and especially from char to Rune) might be subject to signed/unsiged issues, as Rune is signed, whereas char is unsigned |
17:37:56 | couven92 | basically, use char only for ASCII, use byte for 8-bit integers, use string for byte sequences, and use `$` to stringify a Rune into one or more (max 4) bytes |
17:38:16 | * | zippyy joined #nim |
17:41:58 | * | floppydh quit (Quit: WeeChat 1.9.1) |
17:49:40 | FromGitter | <nitely> couven92: ah, it truncates. That's why `char(256)` works |
17:50:43 | FromGitter | <nitely> and by "works" I mean it does not throw an error. |
17:51:19 | couven92 | yeah, pretty much :) |
17:57:22 | * | zippyy quit (Ping timeout: 260 seconds) |
18:02:54 | * | jjido joined #nim |
18:03:33 | enthus1ast | dom96: https://gist.github.com/enthus1ast/662a753b0d7bcc8a929d77ea36dd250f |
18:03:57 | enthus1ast | this is an runnable example |
18:06:22 | * | xet7 quit (Quit: Leaving) |
18:07:08 | * | zippyy joined #nim |
18:07:46 | * | couven92 quit (Read error: Connection reset by peer) |
18:10:23 | * | sakalli joined #nim |
18:11:31 | * | claudiuinberlin joined #nim |
18:13:42 | * | Sentreen quit (Ping timeout: 260 seconds) |
18:18:22 | * | jjido quit (Ping timeout: 260 seconds) |
18:19:12 | * | Trustable quit (Remote host closed the connection) |
18:21:37 | * | fraya joined #nim |
18:26:05 | * | Sentreen joined #nim |
18:30:42 | dom96 | enthus1ast: does it work if you use module.nim as an ordinary nim import? |
18:31:05 | * | ketralnis quit (Quit: Coyote finally caught me) |
18:31:23 | * | zippyy quit (Ping timeout: 276 seconds) |
18:33:03 | * | BitPuffin|osx quit (Ping timeout: 248 seconds) |
18:34:05 | * | Ven`` joined #nim |
18:34:10 | enthus1ast | dom96: yes work |
18:35:40 | dom96 | Then I don't know. I'm guessing there is some extra initialisation you need to do with the DLL |
18:37:31 | enthus1ast | i'm also a little unshure how it lays out in memory. Does the so have its own gb? |
18:37:52 | FromGitter | <tim-st> @couven92 Thanks for the detailled answer, appreciate it! |
18:40:26 | * | ipjk joined #nim |
18:46:56 | * | fraya quit (Quit: Leaving) |
19:02:39 | * | rbrt joined #nim |
19:09:42 | * | nsf joined #nim |
19:19:56 | * | MJCaley joined #nim |
19:25:33 | * | JappleAck quit (Quit: Leaving) |
19:43:21 | * | vlad1777d joined #nim |
19:45:50 | * | Snircle joined #nim |
20:19:21 | * | MJCaley quit (Quit: MJCaley) |
20:22:38 | * | MJCaley joined #nim |
20:23:12 | * | sz0 joined #nim |
20:38:29 | * | Vladar quit (Quit: Leaving) |
20:56:04 | * | jjido joined #nim |
21:15:29 | * | miran_ quit (Quit: Konversation terminated!) |
21:28:30 | * | Ven joined #nim |
21:28:55 | * | Ven is now known as Guest67933 |
21:29:39 | * | astronavt joined #nim |
21:42:24 | * | PMunch quit (Quit: leaving) |
21:45:28 | * | jjido quit (Read error: No route to host) |
21:50:35 | * | astronavt quit (Remote host closed the connection) |
21:50:55 | * | astronavt joined #nim |
21:51:17 | * | astronavt quit (Remote host closed the connection) |
21:55:29 | * | klaver010110 joined #nim |
21:59:28 | * | klaver010110 quit () |
22:03:20 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
22:08:10 | rbrt | is there a good example of going between a nim type and a python object using python ctypes or cffi? |
22:08:42 | rbrt | looks like im running all over memory |
22:09:17 | rbrt | (getting values like 4.9*10^-324 lol) |
22:10:02 | rbrt | trying to do something like this example from ruby http://www.bootstrap.me.uk/bootstrapped-blog/nim-for-the-discerning-rubyist |
22:10:07 | rbrt | but in python |
22:15:56 | * | Ven joined #nim |
22:16:20 | * | Ven is now known as Guest70676 |
22:16:23 | * | Guest67933 quit (Read error: Connection reset by peer) |
22:16:55 | Araq | dom96, (int, EnumValue.high) should never have worked |
22:17:12 | dom96 | why? |
22:17:22 | Araq | because type safety. |
22:18:03 | dom96 | ok, what about `0 .. cuint:` ? |
22:18:52 | Araq | that works. |
22:19:35 | dom96 | here is the error I'm getting: https://gist.github.com/dom96/c545402dcc85d916984155f0a49fa889 |
22:20:10 | Araq | what's the code? |
22:21:16 | dom96 | for i in 0..<unit.getNumDiagnostics(): |
22:21:22 | dom96 | getNumDiagnostics returns cuint |
22:21:58 | dom96 | as far as the (int, EnumValue.high), can I add support for it via lenientops? |
22:23:21 | Araq | no, fix your code |
22:23:47 | Araq | ..< never supported multiple Ts |
22:23:56 | Araq | .. < did but that was just bad luck |
22:24:31 | Araq | fix your code but I just got an idea... |
22:26:02 | * | sakalli quit (Ping timeout: 276 seconds) |
22:26:04 | dom96 | This isn't my code :) |
22:28:04 | Araq | ok my idea works but ugh, it's such a hack... |
22:28:39 | Araq | template `..<`*(a, b): untyped = |
22:28:40 | Araq | # reverse type inference rules: First look at the ``b`` expression: |
22:28:40 | Araq | b >.. a |
22:29:42 | Araq | I'll fix that damn type inference instead but it could take a while and who knows what it will break |
22:30:35 | FromGitter | <mratsim> @rbrt try looking into nim-pymod, and also the video of subsetpark for PyGotham 2017 about optimizing Python For loops using Nim. The link is on Nim Reddit |
22:31:46 | dom96 | Araq: So it's just to do with the order of the arguments? |
22:31:58 | Araq | yes |
22:32:36 | subsetpark | mratsim rbrt also available for questions here - might also be useful to look at https://pypi.python.org/pypi/nim-types which does a tiny bit of the heavy lifting for you |
22:36:03 | * | skrylar joined #nim |
22:47:19 | * | gokr joined #nim |
22:55:02 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:55:34 | * | MJCaley quit (Quit: MJCaley) |
23:03:23 | rbrt | mratsim, thanks for the refs |
23:04:18 | rbrt | subsetpark, talk was fantastic, your use case is extremely similar to mine. im gonna dig a bit more into nim-pymod and your nim-types but ill let you know if i have any questions. thanks! |
23:07:35 | subsetpark | awesome! feel free to msg me |
23:07:43 | subsetpark | I'm on EST |
23:10:51 | subsetpark | Or actually - dom96 would say you should keep questions in channel so all can learn :) |
23:13:07 | dom96 | True that :) |
23:15:55 | * | Guest70676 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:34:35 | * | skrylar quit (Ping timeout: 240 seconds) |
23:48:22 | * | xet7 joined #nim |