00:17:15 | FromDiscord_ | <onelivesleft> Hey, tangential question: I'm trying to get my nim-generated doc to link to the github file. It looks like the url is correct, and I've pushed the tag to github, but github is giving me a 404. |
00:19:55 | FromDiscord_ | <onelivesleft> This looks right, right? : https://github.com/onelivesleft/simple_parseopt.git/tree/v1.0.0/src/simple_parseopt.nim#L98 |
00:21:17 | FromDiscord_ | <onelivesleft> https://github.com/onelivesleft/simple_parseopt/releases/tag/v1.0.0 |
00:21:51 | shashlick | tree should be blob |
00:22:56 | FromDiscord_ | <onelivesleft> blob doesn't work either, and that url is generated by `nim doc2` |
00:27:57 | FromDiscord_ | <onelivesleft> ok, something screwy is going on: in one tab it 404s, in another (where I typed in the url) it works |
00:30:08 | FromDiscord_ | <onelivesleft> n/m, it was the `.git` in the url |
00:56:02 | madprops | is there a library that orders items in columns like the ls command does? |
01:00:12 | * | joshbaptiste quit (Ping timeout: 252 seconds) |
01:00:35 | * | joshbaptiste joined #nim |
01:05:13 | zedeus | !repo asciitables |
01:05:14 | disbot | https://github.com/xmonader/nim-asciitables -- 11simple terminal ascii tables for nim 8 21⭐15 0🍴 7& 1 more... |
01:05:30 | zedeus | !repo terminaltables |
01:05:31 | disbot | https://github.com/xmonader/nim-terminaltables -- 11terminal tables for nim 8 16⭐15 1🍴 |
01:06:27 | * | clyybber quit (Quit: WeeChat 2.6) |
01:11:11 | madprops | oh coool |
01:23:33 | madprops | hmm not versioned |
01:25:02 | disruptek | yeah, i'm having to point at a git hash for terminaltables. |
01:25:33 | disruptek | so annoying that people refuse to tag releases. |
01:25:49 | madprops | the hash is the commit id right? |
01:26:13 | madprops | not sure how to do this |
01:26:54 | disruptek | yeah. |
01:27:04 | disruptek | !repo disruptek/wet |
01:27:05 | disbot | https://github.com/disruptek/wet -- 11render hourly weather report in the console 8 0⭐15 0🍴 |
01:27:41 | disruptek | i'm using it in golden, too, but wet might be a better demo, crude as it is. |
01:27:49 | madprops | nice |
01:31:16 | madprops | how do i update nimble? |
01:32:04 | madprops | my older version doesn't work anymore after 1.0.4 |
01:32:48 | disruptek | dunno. i used to use a fork but now i just use nimph. |
01:33:23 | disruptek | doesn't `build_all` build it? |
01:34:54 | madprops | build_all is a command? |
01:35:43 | disruptek | build_all.sh in the Nim repo. |
01:39:45 | madprops | hmm |
01:40:03 | madprops | just tried going to the choosenim toolchains dir |
01:40:07 | madprops | and doing ./koch tools |
01:40:12 | madprops | but compilation fails |
01:40:26 | madprops | that's basically what build_all.sh does |
01:40:27 | disruptek | you're on linux, right? |
01:40:31 | madprops | yea |
01:40:44 | disruptek | why don't you see if you can build nimph and let me know what you think. |
01:40:50 | disruptek | !repo disruptek/nimph |
01:40:50 | disbot | https://github.com/disruptek/nimph -- 11a nim package hierarchy manager from the future 8 2⭐15 0🍴 |
01:41:18 | madprops | aight |
01:42:47 | disruptek | thought if you can build that, you should be able to build nimble. |
01:43:02 | madprops | can't install dependencies cause nimble is broken lol |
01:43:18 | disruptek | the irony. |
01:45:44 | madprops | im gonna try running build_all.sh entirely |
01:49:02 | disruptek | seems weird that nimble cannot be installed with nimble. |
01:52:14 | * | thomasross quit (Ping timeout: 268 seconds) |
01:52:31 | * | thomasross joined #nim |
01:53:27 | madprops | when i try to run nimble i geT: |
01:53:29 | madprops | Error: Requested executable is missing. (Path: /home/yo/.choosenim/toolchains/nim-1.0.4/bin/nimble) |
01:54:03 | madprops | seems im gonna have to download the nim repo |
01:54:06 | madprops | and run build_all |
01:54:09 | zedeus | if you're using choosenim you don't have to build stuff yourself |
01:54:28 | madprops | i tried choosenim update nimble etc |
01:54:36 | zedeus | `choosenim update stable` |
01:54:39 | zedeus | or devel |
01:54:45 | madprops | i did that |
01:54:49 | madprops | it updated nim to 1.0.4 |
01:54:52 | madprops | but not nimble |
01:55:08 | madprops | well i have to mention in mid compilation my computer froze (im taking care of that issue) |
01:55:36 | zedeus | nimble is included in the update |
01:55:55 | disruptek | doesn't choosenim use binaries? |
01:56:02 | zedeus | sometimes |
01:56:22 | disruptek | i don't use it. i think life is better via the repo. |
01:56:42 | zedeus | meh i prefer just running `choosenim update devel` and letting it do its thing |
01:58:23 | madprops | so maybe i could remove 1.0.4 and try installing again |
01:58:41 | madprops | it definitely didn't use binaries. it did a long compilation |
02:01:29 | madprops | hmm it fails at: Building tools (nimble, nimgrep, nimpretty, nimsuggest) |
02:01:41 | madprops | it just says it failed it seems |
02:01:43 | disruptek | in the repo? |
02:01:48 | madprops | with choosenim |
02:02:11 | madprops | .cache/nim/nimfind_r/stdlib_assertions.nim.c.o: file not recognized: File truncated |
02:02:20 | disruptek | rm -rf .cache/nim |
02:02:53 | madprops | ok here we go again |
02:03:41 | disruptek | at some point, you have to ask yourself what your time is worth. |
02:05:41 | madprops | ok done |
02:06:01 | madprops | i would prefer to download binaries a lot more of course |
02:06:10 | madprops | instead of compiling |
02:06:16 | disruptek | pffbt, not me. |
02:06:51 | madprops | what's the benefit of compiling? |
02:07:02 | madprops | if the binaries came from the nim website they should be trustable |
02:07:04 | disruptek | it's more likely to work. |
02:07:42 | disruptek | takes me <9s to build nim. what's the point of hazarding someone else's toolchain? |
02:07:56 | madprops | it takes me a couple of minutes here |
02:08:06 | disruptek | how is that possible? |
02:08:23 | madprops | well i have an i5 from 2014 |
02:08:23 | * | bacterio joined #nim |
02:08:35 | madprops | but if im lucky im gonna have a new amd soon |
02:09:03 | madprops | btw: equires "terminaltables.git#82ee5890c13e381de0f11c8ba6fe484d7c0c2f19" |
02:09:05 | disbot | https://github.com/nim-lang/Nim/pull/82 -- 5Implemented Lazy[T], Documentation changes, etc @11AzureKitsune |
02:09:06 | madprops | doesn't seem to work |
02:09:10 | madprops | "requires"* |
02:09:23 | disruptek | take out the .git |
02:09:48 | madprops | why do you have .git there? |
02:10:01 | disruptek | 'cause i'm dumb. |
02:10:12 | madprops | :o |
02:16:51 | disruptek | i guess i should make the bot ignore that stuff. |
02:19:59 | disruptek | terminaltables.git#82ee5890c13e381de0f11c8ba6fe484d7c0c2f19 |
02:21:04 | disruptek | #12767 |
02:21:06 | disbot | https://github.com/nim-lang/Nim/issues/12767 -- 3new $nimbleDir path substitution yields unexpected search paths @11disruptek; snippet at 12https://play.nim-lang.org/#ix=235K 😏 |
02:26:09 | madprops | terminaltables works but |
02:26:15 | madprops | i have to figure out how to render the columns |
02:26:32 | madprops | i mean ls does it in alphabetical order going down |
02:26:47 | disruptek | yes, the math is up to you. |
02:26:53 | madprops | hehe |
02:31:11 | disruptek | so build_all.sh worked. |
02:31:34 | disruptek | welcome to the elite. |
03:25:48 | * | leorize_ joined #nim |
03:25:52 | * | leorize quit (Remote host closed the connection) |
03:40:51 | madprops | you ready? https://adventofcode.com/ |
03:55:36 | * | endragor joined #nim |
04:11:19 | disruptek | nah. |
04:13:07 | FromDiscord_ | <yewpad> not for me this year |
04:13:50 | * | chemist69 quit (Ping timeout: 276 seconds) |
04:15:38 | * | chemist69 joined #nim |
04:36:14 | * | nsf joined #nim |
04:50:35 | madprops | how am i supposed to use a function that calls a function above that calls a function below? i tried separating them into files but recursive import problems .. no idea |
04:54:52 | FromDiscord_ | <WilliamDraco> LIke.. a forward declaration? |
04:55:01 | shashlick | you can create a function prototype above |
04:55:15 | madprops | ok i have an idea |
05:06:06 | madprops | wait, how do i forward declare a proc |
05:06:12 | madprops | just write the header up there and then implement it down? |
05:06:21 | disruptek | yeah, leave the = ... off. |
05:08:26 | madprops | it says it expects an implementation |
05:08:38 | madprops | oh wait |
05:08:39 | disruptek | did you leave off the =? |
05:08:54 | madprops | nvm |
05:09:01 | madprops | yeah, it had different numbers of arguments |
05:10:19 | madprops | btw i've had a bit of a problem with for x in 0..somethingThatsZero |
05:10:26 | madprops | it does it at least once sometimes i think |
05:11:28 | disruptek | yeah, but only when you aren't watching. |
05:11:38 | disruptek | you have to keep your eye on those ranges. |
05:11:38 | madprops | quantum trickery |
05:14:46 | disruptek | but seriously, ranges are inclusive. |
05:14:56 | disruptek | use 0 ..< 9 to omit 9. |
05:26:05 | madprops | oh, thanks |
05:26:13 | madprops | need a space after the < ? |
05:26:26 | madprops | i like to compact stuff sometimes |
05:39:32 | madprops | starting to make this tree mode http://i.imgur.com/IppSgxq.png |
05:39:40 | madprops | .git is so huge i just print "git stuff" heh |
05:43:07 | * | narimiran joined #nim |
05:45:29 | * | dddddd quit (Remote host closed the connection) |
05:50:31 | * | uu91 quit (Read error: Connection reset by peer) |
05:51:10 | * | uu91 joined #nim |
06:09:02 | FromDiscord_ | <Rika> madprops, 0..<9 is afaik the preferred writing actually |
06:09:30 | narimiran | `0 ..< 9` is the nimpretty way, IIRC |
06:11:21 | yumaikas | So, does Nim have closures a la JS? |
06:11:31 | yumaikas | Or nested procs, I guess? |
06:11:36 | narimiran | yes |
06:12:27 | yumaikas | You have a link handy for the syntax for them? I'm looking, but it escapes me atm |
06:14:09 | narimiran | yumaikas: https://play.nim-lang.org/#ix=2363 |
06:15:01 | yumaikas | Thanks! |
06:15:59 | yumaikas | That trailing = trips me up pretty often |
06:16:45 | yumaikas | For better or worse reasons, I'm currently seeing if I can cook up a smallish spreadsheet application. |
06:17:19 | yumaikas | Writing a small little scripting language to use to extend the formulas |
06:18:29 | * | Kaynato quit (Quit: Leaving) |
06:18:47 | * | Kaynato joined #nim |
06:23:07 | FromDiscord_ | <Rika> narimiran nimpretty doesnt format my code that way, is it off by default? |
06:24:41 | narimiran | then i misremembered |
06:28:27 | narimiran | this is the only example in NEP-1 with the range and it has spaces, even though it doesn't mention it explicitly: https://nim-lang.github.io/Nim/nep1.html#introduction-coding-conventions |
06:30:24 | * | thomasross_ joined #nim |
06:30:24 | * | thomasross quit (Killed (wolfe.freenode.net (Nickname regained by services))) |
06:30:24 | * | thomasross_ is now known as thomasross |
06:31:57 | yumaikas | narimiran: How goes it? |
06:32:53 | FromDiscord_ | <Rika> i'll wait for a rigid coding convention, like python has, because i dont have strong opinions on code convention (other than lines before braces, which nim doesnt have anyway) |
06:45:53 | * | clyybber joined #nim |
06:52:13 | * | thomasross quit (Ping timeout: 250 seconds) |
06:53:14 | * | thomasross joined #nim |
07:04:38 | * | solitudesf joined #nim |
07:05:31 | * | LargeEpsilon joined #nim |
07:09:11 | * | lbartoletti joined #nim |
07:11:26 | * | lbart quit (Ping timeout: 265 seconds) |
07:19:10 | * | uu91 quit (Ping timeout: 265 seconds) |
07:20:48 | * | uu91 joined #nim |
07:20:55 | FromGitter | <zacharycarter> does anyone know if it's possible to run apple's debugging tools without running your app inside xcode? |
07:21:07 | FromGitter | <zacharycarter> for instance - I'd like to use the metal frame capture tool but I don't want to use xcode |
07:21:59 | FromGitter | <zacharycarter> oh yeah - you just run instruments |
07:22:04 | FromGitter | <zacharycarter> dumb question my bad |
07:25:56 | * | solitudesf quit (Ping timeout: 265 seconds) |
07:41:44 | * | lbartoletti is now known as lbart |
07:42:57 | * | Perkol joined #nim |
07:54:17 | FromGitter | <zacharycarter> well apparently instruments cannot do metal frame captures so bleh |
07:57:51 | * | PMunch joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:03:32 | * | Perkol quit (Remote host closed the connection) |
08:04:48 | * | gmpreussner joined #nim |
08:08:23 | Araq | !github last-recently-used |
08:08:24 | disbot | https://github.com/cleverdeng/LruCache.py -- 11Implements LRU(Last-recently-used) cache algorithm, Support the thread safe, With Python 8 12⭐15 5🍴 7& 29 more... |
08:08:42 | Araq | !github LruCache |
08:08:44 | disbot | https://github.com/mohaps/lrucache11 -- 11A header only C++11 LRU Cache template class that allows you to define key, value and optionally the Map type. uses a double linked list and a std::unordered_map style container to provide fast insert, delete and update No dependencies other than the C++ standard library. This is a C++11 remake of my earlier LRUCache project (https://github.com/mohaps/lrucache) The goal was to create a fas |
08:09:34 | * | crem quit (Ping timeout: 252 seconds) |
08:11:48 | * | crem joined #nim |
08:36:15 | PMunch | Hmm, looking at this Arduboy library I wonder if it would be possible to check for all instances of "print" in the code and translate all the strings to simple indices into the font buffer and only generate those characters that are actually required. Could save a nice chunk of memory.. |
08:37:43 | clyybber | what about priniting runtime generated strings? |
08:37:45 | PMunch | So say the string "Hello world" would be translated on compile-time to "\0\1\2\2\3\4\5\3\6\2\7" and the font bitmap would only store the characters "Helo wrd". |
08:38:01 | PMunch | clyybber, good point.. |
08:39:10 | PMunch | It could be added as an optimisation flag |
08:39:43 | PMunch | So you can tell it to either include all, include only those used (no dynamic), or include only the characters in a supplied list. |
08:46:34 | * | floppydh joined #nim |
08:46:34 | lqdev[m] | PMunch: it wouldn't store the space, though |
08:47:30 | PMunch | Huh? |
08:47:42 | PMunch | Why wouldn't it store the space? |
08:48:17 | lqdev[m] | because the space is an empty bitmap? |
08:48:35 | PMunch | And? |
08:48:57 | PMunch | Oh you mean you could optimise it away so that it didn't store the space? |
08:49:01 | PMunch | Yeah I guess that's true |
08:49:24 | lqdev[m] | exactly |
08:51:12 | PMunch | Following that logic it could also store a couple of special characters like / as a drawLine operation |
08:54:38 | * | njoseph quit (Ping timeout: 276 seconds) |
08:58:39 | * | njoseph joined #nim |
09:04:53 | PMunch | Hmm, I'm looking at how nimterlingua is able to rewrite any text in the source code. And it uses term rewriting templates that it generates based on the INI file of translations. This obviously won't work for me since I don't know all the strings to begin with.. |
09:05:08 | PMunch | Can term rewriting macros grab any string literal? |
09:10:40 | PMunch | Apparently you can :) |
09:13:59 | * | narimiran quit (Quit: leaving) |
09:16:37 | Araq | it's PR friday? tell me about your important PRs |
09:17:50 | FromDiscord_ | <Rika> it's friday?! |
09:18:03 | Araq | apparently |
09:18:55 | * | narimiran joined #nim |
09:19:32 | PMunch | Fun with term rewriting: https://play.nim-lang.org/#ix=236m |
09:21:47 | Araq | yeah this is not supported if you read the spec carefully |
09:22:05 | Araq | TR macros are only for optimizations, you can turn them off |
09:23:22 | lqdev[m] | PMunch: why do `tick = if tick: false else: true` when you can simply do `tick = not tick` |
09:23:42 | Araq | and TR macros need some love in general, it's an old design |
09:24:06 | Araq | and I happen to believe that I'm a better language designer now... :P |
09:25:48 | Araq | in fact, I think I know how to do it properly now... |
09:25:59 | * | Araq must resist ... writing another ... RFC ... |
09:26:02 | PMunch | lqdev[m], I had it as tick = not tick initially, but it was all in a template with a `when` statement so it didn't work properly. That was just an attempt to make sure I wasn't misremembering how not worked |
09:26:23 | PMunch | Araq, well that was just an abuse to see how they worked. I'm actually thinking of an optimisation |
09:27:00 | * | solitudesf joined #nim |
09:28:19 | PMunch | So memory is in short supply on microcontrollers. And the Arduboy library has a 1280 byte big array of all 256 extended ASCII characters in a 5x7 font in it. I was wondering if I could use term rewriting macros to extract which characters where actually used, and rewrite them to other offsets so that I could only include the used characters. |
09:31:17 | Araq | if you have control over the ascii array why not limit it to 'a'..'z', '0'..'9', ' ' and don't use other characters in your string |
09:31:46 | PMunch | Because that would mean I have to manually specify all the characters I need |
09:32:03 | Araq | well it's 37 |
09:32:05 | madprops | today i learned about forward declaration, should be like the first thing that's taught lol |
09:32:21 | Araq | 37 "manual" entries, come on |
09:32:41 | Araq | sometimes programming involves manual work |
09:33:00 | PMunch | I mean with Nim I can already say: generateFontArray({'a'..'z', 'A'..'Z', '0'..'9', ' '}) and have it generate a font array of those characters |
09:33:09 | PMunch | And write a macro that spits out those characters |
09:33:25 | PMunch | But you'd also need a mapping table from ASCII -> myTable indices |
09:33:50 | Araq | easily done: |
09:33:52 | PMunch | Araq, well I'm trying to blow away the dusty C programmers here :P |
09:34:06 | Araq | translate"look at this string" |
09:34:42 | Araq | just give your strings a prefix, solved. |
09:34:58 | madprops | i still would like f"" lol |
09:35:05 | Araq | you won't have many strings in your program either way, you have no memory to hold them |
09:35:05 | PMunch | They already got exited when I showed them a macro that converted bitmaps into the internal sprite format so that they didn't have to drag it into a web-site and copy-paste the code into their code :) |
09:35:20 | madprops | like you have 'and' and 'or' to avoid hitting that nasty symbols key row. But no f"" |
09:35:22 | FromDiscord_ | <Rika> woah woah woah what do these {a}s and {lit, noalias} things mean PMunch |
09:35:39 | Araq | madprops, &"{x} from strformat |
09:35:53 | PMunch | Rika, shhhh don't worry about it |
09:35:54 | madprops | yes that's what i do. my point is that that & is hard to type |
09:36:00 | FromDiscord_ | <Rika> what |
09:36:00 | PMunch | Rika: https://nim-lang.org/docs/manual_experimental.html#term-rewriting-macros |
09:36:07 | FromDiscord_ | <Rika> are we back at the hard to type argument again |
09:36:08 | Araq | fmt"{x}" # also possiblee |
09:36:16 | FromDiscord_ | <Rika> oh thanks |
09:36:17 | madprops | nope. fmt is a raw string |
09:36:20 | narimiran | madprops: that again? |
09:36:23 | FromDiscord_ | <Rika> seems like i skipped over that section |
09:36:23 | madprops | lol |
09:36:26 | Araq | "{x}".fmt |
09:36:33 | madprops | hmm |
09:36:38 | Araq | ^ works too and now shut up :P |
09:36:50 | madprops | do you have anything against the letter f though |
09:36:50 | FromDiscord_ | <Rika> personally i dont like the & thing too, because i dont see the connection between "format this string" and "ampersand" |
09:36:51 | Araq | I personally like &"" best |
09:37:12 | Araq | Rika: it produces a concat expression, that's the connection |
09:37:18 | FromDiscord_ | <Rika> ok |
09:37:22 | FromDiscord_ | <Rika> im like |
09:37:24 | FromDiscord_ | <Rika> negative iq |
09:37:33 | FromDiscord_ | <Rika> forgive me for not seeing that] |
09:37:34 | madprops | im like negative desire to use the symbols row |
09:37:48 | madprops | my soft typing skills don't apply there |
09:37:49 | Araq | we also thought about %"" which would produce a format expression |
09:37:58 | Araq | which is important for i18n |
09:38:08 | narimiran | madprops: so you never use parentheses? |
09:38:11 | Araq | but we don't have it (yet?) |
09:38:24 | madprops | parens are easy because i use them a lot. it's natural but & *& ^%$% etc is unatural |
09:38:46 | narimiran | then we should immediately change $ too |
09:38:49 | FromDiscord_ | <Rika> maybe you're just not used to it |
09:38:51 | PMunch | madprops, pull a french one and swap numbers an symbols |
09:39:09 | FromDiscord_ | <Rika> # for comments isnt natural coming from c-likes isnt it |
09:39:09 | narimiran | shit, you never do multiplication either |
09:39:23 | madprops | #@* are easy |
09:39:30 | madprops | it's the middle section that troubles me |
09:39:37 | PMunch | madprops, what layout do you use? |
09:39:37 | FromDiscord_ | <Rika> bruh |
09:39:41 | FromDiscord_ | <Rika> * is in the middle is it not |
09:39:48 | madprops | yea |
09:39:50 | FromDiscord_ | <Rika> good question pmunch |
09:39:50 | narimiran | so * is easy, but one key to the left of it is huge problem |
09:40:00 | madprops | yea lol idk why |
09:40:09 | FromDiscord_ | <Rika> basically, you're weird |
09:40:14 | madprops | ah |
09:40:38 | PMunch | I mean I kinda agree with madprops, I can use the symbols I'm used to using, but things like & and $ have me looking at my keyboard to find them.. |
09:40:54 | FromDiscord_ | <itmuckel> Hey guys! What model loader (for example for .obj files) do you use for your OpenGL projects? |
09:41:07 | narimiran | PMunch: so the solution is to use &{...} more so you get used to it! :D |
09:41:24 | PMunch | &{}? |
09:41:27 | FromDiscord_ | <itmuckel> I found https://github.com/barcharcraz/nim-assimp/blob/master/assimp.nim but it doesn't compile anymore |
09:41:37 | FromDiscord_ | <Rika> its an opportunity to never need to look at the keyboard again for any symbol |
09:41:40 | narimiran | ah, &"...{...}...." |
09:41:48 | PMunch | Of course it doesn't help that I use a Norwegian layout so half of the useful keys are behind AltGr and the other half is behind shift |
09:41:55 | Araq | itmuckel: please fix it an create a PR, everything should work with 1.0, that's why we have it |
09:42:08 | FromDiscord_ | <Rika> it still mentions nimrod damn |
09:42:16 | Araq | 1.0 is for the Nimble packages to catch up |
09:42:19 | FromDiscord_ | <Rika> is the dev active? |
09:42:34 | Araq | I doubt it, but you can always fork it |
09:42:38 | PMunch | Ooof, if it's from the Nimrod days it's pretty old.. |
09:42:50 | FromDiscord_ | <Rika> sub-0.13? |
09:42:56 | PMunch | Something like that |
09:43:10 | FromDiscord_ | <itmuckel> I just looked it up, there are three pull requests that address the problems I have with it, but none of them accepted. 🙄 |
09:43:11 | PMunch | Yeah, sub 0.13 |
09:43:21 | Araq | fork it! |
09:43:41 | FromDiscord_ | <Rika> fork their pr branch |
09:43:51 | FromDiscord_ | <Rika> then just use your fork lmao |
09:44:04 | FromDiscord_ | <Rika> or theirs if the code is all working |
09:44:04 | PMunch | I know because that's how far the playground goes back :P I tried to build versions further back but it didn't work as the binary ended up being named "nimrod" so it couldn't find it when it wanted to compile code :P |
09:45:23 | FromDiscord_ | <Rika> oh wow, a converter |
09:45:29 | FromDiscord_ | <Rika> are converters still useful |
09:45:49 | FromDiscord_ | <Rika> or is there something more preferred |
09:46:34 | PMunch | Well they can be useful |
09:47:06 | PMunch | I find them particularily helpful when working with C libraries that just fuck around with their types.. |
09:48:11 | FromDiscord_ | <itmuckel> Why would I fork it? I could just use a fork. This seems to incorporate the other pull requests, but I'm not sure. What's the best approach when you have an abandoned project like this? A new fork fragments this even more |
09:48:11 | FromDiscord_ | <itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/649909461338816542/unknown.png |
09:48:20 | FromDiscord_ | <Rika> i havent encountered a situation where i had to interact with a c library yet |
09:48:36 | PMunch | itmuckel, you fork it and take over maintenance :) |
09:48:39 | FromDiscord_ | <Rika> @itmuckel if it doesnt work, fork the one with most progress |
09:48:52 | narimiran | ideally you would fork it and send a PR to nimble packages so it now points to your repo |
09:49:03 | FromDiscord_ | <itmuckel> @PMunch Aaaaaah |
09:49:03 | FromDiscord_ | <itmuckel> 🙂 |
09:49:20 | madprops | why does choosenim update doesn't download binaries? |
09:49:34 | FromDiscord_ | <Rika> it shou;d |
09:49:38 | madprops | ;d |
09:49:43 | PMunch | Rika, yeah.. I keep doing this thing where I'm thinking about how I can fit the non-shaped liquid Nim into various shaped holes.. |
09:49:44 | FromDiscord_ | <Rika> ree |
09:50:00 | madprops | hmm liquid nim |
09:50:08 | * | leorize_ quit (Ping timeout: 260 seconds) |
09:50:09 | PMunch | Rika, problem with your symbol row there? |
09:50:16 | madprops | obviously |
09:50:23 | PMunch | madprops, it's got electrolytes! |
09:50:24 | FromDiscord_ | <Rika> lmao it's the home row |
09:50:39 | FromDiscord_ | <Rika> i suck at typing on my right hand |
09:50:44 | PMunch | Rika, hmm for me ' is one row up from home |
09:51:03 | FromDiscord_ | <Rika> i hit ; |
09:51:16 | madprops | yeah my l and ; are next to each other |
09:51:20 | FromDiscord_ | <Rika> besude l |
09:51:21 | PMunch | That for me is top left.. |
09:51:22 | FromDiscord_ | <Rika> fcusgbeyn |
09:51:28 | FromDiscord_ | <Rika> beside. |
09:51:31 | madprops | problem i have sometimes is that i hit / instead of ? |
09:51:31 | FromDiscord_ | <Rika> b e s i d e |
09:51:44 | madprops | bad Shift timing |
09:51:49 | FromDiscord_ | <Rika> pmunch, you got an odd keyboard |
09:51:59 | FromDiscord_ | <Rika> madprops, you could say it's a race condition |
09:52:01 | FromDiscord_ | <Rika> heh |
09:52:02 | PMunch | Rika, oh you only know the half of it :P |
09:52:15 | FromDiscord_ | <Rika> this is super off topic now lmao |
09:54:18 | PMunch | Rika: https://photos.app.goo.gl/c83maeUQokXYjxwU8 |
09:54:31 | PMunch | That is my keyboard |
09:54:49 | PMunch | And some of the buttons don't quite do what they are labeled as |
09:54:51 | madprops | that Z is a long way from home my dude |
09:54:58 | madprops | actually everything is |
09:55:01 | FromDiscord_ | <Rika> what the absolute shit is that layout |
09:55:01 | madprops | is this dvorak? |
09:55:09 | FromDiscord_ | <Rika> i was gonna ask |
09:55:12 | PMunch | madprops, Norwegian Dvorak yes |
09:55:34 | narimiran | PMunch: your / is in the "hardest place to type it" |
09:55:48 | madprops | my / is where your Z is |
09:55:50 | PMunch | Hold CapsLock and it works like Ctrl, hit it and you get Escape. Hold tab and it works like Super, hit it and you get a tab. |
09:56:09 | PMunch | Yeah Shift+7 is inconvenient.. |
09:56:24 | PMunch | But not more than AltGr + 7 to create { |
09:56:25 | FromDiscord_ | <Rika> / looks so irritating to use for you |
09:56:37 | FromDiscord_ | <Rika> ouch. |
09:56:54 | madprops | well at least you have some nice media buttons |
09:57:06 | PMunch | Yeah.. Norwegian keyboards aren't really made for programming.. |
09:57:21 | PMunch | Haha, I don't think I've ever hit a single one of those media keys :P |
09:57:27 | madprops | is there a reason you don't use a US kb? |
09:57:29 | FromDiscord_ | <Rika> programming was made with a qwerty keyboard in mind so... |
09:57:34 | * | leorize_ joined #nim |
09:57:39 | FromDiscord_ | <Rika> maybe hes norwegian i dont know |
09:57:40 | PMunch | And TBH I don't know if they work on this Linux setup |
09:57:49 | Araq | Nim was made with the German keyboard layout in mind... |
09:57:50 | PMunch | Haha, yeah I'm Norwegian |
09:58:06 | madprops | i mean my first language is spanish and i use US layout |
09:58:06 | Araq | # is easy to type, {} is not |
09:58:07 | FromDiscord_ | <Rika> Araq, TIL |
09:58:24 | FromDiscord_ | <Rika> {} is still kinda hard to type in qwerty though |
09:58:33 | PMunch | Well I kinda need ÆØÅ, which I can't get on US keyboards |
09:58:42 | madprops | problem is i have to find the ñ on google |
09:58:42 | PMunch | And I prefer the ISO enter over the ANSI one |
09:58:47 | Araq | and äüöß are operators in Nim, instead of x.len you can also type älen |
09:59:10 | Araq | I mean äx |
09:59:12 | FromDiscord_ | <Rika> i'd like to see that in an april fools |
09:59:20 | FromDiscord_ | <Rika> this heavily reminds me of APL now |
09:59:25 | FromDiscord_ | <Rika> or J |
09:59:39 | FromDiscord_ | <Rika> i'm getting kinda tingly because APL is scary |
09:59:41 | PMunch | We have dead-keys madprops, so I hit Alt+Gr + [~] followed by an n to make ñ |
10:00:04 | FromDiscord_ | <Rika> madprops, can't you just do n + ~ |
10:00:08 | madprops | n~ |
10:00:15 | FromDiscord_ | <Rika> us intl allows for stuff like that apparently |
10:00:17 | Araq | true story: I thought about using # for len |
10:00:26 | FromDiscord_ | <Rika> sounds like lua |
10:00:30 | narimiran | last character of string `s`? get it with š |
10:00:32 | PMunch | I can actually create the german letters more easily than some symbols on this keyboard.. |
10:00:41 | madprops | like #names ? |
10:00:43 | PMunch | ß for example is just AltGr + s |
10:00:51 | Araq | madprops, yeah |
10:01:03 | madprops | what stopped you? |
10:01:06 | FromDiscord_ | <Rika> <-- first language has "a letter" with two letters |
10:01:15 | PMunch | And ä is just the same key to make ñ but without AltGr and then followed by a |
10:01:16 | * | abm joined #nim |
10:01:16 | Araq | but by then I had thousands of lines of code where # was used to introduce comments |
10:01:39 | madprops | btw is the 'result' proc return variable thing you borrowed from other language? |
10:01:59 | FromDiscord_ | <Rika> feels like its from golang |
10:01:59 | PMunch | Pascal IIRC |
10:02:03 | PMunch | Or Delphi rather |
10:02:05 | FromDiscord_ | <Rika> i think golang has it i dont remember |
10:02:06 | Araq | and # comment vs #array (no space here!) would have been a bitter pill to swallow |
10:02:08 | FromDiscord_ | <Rika> ah i see |
10:02:22 | PMunch | Araq, yeah that would be ugly :P |
10:02:24 | madprops | i mean i kinda feel pleasure in typing stuff.len |
10:02:38 | madprops | it's nice to type |
10:02:44 | Araq | anyway, 'result' is in Delphi and Eiffel too |
10:02:52 | FromDiscord_ | <Rika> ah UFCS is such a godsend |
10:02:59 | Araq | and C++ emulates it via NRVO |
10:03:04 | PMunch | Rika, Nim is older than Golang.. |
10:03:23 | FromDiscord_ | <Rika> PMunch, features can be introduced after the creation of a language |
10:03:50 | Araq | so it seemed like a very good idea. it also fits the whole "unstructured control flow is bad" narrative |
10:03:50 | PMunch | Rika, yeah UFCS is amazing, but it also comes up as a contested topic when Nim is mentioned.. |
10:04:02 | madprops | something i wonder, is the autoindentation in vscode in any way controlled by the nim plugin? because sometimes it's pretty bad |
10:04:16 | Araq | it's not and it's terrible |
10:04:23 | narimiran | sTyLe_iN_SenS__iTiViTy !!!1!111!!!1! |
10:04:29 | PMunch | The one on the playground is pretty bad as well.. |
10:04:38 | FromDiscord_ | <Rika> narimiran, i hate that argument |
10:04:39 | Araq | narimiran, yay... |
10:04:56 | FromDiscord_ | <Rika> who would ever do that in a real scenario... |
10:04:57 | narimiran | Araq: well nobody had mentioned it yet, i couldn't let that happen |
10:05:03 | PMunch | narimiran, that is actually not a valid identifier :P |
10:05:19 | narimiran | PMunch: the exclamation part? |
10:05:21 | PMunch | Can't have __ |
10:05:30 | Araq | as I said, you can use \u00AC in Java in identifiers |
10:05:31 | narimiran | wow had no idea :D |
10:05:31 | FromDiscord_ | <Rika> Araq, so it's vscode that sometimes gives me a 4 space indent when there's no reason to and not the plugin? |
10:05:38 | PMunch | Only a single consecutive underscore |
10:05:59 | FromDiscord_ | <Rika> what really |
10:06:02 | FromDiscord_ | <Rika> let me try that |
10:06:32 | PMunch | I figured that out when I wanted to separate something in a long bit literal IIRC |
10:06:32 | FromDiscord_ | <Rika> what the fuck its real |
10:06:32 | narimiran | yep, it complains about trailing underscore |
10:06:33 | FromDiscord_ | <Rika> is there a reason? |
10:06:36 | Araq | ok, one more time: Nothing in C#/C++/Java stops me from using sTyLe_iN_SenS__iTiViTy as an identifier |
10:06:38 | FromDiscord_ | <Rika> that doesnt sound right |
10:06:56 | Araq | it's a valid identifier in these languages, they only enforce that I apply it consistently |
10:07:07 | Araq | yay, consistently bad identifiers, great. |
10:07:17 | FromDiscord_ | <Rika> basically what you're saying is that whatever the buffoons are saying is invalid |
10:07:17 | Araq | see lua's API for a real world example |
10:07:18 | PMunch | !eval echo NimVersion |
10:07:27 | NimBot | 1.0.4 |
10:07:32 | narimiran | weeeeeeee |
10:07:39 | Araq | lua_wecannotuseunderscores(...) |
10:07:44 | PMunch | For some reason the damn cron-job didn't work, again.. |
10:08:22 | PMunch | The worst part is that I can see that the cron job ran.. |
10:09:03 | PMunch | And running that script manually works fine |
10:09:34 | FromDiscord_ | <Rika> bad cron |
10:13:43 | * | leorize_ quit (Quit: WeeChat 2.6) |
10:13:54 | Araq | can somebody take over https://github.com/nim-lang/Nim/pull/12506 please? |
10:13:55 | disbot | ➥ Fix sequtils.delete bug with out of bounds indexes @11GULPF |
10:14:18 | * | NimBot joined #nim |
10:14:32 | * | uu91 joined #nim |
10:14:52 | Araq | yeah, that sounds good, thanks for listening |
10:15:23 | PMunch | We're all rubber ducks on this blessed day! |
10:15:53 | PMunch | Oh FFS, why is Windows so bad at reporting DLL errors.. |
10:17:11 | FromDiscord_ | <Rika> can it be that `delete` is the official name for procs that delete |
10:18:17 | Araq | PMunch, get the "CFF explorer" |
10:18:32 | Araq | it's a good tool to inspect DLLs and their deps |
10:18:48 | Araq | or even to figure out whether it's a 32 or a 64 bit DLL |
10:20:00 | PMunch | It's 64-bit |
10:20:15 | PMunch | "Portable Executable 64" according to CFF Explorer |
10:23:36 | Araq | as I said, it also tells you about its deps |
10:23:49 | PMunch | Aha |
10:23:57 | PMunch | It was indeed missing a dependency |
10:25:59 | PMunch | Good thing I have the error message: "The specified module could not be found" without it specifying which fucking module it's trying to load.. |
10:26:39 | PMunch | On Linux at least that error message says something like "Couldn't find somerandomlib.so" |
10:28:19 | Araq | PMunch, might also be a Nim stdlib problem |
10:28:32 | Araq | where we don't ask for extended error info |
10:29:07 | PMunch | The error message is from the parent C application |
10:29:26 | PMunch | Which calls some Windows procedure to read out the error message of an error code |
10:29:35 | PMunch | Similar to what you would do with "dlerror" on Linux |
10:34:01 | Araq | interesting but we all know Windows is a piece of junk :-) |
10:35:11 | PMunch | This is the part that is used to log the errors: https://github.com/PMunch/unbound/blob/master/dynlibmod/dynlibmod.c#L11-L32 |
10:35:43 | PMunch | I guess there might be a way to get more information.. |
10:43:11 | * | Trustable joined #nim |
10:52:27 | madprops | some feedback about the errors messages .. i often find them too verbose like "got this but expected this or this or this or this oh and you forgot to make it mutable or this or this" |
10:52:50 | madprops | i think rust messages are a bit more effective at this |
10:53:22 | madprops | like they pin point the most probable problem |
10:53:38 | narimiran | we came full circle |
10:54:08 | madprops | years ago it was the opposite? |
10:54:16 | * | lritter joined #nim |
10:54:23 | narimiran | what difference a year makes |
10:56:16 | FromDiscord_ | <Rika> narimiran, care to explain? |
10:56:53 | Araq | it used to be "the error messages are bad, I dunno where my mistake is" |
10:56:58 | narimiran | ^ |
10:57:14 | FromDiscord_ | <Rika> madprops said that rust's error messages do better though |
10:57:23 | FromDiscord_ | <Rika> and those are super verbose arent they? |
10:57:33 | madprops | rust even prints like the line numbers with a big red "the error is here!" lol |
10:57:47 | FromDiscord_ | <Rika> even makes arrows... |
10:57:59 | Araq | Rust assumes you use tooling from 1980 |
10:57:59 | madprops | but that said i find the error in nim pretty fast |
10:58:09 | FromDiscord_ | <Rika> what do you mean? |
10:58:12 | FromDiscord_ | <Rika> 1980? |
10:58:21 | FromDiscord_ | <Rika> oh |
10:58:24 | FromDiscord_ | <Rika> terminal only |
10:58:32 | FromDiscord_ | <Rika> i mean, it looks pretty thats for sur |
10:58:39 | Araq | editor --> switch to terminal --> look at error messages --> switch back to editor |
10:58:44 | FromDiscord_ | <Rika> not super pretty but kinda pretty |
10:58:54 | FromDiscord_ | <Rika> maybe "embezzled" is a better word |
10:59:24 | Araq | Nim can do that too via some switch but I think it's anachronism |
10:59:31 | madprops | something i like about rust, is how the vscode checking feels. it quickly highlights/dehighlights. i know if there are no errors shown everything is ok |
10:59:55 | madprops | in nim i pretty much need to compile to check |
11:00:01 | FromGitter | <alehander92> Araq i dont agree |
11:00:07 | FromDiscord_ | <Rika> ah yeah the vscode plugin needs a save before it checks |
11:00:08 | FromGitter | <alehander92> why should one context switch 3 times |
11:00:12 | FromGitter | <alehander92> to just understand an error |
11:00:40 | FromGitter | <alehander92> i agree with having two "modes" with very dense vs more detailed context |
11:00:42 | FromDiscord_ | <Rika> alehander92, a beginner would need to do that provided they dont install any plugin in their editor |
11:01:04 | FromGitter | <alehander92> there are so many cases where one still can build in terminal or look at logs e.g. CI etc |
11:01:32 | FromGitter | <alehander92> i think building in terminal is often better |
11:01:38 | FromGitter | <alehander92> this terminal might be even inside your editor |
11:01:43 | FromGitter | <alehander92> but it still gives you more flexibility |
11:02:02 | FromGitter | <alehander92> you can run a more complex file watcher system etc |
11:02:11 | FromDiscord_ | <Rika> i have a good feeling you misunderstood what he implied |
11:02:17 | FromDiscord_ | <Rika> but i cannot say for sure |
11:02:56 | * | nif quit (Quit: ...) |
11:03:06 | * | nif joined #nim |
11:03:28 | FromGitter | <alehander92> yeah i am sorry for my tone |
11:03:43 | FromGitter | <alehander92> and tooling is nice |
11:03:55 | FromGitter | <alehander92> and i agree sometimes detailed messages are overrated etc |
11:04:14 | FromGitter | <alehander92> but as an option i think detailed context is ok |
11:04:49 | FromGitter | <alehander92> narimiran but i think |
11:04:53 | FromGitter | <alehander92> the feedback is different |
11:04:57 | FromGitter | <alehander92> its like the info is good |
11:05:17 | * | njoseph quit (Ping timeout: 276 seconds) |
11:05:22 | FromGitter | <alehander92> it just might be presented more "visually", e.g. with overloads you can just underline / color the diff/mismatch |
11:05:39 | FromGitter | <alehander92> which is both dense and informative |
11:06:02 | FromGitter | <alehander92> again, very subjective |
11:06:12 | FromDiscord_ | <Rika> i'd like that more |
11:06:17 | FromDiscord_ | <Rika> errors on my editor |
11:06:40 | FromGitter | <alehander92> but this helps both |
11:07:34 | FromGitter | <alehander92> i am talking in the last sentences about what madprops said and rendering the info itself, even for signatures |
11:07:51 | FromGitter | <alehander92> you still see this error in your editor |
11:11:03 | madprops | can't say rust tooling is great though |
11:11:10 | madprops | the vscode plugin is buggy |
11:11:17 | madprops | sometimes i need to restart vscode |
11:12:33 | FromDiscord_ | <Rika> nim vscode editor doesnt update until i save tho, is that an issue or just because |
11:13:00 | madprops | what rust rls does is wait a few seconds after last thing typed |
11:13:07 | madprops | which would be better imo |
11:14:56 | FromDiscord_ | <Rika> yeah, i dont know why nim's plugin doesnt do that |
11:15:09 | narimiran | use autosave? |
11:15:58 | FromDiscord_ | <Rika> what if i dont wanna save?! |
11:16:00 | madprops | gonna try that. im used to saving on focus out |
11:16:02 | FromDiscord_ | <Rika> i kid, i will |
11:16:09 | FromDiscord_ | <Rika> me too, madprops |
11:16:35 | narimiran | youngsters these days.... |
11:21:18 | * | ng0 joined #nim |
11:23:41 | * | tjmac joined #nim |
11:31:06 | * | uu91 quit (Read error: Connection reset by peer) |
11:31:20 | * | uu91 joined #nim |
11:34:35 | * | uu91 quit (Read error: Connection reset by peer) |
11:34:48 | * | uu91 joined #nim |
11:37:53 | * | thomasross_ joined #nim |
11:37:53 | * | thomasross quit (Killed (adams.freenode.net (Nickname regained by services))) |
11:37:53 | * | thomasross_ is now known as thomasross |
11:43:01 | * | Romanson joined #nim |
11:45:32 | * | tjmac left #nim ("-bye") |
11:47:32 | * | thomasross quit (Ping timeout: 276 seconds) |
11:47:47 | * | thomasross joined #nim |
11:51:30 | PMunch | Nice, managed to make a docker container that will take a huge C project and a small Nim DLL project, cross-compile them for Windows, then run a Windows application to spit out an installer that sets up and installs everything in working order :) |
12:01:47 | * | njoseph joined #nim |
12:03:22 | Zevv | where are the days that you just put your floppy in drive 1 and press reset to get your code to run |
12:04:04 | Araq | yeah it was great, you could write up to 3 times to a floppy until it broke in random ways |
12:05:34 | Araq | or the nice copy protection mechanisms where you could install a program exactly once from the floppy |
12:06:06 | Araq | and the company which sent you the floppies tried to install it itself and claimed "this version really works now, we tested it!" |
12:07:37 | * | nsf quit (Quit: WeeChat 2.6) |
12:09:47 | * | sealmove joined #nim |
12:17:33 | FromGitter | <alehander92> were those |
12:17:36 | FromGitter | <alehander92> the big floppies |
12:19:08 | Araq | no |
12:19:19 | FromGitter | <alehander92> i wonder |
12:19:26 | FromGitter | <alehander92> if gramophone disks |
12:19:36 | FromGitter | <alehander92> could have made it into modern computers |
12:28:20 | * | Vladar joined #nim |
12:29:45 | Zevv | well, casette tapes did, no technical reasons why a record could not |
12:30:46 | sealmove | Zevv: want to tackle left-recursion? |
12:32:53 | FromGitter | <alehander92> hmm |
12:33:09 | FromGitter | <alehander92> cool |
12:33:15 | FromGitter | <alehander92> how is npeg going |
12:34:47 | Zevv | sealmove: well, its already there, basically |
12:35:14 | Zevv | its bounded by precedence levels, which solves the runaway problem |
12:36:06 | Zevv | came in in 0.20.0 |
12:37:14 | Zevv | for really real left recursion the grammar needs to be rewritten, but I lack decent grammar AST for rewriting at that level |
12:37:26 | Zevv | also, I dot understand the problem well enough |
12:37:48 | Zevv | but to answe your question: sure, give it a go! ) |
12:43:10 | FromDiscord_ | <sealmove> Right, if there is no compelling evidence it's useful, then why bother. |
12:45:17 | FromDiscord_ | <sealmove> precedence is good enough I guess, especially since it's a Nim dsl (where precedence is predefined and natural to the user) |
12:46:36 | Zevv | sure |
12:47:07 | * | floppydh quit (Quit: WeeChat 2.6) |
12:47:31 | FromDiscord_ | <sealmove> Btw do we have bnf dsl? |
12:50:28 | Zevv | there is something close in npeg misc |
12:50:38 | FromDiscord_ | <sealmove> Oh also, Guido is tranfering Python to PEG https://medium.com/@gvanrossum_83706/peg-parsing-series-de5d41b2ed60 |
12:51:28 | Zevv | https://github.com/zevv/npeg/blob/master/misc/mouse2npeg.nim |
12:51:31 | FromGitter | <zacharycarter> cool - got things working on osx |
12:51:48 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/uyLR/Screenshot-2019-11-29-at-14.51.11.png) |
12:52:39 | Zevv | btw sealmove, did you get to try the vm register count update I made, does that solve it for you? |
12:53:09 | * | uu91 quit (Read error: Connection reset by peer) |
12:53:25 | * | uu91 joined #nim |
12:53:40 | FromDiscord_ | <sealmove> Yes!! :)) |
12:53:54 | clyybber | rebase and go go go |
12:53:56 | FromDiscord_ | <sealmove> I am very happy, my parser works just fine! |
12:57:41 | FromDiscord_ | <sealmove> Had to handle indentation with global state. |
12:58:27 | FromDiscord_ | <sealmove> Also I ended up using many stacks. I wonder if a tree would make more sense, no idea. |
13:00:03 | Zevv | whatever makes you happy |
13:00:29 | Zevv | why global stack? get me your parserurl again, let me take a look |
13:01:28 | Zevv | Araq: with the vm increase to 64 bits we also increased regs ABC tot 16 bits, so now we seem to allow op to 64k registers, do you foresee any obvious problems with that? If not we can put that in the PR |
13:02:38 | FromDiscord_ | <sealmove> Here you go https://github.com/sealmove/nimitai/blob/master/nimitai/private/ksypeg.nim |
13:03:45 | * | uu91 quit (Read error: Connection reset by peer) |
13:04:00 | * | uu91 joined #nim |
13:09:14 | clyybber | Araq: Unifying pArg and p to a proc that only has one extra param is quite tricky, since f(g()) with no sink params must be transformed to f(var tmp; =sink(tmp, g()); tmp) finally: =destroy(tmp) |
13:09:57 | clyybber | Ah, I have the solution. We handle the other case in moveOrCopy |
13:10:30 | Araq | Zevv, it should be fine |
13:11:00 | Araq | the VM uses a seq already for the register memory |
13:11:21 | Araq | so we don't waste anything more than we currently do, except that the VM instructions are bloated by a factor of 2 |
13:11:34 | Araq | but my suspicion is that the memory overhead is in the noise |
13:11:50 | Araq | we lose all the RAM in the tree data structures anyway (ropes!) |
13:12:00 | clyybber | raptorjit wants to go 96bit |
13:12:09 | FromGitter | <alehander92> why not move to strings |
13:12:13 | FromGitter | <alehander92> cant be that hard |
13:12:21 | Araq | ha! |
13:12:25 | FromGitter | <alehander92> :) |
13:12:30 | Araq | but it is |
13:12:35 | Zevv | Araq: ok thanks |
13:12:51 | FromGitter | <alehander92> but seriously |
13:12:52 | Araq | the coding patterns are different, alehander92, you can't optimize FP code. |
13:12:54 | FromGitter | <alehander92> it cant be that hard |
13:13:12 | FromGitter | <alehander92> but my impression was |
13:16:04 | FromGitter | <alehander92> sorry |
13:16:08 | FromGitter | <alehander92> well i have to look at it |
13:16:17 | Araq | well replacing Rope by 'string' is easy enough |
13:16:23 | Araq | but then it's slower |
13:16:31 | FromGitter | <alehander92> yeah but |
13:16:38 | FromGitter | <alehander92> is that because of allocations of many small strings |
13:17:30 | FromDiscord_ | <onelivesleft> Is there a way to fill out the tags for `nimble publish` automatically? |
13:17:31 | FromGitter | <alehander92> i sometimes build code generators which mostly add to the same big string |
13:17:33 | madprops | hmm lastWriteTime and lastAccessTime are giving me 1969 dates on some directories |
13:17:35 | FromGitter | <alehander92> i think |
13:17:48 | FromGitter | <alehander92> but with complicated code generation this is not easy i guess |
13:17:55 | Araq | https://github.com/nim-lang/Nim/blob/devel/lib/pure/json.nim#L735 |
13:17:57 | madprops | i guess directories don't have write date data? |
13:18:06 | Araq | this is the pattern you need to adopt when you use 'string' |
13:18:15 | * | krux02 joined #nim |
13:18:23 | Araq | and you don't have to do this with ropes so we didn't |
13:18:58 | FromGitter | <alehander92> but is this a problem because of allocation? |
13:19:03 | FromGitter | <alehander92> or because of many copying |
13:19:15 | FromGitter | <alehander92> i havent profiled enough such stuff |
13:19:17 | Araq | it's a different big O thing |
13:19:42 | Araq | it's O(1) vs O(n) and then inside loops it becomes O(1) vs O(n*m) |
13:19:47 | Araq | or with recursion |
13:19:57 | FromGitter | <alehander92> but i wonder what is O(n) about strings except for copying |
13:20:06 | Araq | the copying. |
13:20:10 | FromGitter | <alehander92> yes |
13:20:11 | FromGitter | <alehander92> ok |
13:20:25 | FromGitter | <alehander92> but we can still |
13:20:33 | FromGitter | <alehander92> there are copy ellision |
13:20:47 | FromGitter | <alehander92> a() & "e" |
13:21:11 | FromGitter | <alehander92> and you can e.g. maybe just directly fill the result of `a` into the result of the expression |
13:21:17 | FromGitter | <alehander92> but i guess this is not general enough |
13:21:48 | Araq | well that's what I said, to "fill the result directly" you switch over to 'result: var string' |
13:22:13 | Araq | different coding style. to be applied to over 4000 lines of code, enjoy |
13:22:13 | FromGitter | <alehander92> ah but what i imagined was that |
13:22:19 | FromGitter | <alehander92> you can do it automatically |
13:22:30 | FromGitter | <alehander92> like, |
13:22:37 | FromGitter | <alehander92> the function returns string |
13:22:38 | Zevv | sealmove: to get rid of your globals, read https://github.com/zevv/npeg#generic-pegs-and-passing-state |
13:22:56 | FromGitter | <alehander92> and the compiler auto-passes the target expression as var result if |
13:23:02 | FromGitter | <alehander92> this would be ok |
13:23:07 | * | Araq sighs |
13:23:45 | Araq | the return value doesn't have append semantics |
13:24:00 | Araq | the transformation is hard |
13:24:00 | FromGitter | <alehander92> well you know what i mean is it called rvo |
13:24:32 | Araq | no it's not "rvo", you call it this way because everything in your head is conflated into a soup |
13:24:33 | FromGitter | <alehander92> but if you have a() & b() the compiler can do |
13:24:45 | * | uu91 quit (Read error: Connection reset by peer) |
13:25:03 | * | uu91 joined #nim |
13:25:18 | FromGitter | <alehander92> expression : string ⏎ a(pass expression) ⏎ b(pass expression from last index) etc |
13:25:45 | FromGitter | <alehander92> its more like string slices ok |
13:25:57 | FromGitter | <alehander92> yeah i completely agree about the soup, thats why i am asking |
13:26:32 | Araq | no it's not "like string slices" either, string construction has nothing to do with slicing which is about cheap read-only views into the string's insides |
13:26:41 | FromGitter | <alehander92> but what i mean is |
13:26:52 | FromGitter | <alehander92> you pass a writeable slice of the string to b |
13:27:06 | FromGitter | <alehander92> so it still fills it in the usual way |
13:27:10 | FromGitter | <alehander92> without it needing to know of append |
13:27:39 | Araq | so ... it's a more abstract string which supports easier appends. |
13:27:45 | Araq | like a rope? |
13:28:08 | FromGitter | <alehander92> well its not a tree |
13:28:31 | FromGitter | <alehander92> so its linear in memory |
13:29:08 | Araq | anyway, to make it short: it's hard when you consider all the details and it looks easy when you take the shortcuts and avoid thinking about the details. as usual. |
13:29:16 | FromGitter | <alehander92> i know that |
13:29:20 | FromGitter | <alehander92> but maybe then a Rope with different underlying implementation |
13:29:35 | FromGitter | <alehander92> which doesnt allocate so much/uses indexes instead of ptr |
13:29:38 | FromGitter | <alehander92> (ref) |
13:29:46 | FromGitter | <alehander92> might be ok |
13:30:10 | clyybber | what differntiates and index from a ptr?? |
13:30:34 | clyybber | And index is just a ptr + the root |
13:30:35 | FromDiscord_ | <mratsim> an index is relative a pointer is absolute |
13:31:04 | FromGitter | <alehander92> well my point was more to not use `ref` and the heap so much |
13:31:06 | Araq | alehander42: that kind of works when your ropes API is not all about "immutable" stuff and "easy sharing" |
13:31:13 | FromGitter | <alehander92> like not in such nonlinear way |
13:31:21 | Araq | but our ropes are hardcore FP |
13:31:26 | FromGitter | <alehander92> use the heap more linearly* |
13:31:36 | Araq | and implementation changes will be reflected in the API |
13:31:41 | Araq | or result in subtle bugs |
13:32:09 | FromDiscord_ | <mratsim> FP requires excellent memory management / garbage collector. Though apparently it enables different garbage collection strategy (software transactional memory in Haskell) |
13:32:12 | FromGitter | <alehander92> how does rope exposes sharing |
13:32:14 | * | solitudesf quit (Quit: Leaving) |
13:32:19 | FromGitter | <alehander92> it should be impl detail imo |
13:32:28 | FromGitter | <alehander92> but yeah you can pass ropes |
13:32:30 | FromGitter | <alehander92> which are the same nvm |
13:32:42 | Araq | and to make things worse: once you did that the codegen is still wrong |
13:32:57 | Araq | as it should produce a C/Nim AST anyway, not strings |
13:33:26 | FromGitter | <alehander92> yeah that doesnt seem so hard |
13:33:41 | Araq | it's lipstick on a pig, ropes and strings in general are the wrong idea for Nim's codegen |
13:33:50 | FromGitter | <alehander92> but i admit obviously as a person who tried to do that with jsgen: it seems to be not hard, but its just much work |
13:33:58 | FromGitter | <alehander92> one needs 1-2 weeks probably |
13:34:18 | Araq | want to optimize '&*x' to 'x'? good luck, you can't, it ended up in a rope |
13:34:32 | FromGitter | <alehander92> ok, but what would you use for the final C ast -> code gen |
13:34:58 | Araq | for the final step a simple stream will do |
13:35:08 | FromGitter | <alehander92> i wonder if C ast is the best repr or maybe some kind of low lever three address IR |
13:35:10 | Araq | you walk the tree and output to a stream directly |
13:35:11 | clyybber | Compile to GENERIC directly |
13:35:16 | FromGitter | <alehander92> as maybe the second one can be reused to llvm etc |
13:36:17 | FromGitter | <alehander92> ok |
13:36:24 | FromDiscord_ | <mratsim> C is not the best repr but, you usually don't have to worry about the backend |
13:36:35 | FromDiscord_ | <mratsim> though I manage to trigger a GCC bugs on wednesday |
13:36:39 | FromGitter | <alehander92> well many possible ideas, i still want to see parallel incremental nim one day too |
13:37:31 | FromGitter | <alehander92> mratsim yeah clang |
13:37:41 | FromGitter | <alehander92> and gcc are most popular, right? |
13:38:11 | FromGitter | <alehander92> which one do you prefer |
13:38:17 | Araq | same stuff with LLVM, in the end you do stream into a more linear representation but it helps if it's not an untyped string |
13:39:21 | Araq | mratsim: https://github.com/nim-lang/Nim/issues/12722 |
13:39:22 | disbot | ➥ Sink regression on devel: cannot compile the generated C code anymore @11mratsim; snippet at https://play.nim-lang.org/#ix=22P4 😏 |
13:41:21 | FromGitter | <alehander92> Araq yes |
13:41:45 | FromDiscord_ | <mratsim> yeah I know, but I wanted to finish my fight against multithreading and memory bugs |
13:42:07 | FromDiscord_ | <mratsim> I would love to set breakpoints in VS code |
13:43:19 | * | solitudesf joined #nim |
13:47:16 | Araq | alehander92: there is a different way to optimize ropes though, you can introduce special pattern rope kinds |
13:47:30 | Araq | like $#($#, $#, $#) |
13:47:40 | Araq | then you save the '(' and ',' tokens |
13:47:56 | Araq | and C function calls take up less memory |
13:48:16 | FromGitter | <alehander92> but what is the bottleneck with ropes currently |
13:48:23 | Araq | do the same for dot expressions and [] expression and assignments and you cover 80-90% of the produced code |
13:48:27 | FromGitter | <alehander92> is it that the gc cant clean them up well? |
13:48:34 | FromGitter | <alehander92> or just many pointers |
13:48:45 | Araq | many many allocations |
13:49:03 | Araq | the GC can clean up but a GC cycle is not free |
13:49:51 | PMunch | Hmm, what is the right way to specify GetLastError for a cimport. My code work fine on x86_64, but when trying to cross-compile to 32 bit I get this error: http://ix.io/2376 |
13:50:35 | Araq | PMunch, give your importc the right calling convention, 'stdcall' |
13:50:52 | Araq | and maybe you also want to use 'nodecl' or 'header' |
13:52:06 | FromGitter | <alehander92> Araq |
13:52:49 | FromGitter | <alehander92> that sounds smart yeah i am not sure if i get it but i imagine you can just directly input all the args in one rope "object" instead of many subnodes |
13:53:15 | FromGitter | <alehander92> but ugh yeah sharing |
13:53:37 | FromGitter | <alehander92> but does the compiler expect that if you pass a rope `a` somewhere |
13:53:38 | FromGitter | <alehander92> and change it |
13:54:01 | FromGitter | <alehander92> all the rope "consumers" of it should be also changed |
13:54:32 | PMunch | Ah thanks Araq, that worked |
13:54:33 | FromGitter | <alehander92> isn't it kinda ok to just fix those cases and still introduce a linear non-sharing impl |
13:54:43 | FromGitter | <alehander92> 1) expect info from the test suite |
13:55:39 | FromDiscord_ | <mratsim> @Araq, I'm not sure I will be able to get a minimal example. Seemingly unrelated changes (no change on the type, on the proc, or even in the file they are living in) in some of my latest commits made the problem disappear. |
13:55:39 | FromDiscord_ | <mratsim> |
13:55:39 | FromDiscord_ | <mratsim> I'm dropping it lower priority, I expect someone will hit it again at one point. |
13:56:08 | Araq | ok, well I'm working on more destructor bugfixes anyway |
13:56:20 | Araq | and maybe you triggered: |
13:56:33 | Araq | https://github.com/nim-lang/Nim/pull/12770 |
13:56:34 | disbot | ➥ fixes #12766 @11Araq |
13:56:53 | Araq | thinking about it, it looks like this is your bug too? |
13:57:03 | Araq | wild sharing because of proc inlining |
13:59:26 | FromDiscord_ | <mratsim> heh yes good catch |
13:59:37 | FromDiscord_ | <mratsim> removing inline removed the bug |
14:00:02 | FromDiscord_ | <mratsim> but I didn't change them in my latest commit |
14:01:10 | FromDiscord_ | <mratsim> I'll test with the PR |
14:02:58 | * | solitudesf quit (Remote host closed the connection) |
14:03:57 | FromDiscord_ | <mratsim> yes the PR fixes my bug as well |
14:04:02 | * | solitudesf joined #nim |
14:06:42 | clyybber | Araq: Huh, good job catching that bug |
14:16:08 | * | tane joined #nim |
14:17:03 | * | nsf joined #nim |
14:19:59 | disruptek | shashlick: #12768 looks perfect to me. nice job. 👍 |
14:20:00 | disbot | https://github.com/nim-lang/Nim/pull/12768 -- 6Fix #12767 @11genotrance |
14:22:37 | * | thomasross quit (Ping timeout: 240 seconds) |
14:25:04 | FromDiscord_ | <mratsim> Traitor spotted: https://github.com/narimiran/AdventOfCode2019 |
14:25:14 | narimiran | :P |
14:25:30 | Zevv | there you go narimiran, told you so! |
14:25:42 | Zevv | "traitor", that's how it begins |
14:25:53 | narimiran | Zevv: be quiet there! |
14:26:15 | Zevv | welcome to hotel california |
14:26:39 | disruptek | !repo disruptek/bump |
14:26:40 | disbot | https://github.com/disruptek/bump -- 11a tiny tool to bump nimble versions 8 4⭐15 0🍴 |
14:27:03 | tane | narimiran, did you settle for `core`? |
14:27:32 | narimiran | tane: i'll be using ocaml's stdlib + containers, if that's what you're asking |
14:27:38 | tane | yep |
14:27:42 | tane | containers is good too |
14:28:01 | tane | the `gen` package too |
14:28:04 | narimiran | i like it very much as it doesn't hijack stdlib like janestreet stuff does |
14:28:11 | * | Vladar quit (Quit: Leaving) |
14:28:32 | tane | well, I'd `open Containers` too |
14:28:52 | narimiran | (should we go to offtopic/private?) |
14:29:00 | FromDiscord_ | <Rika> yes |
14:29:16 | tane | is there an OT channel? |
14:29:24 | narimiran | yeah, #nim-offtopic |
14:29:27 | narimiran | see you there :) |
14:30:22 | PMunch | That being said it is normally fine to be off-topic here, as long as no-one wants to talk on topic |
14:49:40 | * | Hideki_ joined #nim |
14:53:08 | * | PMunch quit (Quit: Leaving) |
14:55:04 | * | ng0_ joined #nim |
14:57:40 | * | ng0 quit (Ping timeout: 260 seconds) |
15:09:29 | * | dddddd joined #nim |
15:11:58 | * | ng0_ is now known as ng0 |
15:13:37 | FromDiscord_ | <Bub_Lite_63_Jr> Is there a different command for updating Nim than the normal install command? I read that Nim 1.0.4 is out, but using the normal install command doesn't seem to update my Nim from version 1.0.2 |
15:13:43 | FromDiscord_ | <Bub_Lite_63_Jr> ``` |
15:13:43 | FromDiscord_ | <Bub_Lite_63_Jr> curl https://nim-lang.org/choosenim/init.sh -sSf | sh |
15:13:43 | FromDiscord_ | <Bub_Lite_63_Jr> ``` |
15:19:46 | FromDiscord_ | <Rika> @Bub_Lite_63_Jr `choosenim update stable` |
15:21:16 | * | Kaivo quit (Quit: WeeChat 2.6) |
15:21:36 | * | Kaivo joined #nim |
15:24:16 | * | MarquisdeFalbala joined #nim |
15:26:15 | FromGitter | <deech> Am I correct in conceptualizing `mixin` a simple dynamically scoped value? |
15:26:18 | FromDiscord_ | <Bub_Lite_63_Jr> Thank you @Rika ! I will give it a shot. |
15:26:25 | FromDiscord_ | <Bub_Lite_63_Jr> Seems to be working! |
15:27:23 | Araq | deech: it's comparable but the "dynamic" has nothing to do with "at runtime" |
15:28:19 | FromDiscord_ | <Bub_Lite_63_Jr> Thank you! |
15:28:40 | FromGitter | <deech> Araq, right I meant more like https://en.wikipedia.org/wiki/Scope_(computer_science)#Dynamic_scoping |
15:31:03 | narimiran | Bub_Lite_63_jr where did you read that nim 1.0.4 is out, that didn't also state how to update? |
15:39:05 | * | uu91 quit (Read error: Connection reset by peer) |
15:39:20 | * | uu91 joined #nim |
15:43:55 | disruptek | the problem with package managers modifying a git-tracked nim.cfg willy-nilly is that now lockfiles cannot distinguish between meaningful changes to the repo. |
15:44:46 | disruptek | i guess i can parse a diff, but... ugh. |
15:45:59 | disruptek | maybe we just create our own branch for each lock. |
15:47:19 | Araq | well we don't have lockfiles yet |
15:47:22 | disruptek | this feels like the right solution. anyone have a thought? |
15:47:48 | Araq | maybe you argue for *not* submitting the nim.cfg to the git repo |
15:47:49 | disruptek | i'll have them by the end of the day. 😉 |
15:48:14 | Araq | and yeah you're onto something here |
15:48:42 | Araq | maybe like this: |
15:48:55 | FromDiscord_ | <Rika> @Bub_Lite_63_Jr, someone mentioned you above |
15:49:12 | Araq | the nim.cfg contains a new @include "nimblepaths.cfg" |
15:49:20 | Araq | and nimblepaths is never checked in |
15:49:35 | Araq | and if the file doesn't exist @include doesn't complain either |
15:49:42 | disruptek | is @include a thing? |
15:49:50 | Araq | and then these --paths can also simply be absolute paths |
15:50:09 | Araq | and then your PM can ignore the upcoming nimble "modecfg" |
15:50:22 | Araq | disruptek, no but we could add it |
15:50:26 | disruptek | oh believe me, i'm already ignoring it quite happily. |
15:50:31 | disruptek | have you tried nimph? |
15:52:14 | Araq | no, sorry, I'm busy with Nim core development |
15:52:33 | clyybber | Araq: How does the new fix on your PR work? |
15:52:47 | Araq | clyybber, link? |
15:52:47 | shashlick | This same $nimbleDir thing can be used for lock files |
15:53:08 | clyybber | Araq: https://github.com/nim-lang/Nim/pull/12770/commits/b1df02b245af7df0ff877916487867a1a0c5bff0 |
15:53:09 | disbot | ➥ fixes #12766 @11Araq |
15:53:17 | shashlick | Already you are telling Nim the exact version of a package |
15:53:49 | Araq | shashlick, most of us don't enjoy commit hashes in nim.cfg files though so lockfiles should be separate |
15:53:54 | shashlick | What remains is for Nimble to create a new lock file to track the exact versions to download and install |
15:54:08 | Araq | but please think about my @include idea |
15:54:09 | * | Romanson quit (Quit: Connection closed for inactivity) |
15:54:14 | shashlick | Ya we've laid that idea to rest |
15:54:26 | Araq | it does give us lockfiles as a side effect? |
15:54:45 | disruptek | no, it's just a better way to scope site changes. |
15:54:48 | disruptek | call it site.cfg. |
15:54:50 | Araq | anyhow, shashlick, I don't like that --path:$nimblepath/foobar is a gamble when you have 2 nimblepaths |
15:54:59 | disruptek | exactly. |
15:55:13 | Araq | and I'm sorry that I didn't understand it before |
15:55:20 | shashlick | When you want lock files, you no longer want any lazy path stuff |
15:55:26 | Araq | but the idea is that Nimble tells Nim *precisely* the paths |
15:55:31 | disruptek | and if you have 6 nimblePaths, which you might if you're using 6 distributions, you have 6 new --path statements which point into 6 distributions where new versions could appear. |
15:55:37 | shashlick | Which means clean nimble path and one nimble path |
15:55:37 | disruptek | it's nonsensical. |
15:55:50 | Araq | and so we must not guess in the compiler |
15:55:55 | Araq | which means absolute dirs |
15:56:14 | Araq | which then cannot checked in but so what, you gotta die one death |
15:56:20 | disruptek | yep. |
15:56:40 | disruptek | i only calculate the best substitution for check-in reasons; this would let me remove that. |
15:56:43 | shashlick | There isn't any guessing when there's only one nimble path |
15:56:59 | disruptek | only one nimblePath is silly. |
15:57:21 | Araq | yeah but we do support multiple nimble paths |
15:57:21 | disruptek | but, you can impl your pm that way if you want. 🤷 |
15:57:25 | shashlick | So you are saying that lock files and lazy paths should coexist |
15:57:32 | disruptek | of course. |
15:57:36 | shashlick | What sense does that make |
15:57:48 | disruptek | they provide two completely different features. |
15:58:17 | Araq | clyybber, we missed a[dependentVarHere] in the dfa :-( |
15:58:32 | Araq | there are more bugs like the fact that we "move" integer variables around |
15:58:47 | Araq | but if we do that, we can at least do it right :P |
16:00:22 | disruptek | also, having site.cfg would let us evaluate only one project-level config which helps my overlay use for interpreting the env of dependencies. |
16:01:05 | disruptek | i'd be able to trust that a dependency nim.cfg was only going to affect the local dep itself. |
16:01:49 | disruptek | so it shouldn't be an include. it'll just be something that the pm implements. |
16:02:00 | Araq | @include can also simplify the nim.cfg logic inside the compiler. we only evaluate project.nim.cfg or $compiler/config/nim.cfg |
16:02:19 | Araq | and inside project.nim.cfg you have to include the default config if you need it |
16:02:33 | Araq | no more --skipProjectCfg command line options |
16:02:42 | disruptek | does project.nim.cfg have a special role? |
16:03:00 | Araq | well it gets picked up when you do 'nim c project.nim' |
16:03:49 | disruptek | we can't just impl this in pm because i want the compiler to read the same env. so, there's that. |
16:03:54 | disruptek | but i'm not sure about @include yet. |
16:04:28 | * | tklohna quit (Ping timeout: 245 seconds) |
16:06:54 | disruptek | --outdir should get pathSub'd. |
16:07:11 | Araq | what's frustrating to me personally is that everything we end up with is more complex than what I simply do manually |
16:07:24 | disruptek | hence nimph. |
16:07:50 | Araq | which is a projects/ directory and then I can access dep A from module B via ../A/foo.nim |
16:08:50 | Araq | much of the complexity seems to come from pretending "what if X is not in ../X" |
16:09:26 | Araq | but instead of simply enforcing this we come up with different, more complex rules |
16:09:37 | disruptek | do you want me to screencast some nimph gynastics so you can watch it work? |
16:09:45 | disruptek | gymnastics, too |
16:10:24 | Araq | actually I was about to live code some solution for PMunch |
16:10:48 | Araq | so that let x {.codegenDecl.} = [1, 2, 3] produces C code that isn't stupid |
16:19:33 | * | solitudesf- joined #nim |
16:19:46 | Zevv | \o/ |
16:20:43 | * | solitudesf quit (Ping timeout: 245 seconds) |
16:20:51 | Zevv | I do not understand azure output. My job is failed and yet it says "Hooray there are no test failures" |
16:21:52 | * | tyler569 joined #nim |
16:22:04 | narimiran | Zevv: azure knows it is friday, so you can freely relax cause "there are no test failures" |
16:22:32 | Zevv | yeah, but in our country, if you break the build, you stay late |
16:22:37 | Zevv | and that's not something you want on a friday |
16:22:49 | narimiran | we're not in your country |
16:28:36 | * | clyybber quit (Quit: WeeChat 2.6) |
16:32:34 | * | thomasross joined #nim |
16:36:49 | * | nsf quit (Quit: WeeChat 2.6) |
16:41:00 | * | letto quit (Quit: Konversation terminated!) |
16:43:38 | * | drewr quit (Ping timeout: 245 seconds) |
16:52:33 | * | Jjp137 quit (Read error: Connection reset by peer) |
16:53:03 | * | Jjp137 joined #nim |
17:05:55 | FromGitter | <alehander92> mm |
17:06:10 | FromGitter | <alehander92> zevv hope you fixed it |
17:07:17 | * | LargeEpsilon quit (Ping timeout: 246 seconds) |
17:18:17 | * | disruptek_ joined #nim |
17:18:59 | * | disbot_ joined #nim |
17:19:03 | * | disruptek quit (Ping timeout: 245 seconds) |
17:19:09 | * | disruptek_ is now known as disruptek |
17:20:20 | * | disbot quit (Ping timeout: 276 seconds) |
17:21:17 | * | disbot_ is now known as disbot |
17:22:22 | * | njoseph quit (Ping timeout: 265 seconds) |
17:25:02 | * | tane quit (Quit: Leaving) |
17:30:39 | Zevv | fixed what? |
17:31:57 | FromGitter | <alehander92> the build |
17:32:21 | FromGitter | <alehander92> ooh you're already on the road riding a huge bike right |
17:32:38 | FromGitter | <alehander92> sorry, couldnt imagine more stereotypical dutch friday evening thing |
17:33:00 | Zevv | no I'm having lasagna and wine |
17:33:06 | Zevv | very italian and french |
17:33:15 | Zevv | oh the cheese is swiss I just noticed |
17:33:44 | FromGitter | <alehander92> nicee |
17:33:45 | Zevv | about the build: I have no clue. narimiran sais its ok, it's just azure whining |
17:33:58 | FromGitter | <alehander92> ah i thoughts its work related |
17:34:13 | FromGitter | <alehander92> you should try musaka, its like the balkan lasagna |
17:34:32 | narimiran | mmm, musaka is great! |
17:34:42 | FromGitter | <Willyboar> miam, miam |
17:34:44 | FromGitter | <alehander92> i wondered if narimiran would know it |
17:34:54 | FromGitter | <alehander92> i thought croatia might have become very western |
17:34:56 | FromGitter | <alehander92> :P |
17:35:02 | narimiran | yep, we have it and we call it the same |
17:35:25 | FromGitter | <alehander92> i still like the cabbage foods even more |
17:35:40 | narimiran | well, i live near italy so we have italian cuisine, but we also have balkan stuff here too |
17:36:02 | FromGitter | <alehander92> sour cabbage* |
17:36:22 | FromGitter | <alehander92> nice |
17:36:37 | FromGitter | <alehander92> i imagine the burek family of foods etc are there |
17:36:48 | narimiran | sour cabbage — i'm not a fan of it, but it is one of the favourite foods of my girlfriend |
17:37:23 | FromGitter | <Willyboar> μουσακάς/mousaka is my favourite food |
17:38:04 | * | MarquisdeFalbala quit (Remote host closed the connection) |
17:38:09 | narimiran | Zevv: now, on a serious note, if you go to azure logs and clik on the "Run CI . Failed" task you will see the log there |
17:38:25 | narimiran | Zevv: `compiler/vmdef.nim(45, 15) Error: unhandled exception: value out of range` |
17:39:10 | FromGitter | <alehander92> @Willyboar you were from greece |
17:39:12 | * | rockcavera quit (Remote host closed the connection) |
17:39:13 | FromGitter | <Willyboar> @alehander92 maybe you have tried and https://en.wikipedia.org/wiki/Pastitsio |
17:39:20 | FromGitter | <alehander92> yeah, i like your food a lot |
17:39:41 | FromGitter | <alehander92> i think maybe, it sounds relevant but not sure |
17:39:51 | FromGitter | <alehander92> but i have to ask you this: my parents got me this jam of |
17:40:30 | FromGitter | <alehander92> um, walnuts |
17:40:49 | FromGitter | <alehander92> from greece, and its nice but sounds strange, do you guys have a lot of nutbased jams |
17:46:28 | disruptek | shashlick: i'd rather not have docs if the alternative is to be unable to parse nimgit2.nimble via nimscript without determining its requirements first. |
17:46:37 | disruptek | chicken and egg. |
17:48:32 | * | Trustable quit (Remote host closed the connection) |
17:51:04 | shashlick | I understand, we need a better was to do that |
17:51:24 | shashlick | But is it failing in the compiler Nim config parser? |
17:51:47 | shashlick | Why is that gorge not working as expected? |
17:51:59 | disruptek | not the config parser, but in `nim e`. |
17:52:11 | shashlick | Because the nimble command isn't aware of the nimbledir in use? |
17:52:27 | disruptek | it fails because i haven't installed nimterop yet. |
17:52:35 | Zevv | narimiran: sure, thats the 32 bit version and that one I expected |
17:52:38 | Zevv | but all the others? |
17:52:46 | shashlick | Is nimterop installed on your user nimble dir? |
17:52:58 | narimiran | i've seen that one in 64-bit CI, iirc |
17:53:03 | disruptek | even if i specify it as a dependency, unless my dependencies are ordered, i won't necessarily install nimterop first. |
17:53:48 | disruptek | once i clone nimterop, it works fine of course. |
17:54:05 | shashlick | Ya that's why it checks if it is installed, if not, it shouldn't import nimterop docs |
17:54:17 | disruptek | i'm trying to track down a weird path problem that i can only repro in a proj with lotsa deps. so i keep running into this. |
17:54:26 | shashlick | Are you setting nimble dir in the cfg |
17:54:45 | disruptek | i pass it to nimble and i set it in the $env. |
17:56:01 | disruptek | the problem is that your call to nimble finds nimterop (because it doesn't look at the env? or it's cumulative?) but nimscript doesn't. |
17:57:01 | disruptek | i guess it's time to finally nuke .nimble. |
18:03:20 | * | nsf joined #nim |
18:04:12 | disruptek | if nimble cannot create ~/.nimble/pkgs, it crashes. 🙄 |
18:07:08 | disruptek | `mkdir -p ~/.nimble/pkgs; chmod 0 ~/.nimble/pkgs; chmod 100 ~/.nimble` seems to work for `dump`, at least. |
18:10:50 | disruptek | wow, that magically fixed my duplicate lazyPaths issue, too. |
18:11:21 | FromGitter | <alehander92> wow this almost convinced me that go error handling is good |
18:11:32 | FromGitter | <alehander92> for small cli tools |
18:12:25 | FromGitter | <alehander92> but yeah raise tags still should be similar as ergonomics |
18:13:40 | disruptek | problem is that they don't work. |
18:19:46 | FromGitter | <alehander92> i thought they do |
18:20:03 | disruptek | nah. |
18:20:06 | FromGitter | <alehander92> my assumption was that without many stdlib annotations, they might not be so useful |
18:20:10 | FromGitter | <alehander92> but maybe i forgot how it works |
18:20:29 | FromGitter | <alehander92> i think i did use them |
18:20:35 | FromGitter | <alehander92> so you mean they dont work well |
18:20:36 | FromGitter | <alehander92> ? |
18:21:06 | disruptek | well, there are a few corner cases (that i don't recall off the top of my head) where they don't work in normal code. |
18:21:13 | disruptek | they don't work properly in async code. |
18:21:30 | disruptek | ergo, they don't work well enough. no exception handling does, imo. |
18:21:45 | disruptek | so i almost never catch exceptions. |
18:22:26 | * | letto joined #nim |
18:27:10 | * | njoseph joined #nim |
18:28:59 | FromGitter | <zacharycarter> hrm - I guess nimterop throws up on unions? |
18:30:15 | FromGitter | <zacharycarter> I really want to love and use nimterop - but any time I stumble across an issue like this, I end up having to re-define every type is referenced in the problem type |
18:30:24 | FromGitter | <zacharycarter> so like type a has type b in it and type b has a problem |
18:30:30 | FromGitter | <zacharycarter> now I have to re-define type a and b |
18:30:35 | * | sagax quit (Ping timeout: 246 seconds) |
18:30:39 | FromGitter | <zacharycarter> and it just makes the whole process not worth it and then I go back to c2nim |
18:31:24 | * | sagax joined #nim |
18:34:13 | * | sagax quit (Client Quit) |
18:34:42 | Zevv | sealmove: this PR might prove tricky to get through |
18:36:17 | sealmove | seems so, but can't complain, we are trying to tweak an important component of the compiler |
18:37:05 | sealmove | i still think fine-grained control through cli or nim cfg is a good idea... |
18:37:15 | sealmove | with a good default of course |
18:44:38 | lqdev[m] | @zacharycarter not anymore, that's a thing of the past |
18:44:54 | Zevv | sealmove: could you answer krux02s last remark about VM exhaustion still happening with devel |
18:44:59 | lqdev[m] | shashlick has relatively recently added a patch that fixes thi |
18:45:03 | lqdev[m] | s/thi/this/ |
18:45:51 | FromGitter | <zacharycarter> ah |
18:45:56 | Zevv | and maybe we should split stuff up. First make a PR with refactoring but keeping all the sizes the same |
18:46:40 | sealmove | Zevv: ok sure, I will. Give me a couple of hours because I must finish something else first. |
18:46:52 | Zevv | oh no hurries |
18:56:33 | * | dwdv joined #nim |
18:59:03 | * | narimiran quit (Ping timeout: 245 seconds) |
19:00:22 | lbart | Hi, |
19:00:22 | lbart | New with nim. I read a lot about this language and I like it. My subjects of interest are math, geometry, GIS, CAD. |
19:00:22 | lbart | User and maintainer on FreeBSD , I'll try to port some software with nim to this system. |
19:00:22 | lbart | You may see me soon for questions or improvements for BSD :) |
19:00:22 | lbart | euantor if I'm not wrong you test nim on FreeBSD and OpenBSD? |
19:00:32 | * | adeohluwa joined #nim |
19:00:54 | Araq | hi lbart, welcome |
19:01:03 | euantor | lbart: Correct, I have a currently open PR to add CI support for both too |
19:01:15 | euantor | The FreeBSD CI currently passes, the OpenBSD one does not |
19:01:36 | euantor | But I hope to eventually get time to fix up the stdlib on OpenBSD and get it passing there too |
19:01:49 | Araq | euantor, ping me when it's ready, I keep forgetting about most PRs and PR-friday only allows to catch up a little bit |
19:02:02 | euantor | Araq: https://github.com/nim-lang/Nim/pull/12179 |
19:02:03 | disbot | ➥ #12103 - CI for FreeBSD @11euantorano |
19:02:11 | Araq | is it ready? |
19:02:19 | euantor | FreeBSD CI is ready, the failures on it are on all other platforms except FreeBSD |
19:02:40 | euantor | Most recent build is here: https://builds.sr.ht/~araq/job/112890 |
19:03:28 | euantor | oops, looks like a conflict since I last tested. I'll fix that up right now |
19:03:40 | Araq | so ... should I merge it or not? |
19:04:21 | euantor | You won't be able to right now, but once I push this commit in 1 second you can :D |
19:08:11 | euantor | Ok, it's running now. Just got to wait to ensure it passes still and hasn't broken since my last test |
19:11:36 | * | adeohluwa quit (Remote host closed the connection) |
19:11:52 | * | adeohluwa joined #nim |
19:17:06 | * | Ven`` joined #nim |
19:18:29 | * | Ven`` quit (Client Quit) |
19:29:34 | lbart | thanks |
19:34:27 | * | uu91 quit (Ping timeout: 250 seconds) |
19:35:13 | * | uu91 joined #nim |
19:40:15 | * | rayman22201 quit (Quit: Connection closed for inactivity) |
19:46:45 | disruptek | shashlick: i made a mistake. i wasn't running `dump` with $NIMBLE_DIR set. |
19:49:25 | disruptek | seems like it works fine. just another disruptek screwup. 😁 |
19:55:05 | * | Ven`` joined #nim |
19:57:20 | euantor | Araq: Ready to merge https://github.com/nim-lang/Nim/pull/12179 - all checks are passing |
19:57:21 | disbot | ➥ #12103 - CI for FreeBSD @11euantorano |
19:58:45 | Araq | .builds/freebsd.yml ? does this dot file crap ever end? |
19:59:13 | euantor | unfortunately not |
20:00:11 | disruptek | just make a symlink to it so you remember it exists. |
20:00:14 | euantor | You can submit builds via the API too, but for the GitHub integration they have to be in the .builds folder |
20:01:14 | Araq | merged it |
20:01:32 | Araq | now every other CI needs to support the .builds/ directory, so nice |
20:01:52 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:01:59 | euantor | thanks, closed a few issues with it |
20:02:41 | euantor | builds.sr.ht supports a variety of Lines too, and OpenBSD. The OpenBSD CI uses the same service |
20:26:23 | * | adeohluwa quit (Remote host closed the connection) |
20:35:08 | * | tane joined #nim |
20:42:30 | * | zyklon joined #nim |
20:43:47 | * | uvegbot quit (Ping timeout: 250 seconds) |
20:44:31 | lbart | Araq: euantor FYI I added nim on https://wiki.freebsd.org/3rdPartySoftwareCI |
20:51:00 | * | thomasross_ joined #nim |
20:51:00 | * | thomasross quit (Killed (wolfe.freenode.net (Nickname regained by services))) |
20:51:00 | * | thomasross_ is now known as thomasross |
20:51:30 | * | rayman22201 joined #nim |
20:56:22 | * | thomasross quit (Ping timeout: 250 seconds) |
21:02:10 | shashlick | @zacharycarter ya cOverride is smarter now, thanks @lqdev |
21:02:30 | * | NimBot joined #nim |
21:02:35 | shashlick | Unions are supported |
21:02:57 | shashlick | @disruptek on good to know, but let me know if you do see other issues |
21:03:14 | shashlick | Seems like nimble should also parse the environment like nimph does |
21:03:14 | disruptek | so many issues. |
21:04:16 | * | thomasross joined #nim |
21:16:26 | * | adeohluwa joined #nim |
21:28:42 | Zevv | it's like my life |
21:29:41 | disruptek | i was gonna do lockfiles today but i'm mired in some nim.cfg bug. |
21:31:12 | * | narimiran joined #nim |
21:31:21 | disruptek | just can't escape .nimble/pkgs no matter what i do. |
21:32:37 | * | adeohluwa quit (Ping timeout: 240 seconds) |
21:40:37 | * | nsf quit (Quit: WeeChat 2.6) |
21:42:03 | * | sagax joined #nim |
21:42:52 | * | Ven`` joined #nim |
21:52:17 | * | nif quit (Quit: ...) |
21:52:27 | * | nif joined #nim |
21:53:24 | shashlick | Always standing on someone's shoulders |
21:57:18 | disruptek | beats kneeling at their feet. |
22:00:20 | disruptek | all hail the mighty stacktrace. |
22:04:23 | * | narimiran quit (Ping timeout: 276 seconds) |
22:14:10 | sealmove | Zevv: do all registers have to fit in 16bit in order to make TInstr [0 .. 2^16] ? |
22:22:20 | disruptek | nah, we'll just have a bucket to catch any that overflow. |
22:26:52 | sealmove | disruptek: I see, makes sense |
22:26:58 | sealmove | buckets work nicely |
22:28:16 | sealmove | Zevv: sorry I didn't phrase it correctly. Can we keep a register 8bit and still make TInst [0 .. 2^16]? |
22:28:29 | * | sealmove quit (Quit: WeeChat 2.6) |
22:36:17 | * | MarquisdeFalbala joined #nim |
22:37:32 | * | solitudesf- quit (Ping timeout: 276 seconds) |
22:38:59 | FromDiscord_ | <exelotl> wrote a cheeky nim script at work today |
22:42:26 | FromDiscord_ | <exelotl> just needed a tool to remove some fields from certain json files. I gave docopt a try for specifying the arguments and holy crap it's nice |
22:42:43 | FromDiscord_ | <exelotl> super impressive stuff |
22:43:09 | disruptek | docopt? |
22:43:18 | disruptek | !repo docopt |
22:43:19 | disbot | https://github.com/docopt/docopt.nim -- 11Command line arguments parser that will make you smile (port of docopt to Nim) 8 131⭐15 16🍴 7& 1 more... |
22:43:56 | disruptek | how does it compare to cligen? any idea? |
22:48:28 | krux02 | sealmove: do you have a link to you npeg so I can reproduce the register overuse? |
22:49:56 | krux02 | Sorry for my words on github. I would like to reproduce the problem first and see if there isn't a trivial fix in npeg before we start to change the vm which will have an impact on everybody (potentionally a bad one) |
22:51:25 | madprops | is there a way to have a proc that receives a list of strings of any size, without having to initialize seqs? |
22:51:31 | madprops | of any number of items* |
22:51:41 | disruptek | linked list. |
22:52:17 | madprops | i just want to be able to send ["asdf", "xcvb"] |
22:52:30 | madprops | but in the proc the array[..] needs to know the length i think |
22:52:52 | disruptek | and why don't you want to use a seq? |
22:53:02 | madprops | because then the user can't simply pass in a list argument |
22:53:06 | madprops | they need to init a seq and fill it |
22:53:19 | disruptek | you mean @["like", "this"]? |
22:53:46 | disruptek | use varargs, i guess. |
22:53:47 | krux02 | madprops: sounds pretty much like ``proc foobar(args: openarray[string]) |
22:55:01 | krux02 | then you call call foobar like this: ``foobar(["asdf", "xcvb", "xvlc", "uiae"])`` |
22:55:14 | madprops | that's cool |
22:58:22 | madprops | can i init empty openarrays? |
22:58:48 | krux02 | what you you mean? |
22:58:58 | krux02 | you mean ``foobar([])``? |
22:59:31 | krux02 | openarray is not a real type like array or seq, it is a special parameter type only. |
22:59:36 | madprops | thing is i have a function wrapper, that sends all arguments to another function |
22:59:43 | madprops | and it receives the same arguments |
22:59:51 | krux02 | example please |
22:59:52 | madprops | all of them have default values |
22:59:57 | madprops | sec |
23:00:13 | krux02 | default value for openarray, never tried it, but why not should work |
23:00:18 | madprops | https://play.nim-lang.org/#ix=1LTW |
23:00:33 | madprops | wtf is that |
23:00:38 | madprops | i didn't paste that lol |
23:00:49 | madprops | bug.. |
23:00:57 | madprops | nvm |
23:01:02 | krux02 | what did you paste? |
23:01:08 | madprops | https://play.nim-lang.org/#ix=1LTW |
23:01:17 | madprops | this is the link the playground gave me |
23:01:19 | madprops | the ix link |
23:01:28 | madprops | but it's showing another paste |
23:02:00 | madprops | https://play.nim-lang.org/#ix=239i this one works |
23:02:10 | madprops | should notify whoever does the playground |
23:04:22 | krux02 | http://ix.io/239j |
23:04:51 | disruptek | looks like it's working to me. |
23:11:05 | madprops | yeah it works now |
23:18:49 | * | tane quit (Quit: Leaving) |
23:28:00 | * | luis_ joined #nim |
23:38:04 | * | MarquisdeFalbala quit (Remote host closed the connection) |
23:41:47 | madprops | is break valid in case statements? |
23:42:32 | * | luis_ quit (Ping timeout: 276 seconds) |
23:42:50 | disruptek | nah. |
23:47:50 | disruptek | you can name your block: and break blocks by name, which i use all the time. |