00:03:01 | * | krux02 quit (Remote host closed the connection) |
00:06:38 | FromDiscord_ | <Clyybber> krux02: Running `bin/nim doc --warning[LockLevel]:off --hint[Conf]:off --hint[Path]:off --hint[Processing]:off -d:boot --putenv:nimversion=1.1.1 --git.commit:devel --git.url:https://github.com/nim-lang/Nim -o:web/upload/1.1.1/json.html --index:on lib/pure/json.nim` is what happens there, so you should be able to reproduce locally via that command |
00:06:47 | * | krux02 joined #nim |
00:07:05 | FromDiscord_ | <Clyybber> krux02: Heh you just missed my answer: https://irclogs.nim-lang.org/06-02-2020.html |
00:07:15 | * | ltriant_ quit (Ping timeout: 240 seconds) |
00:07:52 | * | ltriant joined #nim |
00:08:19 | FromDiscord_ | <Clyybber> Its that line here: https://builds.sr.ht/~araq/job/147327#task-test-525 |
00:10:26 | krux02 | Clyybber: thank you |
00:13:54 | krux02 | Clyybber: I fixed it |
00:14:03 | krux02 | I hope CI is running through now |
00:14:04 | krux02 | good night |
00:14:07 | * | krux02 quit (Remote host closed the connection) |
00:14:11 | FromDiscord_ | <Clyybber> nice, |
00:14:14 | FromDiscord_ | <Clyybber> good night |
00:15:56 | * | blueberrypie5 joined #nim |
00:16:41 | * | disbot_ joined #nim |
00:17:45 | * | MightyJoe joined #nim |
00:19:30 | * | WilhelmV1nWeiner joined #nim |
00:21:10 | * | voltist joined #nim |
00:21:23 | * | icebattle quit (Ping timeout: 252 seconds) |
00:21:28 | * | blueberrypie quit (Quit: Ping timeout (120 seconds)) |
00:21:29 | * | disbot quit (Remote host closed the connection) |
00:21:36 | * | cyraxjoe quit (Quit: No Ping reply in 180 seconds.) |
00:21:36 | * | gsingh93 quit (Ping timeout: 272 seconds) |
00:21:36 | * | lritter quit (Ping timeout: 272 seconds) |
00:21:36 | * | WilhelmVonWeiner quit (Ping timeout: 272 seconds) |
00:21:36 | * | blueberrypie5 is now known as blueberrypie |
00:24:24 | * | gsingh93 joined #nim |
00:25:14 | * | hax-scramper quit (Ping timeout: 240 seconds) |
00:25:19 | * | ikan-keli_ quit (Quit: ZNC 1.8.x-git-125-e415d9f5 - https://znc.in) |
00:25:21 | * | MD87 quit (Read error: Connection reset by peer) |
00:25:21 | * | npgm quit (Read error: Connection reset by peer) |
00:25:21 | * | hpyc9 quit (Quit: ZNC 1.7.5 - https://znc.in) |
00:25:23 | * | noonien quit (Read error: Connection reset by peer) |
00:25:23 | * | matti quit (Read error: Connection reset by peer) |
00:25:24 | * | nuxdie quit (Read error: Connection reset by peer) |
00:25:34 | * | ikan-keli_ joined #nim |
00:25:43 | * | MD87 joined #nim |
00:25:48 | * | noonien joined #nim |
00:25:49 | * | npgm joined #nim |
00:25:58 | * | nuxdie joined #nim |
00:26:02 | * | Yardanico quit (Quit: No Ping reply in 180 seconds.) |
00:26:02 | * | hpyc9 joined #nim |
00:26:06 | * | matti joined #nim |
00:26:17 | * | disrupteq joined #nim |
00:26:35 | * | lritter joined #nim |
00:27:23 | * | gangstacat quit (Ping timeout: 272 seconds) |
00:28:01 | * | EastByte quit (Ping timeout: 272 seconds) |
00:28:07 | * | Yardanico joined #nim |
00:28:11 | * | muffindrake quit (Remote host closed the connection) |
00:28:19 | * | Hideki_ joined #nim |
00:28:50 | * | muffindrake joined #nim |
00:30:09 | * | gangstacat joined #nim |
00:31:49 | * | EastByte joined #nim |
00:52:54 | * | leorize quit (Quit: WeeChat 2.6) |
00:53:43 | * | Hideki_ quit (Remote host closed the connection) |
00:55:24 | * | arecaceae quit (Remote host closed the connection) |
00:56:07 | * | arecaceae joined #nim |
00:56:29 | voltist | Anybody know of an easy way to find all text in a string that isn't inside brackets |
00:56:49 | voltist | ? |
00:59:31 | * | nullwarp quit (Quit: ZNC 1.7.5 - https://znc.in) |
01:00:39 | * | nullwarp joined #nim |
01:08:01 | * | hax-scramper joined #nim |
01:09:40 | FromDiscord_ | <Winton> Spanish? |
01:10:41 | * | cornfeedhobo quit (Quit: ZNC - https://znc.in) |
01:18:42 | * | cornfeedhobo joined #nim |
01:30:56 | * | Hideki_ joined #nim |
01:40:28 | FromGitter | <deech> Araq, great talk! |
01:48:11 | * | lritter quit (Ping timeout: 260 seconds) |
01:54:33 | * | lritter joined #nim |
01:56:47 | * | Hideki_ quit (Ping timeout: 265 seconds) |
01:59:28 | * | joshbaptiste joined #nim |
02:13:36 | * | icebattle joined #nim |
02:18:31 | * | icebattle quit (Ping timeout: 260 seconds) |
02:25:31 | * | chemist69_ joined #nim |
02:28:47 | * | chemist69 quit (Ping timeout: 260 seconds) |
02:32:10 | * | s87651[m] joined #nim |
02:57:19 | * | johnd joined #nim |
02:57:34 | * | johnd is now known as Guest53574 |
03:01:11 | * | Guest53574 quit (Client Quit) |
03:01:40 | * | johnd_ joined #nim |
03:03:59 | * | johnd_ is now known as JohnAD |
03:04:49 | * | JohnAD quit (Client Quit) |
03:05:41 | * | johnd_ joined #nim |
03:06:00 | * | johnd_ is now known as JohnAD |
03:09:40 | * | casaca joined #nim |
03:10:49 | * | valit joined #nim |
03:22:29 | * | lritter quit (Quit: Leaving) |
03:25:30 | * | valit quit () |
03:29:27 | FromGitter | <iffy> @deech link? |
03:29:55 | * | hax-scramper quit (Ping timeout: 260 seconds) |
03:31:04 | FromGitter | <iffy> If I have a Future with an error, how do I get the string message out of that error? `getCurrentExceptionMsg()` doesn't apply, right? I just want to log the message |
03:31:44 | disruptek | if it raises, you ... except ValueError as e: echo e.msg |
03:31:44 | leorize[m] | @iffy https://fosdem.org/2020/schedule/event/nimmovesemantics/ |
03:31:50 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
03:32:28 | disruptek | if it doesn't, you can use the /is/ operator. |
03:32:56 | FromGitter | <iffy> Thanks! (I was looking for `.msg`) |
03:33:09 | disruptek | right. 👍 |
03:33:11 | FromGitter | <iffy> so `myfut.readError().msg` |
03:33:37 | disruptek | yeah, or whatever. |
03:33:59 | disruptek | i don't use that api, but.. yeah. |
03:35:02 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:36:32 | * | muffindrake joined #nim |
03:38:25 | voltist | I'm trying to comment this Nim code I'm working on well because it's going to accompany a paper I'm going to publish later this year |
03:38:31 | voltist | I fear the judgement of the masses :) |
03:38:44 | * | hax-scramper joined #nim |
03:39:47 | disruptek | dude, that's awesome. |
03:39:53 | disruptek | what's the paper on? |
03:45:27 | voltist | It's on simulating the nervous system of the C. elegans worm, which is entirely mapped. I'm trying to simulate the whole connectome 90% biologically accurate rather than part of it 100% accurate (like the amazing work of OpenWorm) in order to demonstrate the research potential of simulation. |
03:46:05 | disruptek | wow, amazing. |
03:47:56 | disruptek | when is it due out? |
03:50:12 | * | endragor joined #nim |
03:50:15 | * | letto joined #nim |
03:50:44 | voltist | A few months after I finish writing/editing, which shouldn't be to far away now since I've almost finished the programming and I just need to fine-tune/test |
03:52:41 | disruptek | that sounds like about 8mos. |
03:53:12 | voltist | Something like that yeah |
03:53:19 | voltist | Assuming everything goes to plan |
03:55:46 | disruptek | super cool. |
03:56:39 | voltist | Indeed |
03:57:50 | voltist | I'll make a web demo at some point with the JS compilation target |
03:58:12 | voltist | And my limited knowledge of JS/browser stuff |
04:00:06 | disruptek | people seem to like karax. |
04:01:53 | voltist | If it can do simple graphics stuff then I'll make sure to give it a try |
04:03:31 | * | theelous3 quit (Ping timeout: 260 seconds) |
04:03:55 | * | arecaceae quit (Remote host closed the connection) |
04:04:17 | * | arecaceae joined #nim |
04:07:45 | * | theelous3 joined #nim |
04:31:26 | * | rockcavera quit (Remote host closed the connection) |
04:31:31 | * | dddddd quit (Ping timeout: 260 seconds) |
04:33:55 | Tanger | Heya folks, I'm not sure what this error means: `Error: template instantiation too nested`. This is my code: https://play.nim-lang.org/#ix=2aSA |
04:34:22 | Tanger | I think I'm maybe defining the template incorrectly |
04:34:30 | disruptek | it's just a warning, right? |
04:34:44 | disruptek | it just annoys me. doesn't prevent compilation. |
04:35:14 | Tanger | Huh... |
04:35:24 | Tanger | Haha, was thrown off by the "Error" label |
04:40:46 | * | nsf joined #nim |
04:45:09 | Tanger | Is there a function in macros or something that gets the AST/code that a template would substitute into? |
04:46:21 | disruptek | i dunno. i've done that with macros but i guess not a template. |
04:46:44 | Tanger | No worries, thanks mate! |
04:48:20 | disruptek | let us know what you end up using. 😉 |
04:49:17 | voltist | Does httpClient work with the JS backend? |
04:50:01 | voltist | Hmmm, maybe not |
04:50:17 | disruptek | no, but there's a pr pending that provides it. |
04:50:36 | disruptek | !pull fetch js |
04:50:37 | disbot_ | https://github.com/nim-lang/Nim/pull/12531 -- 3Add module jsfetch 7& 2 more... |
04:51:46 | voltist | Ah neat |
04:54:13 | voltist | Oh wonderful now tables isn't working |
04:54:22 | voltist | The JS backend is giving me a wonderful time |
04:57:20 | voltist | Are tuples known to not work with the JS backend? I can't use them in tables or as sequence items |
04:58:25 | disruptek | i dunno, but it sounds surprising, alright. |
05:20:21 | * | adalricus joined #nim |
05:22:59 | * | ltriant quit (Quit: leaving) |
05:33:15 | * | leorize joined #nim |
05:43:33 | * | narimiran joined #nim |
05:53:24 | * | Hideki_ joined #nim |
05:54:06 | * | theelous3 quit (Ping timeout: 265 seconds) |
05:57:59 | * | Hideki_ quit (Ping timeout: 272 seconds) |
06:28:51 | FromDiscord_ | <Chiqqum_Ngbata> Do tables become Map or a regular JS object |
06:30:30 | leorize | nope |
06:31:13 | leorize | it's just a regular object |
06:31:34 | FromDiscord_ | <Chiqqum_Ngbata> Ah. We should probably use Map eh? |
06:31:40 | leorize | nope |
06:31:47 | FromDiscord_ | <Chiqqum_Ngbata> Why do you figure |
06:32:01 | voltist | I'm now having trouble getting strings from JS into Nim. I call a function from a JS file that returns a string and it returns a weird string of non-ascii chars |
06:32:02 | leorize | we compile to js, not translating to js equivalent :P |
06:32:14 | leorize | so we need to make sure that the code work the same way as with native targets |
06:32:38 | leorize | voltist: tell nim that it returns a cstring |
06:33:06 | FromDiscord_ | <Chiqqum_Ngbata> Is there some way to represent arbitrary-type key in a regular JS object |
06:33:29 | voltist | leorize: That works. Thanks! |
06:33:54 | leorize | Chiqqum_Ngbata: iirc there is the `js()` macro that let you do so |
06:33:58 | leorize | I don't know where it is though |
06:35:32 | FromDiscord_ | <Chiqqum_Ngbata> I mean, in JavaScript, object keys can only be string. Maps can have an arbitrary key. Kind of curious as to how it compiles; maybe I'll check it out later |
06:37:47 | leorize | this module should have what you need I think: https://nim-lang.github.io/Nim/jsffi.html |
06:58:47 | * | hax-scramper quit (Ping timeout: 272 seconds) |
06:59:26 | * | hax-scramper joined #nim |
07:05:27 | * | hax-scramper quit (Read error: Connection reset by peer) |
07:05:40 | * | hax-scramper joined #nim |
07:20:04 | * | solitudesf joined #nim |
07:24:48 | * | hax-scramper quit (Read error: Connection reset by peer) |
07:24:58 | * | hax-scramper joined #nim |
07:28:44 | * | hax-scramper quit (Read error: Connection reset by peer) |
07:28:55 | * | hax-scramper joined #nim |
07:29:44 | * | Sembei joined #nim |
07:45:14 | * | hax-scramper quit (Ping timeout: 240 seconds) |
07:45:58 | * | hax-scramper joined #nim |
07:48:24 | * | ftsf joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:02:07 | * | ng0 quit (Quit: leaving) |
08:05:07 | * | gmpreussner joined #nim |
08:07:07 | * | endragor quit (Ping timeout: 260 seconds) |
08:07:34 | * | endragor joined #nim |
08:13:23 | * | hax-scramper quit (Read error: Connection reset by peer) |
08:13:37 | * | hax-scramper joined #nim |
08:21:45 | * | Vladar joined #nim |
08:27:29 | * | voltist quit (Remote host closed the connection) |
08:28:56 | * | floppydh joined #nim |
08:28:57 | * | hax-scramper quit (Read error: Connection reset by peer) |
08:29:21 | * | hax-scramper joined #nim |
08:32:14 | * | rhenvar joined #nim |
08:32:32 | * | Guest89399 quit (Ping timeout: 260 seconds) |
08:32:32 | rhenvar | hello |
08:33:06 | rhenvar | is this a good place to discuss support for nimble? |
08:33:14 | * | SunDwarf joined #nim |
08:34:30 | lqdev[m] | yes |
08:35:53 | rhenvar | is there an accepted way of configuring nimble install and nimble build to accept flags implicitly? |
08:36:14 | rhenvar | such that nimble build would do, say, nimble build --app:lib |
08:37:11 | rhenvar | or, if possible, should this be done in the Dockerfile with nimlang/nim:onbuild - if so, how can I add flags to this hook |
08:39:28 | * | pvn joined #nim |
08:39:31 | * | marmotini_ joined #nim |
08:39:31 | * | hax-scramper quit (Read error: Connection reset by peer) |
08:39:35 | lqdev[m] | it should be possible using nim.cfg or config.nims for your nim project file https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files |
08:39:47 | * | hax-scramper joined #nim |
08:40:56 | * | chemist69_ quit (Ping timeout: 246 seconds) |
08:42:01 | * | chemist69 joined #nim |
08:42:56 | * | marmotini_ quit (Read error: Connection reset by peer) |
08:43:19 | * | marmotini_ joined #nim |
08:45:19 | rhenvar | worked like a charm, thanks |
09:20:17 | * | krux02 joined #nim |
09:27:46 | * | paper_ joined #nim |
09:28:47 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:30:26 | * | hax-scramper joined #nim |
09:55:06 | * | Hideki_ joined #nim |
09:59:35 | * | Hideki_ quit (Ping timeout: 260 seconds) |
10:13:08 | * | onionhammer quit (Ping timeout: 260 seconds) |
10:13:24 | * | marmotini_ quit (Remote host closed the connection) |
10:13:28 | * | natrys joined #nim |
10:13:32 | * | onionhammer joined #nim |
10:14:35 | Zevv | Soooo, how are we nimmin' today? |
10:15:57 | * | marmotini_ joined #nim |
10:19:15 | FromGitter | <Varriount> Zevv: Looking through PRs, making comments |
10:19:33 | * | couven92 joined #nim |
10:19:55 | Zevv | Yeah that was my new years resolution, to do that more often :/ |
10:21:01 | FromGitter | <Varriount> I usually just go over the ones proposing new language features or standard library comes |
10:21:13 | FromGitter | <Varriount> *standard library changes |
10:22:21 | * | marmotini_ quit (Ping timeout: 265 seconds) |
10:25:37 | * | marmotini_ joined #nim |
10:31:05 | * | marmotini_ quit (Remote host closed the connection) |
10:31:21 | FromGitter | <Varriount> Zevv: How is everything? |
10:31:44 | * | Vladar quit (Quit: Leaving) |
10:31:51 | Zevv | Slowly but surely recovering from the post-FOSDEM flu :) |
10:32:24 | couven92 | Zevv, Huh, @PMunch also said he git sick when we got home... :O |
10:32:25 | Zevv | I felt it coming, although I did a good job of hitting the sack pretty early there was no avoiding |
10:32:30 | couven92 | I am fine though :P |
10:32:52 | Zevv | *still* fine :) |
10:33:08 | couven92 | Oh ye of little confidence! |
10:33:31 | Zevv | speak to you in 10-14 days, muha! |
10:40:41 | * | marmotini_ joined #nim |
10:45:02 | FromGitter | <Varriount> Zevv: I get a sinus infection and/or cold last week |
10:45:37 | Zevv | So, there is a strong correlation between influenza and Nim usage. This can't be right! |
10:45:52 | FromGitter | <Varriount> No coughing, just major fatigue, sinus pressure, and both a runny and stopped up nose |
10:46:36 | Zevv | You should try C++ instead, see if that helps |
10:46:56 | Araq | hey |
10:47:03 | FromGitter | <Varriount> What, it'll confuse the viruses and bacteria away? |
10:51:52 | * | ng0 joined #nim |
11:00:43 | FromGitter | <Varriount> Araq: Any thoughts on my comments for https://github.com/nim-lang/Nim/pull/13305 ? |
11:00:45 | disbot_ | ➥ [pending #13303] new: typetraits.getTypeId |
11:01:26 | * | NimBot joined #nim |
11:03:31 | Araq | what you wrote makes sense but I fear its implementation |
11:11:21 | * | krux02 quit (Remote host closed the connection) |
11:14:39 | * | marmotini_ quit (Ping timeout: 272 seconds) |
11:15:56 | * | krux02 joined #nim |
11:18:11 | * | krux02 quit (Remote host closed the connection) |
11:18:29 | * | Ckatt joined #nim |
11:21:39 | * | Ckat quit (Ping timeout: 268 seconds) |
11:21:39 | * | Ckatt is now known as Ckat |
11:26:57 | FromDiscord_ | <jjude> is it possible to change server name from httpbeast while using jester? |
11:27:13 | FromGitter | <Varriount> What do you mean by server name? |
11:28:45 | FromDiscord_ | <jjude> say you write a REST server using jester; while invoking the api, jester will output content-type, content-size, and server name in addition to whatever response your REST server outputs. I want to change this server name |
11:32:54 | * | marmotini_ joined #nim |
11:33:16 | * | Zectbumo joined #nim |
11:38:13 | * | marmotin_ joined #nim |
11:40:38 | * | marmotini_ quit (Ping timeout: 260 seconds) |
11:45:41 | * | marmotini_ joined #nim |
11:47:00 | * | marmotin_ quit (Read error: Connection reset by peer) |
11:47:08 | * | marmotini_ quit (Remote host closed the connection) |
11:47:13 | * | abm joined #nim |
11:49:49 | * | marmotini_ joined #nim |
11:56:18 | * | Tongir joined #nim |
12:00:15 | * | solitudesf quit (Ping timeout: 272 seconds) |
12:04:24 | * | Hideki_ joined #nim |
12:04:57 | * | Zectbumo quit (Remote host closed the connection) |
12:05:13 | * | Zectbumo joined #nim |
12:06:38 | * | hax-scramper quit (Read error: Connection reset by peer) |
12:06:54 | * | hax-scramper joined #nim |
12:16:42 | Zevv | its a const in httpbeast, so no |
12:17:20 | Zevv | otoh, you have the source :) |
12:18:24 | * | icebattle joined #nim |
12:20:41 | * | marmotini_ quit (Remote host closed the connection) |
12:23:03 | * | icebattle quit (Ping timeout: 272 seconds) |
12:25:47 | * | Hideki_ quit (Remote host closed the connection) |
12:26:37 | * | Hideki_ joined #nim |
12:26:59 | * | PMunch_ joined #nim |
12:31:15 | * | Hideki_ quit (Ping timeout: 260 seconds) |
12:46:28 | * | paxis quit (Ping timeout: 248 seconds) |
12:48:46 | * | nsf quit (Quit: WeeChat 2.7) |
12:49:03 | * | Hideki_ joined #nim |
12:53:23 | * | endragor quit (Remote host closed the connection) |
12:54:10 | FromGitter | <alehander92> hmm |
12:55:05 | FromGitter | <alehander92> @iffy hm i didnt know about the error api thanks |
13:00:41 | * | paxis joined #nim |
13:01:19 | * | solitudesf joined #nim |
13:03:01 | FromGitter | <alehander92> anybody needs help? jjude look at the server api |
13:03:03 | FromGitter | <alehander92> e.g. asynchttpserver |
13:03:07 | FromGitter | <alehander92> or httpbeast |
13:05:29 | * | marmotini_ joined #nim |
13:11:32 | * | npgm quit (Ping timeout: 248 seconds) |
13:11:41 | * | LyndsySimon quit (Ping timeout: 265 seconds) |
13:11:48 | FromDiscord_ | <highDevGuy> hello again. I'm a bit lost again. I wrote a nim script that works great on windows where I develop and test it, but now I need to run it on a linux server and I don't know how to compile it for linux and then run it there. Any help would be appreciated ❤️ Even just a link to somewhere where I could learn more |
13:12:21 | Yardanico | well, the easiest way would be do use WSL if you run win10 |
13:12:29 | Yardanico | and what do you mean by a "nim script"? |
13:12:32 | * | d10n-work quit (Ping timeout: 260 seconds) |
13:12:40 | Yardanico | a program written in Nim which you compile, or literally NimScript (.nims)? |
13:13:38 | FromDiscord_ | <highDevGuy> 😄 I guess just a program written in nim 🙂 I'm using jester and building a simple web service (if that is the proper terminology) |
13:15:01 | FromDiscord_ | <highDevGuy> and yes, I'm developing on win10 but I have no clue what it means to use WSL 🙂 |
13:15:04 | Yardanico | well yeah, then you need to compile it as a binary if you don't want to share the source code |
13:15:28 | Yardanico | WSL is windows subsystem for linux, basically a linux kernel running inside windows NT kernel, search for it on the internet, there's quite a lot of info about it |
13:15:44 | Yardanico | it's not emulation, it's something like wine but other way |
13:15:53 | FromDiscord_ | <highDevGuy> ok, thank you |
13:18:28 | * | noonien quit (Ping timeout: 248 seconds) |
13:27:17 | * | Kaivo joined #nim |
13:30:44 | * | marmotini_ quit (Remote host closed the connection) |
13:32:36 | * | marmotini_ joined #nim |
13:33:18 | * | kungtotte quit (Read error: Connection reset by peer) |
13:33:52 | * | kungtotte joined #nim |
13:34:03 | FromDiscord_ | <treeform> I would just ssh into the server and compile it there. |
13:34:28 | Yardanico | well I don't know if they have a server :) |
13:34:35 | FromDiscord_ | <treeform> get choosenim working on linux, install all dependencies and compile. |
13:34:42 | Yardanico | WSL is not that hard tho |
13:34:51 | Yardanico | it works ootb on windows with default ubuntu distro, and you can use choosenimt here just fine |
13:35:06 | FromDiscord_ | <treeform> is it binary compatible with all linux distros? |
13:35:33 | Yardanico | yes, there are custom releases for distros like Arch Linux so you can run them in WSL too |
13:35:47 | Yardanico | of course if you want to make your binary truly compatible with all distros, you'd have to statically compile it with musl :) |
13:35:49 | FromDiscord_ | <treeform> what about glibc vs muslc? |
13:36:05 | Yardanico | almost all modern distros are glibc, aren't they |
13:36:18 | FromDiscord_ | <treeform> thats true |
13:36:20 | Yardanico | seems like alpine works in WSL though |
13:36:36 | Zevv | ping PMunch |
13:36:47 | Yardanico | or https://github.com/am11/VoidMuslWSL for void linux with musl on WSL |
13:36:55 | FromDiscord_ | <treeform> For many people linux=Ubantu |
13:37:10 | Araq | just compile against glibc, it's the standard on Linux for a reason. nothing works with "all distros" anyway, that's the point of having so many distros. |
13:37:17 | FromDiscord_ | <treeform> Ubuntu* |
13:37:31 | FromGitter | <kaushalmodi> @timotheecour Please see this: https://github.com/nim-lang/Nim/commit/b20d7e2110d3d8ab406d44f2231120847e6fea05#commitcomment-37152517 (about Travis failing on Nim devel) |
13:38:09 | Araq | there is always something that doesn't run on distro X and "doesn't run" is equal to "secure" |
13:38:24 | Zevv | --os:any! \o/ |
13:38:37 | FromDiscord_ | <treeform> --os:every |
13:39:05 | Yardanico | well I think that static musl build will work on almost any distro you'd find out there |
13:39:06 | FromDiscord_ | <treeform> does --os:any means it will run on any of the OSes but it does not know which one? |
13:39:10 | FromGitter | <kaushalmodi> Araq: I don't know anything about netdial or ipv6, but that test is try to open a ::1 port which the Linux on travis does not like |
13:40:07 | FromGitter | <kaushalmodi> hmm, looks like your "doesn't run on distro X" comment was in a different context; nothing to do with that failing test :P |
13:40:11 | Zevv | treefrom: nah, --os:any is a misleading name anyway, but my intention is to have it no dependencies on the underlying target. The original name was os:ansic, but that was voted out |
13:40:22 | FromDiscord_ | <treeform> I remember when everyone was going run out of ipv4, and it was like a huge problem. Then we all got NATs and like it more now... ipv6 is not really needed. |
13:40:57 | Yardanico | well I'd like to be able to open ports :) |
13:41:11 | Yardanico | and host stuff without any other servers, and NATs are bad for that |
13:41:12 | Araq | ipv6 is our only option for interstellar travel so that every toaster in alpha centauri can have an IP |
13:41:27 | Zevv | every toaster in Alpha Centauri can get its own /32 |
13:41:50 | FromDiscord_ | <treeform> I think Alpha Centauri will be behind a NAT. |
13:42:07 | FromGitter | <alehander92> but where would we get all that bread for those toasters |
13:42:26 | FromDiscord_ | <treeform> Zevv, what so --os:any is a thing, and it only works on linux? |
13:42:54 | FromGitter | <alehander92> os:any is for bare metal apps/linux kernels/toy os-es right? |
13:42:59 | FromGitter | <alehander92> linux kernel modules* |
13:43:15 | Zevv | treeform: it should run on - tadaaa - *anything*! |
13:43:33 | FromDiscord_ | <treeform> no that is --os:standalone |
13:43:51 | Zevv | it works for me on linux, on atmel AVR, in the linux kernel, on bare metal ARMs, etc. It generates the least amount of stuff, so a typical hello world is mostly nothing. |
13:43:54 | FromGitter | <alehander92> oh treeform |
13:43:58 | FromGitter | <alehander92> thats the story :) |
13:44:00 | Zevv | I aim for 0% overhead compared t C |
13:44:17 | Zevv | this might obsolete os:standalone - in the documentation it already did |
13:44:19 | FromGitter | <alehander92> it is the better os:standalone |
13:44:51 | FromDiscord_ | <treeform> Does any one have a 64 bit toy kernal in nim? Dom's is only 32bit. |
13:45:19 | FromGitter | <alehander92> this one is a bit more advanced https://github.com/samanthadoran/Mero |
13:45:23 | FromGitter | <alehander92> but also not x64 |
13:49:12 | FromDiscord_ | <treeform> that is more advanced. |
13:51:59 | * | dddddd joined #nim |
13:52:09 | FromGitter | <alehander92> i also started one based on Mero and nimkernel to experiment with random ideas |
13:52:16 | FromGitter | <alehander92> but have no time for it lately |
13:52:33 | FromGitter | <alehander92> plan to port it to os:any and clean it up a bit later |
13:58:47 | * | theelous3 joined #nim |
14:02:11 | * | LyndsySimon joined #nim |
14:03:43 | * | d10n-work joined #nim |
14:07:38 | * | nullwarp quit (Ping timeout: 240 seconds) |
14:08:30 | * | noonien joined #nim |
14:09:16 | * | npgm joined #nim |
14:09:42 | * | nullwarp joined #nim |
14:14:23 | * | lritter joined #nim |
14:17:09 | * | abm quit (Read error: Connection reset by peer) |
14:19:14 | * | Tongir quit (Ping timeout: 240 seconds) |
14:22:52 | * | rockcavera joined #nim |
14:28:17 | * | marmotini_ quit (Remote host closed the connection) |
14:30:54 | * | marmotini_ joined #nim |
14:40:54 | * | PMunch__ joined #nim |
14:42:17 | * | PMunch_ quit (Quit: Leaving) |
14:43:39 | * | PMunch quit (Disconnected by services) |
14:43:43 | * | PMunch__ is now known as PMunch |
14:44:08 | * | PMunch_ joined #nim |
14:46:20 | * | nsf joined #nim |
14:47:17 | * | cgfuh joined #nim |
14:51:07 | * | tefter joined #nim |
15:02:03 | * | CcxWrk quit (Ping timeout: 240 seconds) |
15:03:09 | * | CcxWrk joined #nim |
15:07:17 | FromGitter | <nixfreakz_twitter> good morning , I am looking for information on how to create a program that allows me to find a specific string 16 chars (numeric only) and grep though multiple directories |
15:13:35 | Araq | look at nimgrep's source code? |
15:17:31 | FromGitter | <zetashift> Araq, I'm watching your talk atm and if I understand correctly if you annotate a parameter with `sink` it tells the compiler that value won't be used after it leaves the function scope and this is can be moved? |
15:22:46 | * | ftsf quit (Ping timeout: 268 seconds) |
15:24:19 | * | ng0_ joined #nim |
15:24:19 | * | ng0_ quit (Changing host) |
15:24:19 | * | ng0_ joined #nim |
15:27:40 | * | krux02 joined #nim |
15:27:49 | * | tane joined #nim |
15:27:53 | * | ng0 quit (Ping timeout: 268 seconds) |
15:29:28 | * | tane quit (Client Quit) |
15:31:09 | * | Hideki_ quit (Remote host closed the connection) |
15:31:46 | * | Hideki_ joined #nim |
15:34:17 | * | marmotini_ quit (Remote host closed the connection) |
15:36:31 | * | Hideki_ quit (Ping timeout: 260 seconds) |
15:37:50 | * | lritter quit (Quit: Leaving) |
15:38:13 | leorize[m] | that's how it works |
15:39:34 | FromGitter | <zetashift> Clears up a lot for me, can't believe I couldn't infer this from destructors.rst |
15:40:03 | leorize[m] | Yardanico: yes, a statically compiled musl libc based library will run pretty much anywhere |
15:40:28 | * | dddddd quit (Remote host closed the connection) |
15:40:30 | leorize[m] | binary* |
15:43:18 | * | sammich quit (Ping timeout: 260 seconds) |
15:46:48 | * | lritter joined #nim |
15:48:02 | FromGitter | <nixfreakz_twitter> *<Araq>* look at nimgrep's source code? , Thanks |
15:50:40 | * | Pqzcih5 joined #nim |
15:51:54 | * | sammich joined #nim |
15:52:59 | * | icebattle joined #nim |
15:56:40 | FromGitter | <zetashift> great talk anyway Araq :D |
15:58:56 | * | Vladar joined #nim |
16:00:16 | FromGitter | <nixfreakz_twitter> so with nimgrep , just trying it out and looking at source, does includeFile:<pat> support wildcards ? for instance I am looking for specific string in *.xml files |
16:01:57 | * | krux02 quit (Remote host closed the connection) |
16:02:12 | * | theelous3 quit (Read error: Connection reset by peer) |
16:02:39 | * | theelous3 joined #nim |
16:13:01 | shashlick | @leorize: no luck with package testing on travis |
16:14:28 | lqdev[m] | @nixfreakz_twitter wildcards are provided by the shell, not nimgrep. considering how such a wildcard is usually expanded, it *might* support them if it supports passing multiple `includeFile`s. |
16:14:50 | lqdev[m] | oh wait, that's not how it'd work |
16:15:00 | * | Hideki_ joined #nim |
16:15:41 | disruptek | today we build something amazing. |
16:15:46 | lqdev[m] | looking at the source code, `includeFile` actually accepts regexes |
16:16:21 | lqdev[m] | so just use `--includeFile:".+?\.xml" |
16:25:29 | FromGitter | <alehander92> look at walkPattern docs |
16:25:31 | FromGitter | <alehander92> in the os module |
16:25:37 | FromGitter | <alehander92> NiX ^ |
16:28:11 | * | avsej joined #nim |
16:28:11 | * | avsej quit (Changing host) |
16:28:11 | * | avsej joined #nim |
16:28:27 | * | Hideki_ quit (Ping timeout: 240 seconds) |
16:30:39 | * | fredrik92 joined #nim |
16:33:52 | * | couven92 quit (Ping timeout: 268 seconds) |
16:35:58 | Araq | zetashift: that's correct |
16:36:50 | * | fredrik92 is now known as couven92 |
16:39:09 | * | shadowbane quit (Quit: Konversation terminated!) |
16:39:47 | * | shadowbane joined #nim |
16:40:37 | leorize | shashlick: guess we should try something better than travis |
16:41:35 | * | hax-scramper quit (Quit: Quit) |
16:41:53 | * | hax-scramper joined #nim |
16:42:19 | * | shadowbane quit (Client Quit) |
16:43:52 | * | shadowbane joined #nim |
16:44:16 | * | hax-scramper quit (Client Quit) |
16:44:32 | * | hax-scramper joined #nim |
16:47:37 | * | shadowbane quit (Remote host closed the connection) |
16:47:42 | * | nsf quit (Quit: WeeChat 2.7) |
16:48:11 | * | shadowbane joined #nim |
16:50:52 | * | tane joined #nim |
16:56:52 | * | tane quit (Quit: Leaving) |
16:57:53 | FromDiscord_ | <clyybber> ooh, we are getting a native libp2p it seems |
17:14:02 | FromGitter | <kristianmandrup> Thanks @ |
17:24:09 | shashlick | @leorize we can leave the current testing as is, can you setup just package testing on azure |
17:25:00 | disruptek | i'm kinda curious what you guys are working on. i thought i understood it but now i'm not so sure. |
17:25:15 | disruptek | you want to test nimble against important packages, right? |
17:26:27 | leorize | yep |
17:30:17 | disruptek | i think the way it works is, nigel creates unreproducible builds that connect a unique child app with a parent app. that is, the uuid of each is encoded in the binary. |
17:32:16 | disruptek | when you run the child, it talks to the parent "kernel" to instantiate itself and alloc cloud resources. this way, allocators can be scoped or inherited, children can be recursively freed, and so on. |
17:34:56 | leorize | shashlick: so how should we do package testing? for stable and devel on linux only? |
17:35:39 | disruptek | imo, you have to do it on multiple platforms. |
17:37:41 | leorize | this is only to test nimble correctness, so I don't think we should do it for all platforms |
17:37:46 | leorize | that task can be left to the compiler |
17:38:01 | shashlick | Ya starting small |
17:38:19 | disruptek | how does it work? you just test `nimble install`? |
17:38:20 | shashlick | Will need cross platform eventually |
17:38:26 | shashlick | And just devel is fine |
17:38:46 | disruptek | yeah. |
17:40:04 | * | shadowbane quit (Remote host closed the connection) |
17:40:44 | * | shadowbane joined #nim |
17:41:38 | FromDiscord_ | <kodkuce> so when zero cost async, and this new gc ready 🙂 |
17:42:25 | disruptek | i dunno, we never did talk about whether to add a closure cursor. |
17:43:42 | disruptek | Araq: also, i was thinking maybe we should have a way to upgrade/downgrade cursors. |
17:45:00 | disruptek | what's important about cursors is the guarantee, not the underlying machinery. |
17:49:14 | * | fredrik92 joined #nim |
17:49:21 | * | couven92 quit (Disconnected by services) |
17:49:25 | * | fredrik92 is now known as couven92 |
17:52:22 | FromGitter | <Varriount> Can anything go wrong if the cursor pragma is misapplied? |
17:52:36 | leorize | memory leak |
17:53:19 | FromGitter | <Varriount> What about if it's not used at all? |
17:53:54 | leorize | you mean the variable is not used after declaration? |
17:54:16 | Zevv | unneeded copies I guess? |
17:56:16 | * | marmotini_ joined #nim |
18:00:12 | * | marmotini_ quit (Remote host closed the connection) |
18:02:33 | * | pvn quit (Quit: Leaving.) |
18:03:36 | * | marmotini_ joined #nim |
18:04:05 | disruptek | no, it's fine. |
18:04:22 | disruptek | you can't leak memory with cursors. |
18:04:51 | * | Vladar quit (Quit: Leaving) |
18:08:13 | Zevv | I can do `f = Foo(val:1)` to make a Foo. If I want to do a new ref Foo I need to do `f = new Foo; f.val=1`. Why can I not do construction with initial values in one go without having to declare a dedicated type for `ref Foo`? |
18:08:41 | FromGitter | <nixfreakz_twitter> referring to this https://github.com/nim-lang/Nim/blob/devel/lib/pure/oswalkdir.nim |
18:09:52 | rayman22201 | We only need @mratsims talk from fosdem now! Congratulations @araq excellent talk! |
18:10:28 | leorize | Zevv: make your own `new` proc, then propose it into the stdlib :) |
18:11:14 | Zevv | Yeah I need it. Becasue with =destroy you must pass the base type, so for every Foo I do need to create a FooRef in able to use destructors |
18:12:16 | * | adalricus quit (Quit: ERC (IRC client for Emacs 26.3)) |
18:12:20 | leorize | I think not having an easy way to define a finalizer is an oversight that should be fixed |
18:14:29 | * | marmotini_ quit (Remote host closed the connection) |
18:17:27 | leorize | Zevv: https://play.nim-lang.org/#ix=2aVo |
18:18:30 | * | marmotini_ joined #nim |
18:18:33 | Zevv | yes but the problem is the other way around, you're solving the other end |
18:18:36 | Zevv | lemme write it up |
18:19:07 | Zevv | not completely true though |
18:20:31 | Zevv | there is two problems: |
18:20:40 | Zevv | - you can't create a destructor for a ref type |
18:20:58 | Zevv | - there is no shortcut for initializing a ref type (which your example fixes) |
18:21:56 | Zevv | so your thing helps with the other problem |
18:22:02 | Zevv | but still I need an additional type |
18:23:48 | * | floppydh quit (Quit: WeeChat 2.7) |
18:23:53 | leorize | yep, we should ping Araq on this |
18:24:18 | leorize | there should be an easy syntax to declare destructors or finalizers for ref types |
18:25:36 | * | Hideki_ joined #nim |
18:26:27 | Zevv | And while we're at it, I have yet another arc question because I do not understand stuff: This leaks: http://ix.io/2aVq |
18:26:56 | leorize | global variables are not destroyed |
18:27:11 | Zevv | not true. The 'two' destroy gets called. But not the ones. |
18:27:25 | disruptek | well, you don't disarm them. |
18:27:40 | leorize | looks like you found a bug |
18:27:47 | Zevv | no, I don't disarm them |
18:28:47 | disruptek | yes, and you need to. |
18:29:18 | Zevv | somehow it makes sense, but somehow it still feels alien |
18:30:02 | * | icebattle quit (Ping timeout: 240 seconds) |
18:30:07 | * | Hideki_ quit (Ping timeout: 260 seconds) |
18:30:18 | disruptek | it's kinda like "cooperative". you sorta share some of the responsibility with arc. |
18:32:02 | Zevv | sure, I get that. But it feels not intuitive that the fact that having a destuctor for a type changes the cleanup behaveour |
18:32:06 | Zevv | of the other |
18:34:14 | disruptek | i guess the key here is that you have to explicitly set those refs to nil (read: disarm) because simply zero'ing out the memory of Two isn't enough to show arc that the refs shall be destroyed. |
18:34:47 | disruptek | that's the only association that exists, right? |
18:34:58 | Zevv | yes - but |
18:35:03 | * | marmotini_ quit (Read error: Connection reset by peer) |
18:35:21 | Zevv | if two does not have a destructor, the default behaviour is that under water it gets zeroed out |
18:35:28 | Zevv | so that the references to one go away |
18:35:37 | Zevv | but if I *do* have a destructor, it does not do that |
18:35:59 | * | marmotini_ joined #nim |
18:36:05 | disruptek | yeah; because you wouldn't write a destructor unless you had specific behavior you wanted to happen. |
18:36:16 | disruptek | by creating the proc, it becomes your problem to solve. |
18:36:23 | Zevv | The reason I have a destructor, in practice, is that I usually want to do work to cleanup stuff. Closing a socket, saying by to the other end, stuff like that |
18:36:48 | leorize | > A =destroy hook frees the object's associated memory and releases other associated resources. Variables are destroyed via this hook when they go out of scope or when the routine they were declared in is about to return. |
18:36:50 | Zevv | I do not want to take care to clean out every pointer there. Is there a good technical reason why the default behaviour can not also apply when I *do* have a destructor |
18:36:53 | * | icebattle joined #nim |
18:37:07 | leorize | so if you declare a destroy hook it becomes your problem |
18:37:31 | disruptek | there's a performance issue, for one thing. |
18:37:33 | Zevv | leorize: where does it say that in the contract? |
18:38:34 | disruptek | i really don't think it makes sense to confuse the issue by trying to automatically run the default destructor. |
18:38:40 | disruptek | you can always call it yourself, right? |
18:38:42 | leorize | Zevv: > For object however, the compiler generated hooks can be overridden. This can also be important to use an alternative traversal of the involved datastructure that is more efficient or in order to avoid deep recursions. |
18:38:47 | leorize | this is by design |
18:39:19 | disruptek | it's hard to see how it could work otherwise, honestly. |
18:39:33 | leorize | see https://nim-lang.github.io/Nim/destructors#hook-lifting |
18:40:46 | Zevv | leorize: I read that, but I was too naive - I assumed the 'hook' was there for my convenience, as if to use as a regular destructor. I can do some of my own stuff in there, but Nim will make sure nothing leaks in the end |
18:41:21 | Zevv | but now I am responsible for that. As if I still need to free() my C allocations |
18:42:03 | disruptek | did you try calling the default destructor? |
18:42:11 | Zevv | How does one do that? |
18:42:24 | disruptek | `system.destroy=`()? |
18:42:35 | leorize | nah, it doesn't work like that |
18:42:38 | disruptek | something to that effect? |
18:42:49 | Zevv | nope |
18:43:03 | Zevv | Error: call depth limit reached in a debug build (2000 function calls). |
18:43:06 | Zevv | you broke my computer |
18:43:11 | * | tane joined #nim |
18:43:44 | disruptek | that could be a bug, but let's consult the great tomb of arc wisdom. |
18:43:48 | * | marmotin_ joined #nim |
18:43:53 | disruptek | tome, too. |
18:43:57 | * | nsf joined #nim |
18:44:03 | leorize | shashlick: you need to add nimble to the nim project on azure pipelines |
18:44:09 | leorize | narimiran could do that I think |
18:44:13 | Zevv | anyway, it is not that I do not understand all this - I'm doing the devils advocate thing. You give the user a tool to do cleanup, but this brings responsibility again. That needs to be very thoroughly documented. Saying you do GC of refcounting makes people thing everything will be all right in the end |
18:44:23 | * | marmotini_ quit (Read error: Connection reset by peer) |
18:44:26 | disruptek | you're not wrong. |
18:45:12 | Zevv | but I'm not sure how much of this is all final design |
18:45:28 | shashlick | @leorize: please use my updated script from my PR |
18:45:28 | Zevv | I asked some things earlier and got answers indicating things might change |
18:45:29 | * | marmotini_ joined #nim |
18:46:04 | * | marmotin_ quit (Read error: Connection reset by peer) |
18:46:20 | * | marmotini_ quit (Read error: Connection reset by peer) |
18:46:54 | disruptek | there could be a pragma macro added to impl the default destructor; you'd attach this to your existing destructor. |
18:47:14 | Zevv | would the other way around not be the right way? |
18:47:25 | disruptek | what? |
18:47:28 | Zevv | If you have nothing to clean up, there is no need to put in a destructor anyway |
18:47:46 | disruptek | well, it won't hurt in that event. |
18:47:47 | Zevv | but if you want a destructor, you do that to cleanup resources 99% of the time |
18:48:02 | Zevv | But still I would very much like Nim to take care of the memory for me |
18:48:13 | Zevv | and not ask me to nil my pointers. |
18:48:15 | disruptek | right. that's what the macro does. |
18:48:24 | disruptek | anything you haven't disarmed, it will disarm at the end of the proc. |
18:48:34 | Zevv | Do that by default! |
18:48:42 | Zevv | *unless* I ask not to |
18:48:43 | disruptek | feels too implicit to me. |
18:49:02 | disruptek | how do i escape that, for example? |
18:49:07 | Zevv | with your macro! |
18:49:14 | disruptek | hmmph. |
18:49:15 | Zevv | {.letMeDoThatMyselfPlease.} |
18:49:20 | disruptek | bananas. |
18:49:22 | Zevv | because who is ever going to use that |
18:49:34 | leorize | shashlick: why do you need portable git? |
18:49:40 | Zevv | How often do you make data stuctures that are so nasty that you can not trust the default arc to clean them up for you? |
18:49:59 | Zevv | and arc can do that perfectly fine, but you might be able to do that more effectively. |
18:50:13 | disruptek | we're talking about a proc which literally wouldn't exist if that were the case, so it's kinda pointless to consider that scenario. |
18:50:14 | Zevv | So that's an optimization. If you don't ask for it, stuff works just fine and it all gets cleaned up |
18:50:16 | disruptek | it's not part of the problem domain. |
18:50:43 | Zevv | ? |
18:50:50 | disruptek | i would just rather see a pragma that represents code versus seeing no pragma and assuming magic. |
18:51:10 | Zevv | how is this magic? If I do *not* specify my own destructor, it also works. Is that magic? |
18:51:27 | Zevv | no, that is what I would expect from a pragmatic point of view: clean up my shit after me Nim please thank you |
18:51:27 | disruptek | well, it varies with the gc, doesn't it? |
18:51:36 | leorize | shashlick: also, environment variables don't passthrough between steps in azure-pipelines, so I can't use that script |
18:52:14 | Zevv | Ok again - when and why does one need destructors/finalizers? |
18:52:17 | disruptek | you might be right, zevv. |
18:52:30 | shashlick | that's fine - portable git is because cmake fails if the path to git (which carries bash.exe) has spaces in it |
18:52:42 | disruptek | Zevv: araq's favorite example is auto-closing files. |
18:53:00 | Zevv | disruptek: is that a "can you please shut the f up" kind of "you may be right"? |
18:53:05 | * | marmotini_ joined #nim |
18:53:14 | Zevv | right: that is what I mean. That is what your everyday programmer uses those for |
18:53:18 | shashlick | leorize: also i confused your azure yml with travis |
18:53:30 | Zevv | close a file. Close a socket. Delete a file from disk. stuff like that |
18:53:35 | disruptek | no, you're kinda convincing me simply because it should be semantically similar/identical across GCs. |
18:53:50 | Zevv | But when I want to use it for that stuff, I suddenly am resonsible for managing memory - which otherwise was never my problem! |
18:54:09 | disruptek | yeah, i heard you the first time. 😄 |
18:55:13 | Zevv | Yeah but I was still in WHY DOES HE NOT UNDERSTAND ME mode |
18:55:27 | Zevv | takes a few sentences to cool down from that |
18:55:32 | disruptek | everyone makes mistakes. 😉 |
18:55:46 | disruptek | i just think that argument trumps mine. |
18:56:17 | Zevv | well, anyway, it is nice to know that I'm not being just plain stupid |
18:56:27 | disruptek | not /this/ time. |
18:57:20 | Zevv | I think this will just need some time to get the dust settled, but I will do some inquiring with araq one day to see how this is supposed to work in the end |
18:59:26 | leorize | shashlick: https://dev.azure.com/alaviss/Nim/_build/results?buildId=277&view=results |
18:59:33 | leorize | hopefully it finishes :P |
18:59:57 | shashlick | nice you got it working 🙂 |
19:00:38 | * | Pqzcih5 quit (Remote host closed the connection) |
19:11:33 | * | icebattle quit (Ping timeout: 260 seconds) |
19:14:13 | Araq | Zevv: I'm back |
19:14:42 | * | marmotini_ quit (Remote host closed the connection) |
19:15:06 | Zevv | Hi there. So I was rambling about, not sure if you care to read all that back. |
19:16:01 | Araq | I did read it but I'm not sure I understood it |
19:16:19 | Zevv | sorry about that :) |
19:18:05 | * | icebattle joined #nim |
19:18:15 | Zevv | Its a usability thing with finalizers. When I make a finalizer for an object, I get the responsibility to disarm anyting that might be in there. |
19:18:36 | Araq | hmm tell me more |
19:18:41 | Zevv | In practice though, regular users will use destructors mainly for cleanup tasks like sockets and files. But now they also get the responsibility for cleaning up pointers. |
19:19:01 | * | marmotini_ joined #nim |
19:19:02 | Zevv | If I do not make an explicit =destroy for an object, Nim will do the right thing and clean up my memory for me |
19:19:18 | Zevv | if I *do* make an =destroy, it will often be for pragmatical reasons of RAII |
19:19:28 | Araq | it's for x in fields(obj): `=destroy`(x) |
19:19:43 | Araq | inside your custom =destroy, but yeah |
19:19:49 | Zevv | sure. But now that has to go in every destroy. |
19:19:58 | Zevv | Why could nim not do that for my anyway? |
19:20:03 | Araq | cooldome's patch is overly aggressive |
19:20:27 | Zevv | I do see that in some cases complex data structures can be cleaned up better with custom algorithms, but I guess that for the majority of the use cases Nim should just do The Right Thing here |
19:20:33 | Araq | in my mind the body should be close(self.file); system.`=destroy`(self) |
19:20:53 | Zevv | In my mind the body should be `close(self.file)` only |
19:21:09 | Araq | nah, that's a pretty bad solution |
19:21:21 | Zevv | what use case do you see where I would *not* want to do a system.=destroy(self)? |
19:21:22 | Araq | because then you lose the ability to do custom traversals |
19:21:31 | Zevv | But these are the exceptions. Make a pragma for that |
19:21:42 | Zevv | Now you put the burden on everyone who wants to use a destructor |
19:21:45 | Zevv | and the price is high |
19:21:54 | disruptek | the price is one line of explicit code. |
19:22:03 | Zevv | Yes, I mean the price of not putting that in |
19:22:17 | Araq | well I disagree for two reasons: |
19:22:23 | disruptek | should we warn on destructors that have no pragma macro for default cleanup? |
19:22:28 | disruptek | if not, then it's no different. |
19:22:28 | Araq | 1. custom destructors should be rare |
19:23:08 | Araq | 2. trying to do the "best" thing and then opting-out with yet another pragma is 2 features where previously we only had 1 |
19:23:18 | FromDiscord_ | <sveri> Hi, I am trying to get into nim and wanted to parse some yaml. I found this library: https://nimyaml.org/api.html and installed it with `nimble install yaml` |
19:23:18 | FromDiscord_ | <sveri> Now when I try to use that and import it with `import yaml/serialization, streams` I get an error while compiling: |
19:23:18 | FromDiscord_ | <sveri> `specparser.nim(6, 12) Error: cannot open file: yaml/serialization` |
19:24:10 | Zevv | fair enought. But up to now I could always trust Nims memory management to do the right thing |
19:24:26 | Zevv | and now - because I want to close a file - I need to be explicit about these things, or leak |
19:24:40 | disruptek | yeah? |
19:24:47 | * | marmotini_ quit (Remote host closed the connection) |
19:24:57 | disruptek | why do you want to leak so bad, zevv? |
19:25:02 | disruptek | lotta drinking? |
19:25:05 | Araq | sveri: I'm not sure either, I'm not familiar with yaml |
19:25:19 | Araq | Zevv: there is one good argument in your favour though |
19:25:21 | Zevv | disruptek: pay attention dude, I do *not* want to leak |
19:25:26 | Araq | and that is that we already have the pragma |
19:25:39 | Araq | and it's called .nodestroy to skip destructor injections |
19:25:51 | Araq | and already you kinda need it for custom traversals... |
19:26:04 | Zevv | right |
19:26:52 | Araq | still not sure if there is a real problem here. if you do close(x.file) in =destroy you already have a weak abstraction |
19:27:07 | Zevv | also - my final reason: it is just surprising. I do not have a destructor, everything gets cleaned up. I add a destructor to close a file, and suddenly stuff leaks * that did not leak before that * |
19:27:13 | Araq | as the close should be in the =destroy for the File object itself |
19:28:14 | Zevv | well, maybe I want to remove a temp file from disk, or unlock a mutex, or remove a shmem IPC, whatever |
19:28:35 | Zevv | the fact is that first there was no leak, and now there is. It catches me by surprise |
19:31:57 | Araq | I understand |
19:31:59 | disruptek | it'll be surprising if it doesn't leak. |
19:32:03 | Araq | but do you understand my point? |
19:32:06 | * | nsf quit (Quit: WeeChat 2.7) |
19:32:41 | Araq | the way this system is setup is that you have an AutoFile that has a =destroy |
19:32:42 | Zevv | sure I do |
19:33:32 | Zevv | but people will go use this for other things, even if it is bad design |
19:33:55 | disruptek | nim is pointy, yes. |
19:34:39 | Araq | well I know what C++ does |
19:34:54 | Araq | I'm not sure what Rust does, somebody should find out for us |
19:35:07 | Araq | same for Swift which also has this feature |
19:35:37 | Araq | if we do it like the 3 major competitors it's fair to not expect too many complaints about it :P |
19:35:58 | Zevv | anyway, just my two cents |
19:36:08 | FromDiscord_ | <sveri> Araq: do you have an idea how I can figure out what the problem is? |
19:36:08 | Araq | yeah, yeah, "copying bad design is not good design", but what if we don't know what good design looks like ;-) |
19:36:32 | Araq | sveri: which OS are you on? |
19:36:39 | FromDiscord_ | <sveri> Windows |
19:36:51 | Araq | ok, one sec |
19:38:42 | disruptek | i'm still not convinced it can even work if you auto-invoke a default destructor. |
19:39:29 | Araq | sveri: works for me |
19:39:47 | Araq | maybe you have a problem with your configuration? |
19:39:56 | Araq | you can also do |
19:40:07 | * | solitudesf- joined #nim |
19:40:30 | Araq | nim c --path:here_is_the_fun/.nimble/pkgs/yaml-0.12.0 mymodule.nim |
19:40:47 | FromDiscord_ | <sveri> Araq: I will try that, thank you |
19:42:17 | disruptek | what about a hook that runs at the top of the default destructor? |
19:42:48 | disruptek | then you can define `=alsodestroy`() for file.close and rely on the normal object teardown for the remainder. |
19:43:08 | Araq | disruptek, Zevv I think it's fine to say that right now we need another round of bugfixes before we can tweak the existing language rules |
19:43:13 | * | solitudesf quit (Ping timeout: 272 seconds) |
19:43:24 | Zevv | fair enough :) |
19:43:33 | disruptek | yeah, i'm not worried. |
19:48:51 | FromDiscord_ | <sveri> Araq: it works using nim. But running nimble test it cannot find the yaml parser. When I start the tests with `nim c -r tests` it works. |
19:48:51 | FromDiscord_ | <sveri> Does nimble have known problems on windows? Is it better to just use nim for running stuff in a project / library? |
19:50:44 | * | dddddd joined #nim |
19:54:11 | Zevv | disruptek: are you ever? |
19:54:19 | shashlick | sveri: what does `nimble path yaml` say |
19:54:28 | shashlick | also what's the directory contents of that path |
19:54:40 | shashlick | i just tried as well and it works fine |
19:54:41 | shashlick | w |
19:54:47 | shashlick | versions of nim/nimble will help |
19:55:52 | FromDiscord_ | <sveri> ``` |
19:55:53 | FromDiscord_ | <sveri> nimble path yaml |
19:55:53 | FromDiscord_ | <sveri> C:\Users\sveri\.nimble\pkgs\yaml-0.12.0 |
19:55:53 | FromDiscord_ | <sveri> nimble -v |
19:55:53 | FromDiscord_ | <sveri> nimble v0.11.0 compiled at 2020-01-23 17:35:57 |
19:55:53 | FromDiscord_ | <sveri> git hash: 4007b2a778429a978e12307bf13a038029b4c4d9 |
19:55:53 | FromDiscord_ | <sveri> ``` |
19:55:58 | shashlick | ~paste |
19:55:59 | disbot_ | paste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. |
19:56:02 | FromDiscord_ | <sveri> The path resolves correctly, the package exists |
19:56:44 | shashlick | what is in `C:\Users\sveri\.nimble\pkgs\yaml-0.12.0\yaml` |
19:57:40 | * | ptdel joined #nim |
19:57:59 | FromDiscord_ | <sveri> https://paste.ee/p/r4u6F |
20:01:15 | shashlick | okay, did you add `yaml` to your `.nimble` file with a `requires` statement? |
20:15:37 | FromDiscord_ | <sveri> ah no, I did not do that. I thought it does that automatically. |
20:23:02 | * | Zectbumo quit (Remote host closed the connection) |
20:23:18 | shashlick | without that, nimble won't include it in the requirements |
20:26:50 | * | letto quit (Quit: Konversation terminated!) |
20:27:32 | * | letto joined #nim |
20:31:23 | * | Zectbumo joined #nim |
20:37:38 | Zevv | 1 |
20:37:38 | Zevv | 1 |
20:37:51 | * | dadada joined #nim |
20:37:57 | dadada | kotlin has some nice features, positively surprised as I thought all the hype around that lang was mostly buzz |
20:38:01 | dadada | there's still a significant number of things I prefer about nim |
20:38:06 | dadada | but if I had to do something with JVM I think I wouldn't mind kotlin |
20:47:43 | PMunch | Clojure is another thing to try on the JVM |
20:47:47 | PMunch | Really nice language |
20:47:54 | dadada | I think this introductory video by the lang's dev is well worth watching: https://www.youtube.com/watch?v=6P20npkvcb8 |
20:47:57 | disruptek | nim'll run in the jvm via graal. |
20:48:09 | dadada | disruptek: cool |
20:48:24 | PMunch | Why though? |
20:48:48 | disruptek | interop with other graal languages. |
20:49:00 | PMunch | Aaah rigt |
20:49:12 | FromDiscord_ | <sveri> shashlick: that did it, thank you 🙂 In hindsight it's obvious, but the docs said that nimble install is enough. |
20:49:19 | dadada | PMunch: I have a weak spot for anything lisp like :D |
20:51:20 | PMunch | Same here, just don't tend to use them much :P Had a look at Janet recently: https://janet-lang.org/ |
20:51:27 | PMunch | Looks a lot like Clojure |
20:51:37 | * | krux02 joined #nim |
20:51:39 | * | revere quit (*.net *.split) |
20:51:39 | * | d-nice2[m] quit (*.net *.split) |
20:51:40 | * | planetis[m] quit (*.net *.split) |
20:51:54 | * | revere joined #nim |
20:54:03 | * | gsingh93 quit (Ping timeout: 240 seconds) |
20:55:29 | * | MyMind joined #nim |
20:55:47 | disruptek | ~motd is janet versus fennel... fight! |
20:55:47 | disbot_ | motd: 11janet versus fennel... fight! |
20:56:35 | * | gsingh93 joined #nim |
20:57:11 | * | Sembei quit (Ping timeout: 268 seconds) |
21:02:15 | * | narimiran quit (Ping timeout: 260 seconds) |
21:26:47 | * | oculux quit (Ping timeout: 268 seconds) |
21:28:25 | FromDiscord_ | <Auriel> didn't use fennel yet but I think it would have a case of usage for me for scripts in one game; the output is clearly readable so it could be easily used if somebody prefer lua |
21:30:56 | * | oculux joined #nim |
21:38:29 | * | oculux quit (Ping timeout: 272 seconds) |
21:39:51 | * | oculux joined #nim |
21:40:46 | disruptek | well, that's just it, right? |
21:41:15 | disruptek | isn't #13203 actually fixed now? |
21:41:17 | disbot_ | https://github.com/nim-lang/Nim/issues/13203 -- 3realloc() performance: -d:useMalloc vs Nim default allocator ; snippet at 12https://play.nim-lang.org/#ix=2aWu |
21:46:46 | * | tiorock joined #nim |
21:46:46 | * | tiorock quit (Changing host) |
21:46:46 | * | tiorock joined #nim |
21:46:46 | * | rockcavera is now known as Guest17347 |
21:46:46 | * | tiorock is now known as rockcavera |
21:50:39 | * | Guest17347 quit (Ping timeout: 268 seconds) |
21:53:28 | Zevv | mooi man bij $klant krijgt iedereen een mooie bluetooth keyfinder |
21:53:34 | Zevv | dan moet je een app installeren van 23 MB |
21:53:51 | Zevv | ik heb nu een scriptje waarmee ik alle keychains in het pand kan laten bleeepen op de alarmstand |
21:53:55 | Zevv | en een pret dat we hebben |
21:54:18 | Zevv | Oops, EWRONGWIN again :/ |
21:54:19 | disruptek | i don't believe it. |
21:55:07 | Zevv | of course you don't |
21:55:35 | * | nullwarp quit (Ping timeout: 272 seconds) |
21:56:20 | Zevv | but to stay on topic - what would have fixed 13203 then? |
21:56:36 | disruptek | i thought you made a realloc. |
21:56:49 | * | PMunch quit (Quit: leaving) |
21:57:05 | Zevv | nope. my realloc is the -d:useMalloc realloc |
21:57:16 | Zevv | but the default Nim allocator does not properly relalloc |
21:57:33 | disruptek | even in refc? |
21:57:46 | Zevv | there is simply no efficient realloc implementation in the allocator |
21:57:57 | Zevv | it falls back to malloc()/memcpy()/free() |
22:00:39 | disruptek | aha, i'm an idiot. i get it. |
22:06:09 | * | arecaceae quit (Remote host closed the connection) |
22:07:04 | * | arecaceae joined #nim |
22:08:07 | Araq | there is one for TLSF |
22:08:18 | Araq | but before ARC we couldn't use it anyway |
22:08:37 | Araq | if I find the algorithm again, we can port it |
22:08:53 | disruptek | neat. |
22:16:06 | * | nullwarp joined #nim |
22:17:05 | leorize | how does devel even pass CI? |
22:17:07 | leorize | https://dev.azure.com/alaviss/Nim/_build/results?buildId=280&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=356bb04c-cb4a-5f04-82ca-d3b102917eba |
22:18:01 | leorize | I'm adding important packages testing to nimble and I can't make it pass |
22:19:04 | disruptek | sumthin's diff'ent. |
22:21:24 | leorize | and even more interesting it seems, I could replicate the results easily |
22:22:25 | * | nullwarp_ joined #nim |
22:24:07 | * | nullwarp quit (Ping timeout: 240 seconds) |
22:24:55 | * | natrys quit (Quit: natrys) |
22:27:23 | * | Hideki_ joined #nim |
22:28:06 | dadada | don't know if you know, but I just tested it, and you can apparently always get the latest version of nim with homebrew |
22:28:16 | dadada | which I'm using on linux |
22:28:45 | dadada | my distro Fedora also packages Nim, but they take a little longer than homebrew for getting updates |
22:29:01 | dadada | Fedora's nim version is at 1.0.4, while homebrew has 1.0.6 |
22:29:04 | * | solitudesf- quit (Ping timeout: 268 seconds) |
22:29:40 | dadada | install brew is basically a one-liner and then some changes to PATH |
22:29:51 | dadada | s/install/installing |
22:29:59 | dadada | then |
22:30:02 | dadada | brew install nim |
22:30:04 | dadada | and you're done |
22:30:26 | * | oculux quit (Ping timeout: 240 seconds) |
22:30:36 | leorize | usually we use choosenim :P |
22:30:37 | dadada | brew upgrade nim |
22:30:48 | dadada | for always getting the latest and greatest |
22:31:27 | * | Hideki_ quit (Ping timeout: 240 seconds) |
22:31:41 | dadada | homebrew works on all linux distros and macos :D probably also Window's subsystem for Linux, but I've not investigated this |
22:31:43 | leorize | shashlick: I figured out the problem |
22:31:54 | leorize | the lack of CI for nimble is the problem |
22:32:24 | leorize | nimble master branch has been broken since after 0.11.0 |
22:32:38 | leorize | it might be more recent but I can't bisect rn |
22:33:02 | dadada | leorize: wanted to present a great alternative, of course you can use homebrew for much more than just install Nim |
22:34:21 | * | Zectbumo quit (Remote host closed the connection) |
22:35:51 | * | tane quit (Quit: Leaving) |
22:38:22 | * | krux02 quit (Remote host closed the connection) |
22:38:36 | * | nullwarp_ is now known as nullwarp |
22:39:34 | leorize[m] | yea, though I'm not a fan of running more than one package manager in a system |
22:40:29 | disruptek | oh, i dunno... i was sad that i couldn't get guix working. |
22:40:43 | disruptek | i'd like to use it for my toolchains. |
22:41:48 | dadada | homebrew restricts itself to a hidden directory in your home folder, which why it has very little chance of creating a mess, you could simply wipe it with one simple rm -rf |
22:42:03 | dadada | which is |
22:46:46 | * | shadowbane quit (Quit: Konversation terminated!) |
22:50:02 | * | shadowbane joined #nim |
22:50:36 | dadada | disruptek: homebrew is dead simple to get working |
22:51:01 | disruptek | yeah, i've used it for years. |
22:51:10 | disruptek | but homebrew != nix/guix. |
22:51:55 | * | acidx quit (Ping timeout: 260 seconds) |
22:52:00 | dadada | do you know about bedrocklinux? |
22:52:35 | dadada | I've not yet tried it, but it's an intriguing project |
22:52:50 | * | acidx joined #nim |
22:54:40 | disruptek | nope. what's it about? |
22:56:14 | dadada | have you ever felt that there are multiple good distributions with pros and cons, but you have to make a decision on what to settle for? |
22:56:21 | dadada | it's the solution to that issue |
22:57:17 | dadada | maybe not a perfect solution, but pretty cool "meta distribution", which can hijack your running distro to become "bedrocklinux" |
22:57:29 | disruptek | hmm. |
22:57:55 | disruptek | is it container-based? |
22:57:58 | dadada | no |
22:59:32 | disruptek | how much memory do you expect llvm to consume during a linux build? |
23:02:42 | dadada | disruptek: it's an unrelated question, right? |
23:02:47 | disruptek | yep. |
23:04:25 | dadada | more than 64k, I can not give a serious answer to this question :D |
23:04:57 | disruptek | i'm at about 40gig and, i dunno, that's starting to feel like real memory. |
23:06:07 | dadada | true, I think it reserves more than it needs to use |
23:07:14 | dadada | can linux be compiled with llvm now? it didn't use to work, special extensions to gcc and all |
23:07:28 | disruptek | dunno. |
23:08:29 | FromDiscord_ | <Faster Speeding> anybody got an idea what would be causing `Error: internal error: genTypeInfo(tyNil)`? |
23:10:27 | FromDiscord_ | <Faster Speeding> https://gist.github.com/FasterSpeeding/09e6a28a08e5c50a30433ff509e6b2ed is the generated traceback |
23:16:07 | * | rhenvar quit (Quit: Leaving) |
23:19:11 | leorize[m] | disruptek: llvm took 2-4gb to build |
23:19:37 | disruptek | this is working, which is perhaps even more surprising. |
23:19:53 | leorize[m] | @Faster Speeding can you file an issue on github? internal errors are bugs |
23:20:11 | FromDiscord_ | <Faster Speeding> ok, will do thx |
23:27:18 | shashlick | Leorize: what's the bug in nimble |
23:34:17 | * | dawkot joined #nim |
23:34:53 | * | dawkot left #nim (#nim) |
23:56:10 | disruptek | no alarms and no surprises. |
23:56:16 | * | couven92 quit (Quit: Client Disconnecting) |