00:03:07 | giaco | I see that I landed into an hot topic. Awaiting a FlowVar seems something on the todo list https://forum.nim-lang.org/t/4952 |
00:03:42 | leorize | why I hate asyncdispatch: "Error: can raise an unlisted exception: Exception" |
00:04:01 | leorize | if you are writing an async function you can say goodbye to `{.raises.}` |
00:05:18 | leorize | ah, not that {.raises.} even do anything for those... |
00:08:59 | saem | For me if nimble didn't muddy up bins, library code, and whatever artifacts, and instead scoped the requires and various declarations associated to them it'd be a big step in the right direction. |
00:09:22 | leorize | scoping requires compiler support |
00:09:27 | leorize | a lot of it, actually |
00:09:27 | giaco | actually more than on a to-do list, but don't really get if it is available ot not https://github.com/nim-lang/Nim/pull/11724/files |
00:09:27 | disbot | ➥ Make Flowvar compatible with Async |
00:10:51 | saem | leorize: that should be doable with a config file though, right? |
00:10:52 | leorize | ideally I would want nimble to be a tool to just download things that the compiler told it to, and we do all dependancy resolving in the compiler itself |
00:11:57 | leorize | you can scope it for the current project, but not projects that you depend on |
00:12:10 | leorize | nimble localdeps mode already do this |
00:12:47 | * | adnan338 joined #nim |
00:12:54 | adnan338 | hi need help with htmlgen |
00:12:56 | adnan338 | https://play.nim-lang.org/#ix=2Lu9 |
00:13:24 | adnan338 | The error message says something about me using '&' but I'm not |
00:13:57 | FromDiscord | <ElegantBeef> Spot the ex-python user 😄 |
00:14:42 | saem | Hmm, so you think it wouldn't be possible to have nimble output a big cfg that has explicit paths for everything? |
00:15:14 | FromDiscord | <ElegantBeef> It uses `&` internally |
00:15:16 | adnan338 | nvm fixed it |
00:15:20 | FromDiscord | <ElegantBeef> So yea "you" are |
00:15:28 | FromDiscord | <ElegantBeef> what'd you do? |
00:15:36 | FromDiscord | <ElegantBeef> Didnt get to actually diagnose the problem 😄 |
00:15:53 | adnan338 | The 7 was an int literal, but I needed to put "7" as a string literal |
00:17:03 | * | hnOsmium0001 joined #nim |
00:19:03 | * | leorize quit (Ping timeout: 240 seconds) |
00:20:17 | * | leorize joined #nim |
00:22:19 | giaco | if pull requests appear as closed and approved, but not merged, what does it mean? How can I try it? https://github.com/nim-lang/Nim/pull/11724 |
00:22:20 | disbot | ➥ Make Flowvar compatible with Async |
00:25:53 | leorize | saem: the compiler doesn't support that :P |
00:26:12 | leorize | support scoping path-per-module is that I meant |
00:28:07 | saem | Ah, I thought you could do it via `--nonimblepath` and then a bunch of explicit `--path`, but yeah, that wouldn't be per module so you couldn't have two versions of the same module as one of them would always win. |
00:31:04 | leorize | as use cases get complicated I think we should just fold the package manager into the compiler itself, similar to go |
00:31:51 | leorize | if we are wary of external deps like openssl, make nimble a downloader |
00:32:05 | leorize | then the compiler would never access the internet |
00:32:59 | leorize | having an idea is one thing, writing the rfc to get this accepted is the time-consuming part :P |
00:33:17 | saem | yeah... |
00:33:27 | saem | I'm falling over tired just thinking about it. |
00:34:36 | * | tane quit (Quit: Leaving) |
00:35:22 | saem | now to see if I can fix this one: https://github.com/nim-lang/nimsuggest/issues/110 |
00:35:27 | disbot | ➥ Crashes when highlighting system.nim if nimsuggest is compiled with -d:release ; snippet at 12https://play.nim-lang.org/#ix=2Luf |
00:36:40 | ForumUpdaterBot | New thread by Alexeypetrushin: How to pass around large immutable data? Copy-on-Write?, see https://forum.nim-lang.org/t/7364 |
00:42:40 | saem | OK, well the cause is easy enough, it's reprocessing the magic types, since it's already defined, it gets sad. |
00:44:44 | adnan338 | strformat is giving me an issue |
00:44:46 | adnan338 | echo fmt"Test: {(if 1 == 1: "hello"; else: "world")}" |
00:44:59 | adnan338 | says it's not being successfully parsed |
00:45:30 | disruptek | leorize: you don't think nimph is a good package manager? 😦 |
00:46:19 | disruptek | dist solves some problems that a good package manager doesn't; at least, problems that araq has. |
00:49:53 | saem | why do you exist assert? |
00:49:56 | * | krux02 quit (Remote host closed the connection) |
00:49:56 | * | saem shakes fist |
01:07:00 | adnan338 | pardon me if I'm missing something but cmp is not defined for times.DateTime? |
01:07:45 | FromDiscord | <shadow.> is there a way to list files / folders in a dir with glob patterns? |
01:16:35 | * | hmmm quit (Quit: WeeChat 3.0) |
01:18:16 | FromDiscord | <shadow.> !repo glob |
01:18:17 | disbot | https://github.com/citycide/glob -- 9glob: 11Pure Nim library for matching file paths against Unix style glob patterns. 15 34⭐ 4🍴 7& 2 more... |
01:18:19 | FromDiscord | <shadow.> fair enough. |
01:18:32 | FromDiscord | <Avatarfighter> there truly is a library for anything |
01:36:57 | FromDiscord | <shadow.> can i list all files in a directory and its subdirectories (recursively infinite)? |
01:36:59 | FromDiscord | <shadow.> iterate |
01:37:09 | FromDiscord | <shadow.> walkDirRec |
01:37:10 | FromDiscord | <shadow.> yooo |
01:39:10 | * | jmiven quit (Quit: reboot) |
01:40:04 | * | jmiven joined #nim |
01:40:37 | * | grfork joined #nim |
01:42:25 | * | filcuc_ joined #nim |
01:42:40 | * | filcuc quit (Ping timeout: 265 seconds) |
01:43:32 | * | greenfork quit (Ping timeout: 272 seconds) |
01:45:25 | lain | interfacing with C, have unchecked array and length, what's the "best" way to turn that into a seq? I assume have to copy because seq is GC'd? |
02:08:11 | FromDiscord | <Avatarfighter> by copying, yeah |
02:09:06 | lain | just a for loop I guess? or is there some cute shortcut? |
02:09:29 | FromDiscord | <Avatarfighter> for loop im afraid |
02:09:36 | FromDiscord | <Avatarfighter> newSeqofLen() |
02:09:40 | FromDiscord | <Avatarfighter> i think that's the method |
02:09:41 | disruptek | create a seq of the size you want and then copy to addr x[0]. |
02:09:51 | FromDiscord | <Avatarfighter> ^ |
02:10:52 | lain | awesome, thanks! :3 |
02:10:59 | FromDiscord | <exelotl> presumably you use copyMem for the approach that disruptek mentioned |
02:11:05 | disruptek | yes. |
02:11:19 | FromDiscord | <exelotl> I think it's just newSeq, not newSeqOfLen |
02:11:42 | * | adnan338 quit (Remote host closed the connection) |
02:11:55 | * | adnan338 joined #nim |
02:12:21 | FromDiscord | <shadow.> yep |
02:12:32 | FromDiscord | <shadow.> (edit) "yep ... " added "^" |
02:12:44 | disruptek | you'll want to give it a size because it needs to know that it's of len X. |
02:22:28 | FromDiscord | <Anonymous Poet> is there a way to prevent the compiler from applying a `converter`? |
02:23:18 | FromDiscord | <Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2LuP |
02:23:36 | FromDiscord | <Anonymous Poet> but it gets resolved as a string, rather than an `HttpHeaderValues`, which is defined as `HttpHeaderValues = distinct seq[string]` |
02:25:20 | FromDiscord | <Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2LuR |
02:27:18 | leorize | don't write them, they're evil :P |
02:27:54 | FromDiscord | <Anonymous Poet> ok, but assuming the well-meaning people that have already written the stdlib arent wrong, what do i do? :/ |
02:28:14 | disruptek | never make that assumption; i know these people. |
02:28:18 | FromDiscord | <Anonymous Poet> haha |
02:28:51 | FromDiscord | <Anonymous Poet> well, heres the pr im working on: https://github.com/nim-lang/Nim/pull/16636 |
02:28:51 | disbot | ➥ Add support for Transfer-Encoding: chunked |
02:29:00 | disruptek | see, you're one of them. |
02:29:01 | FromDiscord | <Anonymous Poet> im open to other suggestions on how to make the change |
02:29:04 | disruptek | a bunch of chuckleheads. |
02:29:10 | leorize | in that case just force the type by doing normal conversions |
02:29:10 | FromDiscord | <Anonymous Poet> i just want dom to approve it 😦 |
02:29:28 | disruptek | i don't think dom has ever approved one of my PRs. |
02:29:45 | FromDiscord | <Anonymous Poet> oh 😭 |
02:30:09 | leorize | waiting for dom to approve PRs is the same as never having them merged :P |
02:30:32 | FromDiscord | <Anonymous Poet> i mean, araq gave me a rocket ship emoji, that has to count for something, right? |
02:31:04 | leorize | I'm still waiting for dom to review #14556 |
02:31:05 | disbot | https://github.com/nim-lang/Nim/pull/14556 -- 3net, openssl: support setting the minimum supported SSL/TLS version |
02:31:38 | FromDiscord | <Anonymous Poet> can you ping him? maybe ive just been really lucky getting views ... |
02:31:53 | disruptek | dom96: your fans await. |
02:32:00 | leorize | I don't just ping him on github |
02:32:06 | leorize | I nagged him several times here too |
02:32:41 | FromDiscord | <Anonymous Poet> `let values: seq[string] = cast[seq[string]](request.headers[transferEncoding])` eww :/ |
02:32:51 | FromDiscord | <Anonymous Poet> haha |
02:33:22 | leorize | normal conversions exist |
02:33:47 | FromDiscord | <Anonymous Poet> but its a distinct type ... am i wrong in that its whole purpose is to be a pain to do what im trying to do? |
02:34:04 | disruptek | that depends. |
02:34:09 | disruptek | are you trying to do something stupid? |
02:34:18 | leorize | normal explicit conversions can be used to convert between distinct types |
02:34:28 | leorize | it's used a lot in implementations of things |
02:34:29 | FromDiscord | <Anonymous Poet> i might be, im not smart enough to know :/ |
02:35:14 | FromDiscord | <Anonymous Poet> how bad does `for encoding in cast[seq[string]](request.headers[transferEncoding]):` look? |
02:35:25 | disruptek | pretty bad. |
02:35:48 | FromDiscord | <Anonymous Poet> agreed, but ... do you have any suggestions? |
02:35:57 | disruptek | yes, remove the cast. |
02:36:23 | FromDiscord | <Anonymous Poet> but ... `func [](headers: HttpHeaders, key: string): HttpHeaderValues` and `HttpHeaderValues = distinct seq[string]` |
02:36:39 | disruptek | so what? |
02:36:45 | FromDiscord | <Anonymous Poet> it doesnt compile without it |
02:36:56 | disruptek | have you read the manual? |
02:36:58 | disruptek | ~manual |
02:36:58 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek |
02:36:59 | disbot | manual: 11just good to Ctrl+F in cases like this |
02:37:02 | FromDiscord | <Anonymous Poet> because `converter toString(values: HttpHeaderValues): string` |
02:37:23 | FromDiscord | <Anonymous Poet> what am i looking for in the manual |
02:37:34 | disruptek | the sections on `distinct` and `borrow`. |
02:38:02 | disruptek | i would encourage you to read the entire manual. |
02:38:12 | leorize | Is the converter exported? If not I would get rid of it or turn it into a proc |
02:38:34 | FromDiscord | <Anonymous Poet> it sadly is |
02:38:48 | disruptek | like i said: chuckleheads. |
02:39:11 | FromDiscord | <Anonymous Poet> i read the manual and i understand that i can get rid of the cast though |
02:39:14 | FromDiscord | <Anonymous Poet> so thats a win |
02:39:51 | FromDiscord | <Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2LuU |
02:40:58 | FromDiscord | <martinium> is func an alias for proc? or |
02:41:13 | FromDiscord | <ElegantBeef> proc with `{.noSideEffect.}` |
02:41:14 | disruptek | it's an alias for a proc with .noSideEffects. |
02:44:45 | FromDiscord | <Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2LuV |
02:49:52 | leorize | I'd say that converter is dumb |
02:50:21 | leorize | maybe you can PR one in the future getting rid of it |
03:00:18 | FromDiscord | <Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2Lv0 |
03:00:53 | FromDiscord | <Anonymous Poet> maybe make an overload that returns a single string? but it seems counter intuitive to me to return only the first string in any case ... either return all of the strings but joined with spaces or something, or return a list |
03:03:11 | FromDiscord | <Anonymous Poet> but while we're on this topic, when are converters good style (if ever?) |
03:03:58 | disruptek | grandfathering types, boxing, and one other that i can never remember. |
03:04:26 | disruptek | at least, i have three that i think are okay and i can only ever remember two. 😁 |
03:04:50 | disruptek | FFI maybe. |
03:12:49 | * | Jesin quit (Ping timeout: 264 seconds) |
03:17:08 | * | vicfred quit (Quit: Leaving) |
03:22:34 | * | lritter quit (Ping timeout: 256 seconds) |
03:22:56 | * | lritter joined #nim |
03:34:55 | FromDiscord | <Anonymous Poet> ok, i can kind of see it ... thanks |
03:41:13 | * | Xe is now known as Cadey |
03:51:14 | * | lritter quit (Ping timeout: 265 seconds) |
04:17:12 | * | vicfred joined #nim |
04:22:46 | saem | Converters feel like scala implicit conversions, in which case I would only use them when dealing with code I can't change and I can't get an equivalent effect by slapping a bunch of procs/templates on the type. But even then, I'd prefer doing the conversion with a proc in one or two places. They can be handy during a mechanical refactor. |
04:23:21 | saem | I used a converter when I was first learning nim, it was a bad idea. |
04:25:11 | * | spiderstew joined #nim |
04:26:05 | * | spiderstew_ quit (Ping timeout: 240 seconds) |
04:31:09 | FromDiscord | <shadow.> `let key <- stdin.readLine()` is there an arrow operator in nim system? |
04:31:33 | FromDiscord | <shadow.> i found this in yardanico's manual memory management writeup and im not sure what it is |
04:31:33 | disruptek | you can make your own. |
04:32:01 | FromDiscord | <shadow.> well yeah of course |
04:32:12 | leorize | disruptek: just added rw api for nim-sys, can you review it? https://alaviss.github.io/nim-sys/files.html |
04:32:29 | FromDiscord | <shadow.> i never saw it defined so i assumed it was system |
04:32:35 | disruptek | if you tell me what you don't like about nimph. 😉 |
04:32:44 | FromDiscord | <ElegantBeef> Nope it's not |
04:32:59 | disruptek | Flags that controls file behaviors. Source Edit |
04:33:05 | disruptek | singular `control`. |
04:33:22 | disruptek | either use a period or don't. |
04:34:10 | leorize | disruptek: I sometimes forgot about its existance :P |
04:34:22 | disruptek | i don't believe it. |
04:34:39 | leorize | though I dislike the "bundle-only" approach |
04:34:53 | disruptek | bundle-only? |
04:34:57 | leorize | I like `nimble install` in that it gives you a quick way to prototype |
04:34:59 | FromDiscord | <ElegantBeef> Does `ffAppend` allow reading and writting? |
04:35:13 | disruptek | ah, well dist will give you that. |
04:35:22 | FromDiscord | <ElegantBeef> Or does it require `{ffAppned, ffWrite, ffRead}` |
04:35:45 | disruptek | yeah, we need set constants for these. |
04:36:16 | disruptek | f multiple references to the same file is wanted -> /are/ wanted |
04:36:19 | leorize | ffAppend lets you add more data into the file |
04:36:43 | FromDiscord | <ElegantBeef> Well i know what it says next to it, i was just curious |
04:36:46 | leorize | ffWrite is write-only and no append afaik |
04:36:46 | leorize | gotta look up OS ref manual a bit more |
04:39:39 | disruptek | maybe it would be better to compose these flags with/without truncate so it's more clear. |
04:41:15 | leorize | so ffWriteTruncate? and ffAppend can be standalone or with ffWrite? |
04:41:54 | disruptek | i don't remember what the os provides, but i think we can make the behavior more obvious, right? |
04:42:10 | disruptek | like, Write could be a set of WriteOnly and Truncate. |
04:42:33 | disruptek | i think write is truncate by default but it's been so long since i gave a single fuck. |
04:42:56 | leorize | yea, but people also voiced that it's confusing |
04:43:02 | disruptek | Note: No attempts are made to verify whether the file handle has been opened in asynchronous mode. |
04:43:08 | disruptek | is this really that hard to do better? |
04:43:39 | disruptek | The returned FD will stay alive for the duration of f. |
04:43:47 | disruptek | no idea what this means. "alive"? |
04:43:55 | disruptek | valid, right? |
04:44:06 | leorize | stay open/valid |
04:44:06 | leorize | yea |
04:44:25 | disruptek | pick alive/dead or valid/invalid and use only one set of words. |
04:44:32 | leorize | I can do verification, but that would cost 2-3 syscalls depending on the OS |
04:44:51 | disruptek | you cannot determine this at the open? |
04:44:59 | leorize | also usually when you work with FD you are assumed to already know what you're doing |
04:45:05 | disruptek | maybe you need a converter. 😁 |
04:45:54 | leorize | oh, those functions are low-level stuff, the actual open stuff is implemented elsewhere |
04:45:58 | leorize | I only make one for pipes atm though |
04:46:04 | leorize | file system is a pain so that will come later |
04:46:57 | disruptek | maybe what you really want is a separate type for async fd. |
04:47:11 | * | sixtyten quit (Quit: Leaving) |
04:47:21 | disruptek | then people can use conversion of the distinct. |
04:47:45 | leorize | currently fd has to be split into because of windows |
04:47:48 | leorize | in two* |
04:47:59 | leorize | I don't want to multiply that by two just for async |
04:48:33 | disruptek | hmm. |
04:48:45 | leorize | so currently I just make the tradeoff that: if you are using fd-based interfaces, you probably know what you are doing |
04:49:13 | disruptek | i dunno, i think types are pretty cheap insurance. |
04:49:27 | disruptek | they really work well, y'know? |
04:49:33 | leorize | and I may expect yet another fd split for windows because they can't stand having one close() function |
04:50:23 | disruptek | The IOError thrown will contain the number of bytes read then. |
04:50:28 | disruptek | s/then/thus far/ |
04:50:53 | disruptek | Data will be written into b even when an error occurs. |
04:50:59 | disruptek | /may/ be written |
04:51:31 | disruptek | the function /will return 0/ (what else?) |
04:52:16 | disruptek | The function shall read until b.len bytes has been read or the end-of-file has been reached. |
04:52:31 | disruptek | The function will read until b.len bytes are read or the end-of-file is reached. |
04:53:31 | disruptek | so are we saying that uint8 is wrong? |
04:53:59 | leorize | byte is an alias for uint8 |
04:54:15 | leorize | I just use bytes because it's friendlier |
04:54:24 | FromDiscord | <ElegantBeef> Why are we even saying "The function" 😄 |
04:54:31 | disruptek | i agree, but some people are weird about this. |
04:54:52 | disruptek | i think if you say Returns the number of bytes read from f. |
04:55:03 | disruptek | then you can omit any other reference to the return value. |
04:55:35 | disruptek | i don't understand `takeFD`. |
04:55:51 | disruptek | also not sure about FD as a type. 😁 |
04:56:33 | leorize | takeFD give the ownership back to the caller |
04:56:48 | leorize | as in that `f` destruction afterwards will not cause the returned fd to close |
04:57:05 | leorize | yea I need better wording there |
04:58:01 | leorize | disruptek: FD as a type give me a cheap way to define destructors for them |
04:58:15 | leorize | or do you mean I should return Handle[T] instead? |
04:58:49 | disruptek | no, just that two capital letters look strange in nim. |
04:59:01 | disruptek | the use of fd is correct afaict. |
04:59:27 | disruptek | file.fd isn't exported, right? |
04:59:44 | disruptek | yeah, looks fine. |
05:00:19 | leorize[m] | I thought of calling it "FileHandle", but because Windows doesn't agree on that so I just shorten it :p |
05:00:57 | disruptek | looks good. |
05:01:10 | disruptek | i'm sure others will bikeshed the fuck outta it. |
05:01:34 | disruptek | i probably would try to really nail the flags. |
05:02:30 | leorize[m] | the flags are temporary for now, Windows and POSIX each have a bunch that I need to sort through and figure out a middle ground |
05:03:28 | disruptek | makes sense. |
05:03:57 | leorize[m] | and will your cps let me have openArray as params? I still hate that I have to force string/seq for async procs |
05:04:09 | disruptek | why not? |
05:04:53 | disruptek | you mean a generic? |
05:05:47 | leorize[m] | I just need to be able to use openArray[char or byte] for example |
05:06:10 | disruptek | i don't think it's a problem but i should add a test or two soon. |
05:06:31 | leorize[m] | though I suppose the limitation is rooted in Nim's closure itself |
05:06:59 | leorize[m] | I expect to have to wait until views mature |
05:07:14 | disruptek | we may have a parse bug in the identdefs or something but that should be the only issue. we shouldn't care. |
05:07:53 | leorize[m] | now, how much of concepts can I use before the compiler burst into flames? |
05:08:00 | disruptek | i doubt you will wait long. araq always uses close omission as a primary use-case for destructors. 😁 |
05:09:05 | disruptek | i have a similar thing in frosty; a concept for a container of char-sized types with a len and whatnot. |
05:09:38 | disruptek | setLen is sometimes a thing you need, too. |
05:09:48 | * | Jesin joined #nim |
05:10:33 | leorize[m] | statically sized containers are what my apis target atm |
05:10:51 | leorize[m] | these are low-level and I expect streams to fill in the high-level ones |
05:11:09 | leorize[m] | too bad we don't have one for async |
05:14:35 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
05:14:45 | * | njoseph joined #nim |
05:29:13 | * | keyle joined #nim |
05:30:10 | disruptek | we don't have an asyncstream? |
05:32:13 | FromDiscord | <Avatarfighter> we do |
05:32:13 | FromDiscord | <Avatarfighter> https://nim-lang.org/docs/asyncstreams.html |
05:33:20 | disruptek | i think he's whining that he can't pass a var seq into async or some shit. |
05:33:43 | * | keyle quit (Quit: brb) |
05:33:49 | FromDiscord | <Avatarfighter> oh |
05:33:54 | disruptek | leorize: what do you think about reworking gitnim so that it operates against the nightlies repo instead? |
05:34:02 | * | keyle joined #nim |
05:34:24 | leorize | @Avatarfighter not that asyncstreams, that one is useless |
05:34:45 | disruptek | anything with async in it is useless. 🤣 |
05:34:52 | leorize | I want an async analouge of std/streams |
05:35:33 | leorize | disruptek: sure but you would need me to implement this first: https://github.com/nim-lang/nightlies/issues/49 |
05:35:33 | disbot | ➥ Produce JSON manifests for nightlies |
05:35:49 | FromDiscord | <Avatarfighter> @leorize like much of the current async library |
05:36:47 | leorize | and I still have to write code for it because there are no immediate successor atm |
05:37:45 | disruptek | not sure i need any of that. |
05:38:28 | disruptek | if the user downloads gitnim for their platform, it can have the arch built into it. |
05:39:14 | leorize | nightlies releases can be in the "uploading stage" or "this particular arch failed to build" |
05:39:27 | leorize | which mean you gotta skip that release |
05:39:33 | disruptek | so what? |
05:39:49 | disruptek | i mean, if the url is missing, meh. |
05:40:21 | disruptek | "try again in 30 seconds. 😘" |
05:40:54 | leorize | if you don't have a github token iterating two or three times will get you throttled |
05:41:20 | disruptek | you mean a `wget`? |
05:41:56 | disruptek | why don't you wait until the assets are done to cut the tag, anyway? |
05:42:36 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:42:39 | leorize | sometimes they can fail, especially for experimental archs |
05:43:07 | disruptek | so cut tags for each arch. |
05:43:11 | leorize | and non-native archs take 3x the time to build, so that slows things down |
05:43:24 | leorize | I can't change the tag format |
05:43:26 | leorize | touch it and tools go boom |
05:44:00 | leorize | we have people outside of nim relying on nightlies too |
05:44:01 | disruptek | okay, so gitnim will wait for the tags to cool. |
05:45:21 | disruptek | honestly, we practically have this licked. |
05:46:48 | disruptek | wait, you can't even add new tag formats? |
05:46:58 | disruptek | that's fucked up. |
05:47:19 | leorize | the last time I touched the asset names choosenim go boom |
05:47:28 | disruptek | no, not the assets. |
05:47:31 | disruptek | just tags. |
05:47:41 | leorize | I expect the same thing for tags tbh |
05:47:48 | disruptek | okay, well whatever. |
05:48:01 | disruptek | i am smarter than choosenim, thank fucking $DEITY. |
05:48:25 | * | cvoxel joined #nim |
05:48:44 | leorize | this is why I wanted a new metadata system, custom parsing go nowhere |
05:49:33 | leorize | also it would let me cut a lot of code from future setup-nim :P |
05:50:06 | disruptek | if you build it, i will use it. |
05:51:34 | leorize | currently drawing inspiration from zig's json: https://ziglang.org/download/index.json |
05:52:30 | disruptek | i still don't really understand it, but whatever. |
05:52:52 | disruptek | to me, i just put assets into git and i get all this crap for free. |
05:53:15 | disruptek | but like i said, if it helps, i'll use it. |
05:53:52 | disruptek | it seems that no one wants to collaborate on gitnim, so it's time to make it more monolithic i guess. |
05:54:04 | leorize | with that said, you can try to interface with current nightlies release system |
05:54:25 | disruptek | yeah, that's what i do now. |
05:55:09 | disruptek | i was just ruminating on how i cannot use the tag to determine the filename. |
05:56:15 | leorize | I hate that too :P |
05:57:17 | disruptek | the easiest solution might be to parse the version for the commit from the compiler source. 😆 |
05:57:26 | leorize | I thought about adding a json-formatted footer into the description, but there are concurrency issues |
06:05:37 | disruptek | i think we'll have a way to hint the version or we'll just guess, but this will be a corner case that we'll probably make rather hard to use. |
06:05:49 | disruptek | we want people to just pull down the latest release for the branch. |
06:06:41 | saem | disruptek: what kinda collaboration are you looking for |
06:07:57 | disruptek | https://github.com/disruptek/gitnim/commits/1.4.3/gitnim |
06:08:01 | disruptek | something more than this, i guess. |
06:08:44 | disruptek | but i think the monolithic idea makes more sense now. |
06:12:38 | saem | what's the monoliTHICC idea? |
06:21:33 | disruptek | it won't be collaborative per se. |
06:21:50 | disruptek | more similar to gitnim, but reflective of the nightlies repo. |
06:21:55 | disruptek | er, choosenim. |
06:22:16 | disruptek | gitnim currently has this idea that people might want to manage their own distributions, share them, etc. |
06:22:27 | disruptek | no one gives a shit about that, turns out. no one else, i mean. |
06:22:46 | disruptek | so this'll just point at github and give you the freshest shit, all the time. |
06:22:52 | disruptek | that's it. |
06:23:36 | saem | I think when folks are trying to clean room builds and crap they definitely will. |
06:23:39 | FromDiscord | <ElegantBeef> I dont dislike the idea, though the way i see it it makes more sense to just point it to a repo/commit and give it a name |
06:24:04 | FromDiscord | <ElegantBeef> So users can do whatever they want with whatever nim fork, and give it whatever name they want |
06:24:17 | disruptek | yeah, that's how it works. |
06:24:19 | saem | I mean could try popping it into the extension and seeing how much uptake there is for it? |
06:24:38 | FromDiscord | <ElegantBeef> That's not how it works from the readme |
06:24:40 | disruptek | right now gitnim requires the user to update it. |
06:25:28 | disruptek | the monolithic version will just work the same for everyone; you can still share repos and whatnot, but by default it will feature updates from the mainline nim branches. |
06:25:38 | FromDiscord | <ElegantBeef> `git nim gitUrl -b branch -c commit -n name` is basically what i'm suggesting |
06:25:44 | saem | gitnim itself or the list of possible nims it could install? |
06:26:09 | FromDiscord | <ElegantBeef> name allowing you to give it a nice name so you could switch between them like `git nim thatSillyFork` |
06:26:10 | disruptek | beef: you can set the gitnim url at compile-time or in the environment. |
06:26:23 | disruptek | you do that with tags, chucklehead. |
06:26:25 | disruptek | ~gitnim |
06:26:26 | disbot | gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek |
06:26:34 | disruptek | the web-site shows the deets. |
06:27:25 | disruptek | i don't want to support build-from-source, though. like, ever. |
06:28:56 | FromDiscord | <ElegantBeef> Well then there's where my suggestion falls apart 😄 |
06:29:15 | disruptek | yeah, i don't want those users. |
06:30:00 | disruptek | more important to have the product tight and deliver success universally, correctly, with no support burden. |
06:30:16 | disruptek | if you want a from-source compiler, you'll build it yourself. it's not /that/ hard. |
06:30:24 | FromDiscord | <ElegantBeef> Oh i know it's not |
06:30:26 | * | def- quit (Quit: -) |
06:30:37 | FromDiscord | <ElegantBeef> I'd probably just fork choosenim for it |
06:30:51 | disruptek | terrible. |
06:31:22 | FromDiscord | <ElegantBeef> Well it already does what i suggested just only for the nim repo |
06:31:38 | FromDiscord | <ElegantBeef> I'd just be adding user defined repos |
06:32:05 | disruptek | go nuts. |
06:32:13 | * | def- joined #nim |
06:32:42 | saem | It does... I thought you can point it to a pre-built thing, but it doesn't really do anything else except point the shims there... which honest they don't expose all the binaries and the gdb stuff is broken. |
06:33:27 | * | muffindrake joined #nim |
06:33:47 | FromDiscord | <ElegantBeef> It doesnt let you point it to a git url/branch and give it a name |
06:34:00 | FromDiscord | <ElegantBeef> It does let you point to it locally |
06:34:14 | disruptek | just do that in your nim fork, bozo. |
06:34:22 | disruptek | why do you need choosenim to fuck it all up? |
06:34:38 | FromDiscord | <ElegantBeef> What? |
06:34:41 | disruptek | this is why remotes and tags exist. |
06:36:40 | FromDiscord | <ElegantBeef> Well manually managing a repo is a tad annoying and having `choosenim upgrade yourNamedFork` being an alias to that repo which also rebuilds is just nicer |
06:36:42 | disruptek | for a good time, get high and read some of the bug reports in the nimble and choosenim repos. |
06:36:48 | disruptek | it's absolutely hilarious. |
06:44:14 | FromDiscord | <Avatarfighter> that does not sound fun tbf |
06:59:02 | * | cvoxel quit (Remote host closed the connection) |
07:00:13 | * | j-james joined #nim |
07:01:27 | * | j-james left #nim (#nim) |
07:01:55 | * | j-james joined #nim |
07:02:28 | * | j-james quit (Client Quit) |
07:15:04 | * | cvoxel joined #nim |
07:18:34 | * | habamax joined #nim |
07:19:50 | * | adnan338 quit (Ping timeout: 272 seconds) |
07:36:03 | * | opal quit (Ping timeout: 240 seconds) |
07:39:37 | * | Cthalupa quit (Ping timeout: 260 seconds) |
07:42:47 | * | Cthalupa joined #nim |
07:45:59 | * | bouzu_ joined #nim |
07:56:58 | * | narimiran joined #nim |
08:02:23 | * | opal joined #nim |
08:10:15 | FromDiscord | <mratsim> AsyncStreams are really easy with coroutines, Streams as well. |
08:10:22 | FromDiscord | <mratsim> @leorize^ |
08:21:24 | * | cvoxel quit (Ping timeout: 240 seconds) |
08:22:11 | saem | very much looking forward to that or rather that plus faststreams. :D |
08:28:54 | FromDiscord | <mratsim> What I'm impressed by is what with can do with nanoseconds context switches:↵- http://www.vldb.org/pvldb/vol11/p1702-jonathan.pdf↵- http://www.vldb.org/pvldb/vol11/p230-psaropoulos.pdf↵- https://arxiv.org/pdf/2010.15981.pdf |
08:29:42 | saem | That last paper is a local university. |
08:29:47 | saem | Neat |
08:34:56 | FromDiscord | <ElegantBeef> Look at you with all your educational institutes |
08:35:26 | saem | LoL, UoA is a fantastic university in a number of different areas. |
08:35:51 | FromDiscord | <mratsim> the second one is from EPFL in Switzerland |
08:36:05 | FromDiscord | <ElegantBeef> I generally know nothing about post secondary |
08:36:10 | * | bouzu__ joined #nim |
08:36:11 | FromDiscord | <ElegantBeef> So i'll take your word for it |
08:36:23 | * | Gustavo6046 quit (Quit: ZNC 1.7.5 - https://znc.in) |
08:36:28 | saem | I know a bit but mostly because hiring, never got a degree. |
08:36:37 | * | Gustavo6046 joined #nim |
08:36:56 | FromDiscord | <mratsim> Most of the time I see Stanford or MIT or ETH Zurich |
08:37:19 | saem | We read different papers. :D |
08:37:49 | FromDiscord | <thulahn> Do any major companies support nim? Like Apple with rust, Google with golang etc |
08:37:51 | saem | In fairness a fair bit of MIT and ETH in the stuff I've read. |
08:37:53 | FromDiscord | <ElegantBeef> I cant even read |
08:38:42 | saem | AFAIK, none of FAANG or whatever it is these days supports nim internally. |
08:38:47 | * | bouzu_ quit (Ping timeout: 260 seconds) |
08:39:15 | FromDiscord | <ElegantBeef> Also Apple supporting rust? |
08:39:21 | FromDiscord | <thulahn> I thought they might be |
08:39:27 | FromDiscord | <thulahn> Think I read it somewhere |
08:39:31 | FromDiscord | <ElegantBeef> Doesnt apple have it's hands all over swift? |
08:39:33 | saem | Internally, I've heard they have a rust team. |
08:39:35 | FromDiscord | <mratsim> Microsoft has a couple of Rust internal dev. |
08:39:53 | saem | They're using it in a few places, IIRC. |
08:40:03 | FromDiscord | <mratsim> @thulahn dom96 is working at Facebook if that counts :p |
08:40:21 | FromDiscord | <ElegantBeef> Well status is funding Nim's development iirc |
08:40:22 | FromDiscord | <mratsim> (the author of Nim in Action book) |
08:40:46 | FromDiscord | <ElegantBeef> You'd know better than me mratsim 😛 |
08:40:50 | FromDiscord | <mratsim> yes Status is sponsoring Nim, and has the largest Nim team out there. |
08:41:05 | FromDiscord | <mratsim> https://nim-lang.org/sponsors.html |
08:41:08 | FromDiscord | <thulahn> A whole team wrote that |
08:41:12 | FromDiscord | <thulahn> Book? |
08:41:24 | FromDiscord | <ElegantBeef> Nope just dom did |
08:41:31 | FromDiscord | <mratsim> https://www.manning.com/books/nim-in-action |
08:42:01 | FromDiscord | <ElegantBeef> Ah finally found the sponsors thanks to that link https://www.rust-lang.org/sponsors |
08:42:06 | FromDiscord | <mratsim> I think we're over 20 people working in Nim now? |
08:42:29 | FromDiscord | <mratsim> at Status |
08:43:21 | FromDiscord | <ElegantBeef> Based of aoc2020 we're steadily growing |
08:43:30 | FromDiscord | <ElegantBeef> 1% of people used Nim |
08:43:45 | FromDiscord | <ElegantBeef> Atleast on the unofficial survey 😄 |
08:43:53 | FromDiscord | <mratsim> that's nice |
08:44:14 | FromDiscord | <mratsim> I remember learning about esoteric languages like J and K on project euler :p |
08:44:38 | FromDiscord | <mratsim> otherwise I think some of the Codewars or what not game competition can be a good showcase |
08:46:24 | FromDiscord | <ElegantBeef> Yea, also if we can get the VM to be faster that'd be nice 😄 |
08:47:54 | FromDiscord | <ElegantBeef> It getting faster and having libffi you could get a fairly usable scripting language |
08:48:11 | * | cvoxel joined #nim |
08:48:20 | FromDiscord | <thulahn> Is that book worth getting? |
08:48:26 | FromDiscord | <thulahn> I'm thinking about trying nim |
08:48:29 | FromDiscord | <ElegantBeef> Most people that get it dont regret it |
08:48:58 | FromDiscord | <thulahn> I'm a DevOps type guy who's best at python so that's the draw for me |
08:49:12 | FromDiscord | <ElegantBeef> the draw? |
08:49:55 | FromDiscord | <haxscramper> @thulahn for some opinion on devops/system administration for nim see https://www.reddit.com/r/nim/comments/knt1o7/advice_is_nim_worthy_of_time_to_master/ |
08:50:07 | FromDiscord | <haxscramper> Not sure it is 100% relevant, but you might find something interesting there |
08:50:15 | FromDiscord | <ElegantBeef> I can be quite stupid at times you know |
08:54:03 | FromDiscord | <thulahn> Yes it's interesting |
08:54:12 | FromDiscord | <thulahn> Someone said to stop before the metaprogramming |
08:54:29 | FromDiscord | <thulahn> I thought a good place to start would be some simple library to contribute to nimble |
08:55:02 | FromDiscord | <ElegantBeef> Well most of what i've contributed is metaprogramming related 😄 |
08:56:02 | ForumUpdaterBot | New thread by Srbga: What's the preferred way to compile nim to WebAssembly?, see https://forum.nim-lang.org/t/7365 |
08:57:19 | FromDiscord | <lantos> how can you stagger iterators?↵https://play.nim-lang.org/#ix=2Lwk |
08:57:59 | FromDiscord | <mratsim> you can't because no inline iterator chaining |
08:58:25 | FromDiscord | <mratsim> you need to for loop inside or use timotheecour aliassym patch or use closure iterators or use templates or use zero-functional |
08:59:07 | FromDiscord | <mratsim> complain on the tracker, there is an issue about this open, bonus point if you have a compelling use-case. |
08:59:41 | FromDiscord | <mratsim> ah, apparently you can use that as well: https://gist.github.com/mratsim/92f069c652eb1704e1a7bfc376941919 |
09:00:02 | FromDiscord | <mratsim> and https://github.com/nim-lang/Nim/issues/4516 |
09:00:12 | disbot | ➥ Cannot pass inline iterator to inline iterator ; snippet at 12https://play.nim-lang.org/#ix=2Lwm |
09:00:21 | * | ee7[m] quit (Quit: Idle for 30+ days) |
09:02:16 | FromDiscord | <ElegantBeef> AliasSym seems nice 😄 |
09:06:01 | * | bouzu__ left #nim ("Leaving") |
09:06:54 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=2Lwr |
09:07:36 | FromDiscord | <lantos> ^ dont think that is enough to argue for it, that and it I guess it was just something I thought nim could do |
09:10:03 | ForumUpdaterBot | New thread by Jasonfi: How to add a parameter based on a variable?, see https://forum.nim-lang.org/t/7366 |
09:11:23 | FromDiscord | <mratsim> @lantos Python uses yield from |
09:11:31 | FromDiscord | <mratsim> Haskell has chaining |
09:13:15 | FromDiscord | <mratsim> you can also do fusion in Python using partial function application/catamorphisms: https://github.com/mratsim/Biostatistics-CSVtoGraphPad/blob/master/ExceltoGraphPad_asinh_tumorsphere.py#L17-L20 |
09:22:28 | FromDiscord | <lantos> v |
09:22:31 | FromDiscord | <lantos> (edit) "v" => "https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3ca22f16659e33ef67a6ead71b724f27" |
09:23:39 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:26:14 | FromDiscord | <mratsim> Rust also has fusion with iters() and into_iters() + collect |
09:31:14 | FromDiscord | <lantos> collect is nim's toSeq? |
09:33:44 | FromDiscord | <mratsim> kind of, but Nim has collect in sugar now |
09:50:05 | * | cvoxel left #nim ("Killed buffer") |
09:53:24 | FromDiscord | <andeee> sent a code paste, see https://play.nim-lang.org/#ix=2LwK |
10:00:39 | * | NimBot joined #nim |
10:00:58 | * | adnan338 joined #nim |
10:01:13 | * | adnan338 quit (Client Quit) |
10:01:23 | * | adnan338 joined #nim |
10:02:08 | ForumUpdaterBot | New thread by Mratsim: Google Summer of Code, Feb 19, 2021, see https://forum.nim-lang.org/t/7367 |
10:34:43 | * | opal quit (Ping timeout: 240 seconds) |
10:36:56 | * | opal joined #nim |
10:50:12 | * | Vladar joined #nim |
10:50:18 | * | waleee-cl joined #nim |
11:00:40 | * | Tanger joined #nim |
11:02:18 | * | Q-Master quit (Ping timeout: 260 seconds) |
11:08:25 | * | krux02 joined #nim |
11:22:06 | FromDiscord | <dom96> > if pull requests appear as closed and approved, but not merged, what does it mean? How can I try it? https://github.com/nim-lang/Nim/pull/11724↵giaco: you can just clone https://github.com/rayman22201/Nim/tree/asyncFlowVar (git clone that repo then git checkout `asyncFlowVar`). I've done some work to revive this over the Christmas holidays actually, plan to work some more towards that soon 🙂 |
11:22:07 | disbot | ➥ Make Flowvar compatible with Async |
11:24:18 | ForumUpdaterBot | New thread by Greenfork: NimraylibNow! - The Ultimate Raylib gaming library wrapper , see https://forum.nim-lang.org/t/7368 |
11:24:41 | FromDiscord | <dom96> (edit) > if pull requests appear as closed and approved, but not merged, what does it mean? How can I try it? https://github.com/nim-lang/Nim/pull/11724↵giaco: you can just clone https://github.com/rayman22201/Nim/tree/asyncFlowVar (git clone that repo then git checkout `asyncFlowVar`). I've done some work to revive this over the Christmas holidays actually, plan to work some more towards that soon 🙂 |
11:24:42 | disbot | ➥ Make Flowvar compatible with Async |
11:28:41 | FromDiscord | <dom96> @leorize supporting raises in async would be cool. It might not even be that difficult to fix, instead of complaining consider giving a fix a try 😉 https://github.com/nim-lang/Nim/issues/6639#issuecomment-604733536 |
11:28:42 | disbot | ➥ Can I make {.async.} and {.raises:[].} works together? |
11:30:06 | FromDiscord | <thulahn> What's the reasoning behind case insensitive (apart from the first character) and under score insensitive variables? |
11:30:17 | FromDiscord | <zetashift> Woah another raylib binding |
11:30:48 | grfork | the ultimate one (tm) |
11:30:55 | * | grfork is now known as greenfork |
11:31:17 | FromDiscord | <zetashift> This one looks great tho |
11:31:33 | FromDiscord | <zetashift> `Idiomatic Nim naming and conventions so you write Nim code, not C` I love it |
11:31:41 | * | Q-Master joined #nim |
11:32:01 | FromDiscord | <thulahn> Surely it's not just to make it unique to nim |
11:32:48 | FromDiscord | <dom96> @thulahn https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ#why-is-it-caseunderscore-insensitive |
11:33:22 | FromDiscord | <zetashift> IIRC the previous good raylib wrapper used raylib conventions which makes it a lil less Nimish, and I like it Nimish |
11:33:48 | FromDiscord | <zetashift> Also the readme of this wrapper is great 😄 |
11:33:58 | FromDiscord | <dom96> One practical outcome of these rules is that it's easier to use C libraries with differing style conventions |
11:34:02 | FromDiscord | <thulahn> Thanks. |
11:34:14 | FromDiscord | <thulahn> You don't have a discount code for your nim in action book do you? 😄 |
11:34:31 | FromDiscord | <zetashift> Now that's hustling |
11:34:58 | greenfork | the problem with C is that in Raylib it uses first capital letter so that one can't write `initWIndow` from C `InitWindow` even with case-insensitive rules because the first letter still counts |
11:35:01 | FromDiscord | <dom96> hehe |
11:35:05 | FromDiscord | <dom96> @thulahn you can try fccpicheta |
11:35:11 | FromDiscord | <dom96> dunno if it still works though |
11:35:29 | FromDiscord | <dom96> It's usually much cheaper on Amazon though |
11:36:58 | FromDiscord | <zetashift> @greenfork the one and only! Thank you, I'm currently on Linux but if you want I can boot into my Windows and try it out |
11:37:54 | greenfork | zetashift, thank you! sure you can, I will be here if you have any questions |
11:44:43 | * | hmmm joined #nim |
11:45:44 | FromDiscord | <dom96> @leorize regarding https://github.com/nim-lang/Nim/pull/14556 I'm no expert in SSL. So that's why I skipped it. Next time I will write a comment to say that I'll let someone else take a look to make it clearer 🙂 |
11:45:45 | disbot | ➥ net, openssl: support setting the minimum supported SSL/TLS version |
11:53:25 | FromDiscord | <thulahn> Does nim have one line if-statements? |
11:53:29 | FromDiscord | <thulahn> Like the ternary operator |
11:55:02 | greenfork | sure: nexti = if i == crownSides - 1: 0 else: i + 1 |
11:56:32 | FromDiscord | <thulahn> Cool. |
12:00:54 | * | habamax quit (Quit: leaving) |
12:10:39 | FromDiscord | <thulahn> Sorry for these newb questions, but I'm still learning. The `strformat` library, I know that you can do something like `echo fmt{1/3: .2f}` to get `0.3` but what is the meaning of the curly parens? |
12:10:51 | FromDiscord | <thulahn> (edit) "`0.3`" => "`0.33`" |
12:11:07 | FromDiscord | <mratsim> it's a domain specific language |
12:11:36 | FromDiscord | <mratsim> fmt creates a small domain specific language to apply {value: formatting} |
12:11:41 | FromDiscord | <thulahn> (edit) "fmt{1/3: .2f}`" => "fmt"{1/3: .2f}"`" |
12:12:14 | FromDiscord | <mratsim> It choose to use curly bracket, just like python does for the f-string or AngularJS for HTML codegen |
12:12:22 | ForumUpdaterBot | New thread by Sdmcallister: Resize window events karax, see https://forum.nim-lang.org/t/7369 |
12:14:06 | FromDiscord | <thulahn> In f-strings, you can do `f"{abc} def {ghi}"` - can `strformat` do that too? |
12:14:58 | * | keyle quit (Ping timeout: 272 seconds) |
12:15:53 | FromDiscord | <dom96> !eval import strformat; let abc = 42; let ghi = "hi"; echo(fmt"{abc} def {ghi}") |
12:15:56 | NimBot | 42 def hi |
12:28:23 | ForumUpdaterBot | New thread by Jasonfi: Feedback request: todo.network, see https://forum.nim-lang.org/t/7370 |
12:41:21 | filcuc_ | my nim program crash inside the GC_fullCollect proc ...probably is a caused by a double free or some weird allocation due to C interop procs. Gdb is not helping me too much. Any hint? |
12:42:31 | FromDiscord | <Meowz> https://play.nim-lang.org/#ix=2LxB |
12:43:04 | FromDiscord | <Meowz> How could I get that template to work? Currently fails with `got <glEndDef> but expected 'None'` |
12:43:58 | * | PMunch joined #nim |
12:44:48 | FromDiscord | <dom96> filcuc: if your program works with arc/orc you can get it running under valgrind |
12:45:02 | FromDiscord | <jasonfi> Hi, in Karax, does anyone know the default value of the autofocus param for input()? |
12:46:46 | filcuc_ | dom96: i tried to use arc..after fixing some errors due to finalizers i get /home/filippo/Projects/NimProjects/NimQml/src/nimqml.nim(8, 9) Error: internal error: environment misses: message`gensym12786110 |
12:47:15 | filcuc_ | and i'm on nim 1.2.8 |
12:48:39 | FromDiscord | <dom96> @jasonfi if that's a DOM param then it'll be whatever the DOM's default is |
12:48:52 | FromDiscord | <dom96> filcuc: you could try 1.4.x I guess |
12:49:33 | FromDiscord | <jasonfi> I want to say autofocus = my_autofocus_value, but I can only do that if I know what the default is, to leave it out if I don't want it "set" |
12:50:29 | FromDiscord | <jasonfi> in Karax source autofocus is defined as a bool, so.. strange. Possibly the JS string equivalent of false? |
12:51:50 | FromDiscord | <dom96> https://www.w3schools.com/jsref/prop_text_autofocus.asp |
12:51:57 | FromDiscord | <dom96> looks like it's false by default |
12:52:18 | FromDiscord | <jasonfi> ok thanks I'll try that |
12:56:13 | FromDiscord | <jasonfi> it doesn't work.. if I set the value to "false" it still thinks autofocus is enabled |
12:58:05 | FromDiscord | <jasonfi> Is Karax using some kind of template magic or something? |
13:04:00 | * | adnan338_ joined #nim |
13:04:34 | filcuc_ | dom96: ok with arc it doesn't crash |
13:04:36 | filcuc_ | :| |
13:04:45 | filcuc_ | dom96: but thanks anyway |
13:04:58 | giaco | dom96: super! Thanks a lot for the link |
13:06:31 | giaco | I saw your work on topic, I wish I could be more independent for such tests, but yet I'm too young with nim. Need more time! |
13:07:01 | FromDiscord | <0xc45> Hi all, quick question - is it possible to store a variable (executable code in my case) in the `.text` segment of the binary using Nim? |
13:07:20 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
13:07:55 | * | adnan338 quit (Ping timeout: 256 seconds) |
13:07:58 | * | adnan338_ is now known as adnan338 |
13:11:02 | FromDiscord | <lqdev> hm, you can definitely store it in .rodata by making a const |
13:11:17 | FromDiscord | <lqdev> not sure why'd you need to store a variable in .text |
13:12:04 | FromDiscord | <0xc45> Yeah indeed, I'm specifically looking for ways to store it in, or move it to, .text in my case. Reason is that .text is executable by default, and I'm trying to avoid calling APIs to make memory regions executable 🙂 |
13:12:55 | FromDiscord | <mratsim> @0xc45 search for "PROGMEM" in the forum or issue tracker |
13:13:19 | FromDiscord | <mratsim> I think someone asked for putting const in specific program areas for embedded |
13:13:25 | filcuc_ | other thing that i see it's that nim compiler line numbers are wrong even with debuginfo:on and debugger:native |
13:14:07 | FromDiscord | <mratsim> ah yes it was this: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma |
13:14:08 | FromDiscord | <0xc45> Thanks again @mratsim! Will do that |
13:14:21 | FromDiscord | <0xc45> Oh awesome |
13:19:17 | filcuc_ | mh i remember that i've to do something to register a foreign thread, correct? |
13:19:25 | filcuc_ | in order to make GC works |
13:20:58 | FromDiscord | <mratsim> setupForeignThreadGC() |
13:21:23 | FromDiscord | <mratsim> otherwise don't use ref, strings, seqs, disable stacktraces and disable checks on integer (to avoid exceptions) |
13:21:29 | FromDiscord | <mratsim> on that thread |
13:21:39 | FromDiscord | <mratsim> you will SIGSEGV otherwise |
13:22:20 | FromDiscord | <mratsim> you can use push stacktrace:off and push checks:off for that |
13:23:16 | filcuc_ | i'm crossing finger that setupForeignThreadGC will fix my sigsegv |
13:23:21 | FromDiscord | <mratsim> Example: https://github.com/status-im/nim-blscurve/blob/master/blscurve/bls_batch_verifier.nim#L170-L189↵and for attaching thradlocal GC https://github.com/status-im/nim-blscurve/blob/master/blscurve/openmp.nim#L48-L70 |
13:25:08 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ffb00349632f63d870aa6a9] |
13:25:22 | FromDiscord | <dom96> I wonder if we could do something to give a nicer error when setupForeignThreadGC is not invoked |
13:27:19 | FromGitter | <gogolxdong> GUI application crashed out of memory after running for couple of hours , how to debug |
13:27:33 | PMunch | Is there program size overhead when using ARC if you don't use any garbage collected structures? |
13:27:46 | FromDiscord | <mratsim> nop |
13:27:49 | PMunch | Like if I compiled a project that was using gc:none with gc:arc, would it grow in size? |
13:27:53 | PMunch | Oh nice |
13:27:54 | FromDiscord | <mratsim> neither is there for the default GC |
13:27:57 | FromDiscord | <mratsim> ah |
13:28:03 | FromDiscord | <mratsim> a bit |
13:28:13 | PMunch | bit? |
13:28:21 | FromDiscord | <mratsim> Nim still does initialization of the GC for potential ref Exceptions thrown |
13:28:40 | FromDiscord | <mratsim> but maybe if you only use uint and stack objects you'll have nothing inside. |
13:28:55 | PMunch | Oh right |
13:29:30 | PMunch | Hmm, I have enabled exceptions:quirky though as well |
13:29:37 | * | hmmm quit (Ping timeout: 264 seconds) |
13:29:40 | PMunch | As otherwise I couldn't get it to work |
13:29:50 | filcuc_ | dom96: mratsim: crash solved..thank you |
13:29:55 | FromDiscord | <lantos> https://play.nim-lang.org/#ix=2LxV |
13:30:10 | filcuc_ | is was playing with interfacing QThreads in NimQMl |
13:30:17 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=2LxV" => "https://play.nim-lang.org/#ix=2LxV↵trying using .closure. ↵is this even a valid timing" |
13:30:22 | FromDiscord | <lantos> (edit) "timing" => "comparison?" |
13:30:37 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=2LxV↵trying ... using" added " itter: itter: int" |
13:30:44 | * | hmmm joined #nim |
13:31:07 | PMunch | @gogolxdong, out of memory? Have you changed the GC? Or are you interfacing with an external C framework and not freeing things? |
13:32:05 | filcuc_ | regarding arc/orc i successfully compiled NimQml. But i had to basically move the new statements (that have finalizers) at the top and basically forward declare some proc (in order to disable generation of default nim deleter). Is this the way to go? |
13:32:27 | FromGitter | <gogolxdong> I'm using nim-libp2p with go-libp2p-daemon as a progress, it's based on the chat example of nim-libp2p |
13:32:32 | FromDiscord | <mratsim> {.experimental: "codeReordering".} |
13:32:49 | FromDiscord | <mratsim> might help for the forward declaration part |
13:33:09 | FromDiscord | <mratsim> the finalizers probably still need to be moved by hand |
13:33:16 | FromGitter | <gogolxdong> wNim + nim-libp2p |
13:33:47 | FromDiscord | <mratsim> are you cancelling futures? |
13:34:08 | filcuc_ | mratsim ok then..given that i've to take the long route for finalizers i'll add forward declarations too |
13:34:15 | FromGitter | <gogolxdong> default gc, devel latest , I think it's orc right? |
13:34:39 | FromDiscord | <mratsim> Note that we didn't test nim-libp2p or chronos with arc/orc yet |
13:34:45 | FromDiscord | <mratsim> default gc is refc |
13:34:50 | FromDiscord | <mratsim> arc/orc are opt-in |
13:35:30 | FromGitter | <gogolxdong> Is refc default gc for devel latest ? |
13:35:46 | PMunch | You could try to add some profiling and see where the memory goes |
13:37:08 | FromGitter | <gogolxdong> I thought default GC is orc after 1.4 |
13:38:13 | FromDiscord | <mratsim> it would be easier if refc supported -d:useMalloc ... |
13:41:56 | * | filcuc_ quit (Ping timeout: 240 seconds) |
13:42:14 | * | filcuc_ joined #nim |
13:51:04 | giaco | sealmove I've tested some template operations plugins of binarylang and it works nicely! Thanks |
13:51:52 | FromGitter | <gogolxdong> Is refc still the default GC for now |
13:55:49 | FromDiscord | <Rika> yes |
13:56:54 | FromGitter | <gogolxdong> oh, I made a big mistake. Should I change it to ARC/ORC and try again? |
13:59:00 | PMunch | The default GC shouldn't have a memory leak |
13:59:08 | PMunch | So changing is not very likely to fix your issue |
13:59:57 | PMunch | Leaks in general mean you've done something wrong, somewhere you're either holding on to data you're not using any longer so it can't be collected, or you're interfacing with C and forgetting to clean up something. |
14:00:20 | FromGitter | <gogolxdong> it doesn't even compile for ARC/ORC |
14:00:30 | PMunch | Really the only way to fix it would be to figure out where memory goes missing, and then figure out why |
14:10:13 | FromGitter | <gogolxdong> There is some work to port nim-libp2p for ARC/ORC, and will check how to debug or profile. |
14:11:53 | * | keyle joined #nim |
14:12:38 | * | FromDiscord quit (Remote host closed the connection) |
14:12:57 | * | FromDiscord joined #nim |
14:14:42 | FromDiscord | <mratsim> chronos has futures tracking flag |
14:15:27 | FromDiscord | <mratsim> https://github.com/status-im/nim-chronos/blob/d3018ae908f61253efc0f260f425f192904e6104/tests/testutils.nim#L22-L32 |
14:15:38 | FromDiscord | <mratsim> -d:chronosFutureTracking |
14:15:56 | FromGitter | <gogolxdong> yes, noticed that. Is there much to do, first encounter `libp2p\vbuffer.nim(44, 4) Error: expression cannot be cast to ptr SeqHeader` |
14:16:25 | * | keyle quit (Ping timeout: 240 seconds) |
14:17:43 | * | filcuc_ quit (Ping timeout: 260 seconds) |
14:18:33 | FromGitter | <gogolxdong> Is there a guide for porting to ARC/ORC? |
14:19:13 | FromDiscord | <mratsim> no, because we can't even update to 1.2.8 |
14:19:26 | FromDiscord | <mratsim> so for now we only consider 1.2.6 |
14:21:19 | * | ofelas quit (Quit: shutdown -h now) |
14:21:36 | FromGitter | <gogolxdong> It's time for me to spare time to investigate ARC/ORC . |
14:22:55 | FromGitter | <gogolxdong> I need to a guide in case my community ask me. :) , some asked me what's ARC/ORC, I just post the blog. |
14:29:23 | FromGitter | <gogolxdong> I feel lucky to work with experts like you all. |
14:30:48 | FromDiscord | <shadow.> have you read the blog post from yardanico? |
14:30:48 | FromDiscord | <shadow.> https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html |
14:31:06 | FromDiscord | <shadow.> there are other writeups on the bottom |
14:31:40 | PMunch | gogolxdong, if you're trying to port to ARC/ORC to fix your memory leak I can almost guarantee you it won't work |
14:33:38 | * | D_ quit (Ping timeout: 264 seconds) |
14:34:56 | FromGitter | <gogolxdong> @PMunch I am aware of that. Deterministic memory management is important for me. As for the crash, it ok if it doesn't crash when I show to customers. |
14:35:50 | FromGitter | <gogolxdong> @shadow thanks for helping, I will check further. |
14:38:12 | FromDiscord | <thulahn> Holy shit, there are cloud libraries in nimble |
14:38:19 | FromDiscord | <thulahn> Very happy about that |
14:38:38 | ForumUpdaterBot | New thread by Alexeypetrushin: Any plans for syntactic sugar for parameter unpacking?, see https://forum.nim-lang.org/t/7371 |
14:39:21 | * | waleee-cl joined #nim |
14:40:06 | * | letto quit (Quit: Konversation terminated!) |
14:41:55 | FromGitter | <gogolxdong> About a moth ago, someone found me and said if weak ref can apply to ARC, cycle ref won't be a problem.It's shame that I didn't know what it means and couldn't respond as soon as possible. |
14:42:47 | * | letto joined #nim |
14:44:33 | PMunch | Hmm, does anyone have a nice figure to explain syntax trees? |
14:46:18 | Oddmonger | i've made a « nimble refresh » and « nimble install sdl2_nim » , but i still get 2.0.12 and not 2.0.14 |
14:46:39 | FromDiscord | <haxscramper> https://gist.github.com/haxscramper/4eec029cdd71573bb0d10fdde796c0d9 |
14:46:52 | FromDiscord | <haxscramper> PMunch: I made this when I started nim |
14:47:12 | FromDiscord | <haxscramper> Not sure if this is really helpful or working or whatever, but it certainly was useful for me |
14:47:36 | PMunch | Ooh, that is perfect |
14:47:51 | FromDiscord | <haxscramper> Also tree-sitter has nice playground with as representation so you might also want to use this for direct code-AST comparison |
14:52:03 | PMunch | Hmm, it orders the nodes quite poorly.. |
14:55:04 | FromDiscord | <haxscramper> You can try different layouts of introduse invisible edges on the same rankdir |
14:55:39 | greenfork | Oddmonger, you might be getting 2.0.14 but it says it's 2.0.12 because nimble file has 2.0.12 https://github.com/Vladar4/sdl2_nim/blob/master/sdl2.nimble and git tag is 2.0.14 |
14:56:06 | Oddmonger | ah |
14:56:56 | Oddmonger | that must be something like this, because it was downloaded with git |
14:57:35 | greenfork | run nimble install with --verbose, it should say which git tag it is cloning |
14:57:45 | Oddmonger | i've grepped 2.0.14, and got some 2.0.14 |
14:57:58 | Oddmonger | but thanks for --verbose |
14:59:06 | Oddmonger | yes, « cloning latest tagged version 2.0.14 » |
14:59:52 | * | Q-Master quit (Ping timeout: 246 seconds) |
15:00:45 | greenfork | everything's fine then |
15:02:15 | * | Q-Master joined #nim |
15:04:46 | Oddmonger | yes, thank you for the info |
15:04:53 | FromDiscord | <mratsim> mmmh, I assume there is no way to force {.emit.} code to be before other part of the code? |
15:04:53 | ForumUpdaterBot | New question by Alex Craft: Why two different macros functions share variable namespace in Nim?, see https://stackoverflow.com/questions/65654687/why-two-different-macros-functions-share-variable-namespace-in-nim |
15:05:26 | FromDiscord | <mratsim> I have a type that I must {.emit.}, but when i use it, Nim creates types dependency before it's declared :/ |
15:09:00 | FromDiscord | <mratsim> for the stackoverflow question that's because the "a" are global variables. Not sure if it's intended or not, this works: https://play.nim-lang.org/#ix=2Lyu↵↵What's strange is that unittest doesn't exhibit this behaviour. |
15:10:09 | FromDiscord | <haxscramper> But shouldn't `block:` introduce new scope anyway? |
15:11:41 | FromDiscord | <mratsim> yes |
15:11:50 | FromDiscord | <mratsim> and I think unittest does it that way |
15:12:08 | FromDiscord | <mratsim> so I don't understand what unittest does differently here |
15:12:43 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2Lyx |
15:12:51 | FromDiscord | <haxscramper> The code in SO question expands to same output |
15:13:09 | FromDiscord | <haxscramper> Well, with `expandMacros` and renamed second `let a` to `let b` it does |
15:14:23 | leorize[m] | the bug looks familiar |
15:14:59 | leorize[m] | i think it's reported but not fixed |
15:20:26 | Oddmonger | ok, i have installed sdl2_nim , and now nim compiler said it cannot find « sdl2 » ( « import sdl2 ») |
15:21:07 | Oddmonger | and i have screenshots available for the scepticals |
15:22:56 | * | D_ joined #nim |
15:24:18 | PMunch | @hax, how do you add an invisible edge? |
15:25:21 | greenfork | Oddmonger, you should probably import it as `import sdl2_nim` |
15:25:35 | PMunch | Hmm, I feel like I've made a graph like this before.. |
15:25:37 | Oddmonger | i've tried this already :) |
15:26:07 | Oddmonger | i've looked at ~/.nimble/pkgs , and it seems that the correct import is the name until the first '-' separator |
15:26:17 | Oddmonger | i tried « import ttf » and it worked |
15:26:24 | greenfork | Oddmonger, you can try same command as in examples https://github.com/Vladar4/sdl2_nim/blob/master/examples/ex101_init.nim#L7 |
15:27:00 | * | abm joined #nim |
15:27:30 | Oddmonger | ah yes, that's it |
15:27:40 | Oddmonger | thanks again greenfork (are you the author ?) |
15:28:09 | greenfork | no, I was just checking this library lately |
15:31:22 | Zevv | disruptek: I was able to get my attention span to reach over 5 mins. Added tests/ttypes.nim |
15:32:16 | disruptek | oh shoot. |
15:34:40 | disruptek | damn, who needs more failing tests? |
15:36:33 | disruptek | are you going to fix these? |
15:37:24 | * | lritter joined #nim |
15:38:45 | Zevv | who, me? |
15:39:50 | * | PMunch quit (Quit: leaving) |
15:41:17 | * | leorize quit (Remote host closed the connection) |
15:42:01 | * | leorize joined #nim |
15:42:03 | FromDiscord | <haxscramper> PMunch: IIRC something like `{ rank="same"; nodeA -> nodeB [style=invis]}` |
15:42:15 | FromDiscord | <haxscramper> To get invisible directed edge between two nodes |
15:42:21 | FromDiscord | <haxscramper> On the same level |
15:53:27 | disruptek | scramper: you should add dot output to gram. |
15:54:28 | FromDiscord | <haxscramper> I can do this, but how I should handle conversion from edge/node types to dot representation? |
15:54:31 | FromDiscord | <haxscramper> !repo hasts |
15:54:31 | disbot | https://github.com/haxscramper/hasts -- 9hasts: 11Statically typed wrappers for various markup lanuages - grapvhiz, svg, openscad, latex & more 15 2⭐ 0🍴 |
15:54:52 | FromDiscord | <haxscramper> I have this, which has separate DotGraph type |
15:55:11 | disruptek | up to you; i'm not picky, but i've been planning to do it so i can generate dependency graphs for projects via nimph. |
15:55:19 | Zevv | disruptek: I'm not sure yet. It says Conv(Ident "int16", intLit(1)) is void |
15:55:27 | FromDiscord | <haxscramper> So I can mixin/pass as callback `dotRepr` that will either return string or type from this library |
15:55:54 | disruptek | Zevv: yeah, conversions don't work right yet. |
15:56:01 | Zevv | ok cool |
15:56:06 | FromDiscord | <haxscramper> Good, I will look into implementing it then because I will need something like that sometimes later |
15:56:11 | disruptek | you can just rewrite them as newCall(int16, intlit 1) |
15:56:22 | disruptek | in our normalizing pass. |
15:56:41 | disruptek | haxscramper: awesome, thanks. i will help however i can. |
15:57:43 | disruptek | Zevv: that makes sense, right? |
15:58:07 | Zevv | sure, I was just fiddling with that, but I dont' really grok where it comes from and why it is not correct as it is |
15:58:22 | Zevv | Because it comes from the original typed ast, we don't construct it, do we? |
15:58:53 | disruptek | no, but we lose the types pretty easily. |
15:59:54 | disruptek | there are hidden .typ fields that get omitted in copies. |
16:00:01 | Zevv | sigh |
16:00:14 | disruptek | we need to do this to get the typed symbols to re-sem. |
16:00:21 | * | fputs quit (Quit: WeeChat 3.0) |
16:00:45 | disruptek | but it means that we get cases like this where the compiler expects to not need to sem the ast since it's nominally typed. |
16:00:53 | disruptek | whatfer empty room reasons. |
16:01:24 | * | fputs joined #nim |
16:05:32 | FromDiscord | <haxscramper> actually I think I can do something even more interesting for gram |
16:05:39 | FromDiscord | <haxscramper> In addition to dot repr I mean |
16:06:15 | FromDiscord | <haxscramper> I finally close enough with hcparse to make some meaningful wrappers and I wanted to first wrap sourcetrail |
16:07:34 | FromDiscord | <haxscramper> It is meant to be used with C++ code analysis, but converting graph to interactively viewable/searchable representation is not that hard |
16:08:08 | FromDiscord | <haxscramper> Just an idea for now |
16:10:13 | FromDiscord | <mratsim> it's strange, I thought I had all the typed AST issues I could ever meet but it seems like you uncovered more 😮 |
16:11:17 | Zevv | maybe we should drop the ast and do this at the text source level instead |
16:12:30 | disruptek | the carnac bug can be solved, in theory, it's just that, y'know, it hasn't been. |
16:15:45 | leorize | disruptek is better at finding nim bugs than nim's test suite |
16:15:50 | disruptek | we need a foreign-module bindsym test and also some generics tests. |
16:16:28 | FromDiscord | <flywind> please merge this to fix broken CI |
16:16:32 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/pull/16663 |
16:16:33 | disbot | ➥ Ref #15919 fix broken CI |
16:17:10 | leorize | why did we not notice it? |
16:17:28 | leorize | ah, because dom merged it while it was failing... |
16:18:28 | disruptek | just revert it, then. |
16:19:59 | leorize | flywind: merged |
16:20:21 | FromDiscord | <flywind> thanks |
16:26:36 | Zevv | disruptek: https://github.com/disruptek/cps/pull/49 |
16:26:36 | disbot | ➥ conv |
16:27:28 | Zevv | but of course Error: Cannot satisfy the dependency on testes 0.10.0 and testes 1.0.0 |
16:30:41 | FromDiscord | <thulahn> Possibly stupid question, but is there a way to run and write nim code on a Chromebook? |
16:31:38 | leorize | if you manage to use chrome os' built-in linux sandbox probably |
16:32:23 | * | tane joined #nim |
16:38:34 | FromDiscord | <thulahn> That's great, I will give it a shot |
16:48:46 | * | Q-Master quit (Ping timeout: 256 seconds) |
16:52:22 | * | opal quit (Write error: Connection reset by peer) |
16:52:23 | * | leorize quit (Remote host closed the connection) |
16:57:41 | Zevv | disruptek: I fixed some, but don't understand your unhide enough to fix the last one I just added to the test. |
16:57:54 | Zevv | That might be the last one before I got my standalone tcp server up again |
16:58:26 | FromDiscord | <mratsim> jinx |
17:11:41 | * | Tanger quit (Remote host closed the connection) |
17:15:06 | * | Q-Master joined #nim |
17:19:27 | * | leorize joined #nim |
17:20:20 | * | Q-Master quit (Ping timeout: 265 seconds) |
17:39:28 | * | Q-Master joined #nim |
17:43:40 | * | abm quit (Quit: Leaving) |
17:48:58 | FromDiscord | <exelotl> question about term rewriting macros: would "adding constraints to the way a certain symbol is used" be a valid use-case? |
17:49:22 | FromDiscord | <exelotl> e.g. on the GBA there are certain IO registers which are write-only |
17:50:17 | FromDiscord | <exelotl> so I want to allow `foo = 5` but not `foo += 5` or `foo = foo + 5` |
17:50:39 | FromDiscord | <exelotl> but I also want to allow `addr foo` |
17:52:27 | FromDiscord | <haxscramper> I would just make `` func `+=`(t: GBA, arg: any): {.error: "Not allowed".}`` |
17:53:00 | FromDiscord | <haxscramper> And `+` too |
17:53:23 | FromDiscord | <haxscramper> Term rewriting macros should be able to do this, yes, and actually good for this |
17:57:51 | * | a_chou joined #nim |
17:59:06 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2Lzs |
17:59:23 | FromDiscord | <0xc45> Does anyone have experience importing both `winim/clr` and `nimcrypto`? There's a naming clash somewhere and I can't seem to find it to exclude that import. Importing both errors out with `Error: call depth limit reached in a debug build (2000 function calls). You can change it with -d:nimCallDepthLimit=<int> but really try to avoid deep recursions instead.` |
18:06:58 | FromDiscord | <dom96> > ah, because dom merged it while it was failing...↵↵Oops. Apologies. I need to learn to trust the Nim CI more these days 🙂 |
18:12:02 | leorize | 0xc45: naming clash can't cause recursion overflow |
18:12:13 | leorize | the compiler will force you to qualify if any clash happens |
18:13:30 | FromDiscord | <0xc45> @leorize Hmm, that's odd. Any guess on what could trigger this? My decryption code compiles with no issues, but if I import `winim/clr` (even without calling it) this recursion error starts occurring |
18:14:22 | leorize | the stacktrace should tell you what was called, no? |
18:14:28 | FromDiscord | <haxscramper> And what is the problem? Make it unredable by disallowing all operations that use it's content like `+` or `+=` |
18:15:17 | FromDiscord | <haxscramper> And it plays better with external codegen, because I'm not sure if term rewriting will help if you have some template that expands into assign |
18:16:13 | FromDiscord | <0xc45> sent a code paste, see https://play.nim-lang.org/#ix=2LzA |
18:16:24 | saem | 0xc45: the stacktrace afaik requires a compiler built with it enabled. In case you're not sure how to get that going. |
18:17:15 | FromDiscord | <exelotl> for correctness I should prevent `foo = foo` since the RHS involves reading foo. |
18:17:18 | FromDiscord | <0xc45> Oh rly 😅 |
18:17:39 | FromDiscord | <0xc45> Ah I see, let me try that |
18:17:50 | leorize | 0xc45 winim might have some initialization code that depends on recursion |
18:17:59 | leorize | and it recursed too much I guess? |
18:19:17 | disruptek | Zevv: you have push; you don't need to create PRs unless you think they might be creepy for some reason. |
18:20:41 | FromDiscord | <haxscramper> I'm not sure, but does `let a = init()` count as `=`? If not you could disallow assign altogether |
18:21:02 | FromDiscord | <haxscramper> But I guess you should try term rewriting macros then |
18:21:26 | FromDiscord | <haxscramper> Because it is getting into a similar level of weirdness relatively speaking |
18:22:08 | FromDiscord | <0xc45> Yeah something like that, but it's somehow triggered by the import. Stacktracing only seems to result in an empty `profile_results.txt` lol |
18:23:05 | saem | Does Nim VM itself support debugging? |
18:24:01 | FromGitter | <bung87> how to convert a table to js object when compile to js ? |
18:24:01 | FromDiscord | <haxscramper> no |
18:24:09 | leorize | 0xc45: looks like a generic resolving bug... |
18:24:14 | leorize | so not your fault but the compiler |
18:24:42 | FromGitter | <bung87> I use toJson, toJs none of them work |
18:25:24 | FromDiscord | <0xc45> That's comforting 😄. I tried changing the imports to "from winim/clr import nil" which works, but then it starts complaining about how I'm referencing a class method, even if I prepend "clr." |
18:25:31 | saem | bung87, I believe the generic parameters play a role in that. What's the precise type? |
18:25:44 | leorize | 0xc45: walkaround is to ```import winim/clr except `[]` ``` from what I'm seeing |
18:25:55 | FromGitter | <bung87> it's `var words:Table[int, string]` |
18:26:59 | saem | IIRC the int is the issue, there was a forum topic about this, can't precisely recall. When I was in the situation I wrote a quick proc. |
18:27:37 | saem | This is what I'm remembering: https://forum.nim-lang.org/t/7121#44875 |
18:27:51 | FromGitter | <bung87> if it's not int , what method you'd pick? |
18:28:05 | leorize | 0xc45: what version of nim are you using? |
18:28:24 | FromGitter | <bung87> I always get nim internal structure. |
18:29:17 | saem | This is what I've done: https://github.com/saem/nimlsp/blob/exp-rework-lsp/src/nimlsppkg/nimprojscan.nim#L342 |
18:29:29 | FromDiscord | <0xc45> 1.4.2 on windows. I'll try the [] exclusion when I'm back at my pc, thanks a lot! |
18:30:10 | disruptek | Zevv: Zevv: why doesn't the first test of ttypes pass? |
18:30:21 | disruptek | Zevv: Zevv: Zevv: does it work for you? |
18:31:01 | saem | Whoa, a level 3. |
18:31:36 | leorize | 0xc45: is your import order regarding nimcrypto and winim? |
18:31:39 | leorize | what is* |
18:33:07 | FromDiscord | <0xc45> First nimcrypto, then winim/clr. No other imports either |
18:34:12 | FromGitter | <bung87> hmm I have no idea now , I use ` % $` still get {kind:4....} |
18:36:15 | Zevv | disruptek: disruptek: disruptek: It breaks with Error: Expected a node of kind nnkBracket, got nnkIntLit |
18:36:24 | Zevv | something in unhide |
18:37:08 | leorize | 0xc45: I can't seem to be able to produce a failing sample :( if you have the time please share your nim file |
18:37:42 | leorize | feel free to reduce it into a smaller file. It's fine as long as it produce the issue |
18:38:36 | greenfork | why does it take for nim twice as long to generate bindings with {.header.} pragma than with {.dynlib.}? |
18:38:40 | FromDiscord | <0xc45> Sure thing, I'll send you my file after dinner! |
18:39:53 | greenfork | generate bindings - meaning generate C code with -c switch |
18:40:22 | greenfork | is it logical in any way? |
18:43:54 | FromDiscord | <mratsim> @exelotl use term-rewriting macros sparingly because they cause the compiler to recheck your AST a couple of times, increasing compilation-time |
18:45:11 | FromDiscord | <mratsim> @greenfork, does your header contains C/C++ macros or templates? |
18:45:35 | FromDiscord | <mratsim> with header there is the linker cost as well. |
18:46:08 | FromDiscord | <enthus1ast> @greenfork wrapping raylib? |
18:46:51 | FromDiscord | <nikki> greenfork: which part is taking twice as long? compiling? |
18:47:15 | FromDiscord | <nikki> in any case yeah with dynlib it pushes almost everything to runtime |
18:47:22 | greenfork | mratsim, C macros, it's 1 h file header+implementation. But I don't understand why it should matter. I only do `nim c -c` which should just generate C code, no linking or anything else |
18:47:32 | greenfork | enthus1ast, right :D |
18:48:24 | FromDiscord | <enthus1ast> i got physac compiling and the demo "working" but i crashes after a few seconds, so yeah |
18:48:41 | FromDiscord | <0xc45> @leorize Your `except '[]'` workaround works! Thanks a million :D. If you're still interested in reproducing, here's a piece of code that crashes for me: https://pastebin.com/mNqfyWNZ |
18:49:04 | FromDiscord | <enthus1ast> (edit) "i" => "it" |
18:50:21 | FromDiscord | <enthus1ast> i'm fighting with nimterop not sure if the approach is correct that i'm trying to do :/ |
18:50:57 | FromDiscord | <enthus1ast> maybe wrapping by hand will produce better results |
18:52:33 | FromDiscord | <exelotl> uuuh is `[]` (pointer dereferencing) not an overloadable operator? |
18:52:45 | greenfork | enthus1ast, will try this too in some time after I figure out how this actually works |
18:53:11 | FromDiscord | <enthus1ast> if you like i can publish the stuff i have in a branch |
18:53:34 | FromDiscord | <enthus1ast> but it's mostly try and error |
18:54:04 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2LzI |
18:54:33 | FromDiscord | <mratsim> @exelotl it is, but with care |
18:55:04 | greenfork | enthus1ast, sure, it would be helpful |
18:55:16 | FromDiscord | <enthus1ast> @mattrb you can generate procs with macros |
18:56:02 | FromDiscord | <mratsim> @exelotl You can overload: https://github.com/mratsim/Arraymancer/issues/185↵And I try to have some kind of dispatch to allow deref to work https://github.com/mratsim/Arraymancer/pull/270/files#diff-0e2fc33125e8fd7e68fe9c25f5331ce4442dab29cc9e8da0d34d9c4c1b4868cdR192 but was stuck on a Nim limitation |
18:56:03 | disbot | ➥ [Pending upstream] Allow dereference of Variables |
18:56:58 | FromDiscord | <exelotl> ah I see, it uses varargs |
18:57:17 | FromDiscord | <mratsim> make your template return untyped or typed or proc (value: int32) {.nimcall.} |
18:57:20 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2LzL |
18:58:10 | FromDiscord | <mratsim> I don't see an issue in the const block part so I assume it's the template that doesn't compile |
18:58:39 | FromDiscord | <mratsim> actually it should be untyped |
18:59:05 | FromDiscord | <mattrb> I'm currently seeing an error on the paren in the proc |
18:59:42 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2LzM |
18:59:47 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2LzN |
19:00:15 | FromDiscord | <mratsim> something like this might work, it's just a matter of fiddling with identifier construction and then returning the proc identifier from the template |
19:00:57 | FromDiscord | <mattrb> Ah, that makes sense. Is there a way to do it with anonymous procs? I don't actually have any need for the proc to exist in any scope other than in the `lut` array |
19:01:10 | FromDiscord | <mratsim> it's anonymous |
19:01:19 | FromDiscord | <mratsim> their names will be name0, name1, name2 here |
19:01:27 | FromDiscord | <mratsim> and they only exist in the template |
19:01:28 | disruptek | Zevv: what do you think about the sluggish yield test? its always been weird. should we remove it? |
19:02:16 | FromDiscord | <mattrb> Ah gotcha. What does Nim do if I create multiple with the same name there? I assume it doesn't care then? |
19:02:18 | Zevv | I don't know, shouldn't we understand & solve it instead? |
19:02:36 | FromDiscord | <mratsim> Nim will create unique identifiers |
19:02:41 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2LzQ |
19:03:19 | FromDiscord | <mratsim> the real identifier will be name1_a1iuyez254 something |
19:03:31 | FromDiscord | <mratsim> so not a problem |
19:04:46 | FromDiscord | <enthus1ast> @greenfork https://github.com/enthus1ast/raylib/tree/physac i suspect a gc error, because the physic works fine for a few seconds then it crashes with nil access; also when i try to create a `seq[PhysicsBody]` i get c errors, it seems that the order of imports in the generated c file is wrong and i do not know how to fix this |
19:05:43 | FromDiscord | <enthus1ast> (edit) "@greenfork https://github.com/enthus1ast/raylib/tree/physac i suspect a gc error, because the physic works fine for a few seconds then it crashes with nil access; also when i try to create a `seq[PhysicsBody]` i get c errors, it seems that the order of imports in the generated c file is ... wrong" added "(then)" |
19:06:19 | * | Jesin quit (Quit: Leaving) |
19:06:48 | greenfork | enthus1ast, thanks again! that is helpful |
19:08:36 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2LzT |
19:09:08 | FromDiscord | <exelotl> ffs |
19:09:29 | FromDiscord | <mratsim> let me try |
19:09:38 | FromDiscord | <exelotl> playground died and I lost an hour of experiments :( |
19:09:57 | FromDiscord | <shadow.> are fields stored contiguously in an object? |
19:10:01 | FromDiscord | <shadow.> (edit) "are fields stored contiguously in ... an" added "memory in" |
19:10:09 | FromDiscord | <mattrb> (edit) "https://play.nim-lang.org/#ix=2LzT" => "https://paste.rs/DKc" |
19:10:25 | FromDiscord | <exelotl> there may be padding |
19:10:40 | FromDiscord | <enthus1ast> @shadow with {.packed.} yes i guess |
19:10:44 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2LzU |
19:10:59 | FromDiscord | <enthus1ast> (edit) "@shadow" => "@shadow. " |
19:11:17 | disruptek | Zevv: eh i guess. it's low priority, though. |
19:11:25 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2LzW |
19:11:43 | FromDiscord | <shadow.> i can just change my code if not |
19:11:54 | FromDiscord | <InventorMatt> If you turn it into a named Tuple you should be able to |
19:12:00 | FromDiscord | <shadow.> ohhh fair fair |
19:12:08 | FromDiscord | <shadow.> `tuple[x, y, z: float]`? |
19:12:09 | FromDiscord | <InventorMatt> And still keep fields |
19:12:10 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2LzY |
19:12:18 | FromDiscord | <shadow.> smart |
19:12:18 | FromDiscord | <shadow.> ty |
19:12:35 | FromDiscord | <InventorMatt> No problem |
19:13:03 | Zevv | disruptek: fair enough, throw it out then |
19:13:26 | FromDiscord | <mratsim> @shadow, or store them as array[3, float] and create x and `x=` overloads |
19:13:32 | FromDiscord | <mratsim> @shadow. ^ |
19:13:33 | disruptek | just gonna skip it for now. |
19:13:50 | FromDiscord | <mattrb> Does this compile for you? |
19:14:09 | FromDiscord | <shadow.> @mratsim couldn't i just make them methods and use ufcs? |
19:14:18 | FromDiscord | <shadow.> but i think the tuple works perfectly for me actually |
19:14:53 | FromDiscord | <mratsim> @mattrb yes https://media.discordapp.net/attachments/371759389889003532/797906319968436284/unknown.png |
19:16:03 | FromDiscord | <mratsim> note that if you do an interpreter I've given an example of various dispatch methods here: https://github.com/status-im/nimbus-eth1/wiki/Interpreter-optimization-resources#nim-implementation-benchmark |
19:16:57 | FromDiscord | <mratsim> also you might want to wrap your "block" in a function if it doesn't compile in you nim version |
19:17:35 | FromDiscord | <mattrb> I'm on version 1.4.0 and I get this error. I'll take a look at your docs! https://media.discordapp.net/attachments/371759389889003532/797907001685311518/unknown.png |
19:18:18 | FromDiscord | <mratsim> ah but so it passes compilation and do badcodegen |
19:18:26 | FromDiscord | <mratsim> I can't test that since my lut is unused |
19:18:36 | FromDiscord | <mratsim> it will be dead-coe eliminated. |
19:18:49 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2LA1 |
19:19:17 | FromDiscord | <mratsim> can reproduce |
19:19:22 | FromDiscord | <mratsim> you can raise that on the tracker |
19:20:03 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2LA2 |
19:20:34 | FromDiscord | <mratsim> you are doing foo mod 2 instead of value mod 2 |
19:21:05 | FromDiscord | <mratsim> the proc captured the `foo` from the template which doesn't exist at runtime/in C |
19:21:25 | * | Jesin joined #nim |
19:21:37 | FromDiscord | <mattrb> That's the behavior I'm hoping to achieve, actually. I'd like different versions of the proc to be compiled so that that condition doesn't have to get evaluated at runtime, if possible |
19:21:41 | FromDiscord | <mattrb> Is there another way to do that? |
19:21:57 | FromDiscord | <mratsim> when foo mod 2 |
19:23:13 | FromDiscord | <mratsim> mmmh, it needs a bit of rearch because in a const, i is not static, let's see |
19:23:35 | FromDiscord | <mattrb> Thanks for the help on this, btw |
19:28:41 | leorize | 0xc45: I managed to reduce your example into 6 lines, and now I don't know if this is a compiler bug or not :P |
19:30:29 | FromDiscord | <thulahn> OK, can confirm that you can compile and run nim code in the chromebook linux sandbox |
19:30:57 | leorize | arguably it could be winim/clr bug for defining a generic unary `[]`, which overrides the default `[]` used for ptr/refs |
19:32:11 | leorize | but you can also argue the other way that the stdlib is supposed to implement `[][T: ref | ptr](x: T)` so that it has a higher binding than `[][T](x: T)`... |
19:32:30 | leorize | Araq: ^ so stdlib or winim bug? |
19:33:49 | FromDiscord | <0xc45> Heh, that's a good question. Afraid it's beyond me, I'm just a noob trying to pick up Nim 😅 |
19:34:32 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2LA8 |
19:35:02 | FromDiscord | <mratsim> there is a execution error at the end, not sure why but it compiles and display stuff |
19:35:45 | saem | ugh, absolute paths really mess up sourcemaps it seems. |
19:36:03 | FromDiscord | <mratsim> (edit) "https://play.nim-lang.org/#ix=2LA8" => "https://play.nim-lang.org/#ix=2LA9" |
19:36:55 | FromDiscord | <mratsim> (edit) sent a code paste, see https://play.nim-lang.org/#ix=2LAb |
19:37:16 | FromDiscord | <mratsim> ah it's the unimplemented quit 1 |
19:41:10 | FromDiscord | <mattrb> Do you know if there's any way to do this without duplicating the logic for `branchImpl`? Effectively in this use case, a lot of information about the instruction can be determined at compile-time (from the value of `i`), so ideally I'd be able to template the proc across that information at compile-time. I'm mostly hoping to reduce the code written here, so it'd be ideal if I could template `branchImpl` with that compile-time knowledge ra |
19:41:36 | FromDiscord | <mratsim> sure, I did that for my own interpreter |
19:42:57 | FromDiscord | <shadow.> `std::sort(objects.begin() + start, objects.begin() + end, comparator);`↵how can i recreate this in nim?, the start and end sorting iterators |
19:43:03 | FromDiscord | <shadow.> (edit) "iterators" => "pointers" |
19:43:03 | FromDiscord | <mratsim> static allows you to enforce compile time evaluation of part of a function: https://github.com/status-im/nimbus-eth1/blob/master/nimbus/vm/interpreter/gas_costs.nim#L312-L341 |
19:44:02 | FromDiscord | <mratsim> https://github.com/SciNim/flambeau/blob/master/flambeau/raw_bindings/data_api.nim#L284-L315 |
19:44:26 | FromDiscord | <mattrb> Hmm, this doesn't seem immediately intuitive to me. I'll take a look into it some more |
19:44:42 | FromDiscord | <mratsim> no it's not intuitive because it's a complex VM |
19:44:43 | FromDiscord | <shadow.> @mratsim can i sort with that? |
19:45:13 | FromDiscord | <mratsim> Unsure, it all depends if you can go backwards in your iterators |
19:45:22 | FromDiscord | <shadow.> hmm |
19:45:33 | FromDiscord | <shadow.> this is for raytracing ill just check how you did it 💀 |
19:45:36 | FromDiscord | <mratsim> but I think in std/algorithm you have a sort that takes var openarray no? |
19:45:41 | FromDiscord | <shadow.> yep |
19:45:46 | FromDiscord | <shadow.> that's what im using |
19:45:51 | FromDiscord | <mratsim> I didn't do the AABB 😉 |
19:46:04 | FromDiscord | <mratsim> I don't remember sorting |
19:46:15 | FromDiscord | <shadow.> ah fuck |
19:46:18 | FromDiscord | <shadow.> you didnt do aabb |
19:46:18 | FromDiscord | <shadow.> right |
19:46:26 | FromDiscord | <shadow.> im doing bvh nodes rn |
19:46:26 | FromDiscord | <shadow.> lol |
19:47:28 | * | PMunch joined #nim |
19:51:32 | FromDiscord | <Quibono> Mratsim was like “F sorting I’ve got paralllllllelism” |
19:56:14 | * | filcuc_ joined #nim |
19:59:47 | FromDiscord | <mratsim> kind of, I just wanted to test Weave on unbalanced workload |
20:00:15 | FromDiscord | <mratsim> AABB or BVH would accelerate 1000+x though by making everything logarithmic instead of linear |
20:00:25 | * | filcuc_ quit (Ping timeout: 240 seconds) |
20:15:19 | FromDiscord | <haxscramper> Is it possible to force `converter` inlining? Or `{.inline.}` is the same as in C where it does not guarantee anything |
20:15:24 | FromDiscord | <shadow.> yep im just not sure how to sort a section of a list |
20:15:24 | FromDiscord | <shadow.> aahh |
20:15:28 | FromDiscord | <shadow.> i suppose i could slice it |
20:15:30 | FromDiscord | <shadow.> sort that |
20:15:32 | FromDiscord | <shadow.> then reinject it |
20:15:35 | FromDiscord | <shadow.> but that'd be slow asf |
20:18:02 | disruptek | haxscramper: no guarantees for .inline. |
20:20:49 | FromDiscord | <inv> Are there any flags or something like that which could help to see structs during compilation |
20:20:54 | FromDiscord | <inv> (edit) "compilation" => "compilation?" |
20:22:04 | FromDiscord | <Avatarfighter> I just realized but I havent seen Yard in a while |
20:23:30 | * | greenfork quit (Quit: Leaving) |
20:27:22 | FromDiscord | <Avatarfighter> disruptek: what’s the stalking command to see the last time someone breathed on IRC? |
20:27:36 | FromDiscord | <Avatarfighter> the last seen command |
20:28:25 | leorize | !seen Avatarfighter |
20:28:26 | disbot | Avatarfighter spoke in 12#nim 48 seconds ago 12https://irclogs.nim-lang.org/10-01-2021.html#20:27:36 |
20:28:54 | * | hnOsmium0001 joined #nim |
20:31:18 | * | adnan338 quit (Quit: adnan338) |
20:32:10 | FromDiscord | <juliuskiesian> sent a code paste, see https://play.nim-lang.org/#ix=2LAp |
20:32:17 | FromDiscord | <juliuskiesian> Excerpt from arraymancer, btw. |
20:32:43 | FromDiscord | <juliuskiesian> And why not use `Tensor[T]` as the result type instead of `untyped`? |
20:48:40 | FromDiscord | <dom96> hmmm https://media.discordapp.net/attachments/371759389889003532/797929929064054784/SPOILER_unknown.png |
20:52:22 | Zevv | context? |
20:54:53 | * | narimiran quit (Quit: leaving) |
20:56:14 | FromDiscord | <ElegantBeef> None |
21:04:33 | FromDiscord | <mratsim> result is captured from the template invocation context |
21:05:31 | FromDiscord | <mratsim> I don't remember the origin of that proc but I got really annoyed at "varargs[int] or Metadata" and various semcheck issue |
21:05:55 | FromDiscord | <mratsim> so, it's a "don't do this at home" template |
21:07:12 | FromDiscord | <mratsim> import lenientops |
21:23:50 | FromDiscord | <acek7> how is everyone |
21:27:17 | FromDiscord | <shadow.> with cmp for algorithm sort does it have to be `-1` or `1` or can it just be any negative / positive number |
21:28:08 | FromDiscord | <lqdev> it can be any negative/positive number |
21:28:44 | FromDiscord | <shadow.> hmm |
21:28:56 | FromDiscord | <shadow.> can i have a generic as a static int in a function |
21:29:06 | FromDiscord | <shadow.> `proc boxCompare[A](a, b: Hittable): int =`↵like that where A is an integer? |
21:29:31 | FromDiscord | <lqdev> yeah |
21:29:37 | FromDiscord | <lqdev> `proc boxCompare[A: static int]` |
21:29:37 | FromDiscord | <shadow.> do i have to change anything? |
21:29:39 | FromDiscord | <shadow.> ah |
21:29:39 | FromDiscord | <shadow.> thanks |
21:29:48 | FromDiscord | <shadow.> ah wait does A have to be known at compile-time? |
21:30:08 | FromDiscord | <lqdev> um… yeah? |
21:30:13 | FromDiscord | <shadow.> that would |
21:30:13 | FromDiscord | <lqdev> that's what static means |
21:30:14 | FromDiscord | <shadow.> make sense |
21:30:15 | FromDiscord | <shadow.> yeah |
21:30:15 | FromDiscord | <shadow.> lmao |
21:36:44 | * | NimBot joined #nim |
21:37:23 | * | keyle joined #nim |
21:38:51 | giaco | what's the downside of using --gc:arc in 1.4.2 today? |
21:42:13 | * | keyle quit (Ping timeout: 264 seconds) |
21:46:00 | * | u0_a216 joined #nim |
21:46:20 | disruptek | it doesn't work reliably. |
21:46:33 | Zevv | neither do I |
21:46:45 | Zevv | but I just fake it |
21:46:59 | disruptek | giaco: it's no worse than using zevv. |
21:48:41 | giaco | --gc:zevv, so, great. There will also be zovv for cycle collecting stuff? |
21:49:02 | FromDiscord | <mratsim> --gc:vvze for cycling |
21:49:30 | giaco | thanks |
21:51:05 | Zevv | this will not end well |
21:51:40 | * | letto quit (Quit: Konversation terminated!) |
21:52:04 | FromDiscord | <mratsim> A cycle doesn't end |
21:53:47 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2LAT |
21:53:51 | giaco | *valgrind joins the conversation* |
21:53:55 | Zevv | i was able to compile the compiler with orc |
21:54:10 | Zevv | not that it works, but it does compile |
21:54:35 | * | letto joined #nim |
21:59:05 | * | a_chou quit (Remote host closed the connection) |
22:04:09 | leorize | disruptek: does testes let me declare test dependencies? (ie. compile this file first) |
22:04:28 | leorize | or do I have to switch to an another test runner? |
22:05:34 | * | u0_a216 quit (Ping timeout: 260 seconds) |
22:07:55 | disruptek | no, but i don't understand the use-case. |
22:08:07 | disruptek | testutils does that, iirc. |
22:08:26 | disruptek | doesn't `import firstfile` do what you want? |
22:10:02 | leorize | to test things like file handle inheritance I have to launch a helper program |
22:10:28 | leorize | to I need to declare that I want my helper program to be compiled before I run my test |
22:10:40 | leorize | so* |
22:11:30 | disruptek | i think i would have a test that both compiles and runs the helper, but maybe what we really want is to test nims files, too. |
22:12:19 | disruptek | a hack might be to name the help t0helper or similar. |
22:12:34 | * | u0_a216 joined #nim |
22:12:58 | disruptek | subtext: i'm really loathe to put any kind of configuration into the test runner. |
22:16:08 | * | fputs quit (Ping timeout: 265 seconds) |
22:19:51 | leorize | i guess i will use your hack for now |
22:20:40 | leorize | and have you ever tried to write a concept that match any type V = distinct T? |
22:22:40 | FromDiscord | <that_dude> What would you guys say are good projects to properly learn how to use nim? The last time I did stuff, it felt like I was just throwing things against the code checker and calling it good it if passed |
22:23:38 | disruptek | sounds like /all/ of my projects. |
22:23:44 | FromDiscord | <shadow.> lmao |
22:23:48 | FromDiscord | <shadow.> try advent of code 2020 |
22:24:39 | FromDiscord | <shadow.> what stuff do you like to code? |
22:24:48 | leorize | exercism.io have a good nim track too |
22:25:52 | disruptek | leorize: re: concept, i don't think so. but isn't this what distinctBase is for? |
22:26:37 | leorize | I tried but my types doesn't match |
22:26:46 | disruptek | paste? |
22:26:55 | FromDiscord | <mratsim> @that_dude that sounds like my Rust experience :p |
22:27:12 | FromDiscord | <that_dude> idk tbh, I usually work on something that interests me at the moment, whether it be file manipulation, game overlays, or tetris engines |
22:27:34 | FromDiscord | <that_dude> I'll check out advent of code thanks |
22:28:01 | leorize | disruptek: https://play.nim-lang.org/#ix=2LB1 |
22:33:53 | disruptek | huh, i dunno. |
22:34:32 | disruptek | i don't usually use the `type` qualifier, for one thing. |
22:34:44 | disruptek | shouldn't matter here, though. |
22:35:07 | disruptek | oh i'm dumb. |
22:35:34 | * | u0_a216 quit (Ping timeout: 246 seconds) |
22:35:37 | disruptek | distinctBase for SocketFD is probably int; i bet the compiler unwraps /all/ abstract types. |
22:36:12 | disruptek | or distinctBase does. whatever. |
22:36:19 | disruptek | you might need to write your own predicate. |
22:36:56 | FromDiscord | <shadow.> !repo shadowninja55/advent-of-code |
22:36:56 | disbot | https://github.com/shadowninja55/advent-of-code -- 9advent-of-code: 11my attempt at advent of code 2020 in nim. 15 2⭐ 0🍴 |
22:37:01 | FromDiscord | <shadow.> if you wanna compare |
22:37:05 | FromDiscord | <shadow.> most of my code is decent |
22:37:13 | FromDiscord | <shadow.> ignore day 4 please |
22:37:46 | leorize | disruptek: yea, though I gotta drop that idea |
22:38:18 | disruptek | why is that? |
22:38:33 | leorize | I just read some more docs and handles are showing themselves to be a pain on Windows |
22:39:22 | leorize | now I would want the new concepts to be a thing, assuming that I can have private implementation :P |
22:40:10 | leorize | so on windows, not all handles use the same `close()`, not all handles use the same `setInheritance()`, not all handles use the same `duplicate()` |
22:40:20 | disruptek | fun. |
22:41:24 | leorize | and funny enough, some handle can be set to be "inheritable", but they break the moment the child process got hold of them |
22:42:26 | disruptek | yeah, that's a laugh riot. |
22:42:46 | disruptek | that balmer, he sure has a sense of humor. |
22:42:58 | * | keyle joined #nim |
22:48:13 | * | keyle quit (Ping timeout: 264 seconds) |
22:50:14 | * | tane quit (Quit: Leaving) |
22:57:09 | FromDiscord | <Avatarfighter> @seen Yardanico |
22:57:13 | FromDiscord | <Avatarfighter> im an idiot |
22:57:17 | FromDiscord | <Avatarfighter> !seen Yardanico |
22:57:18 | disbot | Yardanico spoke in 12#nim 2 weeks ago 12https://irclogs.nim-lang.org/23-12-2020.html#10:26:13 |
22:59:59 | FromDiscord | <Avatarfighter> I managed to read what disruptek said and still used the wrong trigger |
23:00:53 | disruptek | disbot: should we just ban Avatarfighter? |
23:00:54 | disbot | reply hazy, try again. |
23:00:58 | disruptek | disbot: should we just ban Avatarfighter? |
23:00:59 | disbot | outlook good. |
23:01:02 | disruptek | nice. |
23:01:07 | FromDiscord | <Avatarfighter> no no |
23:01:15 | FromDiscord | <Avatarfighter> Bad bot |
23:14:36 | * | PMunch quit (Quit: leaving) |
23:14:46 | * | Vladar quit (Quit: Leaving) |
23:17:44 | * | Gustavo6046 is now known as [Gustavo6046] |
23:18:34 | * | grobe0ba joined #nim |
23:19:11 | * | [Gustavo6046] is now known as Gustavo6046 |
23:41:55 | * | u0_a216 joined #nim |
23:43:41 | * | keyle joined #nim |
23:44:40 | * | abm joined #nim |
23:45:31 | * | hmmm quit (Quit: WeeChat 3.0) |
23:46:29 | * | u0_a216 quit (Ping timeout: 260 seconds) |
23:48:34 | giaco | Object-relational mapping for Nim? Io Norm the only lib out there? |
23:48:49 | * | keyle quit (Ping timeout: 260 seconds) |
23:51:55 | * | u0_a216 joined #nim |
23:56:24 | * | u0_a216 quit (Ping timeout: 260 seconds) |
23:58:24 | * | u0_a216 joined #nim |
23:59:57 | FromDiscord | <exelotl> giaco: there's this new one https://github.com/enimatek-nl/torm |