00:15:25 | * | opal quit (Quit: i'm never coming back) |
00:16:21 | * | opal joined #nim |
00:17:44 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:18:15 | * | Ven`` joined #nim |
00:18:34 | * | Ven`` quit (Client Quit) |
00:18:57 | * | opal quit (Client Quit) |
00:19:39 | * | opal joined #nim |
00:20:05 | FromGitter | <Varriount> Araq: I miss Nim templates. They make life so much easier. |
00:20:51 | FromGitter | <Varriount> Zevv: NPeg's code is very tidy. Or at least, the code generation part is |
00:37:51 | * | cron quit (Quit: Leaving.) |
00:48:11 | * | cron joined #nim |
01:00:08 | * | blueberrypie quit (Quit: Ping timeout (120 seconds)) |
01:01:35 | * | blueberrypie joined #nim |
01:10:01 | Yardanico | typedesc can only be used in procedure arguments right? |
01:13:29 | Araq | roughly, yeah |
01:15:25 | Araq | https://gist.github.com/Araq/74fc6cfe26e807f7279f65b65500251a this is my version of "binary trees" |
01:15:36 | Araq | with the default GC I get 15s |
01:15:42 | Araq | with M&S 16s |
01:15:46 | Araq | with ARC 10s |
01:16:00 | Araq | would be nice if anybody can confirm these results |
01:16:58 | Yardanico | I was asking because I looked into https://github.com/nim-lang/Nim/issues/9932 for curiosity and added "if kind in {skVar, skLet, skConst}: result = t" to tyTypedesc in types.nim instead of result = nil |
01:17:00 | disbot | ➥ Error: internal error: expr(skType); unknown symbol ; snippet at 12https://play.nim-lang.org/#ix=28aW |
01:17:10 | Yardanico | it's probably incorrect but I'm running the testament locally anyway :D |
01:18:18 | FromGitter | <timotheecour> @araq ⏎ ⏎ > Excuse me if the question is silly (I'm tired) but does this support "dot chaining" (foo.on.add("a").add("b")) or not? ⏎ ⏎ but dot chaining would be less effective than what’s in the PR `foo.chainOn(initialize(), postprocess("foo"), x1 = 1, x1 += 3, x2 = 5)` ... [https://gitter.im/nim-lang/Nim?at=5e2a45da9ad22d5bd5cc1cfc] |
01:19:25 | disruptek | Araq: what's in `prelude`? |
01:19:55 | Yardanico | disruptek: lib/prelude.nim exists in nim repo |
01:20:14 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/lib/prelude.nim |
01:20:24 | Yardanico | seens like a small file for importing common modules or something |
01:20:24 | disruptek | okie, thanks. |
01:20:47 | Araq | timotheecour: people want dot chaining though |
01:21:11 | Araq | and since chaining ain't for me, I'm willing to give them what they want |
01:22:01 | FromGitter | <timotheecour> how would you dot chain with an operator `+= 3`? |
01:23:05 | Araq | I don't care, I don't use chaining, it's stupid |
01:23:05 | disruptek | Araq: arc 9.5s, m&s 14.5s, def 33s(!) |
01:23:13 | Tanger | Has anybody used the libssh2 wrapper (https://github.com/ba0f3/libssh2.nim) for file transfer (scp-ish)? |
01:23:24 | disruptek | oh, i have a nim.cfg |
01:24:08 | Araq | and the GCs are allowed to cheat, I don't even force a GC_fullCollect |
01:24:15 | Araq | which is what ARC does... |
01:24:19 | disruptek | 12.4 default |
01:24:31 | Yardanico | Araq: is -d:danger okay to use? |
01:24:36 | Yardanico | for testing this |
01:24:44 | Araq | Yardanico, I use it too, yes |
01:25:40 | disruptek | looks like low 8s for arc, so almost 30% faster. |
01:25:47 | disruptek | er, 1/3rd. |
01:27:24 | Araq | ok, so roughly comparable |
01:27:44 | Yardanico | well, with default GC I get ~19-21 seconds, with ARC - 11-12s, with m&s around 23s |
01:27:50 | Araq | I don't need it that precise, it's for FOSDEM |
01:33:44 | Yardanico | also by the way, is there any particular reason the build script in csources doesn't parallelize compilation? |
01:33:59 | Yardanico | on modern systems with a lot of cores/threads it would be much faster |
01:35:30 | Araq | I almost never run the build script |
01:35:57 | Yardanico | well, I guess it still won't hurt to add that feature since nim itself uses all cores for C compilation by default anyway |
01:36:32 | Araq | feel free to use the makefile instead |
01:36:38 | Araq | if we still have it. |
01:36:40 | * | jholland__ quit (Quit: Connection closed for inactivity) |
01:37:58 | Yardanico | oh it's actually there, never knew there was a makefile in csources o_o |
01:39:07 | * | GitterIntegratio quit (Ping timeout: 264 seconds) |
01:41:36 | * | cron quit (Quit: Leaving.) |
01:43:18 | Araq | bah, manual MM is 6.75s |
01:43:25 | Araq | quite a difference |
01:43:53 | disruptek | but arc isn't optimized yet. |
01:44:05 | Araq | well it is optimized quite a bit |
01:44:13 | Araq | but there is more we can do |
01:44:25 | Araq | and in theory there is 0 overhead for this particular benchmark |
01:44:26 | disruptek | arc isn't /optimal/ yet. |
01:45:00 | Araq | most of the perf difference is the result of our new doing alloc0 and not alloc. |
01:45:18 | disruptek | is the realloc in yet? |
01:45:36 | Araq | if you mean Zevv's PR |
01:45:39 | disruptek | yeah. |
01:45:44 | Araq | yes, that's been merged |
01:47:32 | disruptek | only modest improvement, at best. on the other of 2-3% for base64. |
01:47:49 | Araq | base64 is not allocation heavy |
01:48:04 | disruptek | i kinda wanna impl one of the fast algos for base64 but if i bother to write something like that, it will be meowhash or similar. something i will use right away. |
01:48:17 | Araq | for base64 you need to see it uses SSE instructions or whatever |
01:48:30 | disruptek | right, i did a little research on this, actually. |
01:48:57 | disruptek | there's a c impl that runs at 0.33, which is literally 1/10th of our current speed. |
01:49:09 | disruptek | er, 1/10th of our runtime. |
01:50:37 | disruptek | !repo fastbase64 |
01:50:37 | disbot | https://github.com/lemire/fastbase64 -- 9fastbase64: 11SIMD-accelerated base64 codecs 15 279⭐ 19🍴 7& 1 more... |
01:50:51 | disruptek | !repo base64simd |
01:50:52 | disbot | https://github.com/WojciechMula/base64simd -- 9base64simd: 11Base64 coding and decoding with SIMD instructions (SSE/AVX2/AVX512F/AVX512BW/AVX512VBMI/ARM Neon) 15 87⭐ 4🍴 |
01:51:06 | disruptek | more than anyone ever wants to know. |
01:51:16 | Araq | well port it to Nim please |
01:51:57 | Araq | it's always a great help for the people who have no clue what language to use and so they look at crappy benchmarks and make their decision. |
01:52:34 | Araq | it makes sense, I know little about cars so I drive a Ferrari |
01:52:39 | disruptek | it's not that so much; the problem is that we actually look pretty bad, and it was improved not long ago. |
01:53:23 | disruptek | lemme know when you wanna upgrade and i'll put you into a 911. |
01:54:00 | Araq | oh it's late, good night |
01:54:03 | disruptek | peace. |
02:10:46 | * | disbot quit (Quit: Bye) |
02:10:46 | * | disruptek quit (Quit: Bye) |
02:11:22 | * | disbot joined #nim |
02:12:17 | * | disruptek joined #nim |
02:13:33 | FromDiscord_ | <Skaruts> I don't quite understand choosenim, I downloaded it, but there's no `runme.bat` in the zip, like it says in the readme |
02:14:12 | FromDiscord_ | <Skaruts> (for windows) |
02:16:41 | FromDiscord_ | <Skaruts> tehre's only a exe and two dlls, and it seems like I can just run it and install nim versions, and seems to work fine actually, but, does it matter which folder choosenim resides in? |
02:22:57 | shashlick | Not really, anywhere on path is fine |
02:23:04 | shashlick | Which zip did you download |
02:23:35 | FromDiscord_ | <Skaruts> choosenim-0.5.1_windows_amd64.zip |
02:24:59 | FromDiscord_ | <Skaruts> what also confuses me is that the download exes are basically just choosenim with another name and without the dlls |
02:25:22 | FromDiscord_ | <Skaruts> running it says `could not load: (libcrypto-1_1-x64|libeay64).dll` |
02:26:50 | FromDiscord_ | <Skaruts> well, exe, singular, I haven't tried the "debug" one |
02:39:11 | * | cron joined #nim |
02:46:32 | shashlick | Yes they are the binaries only |
02:47:05 | shashlick | There should be a runme in the zip, I'll verify later |
02:49:09 | FromDiscord_ | <Skaruts> ah yes, actually there is |
02:49:52 | FromDiscord_ | <Skaruts> I did "extract here" instead of into a new folder, so the runme got lost in the middle of all the stuff |
02:53:37 | * | cron quit (Quit: Leaving.) |
02:55:20 | * | cron joined #nim |
03:14:34 | shashlick | Ok cool thanks |
03:15:07 | * | cron quit (Quit: Leaving.) |
03:33:00 | Tanger | Am I correct in thinking that the typeinfo module is where I'd be able to inspect properties on objects? |
03:36:22 | * | cron joined #nim |
03:37:44 | * | cgfuh quit (Quit: WeeChat 2.6) |
03:48:52 | * | muffindrake quit (Ping timeout: 248 seconds) |
03:51:17 | * | muffindrake joined #nim |
04:00:15 | * | marmotini_ quit (Remote host closed the connection) |
04:00:20 | * | cron1 joined #nim |
04:00:33 | * | marmotini_ joined #nim |
04:01:23 | * | cron quit (Ping timeout: 272 seconds) |
04:07:57 | * | endragor joined #nim |
04:28:45 | * | nsf joined #nim |
04:42:37 | * | marmotini_ quit (Remote host closed the connection) |
04:43:11 | * | marmotini_ joined #nim |
04:47:42 | * | marmotini_ quit (Ping timeout: 265 seconds) |
05:06:20 | FromGitter | <Varriount> Tanger: To a certain extent |
05:06:50 | FromGitter | <Varriount> You'll also want to look at the macros module |
05:07:27 | Tanger | Varriount: I ended up using typeinfo and the setX commands available in that lib. I kinda wanted to do it without macros, mainly because I'm working with an object defined in a different library |
05:07:47 | Tanger | Just took a little while to figure out what and how I'm applying toAny to |
05:08:07 | Tanger | Also, the marshal lib source code was a great help for seeing it in action |
05:13:34 | FromGitter | <zacharycarter> mratsim: in regards to - `in the Weave devel, i removed the GC constraint` - I installed the Weave using nimble install https://github.com/mratsim/weave.git (I didn't see a devel branch) and I still run into that error |
05:17:08 | * | ltriant quit (Quit: leaving) |
05:18:04 | * | dddddd quit (Read error: Connection reset by peer) |
05:19:59 | * | Cthalupa quit (Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in) |
05:20:20 | * | Cthalupa joined #nim |
05:23:51 | FromGitter | <zacharycarter> weird - but cloning the repo and running nimble install got me passed that error - not sure why nimble + git url didn't do the same thing, but whatever |
05:29:28 | * | theelous3 quit (Ping timeout: 265 seconds) |
05:30:23 | * | shuffler joined #nim |
05:30:55 | * | shuffler quit (Remote host closed the connection) |
05:35:32 | FromGitter | <zacharycarter> hmm - according to the manual, regarding gcsafe: |
05:35:55 | FromGitter | <zacharycarter> `The invoked proc must not use var parameters nor must any of its parameters contain a ref or closure type. This enforces the no heap sharing restriction.` - does that mean you can't use unsafe pointers as well? |
05:37:15 | FromGitter | <zacharycarter> it would appear it does |
05:37:47 | FromGitter | <zacharycarter> if the memory it points to is GC'd anyway |
05:46:16 | FromGitter | <zacharycarter> well actually - my proc isn't gcsafe for several reasons , so I haven't figured out whether what I asserted earlier regarding an unsafe pointer is true or not |
05:48:24 | FromGitter | <zacharycarter> okay yeah - using a pointer actually works, so cool |
05:48:33 | FromGitter | <zacharycarter> I was wrong |
05:54:50 | FromGitter | <zacharycarter> wellll I got things compiling and running with weave - but my program seg faulted |
05:54:57 | FromGitter | <zacharycarter> will have to do more investigation later - need to get ready for work |
05:55:14 | FromGitter | <zacharycarter> oh shit - probably because I didn't initialize weave lol |
06:02:37 | FromGitter | <kayabaNerve> Does Nim have a cross-platform way of getting the IP behind a domain? |
06:04:02 | FromGitter | <zacharycarter> bleh, now - `undefined reference to EnterSynchronizationBarrier` - with mingw windows |
06:11:11 | Zevv | kayabaNerve: getaddrinfo |
06:11:20 | FromDiscord_ | <Skaruts> if my system is 64 bits, shouldn't choosenim install mingw64, instead of mingw32? |
06:13:57 | FromDiscord_ | <Rika> It installs 32bit by default |
06:14:57 | FromDiscord_ | <Skaruts> not sure that mingw is the problem though |
06:15:19 | FromDiscord_ | <Skaruts> thing is, I installed nim through choosenim, and none of my programs run now |
06:17:16 | FromDiscord_ | <Skaruts> one of them that was built using csfml, I ran the exe that was there from before and it ran fine, and then I compiled it again using the "new" nim and it couldn't load the sfml dlls... |
06:18:01 | FromDiscord_ | <Skaruts> (despite that they are right next to the exe) |
06:19:19 | FromDiscord_ | <Rika> Check your path environment variable |
06:20:32 | FromDiscord_ | <Skaruts> I only have NIMBLE_BIN there |
06:21:11 | FromDiscord_ | <Skaruts> I had two entries for nim before, and I can't remember exactly what they were... |
06:22:07 | FromDiscord_ | <Skaruts> well, one was NIM_PATH, and the other was called NIM_C_PATH, but I forgot the actual paths |
06:24:19 | * | narimiran joined #nim |
06:27:26 | FromGitter | <kayabaNerve> Zevv: Thanks. I got what I needed. |
06:28:04 | FromDiscord_ | <Skaruts> hmmm, I suppose this is why (by default installs both 32bit nim and mingw): https://github.com/dom96/choosenim/issues/128 |
06:28:06 | disbot | ➥ proposal: on 64-bit Windows, download 64-bit MinGW & Nim |
06:32:57 | * | Jjp137 quit (Read error: Connection reset by peer) |
06:33:03 | * | Jjp137_ joined #nim |
06:35:41 | * | leorize quit (Remote host closed the connection) |
06:35:51 | * | cron1 quit (Quit: Leaving.) |
06:36:10 | * | leorize joined #nim |
06:45:35 | FromDiscord_ | <Rika> @Skaruts install 64 bit gcc |
06:45:44 | FromDiscord_ | <Rika> That should make choose I'm use 64 bit nim |
06:45:51 | FromDiscord_ | <Rika> Ah yes autocorrect |
06:50:54 | FromDiscord_ | <Skaruts> where do I get it from? |
07:01:03 | Tanger | What license do you guys select from nimble for projects? |
07:01:09 | Tanger | Non commercial projects, I should say |
07:01:28 | Tanger | I always default to MIT because it's first, but is it the best choice? |
07:02:56 | * | Pqzcih5 quit (Remote host closed the connection) |
07:11:59 | FromDiscord_ | <Rika> @Skaruts Uhh, manually install mingw64 |
07:12:19 | FromDiscord_ | <Rika> Tanger, if you like copyfree licencing then yes |
07:12:32 | * | livcd quit (Changing host) |
07:12:32 | * | livcd joined #nim |
07:13:20 | FromDiscord_ | <Rika> @Skaruts don't forget to remove the choosenim mingw too |
07:13:28 | FromDiscord_ | <Rika> Also choosenim nim 32 |
07:13:45 | livcd | despite the small community this chan is incredibly active! |
07:13:55 | FromDiscord_ | <Skaruts> so I install it mingw64 somewhere unrelated to nim and nimble? |
07:14:06 | FromDiscord_ | <Skaruts> and add to path |
07:14:07 | FromDiscord_ | <Rika> Tanger, personally I use LGPL 3, but that's lightly restrictive |
07:14:32 | FromDiscord_ | <Rika> Yes, then uninstall old nim then reinstall with choosenim |
07:14:51 | FromDiscord_ | <Skaruts> alright gonna give it a try |
07:15:23 | FromDiscord_ | <Skaruts> thanks |
07:15:49 | FromDiscord_ | <Rika> Don't forget to either reboot or run "refreshenv" after removing from path @Skaruts |
07:17:56 | FromDiscord_ | <Skaruts> reboot usually doesn't seem to be needed, as far as I can tell |
07:18:33 | FromDiscord_ | <Skaruts> though I keep that in mind |
07:27:09 | Tanger | Awesome, thanks Rika |
07:36:46 | * | solitudesf- joined #nim |
07:51:01 | * | uu91 joined #nim |
07:51:26 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
07:55:54 | * | uu91 quit (Remote host closed the connection) |
07:59:54 | * | PMunch joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:03:18 | FromDiscord_ | <Rika> Usually reboots aren't needed but they do fix a few issues when it comes to path |
08:05:38 | * | gmpreussner joined #nim |
08:19:37 | stefantalpalaru | Tanger, I like MPL 2.0 - it's like GPL, but limited to file boundaries: https://www.mozilla.org/en-US/MPL/2.0/FAQ/ |
08:20:04 | stefantalpalaru | "This allows, for example, programs using MPL-licensed code to be statically linked to and distributed as part of a larger proprietary piece of software, which would not generally be possible under the terms of stronger copyleft licenses." |
08:31:09 | FromDiscord_ | <sbr> Hello folks, new Nim user here. |
08:31:09 | FromDiscord_ | <sbr> Is there a way to create a "discardable" variable/binding, that doesn't trigger the `is declared but not used [XDeclaredButNotUsed]` warning? |
08:31:09 | FromDiscord_ | <sbr> For example, in Reason you can do: |
08:31:09 | FromDiscord_ | <sbr> ```js |
08:31:09 | FromDiscord_ | <sbr> let _throwAway = "xyz" |
08:31:10 | FromDiscord_ | <sbr> ``` |
08:31:11 | FromDiscord_ | <sbr> The compiler won't throw a warning. |
08:31:13 | FromDiscord_ | <sbr> What should I do in Nim? |
08:33:13 | * | dadada joined #nim |
08:33:14 | FromGitter | <zacharycarter> `discard` |
08:33:37 | * | dadada is now known as Guest1482 |
08:33:40 | narimiran | there's `{.used.}` pragma |
08:33:54 | FromGitter | <zacharycarter> https://play.nim-lang.org/#ix=28bq |
08:34:02 | narimiran | don't know if it'll do the trick here |
08:34:13 | FromGitter | <zacharycarter> or what narimiran suggested |
08:34:36 | FromGitter | <zacharycarter> oh - create a variable - yeah used is probably the right approach |
08:34:39 | narimiran | sbr, btw, you can't have underscore there in nim ;) |
08:35:24 | narimiran | yep, the pragma will work: https://play.nim-lang.org/#ix=28br |
08:41:15 | Guest1482 | (how) can I get a variable's typename as a string at compile time? |
08:41:44 | PMunch | @sbr, you can tag variables and procedures with `{.used.}` to mark them as, well, used. This means that the compiler wont complain if you don't use them (most useful in macros that generate a lot of procedures you might need, otherwise it might be nice to know if you don't use a function any longer). If you have a procedure that returns a value that you don't care about you want to use `discard` to throw that value away. Or if you have written that procedure |
08:41:44 | PMunch | yourself you might want to add `{.discardable.}` to make Nim ignore it when you don't use the return variable. You can also do `let _ = myProc()` which is functionally the same as `discard` AFAIK, but that's more useful when unpacking a tuple as in `let (_, x) = (100, 200)`. |
08:42:47 | FromDiscord_ | <sbr> Thanks, narimaran, PMunch and zacharycarter. That helps. |
08:46:01 | Zevv | https://marcin.juszkiewicz.com.pl/2019/10/15/how-to-survive-fosdem/ |
08:48:32 | FromDiscord_ | <has1> hi, why doesn't nim do go like concurrency? |
08:48:54 | PMunch | Guest1482, depends on how deep you want to go: https://play.nim-lang.org/#ix=28by |
08:50:08 | PMunch | Just typename you can get with `getTypeInst(x)`, but if it is a distinct then you might be interested in checking out `getTypeImpl` to dig down to the actual type. |
08:55:12 | * | floppydh joined #nim |
08:56:14 | Guest1482 | PMunch: thanks |
08:57:01 | FromDiscord_ | <has1> hi, i have asked this before, but how do i use plugin with nim? |
08:57:24 | FromDiscord_ | <has1> i want to compile code as .dll or .data or whatever and then use this code and call a function from my main nim app |
08:58:47 | PMunch | If you want to load it dynamically on runtime you can use the `dynlib` module: https://nim-lang.org/docs/dynlib.html |
09:00:23 | PMunch | If the dynamic library you load is written in Nim you need to pass --useNimRtl when you compile both your main program and the plug-in, and then compile that dynamic library somewhere to your path (or just locally in the same folder). This makes the main program and the dll able to work with a common GC |
09:00:48 | PMunch | (so that you can pass GC'ed memory between your plug-in and your main program) |
09:02:47 | PMunch | If you just want to link against a dynamic library you can check out Nim in action: https://livebook.manning.com/book/nim-in-action/chapter-8/122 |
09:03:00 | PMunch | (Free chapter) |
09:03:36 | PMunch | Oh by the way @sbr, please don't post code directly to Discord. It comes through directly to IRC and messes up the chat. |
09:03:52 | PMunch | Use a paste site like ix.io, pastebin, or hastebin |
09:04:55 | * | marmotini_ joined #nim |
09:07:03 | FromDiscord_ | <has1> i want to run a function written in nim |
09:07:22 | FromDiscord_ | <has1> ``` |
09:07:22 | FromDiscord_ | <has1> proc greet() = |
09:07:22 | FromDiscord_ | <has1> echo "hello world" |
09:07:22 | FromDiscord_ | <has1> |
09:07:22 | FromDiscord_ | <has1> when isMainModule: |
09:07:23 | FromDiscord_ | <has1> greet() |
09:07:23 | FromDiscord_ | <has1> ``` |
09:07:24 | FromDiscord_ | <has1> this is my plugin code |
09:08:03 | FromDiscord_ | <sbr> Good to know, I will keep it in mind, PMunch |
09:08:28 | FromDiscord_ | <has1> but how does the nimrtl thing work? the docs say |
09:08:30 | FromDiscord_ | <has1> "nim c -d:release lib/nimrtl.nim" |
09:08:44 | FromDiscord_ | <has1> but there is no file lib/nimrtl.nim, am i supposed to download this somehwere? |
09:08:46 | PMunch | @has1, that goes for you too, please don't paste code directly to Discord.. |
09:09:03 | FromDiscord_ | <has1> its literally 4 lines |
09:09:03 | PMunch | disruptek, does disbot have a info shortcut for pastesites? |
09:09:40 | PMunch | has1, that is in the Nim repo, it should be right next to the Nim binary |
09:10:25 | FromGitter | <alehander92> hm |
09:10:29 | PMunch | has1, 5 lines, plus two lines for the code start/end marker, so seven lines total. And if you're unlucky someone will say something in the middle of it.. |
09:10:37 | FromGitter | <alehander92> what kind of plugin is this |
09:11:08 | PMunch | I should write an article about that as well now that I think about it.. |
09:11:20 | PMunch | How to load dynamic libraries in Nim |
09:12:12 | FromDiscord_ | <has1> well i want to make it work first |
09:12:21 | FromDiscord_ | <has1> so its a hello world example |
09:12:47 | * | sbr8 joined #nim |
09:13:37 | FromDiscord_ | <has1> so where is lib/nimrtl? |
09:14:04 | PMunch | Right next to the compiler |
09:14:09 | FromDiscord_ | <has1> user@pc:~$ which nim |
09:14:09 | FromDiscord_ | <has1> /home/user/.nimble/bin/nim |
09:14:25 | PMunch | Ah did you install via choosenim? |
09:14:29 | FromDiscord_ | <has1> yes |
09:14:57 | PMunch | Then it is in .choosenim/toolchains/<nim version>/ |
09:16:11 | * | marmotini_ quit (Remote host closed the connection) |
09:18:18 | FromDiscord_ | <has1> by the way, the compiler spits out a ton of warnings for this |
09:18:22 | FromDiscord_ | <has1> like 10x UnusedImport |
09:18:32 | FromDiscord_ | <has1> 10x XDeclaredButNotUsed |
09:18:48 | FromDiscord_ | <has1> also lots of "Deprecated" |
09:19:10 | * | sealmove joined #nim |
09:21:57 | FromDiscord_ | <has1> so now i have a file called libnimrtl.so |
09:22:17 | FromDiscord_ | <has1> So what do I do now? How do i compile the plugin? |
09:25:04 | FromDiscord_ | <has1> ``` |
09:25:05 | FromDiscord_ | <has1> nim c --app:lib main.nim |
09:25:05 | FromDiscord_ | <has1> ``` |
09:25:05 | FromDiscord_ | <has1> like this? |
09:25:34 | FromDiscord_ | <has1> and then the main app with |
09:25:35 | FromDiscord_ | <has1> ``` |
09:25:35 | FromDiscord_ | <has1> nim c -d:useNimRtl main.nim |
09:25:35 | FromDiscord_ | <has1> ``` |
09:28:17 | * | letto quit (Quit: Konversation terminated!) |
09:29:08 | PMunch | Both parts with -d:useNimRtl |
09:29:41 | PMunch | And all those warnings are normal |
09:29:53 | PMunch | And please stop pasting things directly into Discord.. |
09:30:08 | * | letto joined #nim |
09:30:13 | PMunch | Just look at this mess: https://irclogs.nim-lang.org/24-01-2020.html#09:25:04 |
09:31:05 | FromDiscord_ | <has1> I am getting |
09:31:05 | FromDiscord_ | <has1> "libnimrtl.so: cannot open shared object file: No such file or directory |
09:31:06 | FromDiscord_ | <has1> could not load: libnimrtl.so" |
09:31:21 | FromDiscord_ | <has1> and yes i copied the file to the directory |
09:32:18 | PMunch | Try to run with LD_LIBRARY_PATH=. ./myProgram |
09:34:31 | FromDiscord_ | <has1> where am i supposed to put this command? |
09:34:46 | PMunch | On your command line? |
09:34:55 | Zevv | Ar_q, Why is anyway it that arc sinked/moved things get zeroed out? Who cares if the original object still lies around after the operation? |
09:36:39 | FromDiscord_ | <has1> @PMunch so i run ```LD_LIBRARY_PATH=. ./myProgram``` |
09:36:40 | FromDiscord_ | <has1> gotcha |
09:37:19 | PMunch | Yes, that environment variable controls where you load libraries from |
09:38:50 | * | marmotini_ joined #nim |
09:39:34 | * | marmotini_ quit (Read error: Connection reset by peer) |
09:39:39 | * | marmotin_ joined #nim |
09:42:33 | FromDiscord_ | <has1> so now i am getting |
09:42:33 | FromDiscord_ | <has1> ``` |
09:42:34 | FromDiscord_ | <has1> hello from plugin |
09:42:34 | FromDiscord_ | <has1> Error loading 'greet' function from library |
09:42:34 | FromDiscord_ | <has1> ``` |
09:43:04 | FromDiscord_ | <has1> so the plugin function is actually running (it echos this line above) but it still says there was an error? |
09:43:42 | PMunch | What is the code you use to call it (and again, please don't paste it directly) |
09:44:15 | FromDiscord_ | <has1> please get over the 2 line copies. I am not going to use pastebin for 2 lines of code |
09:44:43 | PMunch | Then I will have to ban you.. |
09:44:55 | Araq | PMunch, no, please don't |
09:44:59 | PMunch | But to fix your problem you might need to use `extern` or `exportc` |
09:45:04 | Araq | 2 lines are fine indeed |
09:45:05 | FromDiscord_ | <has1> then i guess youll have to ban me for copying 2 lines of code |
09:45:07 | * | marmotin_ quit (Remote host closed the connection) |
09:45:18 | FromDiscord_ | <has1> why even have the discord then |
09:45:22 | PMunch | Araq, they come through as 4 lines, he should learn to behave.. |
09:45:58 | PMunch | We have a todo of getting the Discord bot to automatically create links like the Gitter bot does |
09:46:39 | PMunch | But in the meantime we hope that everyone can be co-operative enough to not spam the chat |
09:46:51 | FromDiscord_ | <has1> then maybe dont use irc |
09:46:54 | FromDiscord_ | <has1> if its such a pain? |
09:47:18 | FromDiscord_ | <Rika> Discord has horrible data privacy |
09:47:36 | FromDiscord_ | <Rika> I use it because the majority of my friends are here |
09:47:47 | FromDiscord_ | <Rika> But understand that some people don't want that |
09:48:05 | PMunch | I have enough horrible web-apps running, I don't need another. |
09:48:27 | * | sbr8 quit (Ping timeout: 240 seconds) |
09:48:29 | FromDiscord_ | <has1> well someone could just take screenshots of what you say on IRC too. All you say in this public chat is public anyway |
09:48:44 | FromDiscord_ | <Rika> I don't mean regards chat |
09:49:31 | PMunch | But let's not get this into a discussion of which chat platform is superior |
09:49:42 | FromDiscord_ | <Rika> Yeah |
09:50:17 | FromDiscord_ | <mratsim> There is a pinned message on iscord that says "PLEASE don't use multiline message or code snippets". Especially if you want some help. |
09:50:26 | FromGitter | <alehander92> has1 sorry, but its very very very very very disrespectful to come into a community and refuse to show a little courtesy |
09:50:41 | PMunch | As I said, you might need `extern` or `exportc` to tell Nim not to mangle the name of your procedure so that it can be found when you try to load it. If you look at the output of `nm myProgram` then you will see what the symbol is actually called in the binary |
09:50:43 | Guest1482 | can you put a stub for an operator into a template? |
09:50:52 | FromDiscord_ | <mratsim> We're receptive to bot suggestions, they should cover: matrix, IRC, Discord, Gitter |
09:51:07 | PMunch | Guest1482, what do you mean? |
09:51:25 | FromGitter | <alehander92> i agree its very annoying to use paste services, but there are plugins/shortcuts/terminal utilities etc for that which make it easy |
09:51:29 | Guest1482 | for example if you want to do: a op b ( like a + b, or a - b), and then call the template with call(+) |
09:51:40 | FromDiscord_ | <mratsim> yes |
09:52:07 | FromDiscord_ | <mratsim> template call(op: untyped): untyped = op(a, b) |
09:52:08 | PMunch | Yeah, I have a keyboard shortcut that sends my current selection to ix.io, so it's no more work than doing a simple copy-paste to copy a paste link |
09:52:24 | FromDiscord_ | <mratsim> sorry template call(a, op, b: untyped): untyped = op(a, b) |
09:52:31 | FromDiscord_ | <has1> @alehander92 i was literally posting a 2 line error message there, what am i supposed to do? Are you telling me to use pastebin to paste 2 lines in there? |
09:52:35 | PMunch | Is the current Discord bot a Nim thing, or some pre-existing solution? |
09:52:47 | FromDiscord_ | <mratsim> actually template call(op: untyped): untyped {.dirty.}= op(a, b) should work |
09:53:05 | * | marmotini_ joined #nim |
09:53:17 | FromDiscord_ | <mratsim> write 2 separate lines, don't paste |
09:53:21 | FromDiscord_ | <Rika> @mratsim who programmed the bot? Why not automatically use a paste service for multilines |
09:53:39 | FromDiscord_ | <mratsim> ask @Yardanico ^ |
09:53:47 | FromDiscord_ | <has1> @mratsim huh? What?? |
09:53:52 | FromDiscord_ | <mratsim> AFAIK for the offtopic channel there is a proper bot that supports multiline |
09:53:53 | FromDiscord_ | <Rika> I'm pretty sure Yardanico is making the we hook version |
09:53:57 | Yardanico | @Rika right now the bot just uses matterbridge |
09:54:00 | FromDiscord_ | <Rika> Webhook I mean |
09:54:05 | FromGitter | <alehander92> has1 you can just input the text without discord codeblock formatting, or just use ix.io / another editor shortcut to do that |
09:54:06 | FromDiscord_ | <Rika> Oh I see |
09:54:09 | PMunch | has1, the bot adds triple quotes to multiline pastes, which adds two lines for each paste |
09:54:12 | Yardanico | yeah, you can check the webhook beta version in https://github.com/Yardanico/ircord |
09:54:23 | Yardanico | it's not stable yet though, need to fix all crashes and changes to the latest discord API |
09:54:30 | FromDiscord_ | <has1> so the discord codeblock is what annoys you? Not the actual text? |
09:54:31 | PMunch | So if you only have two lines then at least put them on separate lines so they only come through as two lines |
09:54:33 | FromGitter | <alehander92> or you can rewrite the bot if you want, after all this is a rule that helps everyone |
09:54:47 | FromDiscord_ | <Rika> Don't forget to fix upstream too ;; |
09:54:56 | FromDiscord_ | <Rika> (discordnim is old) |
09:55:02 | FromGitter | <alehander92> has1 the fact that it rendered in very unpleasant way in other chat platforms |
09:55:16 | FromDiscord_ | <has1> @PMunch i was copying the error as is from my cmd and pasting it here to get help |
09:55:29 | PMunch | Well, text more than a couple lines annoys us as well. But two lines are generally fine |
09:55:34 | FromDiscord_ | <Rika> Then take the effort to send the lines in separate messages |
09:55:45 | Guest1482 | the suggested templates don't work in playground |
09:55:47 | FromDiscord_ | <Rika> At least with over 2 lines yeab |
09:56:03 | FromDiscord_ | <has1> i honestly have no idea what you are trying to tell me |
09:56:04 | FromDiscord_ | <has1> hello from plugin |
09:56:04 | FromDiscord_ | <has1> Error loading 'greet' function from library |
09:56:07 | FromDiscord_ | <has1> is this different from |
09:56:10 | FromDiscord_ | <has1> hello from plugin |
09:56:13 | FromDiscord_ | <has1> Error loading 'greet' function from library |
09:56:14 | FromDiscord_ | <has1> ?? |
09:56:16 | Guest1482 | Nim thinks an int literal is given with call(+) |
09:56:17 | FromDiscord_ | <Rika> Yes |
09:56:26 | FromGitter | <alehander92> has1 yes this is much better |
09:56:36 | FromDiscord_ | <Rika> Newlines aren't separated as messages by the irc bot |
09:56:48 | FromDiscord_ | <Rika> So they look like one whole message |
09:56:53 | FromDiscord_ | <Rika> With no newlines |
09:56:54 | FromGitter | <alehander92> and yeah one day we need a better bot/bridge, but thats life |
09:57:13 | PMunch | has1, this is the thing I have running on a keyboard shortcut to get ix.io pastes if you want to try it out: https://irclogs.nim-lang.org/24-01-2020.html#09:25:04 |
09:57:16 | Yardanico | well ircord actually already has multiline auto pasting support, and editing kind of too :P |
09:57:19 | PMunch | Woops: xclip -o -selection -primary | curl -F 'f:1=<-' ix.io | head -c-1 | echo "$(< /dev/stdin)/" | xclip -i -selection clipboard |
09:57:31 | FromDiscord_ | <has1> i still don't get it. I did the same thing the first time, only that i used a code block around it |
09:57:32 | Zevv | PMunch: could the bridges not detect dumps from the other side and create a pastbin/ix dump for the IRC side? |
09:57:34 | FromGitter | <alehander92> well then i guess we can try to use ircord? is there a blocker |
09:57:34 | Yardanico | it just tells if the message was modified and resends it, since I didn't find any good diff str lib in Nim |
09:57:43 | PMunch | It grabs your current selection, so it works the same way as Ctrl+C |
09:57:46 | FromDiscord_ | <Rika> PMunch , dependency on x server :P |
09:57:48 | Yardanico | Zevv: matterbridge sadly doesn't but ircord does :P |
09:57:50 | FromGitter | <alehander92> has1 well .. obviously this is the difference :P |
09:58:00 | FromDiscord_ | <mratsim> @Guest1482: https://play.nim-lang.org/#ix=28bI |
09:58:18 | Yardanico | https://github.com/Yardanico/ircord/blob/master/src/ircord.nim#L116 |
09:58:23 | FromDiscord_ | <Rika> Yardanico, doesn't nim have a diff lib right in stdlib? Is it that bad? |
09:58:33 | Yardanico | it wouldn't work for my usecase |
09:58:34 | FromGitter | <alehander92> has1 trust me i also prefer to use code blocks on gitter and i did before but it is a pita for the others |
09:58:57 | PMunch | Zevv, yes that is what we want to happen |
09:59:04 | Yardanico | https://nim-lang.org/docs/diff.html finds difference between two texts |
09:59:09 | FromDiscord_ | <has1> So the problem is the code block, not the 2 lines, i can remove the code blocks if its better |
09:59:17 | Yardanico | it only gives you number of changes and start line |
09:59:18 | FromDiscord_ | <has1> its just a habit to format the block |
09:59:29 | FromDiscord_ | <has1> either way, this is my code right now: |
09:59:30 | FromDiscord_ | <has1> |
09:59:30 | FromDiscord_ | <has1> https://play.nim-lang.org/#ix=28bJ |
09:59:35 | PMunch | Rika, well yeah. Doesn't have to be though |
09:59:47 | FromDiscord_ | <mratsim> The 2 lines also render with a strange carriage return character, you can see that in irc-logs.nim-lang.org |
09:59:48 | * | marmotini_ quit (Read error: Connection reset by peer) |
10:00:00 | PMunch | Just need to find another way to get the current selection and set the clipboard, xclip was just the easiest solution for me |
10:00:02 | * | uu91 joined #nim |
10:00:14 | FromDiscord_ | <Skaruts> @Rika it worked, choosenim installed 64 bits 🙂 thanks |
10:00:15 | FromDiscord_ | <Rika> Then you realize you're on windows :P |
10:00:30 | FromGitter | <alehander92> has1 yeah this would be good for now, and again for everything bigger try to also use some kind of service, sorry for the inconvenience and thanks! |
10:00:31 | Yardanico | also, just to confirm again, is it okay that ircord decides that a message is big if it's: either more than 2 lines (\n), larger than 500 characters (512 is IRC limit for 1 msg), or has ``` in it (which is used for code blocks usually) |
10:00:47 | FromDiscord_ | <Rika> Yes |
10:00:47 | PMunch | Rika, ah well I'm lucky to seldom find myself in that pickle |
10:00:52 | FromGitter | <alehander92> yardanico what does it do with big messages? |
10:00:54 | FromDiscord_ | <Rika> I think that is fine |
10:00:58 | FromDiscord_ | <mratsim> well, try it and see if there are new complaints |
10:00:59 | Yardanico | paste them to ix.io |
10:01:20 | FromGitter | <alehander92> one thing i am afraid about ix.io is that i guess things expire there |
10:01:24 | Yardanico | well yeah |
10:01:30 | FromGitter | <alehander92> so if one reads the logs in the future it might be an issue |
10:01:31 | FromDiscord_ | <Rika> PMunch, I wish that was the same for me too. Old Japanese games prevent me from that though |
10:01:35 | FromGitter | <alehander92> but i am not sure for a workaround |
10:01:35 | FromDiscord_ | <Rika> Anyway |
10:01:45 | PMunch | Yardanico, yeah that should be fine. But maybe it should be 512 - "<"+username+">".len |
10:01:49 | FromDiscord_ | <has1> So when i run my above code, it gives me the output "hello from plugin", so it clearly does call the greet function, but then it still errors out, how can i fix this? |
10:01:52 | Yardanico | PMunch: ah right |
10:02:04 | FromDiscord_ | <Rika> PMunch & not + |
10:02:05 | FromDiscord_ | <has1> So when i run my above code, it gives me the output "hello from plugin", so it clearly does call the greet function from the plugin, but then it still errors out, how can i fix this? |
10:02:08 | FromDiscord_ | <Rika> Ahahahaha |
10:02:22 | FromDiscord_ | <Rika> Also parens needed |
10:02:28 | PMunch | alehander92, I'm currently running an experiment to see how long the expire is. Seems to be about 2 years |
10:02:30 | FromGitter | <alehander92> has1 is there any way to run it under a debugger |
10:02:45 | FromGitter | <alehander92> PMunch hm .. we can just send them an email and ask them :P |
10:02:46 | PMunch | Rika, old games tend to run pretty well under Wine :) |
10:02:54 | FromGitter | <alehander92> but its a good experiment :O |
10:03:15 | FromDiscord_ | <has1> is the function definition even correct? I dont know if it is |
10:03:16 | FromDiscord_ | <Rika> PMunch, my experience is that the games I tried did not |
10:03:20 | FromDiscord_ | <Rika> So yeah :/ |
10:03:20 | PMunch | Rika, and sorry I meant & :P Gotten too used to C# *shudders* |
10:03:47 | PMunch | alehander92, it's based on wraparound though |
10:03:48 | Yardanico | well if you guys are curious on how ircord works, I can enable it now for bridging #nim-offtopic and offtopic on discord just for a test |
10:03:50 | FromDiscord_ | <Rika> I say F(#) to that |
10:03:57 | PMunch | So it depends on how many pastes they get |
10:04:18 | PMunch | Yardanico, sounds like a good idea |
10:04:27 | FromGitter | <alehander92> yardanico ok! |
10:04:30 | PMunch | Rika, yeah there has been some talk around here to start using F# |
10:04:41 | Yardanico | started it locally on my PC :) |
10:04:44 | Yardanico | it's gonna connect in around 5-10 sec |
10:05:04 | Yardanico | yeah its up now |
10:05:36 | FromGitter | <alehander92> has1 where is the .so on your actual filesystem |
10:05:41 | FromGitter | <alehander92> is it near the binary |
10:06:22 | FromDiscord_ | <has1> yes |
10:06:29 | FromDiscord_ | <has1> but look at the output! |
10:06:52 | FromDiscord_ | <has1> it prints "hello from plugin" it clearly does call the greet function |
10:09:55 | PMunch | has1, the plugin.nim is still the main module when you compile it as a library |
10:10:09 | Guest1482 | the operator doesn't get recognized as an identifier when you put it into call(+) |
10:10:14 | PMunch | So that code is put in a part of the so that gets automatically run on load |
10:10:21 | PMunch | That's where the message comes from |
10:10:27 | FromGitter | <alehander92> hm but one is libmain.so and the other is different? |
10:11:28 | PMunch | But if you add `{.exportc.}` to the greep procedure it will keep the name greet, and not be named "greep_<some deterministic name mangling string>" (again, take a look at the output of `nm ./myProgram` to see the actual name) |
10:12:03 | PMunch | Guest1482, try with backticks around the operator |
10:12:14 | Guest1482 | already have tried it |
10:12:59 | PMunch | Guest1482, like this? https://play.nim-lang.org/#ix=28bP |
10:13:03 | PMunch | Because that works |
10:14:21 | FromGitter | <alehander92> and notice a op b wouldnt work |
10:15:08 | Guest1482 | PMunch: made a stupid error, you're right, of course it works! :D |
10:16:10 | FromDiscord_ | <has1> oii it seems to work now! |
10:16:30 | FromDiscord_ | <has1> but what is the difference between |
10:16:30 | FromDiscord_ | <has1> "proc greet() : string {.exportc.} = " |
10:16:37 | FromDiscord_ | <has1> and |
10:16:37 | FromDiscord_ | <has1> proc greet() : cstring {.exportc.} = |
10:16:42 | FromDiscord_ | <has1> both seem to work |
10:16:48 | Yardanico | cstring has a null terminator while string doesn't |
10:16:54 | Yardanico | null terminator for C compatibility |
10:17:24 | Yardanico | see https://nim-lang.org/docs/manual.html#types-cstring-type |
10:17:56 | FromDiscord_ | <has1> so i can just use string for my nim code? |
10:18:11 | Yardanico | well, you only need to use cstring when you're interfacing with C anyway |
10:18:12 | FromDiscord_ | <has1> i would use cstring if i was calling a c lib? |
10:18:16 | Yardanico | you don't have to use cstring in your nim code really |
10:18:39 | Yardanico | but I'm not sure about your case with dynlib and stuff though, there's GC involved |
10:19:24 | PMunch | cstring is the same as char *, a Nim string is an object with size, capacity, and a pointer to a cstring. |
10:20:01 | PMunch | Since both your parts are using Nim and you use nimrtl you can safely use regular Nim strings. |
10:22:43 | * | theelous3 joined #nim |
10:23:01 | FromDiscord_ | <has1> can i also use loadLib with the actual bytes of the plugin instead of a filepath? |
10:23:24 | PMunch | No |
10:23:37 | PMunch | You would have to write them to a file first |
10:23:41 | FromDiscord_ | <Rika> Bytes of the binary or the source???? |
10:24:02 | FromDiscord_ | <has1> of the plugin.so file |
10:24:17 | FromDiscord_ | <Rika> Don't think so, no |
10:24:34 | PMunch | loadLib uses the operating systems dynamic loading procedures, which only accepts files |
10:25:24 | FromDiscord_ | <has1> so if you had a paid plugin, what would prevent someone from just giving the plugin file to someone else? |
10:25:29 | FromDiscord_ | <has1> and then they can use that |
10:26:04 | FromDiscord_ | <Rika> That's out of the scope of dylib |
10:26:08 | PMunch | Well, nothing, that's why you have huge companies that tries to create ways of solving digital distribution :P |
10:26:09 | FromDiscord_ | <Rika> Dynlib |
10:29:07 | Yardanico | @has1 obviously there would be some kind of protection then |
10:29:27 | Yardanico | but most of it is crackable anyway |
10:30:41 | Guest1482 | created some pseudo code, I'm going to implement something like this with macros/templates, I'm not suggestion to make this official part of Nim, but still would like to get a review of this idea: https://pastebin.com/pkgauA1s |
10:30:53 | Guest1482 | s/suggestion/suggesting |
10:30:59 | * | solitudesf- quit (Quit: Leaving) |
10:31:18 | * | solitudesf joined #nim |
10:31:19 | * | surma quit () |
10:31:34 | * | surma joined #nim |
10:32:10 | * | Guest1482 is now known as dadada |
10:33:14 | dadada | I think it would make long case-of ladders more readable and hence easier to maintain |
10:33:17 | PMunch | Guest1482, oh cool that is indeed helpful |
10:33:33 | PMunch | s/Guest1482/dadada |
10:33:33 | dadada | Guest1482 == dadada :D |
10:33:41 | FromDiscord_ | <Rika> I see |
10:34:10 | PMunch | Yeah I had a sneaking suspicion that might be you :P |
10:34:20 | Araq | the idea is good but today's Nim can easily do it already via its macro system |
10:35:15 | Araq | and the only reason why the VM is copy&paste code is that the VM empowers Nim's macro system so when I wrote it the macro system wasn't stable enough to use |
10:35:29 | Araq | chicken and egg |
10:35:34 | narimiran | am i missing something? shouldn't this be doable even without macros? |
10:36:13 | Zevv | oi Araq. Can I bother you with some questions again? 1) what is the reason that after a move/sink the source memory gets zeroed out? 2) Would it make sense to (partly) consolidate the seqs_v2/strs_v2 implementations? |
10:36:23 | narimiran | ok, now i see some added details like `opc<when>Float` |
10:36:38 | dadada | Araq: please do not think I'm criticizing your code's quality, this something I've seen in all languages, I just wanted to pick an example, not picking on you or Nim in the least! |
10:36:46 | Araq | narimiran, it's perfectly doable with Nim's macros anyway. |
10:36:59 | Araq | dadada, yeah I know and I am not offended. |
10:37:04 | dadada | :D puh |
10:37:14 | Araq | but you need to be aware that Nim itself wasn't always written in Nim. |
10:37:27 | dadada | totally get that! |
10:38:09 | Araq | I can write a 'dispatch' macro that does away with the boilerplate. |
10:38:18 | PMunch | Yeah this is a pretty common pattern, would be nice to have a clean solution :) |
10:38:39 | Araq | the problem is that you can't, yet. and that you don't know we can already do it. ;-) |
10:38:43 | FromDiscord_ | <alehander42> dadada i think this is very interesting |
10:39:48 | Araq | Zevv, we need to 'disarm' the destructor |
10:39:55 | FromDiscord_ | <alehander42> but i'd solve it like having just a single decode..; regs[ra].floatVal = apply(operationFor(kind), regs[rb].fl.. , other) |
10:40:41 | Araq | dadada, for newer code we indeed use Nim's advanced features now that they are reasonable stable. |
10:41:12 | FromDiscord_ | <alehander42> apply generates a nkCall, and operationFor returns *somehow* an operation/function |
10:41:15 | Araq | of course, usually fixing bugs and writing new code is more important than rewriting old, working code. |
10:41:42 | Zevv | Araq: So the distructor somehow looks at the content of the memory and zeroing disarms it. Does that imply that I can't destruct an object that contains only zeros by itself? |
10:42:10 | Araq | yeah, kind of, that's what it means |
10:42:24 | Araq | I mean the =destroy is called either way |
10:42:34 | Araq | but there is little to be done inside if it's all zeros |
10:42:41 | FromDiscord_ | <alehander42> and operationFor now is a simple mapping between enum values and operators : i think thats very close to what i'd do in dynamic lang like lisp/python |
10:43:10 | FromDiscord_ | <alehander42> but oftemplate is also interesting in its own way, but i think it can be kinda done as a macro |
10:43:49 | Zevv | Araq: create object X which wraps a file descriptor and has a destructor that closes the fd. I make a deamon that first closes all fds include stdin/stdout/stderr and then instantiate one of these objects. That opens a file and gets fd 0. The =destroy runs and the file is never closed. |
10:43:50 | dadada | alehander42: I'll try to implement it as a macro |
10:43:55 | FromDiscord_ | <alehander42> hm, i even suspect`<when>` can be supported as syntax if one tries |
10:44:43 | FromDiscord_ | <alehander42> ok! |
10:45:39 | dadada | it'll probably become a nimble package when I'm done ^^ |
10:46:02 | Araq | Zevv, this is a bad idea for plenty of reasons |
10:46:29 | Araq | but apart from that, use a 'valid: bool' flag inside |
10:46:47 | Araq | or store fd+1 inside so that 0 is free to mean "nothing here" |
10:47:01 | Zevv | Suure, all fine. But you can't deny it is unexpected. |
10:47:35 | FromDiscord_ | <alehander42> dadada sounds good! i still prefer the `apply/call` code, but many people seem to like different style of reuse |
10:48:19 | Araq | Zevv, I'm not denying anything but Nim's "default zero" choice is too good for performance to abandon it |
10:49:19 | FromDiscord_ | <alehander42> but still, `opc<when>Float` vs `opc{when}Float` or `opc[when]float` |
10:49:24 | FromDiscord_ | <alehander42> not sure about that |
10:49:26 | Zevv | of course, just mean that it should be documented |
10:49:45 | Araq | I think it is. |
10:49:56 | Araq | however there is more going on for files |
10:50:14 | Araq | which makes this problem disappear. kind of. |
10:50:22 | dadada | alehander42: me neither |
10:50:34 | Araq | I won't mention it in my talk because my talk is becoming too long already |
10:50:38 | Zevv | Another one then: http://ix.io/28bY - is this correct? |
10:51:49 | Araq | yes. for now. |
10:52:07 | Araq | we will remove 'wasMoved+destroy' pairs. |
10:52:24 | Araq | and then the spurious destructor calls will disappear |
10:52:32 | Zevv | ok, thanks |
10:52:41 | Araq | hnmm |
10:53:08 | Araq | wait a sec, I think that's a bug for today's implementation too :-) |
10:54:23 | Zevv | also - contrary to what I understand from the zeroed memory - if I create only one 'foo' with `val: 0`, I still get 3 destructor calls |
10:54:59 | dadada | alehander42: I'm also considering a more flexible syntax oftemplate opc<op: untyped>Float<op2: untyped>: , when op == Add: `+` when op2 == PowerOfTwo: `^2` |
10:55:29 | Araq | dadada, please explore what's possible in Nim before inventing your own inferior syntax |
10:56:18 | dadada | Araq: will do! it's nothing but a template (pun) for a special type of template I was pondering |
10:56:59 | Araq | maybe after 14 years of development it's rather well though-out and pleasant to use. |
10:57:46 | Araq | and reasonably feature complete too. I dunno, maybe. |
10:58:40 | Araq | Zevv, strange, worth investigating. ping Clyybber |
10:59:57 | * | abm joined #nim |
11:08:28 | FromDiscord_ | <alehander42> Araq his syntax can almost be done with a macro |
11:08:58 | FromDiscord_ | <alehander42> but i agree, try to not overdo it for edge cases |
11:09:40 | FromDiscord_ | <alehander42> after all the problem you solve is reuse: you want to pass a custom operation to some arguments |
11:09:46 | dadada | alehander42: I might find a better syntax, first I've to collect a number of example use cases to know what the pain points are |
11:10:05 | * | NimBot joined #nim |
11:10:18 | FromDiscord_ | <alehander42> so you dont have to tie it to case/if and other constructs |
11:10:35 | dadada | alehander42: yes, the custom operation is just an example, it could also be a custom integer, string, or anything else you can do in a template |
11:10:47 | FromDiscord_ | <alehander42> hm yeah more usecases wold be good |
11:12:11 | FromDiscord_ | <alehander42> but yeah syntax experimentation is fun |
11:12:37 | FromDiscord_ | <alehander42> what do you think about https://github.com/alehander42/poly |
11:12:59 | FromDiscord_ | <alehander42> it was inspired by nims older rewrite constraints i think |
11:13:06 | FromDiscord_ | <alehander42> but i think its too limited probably |
11:14:41 | * | sbr8 joined #nim |
11:15:53 | * | sbr88 joined #nim |
11:17:35 | sbr88 | Hi, I'm having problems installing packages via nimble in docker. I've downloaded the semi-official nimlang docker image. But I always get "execution failed". The strange thing is that the command outputs `-o "/usr/src/app/src/myProgram" "/usr/src/app/src/src/myProgram.nim" |
11:17:56 | sbr88 | The first line is correct, but in the second line the command puts in an extra "src" |
11:18:27 | sbr88 | And then nimble tells me [OSError] no such file or directory |
11:19:03 | sbr88 | Can I manually pass the -o flag? It doesn't work with `nimble install -o "/usr/src/app/src/myProgram" |
11:19:24 | * | sbr8 left #nim (#nim) |
11:25:49 | dadada | alehander42: poly deserves a more descriptive name. Maybe "discriminate"? (to discriminate can also mean to make a difference between) |
11:26:02 | dadada | otherwise thanks for letting me know about it |
11:26:03 | dadada | :D |
11:29:08 | * | marmotini_ joined #nim |
11:29:09 | * | solitudesf quit (Ping timeout: 272 seconds) |
11:31:16 | * | JustASlacker joined #nim |
11:33:38 | FromGitter | <alehander92> i was coming from `polymorphism` i think |
11:33:47 | FromGitter | <alehander92> but probably not a great name |
11:34:11 | * | marmotini_ quit (Ping timeout: 265 seconds) |
11:34:26 | dadada | alehander42: poly also has a meaning of being different from in addition to many and more (what I thought about), as I just found out, maybe it's fine :D ... the name is okay, it just didn't click immediately with me |
11:34:27 | * | dddddd joined #nim |
11:34:36 | * | cgfuh joined #nim |
11:34:58 | FromGitter | <alehander92> yeah exactly |
11:35:05 | FromGitter | <alehander92> but i suspect pattern matching is more useful |
11:35:09 | FromGitter | <alehander92> for dispatching case objects |
11:35:25 | * | marmotini_ joined #nim |
11:35:43 | FromGitter | <alehander92> i just liked the way you can define different "overloads" based on pattern matching in erlang/elixir |
11:35:54 | FromGitter | <alehander92> but you can still do this in a pattern matching lib |
11:36:32 | * | sbr88 left #nim ("leaving") |
11:37:10 | * | sbr88 joined #nim |
11:43:07 | * | marmotini_ quit (Remote host closed the connection) |
11:43:16 | * | marmotini_ joined #nim |
11:47:58 | * | marmotini_ quit (Remote host closed the connection) |
11:52:11 | * | marmotini_ joined #nim |
11:56:42 | * | nsf quit (Quit: WeeChat 2.7) |
11:56:53 | * | marmotini_ quit (Remote host closed the connection) |
12:03:43 | * | solitudesf joined #nim |
12:06:14 | * | Vladar joined #nim |
12:11:33 | * | marmotini_ joined #nim |
12:22:07 | * | marmotini_ quit (Remote host closed the connection) |
12:23:10 | FromDiscord_ | <has1> hi, how do i do concurrent stuff in nim? |
12:23:21 | * | sbr88 quit (Ping timeout: 268 seconds) |
12:24:03 | FromDiscord_ | <has1> A simple example is this, i have numbers from 1..10000 |
12:24:04 | FromDiscord_ | <has1> i want to hash(i) and if the hash == given then i want to abort all other "coroutines"/ "threads" and print the result |
12:25:01 | * | marmotini_ joined #nim |
12:25:16 | * | marmotini_ quit (Remote host closed the connection) |
12:25:23 | PMunch | has1, threadpool might be of interest: https://nim-lang.org/docs/threadpool.html |
12:25:24 | * | marmotini_ joined #nim |
12:26:07 | PMunch | Or you could try out Weave: https://github.com/mratsim/weave mratsim, is this stable enough to try? |
12:33:01 | * | marmotini_ quit (Remote host closed the connection) |
12:34:58 | * | marmotini_ joined #nim |
12:38:53 | * | marmotini_ quit (Remote host closed the connection) |
12:41:29 | * | seni joined #nim |
12:44:47 | Yardanico | just an update on ircord bridge - I've implemented banning of users on Discord from IRC |
12:45:06 | Yardanico | so every person who is in the config of trusted users (I've put all OP users from #nim channel currently, and myself for testing :D) can just do |
12:45:12 | Yardanico | !ban Username#1234 |
12:45:16 | Yardanico | and that person will be banned on discord |
12:55:08 | Yardanico | what would be the preferred name for ban command for discord users? |
12:55:16 | Yardanico | !bandiscord ? |
12:56:15 | Zevv | disruptek: https://github.com/dspinellis/git-issue |
12:56:30 | Yardanico | hmm, !bandisc sounds nice lol |
13:06:45 | * | nsf joined #nim |
13:13:59 | Yardanico | if someone wants to test ircord, it's currently bridging #nim-offtopic on IRC and #offtopic on Nim discord server |
13:18:58 | FromDiscord_ | <yewpad> Can somebody elaborate on why Nim's got this awkward dark-ish green 'language color' on GitHub? |
13:19:17 | * | uu91 quit (Ping timeout: 268 seconds) |
13:26:16 | * | endragor quit (Remote host closed the connection) |
13:26:59 | * | nsf quit (Quit: WeeChat 2.7) |
13:28:29 | FromDiscord_ | <Rika> Because github is weird |
13:29:04 | Yardanico | all colours are predefined |
13:29:11 | Yardanico | https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L3411 nim colour |
13:29:29 | Yardanico | #37775b |
13:32:22 | FromGitter | <zacharycarter> mratsim: is there any documentation for weave regarding parallel tasks and the gc? |
13:35:41 | FromGitter | <zacharycarter> I'm getting an error intermittently - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e2af2adf85dba0aab08832b] |
13:36:06 | * | FromGitter quit (Remote host closed the connection) |
13:36:07 | * | oprypin quit (Quit: Bye) |
13:36:29 | * | oprypin joined #nim |
13:39:53 | * | Kaivo joined #nim |
13:48:29 | * | marmotini_ joined #nim |
13:51:03 | * | marmotini_ quit (Remote host closed the connection) |
13:54:17 | * | marmotini_ joined #nim |
13:59:37 | * | r4vi quit () |
13:59:54 | * | r4vi joined #nim |
14:00:20 | Yardanico | no FromGitter? |
14:02:58 | PMunch | Yardanico seems to have died.. |
14:03:05 | Yardanico | yeah |
14:05:24 | * | zyklon quit (Ping timeout: 248 seconds) |
14:11:07 | * | zyklon joined #nim |
14:13:44 | * | FromGitter joined #nim |
14:23:46 | * | krux02 joined #nim |
14:24:27 | * | marmotini_ quit (Remote host closed the connection) |
14:26:29 | Zevv | Is there a good reason why `string` is not simply the same as `seq[char]`? |
14:26:56 | FromDiscord_ | <Clyybber> Not really |
14:27:06 | FromDiscord_ | <Clyybber> Zevv: Btw, that too many =destroy issue |
14:27:10 | FromDiscord_ | <Clyybber> Its kinda expected |
14:27:35 | FromDiscord_ | <Clyybber> You are supposed to do if f != zeroedOut: ... in the destructor |
14:28:29 | * | marmotini_ joined #nim |
14:32:55 | * | marmotini_ quit (Remote host closed the connection) |
14:33:26 | * | marmotini_ joined #nim |
14:34:41 | FromDiscord_ | <Clyybber> But I guess the dfa could be a bit smarter |
14:35:07 | FromDiscord_ | <Clyybber> But its getting into the domain of z3 here |
14:35:53 | Zevv | Is the zeroedOut() not something the codegen should do for me? |
14:36:12 | FromDiscord_ | <Clyybber> the if case? |
14:36:13 | FromDiscord_ | <Clyybber> no |
14:36:19 | FromDiscord_ | <Clyybber> It must be in the destructor |
14:36:46 | FromGitter | <zacharycarter> @Lecale - not sure if this works with directories, but.... - https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/os.nim#L1123 |
14:36:48 | Zevv | yeah but it could (Should?) only call the distructor if zeroedout |
14:36:48 | FromDiscord_ | <Clyybber> As of now it also must be in the =sink and in `=` |
14:37:02 | FromDiscord_ | <Clyybber> Zevv: With the current design no |
14:37:14 | FromDiscord_ | <Clyybber> see destructors.rst |
14:37:17 | Zevv | ok, that makes sense - with the current design |
14:37:30 | FromDiscord_ | <Clyybber> Reminds me |
14:37:35 | * | marmotini_ quit (Remote host closed the connection) |
14:37:42 | * | marmotini_ joined #nim |
14:37:50 | Zevv | Did you also see the other issue, about zeroing out const data? |
14:38:03 | FromDiscord_ | <Clyybber> I glanced over it while half asleep |
14:38:13 | Zevv | I typed it while half asleep |
14:38:30 | FromDiscord_ | <Clyybber> :p |
14:38:53 | Araq | I fixed it half asleep |
14:38:58 | Araq | but only in my head :P |
14:39:03 | FromDiscord_ | <Clyybber> hehe |
14:39:20 | Zevv | I fixed it. Just take the 'NIM_CONST' out of the codegen :) |
14:42:00 | * | floppydh quit (Quit: WeeChat 2.7) |
14:42:20 | FromDiscord_ | <Clyybber> heh |
14:42:30 | FromDiscord_ | <Clyybber> Zevv; Does it also occur with seqs? |
14:42:41 | Zevv | it *is* the seq that does it |
14:43:44 | Zevv | btw, the "too many seqs" issue can be closed then? |
14:43:55 | Zevv | (imaging *talking* about these things instead of writing) |
14:44:58 | FromDiscord_ | <Clyybber> Zevv: Yeah |
14:45:52 | FromDiscord_ | <Clyybber> To "fix" it we would have to make the dfa aware that in `a.setLen a.len + n` all succeeding writes to a[oldLen..oldLen + n] are firstWrites |
14:46:51 | Araq | emplace_back! |
14:47:25 | Zevv | brrr |
14:48:54 | Zevv | araq, can you tell me as well: is there a good reason why `string` is not `seq[char]`? |
14:49:26 | Araq | cstring(s) is O(1) |
14:50:00 | Araq | there are plenty of good reasons. strings are usually not used like 'seq[char]' |
14:50:23 | * | jholland__ joined #nim |
14:50:50 | Araq | they are in UTF-8. and maybe we want to support non-copy slicing for them via some runtime switch |
14:51:05 | Araq | maybe we want to make them COW |
14:51:07 | Zevv | but nim guarentees they should be intercastable, right? |
14:51:27 | Araq | currently Nim does that but I don't see how we can keep this promise for forever |
14:51:35 | Zevv | ah right. that makes sense. |
14:51:53 | FromGitter | <alehander92> but is this true for the js backend |
14:52:17 | FromGitter | <alehander92> hm yeah it is |
14:52:23 | FromGitter | <alehander92> i forgot its an array there as well |
14:52:51 | Araq | strings are hard |
14:54:11 | Araq | btw I noticed --threads:on --gc:arc is 3x slower :-) |
14:54:12 | FromGitter | <alehander92> yeaa |
14:54:44 | Zevv | also with useMalloc? |
14:55:01 | Araq | a single mutex around alloc is bad, let's use malloc. same thing, 3 times slower. |
14:55:22 | Zevv | :) |
14:55:23 | Araq | but to be fair I haven't tested mimalloc yet |
14:55:26 | * | PMunch quit (Quit: Leaving) |
14:56:26 | Araq | for other tests mimalloc was slower though, a shared heap is an expensive abstraction |
14:59:00 | Araq | maybe we need a SmallSeq, SmallTable, SmallX... |
15:01:30 | FromGitter | <alehander92> the opposite of SharedSeq ? |
15:02:59 | FromGitter | <Varriount> Araq: What about a cache of free blocks, local to each thread? |
15:04:09 | * | tane joined #nim |
15:04:15 | FromGitter | <Varriount> Or this: https://github.com/Begun/lockfree-malloc |
15:08:18 | * | abm quit (Quit: Leaving) |
15:09:14 | * | marmotini_ quit (Remote host closed the connection) |
15:09:40 | * | marmotini_ joined #nim |
15:13:41 | FromDiscord_ | <Clyybber> Araq: Do you have an idea on how to do emplace_back? |
15:14:11 | * | salewski joined #nim |
15:14:23 | * | marmotini_ quit (Ping timeout: 260 seconds) |
15:16:49 | salewski | Araq, maybe you should edit the ARC forum post because ARC is much better now. Async and finalizers seems to mostly work now. |
15:17:06 | salewski | Because some people may read only the topmost post. |
15:18:23 | salewski | And maybe fix -gc:arc as it is --gc:arc, and tell peole that deepcopy does currently not work with arc. |
15:18:41 | salewski | Bye. |
15:18:44 | * | ng0_ joined #nim |
15:20:10 | * | salewski quit (Quit: WeeChat 2.6) |
15:20:56 | FromGitter | <iffy> I can't get password reset to work on Forum. After resetting my password it says "Invalid username or password" |
15:21:31 | FromGitter | <alehander92> oh sorry this seems to happen often |
15:22:13 | * | ng0 quit (Ping timeout: 272 seconds) |
15:22:22 | FromGitter | <iffy> I'm using Firefox if that makes a difference |
15:27:19 | leorize | ~forum |
15:27:20 | disbot | forum: 11Nim has a forum at https://forum.nim-lang.org/ -- ask @dom96 for help with any account issues. |
15:27:51 | Araq | Clyybber: well we know it's system.add for seqs, we can cheat |
15:29:40 | Araq | Varriount: thread local caching is a standard technique |
15:29:55 | Araq | probably my malloc is simply old crap. |
15:37:25 | * | marmotini_ joined #nim |
15:40:30 | Araq | ping disruptek |
15:40:53 | Zevv | down and out drunk again probably |
15:41:04 | * | JustASlacker quit (Quit: Leaving) |
15:42:07 | * | Pqzcih5 joined #nim |
15:42:16 | Zevv | @clyybber: will you be visiting fosdem by chance? |
15:42:30 | disruptek | wut |
15:42:41 | Araq | does nimph work with --gc:arc now? |
15:42:49 | * | marmotini_ quit (Ping timeout: 265 seconds) |
15:42:50 | disruptek | no because it relies upon nre. |
15:43:01 | * | nsf joined #nim |
15:43:48 | Araq | nre could work... |
15:43:58 | disruptek | !search backend segfaults |
15:43:59 | disbot | https://github.com/disruptek/nimph/issues/116 -- 3c++ backend segfaults 7& 13 more... |
15:44:17 | disruptek | also, it hasn't built in c++ in a very long time. |
15:44:25 | disruptek | i dunno why someone cares, but... |
15:44:33 | FromDiscord_ | <Clyybber> Zevv: Nope, sadly not 😦 |
15:48:31 | * | icebattle joined #nim |
15:50:27 | Zevv | bumr! |
15:51:55 | disruptek | sucks. |
15:53:03 | * | lritter joined #nim |
15:53:15 | Zevv | dan toch maar RDR2 he |
15:53:17 | Zevv | coop missies |
15:53:49 | disruptek | ~paste is a frowned-upon behavior in chat; please use a service such as http://ix.io/ or https://gist.github.com/ and supply us a URL instead. |
15:53:49 | disbot | paste: 11a frowned-upon behavior in chat; please use a service such as http://ix.io/ or https://gist.github.com/ and supply us a URL instead. |
15:54:39 | Araq | more results: with 'owned' and --newruntime the timings are identical |
15:55:08 | Araq | there is no reason not to reference count if you never really count |
15:55:36 | Zevv | EWRONGWIN, sorry |
15:55:46 | disruptek | Zevv: i don't wanna store issues in git; GitHub is too nice a tracker. |
15:56:18 | * | ptdel joined #nim |
15:57:34 | * | krux02 quit (Remote host closed the connection) |
15:58:00 | disruptek | barrier of entry waaay to high. |
15:58:10 | * | ng0_ is now known as ng0 |
16:07:38 | narimiran | disruptek: about pasting services. why not mention the most useful one - nim playground? |
16:07:45 | Yardanico | it uses ix.io though |
16:07:53 | Yardanico | but yeah |
16:08:16 | disruptek | oh i forgot the bot doesn't send you guys the urls. just me. |
16:08:39 | disruptek | ~paste is a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. |
16:08:39 | disbot | paste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. |
16:15:08 | * | zedeus_ joined #nim |
16:15:39 | disruptek | now when someone pastes, we'll have three people posting ~paste and three long messages from the bot explaining how not to spam. |
16:16:03 | * | zedeus quit (Ping timeout: 240 seconds) |
16:16:11 | FromDiscord_ | <Clyybber> amazing |
16:16:58 | * | kadin joined #nim |
16:17:14 | FromGitter | <Varriount> The future is now! |
16:18:52 | * | setenforce quit (Ping timeout: 260 seconds) |
16:19:21 | * | cron joined #nim |
16:19:43 | * | ng0 quit (Ping timeout: 260 seconds) |
16:20:00 | * | ng0 joined #nim |
16:20:00 | * | ng0 quit (Changing host) |
16:20:00 | * | ng0 joined #nim |
16:22:20 | * | salewski joined #nim |
16:23:56 | salewski | Araq, nice edit, but one big advantage of ARC is that it is deterministic, and that is not really mentioned in that post! |
16:24:29 | salewski | Well, maybe hidden in the other points. |
16:30:32 | Araq | meh ok, maybe. |
16:31:33 | Araq | for me the most important aspect is that it composes so much better |
16:31:33 | * | sealmove quit (Quit: WeeChat 2.7) |
16:31:34 | salewski | deterministic is a great Schlagwort and a real benefit. Bye. |
16:31:58 | Araq | yeah, it's faster and yeah it uses less memory. |
16:32:28 | Araq | but it also works with customized memory management. |
16:33:01 | Araq | and can close my files. |
16:34:14 | salewski | https://forum.nim-lang.org/t/5825#36241 is a disadvantage still, but maybe someone can fix that later. |
16:34:16 | leorize | Araq: can you take a look at #13201? |
16:34:18 | disbot | https://github.com/nim-lang/Nim/pull/13201 -- 3Make file descriptors from stdlib non-inheritable by default |
16:34:51 | narimiran | salewski: what's going on? you forget to write 'bye'! |
16:35:47 | salewski | I am not in such a hurry currently. But I can not sit the whole day on IRC as some of your guys. |
16:36:00 | * | narimiran thumbs up |
16:36:22 | salewski | Bye. |
16:36:25 | * | salewski quit (Quit: WeeChat 2.6) |
16:36:41 | zedeus_ | so polite |
16:42:38 | * | abm joined #nim |
16:43:59 | disruptek | nothing good ever came from inheritance in nim. |
16:48:11 | * | UNIcodeX joined #nim |
16:50:45 | FromDiscord_ | <Clyybber> Isn't this about inheriting from parent processes? |
16:51:10 | disruptek | i'm referring to salewski's problem. |
16:52:03 | FromDiscord_ | <Clyybber> ah, I see |
16:53:32 | * | marmotini_ joined #nim |
16:56:13 | * | zedeus_ is now known as zedeus |
16:58:22 | * | cron quit (Quit: Leaving.) |
17:02:10 | * | marmotini_ quit (Remote host closed the connection) |
17:06:38 | * | sealmove joined #nim |
17:06:45 | disruptek | THE MIND IS GOD |
17:08:11 | * | marmotini_ joined #nim |
17:10:32 | sealmove | PMunch: is https://github.com/PMunch/jsonschema in appropriate state for use? |
17:14:06 | FromDiscord_ | <Rika> > nothing good ever came from inheritance in nim. |
17:14:06 | FromDiscord_ | <Rika> pretty sure it goes "nothing good ever came from inheritance" |
17:15:24 | disruptek | tell me about it. |
17:15:26 | Zevv | oh #13201, sweet. It might lead to the occasional suprise of someone expecting his fds to survive a fork, but I bet it will prevent tons of issues in the future. |
17:15:27 | disbot | https://github.com/nim-lang/Nim/pull/13201 -- 3Make file descriptors from stdlib non-inheritable by default |
17:16:41 | * | marmotini_ quit (Remote host closed the connection) |
17:17:14 | * | marmotini_ joined #nim |
17:20:35 | * | vivus joined #nim |
17:20:46 | * | Vladar quit (Quit: Leaving) |
17:22:08 | * | marmotini_ quit (Ping timeout: 260 seconds) |
17:27:40 | disruptek | shashlick: your read-options-from-compiler is gonna encourage people building more whens into their code, right? doing things like, "if package foobar is in the path, import it" |
17:27:58 | disruptek | that's gonna break some assumptions i want to make. |
17:28:33 | disruptek | ie. currently there's no way to conditionally import. |
17:30:18 | leorize | when: import does work? |
17:30:25 | disruptek | s/conditionally/opportunistically/ |
17:31:58 | lqdev[m] | leorize: technically it should, when does not introduce a new scope |
17:32:03 | * | muffindrake quit (Quit: muffindrake) |
17:32:15 | * | muffindrake joined #nim |
17:32:19 | disruptek | it should, it does. |
17:32:24 | leorize | it does |
17:32:29 | leorize | used everywhere in the stdlib :P |
17:32:37 | disruptek | i'm talking about determining whether a package is available for import. |
17:32:46 | disruptek | and then importing it. |
17:32:52 | leorize | it's doable |
17:32:58 | leorize | nimble list -i is parsable |
17:33:08 | disruptek | so is `nimble path`. |
17:33:14 | disruptek | but i think this is a dangerous road. |
17:34:12 | disruptek | this is the one thing that has always been a problem with every significant project of mine, due to nimterop. |
17:34:58 | disruptek | not that it's shashlick's fault, of course. but we want less of this, not more. |
17:35:00 | shashlick | that PR, which is dormant since I've not had the time, was to acces command line options |
17:35:10 | shashlick | is that what you are talking about |
17:35:19 | disruptek | i think so. you cannot use it to get paths? |
17:35:54 | shashlick | yes i believe so |
17:36:40 | sealmove | is it possible to get parent node in nim json? |
17:36:40 | shashlick | if there was a way to import if installed, i think it would solve all this |
17:36:50 | sealmove | or have to do your own book keeping? |
17:36:54 | shashlick | when compiles doesn't work with imports |
17:38:19 | disruptek | right, i'm saying that this is something of a virtue right now. |
17:38:23 | disruptek | it's a tight spec. |
17:38:36 | disruptek | we might be making a mistake to weaken the guarantee. |
17:43:11 | shashlick | we are allowed to check so many other things, why not this |
17:44:31 | * | Ven`` joined #nim |
17:44:34 | disruptek | yeah, i could be overthinking it. |
17:44:35 | * | vivus quit (Quit: Leaving) |
17:44:57 | shashlick | but ya, features can always be used in unintended ways |
17:45:07 | shashlick | nimterop lives in that space |
17:45:07 | disruptek | but consider how complex that makes analyzing behavior outside the compiler. |
17:45:46 | disruptek | i think we should keep the interface between compile-time and the environment as carefully defined as possible. |
17:46:03 | disruptek | it seems to be something we really don't understand yet. |
17:46:47 | disruptek | don't think about the use of these tools today. think about designing a language for 10 years down the road. |
17:47:13 | disruptek | we hope to have decade-old code to work on in 10 years. let's choose what that code looks like. |
17:48:40 | shashlick | i agree 100% but at the same time the pleasure of working in Nim for macros and compile time is a big plus |
17:48:53 | shashlick | instead of some random second cousin language like the preprocessor |
17:49:13 | shashlick | or having elaborate stuff like make, cmake, etc |
17:49:39 | disruptek | do you want to have to fight a 10-year younger version of yourself, with the vm as the arena? i'm good, but i'm getting old. i'm a shadow of myself 10 years ago. |
17:50:29 | shashlick | pretty much everyone here is half my age |
17:51:01 | disruptek | thing is, about half of us say that. |
17:51:34 | FromDiscord_ | <Rika> til slashlick is like 50 or something |
17:51:40 | FromDiscord_ | <Rika> maybe 60 even |
17:52:48 | disruptek | i wanna say gordon and sheerlu_k are in their 50s. |
17:52:50 | shashlick | maybe i'm exaggerating but chalk it up to remembering less math than my 4th grader |
17:53:07 | disruptek | okay, shashlick has a 4th grader... how old are those? |
17:53:34 | Araq | conditional imports are from hell IMO. |
17:53:38 | disruptek | i feel like one of you who wasn't raised by wolves would know. |
17:53:40 | shashlick | okay now someone tell me how to find out arch of processor or this choosenim 64-bit installs on windows is not going to happen |
17:53:53 | shashlick | my older one is in 7th grade |
17:54:17 | disruptek | i was held back. |
17:54:19 | disruptek | all my life. |
17:54:39 | disruptek | i'm fine with choosenim not supporting 64bit windows. |
17:54:40 | Araq | shashlick, there is an environment variable |
17:55:16 | shashlick | nifty |
17:55:28 | shashlick | wondering if it was there on 32-bit windows as well |
17:55:38 | disruptek | shit, even i knew that shashlick. |
17:55:44 | disruptek | what are you, like, 100 years old? |
17:56:05 | disruptek | i feel like 7th graders are like 13 or 14, right? |
17:56:24 | FromDiscord_ | <Rika> 7ths are 12 or 13 |
17:56:46 | disruptek | i guess i like 'em a little older. |
17:57:00 | FromDiscord_ | <Rika> out of context screenshot time |
17:57:26 | shashlick | yep, cannot wave the boomer flag or anything |
17:58:24 | disruptek | you know, gordon is older than that. i think he's early sixties. |
17:58:31 | shashlick | last of the gen x |
17:59:03 | disruptek | genx ends at, what, '79? |
17:59:04 | Araq | if PROCESSOR_ARCHITECTURE == AMD64 ( |
17:59:04 | Araq | SET ARCH=64 |
17:59:04 | Araq | ) |
17:59:19 | Araq | echo %PROCESSOR_ARCHITECTURE% |
17:59:50 | disruptek | i think that headache bears medical attention, araq. |
18:00:14 | disruptek | you just don't seem like yourself. |
18:03:57 | * | abm quit (Ping timeout: 265 seconds) |
18:04:11 | shashlick | maybe i should fix recent choosenim issues than adding new features |
18:05:23 | Araq | shashlick, lack of 64bit support is the biggest bug |
18:07:15 | shashlick | deal |
18:07:19 | Araq | disruptek, thanks for your concern, I'll be fine again soon |
18:07:47 | shashlick | https://blog.differentpla.net/blog/2013/03/10/processor-architew6432/ |
18:09:01 | Araq | shashlick, I copied it from our build.bat |
18:09:25 | Araq | and are unaware of reported bugs, so it's fine |
18:11:01 | * | cron1 joined #nim |
18:11:29 | shashlick | ya since this will be compiled into choosenim which could potentially have a 32-bit build running on 64-bit, we will need to be more careful |
18:13:09 | * | sagax quit (Remote host closed the connection) |
18:14:25 | shashlick | heh, uname -m on my windows box says i686 when it is x64 |
18:28:37 | * | sealmove quit (Quit: WeeChat 2.7) |
18:31:35 | * | chemist69 joined #nim |
18:37:31 | * | nsf quit (Quit: WeeChat 2.7) |
18:41:25 | FromDiscord_ | <Clyybber> the hell |
18:41:35 | FromDiscord_ | <Clyybber> shashlick: Which distro? |
18:51:03 | shashlick | On windows with git bash |
18:52:34 | * | UNIcodeX quit (Quit: Leaving) |
19:05:59 | FromGitter | <Varriount> Araq: "Composes"? |
19:08:06 | Araq | Zevv, can we use this: http://man7.org/linux/man-pages/man3/mallinfo.3.html |
19:08:25 | Araq | it contains int usmblks; /* Maximum total allocated space (bytes) */ |
19:09:16 | Araq | could be portable, at least the name predates the invention of the letter 'o'. |
19:09:48 | disruptek | neat. |
19:11:36 | Araq | Varriount: compose as in "I can use my custom SmallSeq with the standard seq inside a 3rd party lockfree hash table and it actually works" |
19:13:15 | * | rockcavera joined #nim |
19:20:42 | leorize | Araq: that function is not portable... |
19:25:29 | FromDiscord_ | <treeform> Araq, is some thing wrong with this code? https://github.com/nim-lang/Nim/blob/devel/build_all.bat#L8 |
19:25:52 | Araq | no, I proposed it to shashlick for choosenim |
19:26:03 | FromDiscord_ | <treeform> oh got it! |
19:41:24 | FromGitter | <Vindaar> @narimiran I think I managed to implement a dummy backend, which doesn't draw. I'll let you know once this is merged into ggplotnim's master |
19:41:32 | * | opal is now known as wowaname |
19:42:03 | * | nsf joined #nim |
19:43:04 | * | wowaname is now known as opal |
20:01:36 | * | Senketsu joined #nim |
20:15:10 | FromGitter | <Vindaar> @narimiran ok, done. Let's hope it works. You have to run `nimble testCI` now. |
20:16:52 | * | cron1 quit (Quit: Leaving.) |
20:18:18 | Zevv | Araq: Sure we could, but what to do on platforms that don't have it. |
20:18:32 | disruptek | you should just model it. |
20:20:13 | Zevv | this is where the {.weak.} would come in. |
20:20:30 | disruptek | symbols, you mean. |
20:20:43 | Zevv | men |
20:21:02 | Zevv | weak men and boneless chickens |
20:21:02 | FromDiscord_ | <Clyybber> methods are probably faster than storing a closure, right? |
20:21:03 | Araq | yup, we need .weak anyway |
20:21:04 | disruptek | i think we already have {.softhands.} for that. |
20:21:18 | FromDiscord_ | <Clyybber> Do we use vtables for methods currently? |
20:21:33 | Araq | no we use some custom junk |
20:21:45 | Araq | but performance is ok |
20:21:56 | Araq | and faster than closures iirc, ask mratsim |
20:21:58 | disruptek | exceptions excepted. |
20:22:40 | FromDiscord_ | <Clyybber> Araq: How does that custom junk work? |
20:22:52 | FromDiscord_ | <Clyybber> case/switch statement? |
20:24:34 | narimiran | @Vindaar ok, pushed with that change, i'll see tomorrow what CIs are saying this time |
20:24:55 | FromGitter | <deech> When working on the compiler do you folks have a workflow that doesn't involve rebuilding it everything you make a change? |
20:26:37 | disruptek | deech: yeah, i'm building it right now. wrt all tests running in 3 seconds, i should be able to do well over 3000 novel tests/second. across compiler versions. i am figuring maybe 6000-10000 relevant tests including runnableExamples. |
20:26:55 | shashlick | Just `nim c compiler/nim` |
20:27:01 | Araq | deech: koch temp c example.nim |
20:27:15 | FromDiscord_ | <Generic> @Clyybber if it wasn't changed it generates a bunch of if statements |
20:27:19 | Araq | if you don't use 'koch temp', you're doing it wrong and waste time |
20:27:27 | FromDiscord_ | <Clyybber> @Generic Ah, alright thanks |
20:27:37 | FromGitter | <deech> Araq, that builds the compiler from scratch including nim{1,2,3}. |
20:27:37 | shashlick | But koch temp rebuilds every time right |
20:27:46 | FromGitter | <deech> Unless that changed in the past 6 months. |
20:27:57 | Araq | 'koch temp' != 'koch boot' |
20:28:30 | FromDiscord_ | <Clyybber> Araq: WDYT about a more general way of exposing RTTI ? |
20:29:03 | Araq | nothing, we have getType, we can make that easier to use though. |
20:29:14 | FromDiscord_ | <Clyybber> Ah, alright. That probably fits |
20:29:23 | FromGitter | <deech> I thought RTTI was going away. |
20:30:02 | * | leorize quit (Remote host closed the connection) |
20:30:13 | Araq | yup, arc doesn't have it. |
20:30:26 | * | leorize joined #nim |
20:30:29 | shashlick | Question on choosenim x64 - do you all want 32 and 64-bit to coexist |
20:30:40 | FromGitter | <deech> No |
20:30:48 | FromDiscord_ | <Clyybber> How do we do dynamic dispatch on arc again? |
20:30:50 | shashlick | Switch between them? |
20:31:00 | disruptek | let them fight and then we'll vote one off the island. |
20:31:15 | * | narimiran quit (Ping timeout: 240 seconds) |
20:32:01 | * | Senketsu quit (Quit: WeeChat 2.6) |
20:32:17 | Araq | Clyybber: via 'strstr' |
20:32:31 | Araq | I'm not kidding :-) |
20:33:04 | FromDiscord_ | <Clyybber> umm |
20:33:16 | * | Senketsu joined #nim |
20:33:29 | FromDiscord_ | <Clyybber> how does that work? |
20:34:26 | Araq | proc isObj(obj: PNimType, subclass: cstring): bool {.compilerRtl, inl.} = |
20:34:26 | Araq | proc strstr(s, sub: cstring): cstring {.header: "<string.h>", importc.} |
20:34:26 | Araq | result = strstr(obj.name, subclass) != nil |
20:34:56 | Araq | for DLL interop we produce strings identifying an object in its hierarchy |
20:35:06 | FromDiscord_ | <Clyybber> Ah |
20:35:27 | Araq | it sucks but at least it's not pointer chasing |
20:35:32 | FromDiscord_ | <Clyybber> So the runtime subtype is stored in a field of the root object, right? |
20:35:49 | Araq | only if the object is "inheritable", but yes |
20:35:54 | FromGitter | <Vindaar> @narimiran thanks! |
20:36:26 | FromDiscord_ | <Clyybber> Araq: Couldn't we store the runtime subtype as an enum and have an extra function to strinify that enum? |
20:37:25 | FromDiscord_ | <Clyybber> *stringify |
20:39:11 | Araq | we could. see LLVM's codebase |
20:39:17 | Araq | it does the same |
20:39:31 | Araq | and has some nice document about how to construct the enum values |
20:39:57 | FromDiscord_ | <Clyybber> And then we could use switch statements for dynamic dispatch |
20:40:00 | Araq | but it assumes a closed world, no DLLs |
20:40:20 | Zevv | Araq: ok to split mdisp up and move the different implementations into lib/system/mm/* ? |
20:40:27 | Zevv | mmdisp, that is |
20:40:36 | Araq | Zevv: try it and see if I like the result |
20:41:30 | shashlick | Araq - I was thinking today to improve the cross compile situation but was curious on your thoughts |
20:41:39 | shashlick | Context - https://github.com/genotrance/nimarchive/issues/6#issuecomment-558789512 |
20:41:39 | disbot | ➥ Cant crosscompile |
20:41:53 | FromGitter | <Varriount> Zevv: For NPeg, what do the commit instructions do (especially part commit)? |
20:44:10 | shashlick | changing --os to something else should not affect the VM which is still running on the buildOS |
20:44:31 | Zevv | Varriount: it 'fixates' the current branch. |
20:44:48 | Zevv | Basically it says: right, this part of the '|' matches, throw out the other options |
20:46:41 | disruptek | clyybber: if you can use a switch for dispatch, then maybe we can use the extra semantics of switch to do something cool in nim. |
20:46:41 | Zevv | effectively throws away the top item of the backtracking stack |
20:47:05 | Zevv | Araq: https://github.com/nim-lang/Nim/pull/13254 |
20:47:06 | disbot | ➥ Cleaned up mmdisp.nim, moved implementations into lib/system/mm/ |
20:47:17 | * | sagax joined #nim |
20:47:24 | Araq | shashlick: I don't have ideas/thoughts |
20:47:29 | FromDiscord_ | <Clyybber> disruptek: I think something cool == multimethods |
20:47:41 | FromDiscord_ | <Clyybber> just nested switch stmts |
20:48:38 | FromDiscord_ | <Clyybber> disruptek: but tell me what were you thinking of? |
20:49:15 | * | Zevv puts his fingers in his ears and goes "lalalaaah" |
20:49:34 | disruptek | i'm thinking how to resolve the problem Araq raised, first. |
20:49:44 | Zevv | oh, I expected much worse |
20:49:59 | disruptek | you are a dirty old man, zevv. |
20:50:02 | shashlick | Araq: okay thanks |
20:50:16 | disruptek | but i guess it takes one to know one. |
20:50:20 | FromDiscord_ | <Clyybber> disruptek: You mean going over dll boundaries? |
20:50:29 | disruptek | yeah. |
20:51:00 | FromDiscord_ | <Sabena Sema> has staticRead caused any issues in the language? Has it shown itself to be a special case of some other metaprogramming feature? |
20:51:05 | * | lritter quit (Read error: Connection reset by peer) |
20:51:14 | FromDiscord_ | <Clyybber> no |
20:51:31 | disruptek | it has shown itself to be a hand-grenade. |
20:51:46 | FromDiscord_ | <Clyybber> disruptek: disruptek: Since we must compress the string down somehow, I don't know how we could guarantee no collisions |
20:51:56 | FromDiscord_ | <Clyybber> (If we were to use a hash thingy |
20:53:15 | FromGitter | <Varriount> Clyybber: Do you know all possible keys ahead of time? |
20:53:23 | FromDiscord_ | <Clyybber> Araq: Is the RTTI string only stored in the RootObj or in every object that is inherited from? |
20:53:33 | disruptek | we don't know all possible keys. |
20:53:46 | FromDiscord_ | <Clyybber> I don't know if we know :p |
20:53:53 | disruptek | but, we could set a limit. then we would know. |
20:54:02 | disruptek | but, i gotta tell ya. it's a big number. |
20:54:10 | * | Senketsu quit (Quit: WeeChat 2.7) |
20:54:47 | Zevv | what are you cooking up today, disruptek? |
20:54:52 | disruptek | we can hash the compilation result so every result has a uuid, and then 16k types. |
20:54:52 | FromGitter | <Varriount> What about calling through a pointer? |
20:55:04 | FromGitter | <Varriount> go the vtable route |
20:55:47 | FromDiscord_ | <Clyybber> There shouldn't be much of a difference between vtable and switch dispatch no? |
20:56:08 | FromDiscord_ | <Clyybber> Oh, nevermind |
20:56:47 | FromDiscord_ | <Clyybber> Varriount: With the switch approach we could put the switch in the generated method itself though |
20:57:02 | FromDiscord_ | <Clyybber> And the switch approach also allows multimethods |
20:57:12 | FromGitter | <Varriount> Problem with that is that you need to know all the cases beforehand |
20:57:22 | disruptek | and it's way friendlier to the compiler, not to mention faster. |
20:57:54 | FromDiscord_ | <Clyybber> Varriount: Don't you need that with vtable too? |
20:58:28 | FromGitter | <Varriount> a vtable is usually passed in with the object |
20:58:33 | * | lritter joined #nim |
20:58:38 | FromGitter | <Varriount> or is part of the object |
20:58:43 | FromDiscord_ | <Clyybber> Ah, I see |
20:59:08 | FromGitter | <Varriount> So any object (whether native to the program or from a dll) can have the vtable |
21:00:08 | disruptek | it would let us do dynamic mixins, i guess. |
21:02:21 | disruptek | maybe that solves the arc problem. the proc pointer lets destroy skip itself, or causes memory to get zero'd, etc. |
21:03:04 | FromDiscord_ | <Clyybber> I still prefer the switch thing, just for the multimethods :p |
21:03:40 | FromDiscord_ | <Clyybber> Imagine writing `dynamic` in front of an argument type and it becomes dynamic dispathc |
21:03:45 | FromDiscord_ | <Clyybber> that would be kinda cool |
21:03:48 | disruptek | i think they can work together. |
21:04:06 | FromDiscord_ | <Clyybber> But vtable is more complicated and bigger |
21:04:48 | FromGitter | <Varriount> Or you could do runtime code generation. :P |
21:08:05 | FromDiscord_ | <Clyybber> heh |
21:08:22 | FromDiscord_ | <Clyybber> disruptek: dynamic mixins as in attaching methods to a single object instance only? |
21:09:16 | disruptek | that's way harder. |
21:09:48 | FromDiscord_ | <Clyybber> Araq: Do you have a link to the LLVM doc? I can't find it |
21:10:02 | FromDiscord_ | <Clyybber> disruptek: And is kinda unneccessary |
21:10:23 | FromDiscord_ | <Clyybber> So in the end, if we can get the switch approach to work its probably the best |
21:10:44 | disruptek | are we able to store a pointer with arc? |
21:10:52 | disruptek | in the header, i mean. |
21:10:57 | FromDiscord_ | <Clyybber> Sure |
21:11:13 | disruptek | why not store the alloc/dealloc pointer in there? |
21:11:16 | FromDiscord_ | <Clyybber> We can store whatever your heart desires |
21:11:29 | FromDiscord_ | <Clyybber> disruptek: You mean the allocator? |
21:11:32 | FromDiscord_ | <Clyybber> We did that |
21:11:37 | FromDiscord_ | <Clyybber> but zevv made it go away |
21:11:41 | FromDiscord_ | <Clyybber> (for good!) |
21:11:55 | Zevv | tadaaa! |
21:11:57 | Araq | https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html |
21:12:05 | FromDiscord_ | <Clyybber> Araq: Thanks! |
21:12:31 | disruptek | no, a pointer which just runs to prep the memory between stages. |
21:12:48 | disruptek | but we repoint it whenever we run it. |
21:12:54 | disruptek | state machine. |
21:13:35 | FromDiscord_ | <Clyybber> Araq: Is the RTTI string stored in the RootObj or in the corresponding base object? |
21:15:40 | Araq | the object has a PNimType field at offset 0 |
21:15:51 | Araq | the string is inside the PNimType |
21:16:23 | FromDiscord_ | <Clyybber> Ah, I see. |
21:17:00 | FromDiscord_ | <Clyybber> Araq: But the PNimType field belongs to the base object right? |
21:17:18 | FromDiscord_ | <Clyybber> Argh, dumb question ignore please :d |
21:17:26 | FromDiscord_ | <Clyybber> I got things mixed up |
21:26:43 | Araq | good night |
21:27:35 | * | tiorock joined #nim |
21:27:35 | * | tiorock quit (Changing host) |
21:27:35 | * | tiorock joined #nim |
21:27:35 | * | rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services))) |
21:27:35 | * | tiorock is now known as rockcavera |
21:30:08 | FromDiscord_ | <Recruit_main_70007> gn |
21:32:54 | FromDiscord_ | <Clyybber> good night |
21:37:00 | FromDiscord_ | <Clyybber> Araq: If you are still here, are methods supposed to work on ptr objects? |
21:40:33 | * | Trustable joined #nim |
21:41:11 | * | filcuc joined #nim |
21:49:17 | FromDiscord_ | <Clyybber> Aww : ( doesn't work |
22:08:23 | * | solitudesf quit (Ping timeout: 268 seconds) |
22:16:22 | * | Trustable quit (Remote host closed the connection) |
22:22:17 | FromGitter | <Varriount> I never quite understood how RTTI was embedded in current structs, yet an address could be taken of an object and passed to C |
22:36:25 | Zevv | I have no clue, but could it not simply sit in front of the object? |
22:39:35 | disruptek | does it have to be the same object? |
22:39:44 | disruptek | s/object/address/ |
22:44:33 | * | Ven`` quit (Read error: Connection reset by peer) |
22:46:12 | * | chemist69 quit (Ping timeout: 260 seconds) |
22:46:36 | * | chemist69 joined #nim |
22:56:59 | * | nsf quit (Quit: WeeChat 2.7) |
23:00:50 | FromDiscord_ | <Recruit_main_70007> whats the theme used in the tiny code examples in the web. |
23:01:55 | disruptek | ennio morricone, the legend of 1900. |
23:10:48 | FromDiscord_ | <Recruit_main_70007> jokes on me, its not in vscode, anyway thank you and goodnight |
23:10:53 | * | filcuc quit (Ping timeout: 272 seconds) |
23:17:27 | * | jholland__ quit (Quit: Connection closed for inactivity) |
23:19:29 | * | ng0 quit (Quit: leaving) |
23:41:42 | * | dadada quit (Ping timeout: 268 seconds) |
23:43:46 | * | thomasross joined #nim |
23:47:33 | * | tane quit (Quit: Leaving) |