00:05:02 | * | krux02_ joined #nim |
00:08:36 | * | krux02 quit (Ping timeout: 240 seconds) |
00:48:05 | * | krux02_ quit (Remote host closed the connection) |
00:52:09 | * | luis_ quit (Quit: luis_) |
00:52:37 | * | luis_ joined #nim |
01:00:19 | FromGitter | <zetashift> Qaaaq |
01:05:40 | * | uu91 quit (Read error: Connection reset by peer) |
01:06:00 | * | uu91 joined #nim |
01:14:48 | * | kevin joined #nim |
01:15:04 | * | kevin is now known as Guest73682 |
01:15:17 | * | Guest73682 is now known as Kevin5 |
01:28:56 | * | couven92 quit (Ping timeout: 240 seconds) |
01:37:05 | * | couven92 joined #nim |
01:40:38 | * | rockcavera joined #nim |
01:44:10 | * | sz0 quit (Quit: Connection closed for inactivity) |
01:52:13 | * | luis_ quit (Quit: luis_) |
02:01:44 | nisstyre | Nim has Option[T], but is there an Either[T1, T2] sort of thing? I googled and found some third party stuff, but nothing baked in |
02:02:20 | nisstyre | I know you could easily roll your own, but it's nice to have something standard for obvious reasons |
02:09:22 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
02:21:02 | * | couven92 quit (Read error: Connection reset by peer) |
02:21:20 | * | couven92 joined #nim |
02:22:26 | * | couven92 quit (Client Quit) |
02:28:45 | * | endragor joined #nim |
02:50:24 | * | rockcavera quit (Remote host closed the connection) |
02:54:05 | * | theelous3 quit (Read error: Connection reset by peer) |
02:54:35 | * | lritter quit (Ping timeout: 265 seconds) |
02:55:08 | * | lritter joined #nim |
02:56:08 | * | exelotl quit (Ping timeout: 245 seconds) |
03:31:18 | * | uu91 quit (Read error: Connection reset by peer) |
03:31:34 | * | uu91 joined #nim |
03:32:35 | * | uu91 quit (Read error: Connection reset by peer) |
03:32:53 | * | uu91 joined #nim |
03:35:12 | * | uu91 quit (Read error: Connection reset by peer) |
03:35:29 | * | uu91 joined #nim |
03:37:39 | * | uu91 quit (Read error: Connection reset by peer) |
03:38:05 | * | uu91 joined #nim |
04:01:59 | * | nif quit (Quit: ...) |
04:02:09 | * | nif joined #nim |
04:04:24 | * | fredrik92 quit (Ping timeout: 246 seconds) |
04:09:04 | * | couven92 joined #nim |
04:09:40 | * | uu91 quit (Read error: Connection reset by peer) |
04:09:54 | * | uu91 joined #nim |
04:11:05 | * | uu91 quit (Read error: Connection reset by peer) |
04:12:00 | * | uu91 joined #nim |
04:22:53 | * | Kevin5 quit (Ping timeout: 276 seconds) |
04:33:09 | * | nsf joined #nim |
04:33:44 | * | GordonBGood joined #nim |
04:48:01 | * | chemist69 quit (Ping timeout: 250 seconds) |
04:50:13 | * | chemist69 joined #nim |
05:00:23 | * | uu91 quit (Read error: Connection reset by peer) |
05:00:35 | * | uu91 joined #nim |
05:01:32 | * | uu91 quit (Read error: Connection reset by peer) |
05:01:48 | * | uu91 joined #nim |
05:36:59 | * | lritter quit (Ping timeout: 265 seconds) |
05:47:17 | skrylar[m] | saltstack clones in nim? hmm |
06:06:05 | * | dddddd quit (Read error: Connection reset by peer) |
06:15:09 | * | narimiran joined #nim |
06:20:30 | * | uu91 quit (Read error: Connection reset by peer) |
06:20:55 | * | uu91 joined #nim |
06:23:55 | Araq | nisstyre: I agree, it should be part of the stdlib |
06:47:47 | FromDiscord | <ZeeQyu> @krab4t Oh, you mean the naive, language-agnostic indexing of the open file like that. Nah, I won't stop before languages-awareness. |
07:13:58 | Araq | is it too late to rename --gc:destructors to --gc:arc? |
07:16:18 | * | kevin joined #nim |
07:16:42 | * | kevin is now known as Guest82331 |
07:16:50 | * | Guest82331 is now known as Kevin5 |
07:17:08 | Kevin5 | 👑 |
07:17:56 | * | PMunch joined #nim |
07:28:07 | FromDiscord | <kodkuce> this vscode is going crazy, now it tells me i am not using procs and gives warning and i am using them |
07:28:59 | FromGitter | <zacharycarter> I think if --gc:arc is more descriptive |
07:29:06 | FromGitter | <zacharycarter> it's better to do it now rather than later |
07:30:21 | FromGitter | <zacharycarter> none of the Nim serialization libraries (nesm / nim-serialization) seem to be able to do what I need, so I guess I'm writing custom serialization code myself |
07:30:56 | Zevv | zacharycarter: what *is* it that you need then? |
07:31:47 | FromGitter | <zacharycarter> nesm fails hard on generics it seems |
07:32:28 | FromGitter | <zacharycarter> like trying to add a serializer for the Vec3f type in GLM fails - so does explicitly passing in Vec3[float32] or Vec[3, float32] |
07:32:59 | FromGitter | <zacharycarter> nim-serialization has features described in the readme which I don't think are implemented yet - mainly adding a serializer to an already defined type |
07:33:07 | FromGitter | <zacharycarter> one whose type definition you don't want to change |
07:34:33 | Zevv | and you dont care what you serialize to/from? |
07:35:19 | FromGitter | <zacharycarter> I'd prefer it to be some format that's human editible |
07:35:23 | FromGitter | <zacharycarter> otherwise I'd just do binary |
07:35:41 | Zevv | right, thats what I ment :) |
07:35:47 | FromGitter | <zacharycarter> it's map data for a game, so editing by hand is something users might want to do |
07:35:49 | FromGitter | <zacharycarter> yeah :/ |
07:35:50 | Zevv | and json doesnt cut it probably |
07:35:57 | Zevv | too lossy |
07:36:00 | FromGitter | <zacharycarter> I haven't tried, but I doubt it |
07:36:01 | FromGitter | <zacharycarter> yeah |
07:36:12 | Zevv | repr it :) |
07:36:47 | Zevv | you'll only need to ship the compiler to parse it back in |
07:36:54 | FromGitter | <zacharycarter> :P |
07:37:03 | FromGitter | <zacharycarter> it's not the worst idea in the world lol |
07:37:22 | Zevv | i got tons of ideas that are *just not* the worst ideas in the world |
07:37:32 | Zevv | it doesn't bring me anywhere still, though |
07:38:00 | FromGitter | <zacharycarter> better than no ideas though |
07:38:14 | Zevv | true, true |
07:40:56 | Araq | use binary |
07:41:41 | FromGitter | <zacharycarter> will probably just end up doing that |
07:41:56 | FromGitter | <zacharycarter> I'm shipping a map editor with the game anyway, so it's not like users need to manually edit |
07:42:07 | FromGitter | <zacharycarter> and it's probably safer as it prevents them from making edits that break things |
07:42:28 | Araq | yup |
07:42:28 | Zevv | what about portablility over architectures? |
07:42:42 | * | solitudesf joined #nim |
07:42:47 | Araq | little endian has won anyway |
07:45:35 | FromGitter | <zacharycarter> got a bunch of network code written over the weekend - have players connecting and seeding their RNGs with a common value - starting to work on game state code now |
07:46:12 | FromGitter | <zacharycarter> so making good progress on that side of things anyway, but it's time to start rendering stuff, thankfully I already did map rendering previously so I should be able to get something working quickly, and soon hopefully have units moving around on multiple clients |
07:47:09 | GordonBGood | Araq: renaming --gc:destructors to --gc:arc works for me as it is certainly more accurate as the current evolving implementations doesn't ahve so much to do with destructors |
07:47:43 | Araq | GordonBGood: got doubly linked lists to work, see |
07:47:44 | Zevv | '--gc:arc' sounds just like '--gc:araq' |
07:47:51 | GordonBGood | I doubt --gc:destructors has been used much other than to check it out up to now as it hasn't worked consistently |
07:47:54 | Araq | https://github.com/nim-lang/Nim/pull/12637 |
07:48:18 | Araq | and async compiles! |
07:48:31 | Zevv | if it compiles, ship it! |
07:48:40 | Araq | but crashes, now I am investigating |
07:48:47 | * | jjido joined #nim |
07:49:40 | GordonBGood | Araq: Yes, I've been folloiwng you --gc:destructors and glad you seem to be getting close to something generally usable... |
07:51:00 | GordonBGood | I've been writing tests to compare its performance with --gc:boehm and find that its about the same speed except for cases where there are a lot of "owner" references to the same heap object... |
07:51:14 | GordonBGood | but of course less and consistent latency |
07:51:54 | Araq | any chance you can publish these tests? |
07:51:58 | GordonBGood | I want to see the new --gc stable and then will really press moving seqsv2 across all |
07:52:16 | GordonBGood | You bet I will once I've got them resentable |
07:52:31 | Araq | seqsv2 is only important for --gc:boehm |
07:52:57 | Araq | --gc:arc already has them and the other GCs are scheduled for deprecation anyway, see my RFC |
07:52:57 | GordonBGood | Yes, I know, but if it works for --gc:boehm, it likely will for the others with little extra effort |
07:53:10 | Araq | ok |
07:53:12 | GordonBGood | Yes, I now follow your NFC's |
07:54:27 | GordonBGood | My biggest concern that I'm trying to test quite thouroughly is that the new GC implmentations work with the environment ref inside closures; that was one of the biggest uglinesses before |
07:54:27 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:55:03 | * | sagax quit (Quit: Konversation terminated!) |
07:55:09 | GordonBGood | Once my tests are finished, I think I should likely PR them into thest standard tests |
07:55:28 | GordonBGood | ^into the standard |
07:55:57 | GordonBGood | But I'll likely post a gist here first to see if anybody has any suggestions |
07:56:48 | * | sagax joined #nim |
07:57:46 | Araq | "about the same speed as boehm" would be excellent btw, in theory it's slower |
07:58:24 | Araq | as an RC algorithm trades everything for "prompt reclamation" |
07:59:40 | GordonBGood | I'm about half a step from being able to post some exact results; it is slower when there are lots of atomic ref counts, but when there aren't too many, critical sectioned allocations/deallocations are the same... and the garbage collection takes about the same amount of them |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:00:03 | GordonBGood | and the GC takes about the same amount of extra time as the atomic ref counts |
08:01:01 | GordonBGood | I'm looking for a realistic benchmark that is less alloc/dealloc based and which requires more references to the same data to test a "worst case" for arc |
08:05:06 | * | gmpreussner joined #nim |
08:24:01 | Araq | "a realistic benchmark" doesn't cut it, we need a suite of benchmarks |
08:27:56 | GordonBGood | Yes, what I've done so far is just a start; we need some benchmarks to test what I don't so far |
08:29:30 | GordonBGood | I mean, it's easy to find some latency benchmarks to make boehm look worse, but throughput benchmarks will certainly be worse for arc |
08:29:53 | GordonBGood | if the benchmark uses lots of references to the same heap data |
08:30:45 | GordonBGood | I guess just some worst case representations either way might have to do |
08:31:28 | * | floppydh joined #nim |
08:45:27 | * | solitudesf quit (Ping timeout: 246 seconds) |
08:45:27 | Araq | latency is more important though for Nim, given its focus |
08:46:01 | Araq | and considering the competition, C# is not a slug, for example |
08:47:26 | Araq | as is memory overhead, people want Nim for embedded device |
08:47:29 | Araq | s |
08:48:42 | GordonBGood | Yes, it's not a problem for many, and as an alternate when latency doesn't matter, we can offer boehm |
08:49:19 | GordonBGood | Your NFC even includes possible avenues to investigate about alternative solutions to cyclic data |
08:49:40 | Araq | yeah, =trace is likely coming |
08:49:54 | GordonBGood | Yeah, I see the stub for it in the code |
08:50:02 | Araq | and then we have a pretty unique design too |
08:50:27 | GordonBGood | I like it, as =trace follows along the design of the other "hooks" |
08:50:32 | Araq | schedule the expensive local cycle collection on your own if you create cycles, it's still memory safe |
08:51:04 | GordonBGood | Yeah, I'm starting to like it a lot, if it all works out as we see it now |
08:51:34 | Araq | also what I noticed: inside objects 'owned ref' should be the default |
08:51:48 | Araq | and also for return types |
08:52:16 | Araq | with .cursor these are owned refs and only the weak pointers are annotated, the right defaults |
08:52:17 | GordonBGood | Yes, that's the way I see it, too, once we start to combine the ideas of arc and `owned` |
08:52:33 | Araq | no, I mean this bothered me about B/D |
08:52:59 | GordonBGood | I still have to think more about how .cursor is applied, but I'm starting to see it |
08:53:02 | Araq | it claims unowned refs should be the default, but it's actually close to 50% |
08:53:34 | Araq | or maybe to 30%, 'owned' sneaks into quite a bit |
08:53:44 | GordonBGood | Yeah, I think we are moving well beyond the basic ideas of B/D |
08:54:00 | GordonBGood | but the basic `owned` idea still applies |
08:55:15 | Araq | how so? |
08:55:41 | Araq | I mean, I hope we can combine it somehow but so far I'm not seeing it |
08:56:38 | GordonBGood | You still apply the `owned` idea where it can help inside objects, maybe we can think of another way of containing it, with an "escape" method when it doesn't really work? |
08:56:45 | * | nif quit (Quit: ...) |
08:56:54 | * | nif joined #nim |
08:57:52 | GordonBGood | Anyway, we have time for those considerations, make arc with the =trace or whatever extensions work first; I think many will be happy with just that, as they shouldn't have to change their library code maybe at all |
08:59:59 | GordonBGood | So far, our arc seems to be better than Swift's and easier to use than Rust's, I think that is our customers biggest concern |
09:01:21 | GordonBGood | Our destructors are maybe the very best way of including move/copy/destroy and now trace sematics - fairly concise, yet very powerful |
09:02:00 | GordonBGood | ^our "hooks" we should likely say |
09:03:07 | Araq | today I learned Swift actually distinguishes between @escaping and not escaping closures |
09:03:32 | Araq | non-escaping closures are even the default, helps them optimize FP code |
09:03:35 | Araq | very interesting |
09:03:53 | Araq | it's a bit like 'sink proc' vs 'proc' |
09:04:02 | GordonBGood | Yeah, it won't work without it, and one has to help it distiquish when one needs the escaping ones manually |
09:04:39 | GordonBGood | Yes, it could be considered somehitng lsimilar to when want to use `sink` |
09:06:07 | GordonBGood | To use either properly, one has to be knowledgeable about how they are used |
09:07:22 | GordonBGood | Nim compiler is much smarter about figuring out when closure environments need to be lifted to the heap |
09:17:07 | * | Kevin5 quit (Remote host closed the connection) |
09:18:51 | * | Vladar joined #nim |
09:23:27 | * | letto quit (Quit: Konversation terminated!) |
09:25:01 | * | letto joined #nim |
09:31:21 | * | clyybber joined #nim |
09:36:58 | Araq | clyybber: er, stupid question: did we ever ensure object constructors work with '=' and '=sink' ? |
09:37:41 | * | Jesin quit (Ping timeout: 265 seconds) |
09:43:07 | FromGitter | <mratsim> btw, is it intentional that we can do "result = move foo" but not "result = sink foo" |
09:44:26 | FromGitter | <mratsim> Also regarding gc:arc I don't see an issue, but we might want a Rc / Arc distinction so that when we switch to --threads:on by default we can choose which types pay the Atomic tax |
09:44:49 | FromGitter | <mratsim> and ref would be default GC |
09:45:15 | Araq | what is 'result = sink foo'? |
09:45:19 | FromGitter | <mratsim> that complexify a bit stuff but the default is good enough and it doesn't prevent finding more perf |
09:45:34 | FromGitter | <mratsim> when you append to a collection |
09:45:35 | Araq | you are supposed to use 'result = move foo' |
09:45:50 | FromGitter | <mratsim> but foo needs to be var in that case |
09:45:55 | Araq | and a move is not a =sink, a move is a =sink + wasMoved |
09:45:56 | FromGitter | <mratsim> and my foo is sink |
09:46:13 | Araq | then you should use plain assignment |
09:46:25 | Araq | result = foo # moved for 'foo: sink T' |
09:49:57 | FromGitter | <mratsim> Also currently with have supportsCopyMem(T) that can be used for types that are thread-safe i.e. we can copy them and send them to a channel. ⏎ ⏎ We might need a tag for types that are thread-safe in the sense that we can pass ownership or a pointer to them through a channel |
09:50:15 | FromGitter | <mratsim> or a concept or something. |
09:50:43 | FromGitter | <mratsim> I really don't understand the magic in channels.nim that sends seq and strings though :p |
09:53:17 | clyybber | Araq: Yeah, afaik |
09:53:41 | clyybber | I mean we treat the arguments like sink args |
09:56:17 | * | krux02 joined #nim |
10:11:58 | FromDiscord | <kodkuce> how to use run forwer, i dont wnat to block thread , https://play.nim-lang.org/#ix=21s5 |
10:13:32 | FromDiscord | <kodkuce> wait for works np but duno how to use runforewer |
10:13:51 | Araq | clyybber: but Obj(field: x) doesn't call '=sink', does it? it copyMem's foo into 'field' and does 'wasMoved(x)' |
10:14:10 | Araq | it's not transformed into 'o.field = x' |
10:14:45 | Araq | not that it's bad, it's good but the spec must reflect it |
10:17:06 | FromDiscord | <kodkuce> give me power |
10:17:22 | Araq | runForever is for you main program |
10:17:29 | Araq | when you write a server |
10:17:47 | Araq | since it runs forever there are no other places where you can call it... |
10:18:35 | FromDiscord | <kodkuce> so thats is my main program |
10:18:41 | FromDiscord | <kodkuce> but how to call it |
10:18:49 | FromDiscord | <kodkuce> i dident get what you wanted to say at all |
10:19:16 | Araq | I didn't understand your question either |
10:19:30 | Araq | runForever() # how to call it. |
10:19:32 | FromDiscord | <kodkuce> my question is how to execute run forewer |
10:19:48 | FromDiscord | <kodkuce> yes how to use runForever() |
10:19:56 | FromDiscord | <kodkuce> it runs some proc forewer right? |
10:20:49 | FromDiscord | <kodkuce> there is server.serve and i will need to run gamelogic in async too for gamelogic, my plan was to put it in runforewer |
10:21:48 | FromDiscord | <kodkuce> oh i think i got what you wanted to say i just call runForewer() whitout any proc as argument |
10:24:03 | FromDiscord | <kodkuce> tough hmm still dont get how to make 2 async procs run forewer, guess need to read up more |
10:25:15 | clyybber | Araq: It all goes through destructiveMoveVar when possible, so yeah. |
10:26:18 | Araq | so it does call '=sink'? |
10:26:23 | clyybber | Nope |
10:26:31 | clyybber | But neither do other sink args |
10:26:43 | clyybber | But yeah, the spec should be more clear on that part. |
10:27:01 | Araq | hmm ok |
10:27:12 | FromDiscord | <itmuckel> Hey. I wanted to look into https://github.com/PMunch/nimlsp. It doesn't work on Windows, so I created a small fix like this: |
10:27:12 | FromDiscord | <itmuckel> ```nim |
10:27:12 | FromDiscord | <itmuckel> when system.hostOS == "windows": |
10:27:12 | FromDiscord | <itmuckel> storage = getEnv("TEMP") |
10:27:12 | FromDiscord | <itmuckel> else: |
10:27:13 | FromDiscord | <itmuckel> storage = "/tmp/nimlsp" |
10:27:13 | FromDiscord | <itmuckel> ``` |
10:27:14 | FromDiscord | <itmuckel> |
10:27:17 | FromDiscord | <itmuckel> Now, when I compile it with `nim c nimlsp.nim` it runs fine, but when I use `nimble build` I end up with the wrong path. How can that be? |
10:27:20 | clyybber | Btw, it has worked like that forever, at least at the time where I first looked at injectdestructors |
10:27:43 | clyybber | Araq: Though I think we could replace the copyMem with a =sink call if you want? |
10:27:59 | Araq | why would we do that? |
10:28:12 | clyybber | I don't know :D |
10:28:17 | Araq | lets update the spec instead |
10:28:22 | clyybber | Yeah |
10:30:19 | * | solitudesf joined #nim |
10:30:46 | FromGitter | <mratsim> I put my thoughts on a threading API in a gist so that I don't forget them and we can tackle that after async + destructors is solved: https://gist.github.com/mratsim/cb088bed2d69aa691c87360472e4bd7f |
10:39:39 | PMunch | itmuckel, could you try to add a `static: echo system.hostOS` and then run nimble build with the verbose flag? |
10:39:58 | PMunch | Just to see what it is set to |
10:45:23 | FromDiscord | <itmuckel> @PMunch `nimble --verbose build` shows now output 🤔 |
10:46:18 | PMunch | Try nimble build --verbose |
10:47:36 | PMunch | Oh wait, `nimble build --debug` |
10:50:07 | FromDiscord | <itmuckel> system.hostOS is windows |
10:51:11 | PMunch | That's strance |
10:52:37 | PMunch | Is your "TEMP" variable set to /tmp/nimlsp? :P |
10:52:50 | FromDiscord | <itmuckel> 😅 |
10:53:20 | FromDiscord | <itmuckel> Also checked that in the static output, it's AppData/Local or somethin similar |
10:54:41 | PMunch | By the way, for future reference, please don't paste code into Discord |
10:54:56 | PMunch | It comes through as a long multiline message on IRC |
10:55:21 | FromDiscord | <itmuckel> But it is a multiline message 😄 |
10:57:01 | PMunch | Yeah, but on IRC we prefer paste-site links |
10:57:20 | FromDiscord | <itmuckel> What is that? |
10:57:27 | narimiran | on irc is not "a long multiline message", it is multiple single line messages |
10:57:29 | PMunch | ix.io/pastebin/hastebin/etc. |
10:57:37 | FromDiscord | <itmuckel> ah |
10:57:37 | PMunch | narimiran, true |
10:57:59 | FromDiscord | <itmuckel> Oh that sucks of course |
11:01:26 | FromDiscord | <itmuckel> Okay, I had changed `storage` back from a variable to a compile time constant. Now it does, what it should. 🙂 |
11:01:47 | FromDiscord | <itmuckel> Why are you using IRC instead of Discord? |
11:07:25 | Araq | we have neckbeards, never had a single unique creative thought ever and don't use anything invented after 1970 |
11:08:34 | clyybber | itmuckel: like the simplicity |
11:09:14 | Araq | "await (or fetch or sync) is better than ^" ... blasphemy! |
11:09:25 | clyybber | also I'm getting "ELEVATED API ERRORS" when trying to log into discord |
11:09:58 | clyybber | Araq: Is ^ a syntactic sugar for await? |
11:11:08 | FromDiscord | <Clyybber> @itmuckel now it works.. |
11:12:07 | FromDiscord | <itmuckel> 😄 |
11:28:59 | Araq | clyybber, it's future.read |
11:29:29 | FromGitter | <mratsim> @Araq, I think I am missing something with destructors, how do you enforce transfer of ownership for a proc? it seems like "sink" discourages but may copy. Will it be enforced in the future (so we need a warning) or do we need a new "take" keyword? |
11:29:58 | Araq | to enforce moving you have to mark your '=' operator as .error |
11:30:00 | FromGitter | <mratsim> and maybe a give in that case for return values :P |
11:30:46 | FromGitter | <mratsim> that doesn't really work for collections that would take a hint for example |
11:30:50 | FromGitter | <mratsim> int* |
11:31:35 | Araq | it does really work. |
11:32:07 | Araq | the existing collections need to be patched to use 'sink' parameters |
11:32:19 | Araq | we haven't done this yet :-( |
11:32:58 | FromGitter | <mratsim> ```code paste, see link``` ⏎ ⏎ ^ this compiles [https://gitter.im/nim-lang/Nim?at=5dc946eaeeb63e1a839306a6] |
11:33:33 | FromGitter | <mratsim> I want to ensure statically that it's an error |
11:33:45 | FromGitter | <mratsim> sink/move/take/give keywords are fine by me ;) |
11:36:50 | Araq | create a type where = is .error |
11:37:08 | Araq | no idea why it has to work with 'int'. |
11:39:28 | PMunch | itmuckel, you can assign storage within the same const block as those other variables by the way. Just do `storage = when hostOS == "windows": getEnv("TEMP") else: "/tmp/nimlsp"` |
11:39:51 | FromGitter | <mratsim> also unrelated but for documentation having move in either the return type or the tags (maybe tags, less noisy) would be useful. ⏎ ⏎ This library (used in LLVM Polly) use isl_give isl_take isl_keep macros as annotation about ownership for high-level wrappers ⏎ ⏎ https://github.com/Meinersbur/isl/blob/master/isl_schedule_tree.c#L47-L71 [https://gitter.im/nim-lang/Nim?at=5dc94887c26e8923c404fa41] |
11:40:08 | * | nif quit (Quit: ...) |
11:40:17 | * | nif joined #nim |
11:43:30 | * | nif quit (Client Quit) |
11:43:39 | * | nif joined #nim |
11:46:49 | Araq | mratsim: the design has been through 3 iterations and the last thing we need is even more annotations |
11:48:01 | Araq | we already have var/sink/lent to express every property of a container's operations with the exception of 'kill T' parameters that we don't know how to design |
11:48:29 | * | rockcavera joined #nim |
11:52:37 | FromGitter | <mratsim> also it seems like the following compiles with or without gc:destructors |
11:52:48 | FromGitter | <mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dc94b9050010612b29b03cf] |
11:54:05 | clyybber | mratsim: WHy should it not? |
11:54:11 | clyybber | Every assignment is made a sink |
11:54:14 | clyybber | =sink |
11:54:24 | FromGitter | <mratsim> ah I see |
11:55:03 | FromGitter | <mratsim> yes it works fine then |
11:58:21 | clyybber | hmm, your mutating int issue is weird |
11:58:52 | clyybber | Araq: Correct me if I'm wrong, but didn't we say that sink params don't have to be passed by ref? |
11:59:29 | * | endragor quit (Remote host closed the connection) |
12:02:03 | PMunch | Hmm, interesting issue |
12:02:56 | PMunch | I'm writing a DLL for a C program. It supports multi-threading, and it will call procedures from the DLL in random threads. |
12:03:50 | PMunch | I tried with --gc:boehm and I get "Collecting from unknown thread" and with --threads:on and setupForeignThreadGC() and tearDownForeignThreadGC() it gets random segfaults and such |
12:05:38 | PMunch | Aha, it seems like there is a combination of using async.. |
12:12:42 | * | ng0 joined #nim |
12:15:36 | clyybber | narimiran: My PR isn't ready yet, need to fix some error msgs |
12:15:48 | Araq | clyybber, yup, they are not |
12:15:59 | narimiran | clyybber: ah, i've restarted the CI :) |
12:16:10 | clyybber | narimiran: I noticed :) |
12:16:28 | clyybber | Araq: Hmm, I'll go inspect the C code |
12:16:39 | narimiran | at least one test should now be green (the one in packages) :) |
12:17:05 | PMunch | Hmm, I can't use a regular HttpClient with threads on either? |
12:17:15 | clyybber | narimiran: treeform/ws? |
12:17:18 | narimiran | yep |
12:17:39 | clyybber | nice |
12:17:58 | narimiran | i'll leave the rest of failing tests to you :) |
12:18:07 | FromDiscord | <itmuckel> @PMunch awesome, thank you! |
12:18:20 | clyybber | narimiran: I'm on it :) |
12:18:55 | PMunch | itmuckel, there's a lot you can do like that: https://peterme.net/tips-and-tricks-with-implicit-return-in-nim.html |
12:20:54 | clyybber | mratsim: Hah, I was misreading your snippet, thought the echo was outside of foo, and was like wtf |
12:26:56 | PMunch | Hmm, can I run an asyncdispatcher in a thread and pass tasks to it over a channel? |
12:32:11 | livcd | does anyone have some complex scraper in Nim ? I only saw mashingan's manga scraper |
12:57:19 | * | endragor joined #nim |
13:01:39 | * | endragor quit (Ping timeout: 246 seconds) |
13:02:57 | Araq | PMunch, I think so but the tasks are deepcopied |
13:04:03 | PMunch | Well I just need to send some HTTP requests, so I can pass the data I need to send over a channel and just keep everything on the thread |
13:10:55 | PMunch | Ugh, I get random segfaults.. |
13:12:33 | PMunch | How can I check which GC is being used in a `when` check? |
13:12:57 | Araq | when compileOption("gc", "refc") |
13:12:59 | Araq | I think |
13:14:55 | PMunch | Hmm, so with boehm it now just randomly freezes.. |
13:15:04 | PMunch | And with the default GC I get random segfaults.. |
13:19:30 | * | tklohna joined #nim |
13:20:21 | Araq | do you cast to pointer? |
13:20:48 | PMunch | Pass what to pointer? |
13:20:58 | FromGitter | <kaushalmodi> Araq: PMunch's case seems similar to my case? |
13:21:21 | FromGitter | <kaushalmodi> PMunch: Do you exportc Nim procs to C side? |
13:21:33 | FromGitter | <kaushalmodi> and have the proc take inputs via ptrs from C side, etc? |
13:21:42 | PMunch | Yup |
13:22:17 | FromGitter | <kaushalmodi> In my case, --gc:none is the only option until --gc:destructors is ready |
13:23:13 | PMunch | Hmm wait, now I get segfaults in my non-threaded version as well.. |
13:23:18 | PMunch | Must've messed something up |
13:23:29 | PMunch | It of course doesn't always happen either |
13:24:03 | PMunch | Oh wait, nvm I had --threads:on in my .cfg file |
13:25:04 | FromGitter | <kaushalmodi> PMunch: I do not have threads enabled but the C app that uses the Nim exported procs is threaded and also does some "non-C-style stack switching" |
13:25:15 | PMunch | Hmm |
13:25:37 | PMunch | Not really sure what the host program here uses TBH |
13:25:49 | PMunch | Which application is it that you're interfacing with? |
13:25:59 | FromGitter | <kaushalmodi> it's a SystemVerilog compiler |
13:26:12 | FromGitter | <kaushalmodi> I can point you to earlier valgrind logs to you |
13:26:37 | PMunch | Hmm, I think disabling the GC would be a massive pain for me though.. |
13:26:52 | PMunch | Since I have to read some config files and send HTTP requests.. |
13:27:22 | FromGitter | <kaushalmodi> one of such valgrind logs from my experiements: http://ix.io/216J/text |
13:28:43 | FromGitter | <kaushalmodi> , and http://ix.io/216M/text |
13:30:11 | PMunch | Hmm, the program I work with can disable threads. And that seems to work well with async |
13:33:16 | * | Kaivo joined #nim |
13:33:39 | * | tklohna quit (Ping timeout: 268 seconds) |
13:33:47 | FromGitter | <kaushalmodi> PMunch: For GC support in threaded apps, have you tried what nimpy does? https://irclogs.nim-lang.org/07-11-2019.html#03:30:51 |
13:34:05 | FromGitter | <kaushalmodi> i.e. use `setupForeignThreadGC()` |
13:34:53 | * | tane_ joined #nim |
13:35:54 | PMunch | Yes |
13:36:20 | PMunch | I have setup/teardown in all the procs that might get called by the random threads |
13:36:54 | PMunch | --gc:none and just ignoring all the warnings made it stop crashing |
13:37:03 | PMunch | So at least I know that it's the GC that causes this.. |
13:37:20 | FromGitter | <kaushalmodi> PMunch: That was the limit of all GC knowledge I gained in past week :D |
13:37:31 | FromGitter | <kaushalmodi> I ended with with --gc:none and ignoring the GC warns too |
13:38:08 | PMunch | I can't do that though.. |
13:39:00 | FromGitter | <kaushalmodi> PMunch: Here's a minimal example to create the crash in my case: https://github.com/kaushalmodi/nim-systemverilog-dpic/blob/master/gc_crash_debug/libdpi.nim |
13:40:25 | PMunch | Hmm, I guess I could create my own thread, then just pass on the pointer to the C data to that single thread as the only thing I do in the C code |
13:40:45 | PMunch | So I essentially make my code single-threaded, but allows the host program to be multi-threaded |
13:41:00 | Araq | "--gc:none so at least I know that it's the GC causing it" |
13:41:00 | shashlick | @kaushalmodi are you able to create a simple example for the crash |
13:41:08 | Araq | that's not how it works... |
13:41:29 | shashlick | This is just the callback, your caller is sv so it isn't easy to reproduce |
13:41:31 | FromGitter | <kaushalmodi> shashlick: that's what I linked in the last link |
13:41:38 | FromGitter | <kaushalmodi> shashlick: yes |
13:42:01 | shashlick | If you can create a C or Nim caller to repro it will help make progress |
13:42:32 | FromGitter | <kaushalmodi> shashlick: if I do all the groundwork of setting up a way to get you the SV compiler, would it help? |
13:42:49 | FromGitter | <kaushalmodi> Araq: I talked to the SV compiler vendors and they will give away a license to help debug this GC issue |
13:42:55 | PMunch | Araq, no? If the GC is not running and that makes the program stable (although leaking memory) isn't that an indicator that the GC is causing the crashes? |
13:43:20 | Araq | it's a good indicator but since you're in memory unsafety land you can never be sure |
13:43:22 | shashlick | I'm no expert but having a simple way will definitely eliminate a lot of complexity |
13:43:28 | PMunch | My issue is with Unbound, an open source DNS server, that might be easier? |
13:43:42 | Araq | the bugs might still be there but now you get away with them |
13:44:02 | shashlick | Further, can you try older versions of Nim to see if something broke recently |
13:44:12 | PMunch | http://ix.io/21sN |
13:44:13 | disbot | ^ play at https://play.nim-lang.org/#ix=21sN 😏 |
13:44:29 | PMunch | Hmm, that seems, odd |
13:44:55 | PMunch | It is consistent though.. |
13:44:55 | FromGitter | <kaushalmodi> shashlick: This GC issue had always been there for me.. just that I found some time to dive into it |
13:45:07 | shashlick | Another thing, both of you are using nimterop - I'm betting it has something to do with the wrappers |
13:45:09 | FromGitter | <kaushalmodi> I was holding off earlier as I had never used gdb and valgrind |
13:45:24 | FromGitter | <kaushalmodi> shashlick: that example I linked above does not use nimterop |
13:45:38 | FromGitter | <kaushalmodi> it's a plain Nim exportc proc doing just string echoes |
13:45:41 | PMunch | shashlick, I'm not |
13:45:43 | shashlick | No where in the app? |
13:46:00 | shashlick | Well maybe that makes me feel better :p |
13:46:04 | FromGitter | <kaushalmodi> :) |
13:46:34 | shashlick | Try 0.19.6 |
13:46:51 | * | tklohna joined #nim |
13:47:20 | FromGitter | <kaushalmodi> shashlick: I have been experimenting with Nim/SV interface since 0.18.x.. never had success |
13:47:28 | FromGitter | <kaushalmodi> i.e. never had success with GC enabled |
13:48:35 | shashlick | Ok I understand how frustrating it is |
13:48:50 | shashlick | Took me months to fix my editor crash |
13:48:59 | shashlick | But it was worth it since it made Nim better |
13:49:06 | FromGitter | <kaushalmodi> but I am glad that --gc:none works fine |
13:52:32 | * | nsf quit (Quit: WeeChat 2.6) |
14:02:06 | PMunch | Hmm, I seem to have been able to get it working now |
14:02:13 | PMunch | With the garbage collector |
14:03:15 | * | GordonBGood quit (Ping timeout: 268 seconds) |
14:05:16 | PMunch | Of course actually verifying that it will never crash is a whole different beast entirely.. |
14:23:59 | * | kungtotte joined #nim |
14:25:20 | shashlick | @kaushalmodi |
14:25:36 | FromGitter | <kaushalmodi> yes? |
14:25:43 | shashlick | i just tried with a minimal main function and with useNimRtl, it works fine |
14:25:53 | shashlick | do you have any other nim components in your test |
14:26:00 | FromGitter | <kaushalmodi> I have tried that too; didn't work |
14:26:12 | FromGitter | <kaushalmodi> no, that's the only .so from Nim that links with the C app |
14:26:26 | Araq | shashlick, kaushalmodi's problem is unfixable without --gc:destructors as far as I can tell |
14:26:58 | shashlick | it's just a standard dll scenario - what's the need for destrutors? |
14:27:06 | shashlick | this means you cannot use a nim dll with anything? |
14:27:40 | PMunch | well I got it working |
14:27:42 | clyybber | shashlick: No, the code he embedds it in does stack switching |
14:27:42 | Araq | kaushalmodi uses C code that does wild and crazy stack switching |
14:27:45 | PMunch | At least it seems to be working |
14:28:04 | FromGitter | <kaushalmodi> shashlick: same crash when using libnimrtl: https://gitter.im/nim-lang/Nim?at=5dc38ff83f4ea333f2c531c8 |
14:28:04 | Araq | stack switching is not even support by the otherwise really conservative Boehm GC. |
14:28:21 | Araq | it's fair to assume that PMunch has a different problem |
14:28:50 | PMunch | Yeah, mine seems to have been with getEnv and some other "regular" threading issues |
14:29:03 | FromGitter | <kaushalmodi> yes, to what Araq said |
14:29:06 | shashlick | okay well then beyond my pay grade |
14:29:28 | PMunch | Just using GDB to see where it crashed I was able to move everything to the initialiser or into a background thread :) |
14:30:11 | PMunch | The AsyncHttpClient running in the background thread seems to do some really odd things though |
14:31:17 | PMunch | It's almost like it ends up sending garbled requests.. |
14:33:29 | PMunch | Ah switching a poll for a drain fixed it |
14:37:35 | disruptek | PMunch: i wasn't able to reproduce your problem with defer inside a template. |
14:39:03 | PMunch | What do you mean? |
14:39:14 | PMunch | I solved that in a better way by the way |
14:39:42 | disruptek | what'd you come up with? |
14:39:43 | Araq | so ... my valgrind doesn't support --exit-on-first-error and apparently I cannot update my version without an OS update. in what universe is this distribution thing a good idea? |
14:40:31 | disruptek | http://ix.io/21sW/nim |
14:40:32 | disbot | ^ play at https://play.nim-lang.org/#ix=21sW 😏 |
14:40:40 | PMunch | disruptek, http://ix.io/21sX/nim |
14:40:41 | disbot | ^ play at https://play.nim-lang.org/#ix=21sX 😏 |
14:40:41 | clyybber | Araq: What OS? |
14:40:58 | Araq | Ubuntu |
14:41:00 | FromGitter | <Vindaar> ... rolling release distros ftw ... |
14:41:22 | disruptek | Araq: says the guy who wanted nim distributions... |
14:41:27 | Araq | "rolling release" == "how it always worked anywhere else" |
14:41:35 | clyybber | Araq: Ugh, yeah. It beats me how someone once thought that it would be a good idea to tie package updates to the os. |
14:41:37 | Araq | disruptek, I'm aware :P |
14:42:43 | Araq | ok I give up, you tell me which Linux to use |
14:42:55 | clyybber | void linux |
14:42:59 | disruptek | gentoo |
14:43:01 | FromGitter | <Vindaar> +1 for void |
14:43:11 | clyybber | void is simple straight forward no bs |
14:43:12 | Araq | condition: it must run my VirtualBox |
14:43:19 | Araq | *in my |
14:43:44 | disruptek | void also apparently swaps dash for sh, so have fun with that. |
14:43:50 | solitudesf | im void shill too |
14:43:54 | disruptek | or, sh for dash. |
14:44:17 | clyybber | xbps-install bash |
14:44:20 | solitudesf | why is that a problem? |
14:44:22 | clyybber | chsh |
14:44:24 | clyybber | problem solved |
14:44:31 | solitudesf | bash is installed by default anyway |
14:44:34 | disruptek | i'm just questioning the wisdom. |
14:44:34 | clyybber | Araq: It does |
14:44:49 | disruptek | we had a user here yesterday who couldn't make nimble work because ~ != $HOME |
14:44:58 | clyybber | disruptek: You surely want to have it boot fast right? |
14:45:07 | disruptek | how fast is fast? |
14:45:19 | clyybber | faster than arch, if thats a metric |
14:45:26 | disruptek | not to this gentoo user. |
14:45:29 | clyybber | and arch switched to systemd for "faster booting" |
14:45:40 | clyybber | disruptek: gentoo: boot fast, get nothing done anyways |
14:45:54 | solitudesf | uh oh |
14:46:10 | Araq | https://a-hel-fi.m.voidlinux.org/live/current/ wtf man, no way I'll eat this |
14:46:11 | disruptek | i mean, you brought up boot speeds. 🤷 |
14:46:40 | clyybber | disruptek: Are you using gentoo? |
14:46:52 | disruptek | yeah. it's probably not the right choice for araq. |
14:47:08 | clyybber | disruptek: I assume you have a build server? |
14:47:46 | disruptek | for what? |
14:47:55 | clyybber | compiling? |
14:48:05 | disruptek | like, windows apps? |
14:48:06 | solitudesf | araq, go for manjaro is you want rolling release but with non-autistic installer |
14:48:09 | PMunch | Manjaro might work well. Simple install, rolling release |
14:48:14 | PMunch | Haha, yeah |
14:48:32 | clyybber | yeah, manjaro is great too |
14:48:39 | disruptek | i think arch is kinda the default dev os these days, isn't it? |
14:48:54 | shashlick | @Araq - am looking at https://github.com/nim-lang/nim/issues/12612 |
14:49:02 | shashlick | even if you remove async, it fails |
14:49:10 | clyybber | disruptek: compiling the programs you use? |
14:49:44 | disruptek | in what universe does it matter? also, i have a decently fast machine and a program called `ccache`. |
14:50:11 | disruptek | there's this new thing where you can run jobs in the background... |
14:50:42 | clyybber | oh well, my PC struggles just doing ./koch temp in the background |
14:51:52 | clyybber | with void I can compile from src and have binaries, and also I found it a lot easiert to get into than gentoo |
14:52:02 | disruptek | i guess i'm of the opinion that hardware is much cheaper to improve than software. |
14:52:42 | disruptek | if i hadn't been running gentoo for like 15 years, i probably wouldn't be running it now. |
14:52:57 | * | dddddd joined #nim |
14:53:54 | disruptek | although until this year, i hadn't run it on the desktop in a decade or so. |
14:54:17 | clyybber | hardware requires money, software doesnt :p |
14:54:30 | clyybber | s/^/improving |
14:54:37 | * | Vladar quit (Quit: Leaving) |
14:54:49 | disruptek | i guess if your time is free, sure. |
14:55:29 | clyybber | the nice thing is that software doesn't have to get improved by you |
14:55:48 | disruptek | believe me, you don't want me improving your software. |
14:55:50 | PMunch | Hmm, is there a package like getmac for Python in Nim? |
14:56:09 | clyybber | disruptek: I dunno, nimph looks pretty awesome |
14:56:24 | disruptek | get outta my private repos! |
14:56:49 | PMunch | nimph? |
14:57:14 | disruptek | package manager i'm building. |
14:57:19 | PMunch | Ah |
14:57:53 | FromDiscord | <kodkuce> its heppening https://my.pcloud.com/publink/show?code=XZ5qgQkZPJWaJplhfBFBCBGI5pRkaV9N2bP7 nim + Godot |
14:58:37 | FromDiscord | <kodkuce> just a test ofc , long way too magic |
14:58:52 | Araq | disruptek, can nimph run .nimble files? |
14:59:08 | disruptek | it has seamless co-operation with nimble. |
14:59:24 | Araq | ha |
14:59:27 | disruptek | don't bother looking at the readme though. |
15:00:04 | clyybber | Araq: Why wont you "eat" void? |
15:00:09 | Araq | so does it run .nimble files or not? |
15:00:21 | disruptek | nope. |
15:00:45 | disruptek | it just runs `nimble dump` to interpret them because making .nimble code was a stupid idea. |
15:01:10 | Araq | it really wasn't. |
15:01:53 | Araq | I've seen enough "declarative" TOML and cmake files to want something more flexible |
15:02:24 | disruptek | separation of concerns. |
15:02:40 | federico3 | any tutorial on compiling to js? |
15:02:42 | Araq | buzzwords. |
15:02:46 | PMunch | What, .nimble as code is brilliant :) |
15:02:59 | disruptek | i'm using toml. if you want to run nimscript as part of your build stuff, you can do that with nimble. |
15:03:03 | PMunch | federico3, `nim js -o:myoutput.js myinput.nim` |
15:03:48 | * | PMunch quit (Quit: Leaving) |
15:03:56 | Araq | in fact, this whole idea of crippled, declarative code is a deadend. CSS is getting support for variables, SQL is now Turing complete and regexes became NP complete with backreferences. |
15:04:23 | shashlick | i ran into the same thing with nimgen which was an ini file |
15:04:46 | federico3 | any flag to minify and clean up the output? |
15:04:57 | disruptek | if what you want is dynamic, then you can use a dynamic language to specify it. |
15:05:27 | disruptek | i refuse to run nimble except as needed for interop. |
15:05:48 | Araq | so run 'nim e' on the .nimble file, nimble does nothing else anyway |
15:06:17 | Araq | federico3, not really except for all the existing JS tools that give you that. |
15:06:28 | disruptek | i might, but tell me again why i should use a full pl to store declarative data? |
15:06:41 | disruptek | we're talking about manifests, lockfiles. |
15:07:00 | disruptek | i would rather use dhall. |
15:07:18 | Araq | well lockfiles are different I guess but a .nimble file is not a lockfile |
15:07:28 | disruptek | no it is not. |
15:07:33 | Araq | I don't know what dhall is. |
15:07:43 | FromGitter | <iffy> disruptek: I like Python's syntax: ⏎ ⏎ ```@deco1 ⏎ @deco2 ⏎ proc something() = ⏎ echo "foo"``` [https://gitter.im/nim-lang/Nim?at=5dc9793eeeb63e1a839490e4] |
15:08:03 | disruptek | iffy: yes, but it must be parseable (not semantically valid, but parsed) by nim. |
15:08:11 | disruptek | Araq: https://dhall-lang.org/ |
15:08:37 | FromGitter | <iffy> Well, that's what I meant when I asked if anyone had considered adding it to Nim (I meant adding the syntax to the parser so that it was valid) |
15:09:01 | disruptek | iffy: the syntax isn't a constraint; show us what you want it to look like. |
15:09:34 | FromGitter | <alehander92> oh God, new week! |
15:09:39 | FromGitter | <alehander92> i also like the decorator syntax |
15:09:59 | disruptek | i mean, i'm pretty sure you'd be satisfied with something parseable -- the question is, does it speak to the user? |
15:10:10 | FromGitter | <alehander92> i think one can kinda still do it with a macro |
15:10:35 | FromGitter | <iffy> Yes, you can definitely achieve the same effect with macros; it's the syntax of Python that's nice |
15:10:36 | * | adeohluwa joined #nim |
15:10:38 | shashlick | @Araq - nim e won't work on a .nimble file |
15:11:28 | FromGitter | <iffy> disruptek: I don't think I understand what you mean |
15:12:03 | disruptek | iffy: show use some uses in nim to get us excited about the feature. |
15:12:18 | * | tane_ quit (Quit: Leaving) |
15:12:39 | FromGitter | <alehander92> i think just using it instead of the pragma syntax is something that might look ok |
15:12:45 | FromGitter | <alehander92> but its subjective |
15:13:01 | Araq | "Dhall is programmable, but NOT Turing-complete." more like "we don't understand Turing completeness and confused it with sandboxing" |
15:13:38 | FromGitter | <iffy> oh; how I'd use it? Well, to make something like the Python click library: https://click.palletsprojects.com/en/7.x/ is one example |
15:13:48 | clyybber | alehander92, iffy: I like that @ is usable as an operator |
15:14:13 | FromGitter | <alehander92> but it would be still usable |
15:14:14 | disruptek | Araq: you're right; `nim e` is better. 🙄 |
15:14:45 | disruptek | iffy: you really have to come up with a new example. |
15:14:47 | FromGitter | <alehander92> sorry clyybber you're right it would be less usable |
15:14:56 | FromGitter | <alehander92> but at least as infix |
15:15:03 | FromGitter | <alehander92> or @[] i imagine it would be still ok |
15:15:09 | clyybber | cat buildscript | sed 's/while/don'tusewhile/g' |
15:15:10 | FromGitter | <iffy> The problem that first made me consider it was, tagging procs to be associated with one kind of "build" or another so that when I ran "build A" it would run all the procs marked with @buildA; and likewise with buildB |
15:15:18 | disruptek | alehander: pragmas already support that. |
15:15:21 | clyybber | cat buildscript | sed 's/while/don'tusewhile/g' | nim e /dev/stdin |
15:15:22 | FromGitter | <alehander92> disruptek exactly |
15:15:25 | clyybber | There you go |
15:15:28 | clyybber | Not turing complete |
15:15:34 | FromGitter | <alehander92> i think the usecase is "decorator-like syntax for pragmas" |
15:15:49 | disruptek | right. |
15:15:53 | FromGitter | <iffy> I'm not advocating using @ necessarily; I just like that Python's decorators live on a line by themselves above the func they mutate |
15:15:55 | clyybber | (and set the max_recusrions to very low) |
15:16:15 | clyybber | iffy: They are basically java annotation |
15:16:17 | clyybber | s |
15:16:34 | clyybber | I think java had them longer, not sure though |
15:19:03 | Araq | clyybber, Nim's VM has an instruction count limit anyway :P |
15:19:27 | Araq | cannot run more than 10 million loop iterations |
15:19:53 | clyybber | Ah right :) |
15:19:56 | disruptek | or 40,000,000 if you're using my compiler, because it's the only way to build large apis. so, that makes sense. |
15:26:48 | * | narimiran quit (Read error: Connection reset by peer) |
15:27:03 | disruptek | Araq: https://github.com/dhall-lang/dhall-lang/wiki/Safety-guarantees |
15:27:43 | disruptek | doesn't appear to be turing complete to me. |
15:28:11 | * | narimiran joined #nim |
15:29:37 | FromGitter | <alehander92> @iffy one option is to do something like ⏎ ⏎ ```@count(..): ⏎ func e(..)``` [https://gitter.im/nim-lang/Nim?at=5dc97e61bbdf5f17b420be55] |
15:30:26 | FromGitter | <alehander92> where count is a simple macro, but not sure if one can make `@` noop |
15:31:05 | FromGitter | <alehander92> this gets messy with many decorators |
15:32:48 | FromGitter | <alehander92> so you can have ⏎ ⏎ ```@(count(2), ⏎ other(4)): ⏎ func e ``` [https://gitter.im/nim-lang/Nim?at=5dc97f20bbdf5f17b420be5c] |
15:33:01 | FromGitter | <alehander92> which expands to a serie of count(2): other(4): func |
15:33:03 | Araq | disruptek, and why does this matter for anything? |
15:33:26 | Araq | they argue they have restricted access to the environment (good!) |
15:33:27 | disruptek | hey, i have to take my wins where i can get them. |
15:33:56 | Araq | :-) |
15:34:37 | Araq | this year I learned Nim's biggest mistake |
15:34:40 | disruptek | today i can't install a nimble package without running nimscript. |
15:35:00 | Araq | want to know what it is? |
15:35:14 | disruptek | version 1.0? |
15:35:22 | disruptek | open-sourcing the compiler? |
15:35:32 | Araq | insufficient problem analysis. |
15:35:45 | disruptek | damn, i was way off. |
15:35:54 | Araq | and I figured I'm in good company, everybody else does it too |
15:36:30 | shashlick | please illustrate |
15:36:39 | Araq | like claiming "we are not TC" and then not going on how *precisely* this helps in analysing anything |
15:37:01 | Araq | instead they quickly change the topic to sandboxing. |
15:37:28 | disruptek | papers have been written, but instead you're ranting about a language you just discovered as if you'd read on the subject. |
15:37:35 | disruptek | insufficient problem analysis. |
15:37:58 | Araq | which papers have been written about the language? |
15:38:28 | disruptek | do i have to do your research for you? |
15:38:40 | * | nsf joined #nim |
15:40:05 | Araq | yup |
15:40:26 | disruptek | i think i'd rather accept your ignorance. |
15:41:50 | Araq | I read https://github.com/dhall-lang/dhall-lang/wiki/Safety-guarantees#turing-completeness fwiw |
15:42:28 | Araq | and it's as unconvincing as it always is. So yeah, great instead of an "arbitrary amount of time" it can only take 1000 years to evaluate |
15:42:48 | disruptek | look, you brought up "turing complete". |
15:42:56 | disruptek | i'm just informing you of your error. |
15:43:05 | disruptek | i never claimed that TC was important to me. |
15:43:34 | disruptek | i'm claiming that i don't want to give unfettered access to nimscript to my source code retrieval system. |
15:43:34 | Araq | yeah because it triggers me, almost always when TC comes up it's because of a deep misunderstanding about it |
15:43:45 | disruptek | i'm sorry about that. |
15:44:15 | FromGitter | <kaushalmodi> I've a question about converting a string to a "symbol" or identifier |
15:44:18 | FromGitter | <kaushalmodi> this works: https://play.nim-lang.org/#ix=21t9 |
15:44:47 | FromGitter | <kaushalmodi> but how do I have the `getProcPointer` accept a string arg that gets converted to the `adder` proc identifier? |
15:45:16 | Araq | disruptek, it's ok, I'm annoyed by my own bugs |
15:45:22 | FromGitter | <deech> Araq, langs like ATS have things like termination metrics on recursive functions. No absolute guarantees but you have some assurance that it converges. |
15:46:08 | Araq | ah and now I'm the bad ignorant guy. |
15:47:17 | clyybber | deech: ATS is such a weird lang |
15:47:19 | Araq | yeah, sure, prove that stuff terminates, I don't mind. But don't sell it to me as a "security" feature, I prefer "you can cancel it after X minutes". |
15:47:22 | FromGitter | <deech> The problem is that currently lang. ergonomics drops steeply as you add what you call problem analysis. |
15:47:41 | clyybber | deech: ATS3 has some nice syntax planned afaik |
15:47:44 | disruptek | just add tc to the list of araq triggers, right after symlinks. |
15:47:49 | clyybber | Which should help ergonomics |
15:48:31 | FromGitter | <deech> clyybber: I worked with ATS3, there's some cleanup like t@ype -> viewtype but it's still kind of a nightmare to use. |
15:48:39 | clyybber | Oh :( |
15:48:55 | clyybber | I love the commit messages though: Updated very very minorly... |
15:49:00 | clyybber | Or something along that line |
15:49:31 | clyybber | deech: I only discovered ATS because of your talk :) |
15:49:33 | FromGitter | <deech> But as Araq mentioned I think runtime analysis is completely ignored nowadays. |
15:50:18 | * | nif quit (Quit: ...) |
15:50:28 | * | nif joined #nim |
15:52:19 | Araq | gotta go, see you later |
15:52:42 | FromGitter | <kaushalmodi> Can someone help with https://gitter.im/nim-lang/Nim?at=5dc981cf6570b076740f7b5f ? |
15:54:12 | FromGitter | <Vindaar> @kaushalmodi one way: https://play.nim-lang.org/#ix=21tc |
15:55:46 | shashlick | @disruptek - i tagged irc by the way |
15:56:23 | FromGitter | <Vindaar> @kaushalmodi called via `getProcPointer(int, "adder")` then of course. Forgot to copy that line |
15:56:39 | disruptek | shashlick: huh? |
15:56:50 | shashlick | to 0.2.1 since it had your fixes |
15:57:04 | shashlick | created a tag so you don't need to install #head |
15:58:04 | FromGitter | <kaushalmodi> @Vindaar Yes, got that. thanks! |
15:58:16 | FromGitter | <kaushalmodi> This works |
15:58:31 | disruptek | shashlick: i don't get it... the bot is pointing at 0.2.1 and there's a tag for that. was there no 0.2.1 before? |
15:58:43 | FromGitter | <kaushalmodi> I'll tinker with how to get generics work with that |
15:58:55 | FromGitter | <kaushalmodi> may be create a generic proc wrapper around that? |
15:59:17 | shashlick | well, when i `nimble install irc`, it didn't work since it pulled 0.2.0 which was tagged in July or something |
15:59:25 | shashlick | so your fixes weren't in it and it didn't work with devel |
15:59:41 | shashlick | when i pulled #head it worked, so i created a 0.2.1 tag |
15:59:43 | disruptek | oh, there's a 0.2.1 tag but it's not marked as a release on github. |
15:59:54 | shashlick | i just created that today |
16:00:00 | FromGitter | <kaushalmodi> @Vindaar Actually I cannot have that string arg as static |
16:00:07 | disruptek | weird. i've been pointing at 0.2.1 since the 3rd of november. |
16:00:31 | shashlick | so since you installed it locally and the nimble file says 0.2.1, you were okay |
16:00:57 | disruptek | aha |
16:01:18 | disruptek | thanks 😊 |
16:01:59 | shashlick | okay back to working on my bot cause i have nothing else to do |
16:02:24 | FromGitter | <Vindaar> @kaushalmodi oh. I feared as much :P Do you have a finite list of procs? |
16:02:52 | FromGitter | <Vindaar> then you could always do: https://play.nim-lang.org/#ix=21td |
16:03:13 | FromGitter | <kaushalmodi> yes! That might work |
16:03:18 | * | tklohna quit (Ping timeout: 246 seconds) |
16:03:41 | shashlick | @disruptek - have you gotten it to work with ssl? |
16:03:50 | FromGitter | <kaushalmodi> @Vindaar: sorry, no :/ |
16:03:53 | disruptek | sure. |
16:03:59 | FromGitter | <kaushalmodi> SV is passing the string to Nim at run time |
16:04:11 | FromGitter | <Vindaar> and where do the procs being called come from? |
16:04:13 | disruptek | at least, iirc it does. |
16:04:31 | FromGitter | <kaushalmodi> @Vindaar I am trying to optimize this: https://github.com/kaushalmodi/nim-systemverilog-dpic/blob/master/chandle/libdpi.nim |
16:04:34 | shashlick | so i just pass -d:ssl and it works or some hoops? |
16:04:44 | disruptek | just pass -d:ssl. |
16:04:56 | FromGitter | <kaushalmodi> so that I do not need to hardcode "adder" in `getAdderProcHandle` and `callProc` |
16:05:17 | FromGitter | <iffy> Should the mingw64 from https://nim-lang.org/install_windows.html be able to compile 32bit executables? I'm having trouble, and will just switch to mingw32 if that's the recommended path. (I want to compile both 32 and 64 on the same machine) |
16:06:42 | FromGitter | <kaushalmodi> @Vindaar But your last example of that case statement should help optimize that code quite a bit |
16:07:36 | shashlick | @disruptek - no luck |
16:08:06 | FromGitter | <Vindaar> @kaushalmodi hmm. If you're worried about having to write too many of those lines one could always generate the case stmt from a macro. But I'm not quite following what it is you want / need to avoid |
16:09:14 | * | floppydh quit (Quit: WeeChat 2.6) |
16:09:21 | FromGitter | <kaushalmodi> @Vindaar May be I need a template too that auto-generates those .exportc. procs |
16:09:27 | * | narimiran_ joined #nim |
16:09:37 | FromGitter | <kaushalmodi> I am just brain storming on how I can generalize the code on Nim side |
16:10:17 | * | narimiran quit (Ping timeout: 268 seconds) |
16:12:12 | * | abm joined #nim |
16:12:36 | FromGitter | <Vindaar> plenty of ways, but I usually try not to generalize too early. Rather wait until a pattern emerges and then simplify that. The exceptions are the cases where I know exactly what I need |
16:15:09 | FromGitter | <kaushalmodi> @Vindaar Right.. this was born more out of curiosity if I can do that in Nim, and if so how |
16:15:38 | FromGitter | <kaushalmodi> I am thinking how I can make the SV/Nim API unchanged as more procs are added on the Nim side |
16:16:37 | shashlick | i don't think the nim irc package supports ssl |
16:16:48 | shashlick | even with -d:ssl, it doesn't compile any ssl related files |
16:17:00 | shashlick | okay maybe not, it does |
16:17:40 | disruptek | how do i repro? port/host? |
16:17:51 | disruptek | i'm using a bouncer iirc. |
16:17:53 | FromGitter | <Vindaar> @kaushalmodi then I suggest you add a few more procs and then think about it again, because by then you understand the constraints better. But I understand what you mean |
16:18:01 | shashlick | i am also connecting to znc in ssl mode |
16:18:20 | FromGitter | <kaushalmodi> @Vindaar yes, I am doing exactly that |
16:19:58 | * | disruptek waves at disbot. |
16:20:10 | * | disruptek whispers to disbot. |
16:20:12 | * | disbot quit (Remote host closed the connection) |
16:20:19 | FromGitter | <Vindaar> :) |
16:22:22 | shashlick | yep, -d:ssl does nothing really |
16:22:32 | disruptek | you're right. |
16:22:33 | shashlick | if i connect to freenode on 6667, it works fine |
16:23:18 | clyybber | !eval echo"HELLO DISBOT. HOW ARE YOU?" |
16:23:20 | NimBot | HELLO DISBOT. HOW ARE YOU? |
16:24:11 | disruptek | odd; i've been building with ssl and i guess i just have it pointing at a non-ssl port. |
16:24:29 | disruptek | the bouncer is local, so it doesn't matter. |
16:27:38 | FromDiscord | <krab4t> !eval rm -rf |
16:27:40 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: undeclared identifier: 'rm' |
16:27:42 | FromDiscord | <krab4t> hmm |
16:28:22 | disruptek | where did this bot come from? did i write it? |
16:28:32 | disruptek | i mean, the one you're using, shashlick. |
16:28:47 | shashlick | ya, i just removed your freedesktop portions |
16:28:58 | shashlick | but the nimble irc module doesn't wrap the socket or anything |
16:29:02 | disruptek | i wrote it from scratch? |
16:29:06 | shashlick | so it has no ssl support |
16:29:42 | shashlick | who knows, you probably started from one of the tests |
16:29:54 | disruptek | hmm. |
16:30:00 | * | adeohluwa quit (Remote host closed the connection) |
16:34:05 | shashlick | have to port from httpclient, bore |
16:37:17 | clyybber | !eval type E = enum a=1, b=high(int32)\ntype C = object case a: E\n of a: b: bool\n of b: i: int\nvar t=C(a: E.a);t.b=true;echo "did I crash?" |
16:37:19 | NimBot | Compile failed: /usercode/in.nim(1, 42) Error: identifier expected, but got '=' |
16:38:27 | clyybber | !eval type E = enum a=1, b=high(int32)\ntype C = object\n case a: E\n of a: b: bool\n of b: i: int\nvar t=C(a: E.a);t.b=true;echo "did I crash?" |
16:38:29 | NimBot | Compile failed: /usercode/in.nim(1, 42) Error: identifier expected, but got '=' |
16:40:08 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
16:40:22 | * | pbb joined #nim |
16:42:59 | shashlick | few lines of code and i'm connected now |
16:43:50 | * | pbb quit (Remote host closed the connection) |
16:44:54 | clyybber | !eval type E=enum a,b=int32.high\ntype C=object\n case a:E\n of a:b:E\n of b:i:E\nvar t=C(a:a);t.b=a;echo"did I crash?" |
16:44:56 | NimBot | Compile failed: /usercode/in.nim(1, 35) Error: identifier expected, but got '=' |
16:45:02 | * | pbb joined #nim |
16:45:43 | clyybber | !eval type E=enum a,b=int32.high\ntype C = object\n case a:E\n of a:b:E\n of b:i:E\nvar t=C(a:a);t.b=a;echo"did I crash?" |
16:45:45 | NimBot | Compile failed: /usercode/in.nim(1, 36) Error: identifier expected, but got '=' |
16:45:56 | clyybber | I don't get it. |
16:46:29 | clyybber | !eval type E=enum a,b=int32.high\n type C=object\n case a:E\n of a:b:E\n of b:i:E\nvar t=C(a:a);t.b=a;echo"did I crash?" |
16:46:31 | NimBot | Compile failed: /usercode/in.nim(1, 36) Error: identifier expected, but got '=' |
16:46:39 | clyybber | Ok, sry, Im gonna stop now |
16:56:31 | * | tane joined #nim |
16:57:06 | * | jxy quit (Quit: leaving) |
16:59:41 | * | Trustable joined #nim |
16:59:50 | FromGitter | <kaushalmodi> Is there a way to mark a proc type to expect to have side effects? |
17:00:01 | FromGitter | <kaushalmodi> I ended up with an issue similar to this: https://stackoverflow.com/questions/53726458/nim-aliasing-procedures-with-side-effects |
17:01:15 | FromGitter | <kaushalmodi> In that stackoverflow example, I am looking for a way to pre-declare `procPtr` var to contain procs with side effects |
17:03:13 | * | Vladar joined #nim |
17:14:45 | shashlick | @disruptek - https://github.com/nim-lang/irc/pull/16 |
17:18:40 | * | narimiran_ is now known as narimiran |
17:19:00 | FromDiscord | <treeform> Hey, so my library `ws` is on the list of "important nim libraries" so when I breaks some thing people get notified and open PR. ( https://github.com/treeform/ws/issues/10 ) How do I get notified of this first? |
17:22:37 | narimiran | by being faster than me at looking what failed this time in some nim commit/pr :P |
17:23:09 | FromDiscord | <kodkuce> oh so this better then niv ws |
17:23:23 | narimiran | other than that, you create your own CI where you test your changes before merging them into master |
17:23:37 | FromDiscord | <treeform> hmm |
17:24:45 | FromDiscord | <treeform> @kodkuce The niv ws had a bug in that it could not send packets over 16k... I started to fix it. And fix it. And fix it. Then decide to just write my own. |
17:25:03 | FromDiscord | <treeform> I already red the websocket spec a couple of times to fix the 16k issue. |
17:25:10 | FromDiscord | <treeform> might as well do my own take... |
17:25:43 | FromDiscord | <kodkuce> :), np will switch to your magic |
17:25:49 | FromDiscord | <treeform> Mine also supports SSL, keep alive and other features... |
17:26:29 | FromDiscord | <treeform> I love websockets and don't like REST. |
17:26:31 | FromDiscord | <kodkuce> today i first time connected godot client and nim ws and pushed postions bewin |
17:26:43 | FromDiscord | <treeform> So all my JS apps open a single websocket and do all request/response that way. |
17:27:27 | FromDiscord | <treeform> So I use them heavy at work so for me is a critical piece of infrastructure. |
17:27:33 | FromDiscord | <kodkuce> depedns on work i guess, Rest is good if you just doing some API for info |
17:27:51 | FromDiscord | <treeform> Yeah I love other peoples rest 🙂 |
17:28:04 | FromDiscord | <kodkuce> xD |
17:28:24 | FromDiscord | <treeform> godot? for games I don't recommend websockets. |
17:28:32 | FromDiscord | <treeform> well I don't recommend TCP which websockets use. |
17:28:39 | FromDiscord | <treeform> UDP for games! |
17:28:59 | FromDiscord | <treeform> See here: https://github.com/treeform/netpipe |
17:29:02 | FromDiscord | <kodkuce> ye i just wanted ws for stupit games like poker and other card gaems |
17:29:19 | FromDiscord | <kodkuce> udp dosent work in browser as i know, tough there is that webRTC |
17:29:41 | clyybber | while you should better use UDP for games, minecraft uses TCP too and is "the" multiplayer game |
17:29:58 | clyybber | but its also quite laggy at times.. |
17:30:35 | FromDiscord | <kodkuce> tcp for realtime shooteg game and similar sux |
17:30:47 | FromDiscord | <treeform> Yeah all said and done, using UDP over TCP is probably a 0% - 20% improvement. Minecraft has other big performance problems. |
17:30:48 | FromDiscord | <kodkuce> but for slow games and turn based it should work np |
17:31:17 | FromDiscord | <treeform> yes you would get almost 0 improvement for turn based and slow games. |
17:31:25 | * | disruptek_ joined #nim |
17:31:39 | FromDiscord | <treeform> well with UDP you can have clients connect to each other. |
17:31:42 | livcd | does anyone have some complex scraper in Nim ? I only saw mashingan's manga scraper |
17:31:49 | FromDiscord | <treeform> which might be big for pear to pear games. |
17:31:52 | livcd | sorry i really missed the answer |
17:32:12 | FromDiscord | <treeform> like HTML website scraper? |
17:33:07 | FromDiscord | <treeform> Man I have done so much scraping in my life.... I should write a blog about how I do scraping. |
17:34:11 | FromDiscord | <kodkuce> this netpipe , does it lose perf cuz ordering or it just has timestamp and if older recived just drop |
17:34:38 | FromDiscord | <treeform> no it will do the right thing |
17:34:44 | FromDiscord | <treeform> it would wait to give you the out of order packet |
17:35:05 | FromDiscord | <treeform> so if you set A B C packets, but you get C B A... |
17:35:12 | FromDiscord | <treeform> it would give you them in the A B C order always |
17:35:13 | FromDiscord | <kodkuce> hmm but if its older packet whoudet i just discard it |
17:35:24 | rayman22201 | @clyybber and araq : I would like formally announce that I am an idiot.... There was never any leak in my dispose async implementation. I forgot to dispose the final result variable... |
17:35:25 | FromDiscord | <kodkuce> oh |
17:35:27 | FromDiscord | <treeform> that was a feature request |
17:35:32 | FromDiscord | <treeform> for my game I need all packets |
17:35:47 | FromDiscord | <treeform> as they are DIFFs of the previous state |
17:35:53 | clyybber | rayman22201: Wait... |
17:36:13 | FromDiscord | <kodkuce> for shooter game if you recive older position you just discard it from what i read cuz you dont need it anyway |
17:36:26 | FromDiscord | <treeform> yes that was 1 feature request |
17:36:31 | rayman22201 | but, it appears that `=destroy` for strings and seqs is not working |
17:36:34 | FromDiscord | <treeform> have packets that can be discarded |
17:36:55 | FromDiscord | <treeform> but even for shooter games you want some packets to come in order like "change level", "game over", "chat" etc... |
17:37:00 | clyybber | rayman22201: How do you dispose the result variable now? Do you have a commit? |
17:37:14 | rayman22201 | I will show you a gist. hold on |
17:37:27 | clyybber | cool, thanks |
17:37:45 | FromDiscord | <kodkuce> so when future request done it will support both |
17:37:59 | FromDiscord | <kodkuce> ? |
17:38:14 | FromDiscord | <treeform> @kodkuce another way where UDP wins for games is the with TCP you need to select and block or using async to work. With UDP you just read or don't read. It integrates with game loop much better. |
17:38:59 | FromDiscord | <treeform> @kodkuce yes adding safe to drop packets is easy to add. I have not done that yet. |
17:39:40 | rayman22201 | http://ix.io/21tG |
17:40:01 | clyybber | disbot: Where are you when I need you? |
17:40:09 | rayman22201 | I couldn't see the forest through the trees here. I'm feeling pretty silly |
17:40:19 | FromDiscord | <treeform> @kodkuce the main way where NetPipe over TCP is in acks. TCP waits a while to ack the packets. But with NetPipe you can choose to set your ack timing way shorter. So there isn't as much delay for non ack'ed packets. |
17:40:23 | rayman22201 | lol. copy paste is still an option :-P |
17:40:56 | rayman22201 | https://play.nim-lang.org/#ix=21tG |
17:41:02 | rayman22201 | let me help you with that :-P |
17:41:12 | clyybber | rayman22201: Haha, I was mostly joking, it wouldn't run anyways |
17:41:25 | rayman22201 | true. |
17:41:31 | clyybber | besides, one can add /nim to the ix.io link and it will syntax highlight it |
17:41:52 | clyybber | waddabout =destroy not working for seqs/strings? |
17:44:44 | rayman22201 | http://ix.io/21tK |
17:45:11 | FromGitter | <Willyboar> RIP disbot :( |
17:45:32 | disruptek | yeah, i'm messing with it. broke my bouncer. |
17:45:49 | clyybber | I can be your bouncer |
17:46:32 | rayman22201 | @clyybber, it doesn't error, but it appears to be a noop |
17:46:35 | FromGitter | <Willyboar> Ohhh. Can we have disbot2? |
17:46:48 | clyybber | rayman22201: With --gc:what? |
17:46:57 | clyybber | markandsweep? |
17:47:00 | rayman22201 | yup |
17:47:25 | clyybber | hmm, ping Araq pong |
17:48:20 | * | disbot joined #nim |
17:48:46 | clyybber | http://ix.io/invalid |
17:48:47 | disbot | ^ play at https://play.nim-lang.org/#ix=inval 😏 |
17:49:12 | clyybber | http://ix.io/dumb |
17:49:12 | disbot | ^ play at https://play.nim-lang.org/#ix=dumb 😏 |
17:49:29 | disruptek | well, how should it know? |
17:49:49 | * | NimBot joined #nim |
17:50:09 | clyybber | nvrmnd |
17:50:28 | rayman22201 | at least I feel vindicated. I thought I was losing my mind. I stared at the code waaayyyy tooo loooonggg before I figured out the issue. |
17:51:14 | rayman22201 | thanks for your help @clyybber |
17:51:28 | clyybber | when eyes don't do their work, I have found hitting them to be a good way to get them back on track |
17:51:43 | clyybber | rayman22201: np :) |
17:51:48 | rayman22201 | stabbing them with tiny knives or staring directly into the sun :-P |
17:51:56 | clyybber | stabbing them with carrots |
17:55:49 | disruptek | shashlick: now i can't even get nim irc to talk to my bouncer. |
17:58:08 | FromGitter | <deech> So currently when a proc like `proc p(f : Foo) = echo type(f)` will type information if passed a subtype of `Foo`, eg, `Bar` and will always print `Foo`. But type information is not lost if passed as a generic parameter `proc p[T](f:T) = echo type(f)`. To fix this I've been toying around with possibly having the compiler rewrite the first to something like `proc p[T subtype Foo](f:T) = echo type(f)` ( I guess this could |
17:58:08 | FromGitter | ... be a generated concept?). Anyone have any thoughts? |
17:59:39 | FromGitter | <deech> But I guess this would break overload resolution. :( |
18:00:04 | * | disbot quit (Remote host closed the connection) |
18:01:15 | * | disbot joined #nim |
18:02:01 | clyybber | deech: Hmm, it kinda makes sense the way its working now |
18:02:15 | disruptek | i don't get it. how is this different from 1) generics, or 2) methods? |
18:02:49 | clyybber | disruptek: deech is talking about ct dispatch here |
18:02:54 | clyybber | so no methods |
18:03:17 | FromGitter | <deech> clyybber, I can see why both make sense. |
18:04:06 | disruptek | why not fix having to cast a type like bif.Foo when passing it to p()? |
18:04:08 | clyybber | deech: What happens when you write `proc p[T: Foo](f: T)` ? |
18:04:43 | clyybber | disruptek: Huh, is this needed rn? |
18:06:02 | FromGitter | <deech> clyybber, it does print `Bar` in this case ... nice. |
18:06:41 | clyybber | disruptek: Seems to work: https://play.nim-lang.org/#ix=21tX |
18:07:03 | clyybber | deech: Thats what I feared it would :) |
18:08:36 | disruptek | hmm, it was something with having to procCall a cast in order to invoke a super ... can't find where i actually ran into it. |
18:08:40 | FromGitter | <deech> Unfortunately it shadows any other proc, eg. `proc p(f: Foo) = ....` |
18:08:48 | clyybber | disruptek: Maybe involving var? |
18:09:09 | clyybber | Because you have to do it with var afaik |
18:09:42 | clyybber | I fixed it in my =move PR I think |
18:09:49 | clyybber | should cherrypick that maybe |
18:10:21 | disruptek | i guess i eliminated that code. |
18:10:27 | clyybber | deech: Hmm. It shouldn't shadow it |
18:10:34 | clyybber | At least not for p(Foo()) |
18:11:48 | FromGitter | <deech> https://play.nim-lang.org/#ix=21u3 |
18:12:38 | clyybber | deech: Yeah that makes sense |
18:13:06 | clyybber | deech: https://nim-lang.github.io/Nim/manual.html#overloading-resolution |
18:13:14 | clyybber | Subtypes are matched after generics |
18:14:19 | FromGitter | <zacharycarter> PMunch: question about binaryparse if you have a moment... do I need to worry about endianness or does the library take care of that for me? |
18:34:28 | * | uu91 quit (Ping timeout: 245 seconds) |
18:35:21 | * | uu91 joined #nim |
18:43:40 | * | sagax quit (Read error: Connection reset by peer) |
18:46:34 | * | ldlework_ is now known as ldlework |
18:51:23 | FromDiscord | <Avatarfighter> has anyone here used https://ultralig.ht/ by chance? I'm wondering if its worth making bindings for it or not but I've never used it so idk if its considered "good" |
18:54:06 | FromDiscord | <Generic> I am a bit confused, about the current state of refs with the new runtime |
18:54:31 | FromDiscord | <Generic> owned refs are postponed |
18:54:44 | FromDiscord | <Generic> but what are they currently, if I enable the new runtime |
18:54:52 | yumaikas | o/ |
18:55:37 | FromDiscord | <Generic> I'm at the beginning of a new project, where being gc less would be great |
18:56:11 | FromDiscord | <Generic> and I wonder if switching to the new runtime is a good idea |
18:56:26 | FromDiscord | <Generic> and if I should already adopt owned refs or not |
18:56:56 | FromDiscord | <Generic> it's just a hobbiest project, so 100% stability isn't a concern |
18:58:43 | FromDiscord | <kodkuce> i think newruntime stable is postponed to nim version 2, atm there is work on some shared memory threding , but its possible i am 200% wrong wo better w8 for some pro answer |
18:59:17 | clyybber | Generic: Owned refs are enabled with --newruntime |
18:59:28 | clyybber | And they are already implemented |
18:59:41 | FromDiscord | <Generic> ok, good |
19:00:01 | FromDiscord | <Generic> https://github.com/nim-lang/RFCs/issues/177 |
19:00:28 | FromDiscord | <Generic> "The reason for this is that owned is quite a breaking change and we're better served with stability now that version 1 is out and with us for the years to come." |
19:00:38 | FromDiscord | <Generic> that made me think they're shelved for now |
19:00:51 | FromDiscord | <Generic> but ok, I'll use them |
19:00:53 | * | sagax joined #nim |
19:00:54 | FromDiscord | <Generic> thanks |
19:00:58 | clyybber | np :) |
19:03:47 | * | solitudesf- joined #nim |
19:06:00 | * | tklohna joined #nim |
19:06:02 | * | solitudesf quit (Ping timeout: 268 seconds) |
19:06:51 | shashlick | @disruptek - did i break irc? |
19:08:37 | disruptek | disbot: did he? |
19:08:38 | disbot | yep. 😊 |
19:08:43 | disruptek | christ. |
19:09:06 | FromGitter | <Willyboar> dispot: do you like Nim? |
19:09:15 | disruptek | actually, i think i screwed my bouncer up. |
19:09:38 | * | lritter joined #nim |
19:09:39 | disruptek | disbot: ignore Willyboar |
19:09:40 | disbot | on it. 👍 |
19:09:54 | FromGitter | <Willyboar> :( |
19:10:14 | * | a_b_m joined #nim |
19:14:13 | FromDiscord | <treeform> tried for like 10 minutes to update a packdage in nimble. I can't figure it out. I think its still an open problem? https://github.com/nim-lang/nimble/issues/169 |
19:14:17 | clyybber | despot: Hi |
19:14:41 | * | abm quit (Ping timeout: 276 seconds) |
19:15:40 | FromDiscord | <Lantos> hmmm I've installed llvm-9 and clan-9 but can't --cc:llvm_gcc |
19:15:40 | FromDiscord | <Lantos> E: Unable to locate package "llvm-gxx" |
19:17:26 | disruptek | nim devel broke terminaltables. |
19:18:06 | shashlick | @disruptek - what do I need to change in the PR |
19:18:17 | disruptek | shashlick: nothing, it's not you. |
19:18:53 | disruptek | wait, what pr? |
19:21:52 | Araq | rayman22201: does that mean 'owned' works with async? |
19:22:56 | shashlick | @disruptek - i sent you a PR which added SSL support to irc |
19:25:18 | disruptek | nice, but that was against Nim/irc (which is ideal). |
19:25:43 | shashlick | ya, what are you using then? |
19:26:14 | disruptek | an older znc running on a netapp. |
19:29:10 | shashlick | okay, not sure i understand - i added ssl support so that i could connect to my znc which only works in ssl mode |
19:29:16 | shashlick | but i was able to connect to freenode as well with ssl |
19:29:25 | disruptek | does it work against znc+ssl? |
19:29:37 | shashlick | ya |
19:30:11 | disruptek | sweet. |
19:32:08 | rayman22201 | @araq 'dispose' works with async. If you can make that a dual of 'owned' then yes :-P |
19:32:31 | Araq | sure, it's not hard |
19:32:33 | rayman22201 | but what about my `=destroy` bug? |
19:32:51 | Araq | you lose the ownership and then you add it back somehow... |
19:33:00 | Araq | what =destroy bug? |
19:33:06 | Araq | probably already reported |
19:33:26 | rayman22201 | http://ix.io/21tK |
19:33:27 | disbot | ^ play at https://play.nim-lang.org/#ix=21tK 😏 |
19:35:32 | rayman22201 | is that already reported? does it look familiar? |
19:42:11 | Araq | you don't have =destroy with --gc:markAndSweep |
19:43:13 | rayman22201 | then how do I free a string or seq? |
19:43:38 | rayman22201 | this is what I asked you last week. I asked, "how do you dispose a string?" and you said use "destroy" |
19:44:33 | Araq | I'm sorry, 'dispose' does it for you |
19:45:02 | Araq | except that I probably didn't create a dispose proc that takes strings/seqs |
19:46:14 | rayman22201 | ah hah! That explains it :-) |
19:47:22 | rayman22201 | cool. can I have such a proc? please :-D |
19:48:06 | Araq | add it |
19:48:25 | Araq | you know how to add it, use the other 'dispose' procs as an example |
19:49:54 | Araq | btw according to GordonBGood our ARC implementation is on par with Boehm... |
19:50:02 | rayman22201 | I will try |
19:50:12 | rayman22201 | hrmm. Well that's a good result |
19:51:30 | Araq | yep. 'owned' is still slightly more elegant |
19:52:06 | Araq | but not by much if you look at 'let x = unown(root)' stuff |
20:01:22 | * | solitudesf-- joined #nim |
20:04:04 | * | solitudesf- quit (Ping timeout: 245 seconds) |
20:05:23 | Araq | hhhmmmm |
20:05:28 | * | Trustable quit (Remote host closed the connection) |
20:06:46 | rayman22201 | dispose sets the value to nil, but you can't do that for a string/seq. What should I do instead? |
20:07:00 | rayman22201 | what represents a "nil" string? |
20:07:05 | clyybber | "" |
20:07:15 | rayman22201 | fair enough |
20:07:25 | clyybber | but it is ambiguous |
20:07:30 | rayman22201 | what about a seq? |
20:07:59 | clyybber | @[], but I think it won't work |
20:08:51 | * | nsf quit (Quit: WeeChat 2.6) |
20:11:18 | rayman22201 | wow. actually it seems to work lol |
20:11:59 | rayman22201 | hmmmm indeed araq :-P |
20:13:10 | clyybber | rayman22201: Oh, really? Nice |
20:13:29 | rayman22201 | I'm surprised too, but I'm not complaining :-D |
20:13:48 | rayman22201 | Now to try this with some more complicated async tests |
20:14:04 | clyybber | better check the generated C code that it really is nil |
20:14:18 | clyybber | and not a ref to an empty seq :) |
20:14:27 | * | GordonBGood joined #nim |
20:14:56 | rayman22201 | hrmmm. good point. |
20:16:11 | rayman22201 | I'm thinking about what this dispose async research means in the context of ARC |
20:16:49 | rayman22201 | It results in more deterministic memory usage for async, which I think is still valuable. |
20:18:43 | FromDiscord | <Generic> now with --newruntime I'm getting this error: |
20:18:46 | FromDiscord | <Generic> C:\Nim\lib\core\seqs.nim(144, 3) Error: VM is only allowed to 'cast' between integers and/or floats of same size |
20:19:25 | * | GordonBGood quit (Ping timeout: 268 seconds) |
20:20:11 | FromDiscord | <Generic> this is the relevant piece of code: cast[ptr NimSeqV2[T]](addr x).len = newLen |
20:20:13 | FromDiscord | <Generic> is this my fault? |
20:20:43 | * | FromGitter quit (Remote host closed the connection) |
20:20:54 | * | PrimHelios joined #nim |
20:21:01 | * | FromGitter joined #nim |
20:21:11 | clyybber | Generic: What are you trying to do?? |
20:21:16 | PrimHelios | Is there a way to specify the `styleCheck` option for nimble? |
20:21:33 | rayman22201 | @clyybber looking at C code verifies that the the value is set to Nil :-) |
20:21:34 | clyybber | Generics: You shouldn't need to cast to NimSeqV2 |
20:21:41 | clyybber | rayman22201: Nice :D |
20:21:47 | FromDiscord | <Generic> that's not my code |
20:22:02 | FromDiscord | <Generic> it's compiler code which is failing |
20:22:11 | krux02 | I am looking for "compile time define pragma", but I am drunk and I can't find it. |
20:22:24 | disruptek | strdefine ? |
20:22:37 | PrimHelios | ah, config.nims |
20:23:28 | krux02 | what i am talking about is passing the value of constants as a compiler argument. |
20:23:51 | krux02 | I am on vacation and I can't stop working anyway. |
20:23:54 | FromGitter | <deech> The Windows binary install archive contains a lot of DLLs in it's `bin` directory. Are any of these dependencies of `nim.exe` or `nimble.exe`? |
20:24:12 | disruptek | --define:someconst="hello" now works. |
20:24:40 | * | PrimHelios quit (Client Quit) |
20:24:47 | FromDiscord | <Generic> deech: I think nimble relies on atleast some of them |
20:26:15 | FromDiscord | <Avatarfighter> Has anyone here used nimterop by chance and would be willing to help a lost soul like me? I'm having trouble figuring out wtf I'm supposed to do when wrapping a c lib, I usually wrap it manually but this lib is a bit more complex than what I'm used to lol |
20:26:22 | krux02 | disruptek: I am looking for the documentation of that behavior because I would like to reference it in my PR |
20:26:44 | disruptek | krux02: i don't believe it exists. i just added it last week. |
20:27:00 | disruptek | krux02: or, it exists somewhere, but it wasn't implemented. 🙁 |
20:27:08 | krux02 | what? |
20:27:16 | krux02 | do I have false memories? |
20:27:31 | disruptek | exactly. it makes no sense. |
20:27:48 | krux02 | when I call nim --fullhelp |
20:28:12 | krux02 | it says in --define:SYMBOL(:VAL) see: "compile time define pragmas" |
20:28:16 | krux02 | but I can't find that part |
20:28:30 | disruptek | yeah, and it won't work in 1.0.2. go figure. |
20:29:59 | rayman22201 | and now I found a bug in the async macro that results in a string leak :-/ |
20:30:28 | krux02 | I do remember that there was a feature in Nim that made this explicitly working |
20:31:07 | disruptek | yeah, using config.nims and switch() was the work-around. |
20:31:29 | disruptek | but it probably did work once and then was broken by some other update and no one noticed. |
20:32:31 | krux02 | well, yea, I finish my Pr without a link to a usable documentation about that: https://github.com/nim-lang/Nim/pull/12643 |
20:32:37 | krux02 | thanks for your help |
20:34:22 | disruptek | cool. hey, --fullhelp ain't nothin', at least. |
20:34:40 | Araq | Generic: known bug, I have a fix for this that I need to push... |
20:34:57 | shashlick | @Avatarfighter - what are you trying with nimterop |
20:36:22 | clyybber | rayman22201: Finally /s |
20:36:35 | Araq | deech: SSL and regexes need the DLLs, the compiler uses neither, not sure about Nimble |
20:38:22 | FromDiscord | <Avatarfighter> shashlick: I'm trying to make a wrapper for https://ultralig.ht/ currently but the headers are a bit too complex for me to do it manually |
20:38:57 | FromGitter | <alehander92> krux02 dont make our mistake, use your vacation |
20:41:26 | FromDiscord | <Avatarfighter> shashlick: to be honest I don't really know where to start to use nimterop to wrap a library, I looked at the template but im even more lost |
20:43:28 | shashlick | well http://ultralig.ht looks like C++ so might be challenging regardless |
20:43:41 | shashlick | win or lin |
20:44:42 | FromDiscord | <Avatarfighter> Well currently I'm on mac but I'm targeting for win support mostly |
20:45:06 | shashlick | you can try running c2nim on some of the headers and see how it fares |
20:45:26 | FromDiscord | <Avatarfighter> I'll try that 😄 |
20:45:58 | shashlick | but it has some complex stuff so i won't be too confident 😞 |
20:46:08 | FromDiscord | <Avatarfighter> yeah 😦 |
20:46:13 | shashlick | ideally you pick which specific things you need and just wrap those declarations |
20:46:30 | FromDiscord | <Avatarfighter> I would definitely do that except i'm trying to use the whole library haha |
20:47:46 | FromDiscord | <Avatarfighter> Whatever, I'll try c2nim and I'll try to fix the files it generates if I can't I guess I'll be back here 😄 |
20:51:16 | * | madprops joined #nim |
20:51:32 | madprops | hi. is there some sort of guided book, apart from the manual? |
20:53:11 | madprops | oh there are some tutorials |
20:57:08 | solitudesf-- | https://nim-lang.org/learn.html |
20:57:26 | * | solitudesf-- quit (Quit: Leaving) |
20:57:49 | * | solitudesf joined #nim |
21:05:02 | * | nif quit (Quit: ...) |
21:05:12 | * | nif joined #nim |
21:05:40 | * | narimiran quit (Ping timeout: 268 seconds) |
21:09:08 | FromDiscord | <Generic> I managed to isolate it |
21:09:09 | FromDiscord | <Generic> https://play.nim-lang.org/#ix=21uU |
21:09:19 | FromDiscord | <Generic> this doesn't work with --newruntime |
21:10:46 | FromDiscord | <Generic> seems like it, doesn't even need to be that complex |
21:10:57 | madprops | is there a design reason for `echo "Hi, ", name` vs `echo "Hi, ${name}"` or similar? |
21:11:07 | FromDiscord | <Generic> this is enough https://play.nim-lang.org/#ix=21uV |
21:12:18 | FromDiscord | <Generic> madprops: nim only recently gained a inline string formatter (strformat) in the std library |
21:12:47 | FromDiscord | <Generic> *string interpolation |
21:13:13 | FromDiscord | <Generic> the former is just easier to implement, I think |
21:14:17 | FromGitter | <Vindaar> "recently" being: Sun Dec 17 13:58:40 2017 +0100 |
21:14:52 | FromDiscord | <Generic> well compared to echo |
21:15:01 | madprops | hmm weird. im using a compiler from 2018. and i can't import strformat |
21:15:18 | madprops | btw is this a trusted source? https://launchpad.net/~jonathonf/+archive/ubuntu/nimlang |
21:16:10 | FromGitter | <Vindaar> @Generic: well, ok :P |
21:16:32 | FromGitter | <kaushalmodi> madprops: few ways to do the same thing: https://play.nim-lang.org/#ix=21uX |
21:16:45 | * | krux02 quit (Remote host closed the connection) |
21:17:43 | FromGitter | <kaushalmodi> madprops: https://nim-lang.org/install_unix.html |
21:22:13 | madprops | am i supposed to download strutils and strformat? |
21:23:00 | madprops | because right now the compiler is not finding them |
21:23:59 | FromDiscord | <Generic> they should come shipped with your compiler |
21:24:16 | FromDiscord | <Generic> if they're missing, you're nim installation incomplete |
21:24:38 | madprops | i just installed it with ubuntu snaps |
21:24:57 | FromGitter | <kaushalmodi> madprops: I have no idea about ubuntu snaps |
21:25:17 | madprops | the version in the package manager is too old |
21:25:26 | FromGitter | <kaushalmodi> > To install the latest stable release of Nim using choosenim, just run the following in your terminal, then follow the onscreen instructions: ⏎ > curl https://nim-lang.org/choosenim/init.sh -sSf | sh |
21:25:58 | FromGitter | <kaushalmodi> or just download/extract this: https://nim-lang.org/download/nim-1.0.2-linux_x64.tar.xz |
21:26:15 | FromGitter | <kaushalmodi> it contains statically built nim binary + other binaries + libs for Nim 1.0.2 |
21:31:43 | madprops | works now. thank you |
21:50:07 | * | cwaydt joined #nim |
21:51:27 | madprops | what's the reason that the discard keyword is needed? is there a problem in not using returned values? |
21:52:02 | disruptek | it's so that you don't accidentally ignore a return value. |
21:52:27 | disruptek | you can disable this behavior, but most come to value it. |
21:55:38 | * | tane quit (Quit: Leaving) |
21:56:20 | zedeus | is there a way to disable it besides .discardable? for the redis client you very often don't care about the return values, and having "discard await" in many places gets ugly quickly |
21:57:37 | disruptek | unlikely. |
21:57:46 | disruptek | just write a template. |
21:59:12 | zedeus | doesn't work, you can't use await from templates |
21:59:23 | zedeus | there is a pr to rewrite await as a template though |
21:59:53 | disruptek | oh right. |
22:00:14 | zedeus | before you mention it, doesn't work as a macro either |
22:00:27 | disruptek | lol |
22:00:37 | disruptek | you're really making this difficult, huh? |
22:01:18 | zedeus | not by choice |
22:02:01 | disruptek | if you can make the case for not needing the return values, maybe you can get a PR against the client accepted. |
22:03:35 | zedeus | they are needed in some cases, but not always |
22:05:31 | madprops | is this a complete example? http://i.imgur.com/KdElZmg.png |
22:06:04 | shashlick | @zedeus - don't you need asyncCheck isntead of discard await |
22:06:05 | disruptek | the first proc is unimplemented. |
22:06:27 | zedeus | shashlick: no they do very different things |
22:06:38 | zedeus | discard await still awaits the future, asyncCheck doesn't |
22:06:49 | disruptek | asyncCheck is for when you prefer your futures to crash. |
22:07:12 | * | Vladar quit (Quit: Leaving) |
22:08:51 | FromGitter | <Vindaar> @madprop: aside from the "..." in the first line, sure: https://play.nim-lang.org/#ix=21vg |
22:09:03 | shashlick | - This should be used instead of discard to discard void futures, or use waitFor |
22:10:28 | madprops | im confused about how assigning to result seems to be the same as retrun |
22:10:31 | madprops | return |
22:10:46 | madprops | why not just return "true" ? |
22:10:48 | disruptek | it's kinda like setting what the return value will be whenever the proc returns. |
22:11:04 | madprops | ok now that i think about it it makes some sense |
22:11:13 | disruptek | it's pretty handy. |
22:11:25 | Araq | "return" is (unstructured) control flow |
22:11:27 | madprops | like, i can do some checks near the end of the proc with the current result |
22:11:49 | Araq | post conditions? yep |
22:12:37 | shashlick | Araq - sometimes you need a variable that needs a few lines of code to set and then it doesn't change |
22:12:42 | shashlick | is it possible to demote a var to a let |
22:14:02 | FromGitter | <alehander92> you're just in time for the shadowing discussion |
22:17:55 | zedeus | shashlick: it's about "discard <future>" not "discard await <future>", discarding futures vs their return values |
22:18:29 | FromGitter | <alehander92> about the pr |
22:18:35 | disruptek | i've never had a use for asyncCheck. |
22:18:42 | FromGitter | <alehander92> its just a port of the chronos await as template PR |
22:19:01 | FromGitter | <alehander92> sorry i have to fix it eventually |
22:19:10 | FromGitter | <alehander92> there was an issue with the port |
22:19:12 | shashlick | ok |
22:19:19 | FromGitter | <alehander92> asyncCheck is useful |
22:19:30 | FromGitter | <alehander92> often you want to just start some future |
22:19:38 | FromGitter | <alehander92> and do something with a callback |
22:20:02 | FromGitter | <alehander92> maybe i just cant think of a better pattern |
22:20:34 | disruptek | yes, but i wouldn't use it there, either. |
22:25:18 | * | solitudesf quit (Ping timeout: 245 seconds) |
22:26:12 | FromGitter | <alehander92> but what do you do if you dont want to await |
22:26:38 | disruptek | store the future in a variable and move on with my life. |
22:27:33 | disruptek | async exceptions are such a dumpsterfire that in my opinion there's no scenario in which an async exception makes sense. |
22:28:27 | disruptek | just ask zedeus. |
22:28:37 | disruptek | https://github.com/nim-lang/Nim/issues/12526 |
22:29:44 | zedeus | well to be fair, catching this exception would not actually fix the problem |
22:30:18 | disruptek | maybe not, but the point remains. |
22:31:05 | disruptek | to restate, the exception shouldn't be /thrown/; it's not an issue of catching it. |
22:32:06 | disruptek | disbot: you there, buddy? |
22:32:07 | disbot | yep. 😊 |
22:32:17 | disruptek | why no issue display, then? |
22:32:23 | * | disruptek pokes disbot. |
22:32:56 | disruptek | disbot: tell shashlick his ssl broke my github api. |
22:32:57 | disbot | on it. 👍 |
22:38:37 | * | bobbert2 joined #nim |
22:39:17 | * | bobbert2 quit (Remote host closed the connection) |
22:40:37 | * | disbot quit (Remote host closed the connection) |
22:41:05 | * | disbot joined #nim |
23:05:00 | * | krux02 joined #nim |
23:05:04 | * | jjido joined #nim |
23:05:19 | shashlick | ? |
23:06:20 | disruptek | just messing with ya. |
23:07:08 | * | ng0 quit (Ping timeout: 260 seconds) |
23:09:38 | shashlick | bad disbot |
23:10:10 | shashlick | this irc bot is working well - already PMs go to slack |
23:10:15 | shashlick | now working on sending replies from slack |
23:10:27 | disruptek | awesome. |
23:11:37 | * | ng0 joined #nim |
23:11:46 | FromGitter | <Willyboar> how disbot doing with nimbot? |
23:12:22 | disruptek | disbot pissed in nimbot's sandbox, am i right, disbot? |
23:12:34 | disruptek | disbot: hello? |
23:12:35 | disbot | yep. 😊 |
23:12:46 | disruptek | damn he's worse than my dog. |
23:13:16 | FromGitter | <Willyboar> disbot: who is your boss? |
23:13:29 | disruptek | i tol' him to ignore you. |
23:13:55 | FromGitter | <Willyboar> i know but i have to give it a try |
23:16:03 | FromGitter | <alehander92> do we have a slack |
23:16:18 | shashlick | no, i use slack as my irc frontend |
23:24:18 | clyybber | disbot: tell everyone a good night from me |
23:24:43 | * | clyybber *disappointment* |
23:25:05 | disruptek | gn8 clyybber |
23:25:06 | FromGitter | <alehander92> interesting |
23:25:25 | FromGitter | <alehander92> disbot help |
23:25:25 | * | clyybber quit (Quit: WeeChat 2.6) |
23:25:33 | FromGitter | <alehander92> disbot: tell a b |
23:26:07 | FromGitter | <alehander92> nimbot disbot |
23:26:18 | FromGitter | <alehander92> !eval i dont know |
23:26:21 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: undeclared identifier: 'i' |
23:26:43 | FromGitter | <Willyboar> !eval echo "Disbot this is my channel" |
23:26:46 | NimBot | Disbot this is my channel |
23:26:57 | FromGitter | <alehander92> !eval "я" |
23:26:59 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: expression '"я"' is of type 'string' and has to be discarded |
23:27:05 | FromGitter | <alehander92> sorry |
23:27:11 | disruptek | hmm. |
23:28:00 | disbot | !eval echo "bots running code run by bots" |
23:28:03 | NimBot | bots running code run by bots |
23:28:21 | FromGitter | <alehander92> disruptek run 2 + 2 |
23:28:50 | disbot | !eval echo "!echo \"bots running code run by bots\"" |
23:28:52 | NimBot | !echo "bots running code run by bots" |
23:29:03 | disruptek | lol |
23:29:05 | * | seni joined #nim |
23:29:14 | disbot | !eval echo "!eval \"bots running code run by bots\"" |
23:29:16 | NimBot | !eval "bots running code run by bots" |
23:29:22 | FromGitter | <alehander92> you should make nimbot |
23:29:27 | * | tklohna quit (Remote host closed the connection) |
23:29:32 | FromGitter | <alehander92> call a !run by disbot |
23:29:36 | FromGitter | <alehander92> which calls a !eval |
23:29:40 | FromGitter | <alehander92> so they get in a loop |
23:29:42 | FromGitter | <Willyboar> !eval echo "!eval echo ''" |
23:29:43 | disruptek | i'm listening to Quantic's Infinite Regression right now. |
23:29:44 | * | tklohna joined #nim |
23:29:45 | NimBot | !eval echo '' |
23:29:51 | FromGitter | <alehander92> wow yeah |
23:30:09 | FromGitter | <alehander92> !eval echo "" |
23:30:11 | NimBot | <no output> |
23:30:29 | FromGitter | <alehander92> it needs to be a quine |
23:31:12 | FromGitter | <alehander92> we can make #nim-bots |
23:31:15 | FromGitter | <alehander92> and leave them there |
23:31:20 | FromGitter | <alehander92> anyway , no loops |
23:31:23 | FromGitter | <alehander92> good night |
23:31:27 | FromGitter | <alehander92> people |
23:31:34 | disruptek | peace |
23:34:52 | * | mipri left #nim (#nim) |
23:35:42 | shashlick | it works! |
23:36:05 | disruptek | woohoo |
23:39:33 | FromGitter | <Willyboar> what works? |
23:41:28 | shashlick | my irc <=> slack bot for handling private messages |
23:50:58 | FromGitter | <Willyboar> I thought you are talking about the nimble thing |