00:14:05 | * | Acid147 joined #nim |
00:16:12 | * | Acid147 quit (Remote host closed the connection) |
00:17:18 | * | Acid147 joined #nim |
00:18:27 | * | lmariscal[m] joined #nim |
00:23:12 | * | lmariscal[m] left #nim (#nim) |
00:23:22 | * | lmariscal[m] joined #nim |
00:28:45 | * | lmariscal[m] is now known as LeonardoMariscal |
00:47:45 | * | Acid147 quit (Remote host closed the connection) |
00:57:36 | * | Jjp137 quit (Ping timeout: 248 seconds) |
01:15:53 | * | jokul quit () |
01:21:23 | * | theelous3_ quit (Ping timeout: 268 seconds) |
01:24:27 | * | jokul joined #nim |
01:29:23 | * | sealmove joined #nim |
01:44:16 | * | Jjp137 joined #nim |
01:46:53 | * | sealmove quit (Quit: WeeChat 2.4) |
02:34:21 | * | laaron- joined #nim |
02:34:29 | * | laaron quit (Remote host closed the connection) |
02:38:27 | leorize[m] | shashlick: you can pass ucpu=amd64 to make. The makefile just reuse uname, which might be dependent on the version of mingw used |
02:41:14 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:44:17 | * | i7sDream_ joined #nim |
03:00:28 | * | jokul quit () |
03:00:48 | * | deech_ joined #nim |
03:02:08 | * | fjellfras joined #nim |
03:02:53 | * | deech__ joined #nim |
03:05:52 | * | deech_ quit (Ping timeout: 245 seconds) |
03:13:36 | shashlick | ya but will be ideal if it could auto-detect like build.bat and choosenim do |
03:26:38 | * | deech__ quit (Ping timeout: 272 seconds) |
03:33:49 | * | fjellfras_ joined #nim |
03:36:46 | * | fjellfras quit (Ping timeout: 272 seconds) |
03:36:53 | * | deech joined #nim |
03:39:58 | * | jokul joined #nim |
03:41:52 | * | fjellfras_ quit (Ping timeout: 248 seconds) |
03:48:07 | * | fjellfras_ joined #nim |
03:48:36 | * | deepend_ joined #nim |
03:49:15 | * | deepend quit (Ping timeout: 248 seconds) |
03:49:15 | * | cybj quit (Ping timeout: 248 seconds) |
03:51:23 | * | rayman22201 quit (Ping timeout: 248 seconds) |
03:52:19 | * | rayman22201 joined #nim |
03:53:03 | * | cybj joined #nim |
03:55:56 | * | deech quit (Remote host closed the connection) |
03:56:21 | * | deech joined #nim |
04:00:09 | * | dddddd quit (Remote host closed the connection) |
04:04:43 | * | deech quit (Ping timeout: 248 seconds) |
04:06:16 | * | nsf joined #nim |
04:26:09 | * | Lord_Nightmare quit (Ping timeout: 244 seconds) |
04:38:49 | * | Lord_Nightmare joined #nim |
04:41:15 | * | Lord_Nightmare quit (Excess Flood) |
04:44:43 | * | deepend_ is now known as deepend |
04:47:19 | * | Lord_Nightmare joined #nim |
05:04:39 | * | rockcavera quit (Remote host closed the connection) |
05:05:00 | * | rockcavera joined #nim |
05:08:32 | * | Trustable joined #nim |
05:08:32 | * | leorize quit (Quit: WeeChat 2.3) |
05:09:17 | * | Trustable quit (Remote host closed the connection) |
05:21:55 | * | NimBot joined #nim |
05:23:37 | * | narimiran joined #nim |
05:30:43 | * | fjellfras_ quit (Ping timeout: 258 seconds) |
05:39:44 | shashlick | gosh tables is badly broken in 0.20.0 |
05:40:08 | narimiran | shashlick: what's wrong this time? |
05:40:24 | shashlick | all calls to newTable are crashing for me |
05:40:32 | shashlick | enlarge is causing a crash too |
05:41:01 | narimiran | can you make a short example? |
05:41:19 | shashlick | this is all in my text editor so unclear if it is because of threading or boehm or what |
05:42:00 | shashlick | initializing to size 256 by default but it adds 20 odd elements then starts from 1 again |
05:42:13 | shashlick | checking table.len in a loop |
05:42:16 | shashlick | just weird stuff |
05:43:16 | Araq | shashlick, do you use the new no-init feature of tables? |
05:43:47 | * | dwdv joined #nim |
05:43:48 | shashlick | no i was stuck on 0.19.6 since i didn't have time to port to devel |
05:43:52 | narimiran | he mentions `newTable` - ref tables still have to be initialized |
05:44:11 | Araq | ok |
05:44:25 | shashlick | am changing my TableRefs to pure Table and using no-init and it is fixing some of my plugins |
05:44:34 | shashlick | but filetype is borked |
05:45:12 | shashlick | crashes https://github.com/genotrance/feud/blob/master/plugins/server/filetype.nim#L46 since i'm adding more than 64 and enlarge is crashing |
05:52:44 | shashlick | also, you could add an array to a seq, but that doesn't work anymore - gives a segmentation fault |
05:54:20 | shashlick | https://github.com/genotrance/feud/blob/master/src/pluginapi.nim#L82 |
05:57:54 | * | leorize joined #nim |
06:03:21 | leorize | narimiran: i've looked further into azure's windows ci |
06:03:31 | leorize | it's just... broken |
06:03:35 | leorize | and I don't even know why |
06:04:19 | leorize | turns out not only tfloatrange was dying, but niminaction tests got checksum mismatch |
06:04:24 | leorize | so faulty code was generated somehow |
06:04:48 | shashlick | obviously making a minimal example will need me to generate more grey hair |
06:13:02 | Araq | shashlick, use the older version until we figured it out, you're not the first who reported problems with boehm |
06:13:28 | Araq | probably the newruntime will be ready before we figured out the problems with Boehm though :-) |
06:18:09 | shashlick | well, i can try without boehm but i know all sorts of memory issues will show up |
06:18:21 | * | PMunch joined #nim |
06:19:26 | shashlick | okay what does NimMain do in a DLL? |
06:19:48 | shashlick | for some weird reason, my onLoad() proc runs even though it hasn't been LoadLib()'d |
06:20:11 | shashlick | sorry symAddr()'d |
06:20:43 | Araq | NimMain should run the module init sections, always |
06:21:04 | Araq | it doesn't matter if you generate a DLL or a program, the init sections must run |
06:21:54 | shashlick | but how is it calling my exportc proc |
06:22:29 | shashlick | ugh never mind |
06:25:35 | shashlick | well, here's a change in behavior - in 0.19.6, when my dll had an isMainModule, it didn't get pulled into NimMain, in 0.20.0, it does |
06:25:44 | shashlick | i am compiling with --app:lib |
06:26:10 | * | cyberjpn joined #nim |
06:26:18 | Araq | interesting but I cannot tell what is the better/right behaviour |
06:26:19 | narimiran | leorize: we can always just disable that two tests on windows ;) |
06:26:45 | leorize | andddd hcr gone flaky again :p |
06:30:51 | * | rheoli joined #nim |
06:31:48 | * | rheoli quit (Client Quit) |
06:32:54 | PMunch | Hmm, is there any documentation for what parseFloat can actually parse? |
06:33:51 | * | Senketsu quit (Quit: WeeChat 2.4) |
06:34:21 | * | cyberjpn quit (Quit: WeeChat 2.4) |
06:34:26 | Araq | a floating point number :P |
06:35:29 | PMunch | Well yes |
06:35:33 | PMunch | But the format of tehm |
06:35:54 | PMunch | 3.14 is obviously valid, 10e5 as well |
06:36:31 | PMunch | 10_000 is also valid, which might suprise some people |
06:38:48 | shashlick | okay i need to bed, been frustrating getting my < 1500 line editor ported from 0.19.6 => 0.20.0 |
06:39:24 | PMunch | Hmm, what's the trouble shashlick? |
06:39:35 | PMunch | I found porting most my things was fairly easy |
06:39:37 | Araq | Boehm GC afaict |
06:39:55 | Araq | and DLLs |
06:40:29 | PMunch | Aah, yeah I've never gotten those to work properly.. |
06:40:54 | shashlick | https://pastebin.com/s8pFHNuR |
06:41:08 | leorize | narimiran: I'm downgrading windows to win server 2016 now (similar to appveyor), hopefully that'll make a difference |
06:41:31 | shashlick | table enlarge crash |
06:44:39 | PMunch | Ah, that looks fun |
06:44:43 | leorize | Araq: nimsuggest won't work unless compiled with -d:danger, should I file an issue? |
06:45:05 | shashlick | even though I asked it to init at 256 |
06:45:22 | shashlick | basically this is overflowing elsewhere and i'm just poking at the wrong thing |
06:46:49 | Araq | leorize, yes, please. or better: fix it |
06:52:13 | leorize | narimiran: yay, tried on travis' windows: tfloatrange failing too |
06:52:22 | narimiran | yay :P |
06:52:56 | leorize | if I'm lucky, this "downgrade" should "fix" the problem |
06:58:55 | shashlick | okay replaced every instance of TableRef/newTable with a Table and i think it is kind of working |
06:59:39 | Araq | yay? |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:03:59 | shashlick | tbd 🙂 |
07:04:31 | * | gmpreussner joined #nim |
07:05:15 | shashlick | nope, still get random crashes |
07:05:21 | shashlick | run 3 out of 4 times |
07:08:26 | * | krux02 joined #nim |
07:17:19 | Zevv | PMunch: https://nim-lang.github.io/Nim/manual.html#lexical-analysis-numerical-constants? |
07:19:01 | PMunch | Aha, so it's just exactly the same as what Nim considers a float |
07:21:43 | * | Vladar joined #nim |
07:26:16 | * | couven92 joined #nim |
07:27:56 | * | NimBot joined #nim |
07:32:34 | shashlick | does parsexml now work at compile time? |
07:33:47 | shashlick | or xmlparser |
07:35:09 | shashlick | nope - Error: VM is only allowed to 'cast' between integers and/or floats of same size |
07:35:13 | shashlick | meh |
07:35:51 | leorize | shashlick: https://github.com/nim-lang/Nim/pull/11459 |
07:38:07 | leorize | shashlick: what version of gcc did you use for tfloatrange test? |
07:47:12 | * | Vladar quit (Remote host closed the connection) |
08:04:24 | * | leorize quit (Remote host closed the connection) |
08:06:28 | * | floppydh joined #nim |
08:08:41 | * | Acid147 joined #nim |
08:09:01 | * | leorize joined #nim |
08:27:06 | * | salewski joined #nim |
08:28:20 | salewski | When we have active moderation for new forum users, why then posting such garbage: |
08:28:24 | salewski | https://forum.nim-lang.org/t/4931 |
08:29:22 | salewski | If it is not obvious, it is just a fragment from a recent tread. |
08:29:33 | Araq | it was obvious to me |
08:29:43 | salewski | Bye. |
08:29:48 | Araq | what do you want me to do? Move it over to the other thread? |
08:30:14 | Araq | the OP lost his account and created a new one for all I can tell |
08:30:29 | salewski | Delete it, it is obvious a new spammer. It is his first post. |
08:30:55 | Araq | spammer?! |
08:31:07 | Araq | there is not even a link in this post |
08:32:44 | salewski | I think we had similar post a few times. Seems to test access, then later modify into spam. |
08:32:53 | Araq | oh |
08:33:41 | Araq | we'll watch out |
08:33:48 | salewski | Well, the disadvantage of moderation is that some new users have to wait often a day until their messages becomes visible. With serious content. |
08:33:55 | salewski | By. |
08:33:58 | * | salewski quit (Quit: WeeChat 2.4) |
08:39:54 | * | laaron- quit (Quit: ZNC 1.7.1 - https://znc.in) |
08:40:16 | * | laaron joined #nim |
08:40:32 | leorize | narimiran: I've zero idea on how to fix this https://dev.azure.com/alaviss/Nim/_build/results?buildId=163&view=logs&jobId=4611d2f1-10c9-5098-fc7e-c3332b76496f&taskId=56919d9c-8ffa-540b-29b8-a1f041571ec1&lineStart=3377&lineEnd=3378&colStart=1&colEnd=1 |
08:41:39 | * | stefanos82 joined #nim |
08:44:57 | Araq | leorize, summary of the log? |
08:48:05 | * | leorize quit (Ping timeout: 256 seconds) |
08:48:20 | leorize[m] | azure is buggy... |
08:48:36 | * | Jjp137 quit (Read error: Connection reset by peer) |
08:48:38 | leorize[m] | well, it's line 3377, search for "niminaction" |
08:48:49 | leorize[m] | (click on the log then ctrl+f, because browser search can't find it) |
08:49:11 | * | Jjp137 joined #nim |
08:54:05 | * | leorize joined #nim |
08:58:40 | leorize | ah, I think I know why now |
08:58:54 | leorize | git for windows will swap all lf -> crlf |
09:10:58 | Araq | you should turn that off ;-) |
09:14:13 | leorize | anyone here with windows 10 version 1803 or newer? |
09:15:04 | * | nc-x joined #nim |
09:15:10 | leorize | tfloatrange stop erroring out when I downgraded CI to windows server 2016 |
09:15:11 | leorize | weird |
09:15:22 | nc-x | Araq: add .gitattributes to nim repo like done here https://github.com/nim-lang/c2nim/commit/a791d3516d9d6408779a2c562fce41b95a78590b |
09:16:33 | nc-x | leorize: I have windows 10 x64 1809 at home. will be able to check whatever you want me to check in a few hours. |
09:17:17 | leorize | thanks, can you try running the tests/float/tfloatrange.nim test? |
09:17:42 | nc-x | okay |
09:18:15 | nc-x | I will report back here in about 3-3:30 hours from now. |
09:18:57 | * | nc-x quit (Client Quit) |
09:21:22 | leorize | this will likely be the first green build :D https://dev.azure.com/alaviss/Nim/_build/results?buildId=166&view=results |
09:30:40 | * | fjellfras_ joined #nim |
09:42:32 | * | fjellfras_ quit (Ping timeout: 245 seconds) |
09:43:19 | * | lukego joined #nim |
09:52:12 | FromGitter | <alehander42> @krux02 thanks for the tuple static fix, really helped one of my lib usages |
09:52:29 | lqdev[m] | does nimterop support function pointers? |
09:52:35 | krux02 | @alehander42 you are welcome |
09:53:08 | * | sealmove joined #nim |
09:53:35 | FromGitter | <alehander42> i wondered about that, when we get an error in the vm in debug mode, is it possible to automatically include line+path of the last processed node in the exception |
09:54:16 | FromGitter | <alehander42> its not hard to add manually a `debug/echo` statement in the compiler as well, but this way its way easier to see from which macro does a crash come from |
09:54:29 | FromGitter | <alehander42> on the other hand, probably those cases are too rare anyway |
09:55:06 | * | fjellfras_ joined #nim |
09:55:09 | * | alexander92 joined #nim |
09:59:36 | leorize | narimiran: https://github.com/nim-lang/Nim/pull/11485 |
09:59:57 | narimiran | yeah, i've just opened that before you've sent the link |
10:00:59 | * | ftsf quit (Read error: Connection reset by peer) |
10:06:09 | * | Vladar joined #nim |
10:08:00 | leorize | just when you thought you fixed those flaky tests, they come back and hit you right when you open a PR |
10:09:57 | narimiran | story of my life |
10:10:12 | dom96 | Araq: now passing https://github.com/nim-lang/Nim/pull/11232. Take a look plz :) |
10:13:07 | leorize | 1/ur |
10:15:12 | * | leorize quit (Remote host closed the connection) |
10:16:36 | leorize[m] | dom96: shouldn't you use a result variable for newOSError instead? |
10:17:33 | dom96 | There is no strict rule for this. |
10:17:43 | dom96 | The code originally used this variable name so I didn't change it |
10:20:01 | * | leorize joined #nim |
10:20:09 | Araq | it's ok but I'm pretty sure our style guides encourage 'result' over 'return' |
10:20:47 | lqdev[m] | ^ true |
10:21:56 | Araq | dom96, is it a bugfix-only or also a minor breaking change? |
10:22:16 | * | leorize quit (Client Quit) |
10:23:55 | * | lukego quit (Ping timeout: 256 seconds) |
10:27:12 | dom96 | Depends what you consider breaking |
10:27:13 | dom96 | Behaviour before: `send` would be left waiting forever |
10:27:42 | dom96 | Behaviour after: `send` will raise an exception |
10:27:58 | dom96 | I guess that is a breaking change |
10:28:21 | dom96 | I commented the test thoroughly so you should be able to understand what is going on |
10:28:48 | * | fjellfras_ quit (Ping timeout: 248 seconds) |
10:28:52 | narimiran | same question, asked differently: should this be part of 1.0? |
10:29:15 | dom96 | yes. It fixes a major memory leak |
10:29:58 | dom96 | I will likely make a follow up PR to reclassify `ERROR_NETNAME_DELETED` as not a "disconnection error" on Windows (this will be breaking) |
10:30:32 | dom96 | but it will ensure that behaviour on Windows and Linux is the same |
10:35:25 | Araq | ok |
10:36:08 | PMunch | Hmm, is there no rfind for seq? |
10:40:00 | * | theelous3_ joined #nim |
10:40:27 | * | vlad1777d quit (Ping timeout: 248 seconds) |
10:43:49 | FromDiscord_ | <niv> TWIMC https://github.com/niv/nim-docset docset for dash/zeal (i think) and nim 0.20.0 |
10:45:05 | * | sealmove quit (Quit: WeeChat 2.4) |
10:51:53 | * | vlad1777d joined #nim |
10:57:07 | * | dwdv quit (Quit: quit) |
11:02:27 | * | dddddd joined #nim |
11:12:08 | * | vlad1777d quit (Ping timeout: 245 seconds) |
11:27:44 | * | deech__ joined #nim |
11:28:42 | * | smitop joined #nim |
11:40:43 | * | deech__ quit (Ping timeout: 248 seconds) |
11:59:52 | * | nsf quit (Quit: WeeChat 2.4) |
12:03:23 | * | deech__ joined #nim |
12:05:04 | * | AndChat|624225 joined #nim |
12:05:53 | narimiran | leorize[m]: now that you brought my attention to it - yep, nimsuggest crashes constantly :) |
12:07:32 | * | i7sDream_ quit (Quit: WeeChat 2.5) |
12:07:43 | leorize[m] | fix it :p |
12:08:31 | * | envoyt quit (Ping timeout: 272 seconds) |
12:09:25 | FromGitter | <kaushalmodi> The other day I was looking for a CLI item selector.. I think wrapping this library would work out perfectly: https://github.com/p-gen/smenu |
12:09:44 | FromGitter | <kaushalmodi> Check out the gif on that repo |
12:09:48 | narimiran | leorize[m]: -d:danger does the trick :P |
12:23:07 | * | AndChat|624225 quit (Ping timeout: 246 seconds) |
12:24:01 | * | envoyt joined #nim |
12:24:25 | * | solitudesf joined #nim |
12:28:04 | alexander92 | https://news.ycombinator.com/item?id=20160474 |
12:28:23 | alexander92 | relatively good example of a nim usecase |
12:34:50 | FromGitter | <mratsim> alexander92 == alehander42? |
12:37:52 | * | nc-x joined #nim |
12:38:37 | nc-x | leorize[m]: the test passes on my laptop |
12:39:49 | * | nc-x quit (Client Quit) |
12:40:55 | * | lritter joined #nim |
12:41:45 | * | Snircle joined #nim |
12:49:56 | leorize[m] | narimiran: I've given up on those tests |
12:50:07 | narimiran | :) |
12:50:25 | leorize[m] | pushed a commit to downgrade osx, windows suddenly stop failing |
12:50:47 | narimiran | perfectly logical :D |
12:55:52 | * | envoyt quit (Read error: Connection reset by peer) |
12:56:12 | * | envoyt joined #nim |
12:56:18 | alexander92 | mratsim yes, i am a 90s kid now |
13:29:27 | PMunch | For those of you who read my post the other day about read- and maintainability with Nim macros, I just uploaded the project that was dealing with on GitHub: https://github.com/PMunch/stacklang |
13:29:53 | PMunch | If you want to see how that code is used in the actual program |
13:32:00 | Araq | your readme is hard to read, too few paragraphs |
13:32:14 | Araq | also mention the new --expandMacro switch |
13:34:51 | * | alexander92 quit (Ping timeout: 244 seconds) |
13:35:12 | * | leorize joined #nim |
13:39:12 | * | alexander92 joined #nim |
13:40:26 | dom96 | Araq still no merge? |
13:40:33 | FromGitter | <alehander42> yes, i'd say more code blocks with examples and what do they do exactly, otherwise awesome |
13:44:38 | PMunch | Hmm, you're right, it is a bit hard to read.. |
13:44:43 | PMunch | It was written in one sitting :P |
13:44:53 | PMunch | --expandMacro? |
13:45:52 | PMunch | Huh, neat |
13:46:17 | PMunch | Now I don't need the when defined(somethingINeverRemember): echo result.repr in all my macros |
13:47:18 | WilhelmVonWeiner | is it possible to have a module force fully qualified symbols |
13:47:48 | PMunch | Possible? Yes (with some hacks). Should you do it? No |
13:47:56 | * | smitop quit (Quit: Connection closed for inactivity) |
13:47:57 | WilhelmVonWeiner | I wouldn't dare |
13:48:05 | WilhelmVonWeiner | but it's an interesting question |
13:51:25 | leorize | someone did it |
13:51:32 | leorize | check the conio module |
13:51:38 | PMunch | If you look at cliptomania it does this |
13:51:39 | leorize | except it's terrible |
13:51:53 | PMunch | Ah yes, same guy |
13:53:06 | WilhelmVonWeiner | "using Δ: type con" |
13:53:09 | WilhelmVonWeiner | wowzers |
13:53:10 | WilhelmVonWeiner | okay |
13:53:21 | alexander92 | using |
13:53:23 | alexander92 | Δ: type clip |
13:53:28 | alexander92 | oh yes, saw the same, awesome |
13:53:35 | WilhelmVonWeiner | wtf |
13:54:13 | WilhelmVonWeiner | "Enforced prefix (con.) API isolation." is a feature |
13:54:35 | alexander92 | well, it almost is sometimes honestly |
13:54:57 | alexander92 | i have some modules where i try to always use <module>.fun(..) |
13:54:58 | leorize | apparently a lot of python users hate how Nim "pollute" the namespace |
13:55:04 | alexander92 | but i have no way to make the compiler enforce it to me |
13:56:29 | PMunch | leorize, yeah I'm not sure why that is.. |
13:56:50 | alexander92 | nim has to pollute the namespace only because of `$` and similar operators and macros afaik |
13:56:52 | PMunch | I'm still a bit annoyed that this: self was removed.. |
13:57:25 | leorize | "easy to find out which module the symbol came from" <-- the argument that I saw popped up the most |
13:57:26 | PMunch | With a proper type system like Nim has it really isn't that much of a problem |
13:57:30 | alexander92 | otherwise i agree with python users: it's great to be able to import * if you want, but having the option to import x and have to x.<stuff> is also good |
13:57:34 | alexander92 | no, it is |
13:57:39 | PMunch | leorize, we have tools for that.. |
13:57:43 | alexander92 | you have to use good ide-s and tools |
13:57:46 | alexander92 | which suck imo |
13:57:52 | leorize | PMunch: not mine arguments :p |
13:57:55 | alexander92 | i love to be able to analyze my code without having to hover |
13:57:59 | PMunch | leorize, yeah I know |
13:58:13 | alexander92 | and depend on a complicated stack of plugins |
13:58:20 | Araq | so your "analyse" step amounts to "where was this declared?" |
13:58:31 | alexander92 | it makes some things easier |
13:58:40 | Araq | like what? |
13:58:41 | PMunch | alexander92, yeah I'm partially kidding. It is nice to be able to read it without knowing the content of every imported module (especially with overloaded names) |
13:58:46 | alexander92 | now, obviously that's not nim's philosophy and i am fine with that |
13:58:57 | WilhelmVonWeiner | overloaded names is wack yo |
13:58:59 | PMunch | But it doesn't outweight the benefit of not having to type module names all day IMO |
13:59:02 | alexander92 | just saying i don't like overrelying on tools sometimes |
13:59:08 | narimiran | " having the option to import x and have to x.<stuff> is also good" --- `from x import nil` |
14:00:03 | WilhelmVonWeiner | the .f syntax would be awfully long with pythonic imports |
14:00:08 | alexander92 | PMunch, but my point is that you dont have to type those names in python as well: the import user decides for himself |
14:00:25 | alexander92 | i almost never qualify my nim imports |
14:00:50 | alexander92 | but i like to do it in like 10% of the cases, where i use a certain api/utils module etc |
14:01:01 | WilhelmVonWeiner | imports in Python are deceptive. I used to think it only imported the functions you asked for if you used `from` and I know many others who did too |
14:01:05 | alexander92 | but narimiran's solution seems great, forgot about `as nil` |
14:01:30 | alexander92 | well it's just a language feature, one has to learn how it works |
14:01:47 | Araq | it helps to get the arguments right first. |
14:02:15 | Araq | but I'm too lazy to do that, it's been discussed a hundred times already. |
14:02:19 | alexander92 | indeed :P |
14:02:50 | leorize | narimiran: I've issued a rebuild on azure for that downgrading commit, and sure enough, everything is passing |
14:03:16 | leorize | went ahead and try a rebuild on the parent commit, osx passing, win failing |
14:03:18 | alexander92 | as i said, i am ok with the nim's behavior, just i can also see the python people's point so i appreciate usage as in cliptomania |
14:03:42 | alexander92 | one thing i dont like in python lately is |
14:04:08 | alexander92 | the type annotations: i see why they use List[..] Dict[..] Union[..] but it still seems overly verbose |
14:04:15 | narimiran | it boils down to: the caller decides if he wants full qualification or not, both in python and in nim. |
14:04:27 | * | PMunch quit (Remote host closed the connection) |
14:04:35 | Araq | the problem with the Python's people point of view is that it is simply wrong |
14:05:08 | Araq | and they are living a delusion if they think they "always know where stuff is declared", Python is super dynamic, MUCH much moreso than Nim is |
14:05:12 | alexander92 | yes, it was more about what's the best default: imo nim's default is good for nim because of its lang features and the fact you can easily define overloads in different files |
14:05:22 | narimiran | it is just that the defaults are different in those two languages |
14:05:33 | alexander92 | well if you have a.Type or a.fun it's almost always in the `a` module |
14:05:48 | alexander92 | but i'd argue nim's default isn't good for python indeed |
14:06:02 | WilhelmVonWeiner | I remember seeing a typeclass feature in Nim so a function can take only a numeric argument |
14:06:05 | narimiran | ...and vice-versa |
14:06:11 | WilhelmVonWeiner | but I cannot find this list of typeclasses |
14:06:19 | alexander92 | the simple fact is that many python people prefer it compared to e.g. ruby, so that's proof that it works for them |
14:06:28 | alexander92 | prefer the qualification* |
14:06:43 | leorize | WilhelmVonWeiner: it's not really typeclass, just a list of possible generic overloads :p |
14:06:55 | FromGitter | <mratsim> depends on your area, for webdev Ruby is still way more used than Python |
14:07:23 | alexander92 | maybe yeah, but it loses in everything else imho |
14:07:44 | Araq | "proof"? strong words for very weak opinions based on taste and illusions |
14:07:44 | leorize | WilhelmVonWeiner: the syntax is Type1 | Type2, and you can find some predefined types here: https://nim-lang.org/docs/system.html#SomeNumber |
14:07:46 | WilhelmVonWeiner | leorize: is there a list of em somewhere though? |
14:08:13 | alexander92 | Araq, meh, most language design choices are based on taste and illusions |
14:08:35 | FromGitter | <mratsim> Yeah and some languages succeed despite those (Java *cough*) |
14:08:47 | alexander92 | that's the whole point: if python users have similar taste and illusions as the author, that's their deal |
14:08:48 | alexander92 | :D |
14:10:55 | WilhelmVonWeiner | oh, I found them in the manual under "Type Classes", not "Typeclasses". lol. |
14:11:43 | Araq | if module.bar(args) is good for "navigability" (don't confuse that with "readability" btw), (path/module:line).bar(args) would be even better |
14:12:12 | FromGitter | <mratsim> (I would sometimes like that in stacktraces with lots of imports) |
14:12:32 | FromGitter | <mratsim> at least knowing which utils.nim we're talking about |
14:12:33 | leorize | narimiran: have you heard of cirrus ci? looks like for projects like Nim there'd be practically unlimited parallel jobs |
14:12:37 | WilhelmVonWeiner | leorize: missed your post, ta |
14:12:48 | narimiran | leorize: i haven't |
14:13:28 | alexander92 | Araq well in python you usually have the "path" thing as a.b.c.module anyway |
14:14:10 | Araq | ah but then I have to analyse the import list, so I jump around a couple of times to figure things out |
14:14:23 | alexander92 | the :line thing is obviously different, as a function is "owned" by a module in most languages, but not by a line in any lang |
14:14:43 | Araq | and instead of jumping around I prefer to tell my editor/IDE "goto definition" |
14:14:52 | alexander92 | i dont understand why you keep arguing with me: argue with all python users instead |
14:14:54 | alexander92 | :D |
14:15:05 | Araq | it's simply not a substitute for poor tooling. |
14:15:10 | FromGitter | <mratsim> (aka write a blog post for the HN/reddit crowds) |
14:15:13 | alexander92 | literally the fact that they like it, means that it's ok for some people |
14:15:18 | alexander92 | each trains has its passengers |
14:15:36 | alexander92 | i agree, but when i criticize go for the same reason |
14:15:44 | alexander92 | people say that go is genius in its simplicity :( |
14:16:28 | leorize | narimiran: https://cirrus-ci.org/faq/#are-there-any-limits |
14:17:09 | narimiran | leorize: so now that you finally mastered azure setup, you want to try something else? :D |
14:18:54 | leorize | everything seems easy compared to azure :P |
14:19:03 | alexander92 | but i'd still argue it has readability value in rare cases |
14:19:05 | Calinou | thanks for Cirrus CI, I didn't know about it:) |
14:19:37 | alexander92 | e.g. i want all invocations of my "YApi" to be obvious and to be able to immediately see them/grep for them easily |
14:19:53 | Calinou | they even have FreeBSD runners :o |
14:20:07 | narimiran | leorize: heh, then i expect that soon you'll have some numbers on running times on cirrus :) |
14:20:32 | shashlick | @lqdev - yes nimterop supports function pointers |
14:20:39 | alexander92 | i can't reallty depend on the args to include that and having yapiFun hungary notation doesnt seem better to me |
14:20:53 | alexander92 | but its a niche case indeed and works with `as nil` |
14:21:25 | * | Vladar quit (Remote host closed the connection) |
14:21:27 | leorize | narimiran: not yet :p gotta generalize CI setup steps into scripts first |
14:21:51 | shashlick | @leorize - i tested with gcc 8.1.0 |
14:21:59 | leorize | also, this might sounds crazy but the osx downgrade commit seems to have an effect on windows test runs |
14:22:07 | * | deech__ quit (Ping timeout: 245 seconds) |
14:22:10 | narimiran | :D |
14:22:35 | leorize | run the parent commit on CI twice and windows is always failing |
14:22:39 | * | Senketsu joined #nim |
14:22:44 | Araq | I lost a day on the difference between |
14:22:44 | leorize | azure is a mess |
14:22:44 | shashlick | @leorize - x86_64-posix-sjlj |
14:22:48 | Araq | skipTypes(arg.typ, abstractVar-{tyTypeDesc}).kind == tyTuple |
14:22:52 | Araq | and |
14:23:02 | Araq | skipTypes(f, abstractVar-{tyTypeDesc}).kind == tyTuple |
14:23:23 | Araq | they looked the same to me. Bloat this up further and the difference becomes less visible |
14:23:44 | Araq | there are many dimensions to "readability" |
14:23:58 | alexander92 | you can just use a light scheme which colors different variables differently |
14:24:00 | alexander92 | tooling :O |
14:24:00 | Araq | and verbosity kills the algorithmic view |
14:24:27 | shashlick | how do i create a table out of an xml file at compile time |
14:24:36 | shashlick | none of our xml packages support ct |
14:24:50 | Araq | most bugs are in subtly wrong algorithms, that's where I lose all my productivity |
14:24:59 | alexander92 | i agree: that's why i said i'd use it niche cases, i wouldnt qualify widely used functions as skipTypes |
14:25:36 | leorize | shashlick: thanks :) |
14:25:50 | leorize | also, here's a test run on travis' windows: https://travis-ci.org/alaviss/Nim/jobs/544585303 |
14:25:57 | alexander92 | but the compiler already does hat: genMagicX vs gen_magic.x is the same |
14:26:01 | alexander92 | from readability point |
14:26:30 | Araq | so I cannot relate to this eternal "omg, where is this declared?!" problem. Where stuff is declared is the least of my worries, I can click onto the identifier to find out |
14:27:02 | FromGitter | <mratsim> but when browsing code on Github you can't |
14:27:04 | Araq | in contrast, there are no tools available for shortening the code down to the essentials |
14:27:20 | * | nsf joined #nim |
14:27:25 | krux02 | mratsim: you can still do a code search. |
14:27:25 | FromGitter | <mratsim> when you are doing code reviews that's important |
14:27:44 | FromGitter | <mratsim> how? |
14:27:45 | krux02 | often names get you to the declaration |
14:28:00 | leorize | for stuff that isn't nim: sourcegraph have github integration that works quite well for code search |
14:28:02 | alexander92 | yeah thats one problem with tooling, it's good when it's there and it works, but it's not so easy to get it everywhere and make it work correctly |
14:28:06 | FromGitter | <mratsim> that doesn't work if you import several modules |
14:28:08 | alexander92 | we all had problems with nimsuggest etc |
14:28:10 | krux02 | I often search for `proc procName` to get to the declaration. |
14:28:52 | alexander92 | but you can't know from the callsite if it's proc or func or maybe even template or macro sometimes |
14:29:16 | alexander92 | i also do that, often with procName* instead if i am sure its exported to match all those cases |
14:30:20 | Araq | mratsim: code reviews should focus on finding bugs and inefficiencies. |
14:30:27 | FromGitter | <mratsim> ultimately Nim allows prefixing with the module name, so bigger projects should use this |
14:30:38 | Araq | but WHY? where is the proof? |
14:31:10 | alexander92 | ok, so people report a pain point, and this is not proof enough? |
14:31:14 | Araq | so now you know from which module the proc comes from. hurray. Does it have fewer bugs? |
14:31:28 | FromGitter | <mratsim> because when your projects get over 100k lines with several dependencies it gets hard to track everything |
14:31:57 | FromGitter | <mratsim> I like the flexibility |
14:32:00 | Araq | what exactly do you think 'implicitConv' does? what if I tell you it's 'sigmatch.implicitConv'? |
14:32:10 | FromGitter | <mratsim> I'm not for or against the default Nim/Python |
14:32:32 | Araq | it creates an implicit conversion either way, ta-da. |
14:33:25 | alexander92 | ok, but if i compare run() with gdb.run() or select() with db.select() vs channel.select() suddenly this helps me |
14:33:48 | alexander92 | again, not a huge fan of this, but some people prefer this style |
14:34:42 | Araq | you're free to prefer this, but don't bullshit me with the typical "big projects and scale" |
14:34:56 | Calinou | GitHub is integrating "go to declaration" these days |
14:35:00 | Calinou | (it's currently in beta) |
14:36:09 | alexander92 | Araq we just want to label our code to make it easier for machine learning to take over |
14:36:36 | leorize | wouldn't machines be superior and don't have to rely on our labels? :p |
14:36:43 | alexander92 | Calinou what does github use? LSP? |
14:37:01 | FromGitter | <mratsim> Actually you can run this text generator on Nim sources (https://github.com/mratsim/Arraymancer/blob/master/examples/ex06_shakespeare_generator.nim) and generate Nim code :p |
14:37:21 | Calinou | I don't know |
14:37:39 | alexander92 | leorize no, agi will never happen, machines will always be limited to playing mediocre go |
14:37:43 | alexander92 | :P |
14:38:20 | FromGitter | <mratsim> They play superhuman go though :p |
14:39:18 | leorize | since it's github, I'll guess that it's some javascript-based code scanning engine :p |
14:39:55 | alexander92 | they use treesitter, but i assumed they do something more involved |
14:40:22 | alexander92 | after all, github has to somehow understand nim's overload/type system to make goto def actually work |
14:40:35 | leorize | also the macros system |
14:40:43 | alexander92 | ugh |
14:41:04 | alexander92 | so yeah, either interface with lang plugins, or just guess |
14:41:38 | alexander92 | i always had this dream that one day the jsgen is able to compile nim programs using localstorage and the jsbackend |
14:44:29 | Araq | the run() example is also pretty terrible, as in Python it would be mythread.run() (good!) or t.run() (worse), exactly the same as in Nim. You see, in Python, the "where does it come from" is lost just as easily as soon as you have some OOP'ish code. |
14:45:09 | * | NimBot joined #nim |
14:45:36 | alexander92 | i agree, i do something similar to `gdb.run(t<which is actually variable with the receiver>)` sometimes |
14:45:58 | alexander92 | i was talking about quallification, not particularly about python's impl of it in this case |
14:46:08 | * | deech joined #nim |
14:46:09 | Araq | and I've yet to find a single person on this planet who argues that "Python code shouldn't use OOP for better readability" |
14:46:46 | alexander92 | people from mars must hate oop |
14:47:36 | alexander92 | yes, it's not a very strong case, but most of the stuff people bikeshed about is like that |
14:47:48 | alexander92 | people fought for their `print without ()` so long |
14:49:03 | alexander92 | btw what happened with the "being able to use the same module from two different nimble versions of the same package" thing |
14:50:07 | Araq | it's done, no such restriction for 0.20 |
14:50:39 | alexander92 | cool |
14:53:18 | Araq | so now even utils.foo(args) can be ambiguous, be happy. |
14:55:39 | alexander92 | come on you simply (fulldomain:/utils-2.4.foo:24(args)) |
14:55:50 | * | fjellfras_ joined #nim |
14:56:32 | Araq | do that to a codebase of any size and watch your "readability" explode into a Java-esque experience where you'd rather rewrite the code than to *read* it |
14:56:51 | alexander92 | i was kidding in this case |
14:57:03 | alexander92 | i'd just md5 the name |
14:59:07 | alexander92 | but if we go to this end, why don't we just autoimport some modules |
14:59:22 | Araq | there is --import for that |
14:59:37 | alexander92 | but i guess you need to pass stuff explicitly to it? |
15:00:39 | Araq | I hate it. But not because it's bad (TM) for reading code. But because it's hard to maintain in the compiler |
15:01:15 | Araq | and the feature doesn't carry its costs. I am fine with 'include karax/prelude' and the like |
15:01:19 | alexander92 | what i meant was, e.g. you find out <x> is used: you look for it in the accessible modules and if there is match without collision, you add the import |
15:01:38 | alexander92 | seems unpractical from impl point, but similar from readability point |
15:01:51 | alexander92 | ruby code looks like that |
15:02:08 | alexander92 | i see |
15:04:05 | Araq | I don't see how the compiler could "auto import" files, well ok, I can see how that can work but --path is bad, --nimblePath is worse and features on top of this are bad |
15:05:21 | FromGitter | <kaushalmodi> this doesn't work: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d0114b1ee9dda04629cd632] |
15:05:37 | FromGitter | <kaushalmodi> > Error: invalid command line option: '--hint[Processing]' |
15:05:42 | FromGitter | <kaushalmodi> what am I doing wrong? |
15:06:26 | FromGitter | <kaushalmodi> I was trying to add this as an answer to https://www.reddit.com/r/nim/comments/byzq7d/go_run_for_nim/ |
15:06:32 | FromGitter | <kaushalmodi> but am surprised that above doesn't work |
15:07:44 | * | alexander92 quit (Ping timeout: 272 seconds) |
15:08:30 | Araq | the syntax is |
15:08:39 | Araq | hint("Processing", off) |
15:08:46 | Araq | I think. |
15:09:04 | lqdev[m] | when should I use {.incompleteStruct.}? |
15:09:12 | FromGitter | <kaushalmodi> Araq: thanks |
15:09:16 | FromGitter | <kaushalmodi> I see.. https://nim-lang.github.io/Nim/nimscript.html#hint%2Cstring%2Cbool |
15:09:48 | FromGitter | <kaushalmodi> Araq: do you think that the above `switch` style should also work? |
15:09:56 | Araq | nah |
15:10:03 | FromGitter | <kaushalmodi> :) |
15:10:28 | Araq | I think on the command line it's now --hint-processing:off |
15:10:45 | Araq | or something like that because shells interpret the [], sometimes. |
15:10:54 | disruptek | is the #? directive documented somewhere? i'd like to put my tab->indent replacement somewhere other than the source files. |
15:10:59 | leorize | you can always just quote |
15:11:04 | leorize | disruptek: search for source code filter |
15:11:12 | disruptek | thanks. |
15:11:15 | leorize | they can do more than just tab -> indent :) |
15:11:18 | FromGitter | <kaushalmodi> Araq: ok |
15:11:29 | FromGitter | <kaushalmodi> I see that `hint` takes bool as second arg |
15:11:34 | lqdev[m] | I guess incompleteStruct is for when you're too lazy wrapping a struct hierarchy? |
15:11:36 | FromGitter | <kaushalmodi> just saying |
15:11:36 | disruptek | tough to search for `#?` in google. ;-) |
15:12:39 | lqdev[m] | disruptek: won't searching for `"#?"` work? |
15:13:04 | disruptek | it didn't work for me. |
15:13:06 | * | disruptek shrugs. |
15:14:10 | * | alexander92 joined #nim |
15:14:22 | lqdev[m] | ah well |
15:14:30 | lqdev[m] | duckduckgo also doesn't provide any useful results |
15:14:59 | disruptek | yes, that's my default se. |
15:15:46 | * | floppydh quit (Quit: WeeChat 2.4) |
15:16:38 | alexander92 | i used !g too often |
15:16:50 | shashlick | @lqdev - i have a strategy for n-arrays which i will implement soon |
15:17:02 | shashlick | but still no good ideas for nested structs |
15:18:18 | lqdev[m] | I guess creating temporary `[parentName]_nested` structs could be a possibility? |
15:18:40 | lqdev[m] | it seems this is the only option for now |
15:20:09 | shashlick | ya creating, I use c2nim for guidance, but detecting is the difference |
15:20:45 | shashlick | i have to create a recursive pattern that nimterop can look for |
15:21:40 | alexander92 | <<<< HEAD is valid nim syntax |
15:22:34 | alexander92 | you can override HEAD and <<<<<<< HEAD to |
15:22:42 | leorize | unary operator `<<<<` applied on identifier `HEAD` :p |
15:22:43 | alexander92 | echo stuff if you forget it in your merges |
15:23:09 | leorize | !eval import macros; dumpTree: <<<< HEAD |
15:23:12 | NimBot | StmtList↵ Prefix↵ Ident "<<<<"↵ Ident "HEAD" |
15:25:17 | * | solitudesf quit (Remote host closed the connection) |
15:25:33 | alexander92 | also >>>>> commit message |
15:25:38 | alexander92 | but the ==== is hard |
15:26:34 | * | PMunch joined #nim |
15:27:00 | leorize | templates can be used without the `()` :) |
15:28:01 | alexander92 | yes |
15:29:07 | leorize | the >>>>> commit message can be solved with templates + astToStr |
15:29:21 | leorize | maybe :p |
15:30:04 | * | Acid147 quit (Remote host closed the connection) |
15:30:47 | * | Acid147 joined #nim |
15:31:28 | leorize | !eval echo astToStr a commit message |
15:31:31 | NimBot | a commit message |
15:31:50 | alexander92 | oh yeah |
15:31:51 | alexander92 | awesome |
15:32:06 | alexander92 | so in this case i can make my wrongly merged code work in horrible ways |
15:32:08 | alexander92 | :P |
15:32:26 | shashlick | what does this mean - widestrs.nim(99, 12) Error: cannot create null element for: tyUncheckedArray |
15:32:36 | shashlick | no context with my code |
15:32:46 | leorize | Araq: ^ |
15:33:38 | * | solitudesf joined #nim |
15:35:27 | leorize | alexander92: `template `<<<<<<<`(body: untyped): untyped = {.error: "You forgot a merge conflict at " & $instantiationInfo().} |
15:36:24 | lqdev[m] | is Nim `ptr pointer` equivalent to C `void **`? |
15:36:50 | leorize | yea |
15:37:22 | leorize | poor man's generics |
15:38:22 | dom96 | leorize: Does that actually work? :O |
15:40:12 | lqdev[m] | is it possible to create a `const void *` param in Nim? |
15:40:51 | FromGitter | <kaushalmodi> the args would be const by default IIUC |
15:41:02 | FromGitter | <kaushalmodi> to make them not const they need to be `var` |
15:41:41 | leorize | C context of const void * is that the target procedure won't modify the pointer contents |
15:41:52 | FromGitter | <kaushalmodi> leorize: ok |
15:42:19 | leorize | well, it's not verifiable anyway :p |
15:44:52 | alexander92 | leorize this should be a lib |
15:44:54 | alexander92 | :D |
15:47:09 | leorize | !eval template `<<<<<<<`(body: untyped): untyped; <<<<<<< HEAD; `template `<<<<<<<`(body: untyped): untyped = {.error: "You forgot a merge conflict at " & $instantiationInfo().} |
15:47:11 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: implementation of '<<<<<<<' expected |
15:48:27 | alexander92 | just add a dummy code section |
15:48:52 | alexander92 | hm i dont think you can forward declare templates |
15:49:03 | leorize | https://play.nim-lang.org/index.html?ix=1LBg |
15:50:25 | alexander92 | @dom96 why is toJson not exported |
15:50:43 | FromGitter | <kaushalmodi> leorize: that's a cool template :) |
15:50:56 | lqdev[m] | how do you wrap a union with just a single member? |
15:50:56 | * | c3v0axz quit (Ping timeout: 248 seconds) |
15:51:00 | lqdev[m] | can I just ignore it and include the member directly? |
15:51:07 | leorize | {.union.} :p |
15:51:42 | dom96 | alexander92: toJson where? |
15:51:42 | * | c3v0axz joined #nim |
15:51:48 | lqdev[m] | it's unnamed |
15:52:16 | leorize | lqdev[m]: then give it a name |
15:53:06 | alexander92 | @dom96 in json.nim |
15:53:19 | dom96 | link plz |
15:56:07 | alexander92 | what i meant was that only %* is exported in the stdlib |
15:56:18 | alexander92 | and i wanted to use a less symbol-y name |
15:57:01 | leorize | enjoy your merge conflicts https://play.nim-lang.org/index.html?ix=1LBj |
15:59:26 | shashlick | can you have a const table of objects generated at compile time? |
16:00:20 | noonien | in an `{.async.}` proc that returns a `Future[Foo]`, how can i access `result` such that it's a `Future[Foo]` and not a `Foo`? |
16:00:32 | * | alexander92 quit (Ping timeout: 248 seconds) |
16:01:23 | * | lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/MRbmuvrlMSHVVDCgjJKofFrh > |
16:02:26 | leorize | {.align: <n>.} |
16:04:46 | lqdev[m] | that pragma doesn't exist |
16:05:51 | leorize | ah, I see |
16:06:04 | leorize | well usually {.codegenDecl.} is used to customize these things |
16:07:20 | lqdev[m] | I think I'll be okay if I ignore the alignment bit, I'm only declaring the structs for their size |
16:07:31 | lqdev[m] | I don't use those structs anyway. |
16:08:30 | lqdev[m] | well if I don't use them why am I bothered with wrapping all those fields then? I think I'm just gonna `{.incompleteStruct.}` them and call it a day |
16:10:20 | leorize | why do you even bother wrapping them? :p |
16:10:36 | leorize | if you don't use them DCE will eliminate them anyway |
16:11:15 | lqdev[m] | nimterop can't wrap them and it gives compile-time errors |
16:11:26 | shashlick | which ones specifically |
16:11:29 | leorize | there's a way to skip them |
16:11:39 | leorize | cIgnore iirc |
16:11:54 | leorize | cSkipSymbol |
16:13:14 | lqdev[m] | fuck, I wasted all this time just to be told this exists. I'm such an idiot sometimes, not reading the docs. thanks for the help! |
16:13:35 | * | alexander92 joined #nim |
16:14:31 | lqdev[m] | `/home/daknus/Coding/Nim/rapid/src/rapid/lib/rapid_caudio.nim(24, 1) Error: request to generate code for .compileTime proc: cSkipSymbol` |
16:14:51 | lqdev[m] | all I did is `cSkipSymbol(@["ma_channel_router_config"])` |
16:15:13 | shashlick | put it in a static block |
16:15:25 | lqdev[m] | ah, makes sense |
16:16:02 | leorize | shashlick: you can turn them into a macro and save the `static:` part... |
16:16:20 | lqdev[m] | well, it doesn't help because I still get the same error as before. should I just skip all the symbols that use `ma_channel_router_config`? |
16:16:22 | shashlick | it used to be all macros |
16:16:38 | shashlick | @timotheecour felt compiletime procs were better |
16:16:45 | lqdev[m] | can I give a whitelist of the symbols I need to nimterop? |
16:17:01 | shashlick | there's no whitelist capability yet |
16:17:13 | shashlick | what is the actual failure you are seeing |
16:17:25 | leorize | I'd say `static: cSkipSymbol` is just noise |
16:17:31 | leorize | a macro is much much better |
16:17:44 | leorize | we shouldn't pretend something is a proc when it clearly isn't |
16:17:58 | shashlick | i preferred macros anyway |
16:18:26 | * | tyler569 joined #nim |
16:18:28 | * | lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/OPAYbjPbWOJwuAXCAvqejSrh > |
16:18:32 | shashlick | it isn't really a macro since it is not doing any macro stuff, just setting some vars |
16:18:36 | dom96 | noonien: you can't |
16:18:48 | noonien | oh |
16:19:00 | noonien | can i return a new Future[Foo]? |
16:19:05 | shashlick | @lqdev - you are getting that error since procs that use the symbol are wrapped |
16:19:12 | dom96 | Why do you want to? |
16:19:23 | shashlick | just add type ma_channel_router_config = object in cOverride and call it a day |
16:19:30 | shashlick | if you aren't using those procs |
16:19:38 | noonien | i need a reference to the Future i'm returning, because i'm passing it to another proc that completes it |
16:19:55 | lqdev[m] | right |
16:20:00 | noonien | hmm, i'm guessing {.async.} doesn't make sense there then |
16:20:02 | dom96 | alexander92: Giving users the choice between %* and toJson will make %* even more confusing though |
16:20:28 | lqdev[m] | I mentioned I could just use incompleteStruct |
16:20:47 | shashlick | ya good enough unless you need access to the internals |
16:21:02 | shashlick | then you could run that struct thru c2nim and override it correctly |
16:21:47 | dom96 | noonien: passing the future to another proc that completes it sounds a bit iffy :) |
16:22:21 | alexander92 | compile time procs are ok i think |
16:22:30 | lqdev[m] | good thing is, I don't. all I need is to write samples to the audio device |
16:23:13 | noonien | dom96: well, i'm actually registering it in a table, and there's another proc that manages that table that handles when those futures get completed |
16:23:14 | alexander92 | @dom96 hm, maybe, but it will calm down the "i dont want perl-ish operators everwyehre" people |
16:23:29 | leorize | shashlick: at least give them a macro so I can omit the `static:` |
16:23:33 | leorize | :p |
16:24:25 | shashlick | 😄 |
16:30:37 | * | Trustable joined #nim |
16:33:11 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
16:35:34 | * | laaron joined #nim |
16:59:47 | * | fjellfras_ quit (Quit: Leaving) |
17:00:54 | * | Trustable quit (Remote host closed the connection) |
17:01:19 | lqdev[m] | how can I wrap this? https://termbin.com/eafc |
17:02:12 | shashlick | nimterop doesn't handle? |
17:03:08 | shashlick | you need to set one of those #defines with cDefine() |
17:03:20 | shashlick | else the struct is empty and nimterop will skip |
17:05:23 | * | Jesin quit (Quit: Leaving) |
17:05:48 | lqdev[m] | problem is, this is used in a nested struct https://termbin.com/kd8g |
17:06:11 | lqdev[m] | and I need this struct |
17:06:57 | shashlick | so ma_device_id should work when you have a cDefine |
17:07:08 | lqdev[m] | can I just declare ma_device_id with `{.incompleteStruct, union, size: sizeof(char) * 256.}`? |
17:07:09 | shashlick | ma_device_config only uses it |
17:07:33 | * | Jesin joined #nim |
17:09:27 | shashlick | http://ix.io/1LBA/Nim <= that's c2nim output for ma_device_config |
17:09:31 | shashlick | just throw that into cOverride |
17:10:04 | shashlick | well, actually, you will run into that issue where stuff in it is not cImported yet |
17:10:16 | shashlick | ideally you can incomplete struct that |
17:10:39 | lqdev[m] | wait, so you already implemented nested structs? |
17:10:56 | shashlick | that's c2nim |
17:11:00 | shashlick | i don't support it yet |
17:11:25 | lqdev[m] | ah |
17:11:54 | shashlick | i can add double or even triple nested but it isn't going to be recursive with my current thought process |
17:12:12 | shashlick | but i feel like kicking someone who wants to nest more than twice |
17:12:43 | lqdev[m] | kick David Reid (the author of miniaudio), then |
17:13:06 | lqdev[m] | line 917 in miniaudio.h |
17:15:01 | * | nsf quit (Quit: WeeChat 2.4) |
17:15:59 | shashlick | yep I saw it earlier and felt even more frustrated at the limitation |
17:16:09 | shashlick | anyway, i have a route for n-arrays so first that |
17:46:39 | * | PMunch quit (Remote host closed the connection) |
17:50:34 | * | uvegbot quit (Quit: Konversation terminated!) |
17:58:00 | lqdev[m] | what does an incompleteStruct do exactly in a sizeof expression? |
18:00:38 | * | envoyt quit (Ping timeout: 272 seconds) |
18:01:42 | * | uvegbot joined #nim |
18:06:30 | lqdev[m] | what's the deal with this: `typedef ma_uint32 (* ma_format_converter_read_proc)(ma_format_converter* pConverter, ma_uint32 frameCount, void* pFramesOut, void* pUserData);` apparently nimterop can't translate it |
18:12:43 | * | alexander92 quit (Ping timeout: 248 seconds) |
18:17:28 | * | envoyt joined #nim |
18:21:57 | * | fab_ joined #nim |
18:22:08 | * | fab_ is now known as Guest56412 |
18:22:37 | * | Guest56412 quit (Client Quit) |
18:22:54 | * | Guest56412 joined #nim |
18:24:25 | * | Guest56412 quit (Client Quit) |
18:24:38 | * | Guest56412 joined #nim |
18:24:38 | * | Guest56412 is now known as the_fab |
18:25:12 | * | the_fab quit (Client Quit) |
18:25:57 | * | jjido joined #nim |
18:28:15 | lqdev[m] | YES! I finally finished writing all the cOverrides. I'll just have to check if they work 🤞 |
18:30:29 | Araq | https://youtu.be/E1J3OL4Jz8w |
18:34:01 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:41:23 | * | alexander92 joined #nim |
18:41:48 | * | envoyt quit (Ping timeout: 272 seconds) |
18:42:10 | * | envoyt joined #nim |
18:44:27 | * | solitudesf- joined #nim |
18:44:37 | * | lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/FEJzrAcEWWHWPykxWtOaLlca > |
18:45:50 | lqdev[m] | wait, it's on Linux and BSD, not POSIX |
18:45:59 | Araq | {.passL: "-lpthread -lm -ldl".} |
18:46:05 | Araq | ^ that one too |
18:47:02 | lqdev[m] | ah |
18:47:03 | lqdev[m] | that worked, thanks |
18:47:07 | * | solitudesf quit (Ping timeout: 245 seconds) |
18:48:55 | * | nsf joined #nim |
18:49:31 | * | alexander92 quit (Ping timeout: 248 seconds) |
18:59:42 | * | sealmove joined #nim |
19:01:08 | * | lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/LlJTpxyZtyZHhgHbMjmEsgeM > |
19:20:21 | shashlick | @lqdev - that typedef should have worked |
19:20:58 | shashlick | seems to work in isolation |
19:42:29 | FromGitter | <jivank> for coro, https://nim-lang.org/docs/coro.html , how would you go about running a proc every X minutes? it looks like sleep doesn't correctly inside a proc when you have multiple scheduled ( i tried 1 second and 10 proc that echo'd a string, both printed at the same time) |
19:44:11 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
19:46:43 | * | marvel_ joined #nim |
19:47:24 | * | nsf quit (Quit: WeeChat 2.4) |
19:49:14 | * | laaron joined #nim |
19:52:26 | * | laaron quit (Client Quit) |
19:52:42 | marvel_ | Anyone here? |
19:57:04 | Araq | hi |
19:57:18 | * | marvel_ quit (Quit: Updating details, brb) |
19:57:26 | * | marvel_ joined #nim |
19:57:38 | Araq | jivank: better use .asnc + await, coro is hardly tested |
19:59:10 | * | laaron joined #nim |
20:06:01 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
20:06:51 | * | laaron joined #nim |
20:09:53 | * | laaron quit (Client Quit) |
20:11:31 | * | laaron joined #nim |
20:15:02 | FromGitter | <xmonader> I'll be responsible for summer internship in my current company and I'm planning to introduce lots of nim to the interns :) |
20:15:09 | dom96 | Araq, we should remove it |
20:18:01 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
20:19:35 | * | jjido joined #nim |
20:20:01 | * | laaron joined #nim |
20:20:33 | * | leorize quit (Ping timeout: 256 seconds) |
20:23:23 | dom96 | Araq, is the `using` statement here to stay? |
20:23:30 | * | laaron quit (Client Quit) |
20:25:36 | * | leorize joined #nim |
20:26:08 | * | laaron joined #nim |
20:27:38 | * | vlad1777d joined #nim |
20:30:53 | * | laaron quit (Client Quit) |
20:34:42 | * | laaron joined #nim |
20:35:34 | * | laaron quit (Client Quit) |
20:35:40 | * | lf-araujo joined #nim |
20:36:57 | Araq | dom96: why not? it's not like the other features that cause on-going trouble |
20:37:26 | dom96 | Araq, It's not easy to see where it ends |
20:37:41 | * | laaron joined #nim |
20:37:42 | Araq | it's module-wide |
20:38:43 | * | narimiran quit (Ping timeout: 246 seconds) |
20:38:53 | dom96 | yeah, it shouldn't be, if anything it should be based on indentation |
20:40:27 | Araq | but then we would need to indent all the procs that use it... |
20:40:32 | Araq | sucks IMO |
20:41:50 | dom96 | I disagree and in fact doing it this way would be possible via a macro |
20:41:56 | * | lf-araujo quit (Read error: Connection reset by peer) |
20:41:56 | dom96 | so IMO that's another strike against this feature |
20:42:09 | * | lf-araujo joined #nim |
20:43:05 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
20:44:08 | * | laaron joined #nim |
20:46:16 | FromGitter | <jivank> @xmonader nice :D |
20:47:08 | Araq | ever considered that it's not a macro because of that? |
20:48:20 | FromGitter | <kaushalmodi> @xmonader awesome! |
20:49:43 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
20:50:07 | dom96 | Araq, yes, but I dislike that aspect of it, so to me it should simply be removed |
20:50:11 | FromGitter | <jivank> i also have a question about source code filters, https://nim-lang.org/docs/filters.html , when i run `$myVar.someFunc()` it comes out as `myValue()` . is that expected behavior? should you not be running functions inside a filter? i think it doesn't work when a function takes more than one argument |
20:50:38 | Araq | well it's a language feature because it cannot be done via a macro |
20:51:16 | dom96 | Araq, btw you should improve the title on this video lol https://www.youtube.com/watch?v=E1J3OL4Jz8w |
20:51:39 | * | laaron joined #nim |
20:51:58 | FromGitter | <jrfondren> good video btw |
20:52:53 | dom96 | Araq, I don't want to have to go through various `using` statements to find the type of my function's arguments :/ |
20:53:27 | xace | do we have something that is similiar/equivalent to: `while (var i = somefunction()) == 1:` |
20:53:58 | dom96 | while (var i = someFunc(); i == 1): |
20:54:00 | FromGitter | <jivank> i tried `$someFunc(a,b)` and the compiler claims, received someFunc(A) , expected someFunc(A,B). same thing with `$a.someFunc(b)` |
20:54:17 | FromGitter | <kaushalmodi> @jivank You can do this (an example) to run funcs to derives values for the source code filters: http://ix.io/1LCT |
20:54:24 | xace | dom96: thanks |
20:55:14 | FromGitter | <jrfondren> I'd prefer `while true: let i = somefunction(); if i == 1: break` |
20:55:30 | FromGitter | <jrfondren> on three lines. |
20:56:19 | FromGitter | <kaushalmodi> Araq: talking about source code filters, there's no way to use just a single `let` in a filter like this: http://ix.io/1LCT, right? |
20:56:32 | FromDiscord_ | <exelotl> yeah one-liners are overrated |
21:00:34 | Araq | dom96: so... don't use 'using'? I don't want to listen to made-up situations where you assume to read some bad source code written by bad programmers. You cannot design a language this way nor can you ever accomplish any real work. What if your coworker is a moron that nests his 'if' statements 30 levels deep and doesn't use procs... should we remove 'if' from Nim because of that? |
21:01:13 | dom96 | No, because there is no replacement for an if statement |
21:01:23 | Araq | there is 'case'. |
21:01:25 | dom96 | There is a replacement for `using`: just write out the types |
21:01:32 | dom96 | case has the same problem as `if` |
21:01:35 | dom96 | it's not a replacement |
21:01:51 | * | I_Right_I joined #nim |
21:04:29 | FromGitter | <jrfondren> people can use type aliases that leave you with the same problem of having to do some work to know what you're dealing with |
21:05:32 | FromGitter | <jrfondren> or they can use a type that's not even defined in the file, now you have to go looking for it if that concerns you |
21:06:08 | FromGitter | <jrfondren> with using I'd split the screen and jump to the top of the file and go, oh, OK. Probably. |
21:07:05 | FromGitter | <jrfondren> vi-like editors are a lot better at jumping to the top of the file than they are at telling me why the entire display is indented, unfortunately :/ |
21:08:12 | FromGitter | <jrfondren> this comes up in languages with C-like syntax, where I can at least add a temporary } and jump to its twin. With Nim I'd have to do something like ?^ [^ ] (counting spaces) |
21:10:59 | Araq | maybe. I don't use vi-like editors. |
21:11:00 | * | lf-araujo quit (Read error: Connection reset by peer) |
21:11:01 | dom96 | You make a very good point jrfondren. Even so, I don't think this feature will get enough use to be part of the language. Nim aims to have a "small core", and this is one construct that I think deserves to be let go. |
21:20:07 | I_Right_I | I've been away for a while but congrats on 'nim 0.20.0' |
21:25:56 | sealmove | O__O haven't seen the blog video! |
21:26:02 | sealmove | what am I doing with my life? |
21:27:35 | * | theelous3_ quit (Ping timeout: 268 seconds) |
21:29:33 | lqdev[m] | damn miniaudio, so cool yet so hard to wrap |
21:31:32 | lqdev[m] | also, my executable is strangely large |
21:31:55 | lqdev[m] | that did not happen when using the library in C |
21:33:20 | Araq | dom96: 'using' is a small feature and a barrier for introducing ever more type inference into Nim. before we had it there always was some pressure to add more type inference to get a Haskell-like experience |
21:35:17 | dom96 | okay, maybe it'll grow on me |
21:35:22 | Araq | it also encourages one to be consistent in one's parameter names across procs, it's not a feature-from-hell to confuse you. |
21:39:37 | shashlick | @lqdev - try -d:danger |
21:40:01 | shashlick | Can you share your wrapper? Will help improve nimterop |
21:40:10 | shashlick | Have to make this easier |
21:40:24 | lqdev[m] | it doesn't work just yet |
21:43:17 | sealmove | nim cpp is kinda the go-to if you don't need interfacing with C? |
21:43:43 | shashlick | @lqdev - will help to know what features would help make life easier |
21:43:44 | sealmove | I've always been using nim c, thought of it as default |
21:44:06 | shashlick | Obviously supporting every data structure but if not then what would help |
21:44:27 | * | rockcavera quit (Ping timeout: 248 seconds) |
21:44:55 | lqdev[m] | shashlick: I think the biggest problem will be ma_device, I can't just leave it as an incomplete struct, and its code is super-convoluted |
21:47:13 | lqdev[m] | I guess if you'd make double-nested structs supported it would help a ton |
21:47:47 | sealmove | love the suppressing of the other (often irrelevant) 123451234 type signatures in error msgs |
21:48:16 | Araq | sealmove: thanks :-) |
21:49:19 | * | c2V0a3U joined #nim |
21:52:51 | * | c3v0axz quit (Quit: Leaving) |
21:55:36 | * | solitudesf- quit (Ping timeout: 272 seconds) |
21:55:38 | Araq | kaushalmodi: I guess not. Are source code filters still a thing? surprisingly popular feature |
21:56:59 | FromGitter | <kaushalmodi> Araq: it very much is a "thing" for me :) |
21:57:12 | FromGitter | <kaushalmodi> I use it as a templating engine at work |
21:57:29 | FromGitter | <kaushalmodi> the snippet is a very run down version, I do much more in the actual filter |
21:57:43 | FromGitter | <kaushalmodi> *please keep on supporting this feature* |
21:57:48 | * | laaron quit (Remote host closed the connection) |
21:58:24 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:59:28 | * | laaron joined #nim |
22:00:19 | Araq | niminst is built on top of it and dom96's book uses it extensively too |
22:00:29 | Araq | so it's safe |
22:01:03 | shashlick | @lqdev do you think it's worth adding a cOverride that can be in the middle |
22:01:08 | xace | does -d:danger imply -d:release or should i specify both `-d:release -d:danger` |
22:01:36 | FromGitter | <kaushalmodi> Araq: Thanks, that's good :) |
22:01:41 | Araq | -d:danger implies -d:release |
22:02:39 | lqdev[m] | shashlick: I think it would be worth making cOverride accept an untyped block, and inject all the types and stuff into its own sections in the generated code |
22:02:52 | lqdev[m] | I'm not sure if that's possible with your current arch, though |
22:04:21 | shashlick | That's a better idea |
22:04:49 | shashlick | So the override will get injected where it is found during cimport |
22:04:51 | marvel_ | Anyone who has used the book, Nim in 07Action? |
22:05:17 | FromGitter | <kaushalmodi> I have |
22:05:29 | dom96 | I have not only used it but also written it ;) |
22:05:52 | sealmove | We need a new book after 1.0 |
22:06:10 | FromGitter | <jrfondren> called Nim in Motion, naturally |
22:08:11 | dom96 | `Error: expression cannot be cast to KeyboardEventObj=object` hm |
22:08:27 | dom96 | Would be nice of the compiler to tell me why |
22:08:38 | shashlick | But that's hard since nimterop won't typically recognize what needs to be cOverride |
22:09:06 | sealmove | jrfondren: +1 |
22:09:42 | dom96 | jrfondren: not sure if you know but Manning actually has a series called this: https://www.manning.com/livevideo/linux-in-motion |
22:10:18 | Araq | dom96: different sizeof()s |
22:10:31 | Araq | is usually the only reason for un-castability |
22:10:35 | dom96 | Araq, ahh :/ |
22:10:35 | FromGitter | <jrfondren> should be fine then? My primary interest is in the acronym |
22:11:49 | dom96 | If you want to make a live video series about Nim then do get in touch with Manning |
22:11:55 | dom96 | That would indeed make a great acrony, |
22:11:57 | dom96 | *acronym |
22:12:06 | Araq | https://youtu.be/QOCaacO8wus?t=91 |
22:12:16 | Araq | ^ Nim's development |
22:12:53 | * | lqdev[m] uploaded an image: image.png (24KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/ZmNcZFBMsVOOILHkRDzpEogS > |
22:12:57 | lqdev[m] | what is this language lol |
22:13:29 | dom96 | Turkish? |
22:13:44 | lqdev[m] | perhaps |
22:13:49 | FromGitter | <jrfondren> google translate says turkish |
22:14:22 | lqdev[m] | btw, +1 for using Kurzgesagt <3 |
22:14:27 | FromGitter | <jrfondren> supposedly MTL is famously bad for Turkish. People ask simple questions about webhosting (in Turkish) and it comes across as a death threat involving hand grenades. |
22:16:27 | I_Right_I | how just look over the release note... again good job! |
22:16:27 | dom96 | Araq, I thought marking it with {.incompleteStruct.} would make it shut up, but nope :( |
22:17:06 | I_Right_I | how = wow |
22:17:13 | lqdev[m] | oh yes my dearest friend {.incompleteStruct.} |
22:17:36 | * | krux02 quit (Remote host closed the connection) |
22:20:54 | I_Right_I | So I noticed newruntime mentioned in bug fixes section in the release notes for 0.20.0 whats the current status of the newruntime? How(How != wow) is it coming along? |
22:22:40 | * | rockcavera joined #nim |
22:25:06 | FromGitter | <zetashift> For Nim 1.0 it should still be enabled with a switch but from what I've read it's coming along nicely: https://github.com/nim-lang/Nim/issues/11217 |
22:27:36 | I_Right_I | I just tested it with a few apps and no problems |
22:27:50 | I_Right_I | very nice |
22:33:20 | Araq | I_Right_I: can you submit some of these apps? we need more tests for --newruntime |
22:35:41 | * | marvel_ left #nim (#nim) |
22:37:59 | * | marvel_ joined #nim |
22:40:36 | I_Right_I | I don't mind submitting at all. But I was Liberal with the word App. I should have said test programs. |
22:41:15 | I_Right_I | What is the submit process? |
22:42:21 | rayman22201 | Thanks for the video Araq! I'm excited for part 2 and 3, any estimated time on their release lol? |
22:43:34 | Araq | I_Right_I: create a PR, look at tests/destructor/twidgets.nim for a good example |
22:44:04 | Araq | rayman22201: Thursday and Friday |
22:46:59 | rayman22201 | 🎉 excellent news! |
22:48:13 | I_Right_I | Araq: Okay I already have some code in a PR. I haven'tested it yet. But I was planning on working on it sometime in the next few days. Should I just post here when I am done? |
22:48:52 | Araq | whatever you feel like |
22:50:41 | I_Right_I | I just tested the some examples that use raylib and they seemed to work fine. |
22:53:19 | I_Right_I | What I would like to do is go back to using a thread pool in the STD. Are thread pools stable now? |
22:55:57 | Araq | they got bugfixes but I don't consider them to be stable |
23:04:02 | I_Right_I | Well I'll give them a shot. I really hope to be able to get some time in learning and using nim. I freed up some time for it next week and hopefully longer. |
23:11:32 | Araq | one week is enough to learn Nim. |
23:12:29 | * | envoyt quit (Ping timeout: 244 seconds) |
23:13:43 | * | envoyt joined #nim |
23:17:07 | FromGitter | <kayabaNerve> Araq: I've never seen one actually seen one used; only brought up in discussion about file-wide macros. That said, they can't be used that way, because the replace macro doesn't allow you to replace line end characters :( Damn line-by-line parsing. |
23:21:26 | I_Right_I | oh yeah, I come from c and never use pythonish syntax before. And I was up and running with nim in a day or two. But there are somethings I skimmed over. But yeah "Easy to learn" is a good bullet point for nim. |
23:22:15 | * | stefanos82 quit (Quit: Quitting for now...) |
23:26:15 | FromGitter | <zetashift> I_Right_I what raylib bindings are you currently using? |
23:32:01 | I_Right_I | https://gitlab.com/define-private-public/raylib-Nim |
23:35:06 | sealmove | Araq: is making `case` work for tuple of ordinals too PITA to implement/maintain? |
23:37:47 | * | I_Right_I quit (Remote host closed the connection) |
23:38:38 | Araq | sealmove: it exists already |
23:38:56 | sealmove | :O |
23:39:24 | Araq | tests/macros/tcasestmt_macro.nim |
23:39:29 | Araq | good night |
23:39:46 | * | abm joined #nim |
23:40:39 | sealmove | gn! |
23:44:57 | sealmove | eh, can't find that file |
23:45:15 | * | redlegion quit (Remote host closed the connection) |
23:47:10 | sealmove | anyway, I guess it's implementable with case statement macro |
23:47:57 | FromGitter | <kayabaNerve> In Nim, is hasKey O(1) or O(n)? |
23:48:21 | FromGitter | <kayabaNerve> I always thought Tables were O(1) lookup but O(n) key check. That said, it looks like both use rawGet. |
23:54:36 | FromGitter | <jrfondren> O(1) of course. checking for a key any other way would be an optimization, since you're deviating from the natural way, and O(n) probably isn't an optimization over O(1) |
23:55:35 | FromGitter | <jrfondren> due to hash collision you're always checking that the key exists when you perform a lookup. |