00:01:20 | * | Hideki_ joined #nim |
00:01:22 | * | Hideki_ quit (Remote host closed the connection) |
00:01:55 | * | Hideki_ joined #nim |
00:04:25 | * | adeohluwa joined #nim |
00:08:35 | * | Hideki_ quit (Ping timeout: 265 seconds) |
00:12:38 | * | abm quit (Read error: Connection reset by peer) |
00:15:05 | * | adeohluwa quit (Remote host closed the connection) |
00:21:36 | * | kungtotte quit (Ping timeout: 240 seconds) |
00:38:38 | * | Hideki_ joined #nim |
00:50:47 | * | laaron joined #nim |
00:51:47 | * | laaron quit (Client Quit) |
00:52:16 | * | laaron joined #nim |
00:53:40 | * | Hideki_ quit (Ping timeout: 268 seconds) |
01:04:54 | * | laaron quit (Remote host closed the connection) |
01:09:10 | * | kungtotte joined #nim |
01:38:16 | * | laaron joined #nim |
01:39:39 | * | laaron quit (Client Quit) |
01:40:01 | * | laaron joined #nim |
01:44:21 | * | laaron quit (Remote host closed the connection) |
01:45:41 | FromGitter | <iffy> I'm getting a "Bad file descriptor" error with an asyncnet server. The error is raised during a `poll()` invocation. It happens just after I close an AsyncSocket client socket (but not right at the point that I close it). Full traceback and some relevant code here: https://gist.github.com/iffy/4cd33aaa7af421fe37759570178c10ec |
01:47:21 | disruptek | iffy: most likely because an exception is raised and the server pukes on it. |
01:47:50 | disruptek | nothing you can do about it but nag dom96, who maintains that this is desirable behavior. see my pr. |
01:47:58 | FromGitter | <iffy> How can I find where the exception is being raised? |
01:48:11 | disruptek | it doesn't matter, there's nothing you can do but catch it. |
01:48:23 | FromGitter | <iffy> so it's not my code that's causing the error? |
01:48:29 | disruptek | correct. |
01:48:42 | FromGitter | <iffy> in that case: dom96: nag, nag, nag |
01:49:23 | FromGitter | <iffy> disruptek: have a link to your PR? |
01:49:52 | disruptek | https://github.com/nim-lang/Nim/pull/12325 |
01:50:10 | disruptek | unlikely to be the same code, but likely to be the same problem. |
01:51:30 | FromGitter | <iffy> okay, yeah, that PR is for http specifically, and I'm using AsyncSocket directly |
01:51:39 | FromGitter | <iffy> and NOT doing HTTP |
01:51:39 | disruptek | unlikely to be the same code, but likely to be the same problem. |
02:16:46 | FromGitter | <iffy> On further testing, the error is only raised if I call AsyncSocket.close() myself |
02:17:22 | disruptek | but it's raised in the server loop, yes? |
02:19:59 | FromGitter | <iffy> It's raised in my call to `poll()` |
02:20:01 | FromGitter | <iffy> yes |
02:20:22 | disruptek | so, this is the same problem. |
02:21:33 | disruptek | anyway, you are encouraged to submit a pr. i actually don't use this code; my pr was just to help out zedeus. |
02:21:36 | FromGitter | <iffy> But I don't think the solution is to catch "Bad file descriptor" in my code... I think `poll()` or maybe `AsyncSocket` needs to change |
02:21:41 | FromGitter | <iffy> okay |
02:22:00 | disruptek | yes, the problem is that an exception shouldn't crash the main loop of the server. |
02:22:21 | disruptek | unfortunately, there is likely no way to write such a server due to private procs. |
02:22:50 | FromGitter | <iffy> I think there are two problems: 1. an exception shouldn't crash the main loop of the server and 2. AsyncSocket or whatever is causing this particular exception, should stop causing this exception |
02:23:55 | FromGitter | <gogolxdong> Is there a benchmark proc in Nim? |
02:24:05 | disruptek | i agree, but it's going to be a much harder sell to change the API to merely report an error versus raising an exception. |
02:24:50 | disruptek | gogolxdong: not yet, but you can add one to this: https://github.com/disruptek/golden |
02:25:59 | FromGitter | <iffy> I think I'm saying, I want to fix this particular error so it doesn't even happen. There will be no report and no exception. In python "bad file descriptor" happens when you `os.close(somefd)` twice. I suspect that's what's happening here |
02:26:52 | disruptek | could be, but the thing is, async can yield exceptions for myriad reasons. |
02:27:35 | disruptek | here's the example zedeus created: https://github.com/zedeus/jester-example |
02:28:26 | * | theelous3 quit (Ping timeout: 240 seconds) |
02:28:34 | FromGitter | <iffy> okay, maybe I can make a sscce that uses only asyncnet |
02:50:21 | * | Hideki_ joined #nim |
02:54:51 | * | Hideki_ quit (Ping timeout: 265 seconds) |
02:55:09 | FromGitter | <iffy> disruptek: up for verifying that this fails for you? https://gist.github.com/iffy/cb7b01c15990cf34433e821bb21c49d1 |
03:02:33 | * | lritter quit (Ping timeout: 268 seconds) |
03:02:59 | * | lritter joined #nim |
03:06:20 | FromGitter | <iffy> disruptek: thanks for being a sounding board. I filed a minimal reproducing example here: https://github.com/nim-lang/Nim/issues/12382 |
03:27:55 | * | dddddd quit (Remote host closed the connection) |
03:28:59 | zedeus | disruptek: when I ran my project behind nginx with asynchttpserver, every single request triggered that error, not just cancelled ones |
03:29:08 | zedeus | so I kinda gave up, haven't had time to look into it |
03:29:33 | zedeus | decided to patch httpbeast to fix the issue I was having instead |
03:43:22 | FromGitter | <gogolxdong> Anyone knows which concepts are borrowed accordingly from ⏎ `It combines successful concepts from mature languages like Python, Ada and Modula.`? |
03:44:03 | leorize | indent from python |
03:44:09 | * | chemist69 quit (Ping timeout: 250 seconds) |
03:44:11 | leorize | `distinct` from ada iirc |
03:46:07 | * | chemist69 joined #nim |
04:11:05 | * | rockcavera quit (Remote host closed the connection) |
04:33:32 | * | narimiran joined #nim |
04:36:29 | * | skoude joined #nim |
04:46:41 | * | nsf joined #nim |
05:12:59 | * | skoude quit (Ping timeout: 276 seconds) |
05:33:29 | * | krux02 joined #nim |
05:51:16 | * | whaletechno quit (Ping timeout: 240 seconds) |
06:01:06 | * | absolutejam4 joined #nim |
06:02:38 | * | skoude joined #nim |
06:22:52 | * | absolutejam4 quit (Ping timeout: 264 seconds) |
06:30:26 | * | solitudesf- joined #nim |
06:40:16 | * | PMunch joined #nim |
06:49:16 | * | fanta1 joined #nim |
06:52:11 | * | Hideki_ joined #nim |
06:56:33 | * | Hideki_ quit (Ping timeout: 250 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:02:27 | FromGitter | <gogolxdong> Which standard version does Nim interoperate with C and C++ accordingly, is it C89 and ANSI C++ or ISO C++ 98? |
07:03:49 | Araq | C89 but mostly "The C that GCC/Clang and Visual C++ support" |
07:04:22 | Araq | the standards are unusable when you read them carefully enough |
07:05:05 | * | gmpreussner joined #nim |
07:06:31 | FromGitter | <gogolxdong> and C++? |
07:09:11 | Araq | C++98, but the same really, whatever works with the common C++ compilers |
07:11:46 | FromGitter | <gogolxdong> sure. |
07:14:38 | * | absolutejam4 joined #nim |
07:16:29 | * | onionhammer quit (Ping timeout: 276 seconds) |
07:19:41 | FromDiscord | <juan_carlos> On `db_postgres.prepare()` whats `stmtName` used for?, just debug, because other proc that take `SqlPrepared` dont need that same string. |
07:22:08 | FromGitter | <gogolxdong> By default the Nim compiler generates a large amount of runtime checks ⏎ aiming for your debugging pleasure. With ``-d:release`` some checks are ⏎ `turned off and optimizations are turned on` , iirc, -d:release changes. |
07:23:34 | FromGitter | <gogolxdong> turns on all runtime checks? |
07:25:27 | PMunch | I think the disabling of most runtime checks have now moved to -d:danger |
07:25:37 | * | Vladar joined #nim |
07:26:28 | * | gampolt joined #nim |
07:26:49 | FromGitter | <gogolxdong> what does -d:release do then? turns on all runtime checks and optimizations? |
07:27:28 | FromDiscord | <Rika> Runtime checks are on by default AFAIK, release only adds optimizations I think |
07:31:04 | * | floppydh joined #nim |
07:32:06 | * | thomasross_ joined #nim |
07:32:06 | * | thomasross quit (Killed (orwell.freenode.net (Nickname regained by services))) |
07:32:06 | * | thomasross_ is now known as thomasross |
07:33:18 | * | solitudesf- quit (Quit: Leaving) |
07:33:32 | * | solitudesf joined #nim |
07:34:28 | * | gampolt quit (Remote host closed the connection) |
07:34:49 | * | me7 joined #nim |
07:45:37 | FromGitter | <gogolxdong> Is there a game in Nim? |
07:45:46 | PMunch | Yes, multiple |
07:49:38 | narimiran | @gogolxdong see https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L54 for what is done in `danger` and `release` |
07:50:30 | FromGitter | <gogolxdong> I'm doing a video to introduce what can Nim do, we have our production as server dev and web frontend dev and a working Vulkan demo as demostration, lacking of embedded dev , AI and games. Any good ideas? |
07:51:24 | FromGitter | <gogolxdong> @narimiran thanks, it's helpful. |
07:52:24 | PMunch | Hmm, I don't know any large games written in Nim. But you can always use one of the recent Game Jam games :) |
07:52:40 | PMunch | At least it shows off how quickly and easily you can make games in Nim |
07:53:58 | PMunch | https://github.com/liquid600pgm/memrecall https://www.reddit.com/r/nim/comments/de04ld/live_nim_programming_succulentia_day_2_ludum_dare/ |
07:57:39 | * | theelous3_ quit (Ping timeout: 240 seconds) |
08:00:27 | * | fredrik92 joined #nim |
08:00:48 | * | couven92 quit (Disconnected by services) |
08:00:53 | * | fredrik92 is now known as couven92 |
08:01:16 | * | fredrik92 joined #nim |
08:01:57 | * | actuallybatman quit (Ping timeout: 246 seconds) |
08:03:41 | PMunch | Ooh, fun! I was enrolled into the GitHub sponsorship beta :P |
08:08:54 | Araq | PMunch, thew new neverwinter nights backend is written in Nim |
08:10:15 | planetis[m] | omg he is using Windows (TM) theme in xfce (or something) linux |
08:10:24 | planetis[m] | ...I am having flashbacks |
08:11:08 | PMunch | Araq, oh the back-end is actually written in Nim? Cool |
08:11:16 | PMunch | I thought they were just using it for internal tools |
08:11:26 | PMunch | planetis[m], yeah it appears so.. |
08:11:49 | PMunch | I was first wondering why he was still using Windows 98 :P |
08:12:17 | PMunch | Hmm, would you be able to run Nim on Win98? I don't see why not, but potentially something has broken |
08:14:15 | Araq | we try to support Windows XP but no promises about that |
08:14:50 | Araq | nobody should run Win98 IMO |
08:16:06 | livcd | What If I want to run Nim on an ATM ? |
08:16:09 | planetis[m] | Win98 was my first computer, the horrors! |
08:17:15 | * | thomasross quit (Ping timeout: 240 seconds) |
08:17:46 | livcd | btw I think Windows XP is still used in China a lot |
08:18:01 | PMunch | Yeah apparently |
08:18:28 | PMunch | Do they do some sort of 3rd party updates to it? Or is it just a horrible insecure mess? |
08:18:38 | livcd | horrible insecure mess |
08:19:02 | PMunch | Didn't the NHS (UKs National Health Services or something like that) also get hit pretty hard by that ransomware that targeted WinXP? |
08:19:06 | PMunch | livcd, great.. |
08:20:09 | livcd | jesus it's really hard to find things when you are in a different country and want to search for specific things :/ |
08:21:51 | * | onionhammer joined #nim |
08:21:55 | * | thomasross joined #nim |
08:22:04 | livcd | BTW in China most of the major apps are native apps |
08:25:08 | planetis[m] | gogolxdong: there was a repo for a russian Ai competition |
08:25:20 | planetis[m] | https://github.com/xomachine/RAIC2017-Nim |
08:25:39 | livcd | but I am actually not sure whether they use platform specific APIs or QT or something else |
08:26:20 | livcd | gogolxdong: what chinese native apps do you use ? |
08:27:08 | FromGitter | <gogolxdong> windows or mobile? |
08:29:01 | planetis[m] | also a toy neural net with a web demo: http://bontavlad.com/blog/2017/06/15/simple-neural-network-written-in-nim-running-on-the-web/ |
08:29:52 | * | droid joined #nim |
08:30:03 | livcd | gogolxdong: windows |
08:32:25 | FromGitter | <gogolxdong> you mean something like Office? |
08:34:06 | Araq | https://blog.hediet.de/post/how-to-stress-the-csharp-compiler |
08:34:40 | FromDiscord | <Kiloneie> Guys, which package is the best so far for GUI in Nim ? There seems to be quite a few, one wxNim by Araq, one by PMunch, then there is wNim... Which one works best etc ? |
08:35:05 | * | sagax quit (Remote host closed the connection) |
08:35:32 | FromDiscord | <juan_carlos> On `db_postgres.prepare()` whats `stmtName` used for?, just debug?, because other proc that take `SqlPrepared` dont need that string. |
08:35:58 | Araq | juan_carlos: that might exist for compat with the other db_* modules |
08:36:11 | FromGitter | <gogolxdong> We have WPS Office comparable Microsoft Office, but most people uses Microsoft Office. There isn't much difference on Windows but on Web. |
08:36:57 | FromGitter | <gogolxdong> We have every comparable to Google, Facebook, youtube, Twitter |
08:37:08 | FromDiscord | <juan_carlos> Thanks <Araq> |
08:37:41 | FromGitter | <gogolxdong> even github.com, github.com is limited. |
08:38:21 | Araq | Kiloneie: it mostly depends on your app, many apps are built around a single "widget" that decides for you, for example an audio player needs a "play audio" component |
08:38:35 | * | ng0 joined #nim |
08:39:11 | * | me7 quit (Remote host closed the connection) |
08:39:43 | Araq | there are few UI libs that support almost everything, I think wxWidgets and Qt can do it. Maybe GTK too. |
08:39:46 | PMunch | Kiloneie, depends on what you mean by "best" |
08:40:47 | FromDiscord | <Kiloneie> let's say most documented and tested ?... |
08:41:03 | livcd | gogolxdong: I meant desktop apps that you use. Like Wechat Work etc |
08:41:09 | FromGitter | <gogolxdong> yeah, we have QQ for instant messaging. |
08:41:28 | PMunch | Well my wxNim fork wraps wxWidgets, which has been used for many years and is thoroughly tested and documented |
08:41:46 | PMunch | As far as the wrapping goes however it's not been tested that rigourously |
08:41:47 | FromDiscord | <Kiloneie> the one by you or Araq ?, i see 2 |
08:42:10 | PMunch | The one by me, I forked it to add some stuff, and essentially just took over maintaining it |
08:42:22 | PMunch | Not sure if Araqs version can even run on modern Nim |
08:42:52 | FromDiscord | <Kiloneie> aha okay, thanks |
08:43:04 | * | sagax joined #nim |
08:43:34 | livcd | we can all try to write some example app and compare |
08:43:39 | livcd | re GUI |
08:44:06 | FromGitter | <gogolxdong> most personal and office computer uses windows 10 now, only some embedded and supermarket cashier system uses XP. |
08:44:26 | FromDiscord | <Kiloneie> Well some people asked me to make some for tutorial, so i guess imma do some GUI stuff, which should go outside my current video series. |
08:45:01 | PMunch | livcd, certainly a possibility |
08:45:40 | FromDiscord | <Kiloneie> Imma try a few and see which one i find the easiest that also works as it should etc. |
08:45:54 | livcd | Kiloneie: i dunno desktop apps can be very different |
08:46:59 | FromGitter | <gogolxdong> @Kiloneie are you the one who is doing youtube tutorial series, it's great and helpful, can we share them to our youtube? |
08:47:00 | FromGitter | <alehander42> so now with ffi support for the vm |
08:47:03 | FromGitter | <alehander42> when its enabled |
08:47:14 | FromGitter | <alehander42> should it be able to import all kinds of system stuff like `os` |
08:48:03 | FromGitter | <alehander42> i guess it enables calling importc functions etc, so this is all that is needed in theory right |
08:48:07 | FromDiscord | <Kiloneie> Yeah i am, and yes you can. |
08:48:36 | FromGitter | <gogolxdong> We have followed to the lastest, is it 10? |
08:48:39 | livcd | Kilonie: PMunch: the question is. Do you want to have a nice looking desktop app or are you making an ugly looking desktop form ? |
08:48:46 | FromDiscord | <juan_carlos> Theres also a GUIBuilder thing on Nimble. |
08:48:49 | FromDiscord | <Kiloneie> the version in tutorials is 1.0 |
08:49:04 | FromGitter | <alehander42> @timotheecour maybe i ping you |
08:49:19 | FromGitter | <gogolxdong> the 10th tutorial |
08:49:21 | FromDiscord | <Kiloneie> I guess nice looking ? |
08:49:48 | livcd | Then you are stuck with a very few frameworks that are all commercial AFAIK |
08:50:14 | FromDiscord | <Kiloneie> you can share my videos however you want, what you can't do is take a video and post it on your channel. |
08:50:22 | PMunch | Depends on your definition of ugly.. |
08:50:40 | PMunch | I personally prefer most of my apps to use Gtk so that they will stick to the theme off my machine.. |
08:51:02 | FromDiscord | <Kiloneie> So far wNim seems pretty decent. |
08:51:14 | livcd | well gtk is ugly...are there any nice looking gtk apps ? |
08:51:25 | PMunch | wNim is pretty nice if you want to only make Windows apps |
08:51:39 | PMunch | livcd, Gtk isn't ugly, but there are plenty of ugly Gtk themes.. |
08:51:39 | livcd | PMunch: my definition of nice: https://www.glasswire.com/ |
08:51:59 | FromDiscord | <Kiloneie> Oh yeah... didn't think about cross platform |
08:52:02 | Araq | you can use wNim + Wine :P |
08:52:09 | livcd | visually appealing |
08:52:11 | PMunch | Araq, hooray.. |
08:52:38 | livcd | glasswire is using QT as far as I know |
08:52:39 | Araq | hey, it's only fair, they also try to trick me into Cygwin crap all the time |
08:53:05 | FromGitter | <gogolxdong> youtube is banned, I shared your series and marked as repost and the original links. |
08:53:55 | FromGitter | <alehander42> what do people use instead of youtube |
08:53:57 | FromGitter | <alehander42> in china |
08:54:03 | PMunch | livcd, yeah it appears like it's Qt, but the graphs are probably a custom widget |
08:54:12 | livcd | Youku |
08:54:13 | livcd | Tudou |
08:54:28 | FromGitter | <gogolxdong> previously it's Youku and Tudou |
08:54:46 | Araq | sure, I want some bullshit "posix emulation" on Windows with its misdesigned fork() and memory overcommit |
08:54:50 | FromGitter | <alehander42> it has nice ui |
08:54:56 | FromGitter | <gogolxdong> now bilibili is more popular. |
08:55:09 | FromGitter | <alehander42> its time for unikernels os-es are so 1999 |
08:55:18 | livcd | oh did not know that gogolxdong |
08:55:46 | FromGitter | <alehander42> hm, bilibili looks more anime-focused |
08:55:57 | FromGitter | <alehander42> but maybe thats what i am seeing in my feed in europe |
08:56:00 | livcd | PMunch: minus the graphs the UI is good looking as it should be |
08:56:17 | PMunch | Oh cool, krux02 wrapper AntTweakBar |
08:57:45 | FromDiscord | <Kiloneie> That's good |
08:57:57 | FromGitter | <gogolxdong> I feel the same but it's just popular, I don't understand. It even doesn't support markdown. |
08:58:02 | FromDiscord | <Kiloneie> China is the VPN country now |
08:58:31 | PMunch | Oh interesting: https://nimble.directory/pkg/uibuilder Glade -> Nim compile-time |
08:58:40 | livcd | https://szibele.com/memory-footprint-of-gui-toolkits/ |
09:00:52 | livcd | can anyone make Nim bindings for JUCE ? :X |
09:01:30 | FromGitter | <gogolxdong> have to post picture of code snippet, bilibili has technique category among many furry,cute, animation thing. |
09:02:58 | * | ball1 joined #nim |
09:05:03 | * | shomodj joined #nim |
09:05:49 | FromDiscord | <juan_carlos> Wow Flutter thinks RAM is free real state. :P |
09:07:55 | livcd | flutter builds are all debug builds that's why |
09:15:53 | * | droid quit () |
09:16:36 | * | absolutejam4 quit (Ping timeout: 240 seconds) |
09:24:08 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:29:07 | * | shomodj joined #nim |
09:36:15 | * | absolutejam4 joined #nim |
09:39:17 | * | dddddd joined #nim |
09:39:35 | * | couven92 quit (Quit: Disconnecting) |
09:42:03 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:58:18 | * | shomodj joined #nim |
10:05:29 | * | narimiran quit (Ping timeout: 276 seconds) |
10:11:53 | * | abm joined #nim |
10:18:36 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:24:51 | * | thomasross is now known as Guest61544 |
10:24:51 | * | thomasross_ joined #nim |
10:24:51 | * | Guest61544 quit (Killed (adams.freenode.net (Nickname regained by services))) |
10:24:51 | * | thomasross_ is now known as thomasross |
10:29:35 | * | shomodj joined #nim |
10:39:16 | FromGitter | <gogolxdong> @Kiloneie How many times will you try to produce a video? |
10:39:57 | FromGitter | <gogolxdong> I'm always stuck today. |
10:42:18 | FromDiscord | <Kiloneie> What do you mean how many times ? If you mean if i will keep doing them, then yes i will. Right now i am just making one a day for Nim for Beginners series, but i am planning on other series as well, as well as one of videos that don't belong anywhere else. |
10:42:55 | FromDiscord | <Kiloneie> i am not working not even close to what i could be, 1 a day is pretty easy, but i can do more and will try to. |
10:43:45 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:50:54 | FromGitter | <gogolxdong> How many times of trying to make a fluent video? |
10:51:22 | FromGitter | <xflywind> how many hours |
10:53:54 | FromGitter | <gogolxdong> How many times of NG(Not Good?)? |
10:54:13 | lqdev[m] | @Kiloneie I honestly think 1 per day is way too many. remember, quality > quantity |
10:54:21 | lqdev[m] | s/many/much/ |
10:54:35 | livcd | Kilonie: just dont mentione Winnie The Pooh in your videos |
10:54:59 | lqdev[m] | if you upload 1 video per day, your viewers will quickly get bored |
10:55:07 | lqdev[m] | 1 per week is much better |
10:55:23 | lqdev[m] | it also gives you more time to polish the videos |
11:01:39 | * | shomodj joined #nim |
11:03:15 | * | shomodj quit (Client Quit) |
11:14:37 | * | Vladar quit (Ping timeout: 265 seconds) |
11:16:20 | * | puri joined #nim |
11:16:43 | * | puri quit (Remote host closed the connection) |
11:16:53 | FromDiscord | <Rika> is it possible to partially unpack seqs? ex: var (a, b, rest) = {a seq of length 5} would make rest have the remaining 3 elements |
11:18:02 | lqdev[m] | is it even possible to unpack seqs at all? |
11:18:23 | lqdev[m] | I'm seeing this for the first time |
11:18:56 | * | thomasross quit (Ping timeout: 276 seconds) |
11:19:18 | * | asymptotically joined #nim |
11:19:50 | lqdev[m] | anyways, you can do (a, b, rest) = (x[0], x[1], x[2..^1]) |
11:20:28 | * | skoude quit (Ping timeout: 264 seconds) |
11:22:10 | * | skoude joined #nim |
11:23:09 | FromDiscord | <Rika> is it only for tuples? |
11:23:12 | FromDiscord | <Rika> if so, damn |
11:23:42 | krux02 | Rika: sorry, unpacking is only for tuples. |
11:23:50 | lqdev[m] | I don't recall seeing this in the manual |
11:24:07 | FromDiscord | <Rika> hmm prolly can make a macro for this |
11:24:12 | lqdev[m] | so you'll have to either unpack a tuple or directly assign variables |
11:24:21 | krux02 | I wrote a macro once, where I could do pattern matching for ast nodes as well, because that was my most important use case for pattern matching. |
11:24:43 | FromDiscord | <Rika> im not that good at macros just yet lmao |
11:25:46 | * | thomasross joined #nim |
11:28:12 | * | thomasross_ joined #nim |
11:28:12 | * | thomasross quit (Killed (orwell.freenode.net (Nickname regained by services))) |
11:28:12 | * | thomasross_ is now known as thomasross |
11:28:38 | * | absolutejam4 quit (Ping timeout: 265 seconds) |
11:29:14 | * | skoude quit (Ping timeout: 240 seconds) |
11:29:42 | * | absolutejam4 joined #nim |
11:32:00 | * | Vladar joined #nim |
11:40:24 | PMunch | Why? https://github.com/nim-lang/website/commit/358b30beb86ff7d33362392ab806180a086aad19 |
11:41:28 | * | fanta1 quit (Ping timeout: 264 seconds) |
11:41:54 | lqdev[m] | PMunch: it's quite an interesting story https://github.com/nim-lang/website/issues/169 |
11:45:05 | * | clyybber joined #nim |
11:45:09 | PMunch | Eh, I guess that's fair.. |
11:45:20 | PMunch | What about the #nim channel though :P |
11:45:26 | PMunch | Do we have to stop swearing? |
11:46:46 | clyybber | No, why? |
11:47:35 | PMunch | https://irclogs.nim-lang.org/08-10-2019.html#11:40:24 |
11:47:57 | clyybber | I saw that. But it only applies to the website. |
11:48:07 | clyybber | IMO |
11:49:43 | clyybber | Araq: Why do we say that discriminators of case objects must be constant? |
11:49:51 | PMunch | Haha, yeah I was just making a joke |
11:50:00 | clyybber | Ah, ok. I was worried |
11:50:05 | clyybber | :D |
11:50:42 | PMunch | Probably because you can't discriminate on something that's only available at runtime |
11:51:02 | clyybber | But you actually can. |
11:51:10 | clyybber | I mean the field checks are done at runtime |
11:51:26 | PMunch | Oh yeah |
11:51:39 | PMunch | But the range of possible cases must be known at compile-time |
11:52:12 | clyybber | I'm asking because I'm implementing default object values and I could rely on the fact that those discriminators are constant and eliminate runtime overhead or I could initialize based on the runtime discriminator value. |
11:52:17 | PMunch | Like you can discriminate on an enum, since you know all the values an enum can take on compile-time |
11:52:29 | clyybber | Yeah. |
11:52:52 | clyybber | But does the discriminator itself have to be constant? Like the value, not the range/type? |
11:53:01 | clyybber | AFAICT from the manual it has to. |
11:56:15 | * | navinmistry joined #nim |
11:56:15 | * | rockcavera joined #nim |
12:01:59 | clyybber | Wth, where does that invalid indentation error come from: https://play.nim-lang.org/#ix=1Y0N |
12:02:22 | FromGitter | <alehander42> I think they're should be constant |
12:03:00 | FromGitter | <alehander42> Wait do you mean the variable in case |
12:03:35 | clyybber | Yeah |
12:03:54 | clyybber | Of course the type/range should be constant. |
12:04:25 | clyybber | alehander42: I mean the variable that determines which "branch" to take |
12:05:15 | clyybber | Feels so weird still stumbling over indentation errors after using the language so much |
12:05:34 | clyybber | Especially if I can't figure it out. |
12:06:01 | FromGitter | <alehander42> You mean of a |
12:06:10 | FromGitter | <alehander42> A should be constants imo |
12:06:32 | FromGitter | <alehander42> I expect static dispatch |
12:06:33 | clyybber | Yeah, the of branch things must be constants |
12:06:45 | clyybber | But I mean the case d: Discriminator |
12:06:47 | FromGitter | <alehander42> Ah well the other one not |
12:07:09 | FromGitter | <alehander42> It couldn't work if only const |
12:07:20 | FromGitter | <alehander42> Maybe the manual defines discriminator |
12:07:23 | FromGitter | <alehander42> Differently |
12:07:34 | clyybber | Yeah |
12:07:43 | clyybber | Can you figure out what the error in my snippet is? |
12:07:48 | clyybber | Maybe its a bug |
12:07:52 | clyybber | But I really can't tell |
12:09:28 | FromGitter | <xflywind> indent error in 14 line, delete one space |
12:09:49 | PMunch | Yeah, there is a space before the proc.. |
12:09:56 | clyybber | oh damn |
12:10:01 | clyybber | thanks |
12:11:05 | * | asymptotically quit (Remote host closed the connection) |
12:11:27 | clyybber | alehander42: Yeah, I was confused by the manual. It refers to the of branch conditions. Those must be constant |
12:11:27 | * | asymptotically joined #nim |
12:12:31 | * | fredrik92 is now known as couven92 |
12:19:10 | FromGitter | <alehander42> Good |
12:19:21 | * | Hideki_ joined #nim |
12:19:29 | FromGitter | <alehander42> I want to ask |
12:19:41 | FromGitter | <alehander42> Your default fields can't depends on other defaults |
12:19:47 | FromGitter | <alehander42> Or can they |
12:24:12 | clyybber | So far not. But it could be possible to implement |
12:24:31 | clyybber | The question is if it should be possible. |
12:24:41 | clyybber | It still has to be determinable at compile time. |
12:24:46 | FromGitter | <alehander42> But can i access default values from macros |
12:25:02 | FromGitter | <alehander42> It is determinable indeed |
12:25:11 | clyybber | You mean with a macro on a type section? |
12:26:04 | FromGitter | <alehander42> With eg type impl |
12:26:18 | clyybber | Hmm |
12:26:29 | clyybber | I'm not sure. I haven't looked into that yet |
12:26:59 | clyybber | But I think it should be possible. So if not I'm gonna patch it. |
12:27:59 | clyybber | But when default field values can depend on other default field values and we want to fully support that, we are gonna have to use some reordering algorithm |
12:29:02 | clyybber | But maybe its better to just support depending on previously defined default field values |
12:29:43 | FromGitter | <alehander42> Yeah i guess the default values can come later not sure if theyw |
12:30:04 | FromGitter | <alehander42> Are important, maybe you can just depend on types which are defined |
12:31:29 | clyybber | I think the gitter bot cur you off |
12:31:34 | clyybber | s/cur/cut |
12:33:48 | FromGitter | <Clyybber> Ah, nevermind |
12:34:29 | FromGitter | <alehander42> Just writing from phone sorry |
12:40:27 | Araq | clyybber, it's a tough problem, I'm thinking |
12:43:05 | clyybber | On second thought I think IF we want to support depending on other default field values we should only depend on already defined ones. |
12:44:14 | FromGitter | <alehander42> Yes, thr same way you only depend on already defined types |
12:44:40 | FromGitter | <alehander42> Also one can aways offloaded shared defaults to consts |
12:44:55 | clyybber | Yeah |
12:45:17 | FromGitter | <alehander42> But what about eg |
12:45:45 | FromGitter | <alehander42> Having any defaulted value that depends on on a generics argument is this possible |
12:45:59 | FromGitter | <alehander42> And overall can we have generic field defaults |
12:46:26 | clyybber | Should be possible |
12:46:28 | clyybber | IMO |
12:46:34 | clyybber | I have to test that though. |
12:49:35 | * | navinmistry quit (Remote host closed the connection) |
12:58:01 | FromDiscord | <Rika> oh man the macro i just made for the seq unpacking is so dirty... |
12:58:16 | * | fichtl quit (Ping timeout: 240 seconds) |
12:59:54 | * | adeohluwa joined #nim |
13:00:11 | FromDiscord | <juan_carlos> I need a Templatacro or a Macroplate. 🤔 |
13:00:13 | FromGitter | <mratsim> {.dirty.} is not a valid pragma for macros AFAIK |
13:00:45 | FromDiscord | <Rika> mratsim, pls xd |
13:00:59 | FromDiscord | <Rika> i cant actually tell if you're sarcastic |
13:01:09 | FromGitter | <mratsim> I am |
13:01:16 | * | navinmistry joined #nim |
13:01:18 | FromGitter | <mratsim> More joking than sarcastic |
13:08:22 | * | navinmistry quit (Remote host closed the connection) |
13:09:49 | * | navinmistry joined #nim |
13:10:03 | * | navinmistry quit (Remote host closed the connection) |
13:10:55 | * | navinmis_ joined #nim |
13:19:13 | * | Hideki_ quit (Ping timeout: 268 seconds) |
13:26:42 | * | navinmis_ quit (Remote host closed the connection) |
13:29:56 | * | Vladar quit (Ping timeout: 240 seconds) |
13:30:04 | clyybber | Araq: Which problem are you thinking about? |
13:34:46 | * | narimiran joined #nim |
13:34:54 | * | navinmistry joined #nim |
13:37:33 | lqdev[m] | hey @Rika have you heard about `macros.quote`? |
13:40:24 | * | Vladar joined #nim |
13:43:15 | narimiran | @Rika see this package for `unpack` various stuff: https://github.com/technicallyagd/unpack |
13:45:14 | * | okcy joined #nim |
13:45:37 | * | Vladar quit (Ping timeout: 250 seconds) |
13:45:44 | * | okcy quit (Client Quit) |
13:49:38 | FromGitter | <alehander42> clyybber |
13:50:17 | FromGitter | <alehander42> what i mean is e.g. if i have Node[T] and name: $T.name or something like that |
13:50:27 | FromGitter | <alehander42> should this work (not very important if it does now) |
13:50:49 | FromGitter | <alehander42> name: string = $T.name |
13:50:50 | FromGitter | <alehander42> sorry |
13:50:59 | clyybber | So you mean stuff like Node[N: static int] |
13:51:05 | FromGitter | <alehander42> for example yeah |
13:51:06 | * | adeohluwa left #nim (#nim) |
13:51:08 | clyybber | Where a field can do f: int = N |
13:51:11 | * | adeohluwa joined #nim |
13:51:13 | clyybber | Yeah that should work IMO |
13:51:13 | * | adeohluwa quit (Remote host closed the connection) |
13:51:17 | FromGitter | <alehander42> yeah thats a better eample |
13:51:22 | clyybber | I don't know if it does thou |
13:51:28 | clyybber | But if not |
13:51:33 | clyybber | I'll try to make it work |
13:51:37 | FromGitter | <alehander42> the important thing is the spec |
13:51:45 | FromGitter | <alehander42> implementation is always possible i guess |
13:51:59 | FromGitter | <alehander42> (i doubt there are blockers for that in particular) |
13:52:14 | clyybber | spec is boring :D |
13:52:17 | Araq | alehander42: the spec seems good enough, yes |
13:52:37 | Araq | and I think 'nil ref T' is the winning syntax (sorry, disruptek) |
13:52:49 | FromGitter | <alehander42> clyybber its not :P |
13:52:56 | FromGitter | <alehander42> Araq, and for `not nil` ? |
13:53:17 | Araq | 'not nil' stays as it is, it's readable and already exists |
13:53:29 | FromGitter | <alehander42> ok |
13:53:56 | Araq | and it's consistent too, 'not' being a binary operator in this case |
13:53:58 | FromGitter | <alehander42> clyybber so overally if i have Node[T] = .. field: string = myOwnConstFunction(T) |
13:54:04 | FromGitter | <alehander42> this should work in theory? |
13:54:07 | clyybber | yeah |
13:54:22 | clyybber | btw, case objects work now |
13:54:32 | FromGitter | <alehander42> Araq yeah the only thing is that one is prefix and one postfix |
13:54:32 | Araq | clyybber, your PR forgot about vmgen and jsgen |
13:54:48 | clyybber | I know |
13:54:57 | clyybber | Its in my TODO list |
13:58:08 | FromDiscord | <Kiloneie> @gogolxdong It takes me about 4 hours per video, about 40-60 min of recording, then i edit for 5-70 minutes, cutting any stumbles in my speech etc. |
13:58:08 | FromDiscord | <Kiloneie> |
13:58:08 | FromDiscord | <Kiloneie> Also if i were to make 1 video per week, i would get freaking bored and dissapointed with myself. And i would never get to my goal at that rate. |
13:58:51 | narimiran | @Kiloneie so i'm not the only one telling you to slow down ;) |
13:59:36 | FromDiscord | <Kiloneie> I have to ask, is the quality not good or getting worse since you guys keep asking me that 1 is 1 too many or something D: ? |
13:59:46 | shashlick | is devel broken? https://travis-ci.org/nimterop/nimterop/jobs/595112441#L735 |
14:00:37 | narimiran | @Kiloneie as i told you: it is very heard too keep up with you. i stopped watching probably 4-5 videos ago |
14:01:00 | FromDiscord | <Kiloneie> Not my problem 😛 |
14:01:07 | FromDiscord | <Kiloneie> Some people are begging for more |
14:01:38 | narimiran | and some people are begging for less |
14:01:50 | narimiran | and you only want to hear ones that align with your view ;) |
14:01:55 | FromDiscord | <Kiloneie> xD |
14:02:00 | FromDiscord | <Rika> lqdev[m], i used that in the macro so yes i do |
14:02:01 | FromDiscord | <Kiloneie> that is kinda true |
14:02:24 | FromDiscord | <Rika> narimiran, thanks but i already made the macro. will consider moving to that though |
14:02:53 | clyybber | narimiran: I don't think we are his target audience |
14:02:56 | FromDiscord | <Rika> (prolly should, because it's prolly by a more seasoned dev) |
14:03:14 | clyybber | If I were to learn from video tutorials it would piss me off big to wait a week tho |
14:03:24 | FromDiscord | <Kiloneie> yeh that is my point... |
14:03:25 | clyybber | I would learn from something elsewhere then |
14:04:01 | narimiran | clyybber: there is something in between 1/day (or 2/day as @Kiloneie wants) and 1/week ;) |
14:04:28 | Araq | shashlick, clyybber broke it |
14:04:35 | FromDiscord | <Kiloneie> there kinda has to be no less than 1 per 2 days, otherwise people just might forget about you. |
14:04:46 | clyybber | shashlick: dammnit |
14:04:53 | clyybber | The tests were green |
14:05:01 | FromDiscord | <Rika> Araq, did you mean they clyybbered it 😛 |
14:05:06 | narimiran | and, as people already told @Kiloneie, if he has extra time to do more videos, he can record them 10 in one day if he wants, but then release them one by one |
14:05:23 | * | Vladar joined #nim |
14:05:27 | clyybber | shashlick: Could it be that you are not using cligen head but nim devel? |
14:06:02 | FromDiscord | <Kiloneie> which i will have to do this week and the next, birthday party and next week to hang with a sister for a weekend... 2 times imma get drunk, so i need to prep. |
14:06:33 | FromDiscord | <Kiloneie> and i gotta learn SDL2, some GUI stuff etc, to be able to make THOSE videos, people want that too... |
14:06:47 | FromDiscord | <Kiloneie> and nim for beginners, ain't gonna be done anytime soon yet. |
14:07:39 | clyybber | Araq, shashlick: We just have to ask cblake to release a new version. Or we advise people using #devel to use packages #head too |
14:09:46 | * | Hideki_ joined #nim |
14:10:31 | * | PMunch quit (Read error: Connection reset by peer) |
14:12:12 | shashlick | So Nim devel change is going to break packages now? |
14:12:18 | shashlick | Same thing works on 1.0 |
14:13:30 | clyybber | shashlick: Well I did make a PR to cligen |
14:13:36 | clyybber | Use cligen@#head |
14:13:40 | shashlick | See the full build job, same cligen works on other versions |
14:13:52 | clyybber | Use cligen@#head |
14:14:02 | shashlick | So was this a bug in cligen or Nim |
14:14:17 | shashlick | Couldn't this potentially break others too |
14:14:32 | clyybber | shashlick: I sent out PRs to all important_packages affected |
14:15:00 | shashlick | Still breaking change then |
14:15:07 | clyybber | Yeah, and? |
14:15:41 | clyybber | devel isn't stable |
14:16:17 | clyybber | shashlick: It was a "bug" in Nim. Nim defined csize as int, while it is actually uint. So I changed that. |
14:16:26 | clyybber | You should be happy about that, as a wrapper guru |
14:16:29 | clyybber | :) |
14:20:56 | FromGitter | <mratsim> @Rika seasoned dev is probably a bad argument. I'm seasoned in Nim but that doesn't mean my stuff from 2 years ago is an example of good Nim code |
14:23:37 | * | navinmistry quit (Remote host closed the connection) |
14:25:06 | * | navinmistry joined #nim |
14:27:00 | * | navinmistry quit (Remote host closed the connection) |
14:27:36 | Araq | clyybber, nevertheless this change was poor |
14:27:48 | Araq | we should have deprecated system.csize instead |
14:28:00 | Araq | and introduced system.csize_t or something |
14:28:44 | clyybber | Why? Nothing has been broken |
14:29:00 | clyybber | It's just that shashlick was on an outdated cligen version |
14:29:25 | clyybber | Araq: I have also added a few mirror procs for backwards compatibility. |
14:29:40 | clyybber | Which have a deprecated: csize is now uint message attached |
14:29:49 | clyybber | I don't see how we can do better. |
14:30:07 | clyybber | With introducing new types over new types evertime we change something we just make a mess |
14:30:09 | clyybber | IMO |
14:30:16 | Araq | as I said, don't change csize and it's a better experience |
14:30:40 | * | leorize quit (Ping timeout: 260 seconds) |
14:30:41 | Araq | and "I'm on an outdated cligen" is a valid situation to be in |
14:31:10 | Araq | not everybody enjoys random changes just because some fool tried to mmap a file over 2GB in size on a 32 bit machine |
14:31:38 | Araq | hint: it doesn't work too well no matter your definition of 'size'. |
14:32:30 | * | PMunch joined #nim |
14:32:34 | * | leorize joined #nim |
14:33:11 | * | skoude joined #nim |
14:34:00 | Araq | clyybber, plus the overloads you added are an admission that 'csize' as unsigned doesn't work too well and they repeat the original "mistake" |
14:34:23 | FromDiscord | <Rika> mratsim, i kinda meant "seasoned dev at the time it was written" |
14:34:26 | Araq | so instead of a "wrong" csize we know have "wrong" overloads in ansi_c.nim |
14:34:35 | Araq | *now |
14:34:35 | clyybber | Which are deprecated |
14:34:41 | clyybber | So they can be removed at some point |
14:34:57 | Araq | ok, I missed that |
14:35:21 | Araq | sucks though, I prefer the signed versions, I have little need for "sizes" that wrap around |
14:35:57 | clyybber | Hmm |
14:36:27 | clyybber | For the general unsigned wrap around problem |
14:36:56 | clyybber | You could actually have unsigned integers that don't wrap around |
14:37:57 | clyybber | It's just that C never had that afaik |
14:38:06 | * | skoude quit (Ping timeout: 265 seconds) |
14:39:31 | Araq | yeah I'm happy with another integer family, intX, uintX, uintX_without_shit |
14:39:42 | clyybber | I would love that too. |
14:40:28 | clyybber | Its so weird that C never included that in the standard. Its so easy to implement too. |
14:41:40 | clyybber | Arguably wrapping around is still more correct than going negative half way through |
14:42:23 | Araq | no. it's worse |
14:42:31 | Araq | at least negative values are not valid sizes |
14:42:39 | Araq | nor indexes. |
14:42:59 | FromDiscord | <Rika> you'd catch bugs earlier with not-wrapping |
14:43:04 | FromDiscord | <Rika> *certain bugs |
14:43:41 | clyybber | Yeah, fair enough |
14:43:51 | clyybber | The ideal would be uint without wrap |
14:44:03 | Araq | the ideal is 'Natural' |
14:44:08 | clyybber | Yeah |
14:44:23 | clyybber | Would be a cool feature for nim to have |
14:44:31 | Araq | we have it |
14:44:35 | clyybber | I wonder how we'd implement it though |
14:44:42 | clyybber | Araq: Isn't our natural just int? |
14:44:52 | Araq | Natural = range[0..high(int)] |
14:44:58 | * | theelous3 joined #nim |
14:45:14 | clyybber | Yeah. I mean it would be cool if our Natural would be a safe uint |
14:45:20 | clyybber | safe/sane |
14:45:24 | Araq | nope |
14:45:48 | clyybber | why? |
14:45:56 | Araq | x < len - 3 <==> x + 3 < len |
14:46:06 | Araq | you want to be able to do this transformation reliably |
14:46:21 | Araq | our Natural allows for this, Natural as 'uint' doesn't. |
14:47:00 | Araq | tranformations cry for "symmetry" and symmetry cried for negative numbers. |
14:47:56 | clyybber | Hmm, good point. Do you mean transformations in the compiler or by the user? |
14:48:06 | Araq | both. |
14:48:16 | Araq | even if your "length can never be negative" negative numbers help a great deal. it's like trying to do quantum mechanics without complex numbers. |
14:48:43 | Araq | yeah, we know, you cannot take the sqrt of -1, complex numbers rule though. |
14:49:18 | clyybber | Araq: But arent those transformations if done by the user in todays Nim invalid anyways? |
14:50:02 | Araq | how so? because stuff gets weird approaching high(int)? (overflow) |
14:50:41 | clyybber | No because natural is defined as range[0..hight(int)]. The compiler checks that it doesn't go below zero, right? |
14:50:42 | * | navinmistry joined #nim |
14:50:53 | Araq | right |
14:51:16 | Araq | but '-' is not defined on Natural, it's defined on 'int' |
14:51:28 | Araq | so the conversions then make it ok |
14:51:40 | Araq | and the conversion is lossless |
14:51:57 | clyybber | Ah, ok. Yeah that makes sense. |
14:53:22 | clyybber | Though it kind of goes against the point of Natural IMO. |
14:53:36 | * | actuallybatman joined #nim |
14:54:41 | clyybber | I mean you could have Natural be uintsafe and have a `-` for Natural. Users wouldn't be able to do x < len - 3 in some cases. But arguably they shouldn't be able to anyways. |
14:54:57 | Araq | yeah there is quite some sophistry involved here, in the end C# uses 'int' and works and C++/C uses 'uint' and doesn't work. |
14:55:21 | clyybber | Because C++ and C are using their wrap around uints. |
14:55:56 | Araq | not only that, because uint loses symmetry in its basic math operations |
14:55:59 | * | navinmistry quit (Remote host closed the connection) |
14:56:18 | clyybber | Yeah, which is kind of the point of it, I guess. |
14:56:20 | Araq | alternatively you can disallow '-' for unsigned, it would work too, I did the analysis |
14:56:31 | Araq | but I like '-' |
14:56:53 | clyybber | I do too. |
14:57:20 | * | navinmistry joined #nim |
14:57:35 | Araq | the one thing that 'int' really does wrong is that -low(int) doesn't exist |
14:57:50 | Araq | so 'abs' is not sound |
14:58:00 | Araq | and all hell breaks lose |
14:58:20 | Araq | I would have mapped 'low(int)' to a NaN |
14:58:39 | clyybber | Saturated arithmetic isn't commutative either right? |
14:58:53 | clyybber | s/commutative/symmetrical? |
14:59:17 | clyybber | Araq: Whats a NaN for integer though? |
14:59:17 | Araq | hmm I think "sticky" saturated arithmetic is |
14:59:29 | Araq | what's a NaN for floating point? |
15:00:34 | clyybber | familiar properties like associativity and distributivity may fail in saturation arithmetic. This makes it unpleasant to deal with in abstract mathematics |
15:00:45 | clyybber | thats what wikipedia says about saturated arithmetic |
15:01:05 | clyybber | I couldn't find the "sticky" variant |
15:01:21 | Araq | I invented it, I guess... |
15:01:35 | clyybber | But I assume it just uses the negative half for integers for counting the overflow |
15:01:35 | * | navinmistry quit (Remote host closed the connection) |
15:02:08 | Araq | no, "sticky" means that high(int) is like Inf and Inf - 1 is still Inf |
15:02:16 | * | navinmistry joined #nim |
15:02:29 | clyybber | Ah. |
15:02:45 | Araq | there is an "error mode" and you cannot really perform any arithmetic on it after that |
15:03:23 | clyybber | Ok. So it's also not really symmetric |
15:04:05 | clyybber | In that way it is similar to a uintsafe. Except that it will be in error mode and uintsafe will fail early |
15:05:39 | Araq | it's "symmetric" enough in my experience. the only problem is that there are preferable groupings |
15:06:01 | Araq | x + (1 - 1) is better than (x + 1) - 1 |
15:06:24 | Araq | but that's actually quite common in math already |
15:06:33 | clyybber | Yeah so the same as x < len - 3 vs x + 3 < len |
15:06:39 | Araq | think about infinite sums and what you're allowed to do with them |
15:06:57 | clyybber | Math would "error" at compile time :P |
15:08:28 | Araq | well probably you need some leeway in the spec |
15:09:01 | Araq | but with clear rules that try to preserve symmetry it works much better than "oh and btw, x + 1 can turn back into 0" |
15:09:32 | Araq | "and of course the Linux kernel now relies on this, everywhere, good luck proving stuff correct" |
15:09:36 | clyybber | Yeah |
15:09:46 | clyybber | But even better x + 1 errors when too big |
15:10:13 | clyybber | I think that Natural as a uintsafe wouldn't be so bad |
15:10:43 | clyybber | After all you probably use Natural because you want Natural |
15:11:35 | Araq | well I also want minus to work as reliably as the other arithmetic operations |
15:11:53 | Araq | and that rules out 'uint'. |
15:12:04 | Araq | https://en.wikipedia.org/wiki/Unum_(number_format) related but for floating point |
15:12:11 | clyybber | Except when Natural would be a generic |
15:12:44 | clyybber | Like Natural = range[0..high(int)] | range[0..high(uintsafe)] |
15:12:58 | clyybber | where the first range is an int range and the second an uintsafe range |
15:13:00 | Araq | silly |
15:13:55 | * | absolutejam4 quit (Ping timeout: 268 seconds) |
15:15:01 | clyybber | Araq: Actually you can have `-` working on uintsafe and keep the symmetry. Just make `-` return an int :p |
15:15:35 | clyybber | Nevermind |
15:15:45 | clyybber | Not a lossless conversion.. |
15:17:02 | clyybber | Unum are posits right? |
15:17:58 | clyybber | I heard they are more performant too. Though most hardware still lacks their implementation. |
15:20:05 | Araq | https://youtu.be/rHIkrotSwcc?t=1187 unique_ptr sucks |
15:20:09 | * | xace quit (Ping timeout: 265 seconds) |
15:20:10 | Araq | :D |
15:21:46 | Araq | good thing we're doing a better job at this |
15:21:52 | clyybber | Another case for quirky exceptions |
15:22:11 | clyybber | Because traditional exceptions destroy every abstraction or guarantee |
15:22:52 | clyybber | Oh, its bad without exceptions too... |
15:23:06 | Araq | C++ has no 'sink' parameters |
15:23:40 | FromGitter | <alehander42> ok |
15:24:36 | FromGitter | <alehander42> so i'll push in a PR first a test file for the nil feature to make sure it tests the spec |
15:25:10 | clyybber | alehander42: Did you implement it? |
15:25:24 | FromGitter | <alehander42> no, i waited for the spec to be accepted |
15:25:30 | clyybber | Ah, ok |
15:25:37 | FromGitter | <alehander42> i already have an older implementation, but its ast-based |
15:26:01 | Araq | and it might be fine |
15:26:09 | Araq | ast-based can be integrated into sempass2 easily |
15:26:22 | Araq | in fact, sempass2 already tries to do this analysis |
15:26:29 | FromGitter | <alehander42> but it seems to me the cfg stuff already runs in sempass2 |
15:26:33 | * | PMunch quit (Remote host closed the connection) |
15:26:37 | Araq | not really |
15:26:50 | Araq | it's delayed until code generation |
15:27:16 | Araq | which is a problem on its own, if you misuse '=' in a proc that you don't call, the error is not reported |
15:28:08 | FromGitter | <alehander42> at least in my experiments i used `dfa` to define a nilCheck function |
15:28:16 | FromGitter | <alehander42> and just called it in the end of trackProc |
15:29:44 | FromGitter | <alehander42> my understanding was that one has to construct the cfg from certain ast and then analyze it, so i am not sure why the current cfg stuff is ran in codegen |
15:30:25 | Araq | because only the codegen currently needs it |
15:31:06 | FromGitter | <alehander42> ok, well, codegen should codegen |
15:31:36 | * | Hideki_ quit (Remote host closed the connection) |
15:31:52 | * | navinmistry quit (Ping timeout: 264 seconds) |
15:31:57 | * | couven92 quit (Quit: Client disconnecting) |
15:33:15 | FromGitter | <alehander42> well, i think we should what is correct, not what is easier |
15:33:57 | FromGitter | <alehander42> if cfg would be generally useful for more analysis, probably better to put it where it should be |
15:34:06 | clyybber | yeah. |
15:34:22 | FromGitter | <alehander42> if it would be an overkill for notnil, then notnil can just use ast indeed |
15:35:06 | * | Trustable joined #nim |
15:35:50 | Araq | I think for 'not nil' it's overkill unless we seek to support: |
15:35:57 | Araq | if x == nil: return |
15:36:01 | Araq | use(x[]) |
15:36:42 | FromGitter | <alehander42> well, we should support that |
15:36:52 | FromGitter | <alehander42> but i supported it |
15:36:57 | FromGitter | <alehander42> with the ast approach as well .. iirc |
15:37:52 | FromGitter | <alehander42> yep https://github.com/alehander42/Nim/blob/ref-nilcheck/compiler/nilcheck.nim#L53 |
15:37:59 | disruptek | i had to watch carruth on 2x speed and it was still too slow. |
15:38:56 | clyybber | I mean we can use dfa two times too. Its not that bad, right? |
15:39:23 | clyybber | Or we reorder it so that dead code elimination comes after injectdestructors |
16:02:27 | * | theelous3 quit (Ping timeout: 240 seconds) |
16:12:51 | shashlick | What do c++ namespaces map to in Nim |
16:19:57 | narimiran | shashlick: i've sent you PM, so this is just a ping in the case you don't see it.... |
16:25:59 | shashlick | Can you ping on #shashlick |
16:26:23 | shashlick | Else I don't get it |
16:30:41 | disruptek | wut |
16:36:03 | * | thomasross quit (Ping timeout: 240 seconds) |
16:36:25 | shashlick | Using matterbridge to slack so am only kind of on irc |
16:36:55 | disruptek | do you get irc pms? |
16:37:02 | disruptek | or PMs? |
16:37:29 | shashlick | Nope I don't think matterbridge supports that yet |
16:37:43 | * | floppydh quit (Quit: WeeChat 2.6) |
16:38:50 | disruptek | i want branch #134? |
16:38:58 | shashlick | I used to use matrix but it is so unstable |
16:39:12 | shashlick | I'll merge it in a couple hours |
16:39:16 | FromDiscord | <Kiloneie> If i have a text file with 3 lines of text and then readLine and echo that line 3x times, why does readAll show empty string... if i readAll first it shows all 3 lines, is there some kind of voodoo that if something was read already it can't be read again or something ? |
16:39:23 | disruptek | okay, no hurry. |
16:39:33 | shashlick | Nimgit2 is still failing so needs more cleanup |
16:40:12 | shashlick | https://travis-ci.org/genotrance/nimgit2/builds/594907233 |
16:40:39 | narimiran | Kiloneie you have the final newline in your file |
16:41:13 | * | thomasross joined #nim |
16:41:31 | narimiran | if you do `splitlines` you will notice something like `@["abc", "def", "ghi", "\n"]` |
16:41:41 | narimiran | for stuff like that, i use `strip` |
16:42:26 | narimiran | (or the last element is `""`, not sure) |
16:44:23 | FromDiscord | <Kiloneie> So basically what i said ? i added a 4th line of text, and readAll will output that AFTER reading a line 3x times |
16:44:30 | FromDiscord | <Kiloneie> so position in file moves |
16:53:06 | * | NimBot joined #nim |
16:53:16 | Yardanico | @Kiloneie as narimiran said, that's not a nim issue, it's just that you have an extra empty line in your file |
16:59:26 | * | adeohluwa joined #nim |
17:00:56 | * | ng0 quit (Ping timeout: 260 seconds) |
17:01:11 | FromDiscord | <Kiloneie> But i don't... i have the file open in VS Code, it shows only 3 lines, and it ends after the third line. |
17:01:11 | FromDiscord | <Kiloneie> https://cdn.discordapp.com/attachments/371759389889003532/631174246768443422/pic.PNG |
17:01:36 | FromDiscord | <Kiloneie> |
17:01:36 | FromDiscord | <Kiloneie> https://cdn.discordapp.com/attachments/371759389889003532/631174352565567498/p2.PNG |
17:03:58 | FromGitter | <alehander42> kiloneie typically readX |
17:04:21 | FromGitter | <alehander42> exactly yeah |
17:04:33 | FromGitter | <alehander42> all the readX move into the stream |
17:04:44 | FromGitter | <alehander42> so if you readLine, your position is now after it |
17:05:11 | FromDiscord | <Kiloneie> Okay thanks. |
17:06:01 | FromGitter | <alehander42> if you want this to not happen |
17:06:07 | FromGitter | <alehander42> it seems peekX |
17:06:10 | FromGitter | <alehander42> does it |
17:06:24 | FromGitter | <alehander42> e.g. peekLine |
17:08:41 | * | doesntgolf joined #nim |
17:12:37 | * | rockcavera quit (Remote host closed the connection) |
17:13:19 | FromDiscord | <Kiloneie> Okay |
17:15:30 | * | whaletechno joined #nim |
17:22:39 | * | shomodj joined #nim |
17:23:26 | * | shomodj quit (Client Quit) |
17:29:05 | * | nsf quit (Quit: WeeChat 2.5) |
17:30:13 | * | sealmove joined #nim |
17:36:25 | * | rockcavera joined #nim |
17:37:47 | leorize | Araq: is there any plan for migrating stdlib to destructors? |
17:44:26 | Araq | leorize, hell yes, no more "uhm, who needs to close this socket" mess |
17:44:54 | leorize | does that also means less `ref` will be used? since copy blocking is now a thing |
17:55:24 | FromDiscord | <jeffutter> Is there a way to specify a type for an empty array (or openArray?) I’m trying to write something like algorithm.binarySearch but it blows up when I pass binarySearch([],1). I would want it to return -1 for [] always |
17:56:26 | disruptek | just check the len() of the array? |
17:56:49 | FromDiscord | <jeffutter> I get a compiler warning when I try to pass [] in a test |
17:57:24 | disruptek | openArray is like a typeclass that includes seq and array. |
17:57:29 | disruptek | what's the compiler's complaint? |
18:00:00 | FromDiscord | <jeffutter> This is the test: |
18:00:01 | FromDiscord | <jeffutter> ``` |
18:00:01 | FromDiscord | <jeffutter> proc binarySearch[T](a: openArray[T], key: T): int = |
18:00:01 | FromDiscord | <jeffutter> var b = len(a) |
18:00:01 | FromDiscord | <jeffutter> while result < b: |
18:00:01 | FromDiscord | <jeffutter> var mid = (result + b) div 2 |
18:00:03 | FromDiscord | <jeffutter> if a[mid] < key: result = mid + 1 |
18:00:03 | FromDiscord | <jeffutter> else: b = mid |
18:00:05 | FromDiscord | <jeffutter> if result >= len(a) or a[result] != key: result = -1 |
18:00:06 | FromDiscord | <jeffutter> ``` |
18:00:08 | FromDiscord | <jeffutter> Error is: |
18:00:09 | FromDiscord | <jeffutter> ``` |
18:00:12 | FromDiscord | <jeffutter> /usr/local/Cellar/nim/1.0.0/nim/lib/pure/unittest.nim(631, 43) Error: type mismatch: got <array[0..-1, empty], int literal(1)> |
18:00:13 | FromDiscord | <jeffutter> but expected one of: |
18:00:15 | FromDiscord | <jeffutter> proc binarySearch[T, K](a: openArray[T]; key: K; |
18:00:17 | FromDiscord | <jeffutter> cmp: proc (x: T; y: K): int {.closure.}): int |
18:00:17 | disruptek | it's best to use a pastebin in these scenarios. |
18:00:18 | FromDiscord | <jeffutter> first type mismatch at position: 3 |
18:00:20 | FromDiscord | <jeffutter> missing parameter: cmp |
18:00:22 | FromDiscord | <jeffutter> proc binarySearch[T](a: openArray[T]; key: T): int |
18:00:23 | FromDiscord | <jeffutter> first type mismatch at position: 2 |
18:00:25 | FromDiscord | <jeffutter> required type for key: T |
18:00:25 | disruptek | people get grumpy when you paste to irc. |
18:00:26 | FromDiscord | <jeffutter> but expression '1' is of type: int literal(1) |
18:00:28 | FromDiscord | <jeffutter> |
18:00:29 | FromDiscord | <jeffutter> expression: binarySearch([], 1) |
18:00:31 | FromDiscord | <jeffutter> ``` |
18:00:32 | FromDiscord | <jeffutter> Yeah, sorry I pasted the wrong code anyway 😄 |
18:00:34 | * | FromGitter quit (Read error: Connection reset by peer) |
18:00:37 | Zevv | Well, that's quite a complaint. I expected it would be just loud neighbors, too high taxes and bad weather |
18:00:38 | FromDiscord | <jeffutter> I forgot this discord was linked to IRC |
18:00:52 | * | FromGitter joined #nim |
18:01:29 | FromDiscord | <jeffutter> https://gist.github.com/jeffutter/ebe4f1c6efb94cf57eabffa5d2fd9e42 |
18:01:43 | FromDiscord | <jeffutter> That has my code and the error |
18:02:01 | disruptek | give the array a type so it matches the signature. |
18:03:10 | shashlick | @disruptek - merged #134 |
18:04:55 | * | shomodj joined #nim |
18:06:58 | FromDiscord | <jeffutter> disruptek: that worked, thanks. |
18:10:48 | disruptek | shashlick: thanks, i'll try building in a few. 👍 |
18:12:35 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:13:12 | * | crem quit (Read error: Connection reset by peer) |
18:16:21 | * | crem joined #nim |
18:16:43 | * | asymptotically quit (Quit: Leaving) |
18:28:05 | * | nsf joined #nim |
18:28:58 | * | xace joined #nim |
18:37:50 | * | adeohluwa quit (Ping timeout: 265 seconds) |
18:41:04 | FromGitter | <alehander42> disruptek what you building |
18:41:12 | disruptek | pork tenderloin. |
18:41:25 | * | skoude joined #nim |
18:41:32 | disruptek | also this benchmark thing. |
18:42:43 | FromGitter | <alehander42> this is the second time |
18:42:46 | FromGitter | <alehander42> i hear of tender loins |
18:42:47 | FromGitter | <alehander42> today |
18:43:02 | FromGitter | <alehander42> wow that's a single word, amazing |
18:45:55 | * | skoude quit (Ping timeout: 250 seconds) |
19:22:08 | * | absolutejam4 joined #nim |
19:23:56 | shashlick | @disruptek - how important is ssh support for nimgit2 |
19:24:51 | Zevv | how important is beer for zevv |
19:38:41 | FromGitter | <alehander42> how important is holland for netherlenads |
19:39:46 | * | theelous3 joined #nim |
19:40:52 | FromDiscord | <kodkuce> isnted writing if x > 5 and x < 10 is there a shorter way like if x in (5..10) or soemthing? |
19:41:36 | FromDiscord | <kodkuce> lol x in (5..10) works 🙂 |
19:41:49 | FromDiscord | <kodkuce> solved my problem myself while writing |
19:45:39 | lqdev[m] | you can get rid of the parens, actually |
19:46:26 | FromDiscord | <kodkuce> bonus 🙂 |
19:59:23 | * | nsf quit (Quit: WeeChat 2.5) |
20:01:38 | * | shomodj joined #nim |
20:01:38 | * | doesntgolf quit (Ping timeout: 240 seconds) |
20:02:21 | shashlick | neovim just blew off an entire file |
20:03:17 | shashlick | lost an hour of work |
20:07:05 | disruptek | wow. |
20:07:15 | shashlick | nimsuggest leak issue |
20:07:56 | disruptek | that sucks. no swpfile? no writes? |
20:09:18 | shashlick | writes fail and if you exit, all bets are off |
20:11:29 | disruptek | ah, that happened to me. i think i piped it to something to save it. |
20:11:38 | disruptek | haven't had an issue recently, though. |
20:16:57 | disruptek | which neovim? |
20:17:09 | shashlick | 0.4.2 |
20:17:44 | disruptek | i'm upgraded to that from 0.3.3 now. we'll see. 🤪 |
20:21:52 | Zevv | shashlick: happened to me a few times. I still would run back to vim8 if I could take nim.nvim withe me. |
20:22:18 | disruptek | with 0.4.2? |
20:23:19 | Zevv | 0.3.8 I think |
20:27:11 | * | narimiran quit (Ping timeout: 268 seconds) |
20:33:16 | FromDiscord | <kodkuce> [FAILED] encode numbers |
20:33:16 | FromDiscord | <kodkuce> /home/me/Apps/Exercism/Work/nim/atbash-cipher/atbash_cipher_test.nim(44, 25): Check failed: encode(phrase) == expected |
20:33:16 | FromDiscord | <kodkuce> encode(phrase) was gifgs rhurx grlm |
20:33:16 | FromDiscord | <kodkuce> expected was gifgs rhurx grlm |
20:33:58 | FromDiscord | <kodkuce> hmm i tryed removing trailing whitespace but still got error hmm duno what magic is heppening |
20:34:25 | shashlick | Well I think it was nimsuggest leaking that caused writes to fail |
20:34:43 | shashlick | Have to be careful since I have many Nim versions |
20:39:33 | FromDiscord | <kodkuce> sorry pasted bot insted up form FAILED but basicly its the same |
20:39:35 | FromDiscord | <kodkuce> /home/me/Apps/Exercism/Work/nim/atbash-cipher/atbash_cipher_test.nim(39, 25): Check failed: encode(phrase) == expected |
20:39:35 | FromDiscord | <kodkuce> encode(phrase) was gvhgr mt123 gvhgr mt |
20:39:35 | FromDiscord | <kodkuce> expected was gvhgr mt123 gvhgr mt |
20:39:35 | FromDiscord | <kodkuce> [FAILED] encode numbers |
20:40:16 | FromDiscord | <kodkuce> and i did check if whitespace on end, what else could it be? |
20:40:26 | FromDiscord | <kodkuce> that invisible char? |
20:40:40 | FromDiscord | <kodkuce> that makes this giving me FAILED |
20:41:46 | FromDiscord | <kodkuce> duno what it was but i solve issue other way |
20:51:22 | * | clyybber quit (Quit: WeeChat 2.6) |
20:55:03 | * | Vladar quit (Remote host closed the connection) |
21:05:56 | * | whaletechno quit (Ping timeout: 240 seconds) |
21:07:10 | * | whaletechno joined #nim |
21:15:58 | FromDiscord | <kodkuce> 23/66 exercis 2 more years and will finish 🙂 |
21:22:57 | shashlick | @disruptek - https://travis-ci.org/genotrance/nimgit2/builds/595317306 <= finally nimgit2 is working on linux and windows |
21:23:01 | shashlick | osx still holds out per usual |
21:24:01 | * | Trustable quit (Remote host closed the connection) |
21:27:44 | disruptek | nice, you badass! |
21:28:12 | shashlick | there's still a general issue though |
21:28:24 | shashlick | right now, getHeader just links directly to the path where the .so file is |
21:28:42 | shashlick | so once the binary is created, it always looks for the .so in the same location |
21:28:56 | shashlick | i'm wondering how to dynamically link without hard-coding the path like that |
21:29:00 | Zevv | ship it with nimble! |
21:29:02 | * | absolutejam4 quit (Ping timeout: 246 seconds) |
21:29:41 | disruptek | what would occasion a relocation of the binary? |
21:29:48 | * | whaletechno quit (Remote host closed the connection) |
21:29:56 | shashlick | if the binary is moved to another system? |
21:30:00 | * | whaletechho joined #nim |
21:30:31 | Zevv | the usual meaning is that the loading addres of the binary is changed |
21:30:55 | disruptek | oh, you mean the path is encoded inside the binary. |
21:31:08 | shashlick | yes |
21:31:30 | disruptek | seems like a linking option should strip it. |
21:31:40 | Zevv | ah that's a different relocation, I'll just shut up now |
21:31:49 | shashlick | basically i'm setting dynlib = full path |
21:32:04 | shashlick | i'll just strip the path and update LD_LIBRARY_PATH |
21:32:09 | disruptek | without the path, the user will need to set LD_LIBRARY_PATH though. |
21:34:01 | * | whaletechho quit (Read error: Connection reset by peer) |
21:34:46 | * | whaletechno joined #nim |
21:39:06 | disruptek | you didn't push that yet, right? |
21:39:42 | disruptek | i mean, nimterop changes? |
21:41:22 | disruptek | oh, just need a new release. |
21:43:19 | * | rockcavera quit (Remote host closed the connection) |
21:47:58 | * | rockcavera joined #nim |
21:48:52 | disruptek | man, shashlick, linking is way, way, way faster now. |
21:51:23 | * | solitudesf quit (Ping timeout: 250 seconds) |
21:54:11 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:10:12 | * | skoude joined #nim |
22:15:20 | * | skoude quit (Ping timeout: 265 seconds) |
22:22:15 | * | whaletechno quit (Quit: ha det bra) |
22:45:19 | * | lritter quit (Ping timeout: 268 seconds) |
22:50:44 | * | lritter joined #nim |
22:52:51 | FromDiscord | <treeform> oh we got windows ci? |
22:52:58 | FromDiscord | <treeform> thats good news |
23:00:07 | FromDiscord | <treeform> VC++ breaks all the time on windows |
23:00:14 | FromDiscord | <treeform> looks like that Ci uses gcc, still a good start |
23:02:03 | shashlick | @disruptek yep libgit2 made it immensely obvious |
23:02:24 | FromGitter | <zetashift> @treeform I was wondering why I had troubles with random crashes with godot-nim and vcc, with switching to gcc fixing it |
23:02:35 | shashlick | @treeform I've not added support for vc++ as of yet to nimterop |
23:04:15 | shashlick | @disruptek if you have a better way for dynamic linking, let me know |
23:04:59 | disruptek | the problem is, if you strip the path how will the user find the lib? |
23:05:30 | disruptek | nimble doesn't install binary libs into a .nimble/lib or something, right? so... |
23:08:24 | shashlick | Could copy the dll somewhere |
23:08:24 | shashlick | But ya it isn't perfect |
23:08:50 | disruptek | i think it's better to leave it as-is and let nimble sort it out in the future. |
23:09:46 | * | abm quit (Quit: Leaving) |
23:11:38 | * | tiorock joined #nim |
23:11:46 | * | tiorock quit (Changing host) |
23:11:46 | * | tiorock joined #nim |
23:11:46 | * | rockcavera quit (Killed (adams.freenode.net (Nickname regained by services))) |
23:11:46 | * | tiorock is now known as rockcavera |
23:15:41 | sealmove | !eval max(int) |
23:15:42 | NimBot | Compile failed: /usercode/in.nim(1, 4) Error: type mismatch: got <type int> |
23:15:55 | sealmove | !eval 50*1000 |
23:15:57 | NimBot | Compile failed: /usercode/in.nim(1, 3) Error: expression '50000' is of type 'int literal(50000)' and has to be discarded |
23:16:05 | sealmove | !eval echo 50*1000 |
23:16:07 | NimBot | 50000 |
23:17:44 | * | skoude joined #nim |
23:21:56 | * | skoude quit (Ping timeout: 240 seconds) |
23:22:54 | shashlick | Right now nimgit2 and other such wrappers downloads the upstream source code and resultant binaries into the nimble pkg directly |
23:23:19 | shashlick | Makes it hard to uninstall since nimble gets upset about these untracked files |
23:23:29 | shashlick | Need to move these into some other location |
23:23:38 | shashlick | Any suggestions? Cross platform |
23:23:41 | * | rockcavera quit (Ping timeout: 276 seconds) |
23:23:57 | * | rockcavera joined #nim |
23:23:57 | * | rockcavera quit (Changing host) |
23:23:57 | * | rockcavera joined #nim |
23:24:11 | disruptek | needs an RFC so lotsa people can agree that it's silly. 🙁 |
23:24:44 | disruptek | it would be nice to have a place we can safely blow away to freshen a build/install, for one thing. |
23:25:23 | disruptek | basically, it's hard to manage in a naive way right now, which is my personal complaint. |
23:26:53 | shashlick | Initially I was using temp |
23:26:59 | shashlick | But that's a security issue |
23:27:34 | shashlick | Could use AppData and .cache like nimcache |
23:28:20 | disruptek | i don't think .cache makes sense because i want to assume i can remove it to _fix_ things, not to break things. |
23:28:42 | shashlick | Maybe just use nimcache |
23:28:51 | shashlick | Wherever it is |
23:28:56 | disruptek | same problem. |
23:29:44 | disruptek | fact is, there aren't many assumptions you can make about this stuff. probably the best you can do is to store retrieved assets separately and reconstitute the binaries on demand to yet another directory. |
23:36:41 | * | krux02_ joined #nim |
23:39:17 | * | krux02 quit (Ping timeout: 250 seconds) |
23:50:59 | dv^_^ | Can I set the length of a seq to 0 without changing its capacity? |
23:51:16 | disruptek | sure. |
23:51:48 | dv^_^ | How? |
23:53:10 | disruptek | setLen |
23:55:26 | dv^_^ | Ok, I'll try that. Thanks. |
23:57:49 | dv^_^ | Is there a function to copy part of a seq into another seq? like memcpy |