00:00:52 | rayman22201 | loadjs is the equivalent of dlopen for us native people |
00:14:28 | * | mal`` quit (Quit: Leaving) |
00:14:29 | FromDiscord | <krab4t> why i can't use fmt here https://play.nim-lang.org/#ix=1ZFe |
00:15:04 | FromDiscord | <krab4t> undeclared identifier: 'token' |
00:19:30 | * | mal`` joined #nim |
00:21:18 | FromDiscord | <krab4t> i mean i just want some reflection, get that identifier name |
00:34:06 | * | stefantalpalaru quit (Quit: stefantalpalaru) |
00:37:33 | FromDiscord | <krab4t> and ` typetraits.name ` doesnt work for untyped in templates? :\ |
00:46:24 | FromDiscord | <krab4t> astToStr |
01:05:42 | FromDiscord | <krab4t> strformat has limitations, so im not going crazy |
01:12:30 | disruptek | reflection isn't really a thing. |
01:12:41 | disruptek | you do whatever you want at compile-time. |
01:13:08 | * | tiorock joined #nim |
01:13:08 | * | tiorock quit (Changing host) |
01:13:08 | * | tiorock joined #nim |
01:13:08 | * | rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services))) |
01:13:08 | * | tiorock is now known as rockcavera |
01:14:16 | FromDiscord | <krab4t> don't even know whats better: call file.write 3 times, (spaces, var name, space) or do that hack with block and inject from https://nim-lang.org/docs/strformat.html#limitations |
01:31:21 | FromDiscord | <elvisxzhou> Hello, what's the equivalent of c' exit(1) in nim? |
01:31:37 | disruptek | quit(1) |
01:47:03 | FromGitter | <Willyboar> I published a little demo from my static blog gen |
01:47:05 | FromGitter | <Willyboar> https://bigbaron.org/ |
01:47:30 | FromGitter | <Willyboar> tomorrow i will release it ( i hope ) to nimble |
02:01:19 | * | Guest94707 quit (Remote host closed the connection) |
02:06:12 | FromDiscord | <elvisxzhou> Hello, how to invoke a proc by its string name in nim? |
02:09:42 | leorize | depending on where this string came from |
02:10:01 | disruptek | t'was in the depths of mordor. |
02:12:31 | * | JStoker joined #nim |
02:13:34 | shashlick | @elvisxzhou use a table |
02:17:26 | * | krux02_ quit (Remote host closed the connection) |
02:21:37 | disruptek | tell me, shashlick |
02:21:42 | * | rockcavera quit (Read error: Connection reset by peer) |
02:21:59 | disruptek | what good is a phone call when you are unable to speak? |
02:22:13 | * | rockcavera joined #nim |
02:22:14 | * | rockcavera quit (Changing host) |
02:22:14 | * | rockcavera joined #nim |
02:28:04 | * | Hideki_ joined #nim |
02:30:53 | shashlick | you could use morse |
02:32:38 | * | Hideki_ quit (Ping timeout: 265 seconds) |
02:36:44 | * | rockcavera quit (Remote host closed the connection) |
02:53:05 | FromDiscord | <Chiqqum_Ngbata> Is this the generally preferred way to expose a string buffer to C function that wants a char pointer, and return a nim string out of it? https://pastebin.com/unjmTUU7 |
02:56:28 | FromDiscord | <Kiori Sün> thanks @rayman22201 for the reply. |
02:56:28 | FromDiscord | <Kiori Sün> I've tested it here and thank god Nim doesn't output an iffe. I'm still looking into it, but the interop seem reasonable. It may be doable. the only catch i see is the output filesize, with all the added ergonomics. I guess mostly because of the type system. |
03:10:11 | FromDiscord | <Kiori Sün> using `nim js -d:release -d:danger ...` seems to help a lot with the size, but i wonder if it will crash anything on complex projects. |
03:16:51 | leorize | Chiqqum_Ngbata: no |
03:17:16 | leorize | the preferred way is to convert the string to `cstring` |
03:17:54 | * | chemist69 quit (Ping timeout: 246 seconds) |
03:18:27 | leorize | or make sure that the function signature is cstring, which string could be implicitly converted to |
03:20:01 | * | chemist69 joined #nim |
03:23:18 | FromDiscord | <Chiqqum_Ngbata> You mean not return a string? |
03:24:08 | leorize | what exactly are you trying to do? |
03:25:28 | FromDiscord | <Chiqqum_Ngbata> C function wants a char pointer to store a null-terminated string. I want a string out of it (so the string procs are exposed downstream) |
03:26:12 | disruptek | cstring is `compatible string`. it's a portable string between nim and any ffi. |
03:26:41 | disruptek | it is null-terminated. plenty of explanation exists in the manual. |
03:26:57 | disruptek | if you have a specific question about it or interop, ask away. |
03:28:05 | disruptek | you can, of course, play with it in nim against other nim code, as well, should you wish to perform your own experiments... |
03:28:26 | FromDiscord | <Chiqqum_Ngbata> The string procs aren't defined for cstring also, right? |
03:29:12 | disruptek | it's convertible but it's a different type with more c-like semantics (null terminated, eg.) |
03:29:58 | FromDiscord | <Chiqqum_Ngbata> So downstream someone would have to $myretval.split("whatever") |
03:31:06 | leorize | there's cstrutils |
03:33:55 | FromDiscord | <Chiqqum_Ngbata> What if, theoretically speaking, someone did want to just return a nim string from null-terminated char buffer that's filled by a call to C lib, would this be reasonable? https://pastebin.com/unjmTUU7 |
04:07:41 | FromDiscord | <Chiqqum_Ngbata> (Paste expired but it's pretty much this: https://pastebin.com/DzxPanQ1 , would be good to know if there's a much more efficient way / if I'm doing something anathema) |
04:28:56 | * | nsf joined #nim |
04:44:37 | * | brainproxy quit (Ping timeout: 240 seconds) |
04:51:16 | * | brainproxy joined #nim |
04:54:49 | * | LargeEpsilon joined #nim |
04:57:57 | leorize | Chiqqum_Ngbata: the efficient way is to not + 1 :P |
04:58:10 | FromDiscord | <Chiqqum_Ngbata> setLen() seems to avoid the copy |
04:58:10 | leorize | Nim allocates enough storage to store some extra bytes |
04:58:15 | leorize | yes |
04:58:37 | leorize | and please don't use `let` if you're writing into it |
04:59:07 | leorize | convert to cstring is the same as `addr s[0]` |
04:59:45 | * | LargeEpsilon quit (Ping timeout: 246 seconds) |
04:59:45 | FromDiscord | <Chiqqum_Ngbata> Right. I'm reasonably happy with this now |
05:00:17 | * | brainproxy quit (Ping timeout: 240 seconds) |
05:05:14 | * | brainproxy joined #nim |
05:08:08 | * | theelous3_ joined #nim |
05:10:06 | * | brainproxy quit (Ping timeout: 268 seconds) |
05:10:13 | lqdev[m] | shashlick: any ideas regarding my issue? |
05:11:35 | * | theelous3 quit (Ping timeout: 276 seconds) |
05:13:25 | * | brainproxy joined #nim |
05:18:17 | * | brainproxy quit (Ping timeout: 240 seconds) |
05:19:17 | * | narimiran joined #nim |
05:20:54 | * | brainproxy joined #nim |
05:25:53 | * | brainproxy quit (Ping timeout: 276 seconds) |
05:29:50 | * | brainproxy joined #nim |
05:34:16 | * | brainproxy quit (Ping timeout: 264 seconds) |
05:35:07 | * | dddddd quit (Read error: Connection reset by peer) |
05:36:34 | * | brainproxy joined #nim |
05:41:27 | * | brainproxy quit (Ping timeout: 264 seconds) |
05:48:27 | * | brainproxy joined #nim |
05:59:17 | * | brainproxy quit (Ping timeout: 240 seconds) |
06:02:58 | * | brainproxy joined #nim |
06:08:50 | * | brainproxy quit (Ping timeout: 240 seconds) |
06:09:37 | * | brainproxy joined #nim |
06:14:38 | * | brainproxy quit (Ping timeout: 276 seconds) |
06:17:23 | * | brainproxy joined #nim |
06:22:00 | * | solitudesf joined #nim |
06:24:40 | * | brainproxy quit (Ping timeout: 264 seconds) |
06:30:38 | * | brainproxy joined #nim |
06:39:06 | * | PMunch joined #nim |
06:40:06 | * | brainproxy quit (Ping timeout: 265 seconds) |
06:42:02 | * | brainproxy joined #nim |
06:47:08 | * | brainproxy quit (Ping timeout: 276 seconds) |
06:51:33 | * | brainproxy joined #nim |
06:56:10 | * | brainproxy quit (Ping timeout: 268 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:01:44 | * | brainproxy joined #nim |
07:03:46 | * | krux02 joined #nim |
07:04:25 | * | gmpreussner joined #nim |
07:06:08 | * | brainproxy quit (Ping timeout: 245 seconds) |
07:10:06 | PMunch | Hmm, I get an error with nimterop: Error: unhandled exception: getters.nim(105, 14) `(not name.contains(re"_[_]+"))` Identifier 'OMITTED__D_GNU_SOURCE' (nskConst) contains more than one consecutive underscore '_' [AssertionError] |
07:10:12 | * | brainproxy joined #nim |
07:15:54 | * | brainproxy quit (Ping timeout: 246 seconds) |
07:16:31 | FromDiscord | <Chiqqum_Ngbata> Identifiers beginning with _ or containing multiple __ is invalid in nim IIRC |
07:16:48 | PMunch | Yeah they are |
07:17:03 | PMunch | But this is translating C sources into Nim |
07:17:27 | FromDiscord | <Chiqqum_Ngbata> Oh |
07:21:46 | * | brainproxy joined #nim |
07:25:22 | PMunch | "solved" it by telling nimterop to ignore that symbol |
07:27:55 | PMunch | Hmm, --recurse doesn't appear to do anything.. |
07:28:26 | * | brainproxy quit (Ping timeout: 240 seconds) |
07:35:08 | * | brainproxy joined #nim |
07:39:21 | * | brainproxy quit (Ping timeout: 250 seconds) |
07:44:21 | * | brainproxy joined #nim |
07:44:24 | lqdev[m] | PMunch: use cPlugin to modify symbols |
07:45:22 | PMunch | cPlugin? |
07:48:03 | * | letto quit (Quit: Konversation terminated!) |
07:48:05 | * | ftsf quit (Read error: Connection reset by peer) |
07:48:30 | * | ftsf joined #nim |
07:49:40 | * | letto joined #nim |
07:53:26 | * | brainproxy quit (Ping timeout: 276 seconds) |
07:54:25 | * | brainproxy joined #nim |
07:55:47 | * | LargeEpsilon joined #nim |
07:58:50 | * | brainproxy quit (Ping timeout: 240 seconds) |
08:00:18 | * | LargeEpsilon quit (Ping timeout: 268 seconds) |
08:01:58 | * | brainproxy joined #nim |
08:03:21 | * | gmpreussner quit (Quit: kthxbye) |
08:03:38 | * | gmpreussner joined #nim |
08:05:19 | * | Vladar joined #nim |
08:06:37 | * | brainproxy quit (Ping timeout: 265 seconds) |
08:11:22 | * | brainproxy joined #nim |
08:11:40 | * | floppydh joined #nim |
08:15:37 | * | brainproxy quit (Ping timeout: 240 seconds) |
08:22:47 | * | brainproxy joined #nim |
08:23:17 | * | tklohna_ joined #nim |
08:25:35 | * | solitudesf quit (Ping timeout: 268 seconds) |
08:27:57 | * | brainproxy quit (Ping timeout: 240 seconds) |
08:30:57 | * | brainproxy joined #nim |
08:38:31 | * | theelous3_ quit (Ping timeout: 265 seconds) |
08:43:52 | * | brainproxy quit (Ping timeout: 264 seconds) |
08:47:10 | * | nif quit (Quit: ...) |
08:47:21 | * | nif joined #nim |
08:59:21 | * | lritter joined #nim |
09:01:01 | * | traviss quit (Quit: Leaving) |
09:08:30 | * | ng0 joined #nim |
09:10:01 | narimiran | !eval echo NimVersion |
09:10:04 | NimBot | 1.0.0 |
09:10:25 | * | Zevv is now known as NinBot |
09:10:29 | narimiran | pffft, completely unusable and severely outdated! cmon PMunch, this is intolerable! :P :D |
09:10:45 | * | NinBot is now known as Zevv |
09:11:14 | * | Zevv is now known as NinBot |
09:11:19 | PMunch | Huh, strange |
09:11:30 | * | NinBot is now known as Zevv |
09:13:59 | PMunch | Woops, I had some relative paths in the script that my cront-task is running |
09:14:07 | PMunch | So it didn't work properly |
09:17:27 | PMunch | Am I doing something wrong or does "toast -r" simply not work? |
09:18:44 | * | brainproxy joined #nim |
09:19:22 | Araq | you need to use 'toaster toast -r', toast cannot make itself |
09:19:43 | PMunch | Huh? |
09:19:43 | Araq | sorry, couldn't resist |
09:19:46 | PMunch | Haha |
09:23:30 | dom96 | `toast -r`? lol |
09:24:37 | Araq | so... |
09:24:49 | Araq | "nim devel" cannot build 1.0.x as we removed magics |
09:25:17 | Araq | the question is whether we value compiler code cleanness (is what a word) moreso than compat |
09:25:55 | PMunch | dom96, toast is the nimterop tool to translate .h files to .nim |
09:25:58 | Araq | in the past Nim version x could build version y > x |
09:26:10 | Araq | but y couldn't build x |
09:26:18 | PMunch | And -r is supposed to process #include files, but it doesn't appear to do anything.. |
09:26:20 | Araq | but it sucks |
09:26:25 | Araq | any opinions? |
09:26:46 | dom96 | what magics did we remove? |
09:27:00 | Araq | mAddI64 (integer addition for 64 bits) |
09:27:11 | Araq | there is now only mAddI (integer addition) |
09:27:29 | Araq | and likewise for mul, div etc |
09:29:56 | Araq | it's a nice compiler cleanup but that devel cannot build the version-1-0 branch is really bad |
09:31:57 | Araq | ah |
09:32:23 | Araq | I can add a translation step to pragmas.nim that handles 'magic' to make it work again |
09:32:42 | Araq | thanks for listening |
09:34:11 | Araq | hey this is really sweet, it will help us quite a bit moving stuff forward |
09:36:30 | * | brainproxy quit (Ping timeout: 268 seconds) |
09:40:22 | * | lritter quit (Quit: Leaving) |
09:43:07 | * | brainproxy joined #nim |
09:54:23 | * | brainproxy quit (Ping timeout: 268 seconds) |
10:10:59 | * | abm joined #nim |
10:11:54 | * | LargeEpsilon joined #nim |
10:11:58 | * | ee7[m] quit (Quit: 30 day idle timeout.) |
10:17:39 | * | Hideki joined #nim |
10:18:03 | * | Hideki is now known as Guest3109 |
10:19:52 | * | nif quit (Quit: ...) |
10:20:00 | * | nif joined #nim |
10:25:17 | * | Mister_Magister quit (Excess Flood) |
10:26:57 | * | LargeEpsilon quit (Ping timeout: 240 seconds) |
10:29:57 | * | LargeEpsilon joined #nim |
10:35:29 | * | brainproxy joined #nim |
10:39:03 | FromDiscord | <arnetheduck> regarding integers, what would be nice woould be to have stuff like `addOverflow`, `addSaturated`, `addWrap` etc that would have more logic in nim/std lib (if overflow, raise) - then the default `+` etc operators could simply be templates/aliases that call these functions |
10:39:17 | * | lbart quit (Ping timeout: 240 seconds) |
10:39:52 | federico3 | https://www.devever.net/~hl/cloudflare |
10:40:22 | FromDiscord | <arnetheduck> it's likely we'll do something like that for stew - for example when doing bigint, that's what you need (`addWrap` for example..) while saturated math is becoming quite popular in security sensitive contexts |
10:40:38 | FromDiscord | <arnetheduck> or.. `addCarry` strictly |
10:40:56 | narimiran | "i don't often post in #nim (not even ontopic stuff), but when i do, it is the stuff that should be posted to #nim-offtopic" :D :D |
10:41:10 | * | lbartoletti joined #nim |
10:42:24 | * | brainproxy quit (Ping timeout: 252 seconds) |
10:43:38 | * | brainproxy joined #nim |
10:49:05 | Araq | it turned out to be something else, just 2 lines that got removed from condsysm.nim |
10:49:16 | * | LargeEpsilon quit (Ping timeout: 264 seconds) |
10:50:50 | * | sedfox quit (Ping timeout: 240 seconds) |
10:51:07 | * | brainproxy quit (Ping timeout: 268 seconds) |
10:55:37 | * | clyybber joined #nim |
10:56:50 | * | brainproxy joined #nim |
10:58:06 | * | sedfox joined #nim |
11:00:46 | * | rockcavera joined #nim |
11:01:17 | * | brainproxy quit (Ping timeout: 250 seconds) |
11:02:10 | * | clyybber quit (Quit: WeeChat 2.6) |
11:02:45 | * | brainproxy joined #nim |
11:12:04 | * | brainproxy quit (Ping timeout: 264 seconds) |
11:17:28 | * | brainproxy joined #nim |
11:19:03 | * | Guest3109 quit (Ping timeout: 245 seconds) |
11:19:08 | federico3 | we should move away from cloudflare |
11:21:28 | * | solitudesf joined #nim |
11:22:34 | * | brainproxy quit (Ping timeout: 268 seconds) |
11:24:25 | FromDiscord | <Rika> why |
11:26:00 | * | brainproxy joined #nim |
11:26:47 | federico3 | see the link above |
11:30:21 | * | brainproxy quit (Ping timeout: 246 seconds) |
11:32:51 | FromDiscord | <kodkuce> if you add Rusts ownership systme to nim would it solve shared memory thingy whiteout braking other nim concepts? |
11:34:50 | * | brainproxy joined #nim |
11:35:50 | leorize | if it was that easy |
11:36:08 | leorize | then we wouldn't be trying to hack newruntime :P |
11:38:57 | * | brainproxy quit (Ping timeout: 240 seconds) |
11:39:22 | Araq | I think if we had 'owned' that could be duplicated without the possibility to create cycles it might work out |
11:39:41 | Araq | currently that is achieved by "owned can only be moved" |
11:42:15 | Araq | we can weaken that requirement to: escapes(ownedRef) only allowed for when 'ownedRef' is the last read but that is useless |
11:44:06 | PMunch | !eval echo NimVersion, " better now narimiran" |
11:44:08 | NimBot | 1.0.2 better now narimiran |
11:44:14 | narimiran | :) |
11:44:23 | * | brainproxy joined #nim |
11:45:50 | PMunch | And now the script should work |
11:46:13 | PMunch | So it should start the update at most 10 minutes after the tag is pushed |
11:46:24 | narimiran | wow, nice! |
11:46:57 | dom96 | what might be more reliable is to look at the choosenim `stable` channel :) |
11:48:25 | PMunch | Well the script will pull every tagged version and build them into their separate container based on the closest csources |
11:48:57 | * | brainproxy quit (Ping timeout: 265 seconds) |
11:49:13 | Araq | hey, it's bikeshedding time |
11:49:18 | PMunch | Apart from a list of ignored versions that still called the executable "nimrod" so they break on the playground. And of course the latest tagged image will also do a full nimble install of all the packages |
11:49:32 | PMunch | Oh? What is the bikeshed this time? |
11:49:37 | dom96 | oh cool, so we support multiple versions? |
11:49:44 | Araq | what should the name of the "Nim distribution" should be? |
11:49:59 | PMunch | dom96, been a while since you've been to the playground? https://play.nim-lang.org |
11:50:11 | Araq | "Nim fusion", "Nim cold fusion", "Nim distro", "Nim with batteries" |
11:50:23 | Araq | "Curated Nim" |
11:50:31 | dom96 | PMunch :O |
11:50:32 | PMunch | You have compilation targets and all versions back to v0.13.0 |
11:50:46 | PMunch | Araq, as opposed to? |
11:50:46 | Araq | dom96, ikr, it's awesome |
11:51:08 | Araq | nothing, I'm asking about a name |
11:51:14 | dom96 | written in Karax too :O |
11:51:39 | PMunch | Yeah :) It's been written in Karax for ages :P |
11:51:51 | federico3 | Araq: what's the "Nim distribution" tho? |
11:52:08 | * | brainproxy joined #nim |
11:52:12 | Araq | federico3, I'm writing an RFC about it |
11:52:19 | PMunch | 16th of May was the Karax switch according to GitHub |
11:52:27 | Araq | it covers how it could work and what it implies for the stdlib's design |
11:53:29 | Araq | to a good first approximation it's "Nim + important packages" shipped as single tarball |
11:54:19 | Araq | to mitigate the problem "I cannot install Nimble packages at work" or "I won't use X because it's a *dependency*" |
11:54:22 | PMunch | Wait, you want to create a Nim distribution with pre-installed packages? |
11:54:32 | PMunch | Hmm, interesting |
11:54:51 | PMunch | Just make sure it works properly if people want to use nimble later |
11:54:59 | dom96 | bah |
11:55:00 | dom96 | How many have actually said that this is a problem? |
11:55:09 | federico3 | Araq: is there an issue with details around "I cannot install Nimble packages at work"? |
11:55:12 | dom96 | The impact here to me seems minimal. |
11:56:35 | Araq | federico3, no but at least cooldome has this very problem fwiw |
11:56:37 | federico3 | I can see 2 serious problems: countries that block GH and unstable ecosystem. I would be happy to have libraries that I can rely upon. |
11:57:06 | * | brainproxy quit (Ping timeout: 268 seconds) |
11:57:08 | Araq | but it also helps newcomers to see what packages can be trusted |
11:57:19 | federico3 | yes |
11:57:29 | Araq | and it helped Python's growth IMHO |
11:57:47 | federico3 | that was the whole point behind having a large stdlib in Python |
11:59:20 | * | nc-x joined #nim |
11:59:30 | Araq | well anyway, I'm writing the proposal, you can downvote it into oblivion later. For now having a name for it would be nice... |
11:59:36 | PMunch | I like the idea, but I feel its very important that you can break out of the distro and go "live" if you want to later |
11:59:38 | federico3 | "Nim with batteries and solar panels" |
12:00:02 | dom96 | Do make sure to outline how you will decide what belongs in this distribution |
12:00:31 | * | brainproxy joined #nim |
12:00:35 | narimiran | anybody who payed one million dollars! |
12:00:43 | federico3 | Araq: there's been talks about reviewing and tagging trusted packages in Nimble. Possibly signing them. |
12:01:40 | federico3 | Knowing that package X at version Y works well with Nim at version Z would help |
12:01:42 | * | PMunch reads the article on Nimrod to see if any names pop out |
12:02:45 | nc-x | I see a few problems. 1) The included packages may get outdated pretty soon. 2) The included packages may or may not be stable. 3) Most people won't ever require most of these packages. |
12:03:13 | Zevv | 3) is no problem in 2019, disk usage is free |
12:03:34 | federico3 | nc-x: 1) no, only stable, maintained packages would be included |
12:03:36 | Zevv | as for 1), I assume nimble is shippe as well, so a simple nimble update would suffice |
12:04:03 | PMunch | Yeah, the docker images without nimble packages are 164MB, and with they are 223MB, so ~80MB for almost all of the "important_packages" list |
12:04:15 | dom96 | The problem IMO is that this is yet another thing to maintain |
12:04:17 | federico3 | no, you want to trust that the shipped version of Nim and the library go well together |
12:04:30 | dom96 | when installing packages using Nimble /should/ be trivial |
12:04:58 | dom96 | If someone cannot install them then we should put focus into fixing that |
12:04:59 | dom96 | instead of working around this problem |
12:05:12 | PMunch | Well I guess the idea is to have a "download this one thing and don't worry about incompatibilities or updates" |
12:05:14 | federico3 | dom96: it's not another thing if it's built [with / on top of] nimble |
12:05:26 | nc-x | Also, don't people use versioned packages in .nimble? I don't know about others, but I find the latest version on github and then use that. It may or may not be the one installed with the "nim mega bundle", rendering it useless. |
12:05:38 | PMunch | Nim updates? Well download the entire new suite and get the now updated packages. |
12:05:46 | federico3 | nc-x: no, that's exactly the problem |
12:05:47 | Zevv | lets await araqs rfc |
12:06:02 | Zevv | he tends to write down things that make sense, every now and then |
12:06:40 | PMunch | federico3, I guess that is the purpose of the package lock in npm. Basically "it works now, lock everything down so I can install these exact packages later" |
12:06:58 | nc-x | Zevv: yeah |
12:06:58 | federico3 | Zevv: disks might be cheap but not free but bloat and complexity is always expensive |
12:07:15 | PMunch | federico3, well normal Nim isn't going away |
12:07:17 | * | nc-x quit (Remote host closed the connection) |
12:07:33 | Zevv | federico3: if packages that are not used are basically just bytes on disk - it's not "complexity" |
12:07:35 | federico3 | PMunch: but that locking is done by the developer, which is a disaster |
12:07:41 | PMunch | But as a product "Nim with power plant" is a valid idea |
12:08:07 | federico3 | Zevv: in this specific case, yes |
12:08:10 | PMunch | federico3, why is that so bad? |
12:08:51 | * | brainproxy quit (Ping timeout: 246 seconds) |
12:09:11 | federico3 | PMunch: it prevents any form of automated security updates |
12:09:53 | federico3 | I mean automated but vetted, not just pulling new releases randomly |
12:11:09 | PMunch | Yeah, but it assures that you can go back to any release and pull the dependencies and build it |
12:11:18 | * | brainproxy joined #nim |
12:11:41 | PMunch | Because the versions required for that point in the development was locked |
12:11:44 | mipri | that's an identifiable problem, but there are other problems, and at the end of the day Nim is compiled into binaries and it doesn't matter if the library is updated if the binaries aren't recompiled. |
12:11:45 | federico3 | PMunch: that's work that a random developer cannot (and should not) do |
12:12:25 | federico3 | mipri: it matters to many organizations and it's also a reason to use dynamic linking |
12:13:19 | FromDiscord | <arnetheduck> large stdlib helped python _before there were (decent) package managers_ - it's a different world today, where practically everyone in python moved to pip and virtual envs |
12:13:27 | mipri | I get it, that people care about this. They just always don't care about other problems at all. |
12:13:33 | mipri | like updates breaking stuff. |
12:13:44 | FromGitter | <Willyboar> @araq use something simple like : NimStar |
12:14:01 | mipri | or deployment ease. Or things working and staying how they are by default. |
12:14:10 | FromDiscord | <arnetheduck> that said, a curated set of packages sounds like a great idea - specifically because old packages can be removed from that set easily when their quality falls behind |
12:14:57 | mipri | or, speaking of security, updates creating new security holes, so that you have to react to problems that wouldn't be problems otherwise. |
12:14:58 | FromDiscord | <arnetheduck> "download one thing" is solved by lock files: you lock the deps of your project and can download/offline them as much as you like |
12:15:13 | Araq | that solves a different thing and you know it |
12:15:31 | federico3 | mipri: that's why distribution backport security fixes instead |
12:15:37 | Araq | you can use lockfiles after you went through the whole process "which Nimble packages can we use" |
12:16:11 | Araq | lockfiles don't guide you at all in your decision making |
12:16:13 | FromDiscord | <arnetheduck> sure - and curated bundle is not a bad idea.. it could even be `nimble install bundle-of-goodies` |
12:16:13 | * | brainproxy quit (Ping timeout: 268 seconds) |
12:16:26 | federico3 | Araq: indeed |
12:16:29 | mipri | so Nim needs, not just dynamic linking of all libraries by default so that it's basically a scripting language and all Nim programs will break easily if packages are disruptly slightly, but it also needs its own enterprise Linux distributions who will backport security fixes. |
12:17:14 | federico3 | mipri: just like any other language |
12:17:38 | mipri | no, only like scripting languages. |
12:18:13 | mipri | if you compile an application in C, there are some dynamic links, but there's also a ton of stuff in the executable. |
12:18:42 | mipri | and enterprise security-backporting stuff isn't free or universal. Costs quite a lot just to get that for WordPress, a single PHP application. |
12:19:14 | mipri | if that's a necessary part of your system working, and that is already hugely expensive, maybe your system isn't the only viable one. |
12:19:18 | * | brainproxy joined #nim |
12:19:20 | federico3 | hah |
12:20:09 | Araq | or maybe simply sandbox Wordpress. and everything else really. there is no reason why individual applications have to be related to a system's security |
12:21:18 | mipri | what I'd like is a Nim security feed that says, "such-and-such library has been updated to fix some CVEs and you should update your stuff" |
12:21:27 | Araq | and IMHO as long as every script and program you run can upload your HOME_DIR to an unknown server you don't have "security", you have something else that was named "security" because everything is badly named in IT. |
12:22:24 | federico3 | Araq: no, sandboxing is orthogonal to being able to update libraries efficiently |
12:22:40 | mipri | in our case there's no system security threat from WordPress, but we still care about it because our users care about their individual websites. |
12:23:10 | federico3 | I'm talking about very different use cases than php and web stuff |
12:23:29 | Araq | federico3, indeed, this is a different topic |
12:24:12 | federico3 | yep - anyhow vetted packages for Nim would really help |
12:24:29 | * | brainproxy quit (Ping timeout: 276 seconds) |
12:25:34 | FromDiscord | <Chiqqum_Ngbata> Have you seen deno's approach to this Araq? |
12:25:59 | Araq | no. |
12:26:40 | * | brainproxy joined #nim |
12:27:17 | FromDiscord | <Chiqqum_Ngbata> https://deno.land/manual.html#introduction modules in deno are sandboxed. Also, "Deno provides <a href="a">https://github.com/denoland/deno/tree/master/std">a set of reviewed (audited) standard modules</a> that are guaranteed to work with Deno." |
12:27:27 | FromDiscord | <Chiqqum_Ngbata> Conceptual support if you yearn for it |
12:29:16 | Araq | the biggest problem that I see is "ugh, why is my package not part of it?" and "gah, why is this part of it?" |
12:30:22 | Araq | maybe we should vote packages into "Nim candy" and it starts out as empty |
12:30:40 | Zevv | how is that voting different then voting for important packages? |
12:30:51 | federico3 | "gah, why is this part of it?" -> given the size of the package pool it authors can be asked |
12:31:10 | Araq | Zevv, there currently is not voting for important packages |
12:31:23 | Zevv | so how does one get in then? |
12:31:30 | narimiran | ok, let us reformulate the biggest question: which packages are missing from important_packages.nim? |
12:31:40 | federico3 | important but also vetted, tested, maintained |
12:32:00 | Araq | Zevv, we decided based on some of GULPF's usage data |
12:32:49 | narimiran | federico3: i recently went through the list from that forum guy who rated all the packages, and added highest-rated ones to important_packages, if it wasn't there already |
12:32:55 | Araq | but for testing it's easy to decide, "if in doubt, take it into account", the goal is to test the compiler |
12:33:15 | Araq | for testing it also doesn't matter if there is considerable overlap |
12:33:20 | federico3 | that's quite a different use case |
12:33:36 | Araq | so what if we test 5 different command line parsing packages |
12:34:09 | FromDiscord | <Chiqqum_Ngbata> Is there a github.com/nim-lang/important-packages/list.txt ? |
12:35:14 | narimiran | https://github.com/nim-lang/Nim/blob/devel/testament/important_packages.nim |
12:35:43 | * | brainproxy quit (Ping timeout: 245 seconds) |
12:41:53 | * | brainproxy joined #nim |
12:42:16 | shashlick | @lqdev I tried your Wren wrapper on Linux and it worked as is |
12:43:03 | shashlick | @PMunch you need to explicitly rename or skip symbols, we don't do it automatically - use cPlugin if you need to rename |
12:44:38 | * | LargeEpsilon joined #nim |
12:45:14 | shashlick | @PMunch for recurse to work correctly, you need to give full paths to toast |
12:46:00 | shashlick | cImport does that automatically so if it isn't happening, share a snippet |
12:46:13 | * | theelous3 joined #nim |
12:47:12 | shashlick | By the way, was midnight to 4am when you messaged so unlikely I'll reply :) |
12:48:01 | dom96 | arnetheduck: heard anything recently from zah about lock file implementation in Nimble? |
12:52:15 | * | brainproxy quit (Ping timeout: 246 seconds) |
12:57:02 | lqdev[m] | shashlick: what Nim version? |
12:59:35 | * | nsf quit (Quit: WeeChat 2.6) |
13:04:26 | shashlick | Devel I think |
13:06:07 | FromDiscord | <arnetheduck> generally, trust is fickle - unless you want a shitstorm you not only have to vet packages but also versions - ie basically audit every upgrade you make |
13:07:08 | FromDiscord | <arnetheduck> dom96 beyond it going slowly, no |
13:08:21 | shashlick | @dom96 got nimarchive working on choosenim for windows and Linux, plus Linux binary support plus windows CI |
13:08:54 | shashlick | But osx is failing in writing extracted files so am debugging that |
13:11:53 | Araq | well that's where the idea of decentralized package management fails in general. everything you depend on must be reviewed for security. and then you update it and you need to review it again. |
13:13:48 | Araq | and that's where the attitude "I won't use X, it's a dependency" comes from. |
13:14:25 | Araq | You can create a perfect package manager and the problem remains. |
13:15:37 | * | theelous3_ joined #nim |
13:16:51 | * | narimiran quit (Ping timeout: 240 seconds) |
13:17:48 | * | theelous3 quit (Ping timeout: 246 seconds) |
13:18:44 | PMunch | shashlick, aaah, that was my issue |
13:19:06 | PMunch | When I use nimterop in the code instead it worked fine, because it was rewriting it into full paths |
13:19:21 | PMunch | Now I have a different problem a redefinition |
13:20:56 | PMunch | Between this: https://github.com/NLnetLabs/unbound/blob/master/services/outbound_list.h#L46 and https://github.com/NLnetLabs/unbound/blob/master/util/module.h#L172 |
13:24:54 | shashlick | You could just define it yourself and skip it |
13:25:21 | * | lbartoletti_ joined #nim |
13:25:27 | PMunch | Well, that is not the only one.. |
13:25:52 | * | lbartoletti quit (Ping timeout: 264 seconds) |
13:27:58 | PMunch | Pretty much all the .h files do this for some reason.. |
13:36:02 | dom96 | arnetheduck: what's taking so long? |
13:36:08 | PMunch | Hmm, isn't recursive more than one step down? |
13:41:31 | jken | When I import a module named test, I get a namespace for those symbols I can use to access them at test.exportedProc for example, is there a way I can pass namespaces around as if they were a type? |
13:41:48 | jken | Or use concepts to write a proc that accepts any namespace with certain procs? |
13:46:08 | Araq | no. maybe there are workaround via templates but you won't get very far |
13:46:46 | Araq | it's not a dynamic thing as it is in Python, you need to adapt your way of thinking |
13:47:14 | jken | I figured that was the case, thanks for confirming Araq |
13:48:31 | FromDiscord | <arnetheduck> dom96 the complexity of the task coupled with lack of time to work on it, I would guess? I mean, it's not just simply lock files but also multiple libs per repo and a bunch of other changes required that come "along".. `nimble` is pretty much useless for larger projects as long as global pollution is the default mode of operation, so I'd guess there's plenty to work on |
13:50:43 | * | lbartoletti_ quit (Ping timeout: 245 seconds) |
13:50:44 | * | lbartoletti joined #nim |
13:50:56 | dom96 | arnetheduck: I thought zah hired someone to work on this full-time? |
13:51:19 | Araq | dom96, just ask zah directly |
13:51:34 | dom96 | he's not here? |
13:52:08 | Araq | tried gitter? |
13:52:57 | dom96 | @zah? |
13:53:53 | FromDiscord | <arnetheduck> not full time, it's a bounty-based budget that's limited by other work we have to do - ie we've solved our immediate problems by not using `nimble` - keep in mind that this is a system shift in how `nimble` operates - the alternative is that we develop a custom PM for our use case specifically |
13:53:59 | * | PMunch quit (Remote host closed the connection) |
13:54:21 | lqdev[m] | does choosenim always just have to download the latest C sources? I mean, I already have Nim on my system, so what's the point? |
13:54:24 | dom96 | I disagree that this is a system shift |
13:55:24 | dom96 | lqdev[m] every special edge case needs to be tested |
13:55:36 | dom96 | lqdev[m] which makes things less reliable |
13:55:39 | FromDiscord | <arnetheduck> ok 🙂 |
13:55:55 | * | Guest36881 quit (Ping timeout: 250 seconds) |
13:56:26 | shashlick | Choosenim will soon support Linux binaries |
13:56:38 | FromDiscord | <arnetheduck> basically, we need something that fullfills our requirements - whatever that might be |
13:56:54 | shashlick | @PMunch what isn't getting included? The preprocessor will go thru all includes |
13:57:06 | lqdev[m] | shashlick: I'm talking about choosenim #devel here |
13:57:06 | FromGitter | <Willyboar> is there a chance choosenim support ARM? |
13:57:20 | lqdev[m] | dom96: why not check if `nim -v` returns with exitcode 0, and if so, parse the first few lines to check if the Nim version is >= the required one to compile? |
13:57:47 | dom96 | lqdev[m] because I implemented it in the most simple and most likely to work way |
13:57:49 | shashlick | Ok, will be asking nightlies too so you'd rather install a tested devel |
13:57:51 | dom96 | I didn't have time for these special cases |
13:58:08 | dom96 | and yes, the proper fix is to get nightly support |
13:58:08 | dom96 | so there is no point in implementing this |
13:58:29 | shashlick | Plus there's no guarantee that some random Nim can build what is being requested |
14:00:03 | lqdev[m] | shashlick: that's why I proposed version checking |
14:00:27 | lqdev[m] | but if nightly support is the way it should be implemented, then ok |
14:00:35 | shashlick | I'll get to it |
14:01:30 | shashlick | Libarchive is failing for me here on osx - https://github.com/libarchive/libarchive/blob/master/libarchive/archive_write_disk_posix.c#L960 |
14:01:39 | shashlick | Anyone have any ideas, will be appreciated |
14:02:14 | shashlick | Works fine on win lin |
14:03:47 | lqdev[m] | shashlick: I'm getting the same error on #devel in my Wren wrapper |
14:04:25 | lqdev[m] | what is this function, anyways? `euwren_wrenDatInit000` |
14:04:41 | lqdev[m] | I remember someone having a similar problem some time ago |
14:08:19 | lqdev[m] | but I'm wondering why does Nim try to get sizeof(WrenVM) anyways… |
14:11:35 | * | NimBot joined #nim |
14:22:17 | Araq | https://github.com/nim-lang/RFCs/issues/173 there |
14:22:41 | Araq | maybe it should have been two separate documents but I feel like fixing some bugs now |
14:23:08 | lqdev[m] | seems like the issue only occurs when I wrap a `ptr WrenVM` inside of a `ref object`. |
14:23:41 | lqdev[m] | I'll attempt to create a MCVE |
14:25:23 | lqdev[m] | shashlick: https://termbin.com/gbdx |
14:27:08 | lqdev[m] | feels so good when you finally pick up on a project but there's yet another roadblock on its path. |
14:29:54 | shashlick | Tell me about it |
14:29:59 | shashlick | I'll get to it in 2 hours |
14:30:57 | lqdev[m] | looking at the generated C source code, it sounds like a codegen bug related to NimNodes, somehow. |
14:31:31 | lqdev[m] | here's the generated C code: https://termbin.com/g0rt |
14:32:49 | jken | How do I iterate a seq in reverse?. |
14:33:05 | * | Hideki_ joined #nim |
14:33:24 | lqdev[m] | jken: `for i in countdown(x.len - 1, 0): let e = x[i]` |
14:33:47 | jken | ah, thanks |
14:33:55 | jken | I expected a reverse proc i sequtils for some reason |
14:35:23 | Araq | sequtils.reversed or algorithm.reversed ? |
14:35:52 | Araq | dunno if it exists :-) |
14:38:03 | * | Hideki_ quit (Ping timeout: 268 seconds) |
14:39:36 | * | stefantalpalaru joined #nim |
14:41:08 | * | Hideki_ joined #nim |
14:47:24 | * | dddddd joined #nim |
14:48:26 | skrylar[m] | congratulations on 1.0 :p |
14:48:38 | skrylar[m] | tried to mention that sooner but the matrix bridge was borked |
14:50:19 | skrylar[m] | also i came with gifts. namely that gdk3 wrapper from months ago https://man.sr.ht/~skrylar/skgnome/ |
14:52:24 | Araq | thanks |
14:53:07 | * | brainproxy joined #nim |
15:00:02 | * | nc-x joined #nim |
15:22:07 | * | brainproxy quit (Quit: WeeChat 2.6) |
15:23:50 | nc-x | Araq: narimiran[m]: anybody else with a forum account: https://forum.nim-lang.org/t/5394#33809, the issue here is that master branch is dead since a long time, and bluenote needs to use the version-1-0 branch now. |
15:24:18 | Araq | ok, thanks |
15:24:32 | Araq | we should remove the 'master' branch |
15:24:57 | nc-x | yeah |
15:25:25 | nc-x | there are 55 branches as of now. so a lot of branches can be deleted. |
15:26:15 | * | Sargun_ quit (Changing host) |
15:26:15 | * | Sargun_ joined #nim |
15:27:04 | * | Sargun_ is now known as Sargun |
15:27:24 | * | nc-x quit (Remote host closed the connection) |
15:28:06 | FromDiscord | <mratsim> I thought when cloning devel was the default now? |
15:28:31 | Araq | defaults don't matter, Linux users know better and have their own scripts |
15:28:51 | * | Hideki_ quit (Remote host closed the connection) |
15:29:26 | * | nc-x joined #nim |
15:29:34 | * | clyybber joined #nim |
15:29:40 | * | Hideki_ joined #nim |
15:31:31 | nc-x | @mratsim: @bluenote10 is explicitly testing NimData with both devel and master. but with the new development model, master is dead and new versions are in version-1-0 branch and before that they were in v020 branch, so i think his CI may have been failing for a long time now. |
15:32:31 | nc-x | so someone with a forum account should post this info there. |
15:32:35 | * | nc-x quit (Remote host closed the connection) |
15:34:10 | * | Hideki_ quit (Ping timeout: 268 seconds) |
15:44:47 | * | Hideki_ joined #nim |
15:44:47 | skrylar[m] | sounds squirrely |
15:45:05 | skrylar[m] | pretty sure master/trunks are supposed to be master/trunks and branches are for releases =p |
15:45:35 | FromDiscord | <krptr> hi, has this issue been reported? https://play.nim-lang.org/#ix=1ZJ1 |
15:46:05 | * | Hideki_ quit (Remote host closed the connection) |
15:47:58 | * | Hideki_ joined #nim |
15:48:06 | * | Hideki_ quit (Remote host closed the connection) |
15:49:35 | Araq | krptr: no and it's not a bug, code-reordering doesn't look into string literals |
15:50:08 | lqdev[m] | Araq: does `=destroy` work on *all* regular stack-allocated objects? |
15:50:14 | * | Hideki_ joined #nim |
15:50:22 | lqdev[m] | (talking about the old GC runtime here) |
15:51:16 | Araq | yeah |
15:51:56 | lqdev[m] | good to know, thanks |
15:52:40 | * | LargeEpsilon quit (Ping timeout: 268 seconds) |
15:53:32 | * | Hideki_ quit (Remote host closed the connection) |
15:53:45 | * | Hideki_ joined #nim |
15:54:18 | FromGitter | <alehander42> imo people should be motivated to developer third party libs |
15:54:40 | FromGitter | <alehander42> the nim ecosystem is small, and thats the main thing that it needs imo: more libs with good nim api-s |
15:54:51 | FromGitter | <alehander42> imporving the stdlib is important ofc |
15:54:55 | lqdev[m] | one question about compiler internals, why are some generated C sources prefixed with `@m`? |
15:55:03 | * | Hideki_ quit (Remote host closed the connection) |
15:56:43 | * | Hideki_ joined #nim |
15:57:03 | * | Hideki_ quit (Remote host closed the connection) |
15:57:16 | Araq | lqdev[m]: I don't remember, getting this name mangling right was a pita |
15:57:19 | * | Hideki_ joined #nim |
15:57:19 | * | Hideki_ quit (Remote host closed the connection) |
15:57:28 | Araq | and I'm happy that it works now |
15:57:57 | * | Hideki_ joined #nim |
15:58:04 | Araq | alehander42: do you think a "distribution" would motivate devs or not? |
15:58:18 | FromGitter | <alehander42> i dont know |
15:58:29 | FromGitter | <alehander42> just saying that this seems important to me |
15:59:42 | FromGitter | <alehander42> but not sure if the lang team itself can do anything about that |
15:59:54 | FromGitter | <alehander42> nimble improvements like bump should be useful tho |
16:01:07 | lqdev[m] | another question: what is the purpose of `xxxDatInit000` functions in the generated C code? one of them seems to be triggering an error where it tries to get sizeof(WrenVM) which is not defined in Wren's public API |
16:01:57 | * | Hideki_ quit (Ping timeout: 240 seconds) |
16:03:54 | Araq | lqdev[m]: use .incompleteStruct on the type to prevent this |
16:04:33 | lqdev[m] | Araq: oh, right |
16:06:29 | lqdev[m] | oh man, it actually compiles now |
16:06:31 | lqdev[m] | thanks for that! |
16:07:17 | lqdev[m] | shashlick: you should add support for this in nimterop |
16:07:48 | * | sentreen quit (Ping timeout: 245 seconds) |
16:12:01 | FromDiscord | <krptr> thanks <araq>, didn't know that about code reordering |
16:17:48 | FromDiscord | <strombom> Hi, I'm completely new to nim. I have installed nim 1.0 and nimhdf5 with nimble. After writing "import nimhdf5" I get an error "cannot convert -1 to haddr_t" on the following line "const HADDR_UNDEF* = (-1).clonglong.haddr_t". Do you have anu suggestions on what can be wrong? |
16:18:54 | FromGitter | <Vindaar> @strombom hey! Good thing I see this right now, hehe. If I'm not mistaken it's probably something I fixed / broke regarding the recent `csize` changes |
16:20:46 | FromGitter | <Vindaar> I'm gotta go in about 5 min, but if you could open an issue on the `nimhdf5` repo, I'll see what I can do later in the evening. Now that you mention it I realize that I'm not sure whether I actually test 1.0 with travis (I run it on "stable" and "devel", whatever "stable" means with choosenim iirc) |
16:20:53 | * | strombom56 joined #nim |
16:21:27 | FromDiscord | <Chiqqum_Ngbata> Araq, is the idea to include distribution by default? |
16:22:45 | Araq | yes |
16:23:39 | FromDiscord | <strombom> Vindaar, ok I have raised an issue, thanks. |
16:23:40 | FromDiscord | <Chiqqum_Ngbata> Can we get a nim-lite ? I personally wouldn't want any extras, dunno if I'm alone |
16:24:04 | FromDiscord | <Chiqqum_Ngbata> I've been behind corporate firewalls before so have some sympathy for this imperative anyway |
16:24:27 | Araq | nim-lite == git clone nim-lang/nim ? |
16:26:35 | FromDiscord | <Chiqqum_Ngbata> Yeah, no submodules or bonus material. Not the end of the world to build a nim-lite myself, also not unheard of to publish a separate release without extras |
16:27:08 | FromDiscord | <Chiqqum_Ngbata> What's an example of a module you'd include? I imagine we're talking on the order of 10s of modules? |
16:27:58 | Araq | cligen |
16:28:44 | Araq | arraymancer |
16:29:56 | FromDiscord | <Chiqqum_Ngbata> cligen seems reasonable to include. Arraymancer, awesome as it is, may be kind of specialized no? |
16:29:56 | Araq | norm |
16:30:37 | FromDiscord | <Chiqqum_Ngbata> i.e., is popularity the driving factor or some subjective idea of general utility? |
16:30:46 | Araq | sure but if it provides the Matrix[T] building block it should be in there |
16:32:20 | Araq | but as I have written, people vote for packages, we won't include anything on our own |
16:32:36 | FromDiscord | <Chiqqum_Ngbata> Right |
16:32:54 | * | strombom56 quit (Remote host closed the connection) |
16:33:08 | Araq | you can argue that it should domain specific, a game dev centric distribution would ship SDL, OpenGL, Vulkan |
16:33:47 | Araq | but then we get different distributions and I don't know if we need that |
16:34:17 | clyybber | We could just introduce bundles like nimble install gamedev |
16:35:19 | * | nsf joined #nim |
16:35:42 | * | Hideki_ joined #nim |
16:36:31 | Zevv | nimble metapackages |
16:36:34 | Araq | we could also focus on utils + crypto + other security related stuff |
16:36:51 | Araq | as the review process will be expensive |
16:37:33 | Araq | in fact, the review process already rules out e.g. nim-godot, too much code |
16:37:56 | FromDiscord | <Chiqqum_Ngbata> It would seem ideal (to me) to focus on libs that have either general utility or a need for reliable implementation |
16:39:12 | Araq | I personally also care very much about a simple canvas-like thing. |
16:39:39 | FromDiscord | <Chiqqum_Ngbata> For plotting and such or? |
16:40:15 | Araq | yeah and for simple 2D graphics, learning how to program is so much more fun when you can tinker with pixels |
16:41:06 | FromDiscord | <Chiqqum_Ngbata> Agree with that personally |
16:43:18 | * | sentreen joined #nim |
16:43:59 | Araq | Zevv: what to run to see "leaking temporary"? |
16:45:04 | * | narimiran joined #nim |
16:45:30 | Zevv | yeah I don't know, that happened even with echo 42 |
16:45:37 | clyybber | lol |
16:45:56 | Zevv | but I only figured that out after trying to compile my code with 151231 vm registers |
16:46:12 | Zevv | since I was the only one with the problem, it was surely me |
16:46:19 | Zevv | sorry for the noise |
16:46:26 | * | Hideki_ quit (Ping timeout: 276 seconds) |
16:50:53 | disruptek | what's the point of deprecating packages if they aren't removed? just to produce extra warning messages in my console? |
16:52:00 | Zevv | when getenv("USER") == "disruptek": warn "X is Deprected" |
16:52:23 | disruptek | what if everyone votes npeg in but zevv says he doesn't want it included for hand-sitting reasons? |
16:53:46 | Zevv | when getenv("USER") == "disruptek" and package == "npeg": warn "X is Deprected" |
16:53:52 | Zevv | just you |
16:54:36 | Araq | disruptek: good point, I think the author should have a veto right |
16:55:13 | * | Vladar quit (Quit: Leaving) |
16:55:32 | Zevv | it's the nice thing to do, altough if the licence is liberal enough no one can stop you of course |
16:56:20 | disruptek | the dist bits are hosted at nim, right? |
16:56:50 | disruptek | that's what i gather from "tarball." |
16:58:48 | Zevv | that's the idea I think, why? |
17:00:16 | disruptek | i think it would very useful to have a banner on every module nim provides docs for, something that captures the mood with respect to the module's interop with nim and its future in the language. people come to irc and ask about coro and they are told it's a dead end. that should be in the docs. it can be encoded in some more formal and less charged way, but it should be there in any event. |
17:01:02 | Zevv | "the good, the bad, and the ugly (and the dead)" |
17:01:06 | disruptek | sitting in irc has taught me about these potential landmines and i pitty the folks who are developing with stuff that has fallen from the good graces of "the powers that he." |
17:01:32 | disruptek | especially as nothing gets removed. |
17:02:04 | Zevv | black and white, you'd say: if its not deprecated, it should be ok |
17:02:59 | disruptek | i had in mind something more like a 3x3 matrix, but even a single bit would be an improvement. |
17:03:32 | Zevv | yeah, otherwise we'd need arraymancer to manage deprecaton |
17:03:52 | Zevv | how so 3x3? |
17:04:09 | clyybber | Hmm, maybe the stdlib should just provide concepts as in common interfaces |
17:04:19 | disruptek | three measures of suitability and three ranks of such measures. |
17:04:26 | clyybber | and the packages are encouraged to use/adhere to them |
17:04:49 | FromGitter | <Willyboar> I think this prevents developers to create new libs if there is already one in the nim |
17:04:57 | disruptek | it shouldn't be detailed enough to be quibbled over. |
17:05:14 | * | PMunch joined #nim |
17:05:16 | disruptek | well, it would be nice to know that we don't have any 3-star concurrency packages, for example. |
17:07:47 | Zevv | disruptek, the king of uncomfortable silences |
17:08:17 | Zevv | no, we don't have that :( |
17:09:14 | disruptek | if you're thinking about writing one, it's nice to know nothing has a full endorsement. to put that another way, it's nice to know where the current solutions are lacking. |
17:09:20 | lqdev[m] | huh, this code https://termbin.com/mbf6 gives me a strange error: https://termbin.com/7m4m |
17:09:48 | FromDiscord | <Chiqqum_Ngbata> The common interfaces would probably be a natural consequence of blessing one library for purpose_x |
17:10:24 | Zevv | dont think that is feasible, designing these interfaces is half the work of making an implementaion |
17:10:32 | FromDiscord | <Chiqqum_Ngbata> i.e., third party libraries would be strongly encouraged IMO to follow pattern that's under the aegis of nimlang |
17:10:39 | Zevv | so design the interfaces by comission? |
17:10:43 | clyybber | Chiqqum_Ngbata: Yeah but I fear that that blessing might hinder the pkg |
17:10:44 | FromDiscord | <Chiqqum_Ngbata> But yeah, true. Sometimes yes, sometimes no |
17:10:50 | disruptek | that pattern is already espoused and indeed documented in the manual. |
17:10:52 | FromDiscord | <Chiqqum_Ngbata> Can happen of course |
17:11:37 | lqdev[m] | any ideas on why that error occurs? |
17:11:40 | PMunch | Yeah the threading story in Nim isn't great.. |
17:11:57 | lqdev[m] | seems like the GC fails at some point. |
17:12:35 | clyybber | Araq: What does it mean for a pkg when it is included in the distribution? How are breakages handled then? |
17:12:43 | lqdev[m] | PMunch: threading? |
17:12:52 | PMunch | Yeah, multi-threading |
17:12:58 | PMunch | I means creating threads are fine |
17:13:28 | lqdev[m] | are you referring to my example? I don't use threading. |
17:13:49 | PMunch | Nono, I was referring to what they were talking about with packages :P |
17:13:52 | Zevv | lqdev[m]: no he was referring to another discussion |
17:14:05 | PMunch | I'm looking at your example, but it's pretty long.. |
17:14:06 | lqdev[m] | oh, right |
17:14:28 | PMunch | And since it imports another thing I can't run it to test it.. |
17:15:06 | lqdev[m] | PMunch: this is the other module: https://termbin.com/7og6 |
17:15:34 | lqdev[m] | don't really know why this error happens, couldn't get a MCVE working |
17:15:41 | PMunch | Hmmm |
17:16:44 | lqdev[m] | the error happens in the config.errorFn anon proc |
17:17:04 | lqdev[m] | more specifically, `case of WREN_ERROR_RUNTIME`, the point where the echos are |
17:17:17 | lqdev[m] | (I should really switch to ix, it has line numbers) |
17:18:08 | * | Hideki_ joined #nim |
17:18:31 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
17:19:50 | PMunch | Yeah.. |
17:21:01 | PMunch | Is that a closure? |
17:21:07 | PMunch | Or does the cdecl prevent that? |
17:21:20 | * | floppydh quit (Quit: WeeChat 2.6) |
17:22:52 | * | Hideki_ quit (Ping timeout: 264 seconds) |
17:23:30 | PMunch | I'm guessing that this errorFn is called by the wrapped library? |
17:23:41 | PMunch | Probably messes up the GC somehow |
17:24:11 | shashlick | Is it a callback |
17:25:40 | lqdev[m] | PMunch: it's a callback, but not a closure since it's cdecl |
17:25:42 | lqdev[m] | and yes, it's called by the wrapped library |
17:25:49 | lqdev[m] | not sure how it could mess up the GC |
17:26:09 | PMunch | Try throwing a setupForeignThreadGC in there and see if that works |
17:26:53 | shashlick | That's step 0 for C callbacks |
17:27:08 | PMunch | Huh? |
17:27:20 | shashlick | Your suggestion |
17:29:23 | * | ng0 joined #nim |
17:31:17 | clyybber | Araq: Whats the best way to check if result is necessary in a proc? |
17:31:52 | clyybber | containsResult? |
17:33:05 | * | ng0 quit (Client Quit) |
17:33:23 | disruptek | just omit it and see if anything breaks. |
17:34:11 | PMunch | clybber, what do you mean if it is necessary? |
17:34:47 | disruptek | if the return type is not empty. |
17:36:06 | clyybber | PMunch: I mean if the body uses result or if it just does return. |
17:36:46 | FromDiscord | <robohack> I am having a nimble error. This is on OSX: % nimble refresh --verbose |
17:36:47 | FromDiscord | <robohack> Downloading Official package list |
17:36:47 | FromDiscord | <robohack> Trying https://github.com/nim-lang/packages/raw/master/packages.json |
17:36:47 | FromDiscord | <robohack> Warning: Could not download: location header expected |
17:36:47 | FromDiscord | <robohack> Trying http://irclogs.nim-lang.org/packages.json |
17:36:49 | FromDiscord | <robohack> Trying http://nim-lang.org/nimble/packages.json |
17:36:49 | FromDiscord | <robohack> Error: Refresh failed |
17:36:51 | FromDiscord | <robohack> ... Could not download: location header expected |
17:37:01 | PMunch | Uhm, I don't think there's a good way to check that |
17:37:01 | clyybber | Afaict the naive approach of containsResult should cause problems with nested proc definitions. But I'm not sure if those end up in transf or cgen anyways. |
17:37:13 | PMunch | robohack, please use a paste-site for multi-line content |
17:37:20 | FromDiscord | <robohack> Ok |
17:39:02 | FromDiscord | <robohack> I am having a nimble error. This is on OSX: |
17:39:02 | FromDiscord | <robohack> https://pastebin.com/TsZJH8g5 |
17:39:02 | FromDiscord | <robohack> |
17:39:02 | FromDiscord | <robohack> It appeared to work on my Win 10 box though. |
17:39:18 | FromDiscord | <robohack> edited |
17:39:34 | * | ng0 joined #nim |
17:39:39 | * | abm quit (Quit: Leaving) |
17:41:05 | PMunch | Hmm, location header.. |
17:41:37 | PMunch | That's weird |
17:41:40 | PMunch | Are you behind a proxy? |
17:43:36 | FromDiscord | <robohack> No, the only weird thing I do network-wise is run pi-hole (DNS based ad-blocking). |
17:43:57 | PMunch | Hmm, well it could black-list the nim site for some reason |
17:44:18 | PMunch | Could you try "nslookup nim-lang.org" in your command prompt? |
17:44:58 | FromDiscord | <robohack> It resolves to 104.28.19.79 |
17:45:13 | PMunch | Ah right, CloudFlare.. |
17:45:31 | PMunch | It could be that your IP is "banned" and the site redirects you a captcha site.. |
17:45:48 | PMunch | Can you access the list manually? |
17:46:00 | PMunch | As in open any of those links in a browser |
17:46:14 | FromDiscord | <robohack> I will try, |
17:46:53 | FromDiscord | <robohack> Yes, I was able to see the packages.json in a browser. |
17:47:26 | PMunch | Okay, you could just download it manually |
17:48:22 | FromDiscord | <robohack> It is working now, after I just did a choosenim update stable. Not sure if that had anything to do with it. I am now on 1.0.2 |
17:48:25 | FromDiscord | <robohack> Thnaks |
17:48:40 | FromDiscord | <robohack> Thanks |
17:49:30 | PMunch | It could be that visiting the site in a browser whitelisted it |
17:49:42 | lqdev[m] | PMunch, shashlick: you sure about that? Wren doesn't use threads. |
17:49:48 | FromDiscord | <robohack> True. Thanks for your help |
18:00:28 | * | drewr quit (Quit: ERC (IRC client for Emacs 26.3)) |
18:02:29 | lqdev[m] | oh god, I'm an idiot |
18:02:49 | PMunch | Haha, what did you do? |
18:02:57 | lqdev[m] | `Wren` is a ref object, which I pass to wrenSetUserData using `cast[pointer](wren)` |
18:03:18 | PMunch | Haha |
18:03:37 | lqdev[m] | this is fine, but when I was retrieving the user data back, I was doing a `cast[ref Wren](userdata)` which is obviously wrong |
18:03:51 | lqdev[m] | it ends up a ref ref object |
18:03:55 | lqdev[m] | lol |
18:04:29 | PMunch | Yeah, casting back and forth is always a peril.. |
18:04:39 | lqdev[m] | now it works fine and throws a proper exception |
18:05:04 | lqdev[m] | as it should |
18:08:22 | * | nsf quit (Quit: WeeChat 2.6) |
18:13:44 | * | drewr joined #nim |
18:15:51 | * | xet7 quit (Remote host closed the connection) |
18:16:12 | * | xet7 joined #nim |
18:17:16 | * | rockcavera quit (Remote host closed the connection) |
18:19:00 | FromGitter | <bluenote10> @nc-x Thanks for the hint, NimData's CI should finally be back to green ;) |
18:19:21 | * | lbartoletti_ joined #nim |
18:19:58 | * | lbartoletti quit (Ping timeout: 265 seconds) |
18:24:31 | * | lbartoletti joined #nim |
18:24:34 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
18:24:45 | * | lbartoletti_ quit (Ping timeout: 246 seconds) |
18:25:52 | FromGitter | <brentp> lqdev, are you writing a wren wrapper? |
18:26:16 | disruptek | graham chapman would have a field day with this one. |
18:26:20 | FromGitter | <brentp> ... beyond the autogenerated stuff? |
18:27:54 | * | xet7 quit (Remote host closed the connection) |
18:29:00 | * | ng0 joined #nim |
18:35:34 | * | xet7 joined #nim |
18:41:15 | * | xet7 quit (Remote host closed the connection) |
18:42:17 | clyybber | Araq: Btw, do you want this to stay: "The discriminator variable must be a const" ? |
18:42:26 | * | xet7 joined #nim |
18:43:22 | Araq | we weakened it a bit via range types iirc |
18:43:57 | Araq | if the value is of a range type that covers one object branch and only one, it should compile |
18:44:42 | clyybber | Araq: I'm asking because if you want it to stay I can do the default value initialization without transforming the object constructor so much. |
18:44:58 | clyybber | But with my current approach we can also remove that restriction altogether |
18:48:30 | * | LargeEpsilon joined #nim |
18:50:43 | lqdev[m] | @brentp yes |
18:51:00 | lqdev[m] | I aim for an API similar to what nimLUA provides |
18:51:03 | lqdev[m] | but for wren, of course |
18:53:21 | * | LargeEpsilon quit (Ping timeout: 268 seconds) |
18:53:38 | * | Jesin quit (Quit: Leaving) |
18:54:39 | FromGitter | <brentp> nice |
18:58:29 | shashlick | @lqdev why Wren? |
18:59:11 | lqdev[m] | shashlick: because I don't want to wait until I finish rod and I need a scripting API |
18:59:46 | lqdev[m] | and I don't really like Lua's object model. I need a good one since I'm developing a game |
19:00:18 | clyybber | Huh, I mean wren looks interesting, but whats wrong about Lua's object model? |
19:00:31 | shashlick | After the boehm nightmare, the plugin system in feud is back up and running |
19:00:44 | clyybber | Its a perfect fit for gamedev IMO, since you often don't want inheritance, but components |
19:00:53 | clyybber | composition.. |
19:02:34 | disruptek | this. |
19:03:06 | shashlick | Of course you want a scripting env, I think @zacharycarter worked a bit on nimscript as well |
19:04:13 | disruptek | clyybber: fixed the discriminator-must-be-const would be huge. |
19:06:52 | lqdev[m] | clyybber: Wren is faster. |
19:06:56 | shashlick | Do games need to reload scripts all the time |
19:07:11 | shashlick | Or is it more about ease of use |
19:07:31 | lqdev[m] | more about the ease of use |
19:08:08 | clyybber | lqdev[m]: Faster than luajit? I kinda doubt that |
19:08:20 | lqdev[m] | I find Lua's object model rather weird. it's also slow because it relies on lots of string manipulation, and I don't feel like doing luajit |
19:08:23 | shashlick | Then why not compile dlls and load them |
19:08:32 | lqdev[m] | I just don't find Lua particularly fitting for game dev. |
19:08:37 | clyybber | lqdev[m]: What string manipulation? |
19:08:47 | lqdev[m] | shashlick: cross-platform support is a chore |
19:08:59 | lqdev[m] | how do you get mod developers to compile to all platforms? |
19:09:10 | lqdev[m] | clyybber: hashing a string is slower than simply indexing an array |
19:09:16 | shashlick | You ship Nim and tcc |
19:09:28 | lqdev[m] | see http://wren.io/performance.html for some details |
19:09:33 | clyybber | lqdev[m]: Luajit optimizes that :p |
19:10:02 | clyybber | But I guess luajit is cheating, because mike pall is clearly an alien. |
19:10:13 | FromDiscord | <exelotl> wren is the best option if you ever want your code to run on something that doesn't allow jit (e.g. nintendo switch) |
19:10:30 | lqdev[m] | clyybber: I don't care, I just prefer Wren over Lua. its language features are better imo |
19:10:48 | lqdev[m] | the syntax is more clear to me |
19:10:51 | lqdev[m] | it isn't so inconsistent |
19:11:11 | lqdev[m] | also what @exelotl said |
19:13:22 | clyybber | lqdev[m]: Yeah, wren is cool, but I don't see how luas syntax is inconsistent. |
19:13:44 | lqdev[m] | clyybber: `for ... do` vs `if ... then` |
19:13:48 | lqdev[m] | that's what pisses me off |
19:13:53 | clyybber | Use what you like better of course, btw what game are you using it for? |
19:14:01 | lqdev[m] | it's annoying |
19:14:07 | clyybber | lqdev[m]: Ah ok. |
19:14:17 | lqdev[m] | clyybber: https://github.com/liquid600pgm/planet-overgamma |
19:15:04 | clyybber | Ah, I've stumbled upon that quite some time ago. |
19:15:10 | clyybber | Do you have screenshots? |
19:15:12 | clyybber | brb |
19:17:38 | * | Jesin joined #nim |
19:18:59 | Zevv | http://zevv.nl/div/overgamma.png |
19:19:25 | lqdev[m] | https://i.imgur.com/VFddjQ3.png |
19:19:27 | shashlick | @lqdev so no dlls? Feud's plugin system is cross platform |
19:19:39 | lqdev[m] | shashlick: how so? |
19:19:56 | lqdev[m] | linux and windows use different formats (.so and .dll) |
19:21:21 | lqdev[m] | am I not aware of something? |
19:21:31 | disruptek | yes. |
19:21:36 | shashlick | It's all abstracted away |
19:22:33 | shashlick | Nimterop does this for you already |
19:22:43 | shashlick | That's what cPlugin is |
19:23:52 | lqdev[m] | but then mod distribution is a pain. how do you get a dev on windows who publishes a .dll to publish an .so for linux? |
19:24:08 | clyybber | lqdev[m]: Nice, that blur looks slick |
19:24:49 | clyybber | lqdev[m]: They run nim --os:linux? |
19:25:20 | shashlick | No, they ship a Nim file |
19:25:22 | lqdev[m] | clyybber: if only it were that simple |
19:25:30 | shashlick | Your app simply compiles it behind the scenes |
19:25:33 | lqdev[m] | nimterop doesn't support cross-compilation because of Nim limitations |
19:25:59 | lqdev[m] | too complex. |
19:26:05 | Araq | guys, you need to watch this: https://www.youtube.com/watch?v=r-TLSBdHe1A&t=20s |
19:26:08 | lqdev[m] | I want something simple |
19:26:18 | disruptek | the problem you're trying to solve her is x-platform mod distribution? |
19:26:27 | shashlick | See the feud search plugin https://github.com/genotrance/feud/blob/master/plugins/server/search.nim |
19:26:28 | lqdev[m] | yes |
19:26:47 | disruptek | how many freakin' times do we have to watch this damned thing. |
19:26:54 | disruptek | coz. it's a thing. okay, let's move on. |
19:27:19 | disruptek | back to dist. what about making it more general, like gentoo overlays? |
19:27:21 | clyybber | Its a very cool thing tho |
19:27:43 | rayman22201 | lol. I saw the video before it was cool. I claim hipster rights for being the first to post it :-P |
19:27:43 | shashlick | @lqdev - whatever you write in cPlugin is and can be cross platform and gets compiled at the target |
19:27:54 | disruptek | so i can curate a group of 5-6 modules that work together and are maybe co-dependent, stamp them, and then anyone can use them forever without incident. |
19:28:38 | Araq | sorry, I wasn't aware I'm last :P |
19:28:48 | disruptek | yes, it's cool, but unless you're mratsim and can provide some real insight gained from actually using it, it's just noise. |
19:29:09 | disruptek | sorry, it's just that i've seen 4 different versions of this talk now it's it's getting grating. |
19:29:25 | clyybber | Speaking of that: https://github.com/mratsim/weave/blob/master/e04_channel_based_work_stealing/primitives/coz.h |
19:29:45 | disruptek | yes, but it's a talk we need, not a header. |
19:29:47 | clyybber | s/.h/.nim |
19:30:04 | disruptek | yes, but it's a talk we need, not a source file. |
19:30:15 | clyybber | disruptek: no. we need a compiler to compile talks, not files dummy.. |
19:30:45 | disruptek | i mean, until it moves into use, it's just "cool." |
19:30:56 | clyybber | use it |
19:31:06 | clyybber | then you are "cool" :p |
19:31:29 | disruptek | mratsim is, and despite golden, i know nothing about this stuff. it's his use that i want to hear about. |
19:32:54 | rayman22201 | it apparently isn't too difficult to use, but as with most things, you need to have a need for it, and the time to set it up properly. |
19:34:00 | rayman22201 | mratsim and some status people use hellgrind and a few other of the grind suite very successfully with Nim. |
19:34:06 | rayman22201 | all good stuff |
19:34:44 | disruptek | well, that's the talk/blog i wanna read. the one that would be most useful to us. |
19:34:51 | rayman22201 | agreed |
19:35:22 | rayman22201 | I only know about it because I have lurked through some of the status github PR's |
19:35:37 | disruptek | isn't coz from like 2015? i feel like it's pretty old now, or maybe i'm conflating it with something else. |
19:36:03 | * | solitudesf quit (Ping timeout: 240 seconds) |
19:36:30 | * | PMunch quit (Read error: Connection reset by peer) |
19:36:37 | disruptek | looks like, end of 2014. |
19:37:19 | disruptek | ah, the SOSP talk is from 2015. |
19:40:38 | rayman22201 | Berger has been working on Coz for a while. His latest talk just got a lot of internet viral points. I think the only really *new* thing is that Coz is now officially distributed with Debian. |
19:41:01 | rayman22201 | That's a big stamp of approval / stability I suppose. |
19:41:25 | clyybber | that dudes working on a lot of cool stuff |
19:41:54 | disruptek | i wouldn't mind seeing some more practical examples as opposed to contrived cartoons. even if they are examples of when coz didn't work, it'd be useful. |
19:42:13 | clyybber | How can it "not" work? It's pretty simple. |
19:42:56 | disruptek | because, as araq has pointed out in one of my favorite quotes, "features start off in the unfortunately state of unimplemented." |
19:43:44 | disruptek | there are 432 commits to coz. that's more than bump. |
19:44:04 | rayman22201 | you don't consider optimizing Sqlite and memcached practical examples? |
19:44:29 | clyybber | clyybber: buildfixes and other environment shenanigans |
19:44:47 | disruptek | i do, but i guess you're satisfied with those and i want more. |
19:45:40 | rayman22201 | lol. so greedy :-P |
19:45:43 | clyybber | more of what? Just use it. Also it makes sense right? I consider it to be proven to work. |
19:46:05 | disruptek | yes, it makes sense. we used to do stuff like this by hand back in the day. |
19:46:13 | rayman22201 | https://media.giphy.com/media/D3OdaKTGlpTBC/giphy.gif |
19:46:29 | disruptek | what can i say? i'm a greedy pita. this is hardly news if you spend much time on #nim. |
19:46:47 | clyybber | just add '?' |
19:46:51 | clyybber | disruptek? |
19:46:53 | clyybber | done. |
19:47:25 | clyybber | y'all need to learn disruptex |
19:47:35 | * | solitudesf joined #nim |
19:48:21 | disruptek | you mean disruptex, the layout engine? |
19:48:32 | clyybber | wait. thats a thing? |
19:48:50 | Zevv | it is now |
19:48:53 | Zevv | just wait for it |
19:49:14 | clyybber | http://disruptex.com/ |
19:49:16 | clyybber | lol |
19:49:17 | disruptek | the only word i know of coined by others wrt disruptek is disrupchek. |
19:49:33 | disruptek | omg disruptex.com |
19:49:54 | Zevv | better then http://disruptic.com/ |
19:50:46 | rayman22201 | btw @dom96, this is why channels are more important the FlowVars: https://github.com/mratsim/weave/tree/master/e04_channel_based_work_stealing |
19:50:51 | disruptek | ssl protocol error. boo hiss |
19:51:08 | clyybber | Zevv: HOW? |
19:51:20 | clyybber | is this some of your clients servers? |
19:51:46 | Zevv | how what? |
19:52:46 | clyybber | that site. it just contains some text |
19:53:03 | Zevv | well, it's just some misconfigured server |
19:53:10 | Zevv | just like 37% of the internet |
19:53:15 | clyybber | from an error message I presume |
19:53:17 | disruptek | i still have some drawings on my whiteboard from explaining coz. i guess i should just put it into golden as a separate lib. |
19:53:44 | Zevv | what's this "coz" I keep hearing about then? |
19:53:51 | disruptek | yes, but is it disruptext? |
19:54:26 | clyybber | disrupt kek spits out cooler results |
19:54:40 | stefantalpalaru | https://github.com/plasma-umass/coz |
19:54:42 | disruptek | wow memes, i'd guess. |
19:55:24 | Zevv | aah the profiling - I assume someting nifty is going on there, but I didn't look into that yet |
19:57:30 | lqdev[m] | is it possible to do create a proc with `openarray[typedesc]` as a param, or do I have to use a macro for that? |
19:58:36 | Zevv | dude |
19:58:49 | Zevv | where do you think you're going with that |
19:59:20 | Zevv | I can't properly pass and handle a single typedesc, and you're macroing them by the dozen |
19:59:25 | disruptek | i'm trying to figure out what it could possibly mean. |
20:00:14 | clyybber | lqdev[m]: What for? |
20:00:37 | disruptek | there aren't enough ways to write a generic that operates on an openarray, apparently. |
20:00:50 | * | narimiran quit (Ping timeout: 240 seconds) |
20:00:54 | lqdev[m] | I want to check if all params passed from Wren to Nim have the right type |
20:01:08 | lqdev[m] | otoh I can get away with a simpler solution |
20:01:20 | disruptek | oh, good. |
20:01:26 | lqdev[m] | so nevermind |
20:02:46 | lqdev[m] | I'm overcomplicating things as I always do, lol. |
20:02:54 | clyybber | lqdev[m]: Umm |
20:03:06 | clyybber | I thought you wanted to use it as a scripting language |
20:03:28 | disruptek | it's a good thing i'm so stupid or i'd doubtless write overly complex nim. |
20:03:33 | lqdev[m] | yeah, but I don't want sudden segmentation faults popping up when the wrong param type is passed from Wren to Nim. |
20:03:59 | FromDiscord | <kodkuce> Araq: really nice video and tool |
20:04:08 | disruptek | i see my six character crash bug is fixed. can you imagine if i had a few more bytes to work with? |
20:06:07 | planetis[m] | mratsim: with what flags you compile your benchmark? |
20:12:08 | stefantalpalaru | I don't think null-hypothesis significance testing applies so easily to benchmark values. You don't do random sampling from an existing population of runtimes when you execute your benchmark. |
20:12:40 | disruptek | and this is the problem golden solves. |
20:13:20 | disruptek | well, s/solves/will solve/ |
20:15:40 | stefantalpalaru | So the probability of having a mean value difference due to sampling from one end of the distribution curve or the other, by pure chance, doesn't translate well into benchmarking on the same deterministic platform for 30 times in a row. |
20:15:43 | clyybber | return return |
20:16:35 | stefantalpalaru | That normal distribution he introduces by randomizing memory layout is not the same as having a normal distribution due to random sampling of runtimes. |
20:16:53 | disruptek | no, it's not the benchmark of X*30 that we care about comparing; it's X*30 vs. Y*30. you record all the runtimes and then you can sample anywhere. |
20:17:07 | stefantalpalaru | There is no sampling. |
20:17:32 | stefantalpalaru | There are two averages and a difference between them that you want to know if it's significant. |
20:17:59 | stefantalpalaru | By the way, after all that talk about eyeball statistics, he forgets that the 5% treshold for p is completely made up. |
20:18:44 | disruptek | averages aren't sampling. i thought you were talking about golden but i see that you're not. |
20:18:57 | stefantalpalaru | I?m talking about Araq's video link. |
20:19:05 | disruptek | yes, that is clear. |
20:19:17 | federico3 | stefantalpalaru: what are you implying with "made up"? |
20:19:38 | stefantalpalaru | And the significance of classic statistical tools to benchmarking data. |
20:20:45 | stefantalpalaru | It's just that: made up. That significance test gives you a probability that the observed effect is not real, but due to sample values not mirroring the composition of the total population. |
20:20:58 | stefantalpalaru | And it's up to you to decide how much is too much. |
20:21:06 | * | Vladar joined #nim |
20:21:09 | shashlick | @lqdev - what's the reason to use incompleteStruct - how do i know when to add that pragma |
20:21:45 | stefantalpalaru | People just said that a 5% chance of that happening is too much. There's no mathematical reason behind it. It's just a rule of thumb that appeals to most of us. |
20:21:54 | federico3 | stefantalpalaru: you mean its "arbitrary", and that is ok. "completely made up" sounds like it's not meaningful |
20:22:05 | lqdev[m] | shashlick: you need it when you .importc a struct that doesn't have a declaration, otherwise it leads to codegen bugs |
20:23:11 | stefantalpalaru | So back to benchmarking. In what scenario your 30 measurements don't represent the total number of possible measurements on that machine? |
20:23:58 | stefantalpalaru | A misconfigured testing environment that sometimes runs cron jobs? |
20:24:15 | stefantalpalaru | We consider benchmarks on such systems invalid. |
20:24:41 | disruptek | the idea behind golden is that it remembers everything it has ever run, and it runs your stuff on every git commit. so it can sample runtimes over a long period of time. it's not designed to be super accurate, because i don't believe you need accuracy to produce useful information. |
20:24:50 | shashlick | what does that mean - doesn't have a declaration? then cImport doesn't see it |
20:25:17 | federico3 | stefantalpalaru: that's why you want to run "baseline" tests with the same codebase on the same test environment over time and check for the stability of the outputs |
20:26:06 | disruptek | to put that another way, i'm not interested in what i cannot determine using the tools at my disposal. i don't believe there isn't stuff worth knowing that i can learn with the tools at my disposal. |
20:26:39 | stefantalpalaru | But those statistical significance tests don't apply to stable outputs. They apply to random samples from a normal distribution. We don't have a normal distribution, nor random samples. |
20:28:14 | disruptek | i guess i don't see how we don't have random samples. |
20:29:03 | lqdev[m] | shashlick: it *does* have a declaration, `typedef struct some_incomplete_struct some_incomplete_struct_t;` |
20:29:10 | stefantalpalaru | Say you measure two sticks. You measure each stick 30 times, getting slightly different values. Are you going to be interested in null-hypothesis significance testing to determine which stick is longer? |
20:29:11 | lqdev[m] | but it doesn't have the implementation |
20:29:17 | lqdev[m] | with the fields |
20:29:35 | * | rockcavera joined #nim |
20:29:56 | disruptek | no, but that's not how golden delivers truth. |
20:30:31 | disruptek | my idea is to measure 1,000 sticks and identify when the smallest measurement may have deviated significantly. |
20:30:48 | disruptek | pick any 200 measurements. |
20:31:02 | federico3 | disruptek: FYI the "coz" tool is packaged as coz-profiler on Ubuntu & co in case you want to use it on travis |
20:31:31 | disruptek | i don't have the patience for travis or ubuntu, but thanks. i do think i have coz installed, i just haven't done much with it. |
20:32:45 | stefantalpalaru | If you don't do it in a controlled environment (i.e. all unnecessary services stopped, including networking, to minimise variance), your data is unusable. |
20:33:11 | disruptek | yeah, i concede that my data may be unusable for you, but i think it'll be useful for me. |
20:33:27 | federico3 | the whole point is to measure the variance |
20:33:53 | Araq | that's why spectre is totally not a thing, because you can never eliminate the noise |
20:33:59 | disruptek | the fact is, the kinds of macroscopic questions we need answers to don't demand the rigour of these highly controlled tests. |
20:33:59 | Araq | er ... hmmm |
20:34:28 | shashlick | @lqdev - basically https://github.com/nimterop/nimterop/blob/master/nimterop/grammar.nim#L219 |
20:35:13 | disruptek | anyway, the same golden code can be run in your controlled environment if that's important to you. it simply won't be a lynchpin of my design. |
20:35:15 | lqdev[m] | shashlick: yes, but it must have the {.incompleteStruct.} pragma |
20:38:21 | shashlick | yep |
20:40:36 | shashlick | is it applicable in every case? |
20:40:52 | shashlick | typedef struct a a; => type a = object |
20:44:20 | Araq | if there is no typedef struct {} a; then it's required |
20:46:02 | disruptek | is there any way to predict that code that works with `nim c` will fail with `nim doc`? |
20:47:44 | shashlick | cool |
20:50:49 | stefantalpalaru | This is what we need for benchmarking, instead of hypothesis testing: https://en.wikipedia.org/wiki/Experimental_uncertainty_analysis |
20:51:00 | lqdev[m] | is `macros.getImpl` used to eg. get the declaration of a proc or object? |
20:51:22 | shashlick | @Araq - will https://github.com/plasma-umass/coz work on nim? |
20:51:36 | federico3 | shashlick: why not? |
20:52:00 | disruptek | stefantalpalaru: lgtm |
20:52:14 | Araq | yeah right, because testing for statistical significance is a hoax |
20:52:56 | stefantalpalaru | No, it's not applicable for experimental results that don't involve random samples from a population with a normal distribution. |
20:53:02 | disruptek | i don't think that's the claim that's being disputed. |
20:55:02 | Araq | iirc he did argue for having a normal distribution |
20:56:05 | stefantalpalaru | What we want to know when benchmarking is the error interval, so when we compare benchmarks of two different programs we can see if there's an overlap in those error intervals. If there is, we can't say that the difference appears in our measurements. |
20:56:40 | * | Vladar quit (Quit: Leaving) |
20:56:54 | stefantalpalaru | But if the difference is bigger than the error margins, we know it's real. |
20:57:02 | lqdev[m] | how can I get the declaration of a proc in a macro using just the proc's name? |
20:57:22 | stefantalpalaru | Ignore that normal distribution he introduces by continuously randomizing memory layouts. |
20:57:46 | disruptek | that's fine, but it doesn't make a lot of sense to debate the coz results. |
20:57:47 | lqdev[m] | getImpl gives me a 'not a symbol' error during compilation. |
20:57:57 | Araq | well it's good that you know better than Mr Berger. |
20:57:58 | stefantalpalaru | You're not measuring the effects of that randomization. |
20:58:17 | stefantalpalaru | Ah, the appeal to authority :-) |
20:58:47 | Araq | in this case it works :P |
20:58:58 | stefantalpalaru | Does it, though? |
21:00:18 | clyybber | stefantalpalaru: It doesn't matter. The real interesting feature of coz is profiling concurrent/parallel stuff. And this is independent of that probablity stuff. |
21:01:31 | stefantalpalaru | Sure. The tool's utility has nothing to do with comparing benchmarks. |
21:02:16 | lqdev[m] | anyone can help me? |
21:04:10 | Araq | lqdev[m]: getImpl does it but you need to bindSym the proc |
21:05:17 | lqdev[m] | Araq: I tried this `macro printImpl(x) = echo x.bindSym.getImpl.treeRepr`, but it says `Error: cannot evaluate at compile time: x` |
21:05:38 | Araq | stefantalpalaru: you can control your "environment" all you want, in the end you might optimize for random code layout improvements if you don't eliminate this noise. That was one of his major points. |
21:06:13 | FromGitter | <Vindaar> @lqdev[m]: https://play.nim-lang.org/#ix=1ZKI |
21:06:24 | Araq | and you cannot eliminate this noise by switching off your network layer |
21:06:28 | stefantalpalaru | And it's orthogonal to what I'm discussing, Araq. |
21:07:37 | Araq | ok, cause it seemed to me that you're happy to deny this. |
21:07:39 | stefantalpalaru | His randomization eliminates changes not due to algorithmic changes, while I'm interested in the best way to compare software benchmarks. |
21:08:20 | lqdev[m] | @Vindaar, it works when you pass a string constant to bindSym, but as soon as you try to pass a NimNode to it, it fails |
21:08:41 | * | traviss joined #nim |
21:08:42 | stefantalpalaru | My claim is that benchmark results are measurements with an error margin, not random samples from a normal distribution. |
21:09:00 | FromGitter | <Vindaar> lqdev[m]: I'd guess it'd depend depend on the `NimNode`. Do you have an example? |
21:10:16 | lqdev[m] | @Vindaar https://play.nim-lang.org/#ix=1ZKL |
21:13:04 | disruptek | i really don't have a problem with that assertion. |
21:15:02 | FromGitter | <Vindaar> hm, that stomps me too |
21:15:20 | stefantalpalaru | He might have a case for hypothesis testing after introducing that randomization, if the hypothesis is that the benchmark difference is due to the algorithmic change and not to memory layout. |
21:15:59 | lqdev[m] | Araq: maybe you can help? |
21:16:01 | stefantalpalaru | But that's only for his particular case, not comparing benchmark results in general. |
21:16:26 | disruptek | iirc he just randomized the memory and didn't change the algo. is that wrong? |
21:16:50 | stefantalpalaru | He does both. |
21:17:30 | stefantalpalaru | And then he tries to find out if the algorithmic change produces a significant change in the runtime. |
21:17:37 | disruptek | that just doesn't intuitively make sense to me. |
21:18:29 | stefantalpalaru | Have you seen the video? He found out that memory layout changes can have very large effects on runtime, up to 40%. |
21:18:49 | stefantalpalaru | So much larger than what he is trying to measure after changing some algorithm. |
21:19:00 | disruptek | yes, i just didn't remember the details of his test methodology. maybe i need watch it a 5th time. |
21:19:40 | Araq | lqdev[m]: that's simply not supported |
21:19:51 | * | Hideki_ joined #nim |
21:20:36 | lqdev[m] | dang. how can I get the parameters of some external proc, then? |
21:20:38 | Araq | https://play.nim-lang.org/#ix=1ZKN you must use something like this |
21:20:59 | lqdev[m] | oh, typed |
21:21:21 | FromGitter | <Vindaar> huh, I thought I tried using a typed macro. Now I'm confused |
21:22:00 | FromGitter | <Vindaar> Ah, I didn't put the argument straight into the `bindSym` call when I tried `typed`... |
21:24:03 | * | Hideki_ quit (Ping timeout: 245 seconds) |
21:27:44 | Araq | there is no 'bindSym' in my snippet. |
21:28:06 | FromGitter | <Vindaar> ups, see. Wasn't even paying attention :P |
21:28:44 | FromGitter | <Vindaar> but then how does one use `bindSym` with a `NimNode` arg? |
21:29:01 | Araq | you don't, bindSym is for string literals only |
21:29:30 | FromGitter | <Vindaar> then the proc should be changed to reflect that ;) |
21:31:01 | Araq | you can also read its documentation instead |
21:31:19 | Araq | it supports NimNode for {.experimental: "dynamicBindSym".} (don't use this) |
21:32:42 | FromGitter | <Vindaar> Ugh, sorry. I need sleep :) |
21:33:29 | disruptek | range is the only way to build a variant object without a constant, right? |
21:33:44 | Araq | I think so, disruptek |
21:34:45 | disruptek | what if we had `case kind: ... in {One}: in {Two, Four} ... in {One, Three, Five}: |
21:40:40 | Araq | oh I think we support that one too |
21:41:33 | disruptek | you just cannot duplicate One, but yes. though iirc the sets have to be const. |
21:42:56 | * | solitudesf quit (Ping timeout: 268 seconds) |
21:43:15 | Araq | well sure, your syntax for 'case' is wrong |
21:44:00 | disruptek | i mean wrt the rfc about expanding case statements to support multiple matching clauses. |
21:44:15 | * | jjido joined #nim |
21:44:44 | disruptek | i just think `in` reads better for range/set. |
21:46:15 | disruptek | it hints that the value may have membership in multiple clauses, which is useful when you don't otherwise know what the label on the clause denotes -- is it an ordinal or not, eg. |
21:50:03 | Araq | too little improvement, many will simply say "huh? 'in' instead of 'of'? confusing" |
21:50:26 | Araq | well I would and I don't even like the word |
21:50:50 | Araq | (word == "confusing") |
21:52:52 | FromDiscord | <treeform> gogolxdong, you want to use my googleapi but with oauth2? It would probably be not that hard to add. disruptek is working on a better one here: https://github.com/disruptek/gcplat |
21:53:37 | FromDiscord | <treeform> Willyboard, sorry I don't know much about nimWebTemplates. |
21:55:40 | disruptek | i guess that's fair. but will we magically swallow duplicate membership in multiple sets when you use `of`? because that feels like something that could result in bugs. |
21:56:04 | Araq | treeform: any news about your UI toolkit? I'm a big fan |
22:05:30 | FromDiscord | <treeform> I am using it in production, but only the JS/HTML backend. So I used it as a web framework. |
22:05:52 | FromDiscord | <treeform> Some one was testing it on linux and I was using some shader functions not supported by linux. So I need to make shaders better. |
22:06:18 | FromDiscord | <treeform> For iOS and Android backend I run into GC issues. I need to get better at nim's GC to debug this. Maybe your new GC would just magically work on mobile... |
22:07:42 | Araq | gah. do you need async? |
22:08:02 | FromDiscord | <treeform> I do not. I don't use that on iOS or Android. |
22:08:11 | FromDiscord | <treeform> I don't use that in JS mode b/c I think its not supported. |
22:09:31 | dom96 | GC issues without async? What has the world come to? |
22:10:00 | FromDiscord | <treeform> It looks like it was freeing objects that where still being pointed too. |
22:11:19 | FromDiscord | <treeform> Oh, I did get a figma plugin though. So you can draw stuff in figma, and export it to nim. And it would mostly work. |
22:12:54 | FromDiscord | <treeform> The whole idea behind fidget is that you get real UI/UX designers draw the UI, export it to nim. |
22:13:50 | FromDiscord | <treeform> You would take a UI file that looks like this: |
22:13:51 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/637051152764108821/What_Tesla___s_Model_3_UI_reveals_about_its_vision_for_the_future_Cover.png |
22:13:56 | FromDiscord | <treeform> and export it to nim code |
22:14:14 | FromDiscord | <treeform> where you add the meat - the code onto the bones. |
22:14:59 | Araq | so ... if --newruntime works with everything except async, maybe it's time to speed up its development |
22:15:29 | Araq | somebody will write an async that works with it |
22:16:06 | FromDiscord | <treeform> Araq, I developed my iOS and Android stuff with gc:none which allowed me to do stuff, but you know that has problems 🙂 |
22:16:19 | Araq | oh my |
22:16:36 | Araq | at least try --gc:boehm |
22:16:53 | FromDiscord | <treeform> haha, good luck linking that in 🙂 |
22:17:03 | FromDiscord | <treeform> linking is such a pain in the mobile world. |
22:17:26 | FromDiscord | <treeform> Does boehm even support iOS or Android? |
22:17:45 | Araq | it's a DLL / shared lib |
22:17:45 | FromDiscord | <treeform> Everything on mobile must be statically linked. |
22:18:01 | FromDiscord | <treeform> Yeah dynamic linking is basically not supported. |
22:18:02 | Araq | never tried to link it statically, but I would give it a try |
22:18:25 | FromDiscord | <treeform> If nim's normal GC does not work, why would boehm? |
22:20:52 | FromDiscord | <treeform> I think one needs to get to the root of why it did not work. |
22:21:17 | Araq | I think it's the stack root detection logic |
22:21:36 | Araq | boehm does it differently, but sure, we can also try to fix for Nim's native GCs |
22:25:07 | FromDiscord | <treeform> I need to make like an example App in Fidget that's good as a webapp and as a desktop app. That is simple but still useful. |
22:26:39 | * | ng0_ joined #nim |
22:27:52 | * | ng0 quit (Ping timeout: 260 seconds) |
22:28:13 | FromDiscord | <treeform> Here is was making a Rent vs Buy calculator as a web app: https://cdn.discordapp.com/attachments/318464031536971777/610170634563223582/2019-08-11_10-58-05.mp4 |
22:29:00 | FromDiscord | <treeform> And then as a desktop app: https://cdn.discordapp.com/attachments/318464031536971777/610177367800938526/2019-08-11_11-25-36.mp4 |
22:29:49 | * | ng0_ is now known as ng0 |
22:43:36 | clyybber | Araq: Whats the first child of nkObjConstr? |
22:44:10 | disruptek | son of nkObjConstr, first of his name |
22:44:28 | clyybber | thank you disruptek, very cool |
22:44:38 | Araq | clyybber, the object type |
22:44:54 | clyybber | Thanks |
22:45:43 | disruptek | btw, american gods is an excellent adaptation of the book. |
22:45:59 | clyybber | Araq: How would I convert a PType to a type node? |
22:46:18 | Araq | via nkType |
22:46:23 | disruptek | sealmove won't like it, but it's beautifully done. fascinating cinematography. |
22:46:36 | clyybber | So just a new empty nkType? With its .typ set to the PType? |
22:46:37 | dom96 | treeform: I guess your game needs a lot of UI? |
22:46:48 | Araq | clyybber, exactly |
22:46:53 | clyybber | Cool, thanks |
22:47:03 | dom96 | I just need some buttons and an input for my main menu. Using SVG to get a rounded rectangle and drawing some text works very well :) |
22:53:07 | * | letto_ joined #nim |
22:53:09 | * | letto quit (Read error: Connection reset by peer) |
23:03:56 | clyybber | Araq: Can I remove PTransNode? |
23:04:01 | clyybber | Its really annoying |
23:04:19 | clyybber | Or does it serve a higher purpose I am not aware of? |
23:04:28 | * | mahlon joined #nim |
23:04:44 | disruptek | shashlick: did you ever figure out how to attempt an import? |
23:08:06 | Araq | clyybber, kill it |
23:08:18 | Araq | it was an attempt to ensure statically that we traverse every node |
23:08:34 | Araq | it never brought up any bug, it's noise |
23:08:50 | clyybber | Yeah |
23:09:04 | Araq | thank you for noticing, it's so old that I never considered it |
23:10:45 | clyybber | Np |
23:11:23 | FromDiscord | <treeform> dom96, yes UI is everywhere. |
23:19:27 | * | krux02_ joined #nim |
23:21:58 | * | krux02 quit (Ping timeout: 245 seconds) |
23:23:28 | mahlon | Hello! I'm experimenting with selectors (converting some stuff from manual fork/exec). Running into an issue I'm hoping is just me missing something obvious. Gist here, advice welcomed. https://gist.github.com/mahlonsmith/ba6ea9f7a04d4ddc5a94f61ae470e3b3 |
23:24:29 | disruptek | registerProcess returns a handle that you can use to unregister it. it's just {.discardable.}. |
23:25:23 | mahlon | ah!! |
23:25:54 | disruptek | here's a successful example: https://github.com/disruptek/golden/blob/master/src/golden/invoke.nim |
23:27:07 | mahlon | That's super helpful. Thank you. |
23:27:15 | disruptek | np, have fun. |
23:27:16 | mahlon | Heh, and just seeing #12354 now. |
23:28:10 | disruptek | yes, but i wouldn't hold your breath. |
23:38:40 | * | Hideki_ joined #nim |
23:42:34 | * | clyybber quit (Ping timeout: 268 seconds) |
23:46:50 | * | Hideki_ quit (Remote host closed the connection) |
23:47:35 | * | Hideki_ joined #nim |
23:47:50 | shashlick | @disruptek - import of what? |
23:47:52 | shashlick | don't remember |
23:52:14 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:52:26 | * | Hideki_ quit (Ping timeout: 268 seconds) |
23:57:06 | shashlick | @lqdev - i've added incompleteStruct to latest nimterop#head, please verify |