00:14:32 | * | krux02_ joined #nim |
00:18:27 | * | krux02 quit (Ping timeout: 260 seconds) |
00:25:55 | * | s4mu3lbk quit (Ping timeout: 260 seconds) |
00:48:31 | FromDiscord | <Elegant Beef> How would i fetch the stdout of a process without freezing because no EOF? |
00:50:48 | * | krux02_ quit (Remote host closed the connection) |
01:01:14 | * | krux02 joined #nim |
01:06:57 | disruptek | beef: i have an example in golden; see the invocation file. |
01:07:00 | disruptek | !repo golden |
01:07:00 | disbot | https://github.com/disruptek/golden -- 9golden: 11a benchmark for compile-time and/or runtime Nim 🏆 15 16⭐ 0🍴 |
01:07:17 | * | Hideki_ joined #nim |
01:08:32 | disruptek | ~stream |
01:08:33 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
01:08:45 | disruptek | bot features for Z3vv |
01:11:39 | * | Hideki_ quit (Ping timeout: 260 seconds) |
01:20:12 | FromGitter | <DeathPoison> ährm, could anyone give me a hint how to solve my error? ⏎ ⏎ i've wrote some code without -d:release, all worked fine, ⏎ but later i turned this swtich on and got the following error in runtime: ⏎ ... [https://gitter.im/nim-lang/Nim?at=5e683ccc80cc7b7924b80f23] |
01:20:25 | FromGitter | <DeathPoison> does it mean that i try to request the repo attribute without knowing that it have the correct type? |
01:20:27 | disruptek | ~paste |
01:20:27 | 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. -- disruptek |
01:22:43 | disruptek | yes, it does. |
01:22:56 | disruptek | it has the wrong variant. |
01:23:55 | FromGitter | <DeathPoison> but it does not... ⏎ https://play.nim-lang.org/#ix=2dVt |
01:24:09 | FromGitter | <DeathPoison> if have a case of around it checking the kind |
01:25:20 | FromGitter | <DeathPoison> the debug line above the critical line showing correct data |
01:26:54 | disruptek | entry.repo.gitPull ... |
01:28:20 | FromGitter | <DeathPoison> badly not, GitRepo is the type oof the gitapi lib; GitRepository is mine, where the path comes from |
01:29:10 | FromGitter | <DeathPoison> little bit confusing sry |
01:29:41 | disruptek | can i see the types? |
01:30:31 | disruptek | de-indent LBEntry, for one thing. the case within, i mean. |
01:30:47 | disruptek | looks okay otherwise. |
01:31:00 | disruptek | you don't need a trailing else if your case is exhaustive. |
01:31:12 | disruptek | (ie. it's best not to have it) |
01:31:44 | * | lbart quit (Ping timeout: 256 seconds) |
01:32:35 | FromGitter | <DeathPoison> i have added the else just because i've deleted the lbetDirectory case |
01:32:40 | FromGitter | <DeathPoison> deindent the case? |
01:32:44 | disruptek | yes. |
01:32:50 | FromGitter | <DeathPoison> i try |
01:33:12 | FromGitter | <DeathPoison> you mean the whitespace, right? |
01:33:16 | disruptek | i do. |
01:33:39 | FromGitter | <DeathPoison> so the case should be in line with types name? |
01:33:54 | disruptek | no, but use a consistent indent of either 2 (ideally) or 4 spaces. |
01:34:00 | disruptek | not 2, 4, 5, or 3. |
01:34:05 | disruptek | just pick one. |
01:34:17 | FromGitter | <DeathPoison> ive using 2; the copied from gitapi uses 4... |
01:34:29 | disruptek | which gitapi? |
01:34:36 | FromGitter | <DeathPoison> thats not really what i want to discuss here :P |
01:34:47 | FromGitter | <DeathPoison> sry, no offense, thanks for helping me |
01:35:13 | disruptek | maybe not, but it's hard to debug code that might be broken because of whitespace in a whitespace-sensitive language. |
01:35:17 | FromGitter | <DeathPoison> https://nimble.directory/pkg/gitapi |
01:35:20 | disruptek | so do us a favor and try to write working nim. |
01:36:53 | FromGitter | <DeathPoison> sry, the whitespace thing, yeah you are right, but my problem is not, that the code does not compile ⏎ ⏎ i have a problem at runtime, so the code is formerly valid i think |
01:37:09 | disruptek | what do you think the problem is? |
01:37:19 | FromDiscord | <Elegant Beef> Yea disruptek that's not working for me it just locks my system cause the second process is still running |
01:37:36 | disruptek | second process? |
01:37:44 | FromGitter | <DeathPoison> iam not sure, that what i try to figure out |
01:37:56 | FromDiscord | <Elegant Beef> The stdout question |
01:38:39 | disruptek | did you use my code? |
01:38:51 | * | lbart joined #nim |
01:38:52 | FromDiscord | <Elegant Beef> yes the while not at read a char |
01:39:02 | disruptek | the what? |
01:39:13 | FromDiscord | <Elegant Beef> not at end* |
01:39:50 | FromDiscord | <Elegant Beef> you do mean drainStreamInto right? |
01:40:17 | disruptek | you probably need /all/ the machinery in there. |
01:40:21 | disruptek | not just one proc. |
01:40:27 | disruptek | it's more complex than that. |
01:40:38 | disruptek | deathpoison: i just cannot help without seeing more code. |
01:41:00 | disruptek | i don't see a problem here. |
01:41:12 | disruptek | can you reduce it to a minimal example that doesn't work? |
01:42:06 | FromGitter | <xflywind> Hello, I want to install `nimph`,but I can't install `nimterop` in Nim version 1.0x in Ubuntu. ⏎ ⏎ nimble install nimterop -y ⏎ ⏎ Get error: ... [https://gitter.im/nim-lang/Nim?at=5e6841eea2ccef3232e63929] |
01:43:01 | disruptek | !repo gittyup |
01:43:03 | disbot | https://github.com/disruptek/gittyup -- 9gittyup: 11higher-level git bindings that build upon nimgit2 15 1⭐ 0🍴 |
01:43:05 | disruptek | !repo github |
01:43:05 | shashlick | Can you remove the nimterop directory in cache and try again |
01:43:08 | disbot | https://github.com/disruptek/github -- 9github: 11github api v3 for nim 15 6⭐ 0🍴 7& 29 more... |
01:43:35 | shashlick | And share a paste of the full error |
01:44:48 | FromGitter | <DeathPoison> sadly that was the full error message ⏎ ⏎ sysfatal.nim:39 ⏎ Error: unhandled exception: 'repo' is not accessible using discriminant 'kind' of type 'LBEntry' [FieldError] [https://gitter.im/nim-lang/Nim?at=5e684290ff8bf14a544b4ffd] |
01:45:15 | FromGitter | <DeathPoison> but i try another tomorrow, and try to encapsulate the whole thing |
01:45:46 | disruptek | it's probably an error in the api. |
01:45:54 | disruptek | without seeing more of the stacktrace, i really cannot tell. |
01:46:08 | disruptek | i can't even tell if it's an error pointing at your code; ya feel me? |
01:47:25 | FromGitter | <DeathPoison> sure but the whole output is this: ⏎ ⏎ DEBUG Checking for project: test ⏎ DEBUG located at: /home/poisonweed/git/test ⏎ DEBUG aready exists: /home/poisonweed/git/test ... [https://gitter.im/nim-lang/Nim?at=5e68432d8e423969577ed086] |
01:47:38 | FromGitter | <DeathPoison> so the is sadly no stack trace available |
01:48:20 | FromGitter | <DeathPoison> but yeah i feel you :P |
01:50:30 | FromGitter | <DeathPoison> i already fixed some other issues with this library, probably another will do it, if not i will try my best to encapsulate all this stuff |
01:50:35 | * | marmotini_ joined #nim |
01:51:20 | FromGitter | <DeathPoison> gn8 folks, its enough ;) |
01:51:57 | disruptek | aight, good luck. |
01:54:46 | FromGitter | <DeathPoison> in worst case, a execCmd will do the trick anyway :D |
01:55:14 | FromGitter | <DeathPoison> but feels bad not getting around this error |
01:58:24 | FromGitter | <xflywind> Now, It stucks here.But it maybe owe to my internet[for me it's slow to pull repo from github]. ⏎ Installing [email protected] ⏎ Building nimterop/nimterop/toast using c backend |
01:58:53 | leorize | probably it's just slow |
01:59:10 | disruptek | if it's nimph, it's probably downloading and building libgit. maybe. |
01:59:28 | leorize | if it's stuck at building toast, then it's not there yet :P |
01:59:47 | disruptek | true. |
02:02:19 | * | dwdv quit (Ping timeout: 265 seconds) |
02:03:36 | disruptek | github seems dead. |
02:03:46 | disruptek | maybe it's just slow. |
02:05:22 | FromGitter | <xflywind> If I use ctrl+c to exit.Next I will fail to install nimterop at once because of cache. ⏎ Build failed for '[email protected]', would you like to try installing 'nimterop@#head' (latest unstable)? [y/N] |
02:06:48 | shashlick | Ya just wait it out |
02:09:38 | FromGitter | <alaviss> test |
02:11:34 | leorize | the gitter official irc bridge doesn't seem to support edits :P |
02:22:53 | FromGitter | <xflywind> Thanks.Now I have installed nimterop successfully. @shashlick |
02:23:07 | FromDiscord | <Elegant Beef> When you commit using your terminal and push the changes using it |
02:24:12 | FromDiscord | <Elegant Beef> I still have to parse so many ansicodes |
02:24:23 | FromDiscord | <Elegant Beef> Probably have to remake the drawing/parsing for a third time |
02:25:06 | * | muffindrake quit (Ping timeout: 240 seconds) |
02:35:46 | * | endragor joined #nim |
02:38:55 | * | lbart quit (Ping timeout: 260 seconds) |
02:51:13 | * | lbart joined #nim |
02:51:24 | * | chemist69 quit (Ping timeout: 256 seconds) |
02:53:18 | * | chemist69 joined #nim |
03:20:55 | * | dadada quit (Ping timeout: 260 seconds) |
03:22:47 | * | dadada joined #nim |
03:23:11 | * | dadada is now known as Guest68714 |
03:24:02 | * | okcy quit (Ping timeout: 240 seconds) |
03:24:35 | * | okcy joined #nim |
03:24:35 | * | rockcavera quit (Remote host closed the connection) |
03:28:43 | * | opal quit (Ping timeout: 240 seconds) |
03:32:03 | * | opal joined #nim |
03:32:52 | disruptek | testes |
03:34:31 | disruptek | a feature for zevv: |
03:34:40 | disruptek | !last disruptek |
03:34:41 | disbot | disruptek did something unexpected in 12#nim 9 seconds ago and last spoke 79 seconds ago |
03:36:20 | disruptek | !last beef |
03:36:20 | disbot | beef never seen. |
03:37:30 | * | okcy quit (Remote host closed the connection) |
03:37:41 | * | okcy joined #nim |
03:37:52 | disruptek | i guess i won't be able to support people with spaces in their nicks unless... |
03:39:53 | disruptek | !last elegant beef |
03:39:54 | disbot | elegant beef never seen. |
03:41:04 | FromDiscord | <Elegant Beef> !last "Elegant Beef" |
03:41:04 | disbot | "Elegant Beef" never seen. |
03:41:08 | FromDiscord | <Elegant Beef> 😄 |
03:41:23 | disruptek | !last elegant beef |
03:41:23 | disbot | Elegant Beef did something unexpected in 12#nim 19 seconds ago and last spoke 719 seconds ago |
03:41:42 | disruptek | nice try, sport. |
03:42:09 | FromDiscord | <Elegant Beef> no you |
03:44:44 | leorize | !last leorize |
03:44:45 | disbot | leorize never seen. |
03:44:50 | leorize | !last leorize |
03:44:50 | disbot | leorize spoke in 12#nim 5 seconds ago and last spoke 75 seconds ago |
03:45:39 | disruptek | for some reason, the datetimes are unequal. |
03:45:57 | disruptek | although i copy the first to the second. |
03:46:06 | disruptek | !last leorize |
03:46:06 | disbot | leorize spoke in 12#nim 76 seconds ago |
03:47:23 | disruptek | fixed. |
03:47:34 | disruptek | !last leorize |
03:47:34 | disbot | leorize spoke in 12#nim 2 minutes ago |
03:47:43 | leorize | !last disruptek |
03:47:44 | disbot | disruptek spoke in 12#nim 9 seconds ago |
03:49:13 | disruptek | someone needs to leave and come back in. |
03:49:19 | disruptek | !last disruptek |
03:49:20 | disbot | disruptek spoke in 12#nim 5 seconds ago |
03:49:23 | * | okcy quit (Ping timeout: 260 seconds) |
03:49:31 | * | axion left #nim ("WeeChat 2.6") |
03:49:33 | * | axion joined #nim |
03:49:33 | disruptek | !last okcy |
03:49:33 | disbot | okcy never seen. |
03:49:38 | disruptek | !last axion |
03:49:38 | disbot | axion never seen. |
03:49:57 | * | okcy joined #nim |
03:51:10 | disruptek | take 3. |
03:53:46 | * | axion left #nim ("WeeChat 2.6") |
03:53:47 | * | axion joined #nim |
03:53:52 | axion | !seen axion |
03:53:52 | disbot | axion never seen. |
03:54:14 | leorize | !help |
03:54:27 | leorize | disruptek: are you streaming? |
03:54:31 | disruptek | yeah? |
03:54:37 | disruptek | !last axion |
03:54:38 | disbot | axion spoke in 12#nim 45 seconds ago |
03:55:28 | * | thomasross quit (Remote host closed the connection) |
03:56:26 | disruptek | !axion |
03:56:31 | disruptek | !last axion |
03:56:32 | disbot | axion spoke in 12#nim 2 minutes ago |
03:57:24 | disruptek | !last thomasross |
03:57:25 | disbot | thomasross quit from 12 115 seconds ago |
03:57:53 | FromDiscord | <Elegant Beef> <disbot> disruptek spammed the bot 1 second ago |
03:59:51 | * | leorize left #nim ("WeeChat 2.7.1") |
04:00:05 | * | leorize joined #nim |
04:00:48 | disruptek | !last leorize |
04:00:49 | * | okcy quit (Remote host closed the connection) |
04:00:49 | disbot | leorize joined 12#nim 42 seconds ago and last spoke 749 seconds ago |
04:01:28 | * | okcy joined #nim |
04:01:54 | * | axion left #nim ("WeeChat 2.6") |
04:01:56 | * | axion joined #nim |
04:02:00 | axion | !seen axion |
04:02:00 | disbot | axion joined 12#nim 4 seconds ago and last spoke 75 seconds ago |
04:03:09 | * | axion left #nim ("WeeChat 2.6") |
04:03:10 | * | axion joined #nim |
04:03:14 | axion | !seen axion |
04:03:14 | disbot | axion joined 12#nim 4 seconds ago and last spoke 773 seconds ago |
04:04:38 | disruptek | !last leorize |
04:04:38 | disbot | leorize never seen. |
04:04:44 | disruptek | !last axion |
04:04:45 | disbot | axion spoke in 12#nim 90 seconds ago |
04:22:48 | * | krux02 quit (Remote host closed the connection) |
04:32:15 | disruptek | !last krux02 |
04:32:16 | disbot | krux02 quit 79 minutes ago |
04:35:45 | * | nsf joined #nim |
04:36:00 | disruptek | maybe it should mangle the username if they are on irc, so they don't get pinged. |
04:37:01 | shashlick | why not |
04:37:28 | shashlick | gets tagged in the command anyway |
04:37:34 | disruptek | oh, good point. |
04:39:34 | disruptek | people can query the bot privately to avoid a ping. |
05:03:10 | * | okcy quit (Remote host closed the connection) |
05:03:54 | * | okcy joined #nim |
05:09:48 | FromDiscord | <Rika> Is this the classic testing in production I see |
05:15:39 | * | okcy quit (Ping timeout: 265 seconds) |
05:16:12 | * | okcy joined #nim |
05:20:08 | * | narimiran joined #nim |
05:20:31 | * | rmt joined #nim |
05:29:15 | * | muffindrake joined #nim |
05:31:37 | * | okcy quit (Ping timeout: 255 seconds) |
05:31:47 | * | okcy joined #nim |
06:08:35 | axion | Does Nim have anything like CL keywords? Self-referential symbols to use instead of strings, for example to dispatch on within a case statement |
06:13:12 | FromDiscord | <Rika> what do you mean |
06:16:45 | axion | I mean exactly self-referential symbols/identifiers that can be resolved at runtime. Not sure how I should describe it in terms of Nim. |
06:18:12 | Zevv | !last disruptek |
06:18:12 | disbot | disruptek never seen. |
06:18:16 | Zevv | ha |
06:18:21 | leorize | axion: if you can write some mock nim code to describe it then that'd be great |
06:21:30 | rmt | Something like Ruby's :symbols, I imagine? |
06:22:37 | rmt | I imagine that Enums are a typical approach,.. probably better than open-ended non-contextual symbols, anyway. |
06:23:24 | axion | https://gist.github.com/mfiano/f04eb97e3e665f3b242206f30f3eacc5 |
06:27:29 | axion | Enums are fine and all, but assume a finite set. |
06:27:38 | axion | I guess a case statement was a bad example |
06:28:40 | leorize | so basically you want a way to not have to write string quotes? |
06:29:00 | * | chemist69 quit (Ping timeout: 256 seconds) |
06:29:24 | * | chemist69 joined #nim |
06:32:10 | axion | I realize now my question was pointless and Nim doesn't allow evaluation control of arbitrary expressions outside of meta-programming like Lisp does. |
06:32:24 | axion | Well, yes, but not specific to strings. |
06:32:34 | axion | Don't worry :) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:30 | * | marmotini_ quit (Remote host closed the connection) |
07:00:43 | * | rmt quit (Ping timeout: 255 seconds) |
07:01:02 | * | marmotini_ joined #nim |
07:02:17 | * | rmt joined #nim |
07:04:51 | * | gmpreussner joined #nim |
07:05:51 | * | marmotini_ quit (Ping timeout: 265 seconds) |
07:21:56 | * | hax-scramper quit (Ping timeout: 258 seconds) |
07:22:34 | * | hax-scramper joined #nim |
07:22:55 | * | PMunch joined #nim |
07:26:01 | * | hax-scramper quit (Read error: Connection reset by peer) |
07:26:02 | * | s4mu3lbk joined #nim |
07:26:16 | * | hax-scramper joined #nim |
07:26:38 | Mister_Magister | Hi people, i need to extract something (text) from website (curl tha html). Any tips/libs on how to do that? |
07:27:43 | PMunch | https://nim-lang.org/docs/httpclient.html |
07:27:48 | PMunch | That would be a good place to start |
07:28:03 | FromDiscord | <Elegant Beef> use the http client to get, then use the xml tree or html parser libs |
07:28:34 | Mister_Magister | i know that much :P i'm using it for http server PMunch |
07:28:56 | PMunch | For a server? |
07:29:01 | Mister_Magister | @Elegant Beef ye i'm more interested in those |
07:29:19 | PMunch | There is this in the stdlib: https://nim-lang.org/docs/htmlparser.html |
07:29:45 | Mister_Magister | PMunch: thanks |
07:29:54 | FromDiscord | <Elegant Beef> funnily because of the source code the html parser doesnt work on this https://nim-lang.org/docs/theindex.html |
07:30:01 | PMunch | This if you want a bit easier way of finding the node you're looking for: https://github.com/GULPF/nimquery |
07:30:14 | FromDiscord | <Elegant Beef> <p /> doesnt work with the parser |
07:30:27 | * | hax-scramper quit (Read error: Connection reset by peer) |
07:30:39 | PMunch | Hmm, well that's a shame.. |
07:30:46 | * | hax-scramper joined #nim |
07:30:57 | Mister_Magister | and since we are at it, do you have some async tutorial? i'm awaiting everything and that's bad :( |
07:31:21 | PMunch | Hmm, I was about to write one |
07:31:34 | PMunch | But then life happened and I actually forgot about it until now.. |
07:32:01 | PMunch | If you've got Nim in action I think there's some good info in there |
07:32:20 | Mister_Magister | like i'm using telegram bot library and get requests as async, and i'm downloading video from message (async but await) and then running ffmpeg on it (again async but await) and then sending it back (again await) and i would like to do it totally async |
07:32:50 | PMunch | Well, you need to do those things one after the other anyways |
07:32:54 | Mister_Magister | otherwise i'm blocking other requests |
07:32:55 | PMunch | So you need to await the results |
07:33:04 | Mister_Magister | mhm |
07:33:07 | PMunch | The benfit comes from handling multiple requests |
07:33:23 | Mister_Magister | can i await without blocking other requests? |
07:33:32 | Mister_Magister | >inb4 threads |
07:33:43 | Mister_Magister | i'm not sure what is async for |
07:33:44 | PMunch | Every time you `await` Nim will hand control over to something else (for example the thing you awaited, or the handler of new requests) |
07:34:38 | Mister_Magister | PMunch: that doesn't happen tho or i broke something :< when i await getting requests is freezed |
07:35:15 | * | solitudesf joined #nim |
07:35:32 | FromDiscord | <Rika> i feel like youre getting the same issue as i am |
07:35:36 | PMunch | Well if any of the tasks stay busy for a long time without allowing other tasks to run you will still block. |
07:35:38 | FromDiscord | <Rika> though i cant easily explain the issue |
07:36:19 | Mister_Magister | yeah… i don't get the idea of async at all |
07:36:44 | FromDiscord | <Rika> well async works if you're waiting for stuff a lot |
07:36:47 | FromDiscord | <Rika> aka an IO issue |
07:36:55 | leorize | the idea of async is to dispatch the control flow to something else while your request is being fulfilled |
07:36:57 | FromDiscord | <Rika> if you're PROCESSING a lot that probably needs threading |
07:37:14 | PMunch | Async/await still only does one thing at a time, and it is what's called co-operative multitasking. So every time you await something that single thing you're doing can now be something else. The benefit comes when doing IO, which is when the OS does things for you. For example when reading a file or getting a network request you ask the OS to put something into memory for you. While you wait for it to do that you are free to do other things instead of just |
07:37:15 | PMunch | sitting idly by waiting. |
07:37:16 | Mister_Magister | leorize: well that doesn't happen :C |
07:37:42 | FromDiscord | <Rika> ok so what libraries are you using exactly |
07:38:05 | Mister_Magister | telebot |
07:38:26 | FromDiscord | <Rika> is it async |
07:38:28 | PMunch | It can also give the impression of multiple things happening at once since simply because you're switching back and forth between things quickly, think about how single processor machines could still run multiple programs "at the same time" |
07:39:02 | leorize | !repo telebot |
07:39:03 | disbot | https://github.com/ba0f3/telebot.nim -- 9telebot.nim: 11Async client for Telegram Bot API in pure Nim [Bot API 4.6] 15 61⭐ 7🍴 7& 1 more... |
07:39:05 | Mister_Magister | hmm wait |
07:39:15 | Mister_Magister | execShellCmd isn't async :C |
07:39:25 | * | alexande192 joined #nim |
07:39:30 | FromDiscord | <Rika> ah youre gonna want the one that returns immediately |
07:39:43 | Mister_Magister | what do you mean? |
07:39:46 | leorize | Mister_Magister: well that's your bottleneck :P |
07:39:48 | * | Vladar joined #nim |
07:39:52 | Mister_Magister | leorize: ye i just realised |
07:40:12 | leorize | I thought you're using asynctools |
07:40:14 | leorize | !repo asynctools |
07:40:15 | disbot | https://github.com/cheatfate/asynctools -- 9asynctools: 11Various asynchronous tools for Nim language 15 51⭐ 11🍴 |
07:40:28 | Mister_Magister | no unfortunately |
07:40:33 | leorize | which does have async processes :) |
07:40:36 | leorize | so use it :P |
07:40:51 | * | s4mu3lbk quit (Ping timeout: 260 seconds) |
07:41:06 | FromDiscord | <Rika> i was thinking of https://nim-lang.org/docs/osproc.html#startProcess%2Cstring%2Cstring%2CopenArray%5Bstring%5D%2CStringTableRef%2Cset%5BProcessOption%5D but thats okay too |
07:41:10 | FromDiscord | <Rika> wow, 11 cutleries |
07:41:29 | PMunch | Haha, I'm guessing that's forks |
07:41:56 | Mister_Magister | leorize: okay |
07:42:38 | * | alexander92 quit (Ping timeout: 258 seconds) |
07:42:43 | Mister_Magister | oh one more question, do you have any code style guides? I'm comming form oop and without oop i'm like child with toys, i make huge mess |
07:42:48 | FromDiscord | <Rika> PMunch, it's a joke some of us make in reference to the original joke, which was a while back |
07:43:02 | leorize | Mister_Magister: https://nim-lang.org/docs/nep1.html |
07:43:13 | * | Mister_Magister nepnep |
07:43:31 | leorize | also give your data structures a lot of care |
07:43:53 | * | Mister_Magister >https://www.youtube.com/watch?v=3YaRUKhf-Qc eh memes :D |
07:43:53 | PMunch | Oh, must've missed that joke :( |
07:45:36 | PMunch | The NEP1 is more about syntactic style, not so much about writing code without objects |
07:45:44 | PMunch | Anything in particular you feel is "messy"? |
07:46:07 | FromDiscord | <Rika> nepu |
07:46:18 | Mister_Magister | PMunch: long file without any structure really, wait here is my bot https://github.com/Michal-Szczepaniak/lenislaw/blob/master/bot.nim |
07:46:24 | Mister_Magister | you will see right away |
07:47:08 | leorize | well try this: |
07:47:25 | leorize | if you wanna make a class, then split it to another module |
07:47:32 | Mister_Magister | in oop i would split it into objects and files and shit |
07:47:46 | Mister_Magister | leorize: another module aka new file? |
07:47:49 | leorize | yep |
07:48:07 | Mister_Magister | okay makes sense (what i wanted to do tbh) |
07:48:39 | * | sz0 joined #nim |
07:48:55 | Mister_Magister | i like nim and it feels like it has potential for making small lightweight programs (fsck python :D) |
07:49:04 | Mister_Magister | just gotta understand it more… |
07:49:49 | PMunch | Yeah, I'd split all the DB stuff into it's own file. Then possibly the downloader procedures into one file |
07:50:25 | PMunch | And I'd look into a template or something to do the handler, seems like a lot of repetition is going on there |
07:50:41 | leorize | also... asynchttpserver is **not** threaded |
07:50:47 | leorize | please don't spawn a thread for it |
07:52:06 | Mister_Magister | PMunch: same |
07:52:10 | Mister_Magister | leorize: what do you mean |
07:52:34 | leorize | https://github.com/Michal-Szczepaniak/lenislaw/blob/master/bot.nim#L774-L777 |
07:52:41 | leorize | that's pure evil :P |
07:53:04 | Mister_Magister | also i have like downloadDocument downloadImage but the Document and Image objects are made from same base object and i was wondering if i could cast them into one function |
07:53:51 | Mister_Magister | leorize: but it works! and i thought that if i run waitFor server.serve(Port(2137), cb) before bot.poll(timeout=300) the bot thing won't run |
07:54:19 | leorize | it works for now |
07:54:22 | * | Mister_Magister in fact that's what was happening i believe |
07:54:41 | Mister_Magister | leorize: i can't wait for both of them at the same time |
07:54:56 | leorize | the idea of asyncdispatch is that you don't have to |
07:55:06 | Mister_Magister | but the waitFor |
07:55:11 | leorize | the poll() wait for the event |
07:55:18 | leorize | then you can act on it |
07:55:29 | Mister_Magister | what do you mean |
07:55:50 | leorize | so here's a brief on how async works: |
07:56:30 | * | rmt quit (Ping timeout: 256 seconds) |
07:56:49 | leorize | you register your event handlers -> the async stuff you use register themselves with the dispatcher -> on poll() the dispatcher runs and activate the callbacks as events are received |
07:57:16 | leorize | waitFor is: poll(), if not future.isFinished: do it again |
07:58:17 | Mister_Magister | aaaaand? |
07:58:21 | PMunch | Hmm @Elegant Beef, the htmlparser seems to work fine on theindex.html |
07:58:24 | leorize | it's useful for just waiting for one Future in your partially async program |
07:58:38 | leorize | when it's fully async-powered, you don't have to |
07:58:47 | leorize | instead you use runForever() :) |
07:59:03 | Mister_Magister | i don't follow… |
07:59:19 | leorize | I'm not really the best at explaining things :P |
07:59:39 | Mister_Magister | leorize: what i can't get is how to wait for both of them at the same time |
08:00:24 | leorize | telebot api is weird... |
08:00:36 | leorize | why does it have it's own poll() if it's integrated with asyncdispatch |
08:00:41 | Mister_Magister | huh |
08:02:27 | leorize | so let's make it simple |
08:02:35 | leorize | async give you Futures |
08:03:07 | leorize | if you want the stuff that's gonna be the Future to run, you call poll() |
08:03:24 | leorize | waitFor is basically just polling until the Future is complete |
08:03:35 | leorize | but in this case you don't really care |
08:04:01 | Mister_Magister | aaaaand? |
08:04:12 | PMunch | poll is a wrapper that calls `waitFor loop(b, timeout, offset, limit)` |
08:04:15 | leorize | so what you do is that you capture the Future from asynchttpserver.serve() and telebot.pollAsync() |
08:04:19 | PMunch | In telebot |
08:04:26 | leorize | then you call runForever() |
08:04:37 | leorize | which will run `poll()` forever |
08:05:02 | leorize | so the you get both telebot and asynchttpserver to run since you got their Futures |
08:05:07 | leorize | is that simple enough? :P |
08:05:19 | Mister_Magister | b…but how do i do that |
08:05:36 | PMunch | Yeah, so instead of the whole thread thing do `asyncCheck server.serve(Port(2137), cb)` and `asyncCheck bot.pollAsync(timeout = 300)` then instead of `thread.joinThread()` do `runForever()` |
08:06:22 | leorize | ah yea, asyncCheck works too |
08:06:51 | Mister_Magister | PMunch: whoa thanks |
08:06:53 | PMunch | A little something like this: https://play.nim-lang.org/#ix=2dWd |
08:07:26 | Mister_Magister | sadly there is no nice IDE for nim :C |
08:07:33 | leorize | I'm not the best at explaining these things :P IIRC Zevv wrote something related to this, and might be able to give you a better ELI5 |
08:07:47 | PMunch | leorize, yeah neither serve nor poll returns anything in their Futures. So just asyncCheck them to attach an exception handler callback to them :) |
08:08:09 | PMunch | Mister_Magister, what do you mean, there are many nice IDEs for Nim :) |
08:08:13 | Mister_Magister | leorize: you are great thank you for even trying to help me! |
08:08:22 | Mister_Magister | PMunch: like? |
08:08:41 | PMunch | Well I use Vim :P But I think most people use VSCode |
08:08:51 | Mister_Magister | i dun like vscode cas m$ |
08:08:56 | Mister_Magister | cause* |
08:08:58 | Mister_Magister | :< |
08:09:06 | FromDiscord | <Rika> then just use Code |
08:09:11 | Zevv | ELI5? |
08:09:15 | leorize | you gotta admit one thing: MS knows how to please developers :p |
08:09:15 | FromDiscord | <Rika> the nonbranded version of vscode |
08:09:22 | leorize | Zevv: explain like I'm 5 |
08:09:50 | PMunch | Rika, wait, there's an unbranded version? |
08:09:55 | PMunch | What's the difference? |
08:10:05 | Zevv | haha |
08:10:06 | Mister_Magister | @Rika what? link? |
08:10:16 | leorize | Zevv: I tried to give Mister_Magister a brief on how async work, and it's not simple enough :P |
08:10:30 | Mister_Magister | leorize: i get it i get it |
08:10:46 | Zevv | oh I never made that writeup. I started it and stalled, and I think PMunch gave it another shot also |
08:10:49 | PMunch | With nimlsp you can basically use Nim with any editor that supports LSP, but you might want to find a plug-in that does syntax highlighting if the editor doesn't have that by default |
08:11:35 | PMunch | Zevv, yeah I have a series of articles on multi-tasking in Nim in the pipeline |
08:11:54 | PMunch | But someone needs a bit more fiber in their diet, 'cause the whole line is clogged! |
08:11:55 | leorize | PMunch: well if you insist on not using nimsuggest directly, my nim.nvim does provide barebones indent & syntax highlighting |
08:12:10 | leorize | just need a quick tweak to disable the nimsuggest integration |
08:12:18 | PMunch | My projects unfortunately tend to be in a FILO queue.. |
08:12:23 | Mister_Magister | ye so there is no nice IDE :C |
08:12:55 | leorize | Mister_Magister: well if you know your way with neovim you can use my nim.nvim |
08:12:59 | leorize | !repo nim.nvim |
08:13:00 | disbot | https://github.com/baabelfish/nvim-nim -- 9nvim-nim: 11Vim support for nim. 15 53⭐ 17🍴 7& 3 more... |
08:13:07 | leorize | !repo alaviss/nim.nvim |
08:13:08 | disbot | https://github.com/alaviss/nim.nvim -- 9nim.nvim: 11Nim plugin for NeoVim 15 69⭐ 9🍴 |
08:13:10 | PMunch | Hmm, I should really check out neovim.. |
08:13:18 | Mister_Magister | leorize: i know vim only unfortunately |
08:13:30 | leorize | neovim is vim with extra features |
08:13:35 | leorize | if you know vim you know neovim |
08:13:57 | PMunch | I should also check out kakoune again |
08:14:07 | FromDiscord | <Rika> i cant remember where the thing is |
08:14:11 | FromDiscord | <Rika> give me a few minutes |
08:14:26 | * | hax-scramper quit (Ping timeout: 240 seconds) |
08:16:28 | PMunch | @Rika, was it this thing? https://vscodium.com |
08:17:07 | FromDiscord | <Rika> no |
08:17:11 | FromDiscord | <Rika> it was Code - OSS |
08:17:23 | FromDiscord | <Rika> but it seems like it just redirects to the vscode repo now |
08:17:54 | FromDiscord | <Varriount> Isn't VSCode open source? |
08:18:11 | * | hax-scramper joined #nim |
08:18:37 | PMunch | https://github.com/microsoft/vscode/wiki/Differences-between-the-repository-and-Visual-Studio-Code |
08:19:00 | FromDiscord | <Rika> yup that |
08:19:20 | PMunch | Aha, so VSCode the repository is Code without any MS stuff. Then when they go to build "Visual Studio Code" they add in their MS specific stuff. |
08:19:48 | PMunch | So VSCodium is just a pre-built version of the VSCode repo without the addition of the MS stuff |
08:19:51 | FromDiscord | <Rika> yeah probably an internal repo |
08:20:03 | FromDiscord | <Rika> no i think vscodium is even more stripped out |
08:20:14 | FromDiscord | <Rika> probably stuff like telemetry or something |
08:20:20 | FromDiscord | <Elegant Beef> yea |
08:20:23 | FromDiscord | <Rika> though i dont know why they'd leave that in the repo |
08:20:32 | FromDiscord | <Elegant Beef> vscodium is the telemetry free version of vscode |
08:20:40 | PMunch | "The VSCodium project exists so that you don’t have to download+build from source. This project includes special build scripts that clone Microsoft’s vscode repo, run the build commands, and upload the resulting binaries for you to GitHub releases. These binaries are licensed under the MIT license. Telemetry is disabled." |
08:20:42 | leorize | PMunch: you might like this feature in nim.nvim: https://asciinema.org/a/RXbwCTJXGRKEhMRiHIUEoDGd7 |
08:20:46 | PMunch | From the VSCodium site |
08:22:28 | PMunch | leorize, which feature? |
08:22:34 | FromDiscord | <Rika> indent stuff |
08:22:34 | PMunch | That should at least three or four :P |
08:22:55 | leorize | well the "smart" indent :P |
08:23:04 | FromDiscord | <Rika> ~~slow typing i see~~ |
08:23:14 | PMunch | Ah, that could be nice. But I find that "smart" indent often gets in the way unless it's done really well |
08:23:24 | * | rmt joined #nim |
08:23:33 | FromDiscord | <Rika> i should continue practicing actual touch typing should i lmao |
08:23:42 | FromDiscord | <Rika> because i use hybrid lmao |
08:24:05 | leorize | PMunch: it's done well :) |
08:24:11 | FromDiscord | <Elegant Beef> My left hand touch types but i use mostly my index and ring finger on my right |
08:24:15 | Mister_Magister | PMunch: if i make second file should i import or include it |
08:24:16 | PMunch | Want a type-off? https://typing-speed-test.aoeu.eu/?lang=en |
08:24:20 | FromDiscord | <Rika> oh no |
08:24:26 | FromDiscord | <Rika> i can only do like 60 |
08:24:31 | PMunch | Mister_Magister, import |
08:24:38 | FromDiscord | <Rika> i aint a quick typer |
08:24:44 | PMunch | And mark things you want to export to other modules with * |
08:24:45 | Mister_Magister | so * the shit out of every function… got it |
08:25:05 | PMunch | Haha, I mean you can include as well. But normally you'd do import and * |
08:25:07 | * | marmotini_ joined #nim |
08:25:15 | FromDiscord | <Rika> Mister_Magister, it depends on what the file's gonna be imported/included for |
08:25:29 | FromDiscord | <Varriount> @Rika I can type sentences quickly... But I still have to glance at the keyboard for numbers and special symbols |
08:25:31 | * | hax-scramper quit (Read error: Connection reset by peer) |
08:25:46 | FromDiscord | <Rika> oh i glance to reposition myself but after that i'm good |
08:26:03 | leorize | PMunch: I only get 71 wpm on my crappy laptop keyboard :P |
08:26:04 | FromDiscord | <Elegant Beef> i use the homing to reposition and average 70-80wpms |
08:27:02 | PMunch | Rika, leorize, slow morning: Your score: 413 CPM (that is 83 WPM) |
08:27:11 | PMunch | 0 mistakes ofc |
08:27:15 | FromDiscord | <Elegant Beef> im pretty much fucked without home row nibs 😄 |
08:27:39 | * | rmt quit (Ping timeout: 240 seconds) |
08:28:03 | PMunch | Elegant Beef, I'd like to have a Dvorak keyboard with the nibs. Never really got used to typing with them and I wonder how much of a difference it would make for me |
08:28:08 | * | hax-scramper joined #nim |
08:28:12 | leorize | gah I should get on a table :P |
08:28:26 | FromDiscord | <Rika> i did 280 on a weird typing angle |
08:28:27 | FromDiscord | <Elegant Beef> Soo anyone wanna explain the basis of reading from a stdout of process started in code? |
08:28:41 | FromDiscord | <Rika> 4 mistakes because my type of typing is prone to mistakes |
08:28:48 | FromDiscord | <Elegant Beef> Disruptek did suggest looking at his library, but i just wanna know the premise of what i should be doing |
08:28:50 | PMunch | Mine would be where you have C and U, not the most optimal position for those.. |
08:29:09 | FromDiscord | <Rika> i hone my left to wasd and i dont actually know where my right hand hones to |
08:29:14 | FromDiscord | <Rika> home |
08:29:17 | FromDiscord | <Rika> wrong word |
08:29:27 | PMunch | @Elegant Beef, well what do you want to know? |
08:29:52 | * | okcc joined #nim |
08:30:24 | PMunch | You start a Process with startProcess, then you read from the outputStream by using anything in the streams module. |
08:30:36 | leorize | ok I give up: 370 CPM (that is 74 WPM) |
08:30:38 | FromDiscord | <Elegant Beef> Yes but since EOF isnt reached it freezes |
08:30:46 | FromDiscord | <Elegant Beef> I just got 417cpm or 83wpm |
08:30:47 | * | hax-scramper quit (Read error: Connection reset by peer) |
08:30:49 | PMunch | Just be sure to actually read output if it has any, otherwise I think it might fill up a buffer and stall the process on a write. |
08:30:56 | leorize | zero mistakes |
08:31:11 | FromDiscord | <Elegant Beef> Yea it's stalling my program as is |
08:31:25 | PMunch | What kind of read are you trying to do? |
08:31:31 | PMunch | And what kind of process are you reading from+ |
08:31:44 | FromDiscord | <Elegant Beef> reading from a ncurses based cli application |
08:32:05 | FromDiscord | <Elegant Beef> Probably doing something wrong for my terminal 😄 |
08:32:10 | Mister_Magister | guys i want to return this from a function but i'm failiing to do so :C https://nim-lang.org/docs/db_sqlite.html#fastRows.i%2CDbConn%2CSqlQuery%2Cvarargs%5Bstring%2C%5D |
08:32:23 | PMunch | Hmm, yeah that might be hard to consume.. |
08:32:25 | leorize | Mister_Magister: return what? |
08:32:34 | leorize | the Row or? |
08:32:40 | leorize | the list of Row? |
08:32:47 | FromDiscord | <Elegant Beef> I tried multiple methods of reading and they tend to freeze it |
08:32:51 | FromDiscord | <Elegant Beef> Been testing with cmus |
08:32:55 | * | hax-scramper joined #nim |
08:33:04 | * | okcc_ joined #nim |
08:33:24 | Mister_Magister | leorize: like put it inside function and then use function in for x in function instead of calling it directly |
08:33:42 | leorize | you'd want an iterator |
08:33:45 | leorize | not a function :p |
08:33:59 | Mister_Magister | ye funciton returning iterator |
08:34:08 | Mister_Magister | or am i mistaking something |
08:34:14 | * | okcc quit (Remote host closed the connection) |
08:34:16 | leorize | how are you expecting to call it? |
08:34:21 | PMunch | Hmm, "Your score: 448 CPM (that is 90 WPM)", but that was with 2 mistakes.. |
08:34:27 | leorize | let iter = function(); for x in iter: |
08:34:33 | Mister_Magister | oh okay |
08:34:37 | leorize | or for x in function()? |
08:34:55 | leorize | if the second, then you'd want to make an iterator |
08:35:13 | PMunch | For the first you'd need a closure iterator |
08:35:40 | FromDiscord | <Elegant Beef> But yea i've tried using the stream.atEnd with a readLine, but that locks up cause it continues expanding the output i imagine |
08:36:07 | Mister_Magister | leorize: PMunch: i'm confused now |
08:36:10 | PMunch | atEnd checks for EOF or stream.close I think |
08:36:33 | Mister_Magister | can't i just return iterator that fastRows returns? |
08:36:41 | PMunch | Sure |
08:36:45 | PMunch | Should work |
08:36:54 | Mister_Magister | but how |
08:36:57 | alexande192 | heyy |
08:36:58 | okcc_ | i want to catch SIGTERM in order to do clean stuffs before terminating, but i got some errors with the following code |
08:36:58 | alexande192 | guyss |
08:37:00 | alexande192 | morning |
08:37:09 | PMunch | Morning alexande192 :) |
08:37:11 | okcc_ | hey |
08:37:19 | okcc_ | import posix |
08:37:19 | okcc_ | proc closeDisplay() = |
08:37:19 | okcc_ | echo "sig detected" |
08:37:19 | okcc_ | when isMainModule: |
08:37:19 | okcc_ | signal(SIGINT, closeDisplay) |
08:37:27 | PMunch | Please don't paste code into IRC.. |
08:37:38 | leorize | Mister_Magister: it's better if you tell us your use case... |
08:37:39 | okcc_ | Sorry |
08:37:46 | Mister_Magister | PMunch: i made proc function*(): iterator = and assigned fastRows to result |
08:37:50 | okcc_ | i'll not do that |
08:38:22 | PMunch | Oh, fastRows is an iterator |
08:38:28 | leorize | okcc_: https://nim-lang.org/docs/posix.html#onSignal.t%2Cvarargs%5Bcint%5D%2Cuntyped |
08:38:44 | PMunch | Then you'd probably need to wrap that in a closure iterator to return it |
08:39:18 | Mister_Magister | o…oh… |
08:39:22 | PMunch | I don't really have a DB to try with.. |
08:39:24 | leorize | PMunch: since Mister_Magister is not fluent with Nim, I don't think we should recommend that until we know the actual use case |
08:39:28 | Mister_Magister | i don't really follow |
08:39:36 | okcc_ | leorize, thanks, so the signal function is not meant to be used by users? |
08:40:24 | leorize | okcc_: you can use it, it's just not *that* simple |
08:40:52 | leorize | Mister_Magister: well how are you gonna use this function? |
08:40:57 | leorize | like an use case for it? |
08:41:16 | okcc_ | it needs a Sighandler at position 2, meanwhile the Sighandler is not exported in posix |
08:41:17 | Mister_Magister | leorize: i want to get all rows from database and then use/display them all |
08:41:39 | okcc_ | anyway, thank you |
08:42:08 | Mister_Magister | leorize: i wanna move getting rows from here to separate file https://github.com/Michal-Szczepaniak/lenislaw/blob/master/bot.nim#L648 |
08:42:16 | leorize | okcc_: that's probably a bug |
08:42:19 | Mister_Magister | should explain |
08:42:22 | leorize | you should file it on the issue tracker |
08:43:48 | PMunch | Mister_Magister, returning iterators: https://play.nim-lang.org/#ix=2dWh |
08:43:58 | * | dddddd quit (Ping timeout: 265 seconds) |
08:44:00 | Mister_Magister | leorize: cause if i'm moving db to db module then i wanna move everything db related there |
08:44:54 | okcc_ | leorize: maybe, lol |
08:45:21 | leorize | Mister_Magister: so you want something like: for cmd in db.articles()? |
08:45:38 | Mister_Magister | leorize: yes kinda |
08:46:01 | Araq | will stream soon |
08:46:03 | Mister_Magister | instead of for cmd in db.fastRows(sql… |
08:46:32 | Araq | topic: improvements for "goto based" exception handling |
08:47:17 | alexande192 | o.O strange my nick |
08:47:20 | leorize[m] | Mister_Magister: https://play.nim-lang.org/#ix=2dWi |
08:47:25 | alexande192 | not sure what happened PMuch |
08:47:28 | * | watzon quit (Quit: Ping timeout (120 seconds)) |
08:47:51 | * | watzon joined #nim |
08:47:52 | PMunch | Mister_Magister, then you can just write your own iterator around fastRows: https://play.nim-lang.org/#ix=2dWj |
08:47:52 | Mister_Magister | leorize[m]: oh thank you! |
08:48:03 | * | opal quit (Ping timeout: 240 seconds) |
08:48:06 | PMunch | Haha, yeah, that |
08:48:18 | Mister_Magister | PMunch: thanks but leorize[m] has cleaner solution :) |
08:48:51 | PMunch | Haha, it's the same solution :P |
08:49:02 | Mister_Magister | except it doesn't compile :P |
08:49:10 | Mister_Magister | neither of those solutions |
08:49:14 | PMunch | Unless you're referring to my first one where I return a closure iterator |
08:49:23 | * | leorize quit (Ping timeout: 240 seconds) |
08:49:33 | Mister_Magister | PMunch: yeah |
08:49:46 | PMunch | Mine compiles on the playground. Not sure what you did to put it into your code.. |
08:49:46 | alexande192 | is this the same speed |
08:49:52 | Mister_Magister | leorize[m]: Error: 'yield' only allowed in an iterator |
08:50:11 | PMunch | alexande192, yeah how did you end up with replacing the r with a 1 |
08:50:20 | Mister_Magister | same applies for PMunch then :P |
08:50:32 | leorize[m] | Mister_Magister: well... did you change iterator to proc? |
08:50:49 | Mister_Magister | oooooooh didn't see that one! |
08:51:02 | PMunch | Haha :P |
08:51:02 | Mister_Magister | sorry :D |
08:51:24 | leorize[m] | read this to understand iterators :P https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement |
08:52:24 | * | okcy quit (Read error: Connection reset by peer) |
08:52:31 | Mister_Magister | thank you guys! |
08:52:40 | * | okcy joined #nim |
08:52:41 | * | okcc_ quit (Remote host closed the connection) |
08:53:38 | * | okcc joined #nim |
08:57:49 | * | opal joined #nim |
08:59:23 | * | leorize joined #nim |
08:59:37 | Mister_Magister | PMunch: leorize[m]: putting your teachings into use https://github.com/Michal-Szczepaniak/lenislaw/commit/1c351e5e700512cb0fd067abd3dfec3d2f5ddf27 |
09:00:02 | Mister_Magister | now gotta fix heresy |
09:00:40 | leorize | now that's a good first step |
09:00:51 | Mister_Magister | :) |
09:02:33 | leorize | I also notice a lot of try-except-discard |
09:02:55 | leorize | there's tryExec() for that :P |
09:05:19 | Mister_Magister | leorize: link? |
09:06:03 | leorize | https://nim-lang.github.io/Nim/db_sqlite#tryExec%2CDbConn%2CSqlQuery%2Cvarargs%5Bstring%2C%5D |
09:06:03 | Mister_Magister | can't find it |
09:07:12 | Mister_Magister | leorize: but that's only for db and i find only one case where i could use it |
09:07:34 | * | okcc_ joined #nim |
09:07:59 | * | okcy quit (Remote host closed the connection) |
09:08:07 | * | okcy joined #nim |
09:08:40 | leorize | wait except IOError? |
09:08:44 | leorize | that doesn't sound right |
09:09:10 | Mister_Magister | ye but that's not db |
09:09:59 | leorize | well I would be concerned if you're discarding IOError :P |
09:10:10 | * | okcc quit (Ping timeout: 256 seconds) |
09:10:22 | Mister_Magister | shhhh :D |
09:10:40 | leorize | the IOError might have come from your threaded-async attempt :P |
09:11:09 | leorize | asyncdispatch is not designed for it |
09:11:26 | Mister_Magister | leorize: it's because if i try to delete message without having permissions to do so it throws io error even tho i checked for permissoins ealier :C |
09:12:37 | * | marmotini_ quit (Remote host closed the connection) |
09:12:51 | leorize | wait they actually throw IOError? |
09:13:09 | * | marmotini_ joined #nim |
09:13:42 | leorize | yep https://github.com/ba0f3/telebot.nim/blob/2da3f0d8e9821b3aa6626251ee6edba0bd9ef78a/telebot/utils.nim#L185 |
09:13:55 | Mister_Magister | ye |
09:14:28 | leorize | I don't think that's the kind of error meant for IOError, but gotta deal with whatever cards you're dealt with I guess |
09:14:46 | Mister_Magister | yeah |
09:15:03 | Mister_Magister | so nim stable is 0.20 and i need 1.0.4 |
09:15:27 | leorize | nim stable is 1.0.6 btw |
09:15:44 | Mister_Magister | hmm choosenim you liar |
09:16:47 | * | floppydh joined #nim |
09:17:42 | * | marmotini_ quit (Ping timeout: 258 seconds) |
09:26:30 | lqdev[m] | ah yes, choosenim downloads the old version again! |
09:26:53 | Mister_Magister | i need to update nim package for opensuse again |
09:27:01 | Mister_Magister | i actually helped fixing it |
09:27:31 | ldlework | I always forget you can use italics in IRC. |
09:27:53 | Mister_Magister | and colors (idk how tho) |
09:27:59 | ldlework | and colors! |
09:28:39 | Mister_Magister | and unicode 👌👌👌👌👌 |
09:28:50 | ldlework | but no gifs :( |
09:28:56 | Mister_Magister | or images :( |
09:30:43 | Mister_Magister | latest nim in repo is… 0.19.6 |
09:31:23 | Mister_Magister | tho latest on obs is 1.0.2 https://build.opensuse.org/package/show/devel:languages:misc/nim |
09:32:20 | Araq | https://www.twitch.tv/araq4k |
09:32:25 | * | dwdv joined #nim |
09:33:09 | Mister_Magister | https://paste.opensuse.org/74652436 hecc those latest libs! |
09:33:16 | Mister_Magister | they never work :C |
09:35:07 | Mister_Magister | poll async is only in newer telebot but i can't compile it fml |
09:36:39 | lqdev[m] | Idlework: nice to know that the bridge converts formatting from matrix to mIRC codes or whatever they were called |
09:38:28 | Mister_Magister | any idea anyone? |
09:42:05 | leorize | lqdev[m]: that's a new feature |
09:42:34 | FromDiscord | <djazz> audio echo on the stream Araq |
09:44:31 | * | couven92 joined #nim |
09:51:05 | * | couven92 quit (Read error: Connection reset by peer) |
09:51:31 | * | couven92 joined #nim |
10:00:18 | Mister_Magister | holy shit PMunch leorize the asyncCheck stuff works! |
10:01:33 | FromDiscord | <Rika> congrats |
10:01:44 | Mister_Magister | thanks |
10:02:26 | * | okcy quit (Remote host closed the connection) |
10:02:48 | Mister_Magister | https://github.com/Michal-Szczepaniak/lenislaw/commit/75b33f5d867b2e8e4117a9cccc8b72134882e1cf |
10:03:20 | * | okcy joined #nim |
10:04:45 | dwdv | Ada related question: There's the strutils.HexDigits constant for manual inclusion checks, but does nim also support type decls like the following? |
10:04:47 | dwdv | subtype hex is character with static_predicate => hex in '0'..'9' | 'a'..'f' | 'A'..'F'; |
10:05:23 | PMunch | Hooray! (sorry, had to go to the dentist for a bit there) |
10:05:53 | PMunch | dwdv, kinda |
10:06:12 | Mister_Magister | leorize: https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncproc.nim can i make callback so that when process finishes my callback gets called and it sends video using telebot? |
10:06:20 | alexande192 | oh i hope the dentist went well |
10:06:24 | alexande192 | kinda scared of dentists |
10:06:50 | PMunch | Me too, but it went well. They had sent me an appointment by accident :P So I just came in, said hi, and left again |
10:06:57 | Mister_Magister | dentists are pure evil, the more you go to them the less you need to go to them but the less you go to them the more you need to go to them |
10:07:21 | PMunch | I hadn't been to the regular dentist for 6 year, but I had no holes or anything |
10:08:12 | PMunch | This is actually the orthodontist (sp?) because I had braces when I was younger (still have them on the back of my teeth) and we're discussing actually fixing it |
10:08:19 | FromDiscord | <Rika> i dont know why the fuck everyone hates going to the dentist |
10:08:49 | FromDiscord | <Rika> the only thing i hate about going to the dentist is the sound the scratchy thing they use to clean off plaque has |
10:09:26 | PMunch | Well, when you've been tortured as much as I have at the dentist it tends to leave a bad taste in your mouth (pun intended) |
10:09:45 | lqdev[m] | *laughs in exceptionally durable teeth* |
10:09:45 | PMunch | I didn't mind going to the dentist as a kid |
10:09:52 | PMunch | And I'm getting over it slowly |
10:10:09 | PMunch | lqdev[m], my teeth are just fine, it's my jaw that's messed up.. |
10:10:16 | lqdev[m] | oof |
10:10:24 | FromDiscord | <Rika> whats the issue with your jaw |
10:10:29 | PMunch | Basically I have a clinical underbite |
10:10:45 | FromDiscord | <Rika> i had that as a kid, gone by teen years |
10:10:48 | PMunch | So my front teeth meet instead of the lower ones going behind the top ones |
10:10:51 | lqdev[m] | yeah mine's a little crooked |
10:11:02 | lqdev[m] | but nothing too serious |
10:11:07 | dwdv | PMunch: what should I be looking for in the stdlib/manual regarding the type declaration? Skimmed over the manual, any keywords I could look up? |
10:11:15 | PMunch | So they started pulling teeth and putting on various braces and expandors to try and fix it |
10:11:27 | FromDiscord | <Rika> mine're fine except for some insane cavities i somehow/mysteriously got |
10:11:46 | FromDiscord | <Rika> read the whole thing 😄 |
10:12:02 | PMunch | But through a series of unfortunate events they messed it up and it didn't help at all.. So now I'm stuck with a slight fear of dentists and no improvement (yay) |
10:13:25 | PMunch | dwdv, well Nim doesn't support declaring that as a type. What you could do is declare a distinct char and write a `converter` to it that throws an error if it isn't in the set {'0'..'9', 'a'..'f', 'A'..'F'}. |
10:14:14 | dwdv | Ah, I see. Okay, thank you. |
10:14:49 | PMunch | Alternatively you could declare an enum (potentially with size: 1 to make them byte-compatible) and accept that |
10:14:55 | PMunch | This could of course be written as a macro |
10:18:26 | PMunch | dwdv, example of the converter method: https://play.nim-lang.org/#ix=2dWD |
10:18:38 | dwdv | Sure, but I would still have to manually check all over the place, right? Will look into operator overloading. |
10:19:06 | PMunch | Nope, the converter will try and convert any character to a HexDigit if you pass them |
10:19:30 | PMunch | A converter is essentially a way to make Nim able to automatically convert between types |
10:19:35 | dwdv | But ada explodes on foo := 'z'. |
10:19:42 | dwdv | Would like to replicate that. |
10:20:09 | PMunch | So does my example: https://play.nim-lang.org/#ix=2dWE |
10:20:19 | PMunch | On runtime though |
10:20:46 | Mister_Magister | !eval echo "test" |
10:20:49 | NimBot | test |
10:22:32 | Mister_Magister | !eval import httpclient, htmlparser; let client = newHttpClient(); loadHtml(client.getContent("https://nim-lang.org/docs/htmlparser.html")) |
10:22:35 | NimBot | Compile failed: /usercode/in.nim(1, 70) Error: expression 'loadHtml(getContent(client, "https://nim-lang.org/docs/htmlparser.html"))' is of type 'XmlNode' and has to be discarded |
10:22:47 | Mister_Magister | !eval import httpclient, htmlparser; let client = newHttpClient(); discard loadHtml(client.getContent("https://nim-lang.org/docs/htmlparser.html")) |
10:22:55 | NimBot | /usercode/in.nim(1) in↵/playground/nim/lib/pure/httpclient.nim(961) getContent↵/playground/nim/lib/pure/httpclient.nim(956) get↵/playground/nim/lib/pure/httpclient.nim(932) request↵/playground/nim/lib/pure/httpclient.nim(907) request↵/playground/nim/lib/pure/httpclient.nim(876) requestAux↵/playground/nim/lib/pure/httpclient.nim(791) newConnection↵Error: unhandled exception: SSL support is not available. Cannot connect over SSL. ... |
10:23:05 | PMunch | The playground where that code is running don't have internet |
10:23:10 | Mister_Magister | geez |
10:23:14 | Mister_Magister | anyway |
10:23:19 | Mister_Magister | this code isn't working |
10:23:34 | Mister_Magister | spits ioerror on me :< |
10:23:51 | dwdv | PMunch: Oh sweet, "unhandled exception: Character 'z' must be a hexadecimal digit [ValueError]". That should do, thanks again! Completely overlooked converters. |
10:23:57 | muffindrake | How would I write a wrapper for echo? Even something as simple as printing a timestamp before passing the actual arguments to echo? |
10:24:06 | Mister_Magister | PMunch: could you help? |
10:25:09 | Mister_Magister | it loads html just fine but loadHtml throws ioerror |
10:26:13 | PMunch | muffindrake, write a proc that takes varargs[string, `$`] and pass the arguments to echo. |
10:26:43 | PMunch | Mister_Magister, isn't loadHtml expecting a file? I think what you want is parseHtml |
10:26:50 | Mister_Magister | ohhhh |
10:26:52 | Mister_Magister | makes sense |
10:27:42 | Mister_Magister | ye works now |
10:28:01 | muffindrake | Hm, I see. By 'arguments', did you mean 'argument', since that proc (and echo itself in the definition) has technically only one argument? |
10:28:29 | muffindrake | proc echo*(x: varargs[typed, `$`]) |
10:29:19 | Mister_Magister | SIGSEGV: Illegal storage access. (Attempt to read from nil?) oh me oh my |
10:30:59 | FromDiscord | <Rika> wtf |
10:31:29 | FromDiscord | <Rika> so i just discovered why my code was taking time even when async was used, the lib i was using wasnt fully async |
10:31:49 | PMunch | muffindrake, yeah argument is right. It takes in something which behaves pretty much like a sequence. |
10:32:12 | PMunch | Mister_Magister, ouch.. |
10:32:19 | PMunch | Was that without -d:release? |
10:32:30 | PMunch | Or I guess -d:danger nowadays |
10:33:51 | FromDiscord | <Rika> okay, i was wrong |
10:34:11 | FromDiscord | <Rika> how do you determine what's bottlenecking my async code ;; |
10:34:20 | FromDiscord | <Rika> how do you determine what's bottlenecking / async code ;; |
10:34:33 | FromDiscord | <Rika> ah forgot discord doesnt send s/// code |
10:34:41 | FromDiscord | <Rika> damn it sorry |
10:34:53 | Mister_Magister | PMunch: i think attrs is nil and example isn't checking that |
10:35:45 | Mister_Magister | yep i'm right |
10:36:05 | * | couven92 quit (Read error: Connection reset by peer) |
10:36:29 | * | couven92 joined #nim |
10:36:30 | Mister_Magister | PMunch: instead of a.attrs.hasKey in example https://nim-lang.org/docs/htmlparser.html#examplecolon-transforming-hyperlinks i used https://nim-lang.org/docs/xmltree.html#attr%2CXmlNode%2Cstring |
10:36:33 | Mister_Magister | saved me one if even |
10:38:27 | Mister_Magister | PMunch: i'm now wondering how to extract text from node… |
10:39:13 | PMunch | rawText or innerText I'd assume |
10:39:25 | PMunch | Isn't the output an XMLNode? https://nim-lang.org/docs/xmltree.html |
10:39:48 | Mister_Magister | thanks! innerText works |
10:39:58 | PMunch | Rika, well by instrumenting your code somehow.. |
10:40:02 | PMunch | brb, lunch |
10:40:05 | Mister_Magister | couldn't find it |
10:41:17 | Mister_Magister | can i hae some array i can append stuff to? |
10:47:26 | FromDiscord | <Rika> PMunch, ah man... |
10:53:47 | FromDiscord | <Rika> my asynccheck-called procs are running immediately |
10:53:54 | FromDiscord | <Rika> i still dont know why |
10:54:24 | FromDiscord | <Rika> (theyre invoked within an async proc so poll is being called too) |
11:01:05 | * | couven92 quit (Read error: Connection reset by peer) |
11:01:29 | * | couven92 joined #nim |
11:04:05 | * | couven92 quit (Read error: Connection reset by peer) |
11:04:31 | * | couven92 joined #nim |
11:12:47 | PMunch | Mister_Magister, a seq? |
11:13:34 | PMunch | Rika, well yes why wouldn't your async procedures run immediately? |
11:13:48 | Mister_Magister | PMunch ye i already got it |
11:18:20 | FromDiscord | <Rika> PMunch because it's doing a network request, and i thought asyncCheck shouldnt context switch? |
11:20:01 | PMunch | asyncCheck will probably run your code until the first await statement |
11:20:22 | FromDiscord | <Rika> and then? |
11:21:01 | PMunch | And then? |
11:21:19 | PMunch | Then the asyncdispatcher will get control back and hand it over to anything else that's registered |
11:22:44 | FromDiscord | <Rika> AH |
11:22:47 | FromDiscord | <Rika> it clicked |
11:22:50 | FromDiscord | <Rika> okay |
11:33:26 | PMunch | Async really isn't that hard once you realise how it works :P |
11:34:22 | FromDiscord | <Rika> well i get how async await works just asynccheck doesnt work as i though |
11:36:02 | PMunch | Ah, IIRC it just works by attaching a callback that checks for errors |
11:36:23 | FromDiscord | <Rika> i thought asynccheck returns immediately? |
11:36:38 | alexande192 | guys |
11:36:52 | FromDiscord | <Rika> ? |
11:37:07 | * | cgfuh joined #nim |
11:37:11 | alexande192 | i generated a type with integer and CallCountKind field where CallCountKind*: Eq, GtOrEq, LsOrEq, Gt, Ls |
11:37:23 | alexande192 | do you think this is a good idea in general |
11:37:47 | alexande192 | to represent int more generally in cases where one might need to show approximate values |
11:38:01 | Mister_Magister | Since now i have runForever, can i make timer that will run every 5 minutes and call callback async? |
11:38:16 | FromDiscord | <Rika> i dont see why not |
11:38:28 | alexande192 | e.g. a = Int64(>= 10) |
11:38:42 | alexande192 | something like that |
11:38:48 | FromDiscord | <Rika> prolly an async proc with a while true loop that has `await sleepAsync 5*60` then the callback |
11:39:00 | FromDiscord | <Rika> that might work ^ mister_magister |
11:39:29 | Mister_Magister | while true loop? doesn't look sane to me |
11:40:04 | FromDiscord | <Rika> what do you mean sane lmao |
11:40:37 | Mister_Magister | i already have waitForever and it calls my async callbacks… |
11:40:55 | Mister_Magister | leorize: PMunch: ideas? |
11:41:24 | PMunch | Well, the addTimer feature seems like a perfect match: https://nim-lang.org/docs/asyncdispatch.html#addTimer%2Cint%2Cbool%2CCallback |
11:42:44 | FromDiscord | <Rika> okay so after some thinking |
11:43:10 | PMunch | alexande192, not really sure what you're talking about there.. |
11:43:17 | Mister_Magister | PMunch: and it will connect to my runForever? |
11:43:18 | FromDiscord | <Rika> it doesnt make sense for asyncCheck to return immediately because "maybe people want this to run in the correct order" or something i dont know |
11:43:22 | FromDiscord | <Rika> im still somewhat baffled by this |
11:46:31 | PMunch | Yup, it is a feature of the asyncdispatch |
11:47:48 | PMunch | Well that's how co-operative multitasking works. You run when you get told to, and control only switches when you tell it to. |
11:47:53 | * | rockcavera joined #nim |
11:51:11 | FromDiscord | <Rika> okay so how do i "queue" something |
11:51:36 | FromDiscord | <Rika> instead of it running immediately, it runs after the function already running finishes |
11:55:50 | * | lritter joined #nim |
11:58:21 | PMunch | Attach a callback to it |
11:58:48 | FromDiscord | <Rika> uh |
11:58:52 | FromDiscord | <Rika> 😅 |
11:58:54 | FromDiscord | <Rika> how? |
11:58:56 | PMunch | Basically the first example in the asyncdispatch module documentation |
11:59:00 | FromDiscord | <Rika> okay thanks |
11:59:50 | FromDiscord | <Rika> wait, what's the difference of me doing that and asyncCheck then? |
12:00:02 | FromDiscord | <Rika> asyncCheck's code is literally just that isnt it? |
12:00:04 | PMunch | What do you mean? |
12:00:28 | FromDiscord | <Rika> asyncCheck attaches a callback to the future right? |
12:00:34 | PMunch | Mhm |
12:00:50 | FromDiscord | <Rika> then why would me doing it manually have different behavior to asyncCheck |
12:01:03 | PMunch | It wouldn't, if you use the same callback |
12:01:34 | FromDiscord | <Rika> i mean regards it running immediately and running after the calling proc finishes |
12:01:35 | PMunch | asyncCheck is just a convenience so you don't `discard` void futures :P |
12:02:03 | PMunch | Oh, there's no difference to that |
12:02:30 | PMunch | Ah, I misunderstood what you meant |
12:03:03 | FromDiscord | <Rika> ah |
12:03:04 | PMunch | I guess maybe callSoon could help |
12:03:15 | PMunch | That would run it on the next dispatch |
12:03:20 | alexande192 | i think asyncCheck should also do something about errors |
12:03:27 | alexande192 | so its not just the same as discarding |
12:03:46 | alexande192 | we were supposed to forbid direct discarding eventually |
12:03:49 | PMunch | Yeah, it raises exceptions raised by the future |
12:03:53 | FromDiscord | <Rika> uh so how do i 😅 |
12:03:57 | FromDiscord | <Rika> how do i use callSoon |
12:04:01 | FromDiscord | <Rika> with a Future[T |
12:04:11 | alexande192 | and also forbid waitFor in {.async.} |
12:04:33 | FromDiscord | <Rika> > forbid waitFor in {.async.} |
12:04:33 | FromDiscord | <Rika> you'd make the discordnim developer mad LOL /s |
12:04:37 | PMunch | callSoon takes a proc |
12:05:33 | alexande192 | Rika well i used waitFor in one of my async modules for a long time as well |
12:05:43 | alexande192 | and i think it wasnt a good idea |
12:06:12 | FromDiscord | <Rika> it definitely isnt, i'm just saying that the discordnim module has a lot of waitFor despite it being "async" |
12:06:21 | FromDiscord | <Rika> had to change it a lot to fix it up |
12:06:35 | alexande192 | well, thats kinda fault of our stdlib indeed |
12:06:45 | alexande192 | if we dont make it a hard error, people will use it |
12:07:02 | PMunch | Well waitFor certainly has its uses |
12:07:09 | PMunch | Mostly to turn async into non-async though |
12:07:25 | PMunch | I think what async/await really needs is more tutorials and such |
12:07:32 | alexande192 | no PMunch that's not what i mean |
12:07:38 | alexande192 | waitFor is ok *outside* of async |
12:07:49 | alexande192 | but not inside |
12:07:50 | alexande192 | https://github.com/nim-lang/Nim/issues/11911 |
12:07:51 | disbot | ➥ Make usage of waitFor in {.async.} compile time error |
12:08:19 | alexande192 | basically i need to fix my port of yglukhov's await-as-a-template |
12:08:36 | PMunch | Aren't there any reason to use it? |
12:09:00 | alexande192 | and then do the waitFor error on top i guess |
12:09:24 | alexande192 | PMunch well, why would you use it inside |
12:09:30 | PMunch | Rika, what is it actually you're trying to do? |
12:09:54 | PMunch | alexande192, I dunno, but I guess there is some usecase for it |
12:10:23 | FromDiscord | <Rika> maybe i'm thinking of this wrongly |
12:10:31 | PMunch | Probably :P |
12:10:33 | FromDiscord | <Rika> maybe i do need threading now |
12:10:40 | FromDiscord | <Rika> argh! threading! what a pain |
12:10:44 | PMunch | Again, what are you doing? |
12:10:57 | FromDiscord | <Rika> so i have an event loop watching for events |
12:11:21 | alexande192 | PMunch i think somewhere in the docs they were forbidden |
12:11:22 | alexande192 | also https://forum.nim-lang.org/t/3920 |
12:11:29 | FromDiscord | <Rika> when an event is emitted, i do some stuff (irrelevant) and conditions and when something meets that condition, i make a network request |
12:11:30 | alexande192 | it seems they are forbidden in the nim book |
12:11:43 | FromDiscord | <Rika> i want to make that network request not interfere with the event loop |
12:12:00 | alexande192 | basically if you can think of a good contra-argument, i'd love it of course |
12:12:11 | * | lopofsky joined #nim |
12:12:15 | FromDiscord | <Rika> but i do not know how to determine whether its being interfered with |
12:12:25 | * | marmotini_ joined #nim |
12:14:03 | PMunch | I mean, it will interfere some |
12:14:15 | PMunch | That's just the nature of async |
12:14:22 | FromDiscord | <Rika> i mean that's fine, as long as it aint 100 fuckin milliseconds |
12:14:33 | alexande192 | is the network request slow? |
12:14:36 | FromDiscord | <Rika> no clue |
12:14:47 | alexande192 | i mean, why is it slowing your whole event loop down? |
12:14:57 | FromDiscord | <Rika> no clue (2) |
12:15:09 | PMunch | It seems like you're trying to optimise something without really knowing what is actually slow |
12:15:13 | alexande192 | what i mean is how you profile it |
12:15:20 | FromDiscord | <Rika> to be totally fuckin honest i have no clue if my code is correct |
12:15:27 | alexande192 | to make sure where is the time spent |
12:15:28 | FromDiscord | <Rika> PMunch, yes |
12:15:39 | FromDiscord | <Rika> i dont know if it's slow so i'm just assuming it is |
12:15:51 | alexande192 | well, i guess it might be possible to measure it |
12:15:56 | FromDiscord | <Rika> but i'd really like to know how to determine it being slow |
12:16:23 | PMunch | Yeah, before trying to optimise something you should first figure out if there is something to optimise, and what is actually worth optimising |
12:16:43 | FromDiscord | <Rika> i mean i dont know how i have no clue on how to determine that |
12:17:16 | PMunch | Well, the easiest is to throw in some timing statements and echo them out |
12:17:20 | * | lopofsky quit (Quit: Leaving) |
12:17:44 | PMunch | Or use a profiler, but I'm not sure how well they work with Nims async.. |
12:18:03 | alexande192 | well you can always just profile the raw event loop calls |
12:18:05 | PMunch | Since it essentially rewrites everything :P |
12:18:31 | FromDiscord | <Rika> yeah the loop does stop for a few hundred milliseconds |
12:18:38 | alexande192 | you can figure out whats happening its mostly something like poll (? or something else i forgot) => series of funAsync, funIter etc |
12:19:15 | alexande192 | so you have to see where exactly its stopping |
12:19:16 | FromDiscord | <Rika> this is gonna drive me insane i swear ;; |
12:19:23 | alexande192 | its possible that you invoke e.g. a blocking syscall |
12:19:33 | alexande192 | which still blocks your async call |
12:19:45 | alexande192 | i wanted to make that detectable somehow as well |
12:19:47 | PMunch | Rika, what do you mean stop the loop? The loop stops every time something gets executed.. |
12:20:03 | PMunch | Wait, what Nim version do you use? |
12:20:28 | * | okcc_ quit (Quit: Leaving) |
12:20:34 | alexande192 | but its much harder: maybe user-defienable "block cost/functions" primitive annotations |
12:21:05 | FromDiscord | <Rika> 1.0.6 and i know it stops the loop |
12:21:05 | * | couven92 quit (Read error: Connection reset by peer) |
12:21:07 | FromDiscord | <Rika> really |
12:21:10 | FromDiscord | <Rika> im pretty confused now |
12:21:19 | FromDiscord | <Rika> i dont know what the hell im saying really |
12:21:29 | * | couven92 joined #nim |
12:21:37 | alexande192 | do you have a repor |
12:21:39 | alexande192 | repro* |
12:21:52 | alexande192 | it would be easiest to just look at it |
12:22:19 | FromDiscord | <Rika> no i dont |
12:22:30 | FromDiscord | <Rika> ill ask another time maybe |
12:22:49 | PMunch | Of course it stops the loop, again that's how async works.. |
12:23:04 | FromDiscord | <Rika> i know it does i know |
12:23:10 | * | marmotini_ quit (Remote host closed the connection) |
12:23:19 | FromDiscord | <Rika> what im saying i think is that it does it for too long |
12:23:46 | * | marmotini_ joined #nim |
12:24:03 | * | couven92 quit (Read error: Connection reset by peer) |
12:24:30 | * | couven92 joined #nim |
12:28:41 | PMunch | Rika, by the way if you want a sneak peak at my article: http://ix.io/1Xyc/ |
12:28:41 | * | marmotini_ quit (Ping timeout: 268 seconds) |
12:29:04 | PMunch | Err, remove the last slash there to get a readable version.. |
12:33:24 | alexande192 | rika well you just have to find out what call happens when it stops |
12:33:56 | * | s4mu3lbk joined #nim |
12:34:33 | PMunch | Yeah, add some carefully positioned echos, and possibly some time measurements around in your calls |
12:34:56 | PMunch | Would be nice if asyncdispatch had a debug mode for this kind of stuff actually |
12:40:00 | FromDiscord | <Rika> dat formatting tho |
12:40:27 | FromDiscord | <Rika> PMunch, alexande192, i shall |
12:40:36 | FromDiscord | <Rika> still being driven insane though |
12:40:42 | PMunch | Rika, what do you mean? |
12:40:57 | PMunch | As I said, remove the last / from that link in order to actually get sane formatting |
12:41:38 | FromDiscord | <Rika> yeah i didnt read that |
12:41:40 | FromDiscord | <Rika> i did |
12:41:45 | FromDiscord | <Rika> and i shall take a look |
12:43:57 | * | s4mu3lbk quit (Ping timeout: 240 seconds) |
12:44:19 | FromDiscord | <Rika> actually the "formatted" version is still hard to read, ill read this some other time when im not sick perhaps |
12:49:45 | alexande192 | take some rest man |
12:53:05 | * | natrys joined #nim |
12:55:19 | PMunch | Best way to fix bugs when you are sick, rest and wait until you're healthy :) |
12:59:18 | * | endragor quit (Remote host closed the connection) |
13:03:22 | * | solitudesf quit (Quit: Leaving) |
13:03:33 | * | marmotini_ joined #nim |
13:18:29 | * | abm joined #nim |
13:22:05 | * | okcc joined #nim |
13:23:30 | * | nsf quit (Quit: WeeChat 2.7) |
13:39:43 | PMunch | Who wrote => in sugar? |
13:40:59 | FromDiscord | <mratsim> it's old |
13:41:02 | FromDiscord | <mratsim> older than me |
13:41:37 | FromDiscord | <mratsim> also now it's quite picky, you now often need to explicitly put the type (since 0.18 iirc) |
13:42:02 | PMunch | Oh really? That's what I was wondering, how on earth it worked so well :P |
13:43:57 | FromDiscord | <Rika> `git blame` |
13:44:25 | PMunch | The module had been renamed |
13:44:36 | PMunch | But yeah, it turns out that Dominik wrote it back in 2014 |
13:51:07 | disruptek | !last zevv |
13:51:08 | disbot | Zevv spoke in 12#nim 7 hours ago |
13:52:01 | PMunch | Oh cool, neat feature! |
13:52:05 | FromDiscord | <Rika> how many hours ago though |
13:52:23 | PMunch | Uhm, doesn't that come through Rika? |
13:52:39 | PMunch | On IRC it says: Zevv spoke in #nim 7 hours ago |
13:52:55 | disruptek | people on discord or gitter don't get irc color/style formatting because dumb. |
13:53:01 | PMunch | disruptek, is there a list of features somewhere? |
13:53:27 | PMunch | Yeah but I thought it just stripped the colours, not removed the whole thing |
13:53:29 | FromDiscord | <Rika> it shows nothin o'er here |
13:53:37 | FromDiscord | <Rika> `<disbot> Zevv spoke in #nim hours ago` |
13:53:52 | disruptek | the only ones not documented in !help are !tune and !last. |
13:54:17 | disruptek | that's a simple bridge defect, then. |
13:54:26 | FromGitter | <kaushalmodi> !help |
13:54:32 | aeverr | !help |
13:54:47 | FromDiscord | <Rika> help does nothing? |
13:54:52 | FromDiscord | <Rika> didnt get a PM either |
13:55:11 | disruptek | yeah, discord/gitter users cannot receive PMs. |
13:55:13 | FromGitter | <kaushalmodi> I see this on Gitter: "*<disbot>* 9Zevv spoke in #nim 77 hours ago" |
13:55:13 | disruptek | ~notes |
13:55:14 | disbot | notes: 11https://gist.github.com/disruptek/41100bf20978de9a3cff55b23fcfe44e -- disruptek |
13:55:22 | disruptek | some docs in there. |
13:55:40 | disruptek | i guess i will put the help in a footnote. |
13:56:05 | aeverr | disruptek, i just sent here though (i'm Rika) |
13:56:07 | FromDiscord | <Rika> aeverr's me |
13:56:14 | disruptek | !help |
13:56:24 | disruptek | works for me. |
13:56:29 | aeverr | !help |
13:56:36 | aeverr | worked on the second try |
13:57:40 | disruptek | i guess we should fix the bridges. |
13:58:14 | disruptek | !last shashlick |
13:58:14 | disbot | shashlick spoke in 12#nim 9 hours ago |
13:58:15 | FromDiscord | <Rika> what do you think yardanico's doing hahaha |
13:58:40 | disruptek | ol' shashlick has some pretty advanced bridging. |
14:02:55 | * | okcy quit (Remote host closed the connection) |
14:03:23 | PMunch | aeverr, you had a space before your ! on the first try :) |
14:03:39 | * | okcy joined #nim |
14:03:50 | PMunch | !last PMunch |
14:03:51 | disbot | PMunch joined 12#nim 6 hours ago |
14:04:05 | PMunch | Huh, so if you are here it says when you joined |
14:04:06 | PMunch | Neat |
14:04:38 | PMunch | Although a spoke as well would be better |
14:04:48 | PMunch | !araq |
14:04:53 | PMunch | !last Araq |
14:04:54 | disbot | Araq never seen. |
14:05:01 | PMunch | Uhm.. |
14:05:15 | PMunch | !last dom96 |
14:05:15 | disbot | dom96 never seen. |
14:05:23 | PMunch | !last disbot |
14:05:24 | disbot | disbot joined 12#nimsec 10 hours ago and last spoke 710 hours ago |
14:05:34 | PMunch | (sorry by the way if that pinged you guys..) |
14:06:18 | * | PMunch quit (Quit: Leaving) |
14:06:36 | * | PMunch joined #nim |
14:10:00 | disruptek | !last PMunch |
14:10:00 | disbot | PMunch joined 12#nim 6 hours ago |
14:10:05 | disruptek | that's a bug. |
14:10:48 | disruptek | i don't bother tracking people that have no events. but, ar4q should have events. |
14:10:56 | disruptek | and obviously, you spoke. |
14:11:08 | disruptek | !last Rika |
14:11:08 | disbot | Rika spoke in 12#nim 9 hours ago |
14:11:18 | disruptek | wtf |
14:11:48 | disruptek | !last disruptek |
14:11:49 | disbot | disruptek spoke in 12#nim 35 seconds ago |
14:12:15 | * | NimBot joined #nim |
14:12:17 | disruptek | !last nimbot |
14:12:17 | disbot | NimBot spoke in 12#nim 3 hours ago |
14:12:29 | disruptek | !last Elegant beef |
14:12:30 | disbot | Elegant Beef spoke in 12#nim 6 hours ago |
14:12:40 | PMunch | Hmm, does Nim have some similar convention to how Ruby uses ! for procedures that mutate their input? |
14:13:04 | * | dddddd joined #nim |
14:13:04 | disruptek | not afaik. |
14:13:24 | disruptek | i guess i will debug this in the morning stream. |
14:15:34 | disruptek | it's not identifying existing users correctly, which is bizarre. |
14:16:42 | Araq | PMunch, don't return a value and assume people read the docs |
14:17:40 | disruptek | i'm an idiot. |
14:19:05 | * | couven92 quit (Read error: Connection reset by peer) |
14:19:30 | * | couven92 joined #nim |
14:20:12 | PMunch | Araq, yeah I wanted to have two versions of a proc, one that returned a new version, and one that modified in place |
14:20:30 | PMunch | Which in ruby would typically be named "replace" and "replace!" |
14:20:36 | Araq | only provide the inplace version and use 'dup' |
14:21:09 | PMunch | Dup? |
14:21:15 | Araq | new in 1.2 |
14:21:43 | PMunch | Ah.. |
14:24:03 | * | couven92 quit (Read error: Connection reset by peer) |
14:24:22 | disruptek | !last nimbot |
14:24:22 | disbot | NimBot joined 12mail.nim-lang.org 12 minutes ago |
14:24:26 | * | couven92 joined #nim |
14:24:30 | disruptek | !last pmunch |
14:24:31 | disbot | PMunch spoke in 12vpn.dualog.com 11 minutes ago |
14:24:41 | disruptek | lol |
14:24:55 | PMunch | Haha, wrong field? |
14:25:30 | disruptek | parser snafu. |
14:25:45 | disruptek | gah, such a simple feature. so buggy. |
14:25:48 | disruptek | !last pmunch |
14:25:49 | disbot | PMunch spoke in 12#nim 13 minutes ago |
14:25:53 | disruptek | !last nimbot |
14:25:54 | disbot | NimBot joined 12#nim 13 minutes ago |
14:26:23 | disruptek | !last s4mu3lbk |
14:26:24 | disbot | s4mu3lbk quit 7102 minutes ago and last spoke 7 hours ago |
14:27:15 | disruptek | i only write this shit late at night, so it's pretty terrible. |
14:28:03 | PMunch | Haha, an entire project written while half asleep. Don't see how that could ever go wrong :P |
14:28:34 | disruptek | oh the bot is a mess. but i realized before i implemented this feature that i could use it to demonstrate generics. |
14:28:55 | disruptek | so i wrote it just like radio and i will refactor them on-stream to explain how that works. |
14:29:23 | disruptek | radio == tune |
14:29:35 | PMunch | Aah, I see |
14:30:14 | disruptek | ~news is the #nim-news channel has a Nim news feed of updates to pull requests, issues, and packages. |
14:30:14 | disbot | news: 11the #nim-news channel has a Nim news feed of updates to pull requests, issues, and packages. |
14:30:26 | * | marmotini_ quit (Remote host closed the connection) |
14:30:59 | * | marmotini_ joined #nim |
14:34:01 | PMunch | Araq, is there a dup alternative in 1.0? |
14:34:09 | PMunch | deepCopy? |
14:35:14 | * | marmotini_ quit (Ping timeout: 240 seconds) |
14:39:05 | PMunch | Ah, for me copyNimTree does the trick |
14:42:39 | Araq | join #nim-news |
14:43:47 | Araq | PMunch, I'll probably write an compat nimble package so that you can use 'dup' with 1.0 |
14:47:07 | Mister_Magister | !eval import parseutils; parseInt("123") |
14:47:09 | NimBot | Compile failed: /usercode/in.nim(1, 28) Error: type mismatch: got <string> |
14:47:24 | Araq | import strutils instead |
14:47:38 | Mister_Magister | !eval import strutils; parseInt("123") |
14:47:41 | NimBot | Compile failed: /usercode/in.nim(1, 26) Error: expression 'parseInt("123")' is of type 'int' and has to be discarded |
14:47:45 | Araq | jeezzz, how hard is to follow tutorials or browse our docs |
14:47:52 | Mister_Magister | Araq: i was! |
14:47:57 | Mister_Magister | https://nim-lang.org/docs/parseutils.html#parseInt%2Cstring%2Cint%2Cint |
14:48:45 | Mister_Magister | !eval import strutils; discard replace("123,123", ",", "").parseInt() |
14:48:49 | NimBot | <no output> |
14:48:54 | Mister_Magister | hmpf |
14:48:56 | Araq | the examples all call this proc with more than one argument |
14:49:03 | Mister_Magister | why is it not working :C |
14:49:52 | Araq | !eval import strutils; echo replace("123,123", ",", "").parseInt() |
14:49:57 | NimBot | 123123 |
14:50:24 | Mister_Magister | no that's not what i mean |
14:51:39 | Mister_Magister | !eval import strutils; discard replace("121,738", ",", "").parseInt() |
14:51:42 | NimBot | <no output> |
14:51:45 | Mister_Magister | ugh |
14:52:17 | Mister_Magister | https://paste.opensuse.org/c4c3aa41 it just won't work :C |
14:53:31 | Mister_Magister | !eval import strutils; discard replace(" 121,738 ", ",", "").parseInt() |
14:53:35 | NimBot | /usercode/in.nim(1) in↵/playground/nim/lib/pure/strutils.nim(1100) parseInt↵Error: unhandled exception: invalid integer: 121738 [ValueError] |
14:53:41 | Mister_Magister | ah yes .strip |
14:53:58 | Araq | use strscans instead |
14:54:13 | alexande192 | hm strange |
14:54:21 | alexande192 | do you try to parse? |
14:54:36 | alexande192 | Araq, good work on `panics` |
14:54:37 | Mister_Magister | Araq: what do you mean? |
14:55:01 | alexande192 | why not a user defined set of panics though: i think there such an idea: dont remember by whom(disruptek?) |
14:55:52 | Araq | implementation complexity |
14:56:23 | Araq | I thought about exposing sysFatal as system.panic and then you can handle these via "recover" but it doesn't really solve the problem |
14:56:54 | Araq | as in the "recover" you want to use a "raise" and so the backend must assume that every bug can be caught |
14:57:22 | Araq | the only benfit that we have 'try except' vs 'recover' in the language |
14:57:55 | Araq | but we can already filter inside 'except' so it's pure sophistry in my book |
14:58:15 | disruptek | agreed. |
14:58:45 | disruptek | what about simpifying the implementation thusly: |
14:59:05 | disruptek | one can add a define to cause the named exception to abort. |
15:00:54 | Araq | we used to have a "raise hook" for that |
15:03:44 | * | marmotini_ joined #nim |
15:04:24 | Araq | but nobody ever used it and it introduces composition problems |
15:04:54 | Araq | say you say "die on ValueError" and then you use a library that uses strutils.`%` and catches the ValueError... |
15:06:22 | disruptek | i consider that a feature. |
15:06:32 | disruptek | isn't that the exact semantic that we want? |
15:06:56 | Araq | in no version of Nim is a ValueError a "Defect" |
15:07:15 | disruptek | then don't "die on ValueError", silly. |
15:07:36 | Araq | so it's not the semantic that I want. I only care about Overflows and out-of-memory really |
15:08:05 | Araq | as they are prevalent |
15:08:07 | disruptek | then you define what those are and then allow the hook only on that class of exception. |
15:08:21 | Araq | we already have an outOfMemHook |
15:08:55 | Araq | but again, inside this hook you might want to raise an exception. |
15:09:05 | disruptek | okay, so you want to tell status to pound sand. |
15:10:21 | Araq | --panics:on is a good compromise for me |
15:10:32 | Araq | I'll see what the others have to say |
15:10:37 | * | nsf joined #nim |
15:11:01 | disruptek | !rfc panic |
15:11:02 | disbot | https://github.com/nim-lang/RFCs/issues/180 -- 3Introduce safety modes |
15:11:23 | disruptek | ahh |
15:13:08 | Araq | what we should probably do though is to make 'except:' mean 'except (not Defect)' |
15:13:21 | Araq | and if you want to catch defects you shall write 'except Defect' |
15:13:59 | * | drewr quit (Ping timeout: 260 seconds) |
15:14:32 | Araq | and we can produce a warning for 'except Defect' in combination with --panics:on |
15:14:52 | Araq | as it's meaningless |
15:15:01 | disruptek | a warning sounds right. |
15:15:26 | disruptek | is there a scenario where code won't compile with panics:on? |
15:17:14 | * | hax-scramper quit (Ping timeout: 240 seconds) |
15:17:31 | Araq | no. |
15:17:44 | * | hax-scramper joined #nim |
15:18:03 | disruptek | cool. |
15:18:49 | disruptek | does the exception hierarchy change? |
15:19:35 | Araq | no. |
15:19:46 | * | PMunch quit (Quit: Leaving) |
15:20:14 | disruptek | isn't it broken? |
15:20:26 | Araq | I'll add a warning though for Foo* = object of Exception |
15:21:05 | disruptek | i guess that works. |
15:22:00 | disruptek | so `except Exception` magically crashes on Defects. |
15:22:05 | disruptek | with panics. |
15:22:20 | Araq | yup |
15:22:52 | disruptek | sounds great to me. |
15:25:20 | Araq | I still wonder if panic/recover APIs are not slightly better because more explicit |
15:25:31 | Araq | but then they wouldn't fix empty 'except' clauses |
15:25:51 | disruptek | the problem is that different users want different semantics for the same code. |
15:26:04 | Araq | if I do use 'raise' inside 'recover' then I need to be able to use 'except' |
15:26:08 | disruptek | that's why i suggested the compiler opts. |
15:26:58 | Araq | I still want .quirky as a pragma though |
15:27:14 | disruptek | then someone can just put themselves in a state where they are recovering to have open exception access. |
15:27:47 | * | marmotini_ quit (Remote host closed the connection) |
15:28:02 | * | marmotini_ joined #nim |
15:28:11 | * | drewr joined #nim |
15:30:34 | okcc | if i want to select x11 events, what type should i use in newSelector[T], any help? thks |
15:31:04 | okcc | i have a x11 display file descriptor which is cint |
15:31:37 | * | sacredfrog joined #nim |
15:32:24 | okcc | all in one, i just want this c code (https://stackoverflow.com/questions/8592292/how-to-quit-the-blocking-of-xlibs-xnextevent) achieve in Nim |
15:33:39 | shashlick | i use matterbridge for my bridging - what's needed? |
15:33:40 | disruptek | the type you use is that of your monitor. |
15:34:05 | disruptek | it's the payload that you pass around. |
15:34:07 | okcc | now i can only get empty seq from select() https://nim-lang.org/docs/selectors.html#select%2CSelector%5BT%5D%2Cint |
15:34:37 | * | jholland__ joined #nim |
15:35:01 | disruptek | there's an example in golden. |
15:35:20 | disruptek | !repo golden |
15:35:21 | disbot | https://github.com/disruptek/golden -- 9golden: 11a benchmark for compile-time and/or runtime Nim 🏆 15 16⭐ 0🍴 |
15:35:28 | disruptek | see the src/golden/invoke.nim |
15:36:12 | FromDiscord | <mratsim> btw you should probably add your inputs here @disruptek: https://github.com/nim-lang/Nim/pull/13617 |
15:36:15 | disbot | ➥ new std/timers module for high performance / low overhead timers and benchmarking (formerly system/timers include) ; snippet at 12https://play.nim-lang.org/#ix=2dY3 |
15:37:01 | disruptek | i don't know anything about benchmarking. |
15:37:40 | FromDiscord | <mratsim> yeah just like Araq doesn't know anything about compiler or GC 😉 |
15:38:10 | disruptek | seriously, golden is crude as fuck. |
15:38:48 | disruptek | it just happens that a lot of people want to do async process i/o in the stdlib and that's the definitive example afaik. |
15:39:22 | okcc | thanks, disruptek, i'm checking it out |
15:39:29 | disruptek | i really want to finish it, though. |
15:41:07 | Araq | when the optimizer has to assume every proc can fail at least we can use the mechanism to handle OOM without further overheads |
15:41:42 | disruptek | okcc: you can ignore the benchmarking crap, but obviously you can't really ignore the selectors stuff. also note that there's a fd leak in the signalling. iirc two workarounds are documented in the code (toggled with a define). |
15:42:21 | disruptek | but i don't think you have to worry about that with x11 fd. |
15:43:13 | alexande192 | mratsim :) |
15:43:31 | alexande192 | whats happening with your compiler |
15:43:40 | alexande192 | i want to start working on one of my ideas eventually |
15:45:31 | disruptek | great; that's coincidentally when mratsim's compiler will be ready. |
15:46:06 | Araq | or mine... :P |
15:46:41 | * | nsf quit (Quit: WeeChat 2.7) |
15:47:06 | alexande192 | disruptek :)) |
15:49:21 | FromDiscord | <mratsim> my compiler has been delayed by cryptography and fighting the absolutely horrible GCC codegen for bigints |
15:50:29 | FromDiscord | <mratsim> I think I can have a nice elliptic curve crypto lib in Nim in about 3 months, and there is big desire for such. |
15:51:49 | FromDiscord | <mratsim> when I say big desire, people are working full-time on template metaprogramming/generics in Go (LOL): https://github.com/ConsenSys/goff/blob/master/cmd/internal/template/element/mul.go |
15:52:30 | FromDiscord | <Recruit_main70007> just use Nim lmao |
15:55:21 | FromDiscord | <mratsim> I'm using Nim, but somehow, the go compiler is better than GCC for big integer implementation |
15:55:31 | Yardanico | I wonder why people use AGPL https://github.com/Ethosa/yukiko https://github.com/Ethosa/shizuka :( |
15:55:49 | Yardanico | AGPL basically makes it impossible to use these libs in the projects which are not open-source (even if they're web apps) |
15:57:44 | FromDiscord | <Varriount> AGPL is good for actual pieces of software. Not so much for libraries |
15:58:00 | Yardanico | that's my point as well |
15:58:48 | FromDiscord | <mratsim> define "actual" 😛 |
15:59:19 | lqdev[m] | @mratsim programs |
15:59:45 | FromDiscord | <mratsim> all my programs are libraries |
16:00:42 | lqdev[m] | apps |
16:00:47 | lqdev[m] | I meant |
16:01:09 | Yardanico | well I don't really see why would anyone use AGPL for libs unless they're an open-source libre fanatic |
16:01:32 | Yardanico | it's stricter than GPL |
16:04:49 | disruptek | i was attracted to it. |
16:04:49 | lqdev[m] | I can't even think of using the regular GPL for libraries |
16:06:31 | * | sz0 quit (Quit: Connection closed for inactivity) |
16:06:33 | alexande192 | well it makes sense if you really want to .. not let it be used for commercial purpose |
16:06:53 | Yardanico | well I talked with Ethosa and told why AGPL is not that good for oss libs :P |
16:07:53 | alexande192 | otherwise i usually use MIT i think, but i can imagine gpl-like stuff being useful |
16:24:02 | FromDiscord | <mratsim> GPL makes sense if you want to monetize but still be open-source |
16:24:29 | FromDiscord | <mratsim> even for libraries, it takes time to maintain good libraries |
16:24:39 | FromDiscord | <mratsim> (thinking of FFMPEG for example) |
16:26:08 | disruptek | ~stream |
16:26:09 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
16:31:55 | Araq | ok, new overflow handling is almost done |
16:36:09 | FromDiscord | <mratsim> do you use __builtin_add_overflow and __builtin_sadd_overflow? |
16:36:54 | FromDiscord | <mratsim> or rather __builtin_add_overflow_p / __builtin_sub_overflow_p / __builtin_mul_overflow_p |
16:36:58 | FromDiscord | <mratsim> https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html |
16:37:52 | Araq | yup |
16:38:18 | Araq | but I don't use inline asm anymore, too much trouble |
16:38:34 | Araq | VCC doesn't really support it and the others have builtins I can use |
16:39:08 | FromDiscord | <Kiloneie> I've seen a good example on using a procedure while having imported 2 modules that both contain that procedure, does anyone have a link or something, i need a good example, i am trying to show this naming conflict and how to fix it, but what i've done the compiler fixes it by itself... |
16:39:21 | Yardanico | modulename.procname() |
16:39:41 | Yardanico | if you import module a and module b which both have the same proc "c" with same arguments, you can call it like a.c() or b.c() |
16:41:01 | * | solitudesf joined #nim |
16:41:31 | FromDiscord | <Kiloneie> i know that, but i am trying to recreate an error while having both imported |
16:41:48 | Yardanico | if you want to recreate an error, you need to have two procs with the same name AND arguments |
16:42:00 | Yardanico | from two modules |
16:47:14 | FromDiscord | <Kiloneie> Is there any example of when having multiple modules imported, it will simply crash trying to use a same named procedure ? Otherwise i have to explain this by forcing a crash like you said. |
16:47:37 | disruptek | do so. |
16:48:14 | Yardanico | @Kiloneie if you mean stdlib - these conflicts are pretty rare, even strutils/unicode was fixed (by adding Ascii to strutils variants) |
16:48:27 | Yardanico | ah actually |
16:48:33 | Yardanico | split from strutils/unicode |
16:48:46 | FromDiscord | <Kiloneie> i tried strutils and seutils and compiler does the work |
16:49:21 | Yardanico | I mean this https://play.nim-lang.org/#ix=2dYo |
16:49:37 | Yardanico | split with no arguments |
16:49:43 | * | okcc quit (Ping timeout: 265 seconds) |
16:50:15 | FromGitter | <Varriount> Araq: I like the new defects feature |
16:50:17 | FromDiscord | <Kiloneie> Perfect thanks. I assume this will be fixed in the future right ? |
16:50:20 | Yardanico | no, why? |
16:50:38 | Yardanico | you just have to specify either or exlude split from one of the modules when importing |
16:51:10 | FromDiscord | <Kiloneie> i know, i am just asking so i explain this right, so the video holds up. |
16:51:28 | Yardanico | well I think this is correct behaviour |
16:51:34 | FromGitter | <Varriount> Araq: panics:on still works with range checks, right? |
16:51:52 | Araq | range checks are turned into panics then |
16:52:46 | FromDiscord | <Kiloneie> Say the ones that have been fixed, wouldn't be fixed when my video aired, and then they would be, which would nullify the explanation if i didn't mention that it could be fixed in the future. |
16:53:14 | Yardanico | well you're creating videos for nim 1.x right? |
16:53:26 | Yardanico | even if the proc names will change these version will still be kept in 1.x for backwards compat |
16:53:28 | Yardanico | so don't worry |
16:53:30 | FromGitter | <Varriount> Araq: But the panic will always occur? There won't be the chance to read garbage data? |
16:53:34 | FromDiscord | <Kiloneie> right now i am still on 1.0.0 |
16:53:39 | * | okcc joined #nim |
16:53:49 | Araq | Varriount: that depends on --rangeChecks:on/off |
16:53:56 | Yardanico | code you write for nim 1.0.0 is supposed to work on any future nim 1.x release |
16:54:30 | FromGitter | <Varriount> Araq: Assuming range checks are on |
16:54:36 | FromDiscord | <Kiloneie> Okay good,(i did read some of the debate that came after 1.0, so i wasn't sure) |
16:54:55 | Yardanico | well I'm not sure i'm 100% correct but I think it works like that :P |
16:56:42 | FromDiscord | <Kiloneie> Yeah well it should hold up for a while, and if some X day someone tells me on a video that it's not working, then i will just do a quick edit on that video, or MAYBE even redo it. I have planned redos of several videos anyways once i do get some money to buy better audio gear. #1 will get a big redo, and 2-6 need font changes, which requires a whole redo. |
16:57:58 | * | okcc quit (Remote host closed the connection) |
16:58:19 | * | okcc joined #nim |
16:59:08 | Araq | Varriount: well then the panic will occur, yes |
16:59:36 | Araq | Kiloneie: mention that Nim version X can emulate version 1.0 via --useVersion:1.0 |
17:00:15 | FromDiscord | <Kiloneie> Hmm okay, will do. |
17:01:20 | FromDiscord | <Kiloneie> Btw looking at the unicode module, are runes special characters of different languages ? |
17:01:29 | Yardanico | they're unicode characters |
17:01:30 | FromDiscord | <Rika> just a unicode character |
17:01:33 | FromDiscord | <Rika> any character |
17:01:42 | Yardanico | nim strings are bytes, if you do stringvar[0] you get first byte in the string |
17:01:47 | FromDiscord | <Rika> be it another language character or ascii |
17:01:50 | Yardanico | if you want to operate on unicode characters (runes) you need unicode module |
17:02:30 | FromDiscord | <Kiloneie> Huh okay, not norse mythology then xD... |
17:02:38 | Yardanico | lol |
17:02:56 | FromDiscord | <Rika> lol |
17:03:46 | * | Trustable joined #nim |
17:12:13 | federico3 | Yardanico: a lot of components around the activitypub are under AGPL |
17:13:42 | FromDiscord | <treeform> Does any one know why --d:release in nim.cfg seems to have no effect? |
17:13:51 | Yardanico | what effect? |
17:14:00 | Yardanico | when compiling it should say "release build" in the end |
17:14:03 | FromDiscord | <treeform> same as it does on the command line |
17:14:05 | Yardanico | if it's applied |
17:14:22 | leorize | it depends on where you put it |
17:14:42 | leorize | the code that handle -d:release is in the global system config |
17:15:03 | leorize | user configs are read later in the process |
17:15:27 | leorize | so by the time it reads user configs, whatever -d:release resolves to have already been decided |
17:15:28 | FromDiscord | <treeform> leorize, oh that explain it. Do you know how I make it do what I want? |
17:16:46 | Araq | inline what the default nim.cfg does for -d:release |
17:19:07 | FromDiscord | <treeform> So my issue, I am making a game, but it runs to slow without -d:release, I don't think it's nim's stuff thats making it slow. Maybe all I need to do os make the C compiler optimize more. |
17:19:35 | Yardanico | well you just put -d:release in your project's nim.cfg |
17:19:36 | lqdev[m] | @treeform --opt:speed? |
17:19:52 | leorize | Yardanico: that won't work |
17:19:52 | Yardanico | it should work the same as -d:release in cmdline if you're compiling the same file and that nim.cfg is in the same folder with the code file |
17:20:06 | Yardanico | leorize: why? |
17:20:21 | lqdev[m] | because the nim.cfg in the distribution is processed first |
17:20:25 | lqdev[m] | then the project's nim.cfg |
17:20:30 | lqdev[m] | so it won't have any effect |
17:20:44 | lqdev[m] | because -d:release is a thing from the distribution's nim.cfg |
17:21:06 | Yardanico | ah right I remember it now |
17:21:14 | Yardanico | sorry |
17:21:29 | lqdev[m] | @treeform I found that --opt:speed increases speed dramatically, --stacktrace:off even further, but you probably want stacktraces on during development |
17:21:55 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L72 for -d:release |
17:23:31 | FromDiscord | <treeform> Thank you Yardanico, leorize, lqdev[m], Araq for helping me with this. I'll try out --opt:speed, I actually do want the nim's development features. I now understand how the config works. |
17:36:25 | * | solitudesf quit (Remote host closed the connection) |
18:00:57 | * | okcc quit (Ping timeout: 258 seconds) |
18:04:38 | * | okcy quit (Ping timeout: 265 seconds) |
18:06:56 | * | okcy joined #nim |
18:08:13 | * | rmt joined #nim |
18:24:17 | alexande192 | guys |
18:24:35 | alexande192 | ops* sorry wrong room |
18:24:56 | * | alexande192 is now known as alexander92 |
18:39:06 | * | leorize quit (Quit: WeeChat 2.7.1) |
18:41:49 | * | nsf joined #nim |
18:43:42 | * | Trustable quit (Remote host closed the connection) |
18:47:34 | * | hoijui joined #nim |
18:48:11 | * | dddddd quit (Ping timeout: 260 seconds) |
18:48:35 | * | dddddd joined #nim |
18:53:32 | * | floppydh quit (Quit: WeeChat 2.7.1) |
18:55:58 | FromDiscord | <Kiloneie> Why can't i do the commented out part https://play.nim-lang.org/#ix=2dZ4 , do you need to have the imported module when using the except keyword on it's own line ? |
18:56:35 | Araq | because except takes a comma separated list of identifiers for itself |
18:56:52 | Araq | import strutils except split, toLowerAscii # see? |
18:57:19 | FromDiscord | <Kiloneie> ah okay |
19:01:15 | * | hoijui quit (Ping timeout: 272 seconds) |
19:08:02 | * | rockcavera quit (Remote host closed the connection) |
19:12:31 | * | clyybber joined #nim |
19:14:27 | * | rockcavera joined #nim |
19:21:04 | clyybber | Araq: Was there a time where nim had no echo? |
19:21:25 | clyybber | Because I'm seeing `when declared(echo):` in extccomp.nim |
19:22:12 | Araq | it's a workaround for a NimScript config bug |
19:22:23 | Araq | where it ended up not having echo, or something. |
19:22:52 | clyybber | does that bug still exist? |
19:25:15 | * | Jesin quit (Quit: Leaving) |
19:26:46 | * | thomasross joined #nim |
19:26:48 | * | rmt quit (Ping timeout: 265 seconds) |
19:27:05 | * | Jesin joined #nim |
19:30:09 | Araq | I doubt it |
19:30:19 | Araq | if it does, the CI will notice |
19:31:16 | clyybber | Ok |
19:31:46 | clyybber | Araq: Another thing, should an explicit --hint:CC:on for example override --verbosity:0 ? |
19:33:54 | Araq | oh who cares |
19:34:48 | clyybber | I dunno, I just wonder what is intended |
19:34:55 | clyybber | so I can write the code accordingly :p |
19:35:20 | * | silvernode joined #nim |
19:35:46 | * | alexander92 quit (Ping timeout: 256 seconds) |
19:37:35 | shashlick | Yay nimterop newalgo is now in head so I can develop in parallel! |
19:37:40 | shashlick | Feature flags ftw |
19:38:24 | silvernode | just added a bunch of prototype code to space nim, those of you who are part of the project, I will be online around 0600 UTC for around an hour to work on it some more if anyone will be awake then. |
19:38:33 | silvernode | Until then goodnight |
19:38:38 | * | silvernode quit (Client Quit) |
19:42:58 | * | Vladar quit (Quit: Leaving) |
19:47:55 | * | alexander92 joined #nim |
19:50:19 | * | Jesin quit (Quit: Leaving) |
19:52:14 | FromDiscord | <Kiloneie> I can't figure this out: https://play.nim-lang.org/#ix=2dZJ |
19:53:01 | FromGitter | <kaushalmodi> Kiloneie: A char is only 8 bits |
19:53:17 | FromGitter | <kaushalmodi> so ž probably fit in a char. It probably needs to be a string |
19:53:34 | Yardanico | @Kiloneie as kaushalmodi said, nim "char" type is only for ASCII characters (because one ascii character = 1 byte) |
19:53:44 | FromDiscord | <Kiloneie> i commented out the string version though... |
19:53:47 | FromDiscord | <Kiloneie> also errors.. |
19:55:11 | * | Jesin joined #nim |
19:55:20 | Yardanico | @Kiloneie the one with echo is erroring because unicode split accepts a Rune or sequence of runes, not a string |
19:56:28 | FromGitter | <kaushalmodi> Kiloneie: https://play.nim-lang.org/#ix=2dZN |
19:57:38 | FromGitter | <timotheecour> @Clyybber are you here? just PM’d you |
19:58:00 | FromDiscord | <Kiloneie> huh, thanks, i didn't know how to make a rune, didn't think there was a proc for that |
19:58:16 | FromDiscord | <Kiloneie> should of looked better D: |
19:58:45 | * | enthus1ast quit (Ping timeout: 240 seconds) |
19:58:47 | FromDiscord | <Kiloneie> this video is getting split into 2 parts... i didn't expect this much complexity |
20:01:34 | FromGitter | <kaushalmodi> now what's confusing me is that `echo "Hello Worldž!".split("ž".toRunes)` works.. but |
20:01:50 | FromGitter | <kaushalmodi> this doesn't: `echo "Hello Worldž!".split("ž".runeAt(0))` |
20:02:27 | FromGitter | <kaushalmodi> ^^ see https://play.nim-lang.org/#ix=2dZP |
20:04:21 | FromDiscord | <Kiloneie> yeah... no idea either, it works and then it doesn't |
20:05:15 | FromGitter | <kaushalmodi> use Rune splitter doesn't work.. but using seq[Rune] splitter works |
20:06:21 | dwdv | Curious about another niche feature: do we have something similar to dlang's opDispatch which get's called with the function name as a template string when it can't find any valid dispatch? This allows glsl-like swizzling for example: https://github.com/d-gamedev-team/gfm/blob/master/math/gfm/math/vector.d#L240 |
20:06:32 | dwdv | gets* |
20:06:53 | Yardanico | there's `.` operator which is a bit similar |
20:07:08 | Yardanico | https://nim-lang.org/docs/manual_experimental.html#special-operators-dot-operators |
20:07:15 | FromDiscord | <Kiloneie> no it works |
20:07:17 | Araq | yeah, but don't use it, it's bad. so is opDispatch btw |
20:07:42 | dwdv | Fite me on opDispatch! |
20:07:52 | FromDiscord | <Kiloneie> @kaushalmodi echo "Hello Worldž!".split("ž".runeAt(0)) works, try to comment it out |
20:08:14 | FromGitter | <Clyybber> @timotheecour answered |
20:08:25 | dwdv | Thanks for the link, Yardanico! |
20:12:13 | * | arecaceae quit (Remote host closed the connection) |
20:12:37 | * | arecaceae joined #nim |
20:12:37 | * | ptdel joined #nim |
20:13:38 | FromGitter | <kaushalmodi> Kiloneie: This fails for me, on devel too: https://play.nim-lang.org/#ix=2dZT |
20:16:25 | FromGitter | <kaushalmodi> Kiloneie: https://github.com/nim-lang/Nim/issues/13628 |
20:16:27 | disbot | ➥ unicode.split does not work when using a Rune separator ; snippet at 12https://play.nim-lang.org/#ix=2dZU |
20:16:40 | FromDiscord | <Kiloneie> yeah it fails |
20:17:36 | FromDiscord | <Kiloneie> if you use runeAt(1) is weird |
20:17:48 | FromDiscord | <Kiloneie> both ž and ! is gone |
20:18:21 | * | hoijui joined #nim |
20:32:18 | disruptek | Araq: aws api signing broken again on devel. |
20:32:38 | Araq | with ARC? |
20:32:52 | * | nsf quit (Quit: WeeChat 2.7) |
20:33:30 | disruptek | yeah. |
20:34:59 | * | hoijui quit (Ping timeout: 272 seconds) |
20:40:06 | disruptek | ~stream |
20:40:07 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
20:42:48 | disruptek | https://travis-ci.org/github/disruptek/sigv4/jobs/661254990 |
20:42:53 | disruptek | aws signing ^ |
20:45:28 | FromDiscord | <Varriount> Has anyone implemented this: https://github.com/lemire/fast_double_parser |
20:45:31 | FromDiscord | <Varriount> ? |
20:47:41 | * | tdc joined #nim |
21:02:19 | * | solitudesf joined #nim |
21:07:18 | * | solitudesf quit (Read error: Connection reset by peer) |
21:07:26 | * | filcuc joined #nim |
21:07:46 | * | solitudesf joined #nim |
21:16:31 | * | narimiran quit (Ping timeout: 265 seconds) |
21:28:23 | clyybber | Araq: I rebased https://github.com/nim-lang/Nim/pull/13606, it should be ready to merge once its green |
21:28:24 | disbot | ➥ Make listCmd honor hint:cc:off |
21:34:33 | * | Araq sighs |
21:34:51 | Araq | so C++ decided to tell my 255 cannot fit into a 'char' |
21:35:14 | * | tdc quit (Ping timeout: 240 seconds) |
21:35:36 | Araq | how many centuries do we have to wait for C to understand what a byte is? and how on earth is this a "portable assembler". |
21:35:58 | Araq | every assembler I ever used understands what a byte is |
21:36:17 | * | letto quit (Ping timeout: 268 seconds) |
21:36:44 | Araq | and before you say "yeah well use 'unsigned char' " |
21:37:36 | Araq | how do I create string literals of unsigned chars conveniently? is (unsigned char*)"hello\0" guaranteed to compile? |
21:40:21 | * | filcuc quit (Quit: Konversation terminated!) |
21:40:39 | * | filcuc joined #nim |
21:41:11 | FromDiscord | <exelotl> is there a way to do superscript/subscript in restructuredtext? |
21:41:50 | Araq | yes, `text`:sup: iirc |
21:51:31 | * | letto joined #nim |
21:52:02 | * | tiorock joined #nim |
21:52:02 | * | tiorock quit (Changing host) |
21:52:02 | * | tiorock joined #nim |
21:52:02 | * | rockcavera is now known as Guest42096 |
21:52:02 | * | Guest42096 quit (Killed (weber.freenode.net (Nickname regained by services))) |
21:52:02 | * | tiorock is now known as rockcavera |
22:01:33 | FromDiscord | <exelotl> oh cool that works, thanks |
22:02:27 | * | alexander92 quit (Ping timeout: 258 seconds) |
22:08:26 | * | krux02 joined #nim |
22:08:27 | * | watzon quit (Quit: The Lounge - https://thelounge.chat) |
22:08:39 | * | watzon joined #nim |
22:12:13 | * | watzon quit (Client Quit) |
22:12:25 | * | watzon joined #nim |
22:14:04 | * | watzon quit (Client Quit) |
22:15:33 | * | letto quit (Read error: Connection reset by peer) |
22:15:59 | * | rockcavera quit (Remote host closed the connection) |
22:16:15 | * | watzon joined #nim |
22:16:32 | FromGitter | <timotheecour> @araq is there anything else blocking https://github.com/nim-lang/Nim/pull/13351 ? |
22:16:35 | disbot | ➥ stacktraces can now show custom runtime msgs per frame ; snippet at 12https://play.nim-lang.org/#ix=2e0u |
22:17:43 | Araq | I don't know but I also don't like the feature |
22:17:50 | * | solitudesf quit (Ping timeout: 256 seconds) |
22:17:55 | FromGitter | <timotheecour> Why ? |
22:17:57 | * | letto joined #nim |
22:18:16 | * | alexander92 joined #nim |
22:21:39 | Araq | more code we have to maintain, yet another feature, unclear how it can work for an LLVM backend |
22:29:14 | FromGitter | <timotheecour> 1) it’s super useful for debugging a program, making stacktraces a whole lot more useful and user-customizable (without compiler/stdlib support needed once this PR is merged); whether debugging compiler or debugging a user program; ⏎ 2) it’s in particular incredibly useful when your program parses another source (eg for parsers, compilers, etc) as it shows where you are both in parser as well as what’s |
22:29:14 | FromGitter | ... being parsed ⏎ 3) other use cases are showing more user-customizable context when an exception is thrown ⏎ 4) llvm backend: not sure why this would introduce any complication, i’m not relying on OS-specific stacktrace mechanisms here; in any case, the feature is entirely opt-in [https://gitter.im/nim-lang/Nim?at=5e69663a47b42479253f82f5] |
22:31:28 | Araq | how is 'var frameMsgBuf* {.threadvar.}: string' entirely opt-in? |
22:31:48 | * | matlock quit (Remote host closed the connection) |
22:31:48 | * | euantor quit (Remote host closed the connection) |
22:31:48 | * | Hotbees quit (Remote host closed the connection) |
22:31:48 | * | jholland__ quit (Remote host closed the connection) |
22:32:53 | Araq | instead why not set the existing 'procname' to something else |
22:33:02 | Araq | extra points if it can stay a 'cstring' |
22:33:40 | * | euantor joined #nim |
22:34:17 | FromGitter | <timotheecour> I can add a `—stacktracemsgs:on/off` |
22:34:33 | * | Hotbees joined #nim |
22:36:17 | FromGitter | <timotheecour> > instead why not set the existing 'procname' to something else ⏎ ⏎ I have follow up work after this PR that makes `—stacktrace:on` faster for everyone and removes all these; it works; I can show the WIP if needed. |
22:36:57 | Araq | how does it work? |
22:36:58 | * | matlock joined #nim |
22:36:58 | * | hsh quit (Read error: Connection reset by peer) |
22:36:58 | * | npgm quit (Read error: Connection reset by peer) |
22:36:58 | * | noonien quit (Write error: Connection reset by peer) |
22:36:58 | * | LyndsySimon quit (Remote host closed the connection) |
22:36:58 | * | d10n-work quit (Remote host closed the connection) |
22:36:58 | * | ng0 quit (Remote host closed the connection) |
22:37:13 | Araq | (and now don't say "it works well" :P ) |
22:37:51 | * | jholland__ joined #nim |
22:38:08 | FromGitter | <timotheecour> let me open that WIP PR (it’s entirely compatible with nim-lang/Nim#13351 ) |
22:38:59 | * | LyndsySimon joined #nim |
22:39:19 | * | npgm joined #nim |
22:39:29 | * | d10n-work joined #nim |
22:40:40 | * | NimBot joined #nim |
22:41:05 | * | hsh joined #nim |
22:43:20 | * | noonien joined #nim |
22:45:43 | * | ng0 joined #nim |
22:46:18 | * | matti quit (Read error: Connection reset by peer) |
22:46:41 | FromGitter | <timotheecour> I’ve opened the WIP here https://github.com/nim-lang/Nim/pull/13630 but *I recommend only looking at it if you’re curious how it works, it’s not cleaned up*; and yes it does work (at least at some intermediate commits); there are 2 parts (that could be split in 2 PRS): ⏎ ⏎ 1) 1st speedup: get rid of `TFrame` stack allocated data at beginning of each function, and get rid of linked list of PFrames; |
22:46:41 | FromGitter | ... instead I simply use a single threadvar “index” into a UncheckedArray of TFrame that’s re-alloc’d as needed; it gives a nice 2X speedup in many cases ⏎ 2) 2nd speedup on top of it (still WIP but works): replace file/line/col/procname by a single index; this has implications for other uses cases (eg nimprof) making exception handl ... [https://gitter.im/nim-lang/Nim?at=5e696a5195b8ff0bbfad1c84] |
22:46:42 | disbot | ➥ Faster --stacktrace:on |
22:47:00 | * | jjido joined #nim |
22:48:50 | FromGitter | <timotheecour> > anyhow, can you make it a 'cstring'? constants are fine and with a little care you can ensure the string is from a buffer that is not freed to early ⏎ ⏎ let me try and get back to you; r u ok if i use `c_realloc`? |
22:50:02 | * | hax-scramper quit (Ping timeout: 240 seconds) |
22:50:18 | * | r4vi quit (Remote host closed the connection) |
22:50:22 | * | surma quit (Remote host closed the connection) |
22:51:02 | * | surma joined #nim |
22:51:23 | Araq | depends, the memory management shouldn't be done in system.nim |
22:51:32 | Araq | but instead the user of the API should do it |
22:51:52 | Araq | I think it's an acceptable tradeoff, special apis need special care |
22:52:23 | * | matti joined #nim |
22:52:38 | FromGitter | <Clyybber> @timotheecour How does replacing file/line/col/procname by a single index? |
22:52:52 | FromGitter | <Clyybber> Do you mean to store file/line/col/procname in an array? |
22:53:56 | * | r4vi joined #nim |
22:55:42 | * | natrys quit (Quit: natrys) |
22:56:07 | * | nuxdie quit (Remote host closed the connection) |
22:56:08 | * | msmorgan quit (Remote host closed the connection) |
23:02:11 | * | nuxdie joined #nim |
23:03:16 | * | filcuc quit (Ping timeout: 255 seconds) |
23:03:19 | * | msmorgan joined #nim |
23:14:16 | FromGitter | <timotheecour> in final version of that PR, i will encode in a single `int` what’s sufficient to reconstruct (file/line/col/procname / optional other data) in a compact way; ⏎ `Index: int = (fileIndex bits + procIndex bits + remaining bits for line/col)` (skipping some details) |
23:17:10 | FromGitter | <timotheecour> so that throwing exceptions (or collecting tons of stacktraces, eg in nimprof) incurs zero symbolization cost; the symbolization can be deferred to when it’s actually needed unlike what’s currently done in nim |
23:18:14 | Araq | sounds good. now if only I could draw your attention to ARC or IC or Z3 ;-) |
23:18:50 | * | NimBot joined #nim |
23:19:00 | Araq | Clyybber: are you aware of my branch? |
23:19:12 | Araq | I implemented it but the regressions are *hard* |
23:19:27 | clyybber | Yeah, I'm looking at it rn |
23:19:32 | Araq | anyhow, https://github.com/nim-lang/Nim/pull/13626 is really getting good |
23:19:33 | disbot | ➥ catchable defects |
23:20:12 | clyybber | nice |
23:20:12 | Araq | faster overflow handling and goto-based exception handling can deal with AssertError |
23:20:17 | * | watzon quit (Quit: The Lounge - https://thelounge.chat) |
23:20:22 | clyybber | Araq: How did you improve the overflow handling? |
23:20:31 | * | watzon joined #nim |
23:20:31 | Araq | read the PR |
23:20:34 | clyybber | k |
23:21:52 | * | lritter quit (Ping timeout: 256 seconds) |
23:23:10 | clyybber | oh so we use builtins |
23:23:13 | clyybber | nice! |
23:24:19 | * | abm quit (Read error: Connection reset by peer) |
23:33:52 | Araq | disruptek, https://github.com/nim-lang/Nim/pull/13626/files#diff-e2da3621d8e2ee26a311f04b51a21322R11 lying comment! |
23:33:52 | disbot | ➥ catchable defects |
23:39:01 | clyybber | heh |
23:39:15 | clyybber | good night |
23:39:30 | * | clyybber quit (Quit: WeeChat 2.7.1) |
23:48:42 | * | hax-scramper joined #nim |
23:49:45 | Araq | timotheecour: are you sure the growable array is better than our linked list? |
23:50:01 | * | NimBot joined #nim |
23:50:05 | Araq | maybe the speedup comes from the fewer stores entirely |
23:50:34 | Araq | (you turn the (cstring, int) store into an (int) store afaict) |