00:00:15 | FromDiscord | <Rika> why so? |
00:01:12 | leorize | because it assumes a totally efficient system |
00:01:22 | leorize | there are other thing running that's not your program |
00:01:55 | leorize | if the core is blocked because the os scheduled some of its thread on it, then your work will only be invoked in small intervals |
00:02:17 | leorize | other cpu cores might be free, but since you pinned it there, it can't go anywhere else |
00:02:26 | leorize | and no, the os won't let you hold the core exclusive |
00:02:32 | FromDiscord | <Rika> i see |
00:03:09 | FromDiscord | <Rika> so basically you're saying pinning anything is abd |
00:03:10 | FromDiscord | <Rika> bad( |
00:03:11 | FromDiscord | <Rika> bad* |
00:03:26 | leorize | sadly, yes :p |
00:03:37 | leorize | os schedulers can do a much better job than you |
00:03:40 | leorize | just let them do their work |
00:04:43 | * | dadada__ joined #nim |
00:05:56 | leorize | core pinning is even more inefficent now that we have more diverse CPUs |
00:11:10 | rayman22201 | https://linux.die.net/man/1/taskset |
00:11:17 | rayman22201 | but yeah, it's generally a bad idea |
00:12:00 | rayman22201 | also https://linux.die.net/man/8/numactl |
00:16:12 | * | dwdv quit (Ping timeout: 256 seconds) |
00:26:14 | * | zacharycarter quit (Ping timeout: 240 seconds) |
00:28:10 | * | dadada__ quit (Ping timeout: 256 seconds) |
00:34:39 | * | dadada joined #nim |
00:35:03 | * | dadada is now known as Guest87845 |
00:36:33 | * | krux02_ joined #nim |
00:39:32 | * | krux02 quit (Ping timeout: 260 seconds) |
00:43:36 | * | rnrwashere joined #nim |
00:52:16 | FromGitter | <awr1> yeah emacs for nim is broken. yet i still use it lol |
00:52:29 | FromGitter | <awr1> have had to have nimsuggest disabled for the longest time |
00:58:25 | * | Guest87845 quit (Ping timeout: 264 seconds) |
00:59:15 | FromGitter | <zetashift> nim support for emacs is the only reason I haven't switched yet :( |
00:59:20 | FromDiscord | <Rika> how do i "put the contents of a seq into an array" |
00:59:31 | FromDiscord | <Rika> just like i can "convert an array into a seq |
00:59:49 | leorize | Rika: you iterate the array, then copy each elements from the seq |
01:00:13 | FromDiscord | <Rika> thats the only way? |
01:00:19 | leorize | arrays are fixed in size, so you can't do magical "copy back" kind of thing |
01:00:36 | shashlick | CPU affinity is important when talking to PCI devices like GPUs and FPGAs |
01:00:43 | shashlick | You don't want to go over QPI |
01:00:56 | FromDiscord | <Rika> i mean, i thought there would be a proc that did that, leorize |
01:00:58 | leorize | shashlick: you won't be doing that in user space :P |
01:01:13 | leorize | @Rika: nope, there aren't, sadly :P |
01:01:59 | shashlick | It's not always bad is what I'm saying |
01:02:40 | leorize | ah, yea |
01:05:13 | krux02_ | awr1: yea pretty disappointing with nimsuggest in emacs. |
01:08:19 | * | krux02_ quit (Remote host closed the connection) |
01:08:38 | leorize[m] | if you don't fix it no one will |
01:09:26 | * | dadada joined #nim |
01:09:50 | * | dadada is now known as Guest84506 |
01:15:51 | shashlick | why is it so hard to fix nimsuggest itself |
01:16:44 | FromGitter | <zetashift> the memory leaks you mean? |
01:21:23 | shashlick | yep |
01:28:03 | * | Guest84506 quit (Ping timeout: 250 seconds) |
01:29:28 | FromGitter | <zetashift> I thought this pragma was deprecated: https://github.com/Guevara-chan/Midday-Commander/blob/master/src/main.nim#L3 ? |
01:29:31 | leorize | the memory leaks isn't that bad for me |
01:29:57 | leorize | but I'd expect that the reason was because of how the compiler was designed |
01:30:59 | leorize[m] | zetashift: yes is was |
01:31:17 | leorize[m] | doesn't mean that you can't write code that use it though |
01:31:53 | * | rnrwashere quit (Remote host closed the connection) |
01:34:38 | * | dadada__ joined #nim |
01:35:42 | FromDiscord | <Rika> deprecated doesnt mean removed |
01:35:49 | FromDiscord | <Rika> just means slated for removal |
01:57:57 | * | dadada__ quit (Ping timeout: 250 seconds) |
02:04:38 | * | dadada__ joined #nim |
02:07:36 | * | rnrwashere joined #nim |
02:09:01 | FromGitter | <zetashift> dang okay that it was gone already |
02:28:17 | * | dadada__ quit (Ping timeout: 250 seconds) |
02:34:36 | * | dadada joined #nim |
02:35:00 | * | dadada is now known as Guest80620 |
02:36:07 | * | chemist69_ quit (Ping timeout: 246 seconds) |
02:38:11 | * | chemist69 joined #nim |
02:45:29 | * | endragor joined #nim |
02:52:03 | * | zacharycarter joined #nim |
02:58:20 | * | Guest80620 quit (Ping timeout: 256 seconds) |
03:04:43 | * | dadada__ joined #nim |
03:27:54 | * | dadada__ quit (Ping timeout: 240 seconds) |
03:34:32 | * | dadada joined #nim |
03:34:55 | * | dadada is now known as Guest77250 |
03:43:41 | * | endragor quit (Remote host closed the connection) |
03:43:53 | * | endragor joined #nim |
03:54:35 | * | muffindrake quit (Ping timeout: 246 seconds) |
03:57:02 | * | muffindrake joined #nim |
03:57:54 | * | Guest77250 quit (Ping timeout: 240 seconds) |
04:04:37 | * | dadada__ joined #nim |
04:06:22 | * | rnrwashere quit (Remote host closed the connection) |
04:12:43 | * | zacharycarter quit (Ping timeout: 250 seconds) |
04:23:12 | * | pydsigner quit (Excess Flood) |
04:23:24 | * | pydsigner joined #nim |
04:27:50 | * | dadada__ quit (Ping timeout: 246 seconds) |
04:34:39 | * | dadada joined #nim |
04:35:02 | * | dadada is now known as Guest96692 |
04:35:21 | * | nsf joined #nim |
04:57:54 | * | Guest96692 quit (Ping timeout: 256 seconds) |
05:04:44 | * | dadada__ joined #nim |
05:08:26 | * | rnrwashere joined #nim |
05:21:25 | * | sleepyqt joined #nim |
05:28:07 | * | dadada__ quit (Ping timeout: 250 seconds) |
05:34:32 | * | dadada joined #nim |
05:34:55 | * | dadada is now known as Guest27836 |
05:54:25 | * | rnrwashere quit () |
05:58:01 | * | Guest27836 quit (Ping timeout: 250 seconds) |
06:00:23 | * | endragor quit (Remote host closed the connection) |
06:01:13 | * | silvernode joined #nim |
06:04:38 | * | dadada__ joined #nim |
06:10:21 | * | endragor joined #nim |
06:10:23 | silvernode | Good morning |
06:10:32 | silvernode | time to work on the game again |
06:20:19 | silvernode | So my code is using a lot of if statements and some while loops, but I know more experienced programmers here might have better syntax replacements for those to make the clode cleaner and more reliable. |
06:20:24 | * | narimiran joined #nim |
06:21:15 | silvernode | I figured I should ask for guidence before I get too deep into my project |
06:28:00 | * | dadada__ quit (Ping timeout: 256 seconds) |
06:34:41 | * | dadada joined #nim |
06:35:05 | * | dadada is now known as Guest97938 |
06:39:18 | * | solitudesf joined #nim |
06:57:49 | * | silvernode quit (Ping timeout: 250 seconds) |
06:58:15 | * | Guest97938 quit (Ping timeout: 250 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:03:46 | FromDiscord | <Benumbed> Ifs aren't necessarily bad, it's if they're nested and how deep |
07:04:02 | FromDiscord | <Benumbed> You get into branch predictor performance at that point |
07:04:41 | * | dadada__ joined #nim |
07:04:55 | * | gmpreussner joined #nim |
07:05:21 | FromDiscord | <Benumbed> Loops also aren't bad (and are very much expected in games) it's whether those loops are in your main game loop, and if they are, how optimized they are |
07:06:10 | FromDiscord | <Benumbed> In fact that's generally the advice I give to people about performance, at least until you're ready to optimize: If it's not in the tight loop (the game loop), don't worry about it |
07:06:32 | FromDiscord | <Benumbed> If it's in the tight loop, just make sure it's only doing exactly what it needs to do in order to accomplish the goal |
07:06:45 | FromDiscord | <Benumbed> and with that I'll shut up, because this is #general not #offtopic 🙂 |
07:12:03 | * | dddddd quit (Remote host closed the connection) |
07:28:09 | * | dadada__ quit (Ping timeout: 250 seconds) |
07:34:38 | * | dadada joined #nim |
07:35:01 | * | dadada is now known as Guest56251 |
07:36:22 | * | sealmove quit (Quit: WeeChat 2.7.1) |
07:39:13 | * | crem quit (Ping timeout: 246 seconds) |
07:40:25 | * | crem joined #nim |
07:59:34 | * | PMunch joined #nim |
08:12:17 | * | Vladar joined #nim |
08:24:51 | * | PMunch quit (Quit: leaving) |
08:27:46 | * | PMunch joined #nim |
08:42:07 | PMunch | Anyone know of a cross platform way to get the MAC address of the different network cards installed in a machine? |
08:47:32 | * | chemist69 quit (Ping timeout: 246 seconds) |
08:48:40 | * | chemist69 joined #nim |
09:08:07 | * | dwdv joined #nim |
09:37:54 | * | krux02 joined #nim |
09:55:32 | PMunch | Hmm, I seriously can't find an RSA library for Nim. Is that really the case? |
09:56:34 | PMunch | I found a program called NimChat that has it, but it also has a huge "DO NOT USE THIS FOR SECURITY" at the top.. |
10:25:55 | * | tane joined #nim |
10:31:34 | FromGitter | <timotheecour> Hi @araq are you here? i’m trying to understand your comment |
10:34:13 | Araq | hi |
10:35:23 | FromGitter | <timotheecour> so what do u mean by https://github.com/nim-lang/Nim/pull/12076#issuecomment-603152631 ? |
10:35:26 | disbot | ➥ `resolveSymbol(foo(args))` and `overloadExists(foo(args))` to return symbol after overload resolution ; snippet at 12https://play.nim-lang.org/#ix=2f86 |
10:36:13 | lqdev[m] | I suppose https://github.com/cheatfate/asynctools is dead? |
10:36:26 | lqdev[m] | issues are not responded to, PRs are not getting merged |
10:36:43 | Araq | cheatfate is busy with Chronos |
10:36:59 | lqdev[m] | right |
10:37:10 | Araq | fork it |
10:38:02 | Araq | timotheecour: I'm refering to the RFC that justifies your implemented feature |
10:39:00 | FromGitter | <timotheecour> so with `resolveSymbol` that I’ve implemented , I get `overloadExists` for free |
10:39:30 | Araq | how? |
10:39:35 | FromGitter | <timotheecour> and the reverse is not possible, if i only had an alternative implementation that did `overloadExists`, i could not get resolveSymbol |
10:40:02 | FromGitter | <timotheecour> look at the extensive test suite: https://github.com/nim-lang/Nim/pull/12076/files#diff-9a85c49130f34040ffe2ca65f07eddf9 |
10:40:04 | disbot | ➥ `resolveSymbol(foo(args))` and `overloadExists(foo(args))` to return symbol after overload resolution ; snippet at 12https://play.nim-lang.org/#ix=2f86 |
10:40:45 | Araq | ah |
10:41:12 | Araq | but then const newName = resolveSymbol f(1) |
10:41:32 | Araq | is unreliable, isn't it? as it can return NimNode(nil) or something like that |
10:43:35 | FromGitter | <timotheecour> but `overloadExists(f(1))` would return the correct thing (true or false) depending on whether `f(1)` would sigmatch or not |
10:44:04 | Araq | yeah I understand |
10:44:28 | lqdev[m] | https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/osproc.nim#L1059 doesn't the process here have to be killed, or something? closing its streams seems not enough. |
10:44:59 | Araq | lqdev[m], it's not "kill" the process |
10:45:31 | Araq | well we replace system.compiles because it's too powerful and here you are implemeting overloadExists with something more powerful |
10:45:32 | lqdev[m] | I know, but just leaving the Pid handle as is feels… wrong |
10:45:33 | FromGitter | <timotheecour> There are many applications to `resolveSymbol` besides `overloadExists`, eg it’s super useful for debugging as u get access to the file:line where an overload (or field!) is defined |
10:46:25 | FromGitter | <timotheecour> overloadExists (and resolveSymbol) is cheaper than compiles, bc it doesn’t semcheck the proc body |
10:46:59 | Araq | today's Nim supports "select overload" via a type conversion much like C++ does |
10:47:07 | FromGitter | <timotheecour> and it’s by design. so u can have `compiles(foo(1))` return false yet `overloadExists(foo(1)` return true |
10:50:04 | FromGitter | <timotheecour> Basically, almost all cases of `compiles(expr)` ins stdlib can be replaced by `overloadExists(expr)`, and it will be faster to compile and also less error prone (in case a bug is in the body, it will give a CT error instead of silently ignoring it). That leaves some unittests that DO require `compiles`. |
10:59:37 | Araq | I want overloadExists, fieldExists and canImport though, IMHO resolveSymbol is code obfuscation |
11:00:28 | Araq | and the nil-stateof resolveSymbol is particularly troublesome |
11:08:26 | * | narimiran quit (Ping timeout: 256 seconds) |
11:20:14 | * | couven92 joined #nim |
11:21:13 | * | narimiran joined #nim |
11:21:57 | narimiran | ANOUNCEMENT: A new beta of v1.2 is available from nightlies: https://github.com/nim-lang/nightlies/releases/tag/2020-03-24-version-1-2-c8f1ac3 |
11:21:59 | narimiran | Please give it a try ASAP and report any regression you might find. Thank you in advance! |
11:35:30 | * | luis_ joined #nim |
11:58:12 | * | dddddd joined #nim |
12:07:44 | * | narimiran quit (Ping timeout: 246 seconds) |
12:08:43 | * | lritter joined #nim |
12:08:50 | * | Tungki joined #nim |
12:26:00 | * | natrys joined #nim |
12:28:01 | * | arecaceae quit (Remote host closed the connection) |
12:28:24 | * | arecaceae joined #nim |
12:39:43 | * | narimiran joined #nim |
12:41:19 | * | endragor quit (Remote host closed the connection) |
12:41:43 | * | clyybber joined #nim |
12:57:57 | jken | I have some code.. for i in 0..<mesh.vertexCount: mesh.vertices[i] |
12:58:12 | jken | Tells me: cannot evalute i at compile time |
12:58:58 | jken | I think its because mesh.vertices is a ptr to a TVector3d |
12:59:07 | jken | and TVector3d is a tuple[x, y, z: cfloat] |
12:59:20 | jken | Anyone know how I can get around this? |
13:04:13 | clyybber | Ha, I had this issue too just some time ago |
13:04:21 | clyybber | The issue is that vertices is a pointer yeah |
13:04:56 | clyybber | Try defining a `[]` overload for the ptr T |
13:04:59 | clyybber | Thats what I did |
13:05:39 | clyybber | Weirdly enough it didn't work with the normal syntax in some cases and I had to resort to calling it manually like `[]`(mesh.vertices, i) |
13:05:56 | clyybber | jken: Are you writing an assimp loader? |
13:06:16 | jken | clyybber: I am trying to use this loader: https://github.com/barcharcraz/nim-assimp/blob/master/assimp.nim |
13:06:51 | jken | Had to make some other changes to that package to make it work with modern nim |
13:06:55 | jken | but all minor |
13:07:14 | clyybber | Yeah, I used exactly that one too |
13:07:24 | clyybber | I can give you my version |
13:07:28 | clyybber | Its already finished |
13:07:33 | clyybber | Its about 3 days old |
13:07:34 | jken | Ill definitely take a look! |
13:07:48 | clyybber | What a coincidence haha |
13:08:27 | clyybber | jken: http://ix.io/2f8O |
13:08:33 | jken | Thank you |
13:08:37 | clyybber | np |
13:09:02 | clyybber | the sassimp version it wraps is a bit old tho I think |
13:09:17 | clyybber | I just needed it to test my engine a bit |
13:09:53 | Araq | finally managed to build z3.dll |
13:10:00 | Araq | but it's 32bits *sigh* |
13:10:17 | clyybber | Nice tho |
13:10:38 | clyybber | Araq: Is there no way to import seqs_v2 ? |
13:10:58 | clyybber | From usercode I mean |
13:11:10 | clyybber | To translate things like cast[pointer](someSeq) |
13:12:08 | Araq | there is no way to import seqs_v2 |
13:12:12 | Araq | but it's worse than that |
13:12:29 | Araq | this cast cannot possibly be supported since a seq now is two machine words |
13:12:43 | clyybber | Yeah, I just translate it as |
13:12:52 | clyybber | cast[NimSeqV2](x).p |
13:13:15 | clyybber | Like like comparisions.nim does |
13:13:28 | jken | clyybber: can I see your code where you actually work with the vertices? |
13:13:37 | PMunch | Hmm, I tried to use stint to do RSA with a 2048-bit key. Works fine with `message_int.powmod(d, n)`, but it takes a solid 4 seconds to run.. |
13:13:58 | clyybber | jken: I don't have it anymore :/ |
13:14:06 | jken | ah no worries |
13:14:09 | clyybber | Actually, lemme check |
13:14:22 | clyybber | I use btrfs so I may be able to recover it |
13:15:14 | clyybber | Hmm, looks like its already gone, sorry |
13:15:28 | jken | That's okay, thank you |
13:15:51 | clyybber | np |
13:20:26 | FromDiscord | <onelivesleft> hey, I'm doing this: ``` |
13:20:26 | FromDiscord | <onelivesleft> let exe_filename = current_source_path().extract_filename.change_file_ext("")``` |
13:20:26 | FromDiscord | <onelivesleft> to find the name of the compiling nim file, but it gives me the name of *my* nim file, not the file which is importing it. I want the name of the end executable: is that possible? |
13:21:00 | PMunch | Hmm, def-'s bigint library does it in about 2.7s |
13:21:07 | PMunch | So that's better at least.. |
13:22:56 | Araq | clyybber, that loses the length information though |
13:23:27 | jken | clyybber: sorry to bother, even in your impl mesh.vertices is a ptr to a single tuple, is the assumption that the rest of the vertices (tuples) are stored linearly in memory from there? How the f do I iterate that in nim :/ |
13:23:54 | Araq | jken, cast to 'ptr UncheckedArray[...]' |
13:23:54 | * | zacharycarter joined #nim |
13:24:15 | jken | ahh |
13:25:48 | clyybber | Araq: Yeah, I'm just looking to translate cast[pointer](someSeq) |
13:25:56 | PMunch | Hmm, with -d:danger and --gc:markandsweep I get bigints down to 1.6s |
13:26:37 | * | luis_ quit (Ping timeout: 260 seconds) |
13:27:25 | clyybber | What about mratsims one? |
13:28:19 | PMunch | clyybber, was that for me? |
13:28:48 | jken | thanks Araq |
13:29:30 | clyybber | PMunch: Yeah :D |
13:29:45 | PMunch | Which one are you thinking about? |
13:31:52 | PMunch | Just realised that the bigints example I found created its own powmod implementation.. |
13:31:55 | clyybber | I remember he sent you one |
13:32:04 | clyybber | Oh |
13:32:07 | PMunch | He sent me one? When? |
13:32:30 | clyybber | It was probably the powmod impl then |
13:32:37 | clyybber | Don't mind me :) |
13:33:00 | PMunch | Oh no, that was something I randomly stumbled upon on Rosetta Code :P |
13:35:27 | PMunch | When did mratsim send me one? |
13:36:22 | PMunch | Oooh, --gc:arc took it down to 0.9s :D |
13:36:59 | PMunch | Not sure if the rest of my code will work with it though.. |
13:39:17 | FromGitter | <Vindaar> I love when procrastination produces pretty results :D |
13:39:32 | FromGitter | <Vindaar> (https://files.gitter.im/nim-lang/Nim/6EaO/periodic_table.png) |
13:39:50 | FromGitter | <Vindaar> which is just an adaption of: https://plotnine.readthedocs.io/en/stable/generated/plotnine.geoms.geom_tile.html |
13:39:58 | clyybber | PMunch: Sorry I can't remember when that was |
13:40:24 | clyybber | I think it was the last time we talked about stacklang, rationals and arbitrary precision |
13:40:43 | clyybber | Vindaar: Nice |
13:41:25 | FromGitter | <Vindaar> thanks! |
13:41:30 | clyybber | Araq: Its getting close: https://github.com/nim-lang/Nim/pull/13741 |
13:41:31 | disbot | ➥ Fix vm.nim for --gc:arc |
13:41:33 | PMunch | Hmm |
13:42:58 | PMunch | Ey @gogolxdong, going back through the IRC logs I see that you've launched a full stack Nim project. Super cool! |
13:43:08 | PMunch | Especially that line count reduction :P |
13:43:12 | * | clyybber quit (Read error: Connection reset by peer) |
13:43:13 | * | clyybber1 joined #nim |
13:43:25 | PMunch | reference: https://irclogs.nim-lang.org/23-03-2020.html#06:33:03 |
13:43:31 | FromGitter | <gogolxdong> oh, thanks. |
13:45:25 | clyybber1 | nice |
13:46:57 | PMunch | Crap, I think that might've been over in #nim-offtopic clyybber1.. |
13:47:10 | PMunch | Went back a while in the logs and couldn't find it.. |
13:47:42 | clyybber1 | Hmm, yeah I think it was in offtopic |
13:47:54 | clyybber1 | You might be able to find it on gitter nim-lang/twitch |
13:48:10 | PMunch | gogolxdong, huh never heard of prologue before. Why was hat chosen over Jester? |
13:48:26 | PMunch | clyybber1, oh right :P |
13:49:40 | FromGitter | <sheerluck> is today a release day |
13:49:58 | clyybber1 | think so |
13:50:06 | krux02 | wasn't yesterday release day? |
13:50:11 | PMunch | What's the coolest new feature in 1.2.0? |
13:50:24 | narimiran | PMunch: arc and new sugar macros, IMO |
13:50:53 | PMunch | Oh arc is shipping? Cool! |
13:50:59 | PMunch | Sugar macros? |
13:51:08 | narimiran | `collect` and `dup` |
13:51:43 | PMunch | Oh neat, I used dup the other day for... something.. |
13:51:46 | FromGitter | <gogolxdong> Used Jester for static file server only, when I decided to migrate websocket apis to http apis , one core member of Chinese community was working on his prologue, I just want to try, it's not perfect, but works. |
13:52:35 | PMunch | Differences between that and Jester? Pros, cons? |
13:52:57 | PMunch | I'm half-way through writing my own web-framework thingamajig so I'm interested :P |
13:53:12 | PMunch | Huh, thingamajig passes my spellchecker |
13:53:28 | FromGitter | <sheerluck> https://nim-lang.org/docs/whatsnew/1.2.0.html This article explains the new features in Nim 1.2.0, compared to 1.0.6. |
13:53:42 | FromGitter | <sheerluck> but it's not ready yet |
13:54:03 | FromGitter | <gogolxdong> Haven't try to migrate to Jester, prologue works for now. Want to encourage more people to work on Nim? :) |
13:55:49 | PMunch | Ah right, I was just wondering if you had made any interesting observations :) Have you used Jester for anything previously? More people using Nim is always good :D |
13:58:53 | Araq | sheerluck: it's delayed once again due to regressions |
14:00:38 | FromGitter | <gogolxdong> Used Jester for static file server and upload, apis were in websocket protocol previously, haven't used Jester too much so far. |
14:09:39 | PMunch | clyybber1, I found the conversation you were talking about. mratsim mention that bigints is slow, and that's why they made stint. But in my test bigints outperformed stint by about a factor of two.. |
14:10:38 | Araq | PMunch, benchmarking is hard though :P |
14:11:08 | PMunch | Well, my benchmark is just take a private/public keypair and do some powmod on a random string |
14:11:18 | PMunch | Converted to an int of course |
14:18:14 | FromGitter | <alehander92> Araq you want sourcemaps? for 1.4? |
14:20:14 | Araq | yeah |
14:20:17 | * | Zevv joined #nim |
14:21:37 | FromGitter | <alehander92> ok! |
14:22:19 | * | NimBot joined #nim |
14:23:55 | Zevv | Araq: crashes on me too |
14:25:12 | Araq | ok good |
14:26:38 | * | couven92 quit (Quit: Client Disconnecting) |
14:30:14 | * | jwm224 quit (Quit: WeeChat 2.8-dev) |
14:31:27 | Araq | https://www.twitch.tv/araq4k |
14:31:58 | * | jwm224 joined #nim |
14:32:06 | FromGitter | <kennymalac> @shashlick you there? kinda confused on linking bson library to mongo |
14:32:37 | * | fanta1 joined #nim |
14:33:21 | Araq | I'm streaming! |
14:37:04 | axion | Is there anything builtin or some utility library that will map all permutations of some container with repetitions? |
14:40:06 | shashlick | what's up |
14:40:33 | PMunch | mratsim, any hints on doing powmod in constantine? |
14:46:18 | FromGitter | <kennymalac> trying to follow libarchive sorta but I'm not sure if I'm doing it right |
14:46:19 | FromGitter | <kennymalac> just a sec |
14:48:09 | axion | hmm, not seeing anything. not quite sure how to write such a proc either |
14:48:58 | FromDiscord | <clyybber> @mratsim forwarding PMunch's ping |
14:49:16 | PMunch | Doesn't the bridges auto-add @? |
14:49:25 | FromDiscord | <mratsim> it's broken |
14:49:32 | PMunch | Ah.. |
14:50:13 | FromDiscord | <mratsim> you need to convert the bigint to montgomery domain and then call that: https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/bigints.nim#L315-L367 |
14:50:26 | clyybber1 | thats the one I meant! |
14:50:36 | FromDiscord | <mratsim> easier to just use finite field: https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/finite_fields.nim#L164-L215 |
14:51:06 | FromDiscord | <mratsim> example: https://github.com/mratsim/constantine/blob/master/tests/test_finite_fields_powinv.nim#L17 |
14:51:18 | FromGitter | <kennymalac> @shashlick latest commit pushed to https://github.com/ParadigmInteractive/libmongonim |
14:51:25 | FromDiscord | <mratsim> that said, the bigint/modular part of constantine are meant to be internal |
14:51:59 | FromGitter | <kennymalac> the mongo CMakeLists is more complex than libarchive's and doesn't seem to have configuration for an external bson library linked |
14:52:30 | FromGitter | <kennymalac> so I'm not even sure if any of these flags are doing anything |
14:52:43 | FromGitter | <kennymalac> hence why I try this ("target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_STATIC_LIBRARIES})", "target_link_libraries (mongoc_static ${STATIC_LIBRARIES} \"{bsonPath}\"") |
14:52:43 | shashlick | you might need to look at the cmakelist file and figure out how to point to the bson directory |
14:52:46 | FromGitter | <kennymalac> probably unnecessary |
14:53:38 | FromGitter | <kennymalac> yeah I tried to change the link_libraries to refer to the bsonPath directly for the static mongoc target |
14:53:41 | FromGitter | <kennymalac> and remove the shared lib |
14:54:13 | PMunch | Well fuck me.. Tried doing what I need in C# and it took 1ms.. |
14:54:25 | PMunch | I think I better find an actual library that can do this for me.. |
14:54:59 | FromGitter | <kennymalac> personally for web stuff in Nim we are using nginx-link-function and the associated nim wrapper, works great :) |
14:55:03 | FromDiscord | <onelivesleft> Does nim have a built in function to convert camelCase to snake_case? I'm working with macros and it would be nice to handle both situations. |
14:55:06 | FromGitter | <kennymalac> a bit low level though |
14:55:39 | FromDiscord | <mratsim> use eqIdent for comparison in macros |
14:55:58 | FromDiscord | <mratsim> otherwise AFAIK I did not find a "normalization" proc |
14:56:13 | FromDiscord | <onelivesleft> ty |
14:56:36 | shashlick | kennymalac: be right back |
14:56:53 | PMunch | But seriously, is there no RSA library in Nim? Wrapped or otherwise? |
14:57:00 | * | Vladar quit (Quit: Leaving) |
14:57:28 | FromGitter | <kennymalac> kk |
14:58:48 | axion | Well this roadblock is gonna take me some time to figure out :/ |
15:00:07 | FromGitter | <kennymalac> @shashlick line 29 should be lcm = outdir / "src" / "libmongoc" / "CMakeLists.txt" |
15:00:21 | FromGitter | <kennymalac> but my multireplace doesn't seem to work |
15:02:14 | FromGitter | <kennymalac> well, if i open the file it appears it didn't replace anything |
15:02:49 | FromDiscord | <mratsim> @PMunch, we use bearssl |
15:03:50 | FromDiscord | <mratsim> also if you use modular exponentiation for RSA, you need to ensure that the modular exponentiation routine is constant-time or at least uses exponent blinding to avoid leaking your secret key |
15:04:49 | PMunch | For doing just RSA encryption? I guess that's an option.. |
15:04:54 | PMunch | Is there a good wrapper for it? |
15:05:11 | FromDiscord | <mratsim> https://github.com/status-im/nim-bearssl |
15:05:20 | FromDiscord | <mratsim> it's undocumented |
15:05:45 | FromDiscord | <mratsim> grep for RSA here: https://github.com/status-im/nim-bearssl/blob/master/bearssl/decls.nim |
15:05:52 | shashlick | kennymalac: you don't need full path for getHeader - it searches for the header file |
15:06:15 | PMunch | mratsim, already grepping :D |
15:06:25 | FromDiscord | <mratsim> usage is somewhere in https://github.com/status-im/nim-eth/tree/master/eth/p2p or https://github.com/status-im/nim-libp2p |
15:06:37 | FromDiscord | <mratsim> BearSSL docs also apply |
15:06:42 | * | fanta1 quit (Quit: fanta1) |
15:09:02 | FromGitter | <kennymalac> good to know @shashlick but the mongo header is pretty deeply nested so better safe than walk 10+ dirs lol |
15:09:21 | shashlick | no loss sure |
15:09:42 | FromGitter | <kennymalac> but yeah doesn't seem it's multireplacing on the file |
15:09:47 | FromGitter | <kennymalac> the CMakeLists.txt |
15:09:48 | * | sealmove joined #nim |
15:11:23 | sealmove | Making a Kaitai Struct backend for Nim is impossible T_T. The code generation architecture is designed for languages that support nested classes or at least some type of namespacing. |
15:11:52 | FromDiscord | <mratsim> can't you simulate namespacing with gensym? |
15:14:16 | axion | is there a proc existing somewhere that when given the string "ab" and a count of 3, will produce all permutations with repetitions allowed. Something like: @["aaa", "aab", "aba", "abb", "baa", "bab", "bba", "bbb"] |
15:14:52 | FromDiscord | <mratsim> in algorithm there is a product that give you the cartesian product of 2 sequences |
15:14:55 | FromDiscord | <mratsim> you can apply it twice |
15:15:16 | FromDiscord | <mratsim> otherwise triple for loop |
15:15:30 | shashlick | kennymalac: how are you compiling this - command line |
15:15:39 | axion | can you give an example of the former method? |
15:16:07 | FromDiscord | <mratsim> See there: https://nim-lang.org/docs/algorithm.html#product%2CopenArray%5Bseq%5BT%5D%5BT%5D%5D |
15:16:11 | FromGitter | <kennymalac> nim c --run -d:mongocGit -d:bsonGit libmongonim.nim --verbose > test |
15:16:41 | FromDiscord | <mratsim> ah, it gives your sequences of sequences, it doesn't merge them so you will have to apply a join |
15:16:49 | FromDiscord | <mratsim> probably better to triple for loop |
15:17:44 | FromGitter | <kennymalac> oh shit lol changed it to -d:bsonStatic and it works |
15:18:02 | FromGitter | <kennymalac> well, that problem was averted |
15:18:17 | FromGitter | <kennymalac> now there is a different error |
15:18:46 | sealmove | @mratsim: Maybe, I don't know. But let me try to describe you exactly the problem. I am given some filled in data structures (from parsing of a yaml which is done for me) and a code skeleton (a class named "ClassCompiler"), so I have to make "NimCompiler extends ClassCompiler". These datastructures and the code skeleton are setup in a way that you need namespaces to produce code, because for example |
15:18:48 | sealmove | you have a structure called "DataType" which does not retain info for parent types/classes. |
15:19:15 | shashlick | i'm able to cmake both libs with your code |
15:19:22 | shashlick | it fails because bson/bson.h is missing |
15:19:44 | shashlick | you just need that cIncludeDir call |
15:20:47 | sealmove | so mratsis my problem is not emulating namespaces, but using the given code to produce these emulated namespaces... |
15:22:48 | FromGitter | <kennymalac> you're not getting this error? |
15:22:49 | FromGitter | <kennymalac> /home/kenster/.choosenim/toolchains/nim-1.0.6/lib/system/fatal.nim(39, 5) Error: unhandled exception: /home/kenster/.nimble/pkgs/nimterop-0.4.4/nimterop/build.nim(621, 12) `findFile(check, path, regex = regex).len != 0` # make failed [AssertionError] |
15:23:04 | axion | thanks |
15:23:36 | shashlick | nope |
15:23:45 | PMunch | Hmm, the rsa.nim module in nim-libp2p has verify and sign, but no encrypt and decrypt |
15:23:57 | FromGitter | <kennymalac> hmm what changes did you make? are you running with bsonGit or bsonStatic? |
15:24:10 | shashlick | before the cImport calls in mongo.nim, I had to add **`cIncludeDir(bsonPath.parentDir().parentDir())`** and **`cIncludeDir(baseDir / "build" / "buildcache" / "src" / "libmongoc" / "src" / "mongoc")`** |
15:24:15 | PMunch | There is a br_ssl_rsa_decrypt in BearSSL, but no _encrypt equivalent.. |
15:24:18 | shashlick | just bsonGit |
15:24:25 | shashlick | no other changes from your repo |
15:24:29 | axion | @mratsim so in this case the count is an argument to the function, so i'd need a macro right? |
15:25:03 | shashlick | of course now there's some cOverride work that's needed in mongo.nim - `Error: undeclared identifier: 'iovec'` |
15:25:21 | shashlick | but you could try the `flags = "-s"` and see if it is good enough |
15:25:36 | shashlick | stub out missing symbols and then hand-wrap only the ones you really need |
15:26:42 | * | Vladar joined #nim |
15:26:50 | FromGitter | <kennymalac> right |
15:26:57 | FromGitter | <kennymalac> what's the flags = "-s" ? |
15:27:04 | shashlick | doesn't look like your mongocPreBuild() is getting used |
15:27:07 | shashlick | toast -h |
15:27:36 | shashlick | `-s, --stub bool false stub out undefined type references as objects` |
15:28:57 | * | silvernode joined #nim |
15:29:26 | FromGitter | <kennymalac> yeah now it says something about invalid indention |
15:30:17 | FromGitter | <kennymalac> oh looks like it halted |
15:32:10 | shashlick | i tried -s and looks like mongocLPath is not defined |
15:35:13 | FromGitter | <kennymalac> I guess -s is getting rid of a lot of necessary structs, so I'll generate iovec and other failing structs |
15:37:06 | shashlick | at least it tells you what stuff to stub so you can put it in cOverride |
15:38:38 | * | silvernode quit (Ping timeout: 264 seconds) |
15:39:14 | shashlick | basically iovec, sockaddr and addrinfo in my case |
15:39:36 | shashlick | stub doesn't know what stuff is already declared in bson and other places since toast runs in isolation |
15:39:51 | shashlick | needs some improvement there |
15:42:23 | FromGitter | <kennymalac> what's the pragma for using c def from header |
15:42:29 | FromGitter | <kennymalac> iovec* {.importc,header:"<sys/uio.h>".} = ? |
15:43:12 | shashlick | object |
15:43:37 | shashlick | it compiles for me now but I don't think your mongocPreBuild was ever run |
15:44:42 | FromGitter | <kennymalac> why was it not ? curious |
15:44:44 | disruptek | !last zevv |
15:44:45 | disbot | Zevv spoke in 12#nim 80 minutes ago |
15:44:50 | disruptek | oh shoot |
15:44:52 | FromGitter | <kennymalac> oh. can you paste the working version |
15:45:01 | disruptek | we need you on araq's stream. |
15:49:13 | FromGitter | <kennymalac> @shashlick do you know why libarchive disables shared library anyway ? was just kinda following in its footsteps there with the prebuild, lol |
15:53:44 | FromGitter | <kennymalac> okay got it working :) |
15:54:31 | FromGitter | <zetashift> `stack\dev\naytracer\tests\tmatrix.nim(74, 24): Check failed: (m1 * aTuple) ⏎ == initTuple(18.0, 24.0, 18.0, 18.0) ⏎ ⏎ ```initTuple(18.0, 24.0, 18.0, 18.0) was 18.0 24.0 18.0 18.0``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5e7a2d37f71b3f0d25f30829] |
15:55:24 | FromGitter | <kennymalac> I mean the build, not prebuild |
16:04:27 | shashlick | kennymalac: i had some cmake issues with libarchive, plus didn't need it for my immediate needs so left it out |
16:04:50 | shashlick | there is an issue though - https://github.com/genotrance/nimarchive/issues/5 |
16:04:50 | disbot | ➥ Dynamic linking |
16:06:12 | FromGitter | <kennymalac> ah |
16:06:45 | shashlick | the wrappers i make typically need to work across all OS |
16:06:52 | shashlick | and getting autoconf working on windows is a nonstarter |
16:06:59 | shashlick | and not all libs have good cmake support |
16:07:10 | shashlick | have to do the best you can with these things |
16:13:07 | FromGitter | <kennymalac> shashlick any reason why nimble build fails with OSError? |
16:13:58 | FromGitter | <kennymalac> also the static test fails, not sure if the static lib is being output where it should be |
16:13:58 | FromGitter | <kennymalac> exec "nim c -d:mongocStatic -d:bsonStatic -p:.. -r tests/tlibmongonim.nim" |
16:16:22 | shashlick | you don't have any bin = [] defined, what should it build? |
16:16:50 | FromGitter | <kennymalac> oh right |
16:17:18 | shashlick | first test worked, but you haven't checked in tests/*tlibmongoc.nim* |
16:17:21 | FromGitter | <kennymalac> so if I add it as a project dependency it should just work if I import? |
16:17:32 | FromGitter | <kennymalac> yeah I changed that part |
16:17:43 | FromGitter | <kennymalac> but the static part doesn't work |
16:18:35 | shashlick | you still need the -d:bsonGit etc |
16:18:58 | FromGitter | <kennymalac> I tried with both |
16:19:20 | FromGitter | <kennymalac> same error |
16:19:39 | shashlick | nim c --d:mongocGit d:mongocStatic -d:bsonGit -d:bsonStatic -p:.. -r tests/tlibmongonim.nim |
16:20:56 | FromGitter | <kennymalac> yeah error :/ |
16:21:08 | shashlick | what's the error |
16:21:54 | FromGitter | <kennymalac> /home/kenster/.choosenim/toolchains/nim-1.0.6/lib/system/nimscript.nim(252, 7) Error: unhandled exception: FAILED: nim c -d:mongocGit -d:mongocStatic -d:bsonGit -d:bsonStatic -p:.. -r tests/tlibmongonim.nim [OSError] |
16:22:12 | FromGitter | <kennymalac> /home/kenster/.choosenim/toolchains/nim-1.0.6/lib/system/fatal.nim(39, 5) Error: unhandled exception: /home/kenster/.nimble/pkgs/nimterop-0.4.4/nimterop/build.nim(621, 12) `findFile(check, path, regex = regex).len != 0` # make failed [AssertionError] |
16:22:45 | shashlick | see nimgit2 wrapper |
16:23:03 | shashlick | in one case, the same cmake builds both static and dynamic libraries so they can coexist in the same directory |
16:23:17 | shashlick | libgit2 has different targets so i had to put them in different directories |
16:23:26 | shashlick | it's possible that's what's happening here |
16:23:28 | shashlick | but not sure |
16:23:55 | FromGitter | <kennymalac> oh okay |
16:24:32 | shashlick | basically when you run make, it looks for the library, if it is not found, it tries to compile |
16:24:40 | shashlick | which goes to 100% but no static library is found |
16:24:49 | shashlick | so either it has an unual name and isn't found |
16:24:51 | shashlick | or wasn't built |
16:26:10 | shashlick | looks like it was built |
16:26:18 | shashlick | but has an unusual name |
16:26:26 | shashlick | ./buildcache/src/libbson/libbson-static-1.0.a |
16:27:47 | shashlick | yep - the first `-` was not expected |
16:28:18 | shashlick | https://github.com/nimterop/nimterop/blob/master/nimterop/build.nim#L961 |
16:28:20 | FromGitter | <kennymalac> hmkay so -d:bsonStatic won't work |
16:28:33 | FromGitter | <kennymalac> yea |
16:29:34 | shashlick | just edit nimterop/build.nim and add a - in the [_]? and it will work |
16:30:39 | FromGitter | <kennymalac> lol okay, kinda means no one else can run my tests though without that in mind |
16:30:47 | FromGitter | <kennymalac> unless you are going to add -? |
16:30:56 | shashlick | yes i'll push it |
16:31:08 | shashlick | but i'm sitting on versioning a new release since i'm in the middle of a big feature |
16:31:20 | shashlick | so it might be a couple weeks worst case |
16:31:49 | FromGitter | <kennymalac> kk |
16:32:35 | FromGitter | <matrixbot> `gphykos` Hello there |
16:33:09 | shashlick | Araq: is {.bycopy.} mandatory for structs when passed to C procs? |
16:34:42 | shashlick | trying understand when {.bycopy.} should and should not be used |
16:37:14 | * | silvernode joined #nim |
16:42:33 | krux02 | shashlick, you should not require ever to add {.bycopy.} at all. |
16:44:54 | krux02 | Nim has it's own heuristics weather an object should be passed by copy or by reference. These heuristics might be wrong though. And they might even be changed in the future. So If you don't trust those compiler optimizations, or you know that it is wrong in your case, put bycopy or byref manually to the type. |
16:45:31 | shashlick | i'm trying to figure out what nimterop should do |
16:45:57 | shashlick | so what are the pragmas that should be present on types and unions by default |
16:46:07 | shashlick | i know c2nim puts in bycopy but am wondering why |
16:47:15 | krux02 | because that is the C behavior |
16:47:30 | krux02 | if you want 1:1 c behavior, everything should be by copy. |
16:47:45 | shashlick | how about C++ |
16:47:53 | krux02 | same |
16:48:03 | shashlick | okay good to know |
16:48:18 | shashlick | so the only real pragmas types need are bycopy and incompleteStruct where appropriate |
16:48:25 | shashlick | enums might need size |
16:49:01 | krux02 | well |
16:49:09 | krux02 | there are also bitfields |
16:49:22 | krux02 | (if you use them) |
16:51:33 | silvernode | Apparently the stiulus bill includes a new digital dollar concept. Things are starting to get srange, I don't know what to think anymore. |
16:51:53 | silvernode | stimulus* |
16:51:55 | FromGitter | <kennymalac> it was scrubbed |
16:52:10 | silvernode | Well that's good |
16:52:43 | FromDiscord | <Recruit_main707> is it possible to make nim specify the type of a function, but dont initialise result? |
16:53:58 | shashlick | krux02: will ping you when i get to specifics but thanks for the input |
16:54:19 | shashlick | have rewritten the nimterop backend to use the nim compiler so getting much better results with wrapping |
17:02:37 | * | silvernode quit (Ping timeout: 256 seconds) |
17:08:29 | * | liblq-dev joined #nim |
17:08:38 | leorize | so byaddr is a thing now? |
17:08:45 | leorize | and we're keeping the name? :p |
17:09:04 | disruptek | byaddr was never a problem. |
17:09:09 | disruptek | .byaddr was never a problem. |
17:10:16 | * | Trustable joined #nim |
17:10:52 | leorize | the documentation for it is lacking though |
17:13:42 | clyybber1 | leorize: Consider it experimental |
17:16:33 | shashlick | is there value in generating `proc name(a1: ptr cint)` and `proc name(a1: var cint)` wrappers from `void name(int *a1)` |
17:16:59 | leorize | might be confusing |
17:17:09 | leorize | I'd advice to just generate the ptr variant |
17:18:09 | leorize | you can only be certain in generating `var` if they have the nonnull attribute attached to them |
17:18:15 | FromGitter | <zetashift> I'm guessing I'm getting that error because of incorrectly checking for floating point equality |
17:18:55 | shashlick | okay will drop that idea |
17:19:24 | * | Tungki quit (Read error: Connection reset by peer) |
17:19:48 | * | Tungki joined #nim |
17:24:01 | FromGitter | <awr1> hello all |
17:25:21 | * | liblq-dev quit (Quit: Leaving) |
17:27:59 | FromDiscord | <Rika> hello |
17:28:55 | FromGitter | <zetashift> hiya |
17:28:56 | leorize[m] | o/ |
17:29:30 | * | liblq-dev joined #nim |
17:33:03 | * | nsf quit (Quit: WeeChat 2.7) |
17:35:22 | * | Tungki quit (Ping timeout: 252 seconds) |
17:35:48 | * | sealmove quit (Quit: WeeChat 2.7.1) |
17:37:03 | * | Trustable quit (Remote host closed the connection) |
17:37:59 | * | Trustable joined #nim |
17:41:33 | FromGitter | <awr1> so i was thinking about the enum thing and i pored over the AST1 and AST2 stuff in nimterop |
17:41:39 | Araq | shashlick, C wrappers should always use .bycopy |
17:42:34 | shashlick | cool |
17:42:54 | shashlick | aw1: curious on your feedback |
17:43:10 | FromGitter | <awr1> originally i thought maybe it should be AST2 exclusive but i was thinking more about it |
17:43:17 | shashlick | enum support is in newalgo-2 branch |
17:43:40 | * | Trustable quit (Remote host closed the connection) |
17:44:15 | shashlick | ast1 will be deprecated, i won't maintain it since ast2 will do all of it and much more |
17:44:39 | * | Trustable joined #nim |
17:45:01 | * | junland quit (*.net *.split) |
17:45:02 | * | vesper11 quit (*.net *.split) |
17:45:02 | * | shadowbane quit (*.net *.split) |
17:45:06 | * | liblq-dev quit (Quit: Leaving) |
17:45:19 | * | junland joined #nim |
17:45:35 | * | liblq-dev joined #nim |
17:45:39 | FromGitter | <awr1> but i think the best way to do this would be to implement it with a macro that does take in a typed const section which would require minimal changes to AST1. AST2 would also use the macro, emitting to the enumSection, and then do the semfold pass on the enum section exclusively as a kind of 'bonus' |
17:46:20 | FromGitter | <awr1> the semfold pass should be able to deal with the macro |
17:46:33 | * | shadowbane joined #nim |
17:47:01 | * | vesper11 joined #nim |
17:47:38 | * | mwbrown quit (Ping timeout: 264 seconds) |
17:47:58 | shashlick | if you can write code that can take a nim nkConstSection PNode and return an enum AST, will be great |
17:48:11 | shashlick | i don't intend doing anything for ast1 like I said |
17:48:33 | shashlick | and not a macro, by importing the compiler directly like i do in ast2 |
17:48:58 | shashlick | i don't yet know how to call semfold, i tried a bit when experimenting but it didn't work |
17:49:24 | FromGitter | <awr1> you're not planning on importing nimterop / types in AST2? |
17:49:55 | shashlick | it is being imported yes |
17:50:13 | * | mwbrown joined #nim |
17:50:17 | shashlick | check the newalgo-2 branch |
17:50:43 | FromGitter | <awr1> but you don't want to have the constSection PNode use a macro |
17:51:39 | FromGitter | <awr1> the semfold pass should execute any macro i believe |
17:52:18 | FromGitter | <awr1> so the actual nim code that a user ends up importing should be macroless |
17:52:27 | FromGitter | <awr1> but |
17:52:35 | FromGitter | <awr1> if you really didn't want to use a macro |
17:53:17 | shashlick | yes, so the idea is to first generate the const section, get it reduced with semfold and see if the const can be convered to a nim enum - reorder, no duplicates |
17:53:24 | * | leorize_m joined #nim |
17:53:33 | FromGitter | <awr1> what i think would have to happen is that, in our "proper enum" mode, you would have first emit the enumerator values as part of a special enum section to fold |
17:53:47 | FromGitter | <awr1> well yeah, that |
17:53:47 | * | leorize_m left #nim ("User left") |
17:54:17 | FromGitter | <awr1> you would need to have a deferred enum composition after you get the folds done |
17:54:19 | shashlick | so the code should do all that at runtime (toast is runtime) and returns an AST using the compiler directly, no macros |
17:54:25 | shashlick | yes |
17:57:53 | FromGitter | <awr1> well i think first your foldable consts can't have type conversions like it does in AST1 |
17:58:32 | shashlick | yes that's fair - we don't need anything in types - we can just treat everything as ints |
17:58:47 | shashlick | not sure how it will impact bitfields or size: xyz |
17:59:21 | shashlick | ideally we use it as is though so that if it cannot be reduced, we don't need to regenerate the const section with the conversions |
17:59:23 | FromGitter | <awr1> also, i see in what you get back from tree-sitter, `type_identifier?` |
17:59:29 | FromGitter | <awr1> and i forgot about anonymous enums |
17:59:34 | FromGitter | <awr1> plan on implementing them? or no |
18:00:11 | shashlick | https://github.com/nimterop/nimterop/blob/newalgo-2/nimterop/ast2.nim#L1036 |
18:00:26 | FromGitter | <awr1> ah i see |
18:01:00 | shashlick | hope ast2 is readable, original ast was too confusing and zero documentation |
18:01:07 | shashlick | was too hard to maintain |
18:01:23 | FromGitter | <awr1> yes ast1 was a little weird |
18:02:03 | FromGitter | <awr1> i think maybe this should be made an optional feature, i don't know if you want new enums by default |
18:02:13 | FromGitter | <awr1> say a --properEnums cmd line flag |
18:02:41 | shashlick | well, if it can be created as a pure enum, why do this const business |
18:02:51 | shashlick | people expect nim enums |
18:02:56 | shashlick | consts are a fallback |
18:03:05 | shashlick | so if it is possible, it should be nim enum |
18:03:12 | FromGitter | <awr1> my concern is people utilizing the old procedures that are generated with defineEnum() |
18:03:21 | FromGitter | <awr1> this would be a breaking change |
18:03:38 | shashlick | i'd say the defineEnum() stuff emulates standard enum behavior |
18:03:49 | shashlick | nim enum is more seamless than the consts |
18:03:57 | shashlick | it wouldn't break anyone |
18:04:03 | shashlick | why do you think it would? |
18:05:02 | FromGitter | <awr1> https://github.com/nimterop/nimterop/blob/newalgo-2/nimterop/types.nim#L33 |
18:05:09 | FromGitter | <awr1> these aren't defined for nim enums |
18:05:31 | shashlick | i'm sure you can add two nim enums |
18:06:19 | shashlick | wow, just tried - you cannot add two nim enums? |
18:06:34 | FromGitter | <awr1> https://play.nim-lang.org/#ix=2fae |
18:06:35 | FromGitter | <alehander92> well, you need to `.int` them |
18:06:35 | FromGitter | <awr1> yes |
18:06:36 | FromGitter | <alehander92> i guess |
18:06:47 | FromGitter | <alehander92> it's a good limitation |
18:06:53 | FromGitter | <alehander92> but yeah it can be surprising |
18:07:52 | shashlick | oh well, cannot do much about that - most people will expect a C enum to become a Nim enum and then realize you cannot add two of them |
18:08:03 | shashlick | meh |
18:08:13 | shashlick | Araq: any reason why this is the case? |
18:08:40 | shashlick | awr1: in this case, user would need to create those borrowed procs manually |
18:09:13 | shashlick | overall, the only benefit to nim enums is that you can print them |
18:09:23 | shashlick | but then you lose this behavior |
18:09:33 | shashlick | i'm wondering whether it is worth the effort |
18:10:00 | shashlick | and the time it will take to process each enum to check if it can be reduced |
18:12:34 | FromGitter | <awr1> i'd imagine its because nim enums are intended to be stronger, and without adding those procs you don't need to worry about holed enums. definitely |
18:12:47 | FromGitter | <awr1> the procs with |
18:13:16 | FromGitter | <awr1> e.g. `+` between an enum and int would be...sketchy for nim enums |
18:13:21 | FromGitter | <awr1> too C-ish |
18:14:16 | shashlick | you can set nim enums to specific values resulting in holes |
18:14:40 | FromGitter | <awr1> you can but it's not something to encourage |
18:15:23 | FromGitter | <awr1> > overall, the only benefit to nim enums is that you can print them |
18:15:36 | FromGitter | <awr1> you can for-loop through them |
18:15:41 | FromGitter | <awr1> you can use them in sets |
18:16:24 | shashlick | for loop, yes good one |
18:16:31 | shashlick | why cannot you use distinct ints in sets |
18:17:31 | FromGitter | <awr1> i mean you can try? |
18:17:39 | FromGitter | <awr1> you need to generate borrowed procs |
18:17:43 | FromGitter | <awr1> and use a smaller size |
18:17:51 | FromGitter | <awr1> e.g. int8 |
18:18:33 | FromGitter | <awr1> even then that has a wealth of possible issues |
18:18:53 | FromGitter | <awr1> you can't use distinct int verbatim in sets because int will be too large |
18:19:10 | shashlick | okay I cannot say I know what you are talking about |
18:19:16 | shashlick | so i'll take your word for it |
18:19:53 | FromGitter | <awr1> set[T] is basically a bitflag thingy underneath |
18:21:49 | FromGitter | <awr1> i mean you can have printable distinct ints too |
18:21:53 | FromGitter | <awr1> just don't borrow |
18:22:12 | FromGitter | <awr1> https://github.com/nimterop/nimterop/blob/newalgo-2/nimterop/types.nim#L67 |
18:22:29 | FromGitter | <awr1> this would be replaced by something more intelligent |
18:23:05 | shashlick | yes that's possible |
18:23:37 | FromGitter | <awr1> you could also get for-loops too and possibly set notation |
18:23:51 | FromGitter | <awr1> though it would be different from set[T] |
18:24:16 | shashlick | yep, can use in set if == and $ are defined for the distinct int |
18:25:05 | shashlick | ```https://play.nim-lang.org/#ix=2fan``` |
18:26:22 | FromGitter | <awr1> set[T] is different from hashSet |
18:27:53 | FromGitter | <awr1> i will meditate on this but maybe we will have to end up working on 'better distinct int' instead of using nim enums |
18:28:11 | shashlick | okay, Error: set is too large |
18:28:22 | shashlick | happy with any feedback on this |
18:28:40 | shashlick | and any other aspects of ast2 |
18:28:55 | FromGitter | <awr1> sure! |
18:29:09 | FromGitter | <dumjyl> One thing you lose with distinct int that is difficult to regain is case coverage. |
18:29:35 | shashlick | yes that's true as well |
18:30:23 | shashlick | i'm just wondering how applicable these concerns are when talking about C enums - are they really used in these ways? |
18:32:58 | FromGitter | <awr1> as an alternative to set[T] you can use Flag[T] by @mratsim |
18:33:21 | PMunch | Hmm, I'm getting an "unhandled exception: zlib version mismatch!" when trying to use the zip module.. |
18:33:26 | * | silvernode joined #nim |
18:34:28 | leorize | shashlick: are you trying the enum thing? |
18:35:26 | FromDiscord | <Spy653> What do you guys think of nim v rust for OS or general development |
18:36:04 | FromDiscord | <Recruit_main707> i have as much experience with OS than with rust |
18:36:18 | FromDiscord | <Spy653> Fair |
18:36:26 | FromGitter | <awr1> what do you mean OS development |
18:36:30 | FromGitter | <awr1> like kernels? |
18:36:42 | FromGitter | <awr1> or just general systems programming |
18:36:49 | FromDiscord | <Spy653> I'm thinking of using rust as my OS language and nim for applications |
18:37:20 | FromDiscord | <Spy653> OS Dev as in full systems not just kernels |
18:37:24 | FromDiscord | <Recruit_main707> nim can do OS if that helps, and with gc:arc it could be a really good option |
18:37:29 | krux02 | awr1: I din't write an os yet. Though I wrote once a scheduler. |
18:37:31 | * | silvernode quit (Client Quit) |
18:37:41 | krux02 | task switching on a microcontroller. |
18:37:50 | krux02 | This stuff is generally very low level. |
18:37:52 | FromGitter | <awr1> interesting |
18:37:52 | leorize | currently rust will be in a better shape, though Zevv is working on --os:any to help with writing standalone code |
18:37:55 | FromDiscord | <Recruit_main707> well, with OS i meant kernels and chips yeah |
18:37:55 | krux02 | You need assembly for it. |
18:38:25 | FromDiscord | <Spy653> I'm going to steal the Linux kernel lol can't be fucked to do kernel Dev, so much more effort |
18:38:39 | FromDiscord | <Spy653> It's free for a reason |
18:38:47 | leorize | lol then write everything with nim |
18:38:53 | krux02 | Most parts of an operating system can be written in a high level language, but there are always bits and pieces here and there that need low level stuff that isn't covered by high level languages such as C. |
18:39:58 | * | clyybber1 quit (Quit: WeeChat 2.7.1) |
18:40:27 | krux02 | but apart from these low level stuff, most of an operating system is just fluff around the low level features. THat can be written in any language. It is generally like application development. I though you could even write it in python if you want to. It would just such to have a kernel written in python. |
18:40:52 | krux02 | "I think" not "I though" |
18:41:15 | FromDiscord | <Rika> what's the best crossplatform gui lib again? |
18:41:32 | leorize | define best |
18:41:41 | FromDiscord | <Rika> uh, easiest |
18:41:41 | FromDiscord | <Rika> sorry |
18:41:50 | leorize | !repo nigui |
18:41:54 | FromDiscord | <Rika> nigui? okay |
18:42:02 | leorize | disbot: are you here? |
18:42:21 | FromDiscord | <Rika> dead |
18:42:21 | leorize | there's also karax if you wanna do electron :P |
18:42:22 | FromDiscord | <Rika> F |
18:42:27 | FromDiscord | <Rika> OH OH THATS GOOD |
18:42:35 | FromDiscord | <Rika> wait but i need FS access |
18:42:37 | FromDiscord | <Rika> hmm |
18:42:51 | FromDiscord | <Spy653> How does fltk rank with you guys |
18:43:02 | leorize | super low imo |
18:43:08 | leorize | I like native ui |
18:43:12 | FromDiscord | <Rika> it's C++ |
18:43:28 | leorize | by native I mean "native toolkit" |
18:43:29 | FromDiscord | <Rika> i also like native UI but i've seen how bad it looks in windows so im not sure anymore |
18:43:44 | leorize | gives everything a better uniforming look |
18:44:40 | FromDiscord | <Rika> i'd use Qt if there were good nim bindings or so |
18:44:41 | * | Vladar quit (Quit: Leaving) |
18:45:01 | FromDiscord | <Spy653> I like windows default, actually trying to look for one that emulates old school 2000s win UI |
18:45:06 | FromDiscord | <Rika> and if Qt Creator werent absolutely massive |
18:47:03 | leorize | the only complete Qt5 bindings for not-C++ that I've found are all backed by some corporate |
18:47:12 | FromDiscord | <Rika> is that good or bad |
18:47:14 | leorize | let's just say that people really don't want to wrap Qt |
18:47:38 | leorize | because compiling qt code requires running their preprocessor on your code |
18:47:59 | leorize | and obviously that preprocessor can only run on C++ code |
18:52:59 | FromDiscord | <Rika> wow that sounds like a pain |
18:53:25 | FromDiscord | <Rika> i guess i dont like Qt anymore |
18:57:29 | * | al_ joined #nim |
18:57:29 | * | al_ is now known as Guest94576 |
19:08:32 | * | rnrwashere joined #nim |
19:16:22 | * | rnrwashere quit (Remote host closed the connection) |
19:20:00 | shashlick | leorize: not yet - have many things to add that are higher priority |
19:20:09 | shashlick | but open to PRs |
19:22:40 | * | blueberrypie quit (Quit: leaving) |
19:22:55 | FromDiscord | <kodkuce> there is gtk thingy pmuch did i think i tryed it |
19:25:16 | * | rnrwashere joined #nim |
19:25:30 | * | blueberrypie joined #nim |
19:28:26 | Araq | leorize, --os:any is in 1.2 and production ready IMO |
19:29:05 | livcd | Rika: just find someone smart to write bindings for sciter :D |
19:31:54 | FromDiscord | <Recruit_main707> --os:any HYPE |
19:32:07 | FromDiscord | <Recruit_main707> btw Araq, i wanted to ask you something |
19:33:28 | FromDiscord | <Recruit_main707> i saw an interview where you said you planned Nim to be directly compiled without the intermediate C/C++ code, how would that affect interoperability? (and i guess things like emit would be deprecated) |
19:34:17 | FromGitter | <awr1> you should look at nlvm |
19:34:33 | FromGitter | <awr1> https://github.com/arnetheduck/nlvm |
19:35:12 | livcd | what is --os:any :O |
19:35:45 | FromGitter | <awr1> it already leverages the compiler for parsing purposes but produces LLVM bytecode instead |
19:35:58 | * | ptdel joined #nim |
19:42:11 | Araq | Recruit_main707: I was refering to nlvm |
19:44:22 | Araq | not sure how .emit can be supported but maybe we can extract it to a .c file and run clang over it |
19:44:59 | Zevv | leorize: Im not working on anything. |
19:45:04 | Araq | interop with C++'s templates is the biggest open question and that's why I'm getting quite some resistance |
19:45:08 | Zevv | its done and finished afaik |
19:45:47 | Araq | Zevv, you could work on SSO though or strings that support O(1) slicing |
19:45:51 | Araq | ;-) |
19:45:53 | Zevv | and I kind of dropped my nim work for now. I'm working my ass off so my customer can't decide to stop hiring me |
19:46:04 | Araq | ah yeah |
19:46:08 | FromDiscord | <Recruit_main707> Araq: very interesting solution, thank you and keep it up, one day if i get good enough ill try helping |
19:46:27 | Araq | that's a good reason, Zevv, good luck |
19:46:40 | Zevv | thanks! |
19:47:29 | Zevv | I guess I'm fine for now since i'm at this time the one keeping the project afloat. But of course the project can always be canceled, and employees go first over freelancers, of courhse |
19:47:34 | Zevv | (as they should) |
19:49:24 | Araq | so ... it's streaming time |
19:49:47 | leorize | stream! |
19:49:50 | leorize | where is it? :P |
19:50:16 | FromDiscord | <Recruit_main707> stream time :0 |
19:50:21 | Araq | where is disruptek though... |
19:50:45 | Zevv | !seen disruptek |
19:50:56 | shashlick | !last disruptek |
19:51:03 | FromDiscord | <Recruit_main707> he is gone?! |
19:51:05 | leorize | disbot is dead |
19:51:17 | FromDiscord | <Recruit_main707> ofc i meant disbot |
19:53:25 | * | Trustable quit (Remote host closed the connection) |
19:56:42 | Araq | https://www.twitch.tv/araq4k |
20:02:47 | * | rnrwashere quit (Remote host closed the connection) |
20:08:41 | * | Guest94576 quit (Quit: Guest94576) |
20:09:44 | FromGitter | <alehander92> ouu |
20:10:31 | liblq-dev | why is StringStream not available for the JS backend? |
20:14:12 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
20:14:13 | FromGitter | <alehander92> i guess no support for low level |
20:14:18 | FromGitter | <alehander92> not sure |
20:14:21 | * | liblq-dev joined #nim |
20:14:23 | leorize | I thought we fixed streams? |
20:14:51 | liblq-dev | maybe it's on devel, I'm referring to the stable doc |
20:15:11 | FromGitter | <alehander92> no idea |
20:15:15 | FromGitter | <alehander92> maybe its ok |
20:15:37 | liblq-dev | nope, the doc still says that StringStream is unavailable for the JS backend http://nim-lang.github.io/Nim/streams.html#StringStream |
20:16:08 | leorize | just try to use it |
20:16:10 | liblq-dev | maybe it's because they operate on pointers? |
20:16:33 | liblq-dev | I doubt they're supported under JS |
20:16:48 | leorize | pointers are supported under js by nim btw :) |
20:17:25 | FromDiscord | <Recruit_main707> dope! |
20:17:42 | livcd | what is drnim ? I am late :/ |
20:18:56 | livcd | and who besides Araq is talking ? |
20:21:48 | * | couven92 joined #nim |
20:33:39 | FromGitter | <kennymalac> okay, my nim mongo wrapper of mongo-c-driver works, but the interface is not so nice to use, lol https://github.com/ParadigmInteractive/libmongonim/blob/master/tests/tlibmongonim.nim |
20:33:47 | liblq-dev | is there any way of checking if a process's outputStream has any more data? |
20:34:02 | FromGitter | <kennymalac> @shashlick ^ feel free to give any suggestions :) |
20:34:06 | liblq-dev | p.outputStream.atEnd always returns false from me |
20:34:10 | liblq-dev | s/from/for |
20:34:35 | liblq-dev | which makes sense, since the stream is *not* at end |
20:34:39 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
20:35:44 | FromGitter | <kennymalac> I should probably replace all class name methods such as collection_insert_one with insert_one etc. |
20:44:49 | * | sleepyqt quit (Ping timeout: 256 seconds) |
20:46:14 | * | sleepyqt joined #nim |
20:46:38 | shashlick | ya nim wrappers of C libraries don't have the most pleasant APIs |
20:47:12 | shashlick | in theory, some pretty API could also be generated with the raw wrappers but i haven't spent any real time thinking about it |
20:47:25 | shashlick | not sure if it is possible but it is a dream |
20:48:06 | shashlick | see the nimarchive.nimble file for how to generate docs |
20:50:45 | FromGitter | <kennymalac> well, for a start, I noticed that it lets me pass nim strings into the procs, but I have to specify the length of the string |
20:51:21 | FromGitter | <kennymalac> any reason that's the case? I'd rather just do doc.bson_append_utf8(cstring("hello"), cstring("world")) |
20:51:28 | FromDiscord | <Rika> ive heard that nim strings are just cstrings with a length field |
20:51:29 | FromGitter | <kennymalac> rather than doc.bson_append_utf8("hello", 5, "world", 5) |
20:51:58 | FromGitter | <kennymalac> or "hello".len, ofc |
20:52:09 | FromDiscord | <Rika> you can always change the code of the wrapper cant you |
20:52:31 | FromGitter | <kennymalac> yeah I could, but it says like 120k lines of code were processed, it's a huge library |
20:52:42 | * | waleee-cl joined #nim |
20:53:00 | leorize | Nim can't magically figure out how to pass the length |
20:53:01 | FromDiscord | <Rika> i dont think theres another way unless you can macro it |
20:53:05 | FromGitter | <kennymalac> I'm sure the apis aren't going to be changing drastically though, so I could make a high level API on top I guess |
20:53:19 | leorize | yea, make a high level api on top of it :) |
20:53:22 | FromGitter | <kennymalac> well the C api doesn't need the length, just a C string |
20:53:47 | FromGitter | <kennymalac> oh wait it does |
20:54:04 | FromGitter | <kennymalac> that's why the examples use BSON_APPEND_UTF8 which doesn't require it |
20:54:11 | FromGitter | <kennymalac> but that doesn't seem to be callable in nim |
20:54:24 | FromGitter | <kennymalac> hmmm |
20:55:43 | FromGitter | <kennymalac> I wonder how I should work around that. I guess bson has a lot of all caps functions which wrap the lowercase ones |
20:56:58 | shashlick | https://nimterop.github.io/nimterop/docs.html for docs info |
20:58:28 | shashlick | nimterop doesn't yet wrap #define func(x, y) ... |
20:58:30 | shashlick | some day |
20:59:13 | FromGitter | <kennymalac> aw shucks |
21:00:11 | FromGitter | <kennymalac> does c2nim support #define ? |
21:00:34 | FromDiscord | <Recruit_main707> i think it does |
21:01:12 | shashlick | nope, it doesn't convert it into templates |
21:01:14 | FromDiscord | <Recruit_main707> https://github.com/nim-lang/c2nim |
21:01:15 | FromDiscord | <Recruit_main707> read the readme |
21:01:45 | FromGitter | <kennymalac> that's #define vars not functions |
21:01:58 | FromGitter | <kennymalac> good to know though |
21:01:59 | FromDiscord | <Recruit_main707> click in here |
21:02:29 | FromDiscord | <Recruit_main707> but its just what shashlick said, it converts them to templates |
21:03:19 | FromGitter | <kennymalac> he said it doesn't |
21:03:23 | FromGitter | <kennymalac> looks like it would have to be manual |
21:03:24 | FromGitter | <kennymalac> hrm |
21:05:02 | shashlick | https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst#id6 |
21:05:08 | shashlick | but you will need to hand edit the h file |
21:14:33 | * | MarderIII joined #nim |
21:14:43 | * | MarderIII quit (Read error: Connection reset by peer) |
21:21:09 | liblq-dev | damn, I need to wait until a Process exits, but I also need to close its stdin pipe. I suppose that's not achievable since it would trigger an exception on myProcess.exit() |
21:24:30 | leorize | close it with myProcess.close() |
21:24:51 | leorize | it exits if not already, then close all handles :) |
21:39:35 | * | PMunch quit (Quit: leaving) |
21:40:50 | liblq-dev | leorize: > WARNING: If the process has not finished executing, this will forcibly terminate the process. Doing so may result in zombie processes and pty leaks. |
21:41:07 | liblq-dev | I don't want to terminate the process; just close the stdin handle |
21:41:10 | * | Cthalupa quit (Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in) |
21:41:20 | leorize | then inputHandle.close? |
21:41:42 | liblq-dev | yeah that worked, but I was afraid some exception would trigger on myProcess.close() |
21:41:42 | leorize | actually inputStream.close is the crossplatform one |
21:41:55 | liblq-dev | I don't need cross-platformness |
21:42:00 | liblq-dev | it's just a script for my machine |
21:42:05 | leorize | ah, don't worry, no weird exception will happen |
21:42:44 | leorize | we need a more customizable api for osproc |
21:43:21 | Araq | Zevv, https://github.com/zevv/nimz3/pull/2 |
21:43:58 | liblq-dev | leorize: I agree |
21:44:19 | leorize | well if you have time maybe you can work on one? :) |
21:44:28 | liblq-dev | it's kinda annoying that we can't poll whether the process's stdout pipe has any data; I had to use posix for that |
21:44:48 | leorize | we need asyncstreams to be a stable thing |
21:44:59 | leorize | then we can have process with async stdin/out |
21:45:01 | liblq-dev | that'd be useful |
21:51:14 | * | zacharycarter quit (Ping timeout: 264 seconds) |
21:53:34 | * | narimiran quit (Ping timeout: 240 seconds) |
21:58:58 | FromDiscord | <IanIAnIAN> don't suppose the maker of ggplotnim lives here? |
22:01:30 | * | lritter quit (Quit: Leaving) |
22:02:49 | Araq | sometimes he does iirc |
22:04:56 | FromDiscord | <IanIAnIAN> I'll just leave a saucer of milk out for him then |
22:05:03 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
22:06:41 | * | zacharycarter joined #nim |
22:13:42 | * | ksandvik joined #nim |
22:14:34 | FromGitter | <kaushalmodi> IanIAnIAN: You can summon him using @Vindaar |
22:18:49 | Araq | https://github.com/nim-lang/Nim/pull/13743 it's alive |
22:19:12 | * | Guest56251 quit (Ping timeout: 246 seconds) |
22:20:17 | * | ksandvik quit (Quit: Leaving.) |
22:20:35 | * | ksandvik joined #nim |
22:23:54 | * | solitudesf quit (Ping timeout: 240 seconds) |
22:24:39 | * | dadada joined #nim |
22:25:04 | * | dadada is now known as Guest54059 |
22:27:05 | * | ksandvik quit (Quit: Leaving.) |
22:27:28 | * | ksandvik joined #nim |
22:29:44 | krux02 | Araq: Interesting |
22:42:49 | * | natrys quit (Ping timeout: 264 seconds) |
22:46:01 | ksandvik | Is this the Z3 Theorem Prover from Microsoft? |
22:48:14 | * | Guest54059 quit (Ping timeout: 240 seconds) |
22:48:49 | * | zacharycarter quit (Ping timeout: 264 seconds) |
22:49:06 | Araq | yes |
22:49:37 | ksandvik | Interestng. For cryptography work? Or just anything? Z3 is new for me.... |
22:49:53 | * | couven92 quit (Read error: Connection reset by peer) |
22:50:16 | * | couven92 joined #nim |
22:50:37 | Araq | for anything. |
22:51:02 | Araq | crypto probably needs features guaranteeing "constant time" |
22:51:07 | ksandvik | OK. Reading https://nikolajbjorner.github.io/slides/Z3_System.pdf |
22:52:05 | ksandvik | Would Z3 help with writing more flexible unit tests? |
22:54:35 | * | dadada_ joined #nim |
22:55:06 | * | natrys joined #nim |
22:56:42 | leorize | I'd be interested in having z3 optimize away certain checks because it can prove that they will be true :) |
22:56:58 | rayman22201 | only caught the end of the stream Araq, but that is super great work! I'm excited :-) |
22:58:14 | ksandvik | I used to deal with huge unit test systems with pro apps and it was a pain to write more and more of them, wish there was a way to just define a set of APIs and a set of data and let the unit test engine loose, or let some unit tests define that there's no need to run another bunch of tests if one succeeded and covered it all. |
22:58:35 | * | natrys quit (Client Quit) |
22:58:43 | rayman22201 | Z3 is more powerful than unit tests. It gives the type system superpowers. Dependent and Linear types, etc... The closest thing is Ada Spark. |
22:59:07 | rayman22201 | It proves things at compile time so that you don't need unit tests (for the things it proves.) |
22:59:17 | ksandvik | Oh even better. |
23:06:04 | * | rnrwashere joined #nim |
23:09:14 | * | sleepyqt quit (Ping timeout: 256 seconds) |
23:11:36 | Araq | leorize: yeah that would be good, quite easy to do too |
23:12:54 | leorize | will z3 eventually make it into the main compiler or will it stay as a standalone tool? |
23:15:25 | axion | Hey all. Simple question about type parameters. If I have 2 proc parameters that are both typed to be `a or b`, is there any way outside of the body to tell the compiler that they must be unique? That is if the first argument is `a` then the second must be `b`, and vice versa. |
23:16:50 | Araq | axion: write 2 overloaded procs instead |
23:17:33 | axion | Yeah that's what I'm currently doing for a bunch of operations. Just curious :) |
23:17:35 | Araq | leorize: unlikely, the dependency is bad and proving stuff can take time, it's better as a separate tool |
23:17:48 | Araq | good night |
23:18:50 | * | dadada_ quit (Ping timeout: 264 seconds) |
23:20:45 | * | zacharycarter joined #nim |
23:24:39 | * | dadada joined #nim |
23:25:04 | * | dadada is now known as Guest8441 |
23:26:15 | * | zacharycarter quit (Ping timeout: 250 seconds) |
23:33:35 | * | tane quit (Quit: Leaving) |
23:36:30 | * | Cthalupa joined #nim |
23:37:15 | * | zyklon joined #nim |
23:39:42 | * | uvegbot quit (Ping timeout: 260 seconds) |
23:44:54 | FromGitter | <zetashift> gnight |
23:45:10 | * | NimBot joined #nim |
23:48:14 | * | Guest8441 quit (Ping timeout: 240 seconds) |
23:54:34 | * | dadada_ joined #nim |