<< 24-10-2019 >>

00:00:52rayman22201loadjs is the equivalent of dlopen for us native people
00:14:28*mal`` quit (Quit: Leaving)
00:14:29FromDiscord<krab4t> why i can't use fmt here https://play.nim-lang.org/#ix=1ZFe
00:15:04FromDiscord<krab4t> undeclared identifier: 'token'
00:19:30*mal`` joined #nim
00:21:18FromDiscord<krab4t> i mean i just want some reflection, get that identifier name
00:34:06*stefantalpalaru quit (Quit: stefantalpalaru)
00:37:33FromDiscord<krab4t> and ` typetraits.name ` doesnt work for untyped in templates? :\
00:46:24FromDiscord<krab4t> astToStr
01:05:42FromDiscord<krab4t> strformat has limitations, so im not going crazy
01:12:30disruptekreflection isn't really a thing.
01:12:41disruptekyou 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:16FromDiscord<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:21FromDiscord<elvisxzhou> Hello, what's the equivalent of c' exit(1) in nim?
01:31:37disruptekquit(1)
01:47:03FromGitter<Willyboar> I published a little demo from my static blog gen
01:47:05FromGitter<Willyboar> https://bigbaron.org/
01:47:30FromGitter<Willyboar> tomorrow i will release it ( i hope ) to nimble
02:01:19*Guest94707 quit (Remote host closed the connection)
02:06:12FromDiscord<elvisxzhou> Hello, how to invoke a proc by its string name in nim?
02:09:42leorizedepending on where this string came from
02:10:01disruptekt'was in the depths of mordor.
02:12:31*JStoker joined #nim
02:13:34shashlick@elvisxzhou use a table
02:17:26*krux02_ quit (Remote host closed the connection)
02:21:37disruptektell me, shashlick
02:21:42*rockcavera quit (Read error: Connection reset by peer)
02:21:59disruptekwhat 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:53shashlickyou could use morse
02:32:38*Hideki_ quit (Ping timeout: 265 seconds)
02:36:44*rockcavera quit (Remote host closed the connection)
02:53:05FromDiscord<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:28FromDiscord<Kiori Sün> thanks @rayman22201 for the reply.
02:56:28FromDiscord<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:11FromDiscord<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:51leorizeChiqqum_Ngbata: no
03:17:16leorizethe preferred way is to convert the string to `cstring`
03:17:54*chemist69 quit (Ping timeout: 246 seconds)
03:18:27leorizeor make sure that the function signature is cstring, which string could be implicitly converted to
03:20:01*chemist69 joined #nim
03:23:18FromDiscord<Chiqqum_Ngbata> You mean not return a string?
03:24:08leorizewhat exactly are you trying to do?
03:25:28FromDiscord<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:12disruptekcstring is `compatible string`. it's a portable string between nim and any ffi.
03:26:41disruptekit is null-terminated. plenty of explanation exists in the manual.
03:26:57disruptekif you have a specific question about it or interop, ask away.
03:28:05disruptekyou can, of course, play with it in nim against other nim code, as well, should you wish to perform your own experiments...
03:28:26FromDiscord<Chiqqum_Ngbata> The string procs aren't defined for cstring also, right?
03:29:12disruptekit's convertible but it's a different type with more c-like semantics (null terminated, eg.)
03:29:58FromDiscord<Chiqqum_Ngbata> So downstream someone would have to $myretval.split("whatever")
03:31:06leorizethere's cstrutils
03:33:55FromDiscord<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:41FromDiscord<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:57leorizeChiqqum_Ngbata: the efficient way is to not + 1 :P
04:58:10FromDiscord<Chiqqum_Ngbata> setLen() seems to avoid the copy
04:58:10leorizeNim allocates enough storage to store some extra bytes
04:58:15leorizeyes
04:58:37leorizeand please don't use `let` if you're writing into it
04:59:07leorizeconvert to cstring is the same as `addr s[0]`
04:59:45*LargeEpsilon quit (Ping timeout: 246 seconds)
04:59:45FromDiscord<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:13lqdev[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:06PMunchHmm, 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:31FromDiscord<Chiqqum_Ngbata> Identifiers beginning with _ or containing multiple __ is invalid in nim IIRC
07:16:48PMunchYeah they are
07:17:03PMunchBut this is translating C sources into Nim
07:17:27FromDiscord<Chiqqum_Ngbata> Oh
07:21:46*brainproxy joined #nim
07:25:22PMunch"solved" it by telling nimterop to ignore that symbol
07:27:55PMunchHmm, --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:24lqdev[m]PMunch: use cPlugin to modify symbols
07:45:22PMunchcPlugin?
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:01narimiran!eval echo NimVersion
09:10:04NimBot1.0.0
09:10:25*Zevv is now known as NinBot
09:10:29narimiranpffft, 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:19PMunchHuh, strange
09:11:30*NinBot is now known as Zevv
09:13:59PMunchWoops, I had some relative paths in the script that my cront-task is running
09:14:07PMunchSo it didn't work properly
09:17:27PMunchAm I doing something wrong or does "toast -r" simply not work?
09:18:44*brainproxy joined #nim
09:19:22Araqyou need to use 'toaster toast -r', toast cannot make itself
09:19:43PMunchHuh?
09:19:43Araqsorry, couldn't resist
09:19:46PMunchHaha
09:23:30dom96`toast -r`? lol
09:24:37Araqso...
09:24:49Araq"nim devel" cannot build 1.0.x as we removed magics
09:25:17Araqthe question is whether we value compiler code cleanness (is what a word) moreso than compat
09:25:55PMunchdom96, toast is the nimterop tool to translate .h files to .nim
09:25:58Araqin the past Nim version x could build version y > x
09:26:10Araqbut y couldn't build x
09:26:18PMunchAnd -r is supposed to process #include files, but it doesn't appear to do anything..
09:26:20Araqbut it sucks
09:26:25Araqany opinions?
09:26:46dom96what magics did we remove?
09:27:00AraqmAddI64 (integer addition for 64 bits)
09:27:11Araqthere is now only mAddI (integer addition)
09:27:29Araqand likewise for mul, div etc
09:29:56Araqit's a nice compiler cleanup but that devel cannot build the version-1-0 branch is really bad
09:31:57Araqah
09:32:23AraqI can add a translation step to pragmas.nim that handles 'magic' to make it work again
09:32:42Araqthanks for listening
09:34:11Araqhey 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:03FromDiscord<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:52federico3https://www.devever.net/~hl/cloudflare
10:40:22FromDiscord<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:38FromDiscord<arnetheduck> or.. `addCarry` strictly
10:40:56narimiran"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:05Araqit 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:08federico3we should move away from cloudflare
11:21:28*solitudesf joined #nim
11:22:34*brainproxy quit (Ping timeout: 268 seconds)
11:24:25FromDiscord<Rika> why
11:26:00*brainproxy joined #nim
11:26:47federico3see the link above
11:30:21*brainproxy quit (Ping timeout: 246 seconds)
11:32:51FromDiscord<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:50leorizeif it was that easy
11:36:08leorizethen we wouldn't be trying to hack newruntime :P
11:38:57*brainproxy quit (Ping timeout: 240 seconds)
11:39:22AraqI think if we had 'owned' that could be duplicated without the possibility to create cycles it might work out
11:39:41Araqcurrently that is achieved by "owned can only be moved"
11:42:15Araqwe can weaken that requirement to: escapes(ownedRef) only allowed for when 'ownedRef' is the last read but that is useless
11:44:06PMunch!eval echo NimVersion, " better now narimiran"
11:44:08NimBot1.0.2 better now narimiran
11:44:14narimiran:)
11:44:23*brainproxy joined #nim
11:45:50PMunchAnd now the script should work
11:46:13PMunchSo it should start the update at most 10 minutes after the tag is pushed
11:46:24narimiranwow, nice!
11:46:57dom96what might be more reliable is to look at the choosenim `stable` channel :)
11:48:25PMunchWell 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:13Araqhey, it's bikeshedding time
11:49:18PMunchApart 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:32PMunchOh? What is the bikeshed this time?
11:49:37dom96oh cool, so we support multiple versions?
11:49:44Araqwhat should the name of the "Nim distribution" should be?
11:49:59PMunchdom96, been a while since you've been to the playground? https://play.nim-lang.org
11:50:11Araq"Nim fusion", "Nim cold fusion", "Nim distro", "Nim with batteries"
11:50:23Araq"Curated Nim"
11:50:31dom96PMunch :O
11:50:32PMunchYou have compilation targets and all versions back to v0.13.0
11:50:46PMunchAraq, as opposed to?
11:50:46Araqdom96, ikr, it's awesome
11:51:08Araqnothing, I'm asking about a name
11:51:14dom96written in Karax too :O
11:51:39PMunchYeah :) It's been written in Karax for ages :P
11:51:51federico3Araq: what's the "Nim distribution" tho?
11:52:08*brainproxy joined #nim
11:52:12Araqfederico3, I'm writing an RFC about it
11:52:19PMunch16th of May was the Karax switch according to GitHub
11:52:27Araqit covers how it could work and what it implies for the stdlib's design
11:53:29Araqto a good first approximation it's "Nim + important packages" shipped as single tarball
11:54:19Araqto mitigate the problem "I cannot install Nimble packages at work" or "I won't use X because it's a *dependency*"
11:54:22PMunchWait, you want to create a Nim distribution with pre-installed packages?
11:54:32PMunchHmm, interesting
11:54:51PMunchJust make sure it works properly if people want to use nimble later
11:54:59dom96bah
11:55:00dom96How many have actually said that this is a problem?
11:55:09federico3Araq: is there an issue with details around "I cannot install Nimble packages at work"?
11:55:12dom96The impact here to me seems minimal.
11:56:35Araqfederico3, no but at least cooldome has this very problem fwiw
11:56:37federico3I 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:08Araqbut it also helps newcomers to see what packages can be trusted
11:57:19federico3yes
11:57:29Araqand it helped Python's growth IMHO
11:57:47federico3that was the whole point behind having a large stdlib in Python
11:59:20*nc-x joined #nim
11:59:30Araqwell 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:36PMunchI 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:38federico3"Nim with batteries and solar panels"
12:00:02dom96Do make sure to outline how you will decide what belongs in this distribution
12:00:31*brainproxy joined #nim
12:00:35narimirananybody who payed one million dollars!
12:00:43federico3Araq: there's been talks about reviewing and tagging trusted packages in Nimble. Possibly signing them.
12:01:40federico3Knowing 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:45nc-xI 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:13Zevv3) is no problem in 2019, disk usage is free
12:03:34federico3nc-x: 1) no, only stable, maintained packages would be included
12:03:36Zevv as for 1), I assume nimble is shippe as well, so a simple nimble update would suffice
12:04:03PMunchYeah, 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:15dom96The problem IMO is that this is yet another thing to maintain
12:04:17federico3no, you want to trust that the shipped version of Nim and the library go well together
12:04:30dom96when installing packages using Nimble /should/ be trivial
12:04:58dom96If someone cannot install them then we should put focus into fixing that
12:04:59dom96instead of working around this problem
12:05:12PMunchWell I guess the idea is to have a "download this one thing and don't worry about incompatibilities or updates"
12:05:14federico3dom96: it's not another thing if it's built [with / on top of] nimble
12:05:26nc-xAlso, 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:38PMunchNim updates? Well download the entire new suite and get the now updated packages.
12:05:46federico3nc-x: no, that's exactly the problem
12:05:47Zevvlets await araqs rfc
12:06:02Zevvhe tends to write down things that make sense, every now and then
12:06:40PMunchfederico3, 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:58nc-xZevv: yeah
12:06:58federico3Zevv: disks might be cheap but not free but bloat and complexity is always expensive
12:07:15PMunchfederico3, well normal Nim isn't going away
12:07:17*nc-x quit (Remote host closed the connection)
12:07:33Zevvfederico3: if packages that are not used are basically just bytes on disk - it's not "complexity"
12:07:35federico3PMunch: but that locking is done by the developer, which is a disaster
12:07:41PMunchBut as a product "Nim with power plant" is a valid idea
12:08:07federico3Zevv: in this specific case, yes
12:08:10PMunchfederico3, why is that so bad?
12:08:51*brainproxy quit (Ping timeout: 246 seconds)
12:09:11federico3PMunch: it prevents any form of automated security updates
12:09:53federico3I mean automated but vetted, not just pulling new releases randomly
12:11:09PMunchYeah, 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:41PMunchBecause the versions required for that point in the development was locked
12:11:44miprithat'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:45federico3PMunch: that's work that a random developer cannot (and should not) do
12:12:25federico3mipri: it matters to many organizations and it's also a reason to use dynamic linking
12:13:19FromDiscord<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:27mipriI get it, that people care about this. They just always don't care about other problems at all.
12:13:33miprilike updates breaking stuff.
12:13:44FromGitter<Willyboar> @araq use something simple like : NimStar
12:14:01miprior deployment ease. Or things working and staying how they are by default.
12:14:10FromDiscord<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:57miprior, speaking of security, updates creating new security holes, so that you have to react to problems that wouldn't be problems otherwise.
12:14:58FromDiscord<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:13Araqthat solves a different thing and you know it
12:15:31federico3mipri: that's why distribution backport security fixes instead
12:15:37Araqyou can use lockfiles after you went through the whole process "which Nimble packages can we use"
12:16:11Araqlockfiles don't guide you at all in your decision making
12:16:13FromDiscord<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:26federico3Araq: indeed
12:16:29mipriso 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:14federico3mipri: just like any other language
12:17:38miprino, only like scripting languages.
12:18:13mipriif you compile an application in C, there are some dynamic links, but there's also a ton of stuff in the executable.
12:18:42mipriand 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:14mipriif 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:20federico3hah
12:20:09Araqor 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:18mipriwhat 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:27Araqand 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:24federico3Araq: no, sandboxing is orthogonal to being able to update libraries efficiently
12:22:40mipriin 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:10federico3I'm talking about very different use cases than php and web stuff
12:23:29Araqfederico3, indeed, this is a different topic
12:24:12federico3yep - anyhow vetted packages for Nim would really help
12:24:29*brainproxy quit (Ping timeout: 276 seconds)
12:25:34FromDiscord<Chiqqum_Ngbata> Have you seen deno's approach to this Araq?
12:25:59Araqno.
12:26:40*brainproxy joined #nim
12:27:17FromDiscord<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:27FromDiscord<Chiqqum_Ngbata> Conceptual support if you yearn for it
12:29:16Araqthe 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:22Araqmaybe we should vote packages into "Nim candy" and it starts out as empty
12:30:40Zevvhow is that voting different then voting for important packages?
12:30:51federico3"gah, why is this part of it?" -> given the size of the package pool it authors can be asked
12:31:10AraqZevv, there currently is not voting for important packages
12:31:23Zevvso how does one get in then?
12:31:30narimiranok, let us reformulate the biggest question: which packages are missing from important_packages.nim?
12:31:40federico3important but also vetted, tested, maintained
12:32:00AraqZevv, we decided based on some of GULPF's usage data
12:32:49narimiranfederico3: 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:55Araqbut for testing it's easy to decide, "if in doubt, take it into account", the goal is to test the compiler
12:33:15Araqfor testing it also doesn't matter if there is considerable overlap
12:33:20federico3that's quite a different use case
12:33:36Araqso what if we test 5 different command line parsing packages
12:34:09FromDiscord<Chiqqum_Ngbata> Is there a github.com/nim-lang/important-packages/list.txt ?
12:35:14narimiranhttps://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:16shashlick@lqdev I tried your Wren wrapper on Linux and it worked as is
12:43:03shashlick@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:14shashlick@PMunch for recurse to work correctly, you need to give full paths to toast
12:46:00shashlickcImport does that automatically so if it isn't happening, share a snippet
12:46:13*theelous3 joined #nim
12:47:12shashlickBy the way, was midnight to 4am when you messaged so unlikely I'll reply :)
12:48:01dom96arnetheduck: heard anything recently from zah about lock file implementation in Nimble?
12:52:15*brainproxy quit (Ping timeout: 246 seconds)
12:57:02lqdev[m]shashlick: what Nim version?
12:59:35*nsf quit (Quit: WeeChat 2.6)
13:04:26shashlickDevel I think
13:06:07FromDiscord<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:08FromDiscord<arnetheduck> dom96 beyond it going slowly, no
13:08:21shashlick@dom96 got nimarchive working on choosenim for windows and Linux, plus Linux binary support plus windows CI
13:08:54shashlickBut osx is failing in writing extracted files so am debugging that
13:11:53Araqwell 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:48Araqand that's where the attitude "I won't use X, it's a dependency" comes from.
13:14:25AraqYou 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:44PMunchshashlick, aaah, that was my issue
13:19:06PMunchWhen I use nimterop in the code instead it worked fine, because it was rewriting it into full paths
13:19:21PMunchNow I have a different problem a redefinition
13:20:56PMunchBetween 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:54shashlickYou could just define it yourself and skip it
13:25:21*lbartoletti_ joined #nim
13:25:27PMunchWell, that is not the only one..
13:25:52*lbartoletti quit (Ping timeout: 264 seconds)
13:27:58PMunchPretty much all the .h files do this for some reason..
13:36:02dom96arnetheduck: what's taking so long?
13:36:08PMunchHmm, isn't recursive more than one step down?
13:41:31jkenWhen 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:48jkenOr use concepts to write a proc that accepts any namespace with certain procs?
13:46:08Araqno. maybe there are workaround via templates but you won't get very far
13:46:46Araqit's not a dynamic thing as it is in Python, you need to adapt your way of thinking
13:47:14jkenI figured that was the case, thanks for confirming Araq
13:48:31FromDiscord<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:56dom96arnetheduck: I thought zah hired someone to work on this full-time?
13:51:19Araqdom96, just ask zah directly
13:51:34dom96he's not here?
13:52:08Araqtried gitter?
13:52:57dom96@zah?
13:53:53FromDiscord<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:21lqdev[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:24dom96I disagree that this is a system shift
13:55:24dom96lqdev[m] every special edge case needs to be tested
13:55:36dom96lqdev[m] which makes things less reliable
13:55:39FromDiscord<arnetheduck> ok 🙂
13:55:55*Guest36881 quit (Ping timeout: 250 seconds)
13:56:26shashlickChoosenim will soon support Linux binaries
13:56:38FromDiscord<arnetheduck> basically, we need something that fullfills our requirements - whatever that might be
13:56:54shashlick@PMunch what isn't getting included? The preprocessor will go thru all includes
13:57:06lqdev[m]shashlick: I'm talking about choosenim #devel here
13:57:06FromGitter<Willyboar> is there a chance choosenim support ARM?
13:57:20lqdev[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:47dom96lqdev[m] because I implemented it in the most simple and most likely to work way
13:57:49shashlickOk, will be asking nightlies too so you'd rather install a tested devel
13:57:51dom96I didn't have time for these special cases
13:58:08dom96and yes, the proper fix is to get nightly support
13:58:08dom96so there is no point in implementing this
13:58:29shashlickPlus there's no guarantee that some random Nim can build what is being requested
14:00:03lqdev[m]shashlick: that's why I proposed version checking
14:00:27lqdev[m]but if nightly support is the way it should be implemented, then ok
14:00:35shashlickI'll get to it
14:01:30shashlickLibarchive is failing for me here on osx - https://github.com/libarchive/libarchive/blob/master/libarchive/archive_write_disk_posix.c#L960
14:01:39shashlickAnyone have any ideas, will be appreciated
14:02:14shashlickWorks fine on win lin
14:03:47lqdev[m]shashlick: I'm getting the same error on #devel in my Wren wrapper
14:04:25lqdev[m]what is this function, anyways? `euwren_wrenDatInit000`
14:04:41lqdev[m]I remember someone having a similar problem some time ago
14:08:19lqdev[m]but I'm wondering why does Nim try to get sizeof(WrenVM) anyways…
14:11:35*NimBot joined #nim
14:22:17Araqhttps://github.com/nim-lang/RFCs/issues/173 there
14:22:41Araqmaybe it should have been two separate documents but I feel like fixing some bugs now
14:23:08lqdev[m]seems like the issue only occurs when I wrap a `ptr WrenVM` inside of a `ref object`.
14:23:41lqdev[m]I'll attempt to create a MCVE
14:25:23lqdev[m]shashlick: https://termbin.com/gbdx
14:27:08lqdev[m]feels so good when you finally pick up on a project but there's yet another roadblock on its path.
14:29:54shashlickTell me about it
14:29:59shashlickI'll get to it in 2 hours
14:30:57lqdev[m]looking at the generated C source code, it sounds like a codegen bug related to NimNodes, somehow.
14:31:31lqdev[m]here's the generated C code: https://termbin.com/g0rt
14:32:49jkenHow do I iterate a seq in reverse?.
14:33:05*Hideki_ joined #nim
14:33:24lqdev[m]jken: `for i in countdown(x.len - 1, 0): let e = x[i]`
14:33:47jkenah, thanks
14:33:55jkenI expected a reverse proc i sequtils for some reason
14:35:23Araqsequtils.reversed or algorithm.reversed ?
14:35:52Araqdunno 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:26skrylar[m]congratulations on 1.0 :p
14:48:38skrylar[m]tried to mention that sooner but the matrix bridge was borked
14:50:19skrylar[m]also i came with gifts. namely that gdk3 wrapper from months ago https://man.sr.ht/~skrylar/skgnome/
14:52:24Araqthanks
14:53:07*brainproxy joined #nim
15:00:02*nc-x joined #nim
15:22:07*brainproxy quit (Quit: WeeChat 2.6)
15:23:50nc-xAraq: 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:18Araqok, thanks
15:24:32Araqwe should remove the 'master' branch
15:24:57nc-xyeah
15:25:25nc-xthere 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:06FromDiscord<mratsim> I thought when cloning devel was the default now?
15:28:31Araqdefaults 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:31nc-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:31nc-xso 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:47skrylar[m]sounds squirrely
15:45:05skrylar[m]pretty sure master/trunks are supposed to be master/trunks and branches are for releases =p
15:45:35FromDiscord<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:35Araqkrptr: no and it's not a bug, code-reordering doesn't look into string literals
15:50:08lqdev[m]Araq: does `=destroy` work on *all* regular stack-allocated objects?
15:50:14*Hideki_ joined #nim
15:50:22lqdev[m](talking about the old GC runtime here)
15:51:16Araqyeah
15:51:56lqdev[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:18FromGitter<alehander42> imo people should be motivated to developer third party libs
15:54:40FromGitter<alehander42> the nim ecosystem is small, and thats the main thing that it needs imo: more libs with good nim api-s
15:54:51FromGitter<alehander42> imporving the stdlib is important ofc
15:54:55lqdev[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:16Araqlqdev[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:28Araqand I'm happy that it works now
15:57:57*Hideki_ joined #nim
15:58:04Araqalehander42: do you think a "distribution" would motivate devs or not?
15:58:18FromGitter<alehander42> i dont know
15:58:29FromGitter<alehander42> just saying that this seems important to me
15:59:42FromGitter<alehander42> but not sure if the lang team itself can do anything about that
15:59:54FromGitter<alehander42> nimble improvements like bump should be useful tho
16:01:07lqdev[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:54Araqlqdev[m]: use .incompleteStruct on the type to prevent this
16:04:33lqdev[m]Araq: oh, right
16:06:29lqdev[m]oh man, it actually compiles now
16:06:31lqdev[m]thanks for that!
16:07:17lqdev[m]shashlick: you should add support for this in nimterop
16:07:48*sentreen quit (Ping timeout: 245 seconds)
16:12:01FromDiscord<krptr> thanks <araq>, didn't know that about code reordering
16:17:48FromDiscord<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:54FromGitter<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:46FromGitter<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:27FromDiscord<Chiqqum_Ngbata> Araq, is the idea to include distribution by default?
16:22:45Araqyes
16:23:39FromDiscord<strombom> Vindaar, ok I have raised an issue, thanks.
16:23:40FromDiscord<Chiqqum_Ngbata> Can we get a nim-lite ? I personally wouldn't want any extras, dunno if I'm alone
16:24:04FromDiscord<Chiqqum_Ngbata> I've been behind corporate firewalls before so have some sympathy for this imperative anyway
16:24:27Araqnim-lite == git clone nim-lang/nim ?
16:26:35FromDiscord<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:08FromDiscord<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:58Araqcligen
16:28:44Araqarraymancer
16:29:56FromDiscord<Chiqqum_Ngbata> cligen seems reasonable to include. Arraymancer, awesome as it is, may be kind of specialized no?
16:29:56Araqnorm
16:30:37FromDiscord<Chiqqum_Ngbata> i.e., is popularity the driving factor or some subjective idea of general utility?
16:30:46Araqsure but if it provides the Matrix[T] building block it should be in there
16:32:20Araqbut as I have written, people vote for packages, we won't include anything on our own
16:32:36FromDiscord<Chiqqum_Ngbata> Right
16:32:54*strombom56 quit (Remote host closed the connection)
16:33:08Araqyou can argue that it should domain specific, a game dev centric distribution would ship SDL, OpenGL, Vulkan
16:33:47Araqbut then we get different distributions and I don't know if we need that
16:34:17clyybberWe could just introduce bundles like nimble install gamedev
16:35:19*nsf joined #nim
16:35:42*Hideki_ joined #nim
16:36:31Zevvnimble metapackages
16:36:34Araqwe could also focus on utils + crypto + other security related stuff
16:36:51Araqas the review process will be expensive
16:37:33Araqin fact, the review process already rules out e.g. nim-godot, too much code
16:37:56FromDiscord<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:12AraqI personally also care very much about a simple canvas-like thing.
16:39:39FromDiscord<Chiqqum_Ngbata> For plotting and such or?
16:40:15Araqyeah and for simple 2D graphics, learning how to program is so much more fun when you can tinker with pixels
16:41:06FromDiscord<Chiqqum_Ngbata> Agree with that personally
16:43:18*sentreen joined #nim
16:43:59AraqZevv: what to run to see "leaking temporary"?
16:45:04*narimiran joined #nim
16:45:30Zevvyeah I don't know, that happened even with echo 42
16:45:37clyybberlol
16:45:56Zevvbut I only figured that out after trying to compile my code with 151231 vm registers
16:46:12Zevvsince I was the only one with the problem, it was surely me
16:46:19Zevvsorry for the noise
16:46:26*Hideki_ quit (Ping timeout: 276 seconds)
16:50:53disruptekwhat's the point of deprecating packages if they aren't removed? just to produce extra warning messages in my console?
16:52:00Zevvwhen getenv("USER") == "disruptek": warn "X is Deprected"
16:52:23disruptekwhat if everyone votes npeg in but zevv says he doesn't want it included for hand-sitting reasons?
16:53:46Zevvwhen getenv("USER") == "disruptek" and package == "npeg": warn "X is Deprected"
16:53:52Zevvjust you
16:54:36Araqdisruptek: good point, I think the author should have a veto right
16:55:13*Vladar quit (Quit: Leaving)
16:55:32Zevvit's the nice thing to do, altough if the licence is liberal enough no one can stop you of course
16:56:20disruptekthe dist bits are hosted at nim, right?
16:56:50disruptekthat's what i gather from "tarball."
16:58:48Zevvthat's the idea I think, why?
17:00:16disrupteki 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:02Zevv"the good, the bad, and the ugly (and the dead)"
17:01:06disrupteksitting 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:32disruptekespecially as nothing gets removed.
17:02:04Zevvblack and white, you'd say: if its not deprecated, it should be ok
17:02:59disrupteki had in mind something more like a 3x3 matrix, but even a single bit would be an improvement.
17:03:32Zevvyeah, otherwise we'd need arraymancer to manage deprecaton
17:03:52Zevvhow so 3x3?
17:04:09clyybberHmm, maybe the stdlib should just provide concepts as in common interfaces
17:04:19disruptekthree measures of suitability and three ranks of such measures.
17:04:26clyybberand the packages are encouraged to use/adhere to them
17:04:49FromGitter<Willyboar> I think this prevents developers to create new libs if there is already one in the nim
17:04:57disruptekit shouldn't be detailed enough to be quibbled over.
17:05:14*PMunch joined #nim
17:05:16disruptekwell, it would be nice to know that we don't have any 3-star concurrency packages, for example.
17:07:47Zevvdisruptek, the king of uncomfortable silences
17:08:17Zevvno, we don't have that :(
17:09:14disruptekif 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:20lqdev[m]huh, this code https://termbin.com/mbf6 gives me a strange error: https://termbin.com/7m4m
17:09:48FromDiscord<Chiqqum_Ngbata> The common interfaces would probably be a natural consequence of blessing one library for purpose_x
17:10:24Zevvdont think that is feasible, designing these interfaces is half the work of making an implementaion
17:10:32FromDiscord<Chiqqum_Ngbata> i.e., third party libraries would be strongly encouraged IMO to follow pattern that's under the aegis of nimlang
17:10:39Zevvso design the interfaces by comission?
17:10:43clyybberChiqqum_Ngbata: Yeah but I fear that that blessing might hinder the pkg
17:10:44FromDiscord<Chiqqum_Ngbata> But yeah, true. Sometimes yes, sometimes no
17:10:50disruptekthat pattern is already espoused and indeed documented in the manual.
17:10:52FromDiscord<Chiqqum_Ngbata> Can happen of course
17:11:37lqdev[m]any ideas on why that error occurs?
17:11:40PMunchYeah the threading story in Nim isn't great..
17:11:57lqdev[m]seems like the GC fails at some point.
17:12:35clyybberAraq: What does it mean for a pkg when it is included in the distribution? How are breakages handled then?
17:12:43lqdev[m]PMunch: threading?
17:12:52PMunchYeah, multi-threading
17:12:58PMunchI means creating threads are fine
17:13:28lqdev[m]are you referring to my example? I don't use threading.
17:13:49PMunchNono, I was referring to what they were talking about with packages :P
17:13:52Zevvlqdev[m]: no he was referring to another discussion
17:14:05PMunchI'm looking at your example, but it's pretty long..
17:14:06lqdev[m]oh, right
17:14:28PMunchAnd since it imports another thing I can't run it to test it..
17:15:06lqdev[m]PMunch: this is the other module: https://termbin.com/7og6
17:15:34lqdev[m]don't really know why this error happens, couldn't get a MCVE working
17:15:41PMunchHmmm
17:16:44lqdev[m]the error happens in the config.errorFn anon proc
17:17:04lqdev[m]more specifically, `case of WREN_ERROR_RUNTIME`, the point where the echos are
17:17:17lqdev[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:50PMunchYeah..
17:21:01PMunchIs that a closure?
17:21:07PMunchOr 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:30PMunchI'm guessing that this errorFn is called by the wrapped library?
17:23:41PMunchProbably messes up the GC somehow
17:24:11shashlickIs it a callback
17:25:40lqdev[m]PMunch: it's a callback, but not a closure since it's cdecl
17:25:42lqdev[m]and yes, it's called by the wrapped library
17:25:49lqdev[m]not sure how it could mess up the GC
17:26:09PMunchTry throwing a setupForeignThreadGC in there and see if that works
17:26:53shashlickThat's step 0 for C callbacks
17:27:08PMunchHuh?
17:27:20shashlickYour suggestion
17:29:23*ng0 joined #nim
17:31:17clyybberAraq: Whats the best way to check if result is necessary in a proc?
17:31:52clyybbercontainsResult?
17:33:05*ng0 quit (Client Quit)
17:33:23disruptekjust omit it and see if anything breaks.
17:34:11PMunchclybber, what do you mean if it is necessary?
17:34:47disruptekif the return type is not empty.
17:36:06clyybberPMunch: I mean if the body uses result or if it just does return.
17:36:46FromDiscord<robohack> I am having a nimble error. This is on OSX: % nimble refresh --verbose
17:36:47FromDiscord<robohack> Downloading Official package list
17:36:47FromDiscord<robohack> Trying https://github.com/nim-lang/packages/raw/master/packages.json
17:36:47FromDiscord<robohack> Warning: Could not download: location header expected
17:36:47FromDiscord<robohack> Trying http://irclogs.nim-lang.org/packages.json
17:36:49FromDiscord<robohack> Trying http://nim-lang.org/nimble/packages.json
17:36:49FromDiscord<robohack> Error: Refresh failed
17:36:51FromDiscord<robohack> ... Could not download: location header expected
17:37:01PMunchUhm, I don't think there's a good way to check that
17:37:01clyybberAfaict 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:13PMunchrobohack, please use a paste-site for multi-line content
17:37:20FromDiscord<robohack> Ok
17:39:02FromDiscord<robohack> I am having a nimble error. This is on OSX:
17:39:02FromDiscord<robohack> https://pastebin.com/TsZJH8g5
17:39:02FromDiscord<robohack>
17:39:02FromDiscord<robohack> It appeared to work on my Win 10 box though.
17:39:18FromDiscord<robohack> edited
17:39:34*ng0 joined #nim
17:39:39*abm quit (Quit: Leaving)
17:41:05PMunchHmm, location header..
17:41:37PMunchThat's weird
17:41:40PMunchAre you behind a proxy?
17:43:36FromDiscord<robohack> No, the only weird thing I do network-wise is run pi-hole (DNS based ad-blocking).
17:43:57PMunchHmm, well it could black-list the nim site for some reason
17:44:18PMunchCould you try "nslookup nim-lang.org" in your command prompt?
17:44:58FromDiscord<robohack> It resolves to 104.28.19.79
17:45:13PMunchAh right, CloudFlare..
17:45:31PMunchIt could be that your IP is "banned" and the site redirects you a captcha site..
17:45:48PMunchCan you access the list manually?
17:46:00PMunchAs in open any of those links in a browser
17:46:14FromDiscord<robohack> I will try,
17:46:53FromDiscord<robohack> Yes, I was able to see the packages.json in a browser.
17:47:26PMunchOkay, you could just download it manually
17:48:22FromDiscord<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:25FromDiscord<robohack> Thnaks
17:48:40FromDiscord<robohack> Thanks
17:49:30PMunchIt could be that visiting the site in a browser whitelisted it
17:49:42lqdev[m]PMunch, shashlick: you sure about that? Wren doesn't use threads.
17:49:48FromDiscord<robohack> True. Thanks for your help
18:00:28*drewr quit (Quit: ERC (IRC client for Emacs 26.3))
18:02:29lqdev[m]oh god, I'm an idiot
18:02:49PMunchHaha, what did you do?
18:02:57lqdev[m]`Wren` is a ref object, which I pass to wrenSetUserData using `cast[pointer](wren)`
18:03:18PMunchHaha
18:03:37lqdev[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:51lqdev[m]it ends up a ref ref object
18:03:55lqdev[m]lol
18:04:29PMunchYeah, casting back and forth is always a peril..
18:04:39lqdev[m]now it works fine and throws a proper exception
18:05:04lqdev[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:00FromGitter<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:52FromGitter<brentp> lqdev, are you writing a wren wrapper?
18:26:16disruptekgraham chapman would have a field day with this one.
18:26:20FromGitter<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:17clyybberAraq: Btw, do you want this to stay: "The discriminator variable must be a const" ?
18:42:26*xet7 joined #nim
18:43:22Araqwe weakened it a bit via range types iirc
18:43:57Araqif the value is of a range type that covers one object branch and only one, it should compile
18:44:42clyybberAraq: 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:58clyybberBut with my current approach we can also remove that restriction altogether
18:48:30*LargeEpsilon joined #nim
18:50:43lqdev[m]@brentp yes
18:51:00lqdev[m]I aim for an API similar to what nimLUA provides
18:51:03lqdev[m]but for wren, of course
18:53:21*LargeEpsilon quit (Ping timeout: 268 seconds)
18:53:38*Jesin quit (Quit: Leaving)
18:54:39FromGitter<brentp> nice
18:58:29shashlick@lqdev why Wren?
18:59:11lqdev[m]shashlick: because I don't want to wait until I finish rod and I need a scripting API
18:59:46lqdev[m]and I don't really like Lua's object model. I need a good one since I'm developing a game
19:00:18clyybberHuh, I mean wren looks interesting, but whats wrong about Lua's object model?
19:00:31shashlickAfter the boehm nightmare, the plugin system in feud is back up and running
19:00:44clyybberIts a perfect fit for gamedev IMO, since you often don't want inheritance, but components
19:00:53clyybbercomposition..
19:02:34disruptekthis.
19:03:06shashlickOf course you want a scripting env, I think @zacharycarter worked a bit on nimscript as well
19:04:13disruptekclyybber: fixed the discriminator-must-be-const would be huge.
19:06:52lqdev[m]clyybber: Wren is faster.
19:06:56shashlickDo games need to reload scripts all the time
19:07:11shashlickOr is it more about ease of use
19:07:31lqdev[m]more about the ease of use
19:08:08clyybberlqdev[m]: Faster than luajit? I kinda doubt that
19:08:20lqdev[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:23shashlickThen why not compile dlls and load them
19:08:32lqdev[m]I just don't find Lua particularly fitting for game dev.
19:08:37clyybberlqdev[m]: What string manipulation?
19:08:47lqdev[m]shashlick: cross-platform support is a chore
19:08:59lqdev[m]how do you get mod developers to compile to all platforms?
19:09:10lqdev[m]clyybber: hashing a string is slower than simply indexing an array
19:09:16shashlickYou ship Nim and tcc
19:09:28lqdev[m]see http://wren.io/performance.html for some details
19:09:33clyybberlqdev[m]: Luajit optimizes that :p
19:10:02clyybberBut I guess luajit is cheating, because mike pall is clearly an alien.
19:10:13FromDiscord<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:30lqdev[m]clyybber: I don't care, I just prefer Wren over Lua. its language features are better imo
19:10:48lqdev[m]the syntax is more clear to me
19:10:51lqdev[m]it isn't so inconsistent
19:11:11lqdev[m]also what @exelotl said
19:13:22clyybberlqdev[m]: Yeah, wren is cool, but I don't see how luas syntax is inconsistent.
19:13:44lqdev[m]clyybber: `for ... do` vs `if ... then`
19:13:48lqdev[m]that's what pisses me off
19:13:53clyybberUse what you like better of course, btw what game are you using it for?
19:14:01lqdev[m]it's annoying
19:14:07clyybberlqdev[m]: Ah ok.
19:14:17lqdev[m]clyybber: https://github.com/liquid600pgm/planet-overgamma
19:15:04clyybberAh, I've stumbled upon that quite some time ago.
19:15:10clyybberDo you have screenshots?
19:15:12clyybberbrb
19:17:38*Jesin joined #nim
19:18:59Zevvhttp://zevv.nl/div/overgamma.png
19:19:25lqdev[m]https://i.imgur.com/VFddjQ3.png
19:19:27shashlick@lqdev so no dlls? Feud's plugin system is cross platform
19:19:39lqdev[m]shashlick: how so?
19:19:56lqdev[m]linux and windows use different formats (.so and .dll)
19:21:21lqdev[m]am I not aware of something?
19:21:31disruptekyes.
19:21:36shashlickIt's all abstracted away
19:22:33shashlickNimterop does this for you already
19:22:43shashlickThat's what cPlugin is
19:23:52lqdev[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:08clyybberlqdev[m]: Nice, that blur looks slick
19:24:49clyybberlqdev[m]: They run nim --os:linux?
19:25:20shashlickNo, they ship a Nim file
19:25:22lqdev[m]clyybber: if only it were that simple
19:25:30shashlickYour app simply compiles it behind the scenes
19:25:33lqdev[m]nimterop doesn't support cross-compilation because of Nim limitations
19:25:59lqdev[m]too complex.
19:26:05Araqguys, you need to watch this: https://www.youtube.com/watch?v=r-TLSBdHe1A&t=20s
19:26:08lqdev[m]I want something simple
19:26:18disruptekthe problem you're trying to solve her is x-platform mod distribution?
19:26:27shashlickSee the feud search plugin https://github.com/genotrance/feud/blob/master/plugins/server/search.nim
19:26:28lqdev[m]yes
19:26:47disruptekhow many freakin' times do we have to watch this damned thing.
19:26:54disruptekcoz. it's a thing. okay, let's move on.
19:27:19disruptekback to dist. what about making it more general, like gentoo overlays?
19:27:21clyybberIts a very cool thing tho
19:27:43rayman22201lol. I saw the video before it was cool. I claim hipster rights for being the first to post it :-P
19:27:43shashlick@lqdev - whatever you write in cPlugin is and can be cross platform and gets compiled at the target
19:27:54disruptekso 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:38Araqsorry, I wasn't aware I'm last :P
19:28:48disruptekyes, 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:09disrupteksorry, it's just that i've seen 4 different versions of this talk now it's it's getting grating.
19:29:25clyybberSpeaking of that: https://github.com/mratsim/weave/blob/master/e04_channel_based_work_stealing/primitives/coz.h
19:29:45disruptekyes, but it's a talk we need, not a header.
19:29:47clyybbers/.h/.nim
19:30:04disruptekyes, but it's a talk we need, not a source file.
19:30:15clyybberdisruptek: no. we need a compiler to compile talks, not files dummy..
19:30:45disrupteki mean, until it moves into use, it's just "cool."
19:30:56clyybberuse it
19:31:06clyybberthen you are "cool" :p
19:31:29disruptekmratsim is, and despite golden, i know nothing about this stuff. it's his use that i want to hear about.
19:32:54rayman22201it 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:00rayman22201mratsim and some status people use hellgrind and a few other of the grind suite very successfully with Nim.
19:34:06rayman22201all good stuff
19:34:44disruptekwell, that's the talk/blog i wanna read. the one that would be most useful to us.
19:34:51rayman22201agreed
19:35:22rayman22201I only know about it because I have lurked through some of the status github PR's
19:35:37disruptekisn'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:37disrupteklooks like, end of 2014.
19:37:19disruptekah, the SOSP talk is from 2015.
19:40:38rayman22201Berger 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:01rayman22201That's a big stamp of approval / stability I suppose.
19:41:25clyybberthat dudes working on a lot of cool stuff
19:41:54disrupteki 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:13clyybberHow can it "not" work? It's pretty simple.
19:42:56disruptekbecause, as araq has pointed out in one of my favorite quotes, "features start off in the unfortunately state of unimplemented."
19:43:44disruptekthere are 432 commits to coz. that's more than bump.
19:44:04rayman22201you don't consider optimizing Sqlite and memcached practical examples?
19:44:29clyybberclyybber: buildfixes and other environment shenanigans
19:44:47disrupteki do, but i guess you're satisfied with those and i want more.
19:45:40rayman22201lol. so greedy :-P
19:45:43clyybbermore of what? Just use it. Also it makes sense right? I consider it to be proven to work.
19:46:05disruptekyes, it makes sense. we used to do stuff like this by hand back in the day.
19:46:13rayman22201https://media.giphy.com/media/D3OdaKTGlpTBC/giphy.gif
19:46:29disruptekwhat can i say? i'm a greedy pita. this is hardly news if you spend much time on #nim.
19:46:47clyybberjust add '?'
19:46:51clyybberdisruptek?
19:46:53clyybberdone.
19:47:25clyybbery'all need to learn disruptex
19:47:35*solitudesf joined #nim
19:48:21disruptekyou mean disruptex, the layout engine?
19:48:32clyybberwait. thats a thing?
19:48:50Zevvit is now
19:48:53Zevvjust wait for it
19:49:14clyybberhttp://disruptex.com/
19:49:16clyybberlol
19:49:17disruptekthe only word i know of coined by others wrt disruptek is disrupchek.
19:49:33disruptekomg disruptex.com
19:49:54Zevvbetter then http://disruptic.com/
19:50:46rayman22201btw @dom96, this is why channels are more important the FlowVars: https://github.com/mratsim/weave/tree/master/e04_channel_based_work_stealing
19:50:51disruptekssl protocol error. boo hiss
19:51:08clyybberZevv: HOW?
19:51:20clyybberis this some of your clients servers?
19:51:46Zevvhow what?
19:52:46clyybberthat site. it just contains some text
19:53:03Zevvwell, it's just some misconfigured server
19:53:10Zevvjust like 37% of the internet
19:53:15clyybberfrom an error message I presume
19:53:17disrupteki 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:44Zevvwhat's this "coz" I keep hearing about then?
19:53:51disruptekyes, but is it disruptext?
19:54:26clyybberdisrupt kek spits out cooler results
19:54:40stefantalpalaruhttps://github.com/plasma-umass/coz
19:54:42disruptekwow memes, i'd guess.
19:55:24Zevvaah the profiling - I assume someting nifty is going on there, but I didn't look into that yet
19:57:30lqdev[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:36Zevvdude
19:58:49Zevvwhere do you think you're going with that
19:59:20ZevvI can't properly pass and handle a single typedesc, and you're macroing them by the dozen
19:59:25disrupteki'm trying to figure out what it could possibly mean.
20:00:14clyybberlqdev[m]: What for?
20:00:37disruptekthere 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:54lqdev[m]I want to check if all params passed from Wren to Nim have the right type
20:01:08lqdev[m]otoh I can get away with a simpler solution
20:01:20disruptekoh, good.
20:01:26lqdev[m]so nevermind
20:02:46lqdev[m]I'm overcomplicating things as I always do, lol.
20:02:54clyybberlqdev[m]: Umm
20:03:06clyybberI thought you wanted to use it as a scripting language
20:03:28disruptekit's a good thing i'm so stupid or i'd doubtless write overly complex nim.
20:03:33lqdev[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:59FromDiscord<kodkuce> Araq: really nice video and tool
20:04:08disrupteki see my six character crash bug is fixed. can you imagine if i had a few more bytes to work with?
20:06:07planetis[m]mratsim: with what flags you compile your benchmark?
20:12:08stefantalpalaruI 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:40disruptekand this is the problem golden solves.
20:13:20disruptekwell, s/solves/will solve/
20:15:40stefantalpalaruSo 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:43clyybberreturn return
20:16:35stefantalpalaruThat 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:53disruptekno, 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:07stefantalpalaruThere is no sampling.
20:17:32stefantalpalaruThere are two averages and a difference between them that you want to know if it's significant.
20:17:59stefantalpalaruBy the way, after all that talk about eyeball statistics, he forgets that the 5% treshold for p is completely made up.
20:18:44disruptekaverages aren't sampling. i thought you were talking about golden but i see that you're not.
20:18:57stefantalpalaruI?m talking about Araq's video link.
20:19:05disruptekyes, that is clear.
20:19:17federico3stefantalpalaru: what are you implying with "made up"?
20:19:38stefantalpalaruAnd the significance of classic statistical tools to benchmarking data.
20:20:45stefantalpalaruIt'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:58stefantalpalaruAnd it's up to you to decide how much is too much.
20:21:06*Vladar joined #nim
20:21:09shashlick@lqdev - what's the reason to use incompleteStruct - how do i know when to add that pragma
20:21:45stefantalpalaruPeople 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:54federico3stefantalpalaru: you mean its "arbitrary", and that is ok. "completely made up" sounds like it's not meaningful
20:22:05lqdev[m]shashlick: you need it when you .importc a struct that doesn't have a declaration, otherwise it leads to codegen bugs
20:23:11stefantalpalaruSo back to benchmarking. In what scenario your 30 measurements don't represent the total number of possible measurements on that machine?
20:23:58stefantalpalaruA misconfigured testing environment that sometimes runs cron jobs?
20:24:15stefantalpalaruWe consider benchmarks on such systems invalid.
20:24:41disruptekthe 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:50shashlickwhat does that mean - doesn't have a declaration? then cImport doesn't see it
20:25:17federico3stefantalpalaru: 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:06disruptekto 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:39stefantalpalaruBut 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:14disrupteki guess i don't see how we don't have random samples.
20:29:03lqdev[m]shashlick: it *does* have a declaration, `typedef struct some_incomplete_struct some_incomplete_struct_t;`
20:29:10stefantalpalaruSay 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:11lqdev[m]but it doesn't have the implementation
20:29:17lqdev[m]with the fields
20:29:35*rockcavera joined #nim
20:29:56disruptekno, but that's not how golden delivers truth.
20:30:31disruptekmy idea is to measure 1,000 sticks and identify when the smallest measurement may have deviated significantly.
20:30:48disruptekpick any 200 measurements.
20:31:02federico3disruptek: FYI the "coz" tool is packaged as coz-profiler on Ubuntu & co in case you want to use it on travis
20:31:31disrupteki 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:45stefantalpalaruIf 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:11disruptekyeah, i concede that my data may be unusable for you, but i think it'll be useful for me.
20:33:27federico3the whole point is to measure the variance
20:33:53Araqthat's why spectre is totally not a thing, because you can never eliminate the noise
20:33:59disruptekthe fact is, the kinds of macroscopic questions we need answers to don't demand the rigour of these highly controlled tests.
20:33:59Araqer ... hmmm
20:34:28shashlick@lqdev - basically https://github.com/nimterop/nimterop/blob/master/nimterop/grammar.nim#L219
20:35:13disruptekanyway, 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:15lqdev[m]shashlick: yes, but it must have the {.incompleteStruct.} pragma
20:38:21shashlickyep
20:40:36shashlickis it applicable in every case?
20:40:52shashlicktypedef struct a a; => type a = object
20:44:20Araqif there is no typedef struct {} a; then it's required
20:46:02disruptekis there any way to predict that code that works with `nim c` will fail with `nim doc`?
20:47:44shashlickcool
20:50:49stefantalpalaruThis is what we need for benchmarking, instead of hypothesis testing: https://en.wikipedia.org/wiki/Experimental_uncertainty_analysis
20:51:00lqdev[m]is `macros.getImpl` used to eg. get the declaration of a proc or object?
20:51:22shashlick@Araq - will https://github.com/plasma-umass/coz work on nim?
20:51:36federico3shashlick: why not?
20:52:00disruptekstefantalpalaru: lgtm
20:52:14Araqyeah right, because testing for statistical significance is a hoax
20:52:56stefantalpalaruNo, it's not applicable for experimental results that don't involve random samples from a population with a normal distribution.
20:53:02disrupteki don't think that's the claim that's being disputed.
20:55:02Araqiirc he did argue for having a normal distribution
20:56:05stefantalpalaruWhat 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:54stefantalpalaruBut if the difference is bigger than the error margins, we know it's real.
20:57:02lqdev[m]how can I get the declaration of a proc in a macro using just the proc's name?
20:57:22stefantalpalaruIgnore that normal distribution he introduces by continuously randomizing memory layouts.
20:57:46disruptekthat's fine, but it doesn't make a lot of sense to debate the coz results.
20:57:47lqdev[m]getImpl gives me a 'not a symbol' error during compilation.
20:57:57Araqwell it's good that you know better than Mr Berger.
20:57:58stefantalpalaruYou're not measuring the effects of that randomization.
20:58:17stefantalpalaruAh, the appeal to authority :-)
20:58:47Araqin this case it works :P
20:58:58stefantalpalaruDoes it, though?
21:00:18clyybberstefantalpalaru: 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:31stefantalpalaruSure. The tool's utility has nothing to do with comparing benchmarks.
21:02:16lqdev[m]anyone can help me?
21:04:10Araqlqdev[m]: getImpl does it but you need to bindSym the proc
21:05:17lqdev[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:38Araqstefantalpalaru: 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:13FromGitter<Vindaar> @lqdev[m]: https://play.nim-lang.org/#ix=1ZKI
21:06:24Araqand you cannot eliminate this noise by switching off your network layer
21:06:28stefantalpalaruAnd it's orthogonal to what I'm discussing, Araq.
21:07:37Araqok, cause it seemed to me that you're happy to deny this.
21:07:39stefantalpalaruHis randomization eliminates changes not due to algorithmic changes, while I'm interested in the best way to compare software benchmarks.
21:08:20lqdev[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:42stefantalpalaruMy claim is that benchmark results are measurements with an error margin, not random samples from a normal distribution.
21:09:00FromGitter<Vindaar> lqdev[m]: I'd guess it'd depend depend on the `NimNode`. Do you have an example?
21:10:16lqdev[m]@Vindaar https://play.nim-lang.org/#ix=1ZKL
21:13:04disrupteki really don't have a problem with that assertion.
21:15:02FromGitter<Vindaar> hm, that stomps me too
21:15:20stefantalpalaruHe 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:59lqdev[m]Araq: maybe you can help?
21:16:01stefantalpalaruBut that's only for his particular case, not comparing benchmark results in general.
21:16:26disruptekiirc he just randomized the memory and didn't change the algo. is that wrong?
21:16:50stefantalpalaruHe does both.
21:17:30stefantalpalaruAnd then he tries to find out if the algorithmic change produces a significant change in the runtime.
21:17:37disruptekthat just doesn't intuitively make sense to me.
21:18:29stefantalpalaruHave you seen the video? He found out that memory layout changes can have very large effects on runtime, up to 40%.
21:18:49stefantalpalaruSo much larger than what he is trying to measure after changing some algorithm.
21:19:00disruptekyes, i just didn't remember the details of his test methodology. maybe i need watch it a 5th time.
21:19:40Araqlqdev[m]: that's simply not supported
21:19:51*Hideki_ joined #nim
21:20:36lqdev[m]dang. how can I get the parameters of some external proc, then?
21:20:38Araqhttps://play.nim-lang.org/#ix=1ZKN you must use something like this
21:20:59lqdev[m]oh, typed
21:21:21FromGitter<Vindaar> huh, I thought I tried using a typed macro. Now I'm confused
21:22:00FromGitter<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:44Araqthere is no 'bindSym' in my snippet.
21:28:06FromGitter<Vindaar> ups, see. Wasn't even paying attention :P
21:28:44FromGitter<Vindaar> but then how does one use `bindSym` with a `NimNode` arg?
21:29:01Araqyou don't, bindSym is for string literals only
21:29:30FromGitter<Vindaar> then the proc should be changed to reflect that ;)
21:31:01Araqyou can also read its documentation instead
21:31:19Araqit supports NimNode for {.experimental: "dynamicBindSym".} (don't use this)
21:32:42FromGitter<Vindaar> Ugh, sorry. I need sleep :)
21:33:29disruptekrange is the only way to build a variant object without a constant, right?
21:33:44AraqI think so, disruptek
21:34:45disruptekwhat if we had `case kind: ... in {One}: in {Two, Four} ... in {One, Three, Five}:
21:40:40Araqoh I think we support that one too
21:41:33disruptekyou 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:15Araqwell sure, your syntax for 'case' is wrong
21:44:00disrupteki mean wrt the rfc about expanding case statements to support multiple matching clauses.
21:44:15*jjido joined #nim
21:44:44disrupteki just think `in` reads better for range/set.
21:46:15disruptekit 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:03Araqtoo little improvement, many will simply say "huh? 'in' instead of 'of'? confusing"
21:50:26Araqwell I would and I don't even like the word
21:50:50Araq(word == "confusing")
21:52:52FromDiscord<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:37FromDiscord<treeform> Willyboard, sorry I don't know much about nimWebTemplates.
21:55:40disrupteki 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:04Araqtreeform: any news about your UI toolkit? I'm a big fan
22:05:30FromDiscord<treeform> I am using it in production, but only the JS/HTML backend. So I used it as a web framework.
22:05:52FromDiscord<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:18FromDiscord<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:42Araqgah. do you need async?
22:08:02FromDiscord<treeform> I do not. I don't use that on iOS or Android.
22:08:11FromDiscord<treeform> I don't use that in JS mode b/c I think its not supported.
22:09:31dom96GC issues without async? What has the world come to?
22:10:00FromDiscord<treeform> It looks like it was freeing objects that where still being pointed too.
22:11:19FromDiscord<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:54FromDiscord<treeform> The whole idea behind fidget is that you get real UI/UX designers draw the UI, export it to nim.
22:13:50FromDiscord<treeform> You would take a UI file that looks like this:
22:13:51FromDiscord<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:56FromDiscord<treeform> and export it to nim code
22:14:14FromDiscord<treeform> where you add the meat - the code onto the bones.
22:14:59Araqso ... if --newruntime works with everything except async, maybe it's time to speed up its development
22:15:29Araqsomebody will write an async that works with it
22:16:06FromDiscord<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:19Araqoh my
22:16:36Araqat least try --gc:boehm
22:16:53FromDiscord<treeform> haha, good luck linking that in 🙂
22:17:03FromDiscord<treeform> linking is such a pain in the mobile world.
22:17:26FromDiscord<treeform> Does boehm even support iOS or Android?
22:17:45Araqit's a DLL / shared lib
22:17:45FromDiscord<treeform> Everything on mobile must be statically linked.
22:18:01FromDiscord<treeform> Yeah dynamic linking is basically not supported.
22:18:02Araqnever tried to link it statically, but I would give it a try
22:18:25FromDiscord<treeform> If nim's normal GC does not work, why would boehm?
22:20:52FromDiscord<treeform> I think one needs to get to the root of why it did not work.
22:21:17AraqI think it's the stack root detection logic
22:21:36Araqboehm does it differently, but sure, we can also try to fix for Nim's native GCs
22:25:07FromDiscord<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:13FromDiscord<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:00FromDiscord<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:36clyybberAraq: Whats the first child of nkObjConstr?
22:44:10disruptekson of nkObjConstr, first of his name
22:44:28clyybberthank you disruptek, very cool
22:44:38Araqclyybber, the object type
22:44:54clyybberThanks
22:45:43disruptekbtw, american gods is an excellent adaptation of the book.
22:45:59clyybberAraq: How would I convert a PType to a type node?
22:46:18Araqvia nkType
22:46:23disrupteksealmove won't like it, but it's beautifully done. fascinating cinematography.
22:46:36clyybberSo just a new empty nkType? With its .typ set to the PType?
22:46:37dom96treeform: I guess your game needs a lot of UI?
22:46:48Araqclyybber, exactly
22:46:53clyybberCool, thanks
22:47:03dom96I 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:56clyybberAraq: Can I remove PTransNode?
23:04:01clyybberIts really annoying
23:04:19clyybberOr does it serve a higher purpose I am not aware of?
23:04:28*mahlon joined #nim
23:04:44disruptekshashlick: did you ever figure out how to attempt an import?
23:08:06Araqclyybber, kill it
23:08:18Araqit was an attempt to ensure statically that we traverse every node
23:08:34Araqit never brought up any bug, it's noise
23:08:50clyybberYeah
23:09:04Araqthank you for noticing, it's so old that I never considered it
23:10:45clyybberNp
23:11:23FromDiscord<treeform> dom96, yes UI is everywhere.
23:19:27*krux02_ joined #nim
23:21:58*krux02 quit (Ping timeout: 245 seconds)
23:23:28mahlonHello! 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:29disruptekregisterProcess returns a handle that you can use to unregister it. it's just {.discardable.}.
23:25:23mahlonah!!
23:25:54disruptekhere's a successful example: https://github.com/disruptek/golden/blob/master/src/golden/invoke.nim
23:27:07mahlonThat's super helpful. Thank you.
23:27:15disrupteknp, have fun.
23:27:16mahlonHeh, and just seeing #12354 now.
23:28:10disruptekyes, 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:50shashlick@disruptek - import of what?
23:47:52shashlickdon'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:06shashlick@lqdev - i've added incompleteStruct to latest nimterop#head, please verify