00:07:30 | FromDiscord_ | <Tak> Or it it best to use a normal object with a [T] parameter? |
00:08:34 | FromGitter | <alehander92> this sounds like a generic return type |
00:08:38 | FromGitter | <alehander92> somethig like |
00:09:06 | FromGitter | <alehander92> proc get(a: YourType, T: type): T = .. |
00:09:13 | FromGitter | <alehander92> or more exactly |
00:09:56 | FromGitter | <alehander92> maybe this would works |
00:09:58 | FromGitter | <alehander92> work* |
00:10:26 | * | dawkot quit (Ping timeout: 240 seconds) |
00:10:28 | FromGitter | <alehander92> disruptek i tried to think of a example maybe macro pragma would also be possible? not sure |
00:13:50 | FromDiscord_ | <Tak> I will post a playground but my internet just died so bear with |
00:24:30 | FromDiscord_ | <Tak> https://play.nim-lang.org/#ix=286m |
00:24:59 | FromDiscord_ | <Tak> Apologies if bad formatting, I wrote on phone |
00:37:17 | leorize | Araq: can you review this? https://github.com/nim-lang/Nim/pull/13201 |
00:37:17 | disbot | β₯ Make file descriptors from stdlib non-inheritable by default |
00:37:30 | leorize | the test failure is due to timeout and I'm too lazy to restart the ci |
00:37:33 | leorize | but it should pass |
00:40:52 | * | icebattle quit (Ping timeout: 268 seconds) |
01:10:02 | * | lritter quit (Ping timeout: 240 seconds) |
01:11:02 | * | lritter joined #nim |
01:20:40 | * | jholland__ quit (Quit: Connection closed for inactivity) |
01:44:17 | disruptek | alehander92: i tried a macro pragma; it has two problems: 1) a pragma with no arguments doesn't get picked up by `macros.pragma()`. 2) the macro pragma does not compile when applied to a proc because `Error: expression has no type`. |
01:44:35 | madprops | trying to find out how to find connected usb (pen) drives (linux) |
01:44:54 | madprops | the idea is to make a tool to put iso images to usb drives, like rufus/unetbootin |
01:45:12 | madprops | so the first step is detecting available device targets |
01:49:23 | FromDiscord_ | <demotomohiro> !repo libusb |
01:49:24 | disbot | https://github.com/nimious/libusb -- 9libusb: 11Nim bindings for libusb, the cross-platform user library to access USB devices. 15 6β 4π΄ |
01:50:14 | madprops | cool |
01:51:27 | FromDiscord_ | <demotomohiro> I don'T |
01:52:19 | FromDiscord_ | <demotomohiro> i dont know whether it really can do what you want to do |
01:53:26 | disruptek | should work fine. |
01:54:52 | shashlick | So px2 now has the same command line syntax as curl - just pulled in that code |
01:57:12 | shashlick | Also supports curlrc |
02:03:00 | disruptek | kinda cool, if you need such an animal. |
02:04:20 | disruptek | so you can just drop-in px2 instead of curl? i wonder if you could just use it to replace some symbols from libcurl via a PRELOAD; then you could just have curl work, magically. |
02:07:09 | * | arecaceae quit (Remote host closed the connection) |
02:07:28 | * | arecaceae joined #nim |
02:24:07 | FromGitter | <deech> Is https://github.com/alehander92/gara the best pattern matching library currently available? |
02:30:04 | shashlick | Well the idea is to use curl as a proxy server so you might as well have the same configurability |
02:30:43 | * | cgfuh quit (Quit: WeeChat 2.6) |
02:33:51 | shashlick | You use curl as a url downloader, px2 as a proxy to go thru auth proxies that most command line tools cannot talk to |
02:35:46 | shashlick | A lot of my work with px was getting thru different proxy auth mechanisms and implementations and I didn't have access to most scenarios |
02:36:05 | FromGitter | <iffy> leorize: I'll admit that using Dbus is kind of a pain, but trying to get Nim to use libsecret (because it uses glibc, I think) was too hard for me. Someone with glibc experience could probably get it going easily |
02:36:13 | shashlick | With curl, someone has already done the work and is maintaining it |
02:45:08 | * | endragor joined #nim |
03:03:21 | leorize | @iffy: uhmm nim uses the libc, glibc has nothing to do here :P |
03:04:13 | leorize | you probably mean gtk |
03:19:57 | * | lritter quit (Quit: Leaving) |
03:51:00 | * | muffindrake quit (Ping timeout: 248 seconds) |
03:53:04 | * | muffindrake joined #nim |
04:20:01 | * | Guest94638 quit (Ping timeout: 265 seconds) |
04:25:50 | * | dddddd quit (Remote host closed the connection) |
04:36:26 | * | dadada joined #nim |
04:36:48 | * | dadada is now known as Guest67266 |
04:39:07 | * | nsf joined #nim |
04:48:29 | * | ljoonal quit (Read error: Connection reset by peer) |
04:48:44 | * | ljoonal joined #nim |
04:52:54 | * | ljoonal quit (Client Quit) |
04:53:12 | * | ljoonal joined #nim |
05:15:00 | * | marmotini_ joined #nim |
05:23:09 | * | ltriant quit (Quit: leaving) |
05:42:17 | * | gmpreussner quit (Ping timeout: 258 seconds) |
05:43:26 | * | gmpreussner joined #nim |
05:45:55 | * | narimiran joined #nim |
05:51:22 | Tanger | Whoa! linenoise is part of the stdlib? |
06:06:43 | Yardanico | well yeah, it's a very simple binding to the C lib |
06:07:01 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/lib/wrappers/linenoise/linenoise.nim |
06:07:29 | Tanger | Beautiful |
06:07:45 | Tanger | Almost makes it hard to believe the lib is 20k+ lines |
06:07:54 | Yardanico | it's not :) |
06:08:15 | Yardanico | "linenoise.c -- guerrilla line editing library against the idea that a line editing lib needs to be 20,000 lines of C code." |
06:08:25 | Yardanico | it's around 1.1kloc |
06:08:33 | Tanger | Oh! Haha, I can't believe I completely missed that word XD |
06:22:42 | * | marmotini_ quit (Remote host closed the connection) |
06:23:16 | * | marmotini_ joined #nim |
06:27:54 | * | marmotini_ quit (Ping timeout: 265 seconds) |
06:39:26 | * | marmotini_ joined #nim |
06:52:01 | * | solitudesf joined #nim |
06:54:55 | * | Pqzcih5 quit (Remote host closed the connection) |
07:11:27 | * | zyklon quit (Ping timeout: 260 seconds) |
07:23:06 | * | ptdel quit (Remote host closed the connection) |
07:25:05 | * | marmotini_ quit (Remote host closed the connection) |
07:29:54 | * | mjsir911 quit (Ping timeout: 246 seconds) |
07:30:34 | * | mjsir911 joined #nim |
07:58:28 | * | salotz[m] quit (*.net *.split) |
07:58:28 | * | aurielmp quit (*.net *.split) |
07:58:29 | * | nergal[m]1 quit (*.net *.split) |
07:58:30 | * | Demos[m] quit (*.net *.split) |
07:58:38 | * | vqrs quit (*.net *.split) |
07:58:40 | * | hohlerde quit (*.net *.split) |
07:58:40 | * | crem quit (*.net *.split) |
07:58:43 | * | GitterIntegratio quit (*.net *.split) |
07:58:43 | * | tobbez quit (*.net *.split) |
07:58:44 | * | lkw quit (*.net *.split) |
07:58:52 | * | stefantalpalaru quit (*.net *.split) |
07:58:53 | * | JStoker quit (*.net *.split) |
07:58:53 | * | Cadey quit (*.net *.split) |
07:58:59 | * | muffindrake quit (*.net *.split) |
07:59:04 | * | skelett quit (*.net *.split) |
07:59:06 | * | d-nice2[m] quit (*.net *.split) |
07:59:07 | * | oprypin quit (*.net *.split) |
07:59:08 | * | ronny quit (*.net *.split) |
07:59:08 | * | skrylar[m] quit (*.net *.split) |
07:59:10 | * | BitPuffin quit (*.net *.split) |
07:59:18 | * | d10n quit (*.net *.split) |
07:59:19 | * | Ckat quit (*.net *.split) |
07:59:20 | * | d10n_ joined #nim |
07:59:21 | * | PMunch joined #nim |
07:59:21 | * | theelous3 quit (Ping timeout: 265 seconds) |
08:01:08 | * | planetis[m] quit (Ping timeout: 252 seconds) |
08:01:09 | * | silvernode[m] quit (Ping timeout: 245 seconds) |
08:01:09 | * | pigmej quit (Ping timeout: 245 seconds) |
08:01:09 | * | leorize[m] quit (Ping timeout: 245 seconds) |
08:01:14 | * | Jjp137 quit (Ping timeout: 240 seconds) |
08:01:17 | * | watzon[m] quit (Ping timeout: 246 seconds) |
08:01:17 | * | unclechu quit (Ping timeout: 246 seconds) |
08:01:38 | * | Yardanico[m] quit (Ping timeout: 260 seconds) |
08:01:47 | * | gmpreussner quit (Ping timeout: 268 seconds) |
08:01:54 | * | oswin[m] quit (Ping timeout: 250 seconds) |
08:01:59 | * | aeverr[m] quit (Ping timeout: 245 seconds) |
08:01:59 | * | lqdev[m] quit (Ping timeout: 245 seconds) |
08:02:12 | * | vycb[m] quit (Ping timeout: 260 seconds) |
08:02:14 | * | k0mpjut0r quit (Ping timeout: 252 seconds) |
08:03:02 | * | muffindrake joined #nim |
08:03:02 | * | skelett joined #nim |
08:03:02 | * | oprypin joined #nim |
08:03:02 | * | Ckat joined #nim |
08:05:13 | * | gmpreussner joined #nim |
08:05:15 | * | gsingh93 quit (Ping timeout: 240 seconds) |
08:07:50 | * | gsingh93 joined #nim |
08:28:08 | * | kungtotte quit (Ping timeout: 260 seconds) |
08:35:35 | * | floppydh joined #nim |
08:45:51 | * | vqrs joined #nim |
08:45:51 | * | crem joined #nim |
08:45:51 | * | tobbez joined #nim |
08:45:51 | * | lkw joined #nim |
08:45:51 | * | stefantalpalaru joined #nim |
08:45:51 | * | JStoker joined #nim |
08:45:51 | * | Cadey joined #nim |
08:48:39 | * | dom96 quit (Ping timeout: 268 seconds) |
08:51:24 | * | dom96 joined #nim |
08:51:24 | * | dom96 quit (Changing host) |
08:51:24 | * | dom96 joined #nim |
09:05:13 | FromGitter | <zacharycarter> @mratsim - if you're around at some point, I'd like to poke you about some questions I have regarding weave |
09:12:05 | FromGitter | <alehander92> @deech |
09:12:17 | FromGitter | <alehander92> well i tried to take what i can from the todo of patty |
09:12:34 | FromGitter | <alehander92> and try to support it (not all ) |
09:12:59 | FromGitter | <alehander92> but i didnt add the variantp/variant macro ( https://github.com/alehander92/gara/issues/5 ) |
09:12:59 | disbot | β₯ Macro to generate variant objects |
09:13:47 | FromGitter | <alehander92> and the other remaining thing is some kind of compile time exhaustiveness checking which didnt seem very hard for many cases |
09:14:02 | FromGitter | <alehander92> but i just havent done it yet |
09:14:31 | * | krux02 joined #nim |
09:14:46 | FromGitter | <alehander92> https://github.com/krux02/ast-pattern-matching is the best one for macro stuff (NimNode-s) |
09:14:58 | FromGitter | <alehander92> but it is targetted only for that iirc |
09:22:15 | FromGitter | <alehander92> so did you solve it disruptek |
09:24:32 | * | Vladar joined #nim |
09:37:41 | Zevv | Oooh I got a nice idea. Matching Nim AST with npeg. Just because it can. |
09:37:59 | Zevv | That is sooooo meta |
09:40:57 | Yardanico | woah, finally made a somewhat working ADB protocol implementation (client side, only remote TCP connection for now) in Nim |
09:41:21 | Yardanico | ADB is poorly documented really, had to edit a implementation in nodejs to get logs to figure out stuff :D |
09:44:57 | Yardanico | also, is it pretty light, simplest async shell implementation (well, it also uses threadpool to take user input) uses less than 10mb ram |
09:49:36 | Zevv | url?! |
09:50:14 | Yardanico | i didn't upload it to github yet :P |
09:50:28 | Yardanico | I'll in a few hours maybe, need to make it a bit better so you can actually use it from other files |
09:51:50 | Zevv | sweet |
09:55:47 | PMunch | Ugh, I'm starting to miss metaprogramming again :( |
09:56:23 | Zevv | programming BASIC again, eh? |
09:56:33 | Zevv | just stop that dude |
09:56:39 | Zevv | that's baaad mkkaaayy |
09:57:16 | PMunch | Programming C#.. |
09:57:24 | PMunch | And it's not by choice |
09:57:34 | Zevv | it's all by choice |
09:57:43 | Zevv | your life is yours |
09:58:21 | PMunch | Haha, fair point. But doing this one project in C# so I can go back to program things in whatever I like seems worth it |
09:59:09 | Zevv | there you go :) |
09:59:33 | PMunch | I just meant that I didn't choose to do this project in C# |
09:59:41 | Yardanico | this is how the usage of ADB lib looks like: https://play.nim-lang.org/#ix=287r |
09:59:54 | Yardanico | the spawn stdin trick is from https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim#L38 |
10:01:18 | Yardanico | I will probably split it into the low-level implementation (so you can handle ADB messages on your own), and this "high-level" one |
10:01:19 | Zevv | nice. I now pipe stuff but having native would be cool |
10:01:49 | Yardanico | well, I wanted to implement AdbStream based on streams from stdlib, but failed really :( |
10:02:09 | * | Jjp137 joined #nim |
10:02:12 | Yardanico | since I use recv and stuff, and there are effects like TimeEffect which are incompatible with StreamObj proc definitions |
10:07:37 | FromDiscord_ | <mratsim> @zacharycarter ask away |
10:11:51 | FromGitter | <zacharycarter> mratsim: thanks! so I am trying to use the parallel task functionality (which I think is the simplest to wrap my head around) - basically what I'm doing is spawning a bunch of calls to a proc that performs astar and storing the returned FlowVars in a sequence, then I sync them |
10:13:00 | FromGitter | <zacharycarter> the astar method is using generics in its signature for the parameters - it's signature looks like this: `proc path*[G: Graph, N: Node, D: Distance](graph: G, start, goal: N): seq[N]` |
10:13:20 | FromGitter | <zacharycarter> so the first error I run into is: β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e2971c0e177666195b401a2] |
10:13:35 | FromGitter | <zacharycarter> I believe because of the return type of `seq[N]` |
10:14:11 | FromGitter | <zacharycarter> but if I replace `seq[N]` with `seq[tuple[x, y: int]]` I believe I get past that error - the code is at home but I'm pretty sure that's what I did |
10:14:24 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e2972009ad22d5bd5c62318] |
10:15:14 | FromGitter | <zacharycarter> I guess that's because my `Spaceship` object has some member that is a sequence? |
10:15:35 | FromDiscord_ | <mratsim> looking |
10:16:06 | FromGitter | <zacharycarter> thanks |
10:16:30 | FromDiscord_ | <mratsim> for the second error, in the Weave devel, i removed the GC constraint |
10:16:40 | FromGitter | <zacharycarter> oh okay awesome |
10:16:45 | FromDiscord_ | <mratsim> I don't guarantee that it will work, |
10:17:03 | FromGitter | <zacharycarter> well - I will certainly give it a shot and let you know what I find out |
10:17:05 | FromDiscord_ | <mratsim> but supportsCopyMem(T) was lumping together both ref types and types with custom destructors |
10:17:17 | FromDiscord_ | <mratsim> custom destructors types should work |
10:18:35 | FromDiscord_ | <highDevGuy> Is there a way to delay execution of some code without blocking the thread? |
10:18:35 | FromDiscord_ | <highDevGuy> |
10:18:43 | FromDiscord_ | <highDevGuy> I'm using nigui for the GUI and I have to execute a certain proc every second. If I make the call to that proc recursive with a bit of sleep(1000). it freezes everything. I explored threads and spawn but it seems like I have to rewrite almost everything because I have global variables used both by the GUI on the main thread and the background thread for the script. Basically I was wondering if there is a way to delay execution of certai |
10:18:43 | FromDiscord_ | <highDevGuy> |
10:18:46 | FromDiscord_ | <highDevGuy> I hope that make sense and thank you for your time π Also, this is basically my 3rd day with nim so please go easy on me if I'm asking dumb questions π |
10:18:49 | FromDiscord_ | <mratsim> for the first error, it's strange that the line points to your code, I expect it's related to my assertiosn code: https://github.com/mratsim/weave/blob/master/weave/instrumentation/contracts.nim#L36-L39 |
10:19:24 | FromDiscord_ | <mratsim> if you compile with assertions:off and you don't have compile-time error that would be prove it |
10:21:10 | FromGitter | <zacharycarter> okay - I'll try both of those suggestions when I get home tonight - thanks Mamy! |
10:21:15 | Yardanico | @highDevGuy well, you have to use threads anyway, you might have some success with other GCs (you can try boehm which has shared thread heap, or --gc:arc if you're on devel) or rewriting your code a bit and using locks and stuff |
10:21:33 | FromDiscord_ | <mratsim> for storing a seq of FLowvar then syncing them, you can check my parallel nqueens code: https://github.com/mratsim/weave/blob/master/benchmarks/nqueens/weave_nqueens.nim#L119-L132 |
10:21:42 | FromGitter | <zacharycarter> oh awesomeeeee |
10:22:05 | FromDiscord_ | <mratsim> if the array is temporary and does not escape its scope, alloca will bring tremendous performance benefits by avoiding memory fragmentation |
10:22:13 | FromGitter | <zacharycarter> perfect |
10:22:36 | FromDiscord_ | <mratsim> allocation and fragmentation* |
10:22:42 | FromDiscord_ | <mratsim> but allocation is the main issue |
10:23:12 | Yardanico | !repo nim-adb |
10:23:13 | disbot | https://github.com/Yardanico/adbscan -- 9adbscan: 11A @nim-lang utility for scanning IPs for unprotected ADB Android devices connected to the internet 15 5β 0π΄ 7& 1 more... |
10:23:16 | FromGitter | <zacharycarter> I can use ALL the performance benefits :D |
10:23:22 | Yardanico | Zevv: https://github.com/Yardanico/nim-adb |
10:23:27 | Yardanico | it's pretty barebones but it kinda works :P |
10:23:40 | Yardanico | and ofc only TCP (remote connection to ADB) for now, no fancy USB stuff |
10:24:22 | FromDiscord_ | <mratsim> @highDevGuy, you can use asyncDispatch, create an async procedure with an asyncSleep timer |
10:24:44 | Yardanico | @mratsim , well, he uses NiGui, so he'll have to either poll inside the GUI loop for like 50ms, or use threads anyway |
10:24:52 | FromDiscord_ | <mratsim> you await in that asyncProc that the sleep is elapsed and then trigger whetever you need to do |
10:25:05 | FromDiscord_ | <mratsim> ah, well never used NiGui :p |
10:25:20 | Zevv | Yardanico: thanks, will look into that! |
10:30:49 | FromDiscord_ | <highDevGuy> thank you... going to try asyncDispatch if I figure it out as it seems to be something that would require a lot of code rewriting π |
10:31:02 | FromDiscord_ | <highDevGuy> thank you... going to try asyncDispatch if I figure it out as it seems to be something that wouldn't require a lot of code rewriting π |
10:31:09 | Yardanico | well, asyncdispatch wouldn't require you to rewrite a lot of code actually |
10:31:27 | Yardanico | you can define some async proc to run something over a timer, and poll asyncdispatch global dispatcher in your GUI loop |
10:31:35 | Yardanico | for like 5-10ms each time your GUI updates |
10:32:23 | Yardanico | @highDevGuy, what about https://github.com/trustable-code/NiGui/blob/master/examples/example_08_timers.nim ? |
10:32:29 | Yardanico | it seems to have timers just like you want |
10:33:47 | FromDiscord_ | <highDevGuy> omg, how did I miss that |
10:33:51 | FromDiscord_ | <highDevGuy> thanks β€οΈ |
10:39:29 | FromDiscord_ | <highDevGuy> works perfectly. Thank you guys |
10:41:36 | * | Hideki_ joined #nim |
10:46:26 | * | Hideki_ quit (Remote host closed the connection) |
10:53:41 | * | Hideki_ joined #nim |
10:55:35 | * | ng0 joined #nim |
10:57:42 | * | abm joined #nim |
10:57:52 | * | Hideki_ quit (Remote host closed the connection) |
11:05:36 | FromGitter | <alehander92> zevv do it! |
11:05:50 | FromGitter | <alehander92> i still plan to use npeg |
11:05:57 | FromGitter | <alehander92> one day in this bigger toolkit! |
11:17:30 | * | dawkot joined #nim |
11:24:56 | * | dddddd joined #nim |
11:26:14 | * | cgfuh joined #nim |
11:28:24 | FromDiscord_ | <Rika> just noticed std/asyncstreams, shame that it's still a tiny module |
11:39:57 | * | nergal[m] joined #nim |
11:48:49 | * | Guest67266 is now known as dadada |
11:49:42 | dadada | https://github.com/nim-lang/Nim/blob/devel/compiler/semexprs.nim#L2363 |
11:49:53 | dadada | pair.add(n[j]) |
11:49:57 | dadada | pair.add(x[1]) |
11:51:23 | dadada | would be great if stuff like that was chainable always |
11:51:37 | dadada | like this: pair.add(n[j]).add(x[1]) |
11:51:59 | Yardanico | dadada: https://github.com/nim-lang/Nim/pull/13092 |
11:52:00 | disbot | β₯ added operateOn to sugar.nim to give Nim the chaining mechanism it deβ¦ |
11:53:09 | Araq | this is old code, result.add newTree(nkTupleConstr, n[j], x[1]) |
11:53:27 | Araq | would be better |
11:59:46 | dadada | Araq: is "on" reserved for something else? if not, why not shorten operateOn to just "on"... that feature is seriously useful, and since almost anything inside a program is a operation one way or the other, "operate" seems does help little to understand the code |
12:01:10 | Araq | chaining itself isn't all that common in Nim, the "builder pattern" is a workardound for missing named arguments in the core language, but Nim has named args |
12:03:55 | Araq | but more importantly, I doubt I got it right |
12:04:02 | Araq | instead of |
12:04:15 | Araq | on x: add("a"); add("b") |
12:04:18 | dadada | I'm thankful you're working on this feature |
12:04:24 | Araq | people seem to want |
12:04:39 | Araq | x.on.add("a").add("b") |
12:04:56 | dadada | I have to disagree with those on the github issue that say chainOn would be nice ... it's too long as well |
12:05:15 | Araq | for dot chaining 'on' doesn't read well does it |
12:05:17 | dadada | if it got to contain "chain" it might as well drop the "On" part |
12:05:42 | Araq | let's first decide on dots vs blocks |
12:05:51 | dadada | I thought the block idea was good |
12:06:11 | dadada | on x: add(a).add(b) |
12:06:22 | Araq | huh? |
12:06:26 | Araq | mixing both? |
12:07:37 | dadada | 1) we tend to be used to chaining from functional langs or JavaScript, and there you get something like doA().thenB().thenC() |
12:08:14 | dadada | of course being used to something doesn't have to mean it's the best paradigm |
12:08:34 | Zevv | oi Araq. Does the alloc cleanup PR need more work or is it good to go afayc? |
12:08:47 | * | Demos[m] joined #nim |
12:08:47 | * | GitterIntegratio joined #nim |
12:08:47 | * | unclechu joined #nim |
12:08:47 | * | Yardanico[m] joined #nim |
12:08:48 | * | k0mpjut0r joined #nim |
12:08:48 | * | lqdev[m] joined #nim |
12:08:48 | * | BitPuffin joined #nim |
12:08:48 | * | salotz[m] joined #nim |
12:08:48 | * | ronny joined #nim |
12:08:49 | * | leorize[m] joined #nim |
12:08:51 | Araq | Nim's unofficial motto is "Copying bad design is not good design" |
12:08:53 | * | hohlerde joined #nim |
12:08:53 | * | silvernode[m] joined #nim |
12:08:54 | * | aurielmp joined #nim |
12:08:54 | * | vycb[m] joined #nim |
12:08:54 | * | aeverr[m] joined #nim |
12:08:54 | * | planetis[m] joined #nim |
12:08:54 | * | grantmwilliams joined #nim |
12:08:55 | * | oswin[m] joined #nim |
12:08:55 | * | skrylar[m] joined #nim |
12:08:55 | * | watzon[m] joined #nim |
12:08:55 | * | pigmej joined #nim |
12:08:55 | * | d-nice2[m] joined #nim |
12:09:02 | Yardanico | oh, matrix bridge is up agan :D |
12:09:04 | Yardanico | again* |
12:09:21 | Araq | Zevv, what did you end up with regarding leak detection? |
12:09:39 | dadada | Araq: could we use a semicolon? on x: add(a); add(b) |
12:09:51 | Yardanico | dadada: that's already possible with the PR I think |
12:10:01 | Yardanico | since semicolon exists in Nim :) |
12:10:05 | Zevv | it's almost all clean now, I had some double bookkeeping. Two tests have a few les deallocs because the =destroys are done at the end of NimMainModule, so I can't report those properly |
12:10:25 | Zevv | That either needs hooks or stuff from C, which I both don't like. afaik this is good as it is now, as the tests are the only cases using this for now. |
12:10:50 | Araq | hmm but you could use the subtraction method to ensure nothing inside main() did leak |
12:11:00 | dadada | on pair: add(x[i]); add(y[i]) # is this readable? |
12:11:16 | Zevv | Not for everything, some stuff ends up in NimMainModule still |
12:11:34 | dadada | how about using @? is that used yet by anything in Nim? |
12:11:36 | Araq | most tests use a main proc for this reason |
12:11:46 | dadada | @pair: add(x[i]); add(y[i]) |
12:11:48 | Zevv | araq: not enough. Let me check the details |
12:12:46 | dadada | I like @ because there won't be a conflict with anything else that might now be using "on" |
12:13:13 | dadada | it's also short syntax, downside might be that the code would very mildly start to look like perl |
12:14:01 | Araq | @ is used for @[1, 2, 3] |
12:14:01 | dadada | could also support @pair.add(x[i]).add(y[i]) |
12:14:02 | * | endragor quit (Remote host closed the connection) |
12:14:50 | Zevv | Araq: exceptions seem to cause this for example: http://ix.io/287J |
12:15:31 | Araq | yeah well |
12:15:51 | Zevv | yeah well indeed |
12:17:45 | dadada | Araq: is Β° free to use? |
12:18:38 | dadada | doesn't come up anywhere in manual.html |
12:18:51 | dadada | Β°pair: add(a); add(b) |
12:19:33 | narimiran | dadada: honest question: are you a troll? |
12:20:08 | Yardanico | dadada: I don't think using characters which can't be typed using a normal keyboard is okay |
12:20:24 | Yardanico | there's https://www.emojicode.org/ for example :P |
12:20:28 | narimiran | even & is "hard to reach", according to some authors :D :D |
12:21:18 | dadada | narimiran: no, just throwing some ideas out there, Yardanico: if that's true then it's my bad, Β° is easy to type on my keyboard, as is & and @ |
12:21:27 | Yardanico | well, on most keyboards it's not :) |
12:22:06 | Yardanico | most keyboards have this layout https://en.wikipedia.org/wiki/QWERTY |
12:22:19 | Yardanico | the US or UK one |
12:22:51 | Yardanico | even in Russia we have keyboards which have letters for russian layout and US qwerty layout |
12:23:13 | FromDiscord_ | <Rika> APL flashbacks |
12:23:19 | narimiran | dadada: if i'm not confusing you with someone else (sorry if i am), all your ideas seem to be "oh, i can A in nim. nah, B feels better to me, lets change the whole language to accomodate for B" or "oh, somebody proposed C. nah, i like D more because of reasons" |
12:23:32 | * | endragor joined #nim |
12:24:09 | PMunch | narimiran, dadada seems fine, I think you're confusing him with someone else :P |
12:24:27 | narimiran | then i'm really sorry |
12:24:41 | narimiran | but recently there were some discussions like i described |
12:25:00 | narimiran | i guess i forgot by whom |
12:25:43 | PMunch | Hmm, I can't seem to type Β° by any combination.. |
12:26:01 | Araq | dadada, it's universally agreed upon that only Leibniz should have been allowed to invent new notation or operators |
12:26:50 | dadada | narimiran: it might have been me in the last couple of days (before is unlikely), however I never dissed Nim, I just voice my ideas and opinions, you can think whatever you want, but please don't place thought restrictions on me |
12:27:10 | Zevv | Araq: so it's fine for now? I'll go look for other things then. |
12:27:57 | FromGitter | <Vindaar> @narimiran: I think you didn't see my message from yesterday. I was wondering whether the only dll dependencies we allow for windows are those, which come with the `dlls.zip` from the nim download section. Is that correct? |
12:28:29 | * | endragor quit (Ping timeout: 272 seconds) |
12:29:25 | PMunch | Well, I can do Ctrl+Shift+u then B0<enter>, but that's cheating |
12:29:59 | dadada | PMunch: stop, I dropped the idea now I know that my layout is more special than anticipated |
12:30:14 | PMunch | Haha :P What layout do you use by the way? |
12:30:30 | dadada | German |
12:33:28 | lqdev[m] | PMunch: alt gr+shift+0 doesn't work for you? |
12:34:02 | PMunch | Nope.. |
12:34:13 | PMunch | But then again I've customised my keyboard pretty hard.. |
12:35:07 | dadada | narimiran: maybe you an put me on an ignore list, block me or anything like that, I didn't make any demands here, just brainstorming and with me only recently learning the intricates of Nim my perspective on it obviously differs from those who have used it many years |
12:35:31 | lqdev[m] | add it into your X keymap ;) |
12:35:32 | PMunch | lqdev[m], next time I reboot it will :) |
12:35:39 | PMunch | Just did :P |
12:36:00 | PMunch | dadada, don't worry you're welcome to stay :) |
12:36:33 | PMunch | We've just had some unfortunate trolls in the past, so people are a bit on edge against trolls |
12:37:08 | PMunch | Where does the german layout put Β° by the way? |
12:37:22 | dadada | right above tab, shift+keyabovetab |
12:37:41 | PMunch | Ah, that yields a Β§ for me |
12:37:44 | FromGitter | <alehander92> Araq but isnt on x: op, op very similar to the other one |
12:37:53 | FromGitter | <alehander92> like, if we ignore the op; op vs op.op |
12:38:01 | FromGitter | <alehander92> its only method call syntax ina ction |
12:38:05 | PMunch | So you have pipe(|) and then with shift you get degree symbol? |
12:38:10 | FromGitter | <alehander92> on x: op vs x.on(op) |
12:38:13 | Yardanico | I have ` or ~ (with shift) above the tab :) |
12:38:24 | FromGitter | <alehander92> btw .. yeah why not chain with pipes |
12:38:29 | FromGitter | <alehander92> like elixir |
12:38:41 | dadada | PMunch: no there is ^ and Β° (with shift) |
12:38:51 | PMunch | Wait, where do you have pipe then? |
12:39:19 | dadada | right side alt + key right to left side shift |
12:39:20 | FromGitter | <alehander92> ok its not the same semanthic at all, but at least the syntax is an alternative |
12:39:30 | FromGitter | <alehander92> but yeah somethingOn is probably cleaner |
12:39:51 | PMunch | Ouch, so pipe is a bit cumbersome for you then? |
12:40:07 | dadada | no | is perfectly awesome |
12:40:19 | PMunch | Oh, I can actually get | by doing Altgr + that key |
12:40:30 | dadada | left hand pinky and right hand thumb |
12:40:31 | Yardanico | for me it's just shift + thatkeyafter ] |
12:40:33 | PMunch | That key is normally Γ for me :P |
12:40:44 | PMunch | Yardanico, but where is ]? |
12:40:52 | dadada | muscle memory makes | super easy |
12:40:52 | PMunch | For me ] is AltGr + 9 |
12:41:08 | Yardanico | PMunch: like on this layout https://en.wikipedia.org/wiki/QWERTY#/media/File:KB_United_States.svg |
12:41:16 | Yardanico | i have the same layout as this one |
12:41:22 | Yardanico | well, almost |
12:41:39 | Yardanico | I have "FN" key instead of windows key on the right side |
12:43:04 | PMunch | Ah, right |
12:43:40 | PMunch | Mine is like this: https://upload.wikimedia.org/wikipedia/commons/e/ec/Dvoraktastatur.png |
12:43:42 | PMunch | More or less |
12:44:03 | Yardanico | oh, dvorak? |
12:44:07 | Yardanico | neat |
12:44:09 | PMunch | I have some custom bindings to stuff, but for the most part that's the one I use |
12:44:13 | PMunch | Yeah, Norwegian dvorak |
12:45:03 | narimiran | @vindaar yeah, sorry, i missed that message. yeah, it seems like that - it is similar to what is in appveyor.yml |
12:45:33 | narimiran | can we test only a part of ggplotnim, which doesn't need extra dll? |
12:46:11 | Araq | Zevv, link to your PR please |
12:52:34 | Araq | never mind, found it |
12:57:07 | FromGitter | <Vindaar> @narimiran: yeah, then there's no way around. Give me another day and I'll change the test files such that every test that actually draws stuff is in its own file and I add a `-d:noCairo` compile option. Then at least the plot construction can be tested |
13:08:34 | * | marmotini_ joined #nim |
13:08:56 | * | kungtotte joined #nim |
13:09:33 | * | narimiran thumb up |
13:10:50 | * | nsf quit (Quit: WeeChat 2.7) |
13:11:23 | FromGitter | <iffy> leorize: yes, GTK sounds familiar (GObjects and such?). Anyway, if someone submits a PR to use libsecret, I wouldn't turn it down |
13:15:23 | * | dawkot quit (Ping timeout: 258 seconds) |
13:16:51 | * | dawkot joined #nim |
13:16:58 | FromDiscord_ | <Clyybber> Araq: Maybe we should really introduce some operator for outplace? |
13:19:11 | * | marmotini_ quit (Remote host closed the connection) |
13:20:20 | * | Pqzcih5 joined #nim |
13:20:41 | Araq | meh, nobody likes custom operators, they are "confusing" |
13:21:04 | Araq | I've yet to find a single thing in programming that is not "confusing" for somebody but whatever |
13:21:12 | FromGitter | <alehander92> its not about confusing |
13:21:15 | FromGitter | <alehander92> its about balance |
13:21:22 | FromGitter | <alehander92> its cool to have custom operators |
13:21:26 | FromGitter | <alehander92> but if one has 10 custom operators |
13:21:32 | FromGitter | <alehander92> it becomes a whole new notation |
13:22:03 | Araq | Zevv, this *Impl stuff is excessive, is it really necessary? |
13:22:58 | * | marmotini_ joined #nim |
13:25:20 | FromDiscord_ | <Clyybber> I agree operators should be introduced very sparingly |
13:25:51 | FromDiscord_ | <Clyybber> But with chainOn and outplace I feel like nobodys gonna use them if they are "big words" |
13:26:19 | Araq | IMO outplace is fine and chainOn needs a better name |
13:26:29 | Araq | 'on' would work, I tested it |
13:26:37 | Araq | but it's too short for my taste |
13:26:47 | FromDiscord_ | <Clyybber> Maybe overload outplace? |
13:28:01 | * | marmotini_ quit (Remote host closed the connection) |
13:28:09 | Zevv | Araq: Well, it is if you want to catch all allocs through one place and dispatch to the proper implementation |
13:28:40 | Zevv | There is only *one* `alloc(size: int)` proc. |
13:29:34 | Zevv | Otherwise the accounting has to be implemented in 4 places |
13:29:41 | Araq | yeah it's pretty nice |
13:29:51 | Araq | too bad it doesn't use the old -d:nimTypeNames mechanism |
13:30:00 | Zevv | don't know about that? |
13:30:00 | Araq | but it would be hard to do that |
13:30:17 | Araq | read gc_common.nim, it's pretty neat |
13:30:28 | Araq | you can get stats on the number of objects *per type* |
13:31:12 | Zevv | oh right, that would be sweeet. But I guess that doesn'nt have to go in with this PR, right? |
13:31:21 | Zevv | I'd like to get this out of the way before adding more stuf and divering further |
13:31:23 | FromGitter | <alehander92> so maybe offtopic, but now what is needed to do for a bare os : to redefine `alloc` or to just link to a custom mini-libc? |
13:31:43 | Zevv | alehander92: compile with --os:any and implement malloc()/free()/realloc() |
13:31:57 | Zevv | and -d:useMalloc |
13:32:08 | Zevv | alehander92: https://github.com/zevv/nim-linux-kernel/blob/master/src/stubs/stubs.c |
13:32:23 | Zevv | that is all I need to stub to run nim in the linux kernel |
13:32:28 | narimiran | `chainOn` is worse name than `operateOn`, because you can have only one argument (ok, why would you, but still), and there's no chaining there, but it is operating |
13:32:48 | Zevv | thanks araq |
13:32:49 | FromGitter | <alehander92> good note |
13:32:57 | FromGitter | <alehander92> great zevv awesome |
13:35:49 | narimiran | "great zevv awesome" +1 |
13:36:06 | * | marmotini_ joined #nim |
13:36:49 | Zevv | I guess that stuff should be documented. The 'embedded' section in the compiler guide still talks about os:standalone, should that be replaced? |
13:37:54 | FromDiscord_ | <Clyybber> Afaict operateOn/cascade/with all accomplish roughly the same thing |
13:40:02 | * | endragor joined #nim |
13:41:18 | Araq | Zevv, yeah, rewrite the docs |
13:42:01 | Araq | I looked at 'cascade', it's well done. it does a little bit too much for my taste |
13:42:47 | Araq | but our guidelines need to be expanded, we need a rule like |
13:43:07 | Araq | "Common syntactic sugar should be in the stdlib" |
13:44:09 | * | zyklon joined #nim |
13:44:10 | * | marmotini_ quit (Read error: Connection reset by peer) |
13:51:05 | * | marmotini_ joined #nim |
13:58:19 | * | marmotini_ quit (Read error: Connection reset by peer) |
13:59:20 | FromGitter | <alehander92> does this include pattern matching |
14:01:42 | * | marmotini_ joined #nim |
14:02:14 | Araq | it does. |
14:02:49 | Araq | PM is much more important than chaining |
14:02:56 | Araq | for some reason I forgot about it |
14:04:03 | Zevv | https://github.com/zevv/Nim/blob/zevv-embedded-docs/doc/nimc.rst#nim-for-embedded-systems |
14:04:57 | * | marmotini_ quit (Remote host closed the connection) |
14:06:30 | narimiran | shashlick: are you around maybe? |
14:17:19 | shashlick | Sup |
14:18:15 | FromGitter | <alehander92> ok good to know |
14:18:39 | FromGitter | <alehander92> zevv nice, i have to try it |
14:20:40 | narimiran | shashlick: you don't see private messages here, right? will telegram do? |
14:31:35 | dadada | to cat(enate) means the same as to chain sth, is well known from the POSIX cat command |
14:31:49 | dadada | cat x: add(a); add(b) |
14:32:02 | dadada | it's also pretty short |
14:44:06 | * | lritter joined #nim |
14:45:31 | Zevv | Araq: what is the purpose of your C++ exceptions branch? I'd like to target cpp on the avr atmel for PMunch's experiments, but at this time this does not work because of AVR limitations with exceptions - maybe your work will help here somehow |
14:49:49 | * | marmotini_ joined #nim |
14:50:43 | FromGitter | <alehander92> dadada i wouldnt advertsice posix naming |
14:50:44 | FromGitter | <alehander92> to Araq :P |
14:51:13 | FromGitter | <alehander92> otherwise i admit concatenating is a well known termin |
14:51:40 | FromGitter | <alehander92> btw have you seen concepts, i guess they would be interesting for you to comment |
14:53:10 | dadada | alehander92: which concepts? |
14:57:37 | * | floppydh quit (Read error: Connection reset by peer) |
14:58:26 | dadada | ok, you probably mean those https://nim-lang.org/docs/manual_experimental.html#concepts |
14:58:38 | * | floppydh joined #nim |
14:59:44 | * | ptdel joined #nim |
15:00:19 | dadada | hmm, looks nice |
15:02:13 | * | PMunch quit (Quit: Leaving) |
15:06:18 | narimiran | what's with the obsession about short names? nobody here uses autocomplete? |
15:08:16 | disruptek | not for my name. |
15:11:55 | lqdev[m] | disr |
15:12:03 | lqdev[m] | damn, my autocomplete didn't work |
15:12:54 | lqdev[m] | narimiran: imo the only abbreviations that one should make in code are common words |
15:13:02 | lqdev[m] | eg. gfx for graphics |
15:13:09 | lqdev[m] | when dealing with a graphics project |
15:13:11 | lqdev[m] | etc. |
15:15:03 | FromGitter | <alehander92> narimiran well shorter names are good for primitives imo |
15:15:26 | FromGitter | <alehander92> but i agree we might overdo it sometimes! |
15:15:35 | * | marmotini_ quit (Remote host closed the connection) |
15:16:13 | FromGitter | <alehander92> dadada yes, they're relatively experimental, i think most related to c++ concepts |
15:16:29 | FromGitter | <alehander92> you might also take a look at the nimz3 idea |
15:16:34 | FromGitter | <alehander92> if you're interested in such stuff |
15:16:49 | FromGitter | <alehander92> but thats much more type-stuff-y |
15:17:51 | * | floppydh quit (Quit: WeeChat 2.7) |
15:17:55 | * | ng0_ joined #nim |
15:19:10 | * | nsf joined #nim |
15:21:30 | * | ng0 quit (Ping timeout: 265 seconds) |
15:41:08 | Araq | Zevv, for me C++ based exception handling is just broken |
15:41:31 | Araq | but for you ... you should make --exceptions:goto work for C++ |
15:41:39 | Araq | we talked about the fix |
15:44:46 | FromGitter | <Varriount> narimiran: If you have that opinion, try to avoid Go |
15:46:24 | Yardanico | Go code looks extremely verbose imo, big tabbing and "simple" syntax, I'm used to 2-space indents in Nim :) |
15:46:48 | FromDiscord_ | <Rika> go indents arent important anyway afaik? |
15:46:48 | * | dddddd quit (Ping timeout: 260 seconds) |
15:46:56 | FromDiscord_ | <Rika> so you can always convert to 2-space |
15:47:16 | FromGitter | <Varriount> Yardanico: Part of that is due to a lack of language constructs and/or generics |
15:48:21 | FromGitter | <Varriount> Want to check if an element is in a slice (sequence)? Guess what, you get to write that `for` loop on your own |
15:48:39 | Yardanico | really? |
15:48:45 | FromGitter | <Varriount> Yes |
15:48:50 | Yardanico | LMAO https://golangcode.com/check-if-element-exists-in-slice/ |
15:48:57 | Yardanico | https://stackoverflow.com/questions/15323767/does-go-have-if-x-in-construct-similar-to-python |
15:49:13 | Yardanico | nice DRY |
15:49:25 | * | icebattle joined #nim |
15:49:27 | FromGitter | <Varriount> There are technically ways to do it, but you have to use Go's equivalent of a void pointer (an empty interface) |
15:49:39 | Yardanico | also since there's no generics you're gonna write a new one for each type ? |
15:49:46 | FromGitter | <Varriount> Yep |
15:50:02 | FromDiscord_ | <gingerBill> Not to defend Go but I rarely check for elements in a slice and when I do, I usually do need a for loop at any rate because I want to do other checks. |
15:50:21 | FromDiscord_ | <gingerBill> So for me personally, it was rarely a problem. |
15:50:22 | FromDiscord_ | <Rika> void pointer eugh |
15:50:54 | FromGitter | <Varriount> Gingerbill: Fair point |
15:52:12 | FromGitter | <Varriount> However it makes creating constructs (like, say, wrappers and decorators) more difficult than it should be |
15:52:17 | FromDiscord_ | <gingerBill> So doing `found := false; for _, e := range slice { if e == to_find { found = true; break } }` is not a huge issue in practice. |
15:53:31 | FromDiscord_ | <gingerBill> So doing `found := false; for _, e := range slice { if e == toFind { found = true; break } }` is not a huge issue in practice. |
15:53:39 | FromDiscord_ | <gingerBill> Even if you want to do `toFind in slice` |
15:54:29 | FromDiscord_ | <gingerBill> And if I want to do `in` on something, I usually want the index too not just a boolean check. |
15:55:03 | FromDiscord_ | <gingerBill> `index := -1; for i, e := range slice { if e == toFind { index = i; break } }` |
15:55:38 | FromDiscord_ | <gingerBill> So if Go had some form of metaprogramming (that is not go gen), this would be nice. |
16:07:34 | Araq | yeah you can simply always write much more code, it never gets tiresome. |
16:07:50 | * | endragor quit (Remote host closed the connection) |
16:11:13 | FromDiscord_ | <gingerBill> It only gets tiresome if you have to write it a lot, but as I said, in my personal experience, I rarely wanted this particular construct. |
16:11:35 | FromDiscord_ | <gingerBill> There other idioms I have wanted in Go but have lived without (to my minor annoyance) |
16:13:17 | FromGitter | <Varriount> gingerBill: You might like https://github.com/hexdigest/gowrap |
16:14:35 | FromDiscord_ | <gingerBill> That's a cool metaprogramming tool! |
16:29:16 | * | Kaivo quit (Quit: WeeChat 2.7) |
16:39:19 | * | icebattle quit (Ping timeout: 258 seconds) |
16:40:16 | * | jholland__ joined #nim |
16:52:08 | * | samuell joined #nim |
16:52:31 | * | samuell quit (Read error: Connection reset by peer) |
16:53:53 | * | dawkot quit (Ping timeout: 260 seconds) |
16:54:14 | * | marmotini_ joined #nim |
16:58:07 | * | marmotini_ quit (Remote host closed the connection) |
16:58:12 | FromGitter | <alehander92> Araq why cant i access let |
16:58:16 | FromGitter | <alehander92> in func |
16:58:36 | * | NimBot joined #nim |
17:01:45 | disruptek | s/on/do-on/ s/do-on/doon/ |
17:04:08 | * | dawkot joined #nim |
17:04:14 | Yardanico | well, `let` means it still can change between different runs right? |
17:04:21 | Yardanico | so func results for same arguments might be different |
17:04:24 | Yardanico | that's how I see it at least |
17:07:08 | leorize | Araq: I've looked into using OS-native functions for io |
17:07:30 | leorize | it's not possible to implement io.nim as it is right now with os-native functions |
17:08:06 | leorize | in particular io.reopen(), since that requires access to File internals, which we can't do |
17:09:42 | * | icebattle joined #nim |
17:17:40 | * | ng0_ is now known as ng0 |
17:21:31 | * | Trustable joined #nim |
17:24:33 | * | seni joined #nim |
17:35:31 | cron | anyone see zolk3ri here recently? |
17:39:45 | * | abm quit (Quit: Leaving) |
17:41:42 | Araq | leorize, I'm not following |
17:42:54 | FromDiscord_ | <Recruit_main_70007> is there something i can use in nim similar to libbtc? |
17:42:54 | FromDiscord_ | <Recruit_main_70007> https://github.com/jonasschnelli/libbtc |
17:46:12 | leorize | Araq: so you told me you wanted to use native win32 api for io |
17:46:45 | leorize | I've done some research and found that we would need our own File structure to do so |
17:47:09 | leorize | because we can't implement reopen() with C's FILE since we don't have access to its internals |
17:47:11 | shashlick | mratsim: going to try weave instead of threadpool for px2 |
17:47:34 | leorize | but that would break backward compatibility, so it can't be done atm |
17:47:58 | Araq | sure it would require our own File object, what's wrong with that? |
17:48:14 | leorize | breaking existing C FFI code that rely on File |
17:50:26 | leorize | but we will have a lot to gain with our own File object, for one it reduces our dependency on libc :) and it'll be possible to have deterministic behavior across different systems |
17:52:51 | Araq | yup |
17:53:16 | Araq | Recruit_main_70007: you could wrap it but I wouldn't use it, looks like bad code to me |
17:53:57 | leorize | I will try to draft out an io.nim with custom File, and see how much would that break things |
17:54:53 | shashlick | mratsim: waah - processClient has arguments managed by GC (ref/seq/strings), they cannot be distributed across threads. |
17:55:22 | leorize | --gc:arc? :P |
17:55:53 | FromDiscord_ | <Recruit_main_70007> araq, i found a nim wrapper for secp256k1, (which is basiacally what libbtc is based on) |
17:55:57 | FromDiscord_ | <Recruit_main_70007> thanks |
17:57:14 | * | theelous3 joined #nim |
17:58:49 | shashlick | okay all my arguments are now pointers except the callback but still same error |
18:01:33 | shashlick | okay, made the callback an unsafeAddr and it compiles but crashes on runtime |
18:02:21 | shashlick | Error: unhandled exception: /home/gt/.nimble/pkgs/weave-0.1.0/weave/memory/memory_pools.nim(625, 8 ) `sizeof(ChannelMpscUnboundedBatch[ptr MemBlock]) == 272` MPSC channel size was 512 [AssertionError] |
18:02:39 | shashlick | mratsim ^^^ when you get a chance |
18:02:55 | * | nsf quit (Quit: WeeChat 2.7) |
18:04:56 | * | Pqzcih5 quit (Remote host closed the connection) |
18:05:40 | * | Pqzcih5 joined #nim |
18:27:37 | FromDiscord_ | <Recruit_main_70007> https://twitter.com/Phemex_official/status/1217808220703473664 |
18:27:37 | FromDiscord_ | <Recruit_main_70007> |
18:27:37 | FromDiscord_ | <Recruit_main_70007> i leave these here, someone could get it |
18:34:39 | * | seni quit (Quit: Leaving) |
18:37:00 | * | marmotini_ joined #nim |
18:37:08 | * | jwm224 quit (Ping timeout: 268 seconds) |
18:41:29 | * | jwm224 joined #nim |
18:52:18 | Zevv | Can anyone test this for me with --gc:arc: http://ix.io/289A |
18:52:58 | disruptek | segv |
18:53:13 | Zevv | right |
18:53:14 | Zevv | thanks |
18:53:42 | Araq | wait what? |
18:53:55 | * | edubart joined #nim |
18:54:07 | disruptek | s2 is unalloc |
18:54:34 | Araq | hmmm |
18:54:53 | * | edubart quit (Remote host closed the connection) |
18:55:27 | Yardanico | had some fun with https://github.com/belamenso/v https://i.imgur.com/7Mxp1r1.png |
18:57:39 | Araq | Zevv, is that a regression? |
18:58:46 | Zevv | bisecting |
18:59:16 | Zevv | but I think no |
19:02:04 | Zevv | well how far back should I go |
19:02:58 | Yardanico | fun fact: you can name your .nim file as "π€.nim" and even import it successfully, but nimble doesn't like that package name :( |
19:04:33 | Zevv | Araq: it was broken in december already |
19:04:59 | disruptek | yardanico: what does nimph do with it? |
19:05:07 | Yardanico | disruptek: π€ |
19:08:03 | * | dawkot quit (Ping timeout: 260 seconds) |
19:08:37 | * | dawkot joined #nim |
19:12:01 | Araq | Zevv, I meant a regression compared to Nim before your PR was merged, obviously |
19:20:02 | Zevv | Oh you were blaming *me* :) |
19:20:23 | Yardanico | damn this is too meta, you can bootstrap this lib in itself http://ix.io/289G |
19:20:25 | Zevv | Did you really think I would come out with this without checking for that |
19:20:49 | Araq | so ... 'koch boot -d:release --gc:arc' is a totally a thing now, right? |
19:21:22 | disruptek | it's fine as long as you init all your v2 strs/seqs. |
19:22:00 | Zevv | Araq: I guess I should make an issue for that crash? |
19:22:54 | Zevv | or is disruptek already fixing it :) |
19:23:11 | Araq | of course, it's a showstopper bug |
19:23:12 | disruptek | eh i cannot even build head due to a hard styleCheck error. |
19:23:56 | disruptek | s/compilerProc/compilerproc/ in memtracker |
19:26:54 | Araq | memtracker? is that still a thing? |
19:29:42 | * | dddddd joined #nim |
19:34:10 | Araq | uh oh |
19:34:23 | Araq | bootstrapping fails on my machine |
19:34:31 | Araq | the error message is 'FAILURE' |
19:34:42 | Araq | and nothing else |
19:36:07 | * | Pqzcih5 quit (Remote host closed the connection) |
19:36:21 | Araq | Zevv, the "peak mem" reporting seems to broken |
19:36:26 | Araq | *to be |
19:36:36 | * | Pqzcih5 joined #nim |
19:36:45 | * | Pqzcih5 quit (Remote host closed the connection) |
19:37:03 | * | Pqzcih5 joined #nim |
19:40:02 | * | cron quit (Ping timeout: 240 seconds) |
19:42:25 | Araq | Zevv, yay, for me Nim's bootstrapping now fails |
19:42:33 | Araq | what did you do to our allocations? |
19:43:18 | Zevv | dang, that was not part of CI of course :/ |
19:43:32 | Araq | hmm maybe it's my patch |
19:43:38 | Araq | let's see |
19:44:35 | Araq | oh yeah |
19:44:37 | Zevv | well I fiddled in one of the most essential core components of the ecosystem, what can go wrong, right |
19:44:39 | Araq | false alarm |
19:44:45 | Araq | I think. |
19:45:19 | Araq | but the "peak mem" bug might be yours |
19:45:42 | Zevv | likely. What is used to get that number? |
19:45:45 | Araq | you can easily check this, if it reports < 400 MB |
19:45:59 | Araq | for 'koch boot' then you misreport it |
19:46:12 | Araq | getMaxMem proc or similar |
19:46:44 | Zevv | ok |
19:49:15 | Araq | hmm ok it was my bug |
19:49:24 | Araq | and peak mem reporting seems fine too, sorry for the noise |
19:50:09 | Zevv | no problem. I just will remember the false accusations for the decades to come. |
19:50:13 | * | jwm224 quit (Ping timeout: 258 seconds) |
19:52:58 | * | narimiran quit (Ping timeout: 260 seconds) |
19:53:26 | * | Ven`` joined #nim |
19:53:41 | * | narimiran joined #nim |
19:55:02 | * | drewr quit (Ping timeout: 260 seconds) |
19:55:27 | * | cron joined #nim |
19:56:44 | * | jwm224 joined #nim |
19:58:35 | * | cron1 joined #nim |
19:59:48 | * | cron quit (Ping timeout: 258 seconds) |
20:04:05 | Zevv | that was a nice red herring |
20:04:18 | Zevv | there's a nimZeroMem happening on a const struct |
20:04:50 | Zevv | valgrind has a hard time explaining that, funnily enough |
20:06:02 | disruptek | i have a hard time explaining where my memory went, too. |
20:06:29 | euantor | Was glancing at the `parsecfg source, and noticed the case for the `[` token sets the literal to `]`. It does seem to wok, but was a little surprising.- is it intended? https://github.com/nim-lang/Nim/blob/devel/lib/pure/parsecfg.nim#L357 |
20:07:06 | Yardanico | lol |
20:07:40 | Yardanico | maybe it works because the tok.kind is set correctly |
20:07:48 | Yardanico | and code doesn't really need tok.literal of that kind |
20:08:09 | Yardanico | ah no, actually it is used https://github.com/nim-lang/Nim/blob/devel/lib/pure/parsecfg.nim#L425 |
20:08:38 | Yardanico | ah nvm it's not, this is the only place where it's used and the code gets the closing bracket in that branch |
20:09:19 | Yardanico | I guess this is a result of ctrl+c; ctrl+v :P |
20:10:02 | Yardanico | that code was commited 12 years ago |
20:11:21 | * | cron1 quit (Quit: Leaving.) |
20:12:06 | * | drewr joined #nim |
20:12:08 | disruptek | so it's not even old. |
20:12:26 | Zevv | ok boomer |
20:12:31 | Yardanico | lmao |
20:12:39 | disruptek | too funny. |
20:13:07 | * | Vladar quit (Quit: Leaving) |
20:13:21 | FromDiscord_ | <DeltaPHC> Man, Nim is that old? |
20:13:24 | Yardanico | euantor: so I guess since you found out that typo you have the rights to make a PR for it :P |
20:13:44 | Yardanico | @DeltaPHC well yes, first commit in nim repo is https://github.com/nim-lang/Nim/commit/405b86068e6a3d39970b9129ceec0a9108464b28 |
20:14:09 | Yardanico | but AFAIK it was developed since 2006 by Ar*q, but he only published it in 2008 |
20:14:12 | Yardanico | I might be wrong though |
20:14:14 | euantor | Yeah, I had a glance and couldn't see anything that would break by changing it, but haven't actually tested that theory yet |
20:14:41 | Yardanico | well that's why we have CI :P |
20:14:49 | FromDiscord_ | <DeltaPHC> I do recall when it was called Nimrod, but I didn't quite realize it was so long ago |
20:15:20 | FromDiscord_ | <DeltaPHC> That name change was a good decision, lol |
20:15:45 | Yardanico | english is not my native language so there wasn't any real difference for me :P |
20:15:50 | Yardanico | although a shorter name is a bit nicer I guess |
20:16:30 | euantor | here goes nothing, let's see if the CI goes mental :) |
20:16:46 | Yardanico | inb4 it breaks the compiler somehow xd |
20:17:03 | Yardanico | but really I think it shouldn't since rawGetTok is not even exported |
20:18:47 | * | ng0_ joined #nim |
20:19:14 | * | ng0 quit (Ping timeout: 265 seconds) |
20:21:51 | * | opal quit (Changing host) |
20:21:51 | * | opal joined #nim |
20:22:41 | Yardanico | guess I need to leave nim repo, i'm collaborator for like 2 years now but I didn't do anything meaningful :P and I'm kinda always scared I would press a "merge pull request" accidentally xd |
20:23:11 | Araq | Zevv, https://github.com/nim-lang/Nim/pull/13244 |
20:23:13 | disbot | β₯ make goto based exceptions available for 'nim cpp' |
20:23:23 | Araq | Yardanico, you could also start to contribute |
20:23:31 | Yardanico | Araq: yeah, I know, but I would do it with PRs anyway :D |
20:24:05 | * | marmotini_ quit (Remote host closed the connection) |
20:24:37 | Zevv | Araq: ah right, evalConstExprAux was my problem, thanks |
20:25:26 | Zevv | I assume that fixed the 'can only raise ref object' error? |
20:25:57 | Araq | no, I didn't do any testing whatsoever |
20:26:35 | Zevv | oh ok, let me check |
20:26:44 | Araq | er if FTP is dead how come I keep getting PRs about it? |
20:27:47 | * | cron joined #nim |
20:28:59 | * | sagax quit (Read error: Connection reset by peer) |
20:29:05 | Zevv | /home/ico/external/Nim/lib/system/excpt.nim(571, 12) Error: only a 'ref object' can be raised |
20:30:04 | Zevv | It tries to raise a C exception, so I guess the 'except StdException' has to go if :goto is enabled |
20:30:09 | Zevv | but I couldn't find a flag for that yet |
20:31:55 | * | marmotini_ joined #nim |
20:35:27 | * | sagax joined #nim |
20:46:39 | * | cron quit (Quit: Leaving.) |
20:47:54 | * | ng0_ is now known as ng0 |
20:51:39 | FromGitter | <zetashift> FTP? |
20:52:00 | * | narimiran quit (Ping timeout: 268 seconds) |
20:52:12 | * | Ivan_ joined #nim |
20:52:49 | * | Ivan_ quit (Client Quit) |
20:55:23 | Zevv | this arc crash is remarkably tricky |
21:05:13 | dadada | Yardanico: just discovered your nympylib, it's awesome and it really blows me away that you even can emulate python style classes with it |
21:05:28 | * | marmotini_ quit (Remote host closed the connection) |
21:06:01 | * | marmotini_ joined #nim |
21:08:51 | Zevv | araq can you explain something to me? I don't know much about the internals, but what I see is that with arc if I add object A to a seq, A will be memZero'd out after - this happens after a eqsink so I assume the compler deduces the sink here. The zeroed out object is a 'static const' struct, which gcc sometimes puts in a readonly page, and sometimes not - not sure what this depends on |
21:09:33 | Zevv | I can 'fix' this by not emitting a 'const' struct, but that's probably too simple |
21:10:30 | * | marmotini_ quit (Ping timeout: 268 seconds) |
21:14:14 | leorize | or you can also not emit a static :P |
21:15:06 | leorize | we could give up a bit of potential performance / less memory usage for determinism imo |
21:18:20 | * | Ven`` quit (*.net *.split) |
21:18:20 | * | dawkot quit (*.net *.split) |
21:18:20 | * | dom96 quit (*.net *.split) |
21:18:21 | * | Yardanico quit (*.net *.split) |
21:18:21 | * | jxy quit (*.net *.split) |
21:18:21 | * | bozaloshtsh quit (*.net *.split) |
21:18:21 | * | EvergreenTree quit (*.net *.split) |
21:18:22 | * | livcd quit (*.net *.split) |
21:18:23 | * | lbart quit (*.net *.split) |
21:18:23 | * | Tanger quit (*.net *.split) |
21:21:53 | * | Trustable quit (Remote host closed the connection) |
21:26:14 | * | jxy joined #nim |
21:26:15 | * | livcd joined #nim |
21:27:59 | FromGitter | <hlaaftana> Lol, I made the FTP PR, the bug i fixed is a pretty bad one if you look at it, the fact that it was around since 2016 is a pretty good indicator that no one uses FTP |
21:28:30 | disruptek | nice; new bugs, old code. i love it. |
21:30:54 | disruptek | Zevv: so the way it works is, we snoop the nim repo. we create issues with snippets at a foobar repo. foobar is where we enact all the automation and store all the traffic about a bug. yeah, we get full history with whatever github behavior is enabled. |
21:31:40 | disruptek | the bot can snoop foobar repo and pull out code for testing. it'll actually put all of those automated tests in a single package, maintained separately. |
21:32:37 | disruptek | the first comment it makes will be to confirm that someone audited the issue and marked it as legit. |
21:33:27 | disruptek | that'll provide the necessary link. other than that, it won't need to spam the nim repo at all. i think maybe adding flags might not be too disruptive, but i don't think it's strictly necessary. |
21:35:31 | * | cron joined #nim |
21:36:33 | disruptek | it'll just fill out the first comment of the post with a complete postmortem; anything we can think of to put in there. we can regenerate it whenever we touch it, so we don't need to spam ourselves with myriad tiny updates. |
21:37:24 | disruptek | of course, you'll be able to use this in any project, but the compiler will be the best testbed. |
21:43:17 | Zevv | so you want to exctract snippets automatically |
21:43:51 | disruptek | yeah, but i'm already doing that. |
21:43:55 | Zevv | but you can't expect these to make sense? often it's not a complete runnable snippet |
21:43:58 | disruptek | just ignore the uninteresting bits. |
21:44:16 | disruptek | you can make new tickets in the repo that are "sensical" if you want. |
21:44:30 | disruptek | you can also simply fix the existing ticket. |
21:44:41 | Zevv | hm right |
21:45:56 | disruptek | you can start with the existing tests, for example. |
21:48:28 | Zevv | there's no way to add some kind of metadata to an issue probably |
21:48:38 | Zevv | oh you can re-update the same comment, that's what you mean? |
21:48:38 | disruptek | basically, we have all this already. the bits i expect to build are a new ci engine and some glue to connect it to github. |
21:48:43 | disruptek | right. |
21:48:55 | disruptek | the data can go into html that's hidden one way or another. |
21:49:20 | disruptek | it'll write an email version, then edit/replace it with the sexy github version that also includes the data. |
21:49:26 | Zevv | or you can put it somewhere in a git repo and just add a link to the commit in a comment |
21:49:43 | Zevv | iirc git commits can cross reference over repos |
21:49:46 | disruptek | yep. it will be writing the tests repo anyway. |
21:49:56 | Zevv | so, is it done yet? |
21:50:15 | disruptek | we'll just put all the data in the test. we can even use the doc generator to generate nice web-pages from it that include the original explanation, etc. etc. |
21:50:38 | disruptek | i'm relying upon you to do your usual devil's advocate thing. |
21:51:12 | Zevv | I can see this work, but not without significant manual intervention |
21:51:49 | disruptek | like what? |
21:52:11 | Zevv | I might not understand all of it, but you want to take snippets from issues and make tests out of those? |
21:52:22 | disruptek | every issue is a test, yes. |
21:52:34 | disruptek | if the issue is open, the test is failing. if it's closed, the test passes. |
21:52:41 | Zevv | oooh right |
21:52:45 | disruptek | we only open one issue at a time. |
21:53:08 | disruptek | so it's not like you have 1200 open issues. |
21:53:21 | Zevv | 1,466 |
21:53:41 | disruptek | well, it'll be less when the bot runs and confirms that some bugs are fixed. |
21:54:58 | Zevv | ok, I was on my way to bed, I'll let this sink in. You'll have to fill me in on the details with a beer next week |
21:55:08 | disruptek | sleep tight, zevv. |
21:55:14 | Zevv | o/ |
22:00:38 | * | icebattle quit (Ping timeout: 268 seconds) |
22:01:42 | * | Ven`` joined #nim |
22:01:42 | * | dom96 joined #nim |
22:01:42 | * | Yardanico joined #nim |
22:01:42 | * | bozaloshtsh joined #nim |
22:01:42 | * | EvergreenTree joined #nim |
22:01:42 | * | lbart joined #nim |
22:01:42 | * | Tanger joined #nim |
22:04:11 | * | marmotini_ joined #nim |
22:05:59 | disruptek | you'll leave a comment like "!mwe" and some code in the nim-side ticket to add/update a list of examples that reproduce the problem. of course, these can turn into your tests that demonstrate a fix, etc. |
22:07:31 | disruptek | i guess you could even link the docs against the tickets/tests. or you could use it to get a heatmap of instability across the language. π |
22:11:14 | * | filcuc joined #nim |
22:16:38 | * | krux02 quit (Remote host closed the connection) |
22:18:02 | * | solitudesf- joined #nim |
22:18:27 | disruptek | clearly you want performance graphs, too. those can be regenerated whenever the test inputs change. hmm, maybe this should run as a fork. then it will work seamlessly for smaller projects that don't mind integrating ci into their issues. |
22:20:45 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:22:51 | * | filcuc quit (Ping timeout: 240 seconds) |
22:26:22 | * | abm joined #nim |
22:30:18 | * | ptdel quit (Ping timeout: 245 seconds) |
22:31:55 | * | icebattle joined #nim |
22:33:12 | * | abm quit (Quit: Leaving) |
22:33:42 | disruptek | what we're really talking about here is just an integration of the local development environment and github. when people share their environments, they share this testing load. in fact, we could even do crazy stuff, like when we see that you built xyz with q+abc+e and we have a test for abc, we can build abc incrementally and provide the result cheaply. |
22:35:45 | Yardanico | i wonder what's the most viewed nim forum thread π€ |
22:36:59 | * | icebattle quit (Ping timeout: 265 seconds) |
22:37:21 | * | blackbeard420 quit (Quit: ZNC 1.7.5 - https://znc.in) |
22:37:22 | * | hpyc9 quit (Quit: ZNC 1.7.5 - https://znc.in) |
22:39:02 | * | lritter quit (Quit: Leaving) |
22:39:18 | * | solitudesf- quit (Ping timeout: 268 seconds) |
22:41:01 | * | blackbeard420 joined #nim |
22:41:30 | * | hpyc9 joined #nim |
22:42:12 | * | ptdel joined #nim |
22:48:38 | disruptek | this system can learn the fastest way to test the project, but it also knows what's related. so it needs to project entry from any file, or really all files in a commit. |
22:57:56 | disruptek | which really means that we operate commit-by-commit. we just monitor the rest of the repo and act on any merge that doesn't have our performance data in it. we measure that data and write it into a new commit. |
22:59:49 | disruptek | now your repo has test data in it from real user environments. anyone who wants to help test can do so and automatically create prs to upload their data. you also know which file changes affect which tests. |
23:00:27 | disruptek | knowing the fastest way to test your project means you know the most brittle bits. but you know that for any package across the ecosystem that adopts such tests. |
23:00:46 | disruptek | you can estimate your risk across the whole project, an for any given commit. |
23:00:55 | disruptek | in any dependency. |
23:03:07 | disruptek | you get that data, hosted locally in your git clone, regardless of whether you participate in testing. |
23:08:20 | Araq | Zevv, if it's a NIM_CONST it's a "blueprint" for the object and should be copied into the object |
23:08:30 | Araq | else it's not NIM_CONST and we can mutate it |
23:08:59 | Araq | doesn't seem hard to fix but probably you should just look at my PR tomorrow |
23:14:47 | * | ltriant joined #nim |
23:33:21 | disruptek | i always liked ncurses because i never had trouble building it or linking it. |
23:33:32 | disruptek | but why is it so large? |
23:39:49 | Araq | dunno. |
23:51:32 | disruptek | if they didn't want me to get drunk on hand sanitizer, why did they make it so tasty? |
23:53:42 | Araq | why would anybody watch "Two and a half men" with Ashton Kutcher. |
23:54:00 | disruptek | two questions for the eternities. |
23:59:21 | * | dadada quit (Ping timeout: 265 seconds) |