00:01:48 | FromDiscord | <tinygiant> Can anyone point me at an example of using peg to verify a set of digits (like an ip address), but the number of groups is variable (2-4) and the number of digits in each group is variable (1-3)? Is peg the right way to attempt this? |
00:06:31 | * | a_chou quit (Remote host closed the connection) |
00:06:34 | * | xioren quit (Quit: leaving) |
00:06:51 | * | a_chou joined #nim |
00:12:05 | * | abm quit (Quit: Leaving) |
00:43:54 | * | a_chou quit (Ping timeout: 272 seconds) |
00:46:45 | disruptek | i would verify an ip using a simply split/parseInt but if you're doing really complex stuff, sure, npeg can be nicer to use than regex. |
00:47:06 | disruptek | npeg examples for parsing version strings, which are similar, in nimph. |
00:47:08 | disruptek | !repo nimph |
00:47:09 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future ๐ง 15 84โญ 5๐ด 7& 1 more... |
00:47:21 | disruptek | honestly, the npeg docs are quite good. i would just work from there. |
00:47:31 | disruptek | @tinygiant ^ |
00:50:27 | FromDiscord | <tinygiant> Thanks for the pointer. Very much appreciated. |
00:54:08 | * | a_chou joined #nim |
00:58:55 | * | rockcavera joined #nim |
01:00:16 | * | bung joined #nim |
01:05:40 | FromDiscord | <Avatarfighter> Disruptek ! What is new ๐ |
01:05:47 | disruptek | dafuq |
01:06:13 | disruptek | i am writing shitty compiler code. |
01:06:20 | disruptek | a hack so i can move forward. |
01:06:25 | disruptek | what are you doing? |
01:06:43 | disruptek | i think it's sexy when children masturbate to me on irc. |
01:07:07 | FromDiscord | <Elegant Beef> Disruptek lives another day saying questionable things |
01:07:16 | FromDiscord | <Elegant Beef> Where's this cancel culture i was promised! |
01:07:42 | disruptek | questionable things? |
01:07:46 | disruptek | ๐ค |
01:07:48 | FromDiscord | <Elegant Beef> Not really questionable |
01:09:18 | FromDiscord | <Avatarfighter> I can't believe I just got called a child |
01:09:37 | disruptek | i can't believe you're masturbating to me on irc. |
01:09:53 | FromDiscord | <Avatarfighter> I'm going to need factual evidence on these accusations |
01:09:57 | FromDiscord | <Avatarfighter> for these* |
01:10:09 | disruptek | the evidence will come soon enough. |
01:10:16 | FromDiscord | <Avatarfighter> ๐ |
01:10:24 | FromDiscord | <Elegant Beef> I'm writting some fun nimscript related code, not that anyone asked ๐ |
01:10:30 | FromDiscord | <Avatarfighter> @Elegant Beef how |
01:10:32 | FromDiscord | <Elegant Beef> Both my hands are on my keyboard! |
01:10:35 | FromDiscord | <Avatarfighter> LOL |
01:10:43 | disruptek | hands? |
01:10:46 | disruptek | what a prude. |
01:10:48 | FromDiscord | <Avatarfighter> ikr |
01:10:49 | FromDiscord | <Elegant Beef> What do you mean "how" |
01:10:56 | FromDiscord | <Avatarfighter> imagine not using speech to code smh |
01:11:02 | disruptek | imagine using your hands. |
01:11:08 | FromDiscord | <Elegant Beef> Imagin having a hands |
01:11:09 | FromDiscord | <Avatarfighter> idk I just have had trouble writing nimscript |
01:11:25 | FromDiscord | <Elegant Beef> I mean i'm working on some nim/nimscript interop |
01:11:29 | FromDiscord | <Avatarfighter> ah |
01:11:32 | FromDiscord | <Elegant Beef> So you can call functions from a nimscript file |
01:11:34 | FromDiscord | <Avatarfighter> >:) |
01:11:40 | FromDiscord | <Avatarfighter> Wait that's really cool |
01:11:54 | FromDiscord | <Avatarfighter> Do you have a repo for this ? |
01:12:04 | * | TomDotTom quit (Ping timeout: 260 seconds) |
01:12:30 | FromDiscord | <Elegant Beef> I do but i only started working on it so it's not very cleanly done yet |
01:12:32 | FromDiscord | <Avatarfighter> disruptek: to answer your question im currently ripping apart nim-libp2p for all my crypto needs |
01:12:33 | * | krux02 quit (Remote host closed the connection) |
01:12:36 | FromDiscord | <Elegant Beef> https://github.com/beef331/nimscripter |
01:12:46 | FromDiscord | <Avatarfighter> That's fine it'll prob be cleaner than half my code |
01:13:06 | disruptek | weird. |
01:13:37 | FromDiscord | <Elegant Beef> But hey at the moment it works ๐ https://media.discordapp.net/attachments/371759389889003532/766468855102832680/unknown.png |
01:13:42 | FromDiscord | <Avatarfighter> you're using macros |
01:13:43 | FromDiscord | <Elegant Beef> Even got return types from it |
01:13:47 | FromDiscord | <Avatarfighter> you're a real nimgineer |
01:13:49 | * | a_chou quit (Ping timeout: 260 seconds) |
01:13:55 | disruptek | macros. |
01:13:58 | FromDiscord | <Elegant Beef> I mean i love macros |
01:13:59 | disruptek | fuckin' cheater. |
01:14:02 | FromDiscord | <Elegant Beef> Lol |
01:14:06 | FromDiscord | <Avatarfighter> I'm too afraid to use macros tbh |
01:14:12 | FromDiscord | <Avatarfighter> I can't have that much power in my hands |
01:14:24 | FromDiscord | <Avatarfighter> I can only hold so much when on the irc with disruptek |
01:14:25 | FromDiscord | <Elegant Beef> Dude i even generate functions using macros to then just dump the nodes into the GC, just cause i want the `repr` |
01:14:36 | FromDiscord | <Avatarfighter> ooo |
01:14:42 | FromDiscord | <Avatarfighter> This is really cool ! |
01:14:53 | FromDiscord | <Elegant Beef> Macros are nice, use the macros, become the macoros |
01:15:00 | FromDiscord | <Elegant Beef> macros even |
01:15:20 | FromDiscord | <Avatarfighter> eat macros, breathe macros, be macros |
01:15:36 | FromDiscord | <Avatarfighter> MacrOS |
01:15:39 | FromDiscord | <Elegant Beef> I do have an ok writeup for macros if you want to learn the, but i just whore that out cause i liked it ๐ |
01:15:55 | * | NimBot joined #nim |
01:15:55 | FromDiscord | <Avatarfighter> yeah send the writeup if you don't mind |
01:16:04 | FromDiscord | <Avatarfighter> I love learning new things |
01:16:17 | FromDiscord | <Elegant Beef> I've shared it so many times so i'm totally whoring it our, but i feel shame so it's fine |
01:16:18 | FromDiscord | <Elegant Beef> <https://dev.to/beef331/demystification-of-macros-in-nim-13n8> |
01:16:52 | FromDiscord | <Avatarfighter> this "beef331" fellow must really enjoy macros ๐ |
01:17:17 | FromDiscord | <Avatarfighter> oh wait I've read this lol |
01:17:25 | FromDiscord | <Avatarfighter> I recognize the Python walrus operator |
01:17:38 | FromDiscord | <Elegant Beef> Ah |
01:17:45 | FromDiscord | <Elegant Beef> I did say i've whored it before |
01:18:04 | FromDiscord | <Avatarfighter> smh can't believe Go stole Python's walrus operator ๐ |
01:18:40 | FromDiscord | <Elegant Beef> python's walrus op works differently |
01:19:08 | FromDiscord | <Elegant Beef> Go's is a `var a = b` shortcut whereas python's is `a = b; return a` shortcut |
01:19:12 | FromDiscord | <Avatarfighter> i know lamo |
01:19:18 | FromDiscord | <Avatarfighter> I code in both languages ๐ |
01:19:36 | FromDiscord | <Elegant Beef> Hey based off your usage of the word "Steal"... |
01:19:57 | FromDiscord | <Avatarfighter> ahaha |
01:20:59 | FromDiscord | <Avatarfighter> I'm really interested in your nimscript stuff Beef, lmk when you do something cool and want to share ๐ I'll be ready to share the excitement at how cool it is lo |
01:21:29 | FromDiscord | <Elegant Beef> Well i'm just trying to make nimscript interop easier, not that i'm doing it smart |
01:22:14 | FromDiscord | <Elegant Beef> I'm abusing json to transfer non primitves atm, but should probably use a binary format like disrupteks flat buffer library ๐ |
01:26:03 | FromDiscord | <Avatarfighter> what's his flat buffer library |
01:28:45 | FromDiscord | <Avatarfighter> frosty? |
01:29:06 | FromDiscord | <Elegant Beef> Think so |
01:31:14 | disruptek | transfering where? |
01:31:18 | FromDiscord | <Elegant Beef> And now magically i have nimscript calling nim code with object return values |
01:31:38 | FromDiscord | <Elegant Beef> I'm calling nim code from nimscript and at the moment serializing that to a string using json |
01:31:51 | FromDiscord | <Elegant Beef> But really like i said should be using something not as slow |
01:31:57 | disruptek | hmm, can you use channels? |
01:32:12 | FromDiscord | <Elegant Beef> Well these are function calls |
01:32:15 | disruptek | i wouldn't think so, but i dunno what you're doing. |
01:32:34 | FromDiscord | <Elegant Beef> I'm making a library to make it so one can more easily make their nim code scripted from nimscript |
01:32:54 | * | apahl quit (Ping timeout: 246 seconds) |
01:32:54 | FromDiscord | <Elegant Beef> Add a macro to a function you want to be callable from nimscript, and it is |
01:33:17 | FromDiscord | <Elegant Beef> So this is the nim code https://media.discordapp.net/attachments/371759389889003532/766473806238711838/unknown.png |
01:33:32 | FromDiscord | <Elegant Beef> This is the nimscript https://media.discordapp.net/attachments/371759389889003532/766473868206407690/unknown.png |
01:34:16 | FromDiscord | <Elegant Beef> And you're limited to using primitives in the function calls, so you need to serialize to a format and put it in a string |
01:34:38 | disruptek | why are you limited to primitives? |
01:34:45 | FromDiscord | <Elegant Beef> It's what |
01:34:53 | FromDiscord | <Elegant Beef> (edit) 'It's what ... ' => 'It's whatnim's evaluator is limited to' |
01:34:54 | disruptek | what is it? |
01:35:06 | * | apahl joined #nim |
01:35:35 | disruptek | well, frosty works in the vm afaik. |
01:35:36 | FromDiscord | <Elegant Beef> You can only get/put strings, floats, ints, or bools |
01:36:11 | disruptek | it was really just written as a poc but apparently at least one person actually uses it in production. |
01:36:29 | FromDiscord | <Elegant Beef> This is mostly just the groundwork and proof of concept which i intend to clean the fuck up and use something more sensible for that object transferring since json is dumb as hell for this |
01:36:31 | disruptek | it's supposed to be getting a dose of cps. |
01:36:33 | FromDiscord | <Elegant Beef> But it's quick as hell ๐ |
01:37:55 | * | Tanger joined #nim |
01:38:17 | FromDiscord | <Elegant Beef> Dont tell @impbox but theoretically this mess should allow nico to easily support nimscript for more live editing |
01:39:05 | FromDiscord | <Elegant Beef> *only pinging you since you were interested and it's technically feasible at this very minute* |
01:39:43 | FromDiscord | <impbox> =) yeah, i played around with getting nimscript working in nico, it worked but it was too much work to duplicate the API, but maybe one day, or with a nice macro |
01:40:02 | FromDiscord | <Elegant Beef> Well at the moment like i said my procs all work with a single macro |
01:40:17 | FromDiscord | <Elegant Beef> So we're getting there ๐ |
01:40:29 | FromDiscord | <impbox> awesome =) |
01:45:48 | * | a_chou joined #nim |
01:51:14 | FromDiscord | <treeform> the more I use macros, the more I understand them, but the more I fear them. |
01:52:13 | FromDiscord | <Elegant Beef> Then there is me jumping up and down screaming "macros" |
01:52:42 | FromDiscord | <Elegant Beef> Think my issue is that i came from C# where macros didnt exist so im getting that macro power and making myself fly to close to the sun |
02:03:00 | FromDiscord | <shashlick> requesting test of the latest choosenim binaries - https://github.com/genotrance/choosenim/releases/tag/v0.6.1-20201016 |
02:03:59 | * | bung quit (Ping timeout: 260 seconds) |
02:06:08 | leorize[m] | @shashlick fwiw you can tag a release on github as prerelease |
02:06:19 | leorize[m] | that should tell users to pick the stable one instead |
02:10:42 | * | bung joined #nim |
02:13:07 | * | D_ quit (Quit: ๐จ) |
02:15:05 | FromDiscord | <shashlick> cool - hopefully travis has a way to do it |
02:15:19 | FromDiscord | <shashlick> meanwhile, looks like travis_terminate doesn't work on osx - some crap or the other |
02:15:40 | disruptek | you still prefer travis to gh, huh. |
02:17:58 | FromDiscord | <shashlick> just laziness to learn new crap |
02:32:27 | * | rockcavera quit (Remote host closed the connection) |
02:33:44 | * | D_ joined #nim |
02:41:35 | * | muffindrake quit (Ping timeout: 272 seconds) |
02:43:40 | * | muffindrake joined #nim |
02:59:48 | * | vicfred quit (Quit: Leaving) |
03:14:44 | * | user0_ quit (Ping timeout: 256 seconds) |
03:25:59 | Prestige | 5 |
03:31:16 | Tanger | 4? |
03:31:40 | Yardanico | 3 |
03:37:41 | FromDiscord | <Elegant Beef> 2 |
03:39:39 | Yardanico | ๐ฏ |
03:42:04 | Yardanico | im translating my post into russian rn |
03:42:13 | Yardanico | to post on habr.com |
04:01:04 | * | gmaggior quit (Quit: Leaving) |
04:05:22 | * | a_chou quit (Quit: a_chou) |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:33 | * | supakeen joined #nim |
04:37:07 | FromDiscord | <Yardanico> yeah, finished the translation, https://habr.com/ru/post/523674/ |
04:37:43 | FromDiscord | <Yardanico> you can try using a translator and comparing it to the original :P |
04:39:11 | FromDiscord | <Yardanico> https://translate.google.com/translate?sl=auto&tl=en&u=https%3A%2F%2Fhabr.com%2Fru%2Fpost%2F523674%2F |
04:52:15 | * | xioren joined #nim |
04:53:18 | xioren | any reason this doesnt work: https://play.nim-lang.org/#ix=2ASz ? |
04:54:27 | Yardanico | xioren: it's easy :) |
04:54:36 | Yardanico | you should do register(mimetypes_db, "url", "custom/url") instead |
04:54:39 | Yardanico | see no dot before .url |
04:54:53 | * | narimiran joined #nim |
04:54:53 | Yardanico | and getMimetype actually handles .url like "url" -> it just ignores the dot |
04:54:58 | Yardanico | narimiran: good morning |
04:55:52 | xioren | oh i see, thanks! |
04:56:33 | FromGitter | <offbeat-stuff> Hi |
04:56:36 | Yardanico | hello |
04:56:40 | FromGitter | <offbeat-stuff> I am writing a mat3 lib |
04:56:45 | Yardanico | xioren: I just tried to do "url" without a dot myself, and then "go to definition" for getMimetype and saw that . handling |
04:56:59 | FromGitter | <offbeat-stuff> I want to store it as array[9,float64] |
04:57:05 | narimiran | mornin' |
04:57:08 | FromGitter | <offbeat-stuff> I want to do is |
04:57:12 | FromGitter | <offbeat-stuff> var a:mat3 |
04:57:16 | FromGitter | <offbeat-stuff> a[0][1] |
04:57:29 | FromGitter | <offbeat-stuff> Is there a way to achieve that |
04:57:54 | FromGitter | <offbeat-stuff> Or a[0,1] |
04:58:00 | narimiran | there are existing libraries dealing with 2d matrices, see them for some guidance |
04:58:17 | xioren | neo for one |
04:58:34 | Yardanico | @offbeat-stuff a[0, 1] will work yes |
04:58:46 | Yardanico | not sure if you can make a[0][1] (maybe you can with macros or something) |
04:59:00 | Yardanico | for a[0, 1] you just define proc `[]`(a: WowType, b, c: int) = echo b, " ", c |
04:59:00 | FromGitter | <offbeat-stuff> How to make a function that can do a[1,2] |
04:59:11 | Yardanico | [] is inside single quotes |
04:59:26 | Yardanico | and then you can do a[1, 2] |
04:59:28 | FromGitter | <offbeat-stuff> Thanks got it |
05:00:14 | narimiran | you're doing this lib just for fun or you have more serious plans with it? |
05:00:34 | FromGitter | <offbeat-stuff> Just for my own game engine |
05:00:43 | FromGitter | <sealmove> guys how do you parse `a.b + c.d` as `(a.b) + (c.d)` with npeg? |
05:01:06 | narimiran | then i would suggest focusing on that game engine and using `neo` for your matrix needs |
05:01:23 | FromGitter | <sealmove> I am using precedence operator but it parses as `((a.b)+c).d` |
05:01:40 | FromGitter | <offbeat-stuff> Nah I am making this for my own learning |
05:02:46 | xioren | yeah i always refraine from using anything outside of the stdlib when trying to learn a language |
05:02:49 | FromGitter | <sealmove> hmm, maybe precedence operators don't work for tokens? has anyone tried out tokens in npeg? |
05:03:26 | FromGitter | <sealmove> @Zevv is precedence ops implemented for tokens? |
05:03:56 | Zevv | it's not *not* implemented for tokens. npeg doesnt care what you parse |
05:14:01 | FromGitter | <offbeat-stuff> Hey I have a type vec2 |
05:14:09 | FromGitter | <offbeat-stuff> What is want to do is |
05:14:18 | FromGitter | <offbeat-stuff> var a:vec2 |
05:14:24 | FromGitter | <offbeat-stuff> |a| |
05:14:28 | FromGitter | <offbeat-stuff> to have a proc |
05:15:17 | Yardanico | what proc? |
05:15:36 | FromGitter | <offbeat-stuff> like proc `||` (a:vec2)=a.mag() |
05:15:48 | FromGitter | <offbeat-stuff> \` \` |
05:15:49 | narimiran | `proc abs(a: vec2)` :P |
05:16:05 | FromGitter | <offbeat-stuff> like that but with those symbols |
05:16:15 | Yardanico | but it's not really possible |
05:16:18 | Yardanico | see, |5 is possible |
05:16:33 | FromGitter | <offbeat-stuff> okay cool |
05:16:38 | Yardanico | but not |5| because |5| doesn't parse like you want it to |
05:16:46 | FromGitter | <offbeat-stuff> where can I find the list of available symbols |
05:16:55 | Yardanico | that symbol is available, it's not about symbols |
05:16:57 | FromGitter | <offbeat-stuff> can i use macros for customization |
05:17:09 | Yardanico | https://nim-lang.org/docs/manual.html#lexical-analysis-operators |
05:17:09 | FromGitter | <offbeat-stuff> list of possibilities |
05:17:16 | Yardanico | yes, but you can't change nim's syntax even with macros |
05:17:27 | FromGitter | <offbeat-stuff> oh okay |
05:17:39 | Yardanico | |5| just wouldn't parse the way you want it to |
05:17:52 | Yardanico | it's invalid nim syntax |
05:20:23 | FromGitter | <sealmove> what am I missing? https://play.nim-lang.org/#ix=2ASI |
05:22:02 | FromGitter | <offbeat-stuff> can a|| work in any way |
05:22:15 | Yardanico | no, that's invalid syntax too |
05:22:36 | Yardanico | there are no postfix operators in Nim |
05:22:43 | Yardanico | well, there are, but you can't make custom ones |
05:22:56 | Yardanico | "Operators with one parameter are prefix operators, operators with two parameters are infix operators. (However, the parser distinguishes these from the operator's position within an expression.) There is no way to declare postfix operators: all postfix operators are built-in and handled by the grammar explicitly." |
05:23:21 | FromDiscord | <Elegant Beef> The nim syntax are set in stone, but aslong as your can get the parser to read what you want you can make a macro using it |
05:23:46 | Yardanico | yes, but it can be very hard :P |
05:23:47 | Yardanico | but you can |
05:24:13 | FromDiscord | <nikki> maybe the closest to postfix is `.foo` procs? |
05:24:25 | FromDiscord | <Elegant Beef> Sometimes i feel like english isnt my native tongue with that "syntax are" |
05:24:50 | Yardanico | @nikki that is trie |
05:24:54 | Yardanico | true* |
05:25:05 | Yardanico | you can do a.`||` :D |
05:25:17 | FromGitter | <offbeat-stuff> thanks |
05:29:24 | Yardanico | cffbf5e77821abe464e713686002131a776089f8 |
05:30:26 | Yardanico | second nim post in 2 days incoming? :P |
05:31:04 | * | kenran joined #nim |
05:37:47 | narimiran | Yardanico: spoiler alert!! |
05:37:59 | Yardanico | well I saw the commit ๐ |
05:38:01 | Yardanico | and the date |
05:38:47 | narimiran | you never know when it comes to releases what will come up in last minute..... |
05:39:46 | Yardanico | time to update to 1.5.1 |
05:39:50 | Yardanico | imagine using 1.3.7 in 2020 |
05:40:21 | narimiran | :) |
05:41:54 | * | user0 joined #nim |
05:49:40 | Yardanico | also if discord server activity will increase, we'll probably be able to request partnered program for the discord server |
05:50:00 | Yardanico | more stuff for free like better bitrate for voice and similar (https://discord.com/partners) |
05:50:17 | Yardanico | we actually have met the minimal target for it for 2 weeks |
05:50:25 | FromDiscord | <Elegant Beef> We use voip so much it's not funny! ๐ |
05:50:34 | Yardanico | Have an average of 50 communicators (voice or text) per week. |
05:50:34 | Yardanico | Have an average of 100 visitors per week. |
05:50:37 | Yardanico | Have an average of 20% Week 1 Retention for new joiners. |
05:50:55 | Yardanico | we have had 32% week 1 retention for last 2 weeks |
05:51:01 | * | solitudesf joined #nim |
05:53:45 | FromDiscord | <Rika> Bet they mean discord communicators |
05:54:03 | FromGitter | <sheerluck> $ nim -V Nim Compiler Version 1.5.1 [Linux: amd64] Compiled at 2020-10-16 |
05:54:05 | FromGitter | <sheerluck> ใใฃใ |
05:54:19 | Yardanico | I had it earlier than you :) |
05:54:36 | FromDiscord | <Rika> Thought I was in the wrong discord server |
05:54:49 | FromDiscord | <Rika> Saw the Japanese text and wondered if I misclicked |
05:55:40 | * | letto quit (Ping timeout: 256 seconds) |
05:59:27 | Yardanico | wakarimashita |
06:02:21 | * | letto joined #nim |
06:03:18 | Yardanico | getting some views on my russian version https://i.imgur.com/CTWIboD.png |
06:03:26 | Yardanico | +s on habr actually mean more than on other websites |
06:03:39 | Yardanico | users have limited number of them based on their own ratings |
06:05:32 | FromDiscord | <KaiOShin> Is 1.2.6 latest nim version |
06:05:41 | Yardanico | currently - yes |
06:05:44 | Yardanico | but we're gonna have 1.4 soon |
06:05:50 | Yardanico | soon = today (probably) |
06:05:50 | FromDiscord | <Elegant Beef> latest stable |
06:06:00 | Prestige | Is there a way to get compiler hints about potential unhandled exceptions? Like if I call Foo that can raise an exception, but don't have a try/except |
06:06:12 | narimiran | ...and 1.2.8 |
06:06:24 | FromDiscord | <KaiOShin> what channels are available on choosenim |
06:06:41 | FromDiscord | <Elegant Beef> Devel, stable, and any old versions by number |
06:06:42 | Prestige | stable and develop? |
06:07:31 | FromDiscord | <Elegant Beef> Huh? |
06:10:48 | Prestige | Beef was that @me? |
06:11:29 | FromDiscord | <Elegant Beef> Nope |
06:11:35 | FromDiscord | <Elegant Beef> Also you unintentionally atted someone ๐ |
06:11:58 | Prestige | woops |
06:12:05 | Prestige | sorry, me :P |
06:12:32 | Tanger | Haha |
06:12:36 | FromDiscord | <Elegant Beef> Well it's not "me" it;s "Me2beats" like you can at me with just like "@elega" |
06:13:05 | Prestige | oh, good to know |
06:13:57 | Prestige | Anyway this is my point: https://play.nim-lang.org/#ix=2ASO no idea if this is possible atm, but would be nice |
06:15:07 | Yardanico | narimiran: what did you use for https://github.com/nim-lang/Nim/commit/018ae963ba83934a68d815c3c1c44c06e8ec6178 ? |
06:15:21 | narimiran | Yardanico: there's an internal script |
06:15:25 | * | xioren quit (Quit: leaving) |
06:15:29 | Yardanico | ๐ |
06:16:09 | Yardanico | 255 issues fixed in 1.4, nice |
06:17:02 | narimiran | and lots of fixes that weren't an issue previously |
06:18:09 | Yardanico | yeah |
06:25:05 | * | letto quit (Ping timeout: 240 seconds) |
06:26:46 | * | blah50 joined #nim |
06:27:30 | * | blah50 quit (Remote host closed the connection) |
06:34:21 | * | kenran quit (Ping timeout: 260 seconds) |
06:35:44 | Yardanico | btw, is there any documentation about the fact that you can write proc `[]`(b: Board, r, c: int): int and then use it like b[0, 1] ? |
06:35:59 | Yardanico | I kind of know that it's possible, but never seen it in the manual :P |
06:36:53 | Yardanico | oh huh it's not exclusive to [] |
06:37:41 | Yardanico | works for {} too |
06:37:57 | * | nyd joined #nim |
06:38:13 | Prestige | is it just a special case for those pairs? |
06:39:27 | Yardanico | well, that's what I'm asking :P |
06:39:45 | Yardanico | i guess I'll update my wiki article now |
06:39:50 | FromDiscord | <Elegant Beef> I now how nim <-> nimscript for proc calls! ๐ |
06:39:54 | FromDiscord | <Elegant Beef> (edit) 'how' => 'have' |
06:39:56 | Yardanico | wow nice |
06:39:58 | Yardanico | via strings? |
06:40:01 | Yardanico | or somehow natively? |
06:40:02 | Yardanico | well callbacks |
06:40:03 | FromDiscord | <Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/766551007915933706/unknown.png |
06:40:10 | FromDiscord | <Elegant Beef> Using strings yea, but it's all hidden |
06:40:11 | FromDiscord | <lqdev> Yardanico almost as if 96k opus for voice chat wasn't perfectly fine |
06:40:23 | Yardanico | shh |
06:40:25 | Prestige | lol Awbject |
06:40:26 | Yardanico | it's more than that |
06:40:30 | FromDiscord | <lqdev> i already don't see a difference between 64 and 96 |
06:40:37 | Yardanico | we will get more features |
06:40:38 | FromDiscord | <lqdev> hear* |
06:40:38 | Yardanico | for free |
06:40:40 | FromDiscord | <Elegant Beef> You shouldnt see any difference, you should hear it |
06:40:42 | FromDiscord | <Elegant Beef> Damn it! ๐ |
06:40:45 | FromDiscord | <lqdev> FOR FREE??? |
06:40:48 | Yardanico | YES |
06:40:50 | FromDiscord | <lqdev> sign me up |
06:40:57 | Yardanico | invite more people to this server |
06:41:02 | FromDiscord | <Elegant Beef> Well cover him in mud and call him porky |
06:41:45 | Yardanico | I meant https://github.com/nim-lang/Nim/wiki/Lesser-known-Nim-features by the wiki page btw |
06:42:55 | FromDiscord | <Elegant Beef> I think there is currently more macro code than actual code in this project so far |
06:43:11 | * | kenran joined #nim |
06:43:37 | FromDiscord | <Elegant Beef> Still need to figure out how to handle this nicerโต`var a: Awbject = intrptr.invoke("update", [Awbject(a: 1000).toPNode], Awbject)` |
06:44:59 | Tanger | Yardanico, Yeah, the manual doesn't mention that Nim uses UFCS |
06:45:04 | Yardanico | it does |
06:45:12 | Yardanico | and this is not UFCS |
06:45:20 | Yardanico | Tanger: https://nim-lang.org/docs/manual.html#procedures-method-call-syntax |
06:45:39 | Yardanico | I meant that the thing I'm talking about is not related to MCS (UFCS) |
06:45:52 | * | user0 quit (Ping timeout: 246 seconds) |
06:45:55 | Tanger | Ah |
06:45:57 | Tanger | I dig |
06:48:04 | * | kenran quit (Ping timeout: 260 seconds) |
06:48:12 | * | letto joined #nim |
06:48:35 | * | astronavt quit (Remote host closed the connection) |
06:52:36 | FromDiscord | <whisperdev> Guys where can I find finish.nim? |
06:54:00 | narimiran | tools/finish.nim? |
06:54:04 | Yardanico | ^^ |
06:56:24 | * | PMunch joined #nim |
07:03:50 | * | beatmox_ joined #nim |
07:09:35 | * | beatmox_ quit (Remote host closed the connection) |
07:13:30 | FromGitter | <sealmove> I get a weird error where unittest tries to echo some Option type for no reason and can't |
07:13:47 | Yardanico | import options ? |
07:13:54 | FromGitter | <sealmove> I have |
07:13:56 | Yardanico | not sure what you mean really |
07:14:20 | FromGitter | <sealmove> `$` is not defined for that option type |
07:14:28 | FromGitter | <sealmove> but I don't even echo it in my tests |
07:14:37 | Yardanico | well can you show code and **full** error |
07:19:05 | FromGitter | <sealmove> https://play.nim-lang.org/#ix=2AT6 |
07:19:45 | FromGitter | <sealmove> https://play.nim-lang.org/#ix=2AT7 |
07:20:36 | Yardanico | did you compile with arc by any chance? |
07:21:12 | Yardanico | really seems like some kind of corruption or some kind of node linked to itself |
07:21:36 | FromGitter | <sealmove> didn't try arc |
07:22:03 | Yardanico | well then it's probably one of these two |
07:22:08 | Yardanico | maybe your node is somehow linked to itself |
07:22:33 | Yardanico | imagine you have Node ref object which has "child: Node", you create a new node and set node.child = node |
07:22:40 | Yardanico | and boom, $ will explode |
07:22:44 | Yardanico | or same with Option[T] |
07:22:53 | FromDiscord | <whisperdev> Error: Unable to extract. Error was 'Cannot create a file when that file already exists. |
07:23:01 | FromDiscord | <whisperdev> Can we somehow specifiy -force? |
07:23:02 | FromGitter | <sealmove> :S I think it's some problem with Option, not an error on my behalf |
07:23:09 | Yardanico | @whisperdev it's a nim stdlib bug |
07:23:10 | Yardanico | it was fixed |
07:23:28 | Yardanico | https://github.com/nim-lang/Nim/pull/14433 |
07:23:28 | FromDiscord | <whisperdev> Which helps me how when I am trying to install a new nim with choosenim? |
07:23:29 | disbot | โฅ Fix #14057 - moveFile should overwrite on Windows |
07:23:40 | Yardanico | update choosenim maybe? |
07:23:48 | FromDiscord | <whisperdev> running latest |
07:24:05 | Yardanico | well then choosenim needs to be updated anyway: ) @narimiran |
07:24:14 | Yardanico | i guess other people might hit this issue too |
07:24:35 | Yardanico | need to rebuild choosenim with nim 1.2.6 preferably |
07:24:51 | Yardanico | only for windows |
07:24:57 | Yardanico | so that it includes https://github.com/nim-lang/Nim/pull/14433 |
07:24:58 | disbot | โฅ Fix #14057 - moveFile should overwrite on Windows |
07:24:59 | FromGitter | <sealmove> arc and orc crash as well |
07:25:19 | Yardanico | @sealmove 1.2.6 doesn't have real working arc or orc :) |
07:25:24 | Yardanico | they had a lot of bugs there :P |
07:25:30 | Yardanico | as I said, it's probably a logic error in the code somewhere |
07:25:34 | Yardanico | you can try to minimize |
07:28:46 | FromGitter | <sealmove> interesting |
07:28:52 | FromGitter | <sealmove> you were absolutely wright |
07:28:58 | FromGitter | <sealmove> I forgot to make my object mutable |
07:29:09 | FromGitter | <sealmove> https://play.nim-lang.org/#ix=2ATa |
07:30:30 | FromGitter | <sealmove> hmm, this is a serious design problem now... I need some of my fields (of my object) to be mutable and some immutable |
07:31:42 | FromGitter | <sealmove> or maybe I can make subtypes and have a references for fields I want to mutate |
07:33:51 | * | arecacea1 quit (Read error: Connection reset by peer) |
07:34:20 | * | arecacea1 joined #nim |
07:35:48 | FromDiscord | <lqdev> make all fields private and create getters/setters? |
07:37:09 | FromGitter | <sealmove> I want to user to be able to do `let x = newObject()` |
07:38:18 | * | Vladar joined #nim |
07:38:19 | FromGitter | <sealmove> x has some immutable fields and some other fields which cache the result of procs that are called on it |
07:39:16 | FromGitter | <sealmove> this is to achieve lazy evaluation |
07:39:42 | FromGitter | <sealmove> i want field `f` to be filled only if the uses uses it, with `x.f` |
07:39:45 | * | dddddd quit (Ping timeout: 240 seconds) |
07:39:52 | Tanger | sealmove: I may be wrong, but I think you can override setters and getters for fields on a type https://nim-lang.org/docs/tut2.html#object-oriented-programming-properties |
07:39:52 | FromGitter | <sealmove> user uses it* |
07:40:20 | Tanger | So maybe make the object mutable and clamp down any immutable fields? |
07:40:51 | FromDiscord | <lqdev> @sealmove getters will work |
07:41:27 | FromGitter | <sealmove> hmm and the user will be able to mutate a field even if the object it declared with `let`? |
07:41:37 | FromDiscord | <lqdev> oh |
07:42:09 | FromDiscord | <lqdev> well, you can do proc `x=`(o: var MyRefObj) = ... |
07:42:34 | FromDiscord | <lqdev> and then it'll only be mutable if it's in a var |
07:42:39 | FromDiscord | <lqdev> even if it's a ref object |
07:43:44 | FromDiscord | <sealmove> It's seems confusing but the api i want to achieve does the mutation with get, not set |
07:44:00 | FromDiscord | <sealmove> Because the field is filled the first time the user calls it |
07:45:46 | FromDiscord | <sealmove> I should probably make a cacher object and have a reference of it as field |
07:57:07 | FromDiscord | <whisperdev> As a workaround i just deleted the dlls |
08:03:32 | PMunch | Anyone had a look at this yet? Who maintains the x11 package? https://github.com/nim-lang/x11/pull/38 |
08:03:32 | disbot | โฅ Add wrappers for xrandr monitor functions |
08:08:45 | * | Jjp137 quit (Ping timeout: 244 seconds) |
08:24:12 | * | nyd quit (Quit: nyd) |
08:29:22 | * | natrys joined #nim |
08:31:02 | PMunch | Also added a couple packages to nimble https://github.com/nim-lang/packages/pull/1672 |
08:31:03 | disbot | โฅ Added Imlib2 and notificatcher packages |
08:38:32 | Prestige | PMunch: do you find use for xrandr when we have xinerama? |
08:39:16 | PMunch | I've never used anything except xrandr.. |
08:39:26 | PMunch | To be honest I'm not entirely sure what the difference is |
08:39:46 | PMunch | But xrandr have always worked well for me, and seems to be the default for most users |
08:39:47 | Prestige | I meant for our window managers actually, I assumed that's what this was for |
08:41:05 | Prestige | I use it in Nimdow to get monitor info, basic coords and screen number |
08:42:35 | * | Tanger quit (Quit: Leaving) |
08:43:53 | * | kenran joined #nim |
08:46:38 | PMunch | That's exactly what I was using xrandr for :P |
08:47:00 | PMunch | And it was for notifishower, the counterpart to notificatcher that will show notifications on the screen |
08:47:32 | Prestige | Yeah, I found Xinerama to be much easier to work with if you don't need other info |
08:47:53 | Prestige | https://github.com/nim-lang/x11/blob/master/x11/xinerama.nim |
08:48:48 | PMunch | http://ix.io/2ATu/ <- This is what I'm using for xrandr |
08:49:04 | * | kenran quit (Ping timeout: 256 seconds) |
08:49:26 | PMunch | That is just shamelessly stolen from dunst :P |
08:49:34 | Prestige | hehe |
08:51:01 | PMunch | https://github.com/dunst-project/dunst/blob/master/src/x11/screen.c#L96-L211 |
08:51:47 | PMunch | Hmm, I would say it seems about the same in terms of complexity, maybe xinerama is a bit easier. But it for some reason doesn't have the update functionality that's made for xrandr |
08:53:07 | Prestige | I'm just doing this https://0x0.st/iDr5.txt PMunch |
08:53:59 | * | arecacea1 quit (Remote host closed the connection) |
08:53:59 | FromDiscord | <Elegant Beef> Then there was me using the CLI of xrandr ๐ |
08:54:28 | * | arecacea1 joined #nim |
08:57:30 | PMunch | Well these are the reasons why I use xrandr: https://wiki.archlinux.org/index.php/multihead#Xinerama https://i3wm.org/docs/multi-monitor.html#_the_explanation |
08:57:48 | PMunch | @Elegant you filthy little man! |
08:58:23 | PMunch | Prestige, could you resend your last message verbatim? |
08:58:49 | Prestige | I'm just doing this https://0x0.st/iDr5.txt PMunch |
08:59:22 | PMunch | Hmm, strange |
08:59:33 | Prestige | ? |
08:59:34 | PMunch | Something crashed notificatcher with a SIGSEGV |
08:59:59 | Prestige | notificrasher :P |
09:00:11 | PMunch | Haha -_- |
09:00:27 | PMunch | Problem is that HexChat really doesn't like not being able to send notifications |
09:00:33 | PMunch | It just locks up completely.. |
09:01:04 | PMunch | Hmm, interesting |
09:01:07 | Prestige | I use weechat, it's nice |
09:01:31 | PMunch | When I full screen a transparent window in nimdow I can see the other windows in the tag in the background |
09:01:44 | PMunch | Hm,m haven't tried weechat I think |
09:01:58 | Prestige | Yeah, the others aren't moved offscreen |
09:02:30 | Prestige | I could, just haven't thought of a good reason really |
09:03:01 | PMunch | Well, my terminal has a semi-transparent background (so I can see my background) |
09:03:54 | Prestige | Would you want the other windows hidden, then? |
09:06:59 | PMunch | Not sure tbh |
09:07:08 | PMunch | I think I might prefer this |
09:08:19 | * | arecacea1 quit (Remote host closed the connection) |
09:08:38 | * | arecacea1 joined #nim |
09:10:55 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:14:22 | * | Ven`` joined #nim |
09:15:33 | * | Ven`` quit (Client Quit) |
09:16:01 | * | lritter joined #nim |
09:16:25 | PMunch | Oh by the way Prestige, one feature request, implement support for the UrgencyHint: https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.4 |
09:16:57 | PMunch | Basically a window can set itself urgent and in i3 this colours the border red and shows the workspace as red if you're not on it |
09:17:33 | Prestige | PMunch: I have the code written to detect it with a TODO comment, haha. Just need the status bar to render it |
09:17:48 | PMunch | I have my terminal set up to be urgent when the bell character is printed, and I have a bell character in my PS1, it's a nice way to run programs in the background and see when they are done |
09:17:52 | PMunch | Ah great :) |
09:18:32 | Prestige | I also want to add a keybinding to jump to the urgent window |
09:19:15 | FromGitter | <offbeat-stuff> How to use `:` operator |
09:19:21 | FromGitter | <offbeat-stuff> in proc defination |
09:19:35 | FromGitter | <offbeat-stuff> proc \`:\` throws error |
09:21:42 | PMunch | Prestige, that would be nice :) |
09:22:16 | FromDiscord | <KaiOShin> Um how to use `:` operator |
09:22:49 | FromDiscord | <KaiOShin> do i have to use it in union with a second symbox |
09:22:54 | FromDiscord | <KaiOShin> symbol |
09:23:30 | PMunch | According to the manual: =, :, :: are not available as general operators; they are used for other notational purposes. |
09:23:38 | FromGitter | <gogolxdong> c2nim `/mnt/c/nimffmpeg/examples/ffplay.c(4139, 934) Error: expected closing '@#'` |
09:23:43 | PMunch | https://nim-lang.org/docs/manual.html#lexical-analysis-operators |
09:25:46 | * | Kiloneie joined #nim |
09:26:54 | Prestige | Wonder if there's a way I could change the urgency hint on a window, by id |
09:27:23 | PMunch | Of course there is |
09:28:06 | Prestige | I mean an existing tool, like if xdotool could handle it |
09:28:23 | Prestige | So i could test changes |
09:30:50 | PMunch | https://github.com/ototo/seturgent |
09:31:31 | Prestige | Nice, thanks |
09:31:44 | Prestige | Not at my computer atm :P |
09:35:21 | PMunch | Any particular reason why the packages and x11 (and likely most others) repositories are not tagged with "hacktoberfest"? |
09:36:17 | Prestige | I didn't even know it was a thing till you mentioned it the other day |
09:40:14 | PMunch | Huh? |
09:40:17 | PMunch | Hacktoberfest? |
09:40:27 | Prestige | Yeah. |
09:42:07 | PMunch | It's a nice idea |
09:42:22 | PMunch | But it's a bit annoying that they made it opt-in halfway through this year.. |
09:43:14 | PMunch | Don't get me wrong, I don't necessarily think it's a bad idea to make it opt-in, but they should've done it earlier, or for next year |
09:55:43 | * | opal quit (Ping timeout: 240 seconds) |
09:57:46 | * | apahl quit (Ping timeout: 244 seconds) |
09:58:42 | Prestige | PMunch: I think the config stuff is sorted out. Would you mind playing with it, see if you can break it? |
09:58:46 | * | apahl joined #nim |
10:00:39 | Prestige | It's the latest commit. I'm off to bed, see ya |
10:02:54 | * | opal joined #nim |
10:05:31 | * | Jjp137 joined #nim |
10:34:54 | FromGitter | <offbeat-stuff> How to import like vec/{vec2,vec3,mat3} |
10:35:14 | FromGitter | <offbeat-stuff> multiple files from a single folder in a convinient way |
10:35:19 | PMunch | `import vec/[vec2, vec3, mat3]` |
10:35:28 | FromGitter | <offbeat-stuff> Thanks |
10:37:38 | FromGitter | <ynfle> How can I sort a tuple? |
10:37:58 | PMunch | ynfle, sort a tuple? |
10:38:05 | FromGitter | <ynfle> Yup |
10:38:10 | FromGitter | <ynfle> Does that even make sense? |
10:38:20 | PMunch | Not really :P |
10:38:30 | PMunch | Do you have an example of what you want to achieve |
10:38:33 | FromGitter | <ynfle> ๐ I'm gonna back away now |
10:38:39 | FromGitter | <ynfle> I'm gonna use an array |
10:38:47 | PMunch | Or a seq |
10:38:56 | PMunch | Or a linked list I guess |
10:42:03 | FromGitter | <ynfle> array is easiest |
10:42:14 | FromGitter | <ynfle> wanted to make a type with a constrained size |
10:44:10 | * | nature joined #nim |
10:44:46 | * | kenran joined #nim |
10:48:59 | FromGitter | <offbeat-stuff> how to check a value in a proc at compile time |
10:49:45 | FromDiscord | <lqdev> wdym? |
10:49:59 | * | kenran quit (Ping timeout: 258 seconds) |
10:50:13 | FromGitter | <offbeat-stuff> like at compile time run a check on the values passed to proc |
10:50:26 | FromGitter | <offbeat-stuff> to throw and error if not okay values |
10:50:40 | FromGitter | <ynfle> `static`? If the proc wont run at compile time, it can't really be checked. You can try concepts |
10:51:10 | supakeen | Ahhh finally an idea to use Zevv's npeg for \o |
10:51:13 | FromGitter | <ynfle> https://nim-lang.org/docs/manual_experimental.html#concepts |
10:51:56 | * | dddddd joined #nim |
10:52:50 | PMunch | offbeat-stuff, what specifically are you trying to do? |
10:52:55 | PMunch | supakeen, what? |
10:53:12 | supakeen | Command line parser based on PEG grammar. |
10:53:14 | FromGitter | <offbeat-stuff> run this |
10:53:14 | FromGitter | <offbeat-stuff> proc `[]`* (a:mat3,i:int,j:int) : float64 {.inline.} = โ โ ```assert(i<3 and j<3 and i>=0 and j>=0)``` [https://gitter.im/nim-lang/Nim?at=5f897b9a6c8d484be28ab435] |
10:53:21 | supakeen | Don't ruin my enthusiasm by telling me someone made one! |
10:54:10 | PMunch | Haven't found one |
10:54:13 | PMunch | Damn it.. |
10:54:16 | FromGitter | <offbeat-stuff> `proc \`[]\`* (a:mat3,i:int,j:int) : float64 {.inline.} = โ โ ```assert(i<3 and j<3 and i>=0 and j>=0) โ a[i*3+j]```` [https://gitter.im/nim-lang/Nim?at=5f897bd8631a250ab2716e60] |
10:54:28 | supakeen | Hehe, all the better. |
10:54:42 | FromGitter | <ynfle> range type |
10:54:44 | PMunch | http://try.docopt.org/?doc=Naval+Fate.%0D%0A%0D%0AUsage%3A%0D%0A++naval_fate.py+%5B-x+%3Cx%3E+-y+%3Cy%3E%5D%0D%0A++naval_fate.py+%28--monitor+%3Cname%3E+%5B-x+%3Cx%3E+-y+%3Cy%3E%5D%29...%0D%0A%0D%0AOptions%3A%0D%0A++-h+--help+++++++++Show+this+screen.%0D%0A++-x+%3Cx%3E++++++++++++X+position+to+show+on%0D%0A++-y+%3Cy%3E++++++++++++Y+position+to+show+on%0D%0A++--monitor+%3Cname%3E++Monitor+on+which+to+display%0D%0A%0D%0A&argv=--monitor+first+-x+100+-y+10+--moni |
10:54:44 | PMunch | tor+second+-x+200+--monitor+third+-x+300+-y+30 |
10:54:51 | PMunch | Oh wow, that link was broken |
10:54:56 | supakeen | nice link yea |
10:55:02 | FromDiscord | <Vindaar> very pretty indeed |
10:55:03 | FromGitter | <ynfle> @offbeat-stuff https://nim-lang.org/docs/manual.html#types-subrange-types |
10:55:20 | PMunch | Slightly shorter: http://try.docopt.org/?doc=Usage%3A%0D%0A++naval_fate.py+%5B-x+%3Cx%3E+-y+%3Cy%3E%5D%0D%0A++naval_fate.py+%28--monitor+%3Cname%3E+%5B-x+%3Cx%3E+-y+%3Cy%3E%5D%29...%0D%0A%0D%0AOptions%3A%0D%0A++-x+%3Cx%3E%0D%0A++-y+%3Cy%3E%0D%0A++--monitor+%3Cname%3E%0D%0A%0D%0A&argv=--monitor+first+-x+100+-y+10+--monitor+second+-x+200+--monitor+third+-x+300+-y+30 |
10:55:53 | PMunch | That's going to be a massive PITA.. |
10:55:53 | FromDiscord | <sealmove> Figured it out: https://play.nim-lang.org/#ix=2AU7 |
10:56:10 | FromDiscord | <Vindaar> what are you trying to do PMunch? |
10:56:37 | PMunch | I'm trying to have a format where I can specify either a position, or a position per monitor |
10:56:46 | PMunch | This works: http://try.docopt.org/?doc=Usage%3A%0D%0A++naval_fate.py+%5B-x+%3Cx%3E+-y+%3Cy%3E%5D%0D%0A++naval_fate.py+%28--monitor+%3Cname%3E+-x+%3Cx%3E+-y+%3Cy%3E%29...%0D%0A%0D%0AOptions%3A%0D%0A++-x+%3Cx%3E%0D%0A++-y+%3Cy%3E%0D%0A++--monitor+%3Cname%3E%0D%0A%0D%0A&argv=--monitor+first+-x+100+-y+10+--monitor+second+-x+200+-y+20+--monitor+third+-x+300+-y+30 |
10:56:55 | PMunch | But both x and y are required for each monitor |
10:56:57 | PMunch | Which is fine |
10:57:35 | PMunch | Hmm, I should probably read these as a configuration file format as well.. |
10:58:50 | PMunch | supakeen, if you want some idea for command line parsing I have some :P |
10:59:00 | supakeen | uh oh |
10:59:29 | FromDiscord | <Rika> . |
10:59:33 | PMunch | Haha, don't worry, it's not anything way too crazy :P |
10:59:47 | FromDiscord | <Vindaar> Hmm. So you're mainly not sure how to tell docopt in the best way how to do it. Or you don't know in general what a good CLI interface for that is supposed to look like? |
11:01:00 | supakeen | I'll finish up the LFSRs and the twister in my PRNG library first before I start thinking about the cli parser :) |
11:01:55 | PMunch | @Vindaar, I'm not sure if this is possible with docopt because of the poor output format.. |
11:02:40 | FromDiscord | <Vindaar> what do you mean by output format? |
11:03:26 | PMunch | Basically use npeg to parse the docopt format, but instead of doing it on runtime, do it on compile-time and have everything properly verified and parsed into correct types (based on `default` values and possibly a `type` addition). Then have a dispatcher like the one I wrote for docopt that can call procedures directly with the correct arguments. Include some kind of error messages instead of just outputting the help message. And last but not least, allow |
11:03:27 | PMunch | parsing of the options from a configuration file as well. |
11:03:49 | PMunch | @Vindaar, as you can see the output there is three separate arrays |
11:04:39 | PMunch | So when I omit one it doesn't create a hole, which makes it useless |
11:05:01 | FromDiscord | <Vindaar> oh I see. And the docopt impl specifies essentially that this is how the data is supposed to be treated internally I assume? But can't you cross check the index with the index of the `--monitor` arg? |
11:05:35 | PMunch | What I'd like to get back is something like @[Monitor(x: 100, y: 10, name: "first"), Monitor(x:200, y: 0, name: "second"), Monitor(x: 300, y: 30, name: "third")] |
11:05:45 | PMunch | Or have x/y as Option[int] |
11:06:12 | FromDiscord | <Vindaar> yeah, I understand. But you can build that from the available information after reading the docopt table, no? |
11:06:21 | PMunch | @Vindaar, I guess that's part of the docopt spec, haven't really looked into it |
11:06:24 | FromDiscord | <Vindaar> of course it's not gonna give it to you like that |
11:06:56 | PMunch | Nope, because when I miss -y for the second monitor it sets the y array to be [10, 30] instead of [10, 0, 30] or something similar |
11:07:22 | FromDiscord | <Vindaar> oh, I didn't think you might end up not setting one of either x or y |
11:07:26 | FromDiscord | <Vindaar> that is a problem indeed |
11:07:39 | FromDiscord | <Vindaar> well, maybe it's time for docopt 2.0 ๐ |
11:08:03 | PMunch | I think so |
11:09:45 | PMunch | In xlunch the system is pretty neat, basically you have long and short options for a bunch of things, and if you pass a --config then it will read the file and just pass every option through the same parser. |
11:10:21 | PMunch | Meant I could implement the configuration file parser with barely any extra effort |
11:13:25 | * | nature quit (Ping timeout: 240 seconds) |
11:42:59 | FromDiscord | <malfong> Doc's style is a bit broken, has it been like this? https://media.discordapp.net/attachments/371759389889003532/766627243291836446/a.png |
11:43:20 | FromDiscord | <malfong> (edit) 'Doc's style is a bit broken, has it been like this? ... https://media.discordapp.net/attachments/371759389889003532/766627243291836446/a.png' => 'Doc's style is a bit broken, has it been like this?https://nim-lang.org/docs/lists.html' |
11:43:26 | Yardanico | well a new addition was to group procs on the left hand |
11:43:33 | Yardanico | seems like it doesn't look so good on mobile devices |
11:44:08 | Yardanico | you can just switch to the desktop mode to view full docs |
11:44:29 | Yardanico | @malfong what device are you on? |
11:45:10 | FromDiscord | <malfong> PC. chrome and firefox. |
11:45:17 | Yardanico | yeah I saw the same behaviour |
11:45:23 | Yardanico | can you please report the issue on github? |
11:45:24 | Yardanico | to the nim repo |
11:46:19 | narimiran | Yardanico: see if the same is happening with 1.0.x docs, where there is no grouping (you might need higher zoom, as the entries are shorter) |
11:47:19 | Araq | 1.4 ! |
11:47:31 | Yardanico | 1.5.1 !! |
11:47:35 | Araq | but I need to go, see you. |
11:47:35 | PMunch | I see the same issue on my 4K computer monitor.. |
11:47:43 | Yardanico | PMunch: without zoom? |
11:47:48 | Yardanico | time to throw a party for 1.4 :D |
11:48:23 | PMunch | Yup, no zoom |
11:48:52 | Yardanico | wow that's a big problem |
11:49:13 | supakeen | 1.4!? |
11:49:21 | Yardanico | supakeen: YES |
11:49:24 | supakeen | omg |
11:50:01 | Yardanico | prepare your retweets and likes |
11:50:23 | PMunch | Yardanico: https://uploads.peterme.net/Screenshot_2020-10-16 |
11:50:41 | Yardanico | 403 :P |
11:50:47 | PMunch | Maybe we should fix the Oh woops |
11:51:07 | Yardanico | well I guess it should be some css issue |
11:51:52 | PMunch | https://uploads.peterme.net/Screenshot_2020-10-16%20lists.png |
11:52:00 | Yardanico | ooh |
11:52:23 | Yardanico | btw I forgot, what is the link for 1.0.x docs? |
11:52:40 | Yardanico | ah nvm |
11:52:55 | narimiran | come on guys, wait for the article to be published before celebrations |
11:53:01 | narimiran | have some decency! |
11:53:09 | Yardanico | narimiran: it's okay for 1.0.x |
11:53:21 | Yardanico | seems to only happen on 1.2.x with big zoom or if you have a high resolution device |
11:53:44 | narimiran | Yardanico: then i know who's fault is it. it is one jerk that always makes a mess! |
11:53:49 | PMunch | Yardanico: https://nim-lang.org/1.0.0/lists.html |
11:53:56 | Yardanico | PMunch: yeah I checked 1.0.6 :) |
11:54:11 | Yardanico | narimiran: i have a clue on who that person is too :P |
11:54:56 | narimiran | ee7[m]: wow you're quick! thanks for the fixes! |
11:55:03 | ee7[m] | :) |
11:56:53 | narimiran | ee7[m]: are those all changes or are you still going through it? |
11:56:59 | Yardanico | narimiran: oof I even see it on 100% zoom on my fullhd display |
11:57:03 | Yardanico | so it's not only for high res |
11:57:18 | * | rockcavera joined #nim |
11:57:42 | Yardanico | but the issue doesn't really have a clean fix |
11:57:58 | Yardanico | you would either offset the whole main content to the right, or whole proc grouping to the left |
11:58:06 | Yardanico | or strip exceeding chars in that grouping |
11:58:07 | narimiran | that's not the fix |
11:58:16 | Yardanico | yeah that's what I'm saying |
11:58:44 | narimiran | my browser wraps stuff into a newline. your (plural) doesn't? |
11:59:35 | Yardanico | https://i.imgur.com/F38kdRJ.png |
12:00:24 | ee7[m] | @narimiran That's all I saw. I didn't go through the changelog, though. |
12:00:54 | Yardanico | well changelog is big :P |
12:00:58 | narimiran | Yardanico: https://i.imgur.com/YbFAvr2.png |
12:01:03 | Yardanico | narimiran: huh |
12:01:05 | Yardanico | i'm on chromium |
12:01:13 | narimiran | i'm on vivaldi which uses chromium |
12:01:27 | Yardanico | well it's customized a lot :P |
12:01:36 | narimiran | (although i'm on some older version because the new one was messed up) |
12:01:46 | * | apahl quit (Ping timeout: 244 seconds) |
12:02:59 | * | apahl joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:18 | * | TomDotTom joined #nim |
12:06:39 | * | supakeen joined #nim |
12:12:00 | FromDiscord | <Vindaar> smh, I forgot to add `@nim_lang`: https://twitter.com/Vindaar/status/1317074795251589121 |
12:12:02 | ee7[m] | @narimiran But if there's any common misconceptions in https://news.ycombinator.com/item?id=24786649 that aren't explained in the 1.4 post... then it might be worth answering them. Or somebody is going to need to do it in the HN/reddit comments later. |
12:12:39 | ee7[m] | It's a bit of a fool's errand though. There will always be someone who writes "garbage collector bad". |
12:18:51 | PMunch | Sometimes I worry that I abuse implicit return a bit too much: http://ix.io/2AUk/ |
12:19:41 | FromDiscord | <whisperdev> nim-#devel\lib\windows\registry.nim(58, 54) Error: expression cannot be cast to pointer |
12:19:49 | FromDiscord | <whisperdev> Is this fixed somewhere? This is for arc |
12:23:06 | * | krux02 joined #nim |
12:24:09 | Yardanico | first post 1.4 issue \o/ |
12:24:10 | Yardanico | XD https://github.com/nim-lang/Nim/issues/15599 |
12:24:13 | disbot | โฅ [ARC] Finalizer with a do notation proc crashes the compiler ; snippet at 12https://play.nim-lang.org/#ix=2AUm |
12:24:38 | narimiran | you didn't get the memo?? no new issues until monday! |
12:25:23 | FromDiscord | <Vindaar> rude, yard, very rude ๐คทโโ๏ธ |
12:26:37 | FromDiscord | <lqdev> don't blame yard, it's all my fault |
12:26:48 | FromDiscord | <Vindaar> ๐
|
12:27:12 | FromDiscord | <Ravener> Is it possible to browse the stdlib documentation in the terminal offline? Like Go's `go doc` command. |
12:27:57 | narimiran | any choosenim users here that want to do a quick and simple test? |
12:28:10 | FromDiscord | <Rika> what test |
12:28:25 | FromDiscord | <lqdev> narimiran: ๐โโ๏ธ |
12:28:36 | Yardanico | narimiran: some already did |
12:28:40 | Yardanico | in russian tg channe; |
12:28:47 | Yardanico | chat* |
12:28:50 | Yardanico | seems to have installed fine on macos |
12:28:55 | narimiran | Yardanico: oh, and? everything is as expected? |
12:29:00 | Yardanico | idk :P |
12:29:25 | narimiran | ok, can somebody do `choosenim update stable`? :) |
12:29:32 | Yardanico | https://i.imgur.com/q2Pwznu.png |
12:29:43 | FromDiscord | <lqdev> narimiran: |
12:29:49 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2AUp |
12:29:56 | narimiran | great, it works |
12:30:03 | narimiran | time to publish the article :) |
12:30:08 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2AUq |
12:31:38 | Yardanico | https://nim-lang.org/blog/2020/10/16/version-140-released.html |
12:32:04 | narimiran | Yardanico: you had that link prepared in advance, didn't you? :) |
12:32:08 | Yardanico | no |
12:32:11 | Yardanico | we updated with lqdev |
12:32:13 | Yardanico | spammed ctrl+r |
12:32:48 | * | narimiran moves head repeatedly left-right |
12:33:31 | Yardanico | choosenim works fine on WSL with ubuntu too |
12:34:14 | Yardanico | give us the links |
12:35:35 | narimiran | https://news.ycombinator.com/item?id=24800161 |
12:35:53 | narimiran | https://lobste.rs/s/xixojl/nim_1_4 |
12:36:33 | FromDiscord | <lqdev> narimiran tweet the blog post |
12:36:36 | narimiran | https://old.reddit.com/r/programming/comments/jc90bo/nim_14/ |
12:36:51 | narimiran | @lqdev of course! plan to, first to create all the discussion links :)( |
12:37:06 | FromDiscord | <Vindaar> thanks and congrats on v1.4 everyone ๐ |
12:37:25 | narimiran | paaartyyy mode |
12:37:38 | Yardanico | narimiran: twitter |
12:37:39 | Yardanico | you forgot |
12:37:43 | narimiran | everybody is invited, except those reporting bugs! |
12:37:49 | Yardanico | oh no :( |
12:37:53 | narimiran | Yardanico: "plan to, first to create all the discussion links" |
12:38:55 | Yardanico | narimiran: wonder why did you put the lobsters link to the r/programming post |
12:38:59 | Yardanico | why not the blog post? :P |
12:39:00 | narimiran | shit |
12:39:13 | Yardanico | you can edit I think? |
12:39:21 | narimiran | re-submitting it |
12:40:44 | narimiran | correct reddit link: https://old.reddit.com/r/programming/comments/jc91xp/nim_14/ |
12:41:16 | FromDiscord | <InventorMatt> has scoop been updated to be used with nim 1.4? |
12:41:27 | Yardanico | nim 1.4 just got released :P |
12:41:34 | Yardanico | less than an hour ago lol |
12:41:44 | Yardanico | well idk about scoop, iirc they might have automatic update checks? |
12:41:47 | FromDiscord | <Rika> nice |
12:41:56 | narimiran | btw, https://play.nim-lang.org/#ix=2Asu - nice job PMunch! |
12:42:18 | Yardanico | narimiran: also you missed the 4raq's nimconf video |
12:42:20 | Yardanico | about arc/orc |
12:42:24 | Yardanico | IMO it's better than the fosdem one |
12:42:28 | Yardanico | i mean longer |
12:42:39 | PMunch | narimiran, huh? |
12:42:49 | PMunch | Was that the wrong link, or am I missing something? |
12:42:50 | narimiran | PMunch: it uses 1.4.0 already |
12:42:56 | PMunch | Oh right :P |
12:43:00 | Yardanico | https://www.youtube.com/watch?v=aUJcYTnPWCg |
12:43:04 | narimiran | it is non-sarcastic congrats :) |
12:43:19 | PMunch | Yes it is set to automatically update :) |
12:43:21 | FromDiscord | <Rika> i dont understand the link |
12:43:24 | PMunch | And this time it actually worked |
12:43:32 | narimiran | aaah |
12:43:38 | PMunch | !eval echo NimVersion |
12:43:40 | narimiran | i didn't click "share on ix" after i changed it |
12:43:43 | NimBot | 1.4.0 |
12:43:56 | narimiran | this is the correct link: https://play.nim-lang.org/#ix=1HGb |
12:43:59 | Yardanico | !echo eval NimMajor & NimMinor & NimPatch |
12:44:01 | Yardanico | oops |
12:44:18 | narimiran | what is with the links and me today? how many times can i fuck up? |
12:44:37 | Yardanico | you're rushing it :P |
12:44:45 | FromDiscord | <lqdev> not so fast |
12:44:46 | narimiran | Yardanico: you're rushing me :) |
12:44:47 | FromDiscord | <Rika> bet youll fuck twitter up as well |
12:45:00 | Yardanico | narimiran: post people reported that choosenim 1.4 worked fine except one |
12:45:00 | narimiran | probaly |
12:45:04 | FromDiscord | <Rika> NARIMIRAN YOU GOTTA DO IT NOW YOURE LATE QUICKER DO IT |
12:45:06 | narimiran | *probaBly |
12:45:14 | Yardanico | https://i.imgur.com/vgWN8ay.png |
12:45:18 | narimiran | no tweet today |
12:45:23 | narimiran | it is better for everybody |
12:45:30 | FromDiscord | <lqdev> why? |
12:45:31 | FromDiscord | <Rika> lame smh |
12:45:38 | FromDiscord | <dom96> You really shouldn't post direct links to HN |
12:45:38 | * | kenran joined #nim |
12:45:41 | narimiran | because i'll fuck up |
12:46:01 | narimiran | @dom96 can you write a tweet instead of me? :) |
12:46:16 | FromDiscord | <dom96> Why do you think you'll screw it up? lol |
12:46:34 | narimiran | because it will be my screw up hat-trick :D |
12:46:46 | FromDiscord | <exelotl> "let statements can now be used without a value if declared with importc/importcpp/importjs/importobjc." ah this is nice! |
12:46:46 | narimiran | posting wrong links here constantly |
12:46:58 | FromDiscord | <dom96> > https://i.imgur.com/vgWN8ay.pngโต@Yardanico[IRC]#0000 ouch, is this happening for everyone? |
12:47:03 | FromDiscord | <Yardanico> no |
12:47:08 | FromDiscord | <Yardanico> it only happened to 1 person |
12:47:11 | FromDiscord | <Yardanico> lemme try myself as well |
12:47:17 | FromDiscord | <Yardanico> *downloads choosenim* |
12:49:38 | FromDiscord | <Yardanico> works for me |
12:49:41 | PMunch | I get the same error |
12:49:44 | Yardanico | huh |
12:49:50 | Yardanico | well |
12:49:54 | PMunch | Curiously it says that it is already built.. |
12:50:01 | FromDiscord | <Rika> worked for me too though |
12:50:02 | Yardanico | something wrong with the unpacker? |
12:50:05 | FromDiscord | <dom96> choosenim -v? |
12:50:07 | Yardanico | maybe on older distro releases |
12:50:07 | FromDiscord | <Rika> what versions of choosenim are we on |
12:50:14 | FromDiscord | <Rika> choosenim v0.6.0 (2020-03-06 18:24:57) [linux/amd64] |
12:50:19 | Yardanico | same |
12:50:25 | * | kenran quit (Ping timeout: 240 seconds) |
12:50:36 | narimiran | (please be older choosenim and not something more serious) |
12:50:47 | Yardanico | ok that person from Telegram is on choosenim 0.4.0 |
12:51:05 | Yardanico | choosenim update self @PMunch |
12:51:17 | PMunch | http://ix.io/2AUu |
12:51:37 | Yardanico | yeah |
12:51:40 | Yardanico | what's your choosenim version? |
12:51:46 | FromDiscord | <dom96> `choosenim -v` plz |
12:51:57 | PMunch | Not sure what it was, I just ran the update.. |
12:52:06 | narimiran | ...and? |
12:52:07 | Yardanico | narimiran: relax, seems like older choosenim issue :) updating choosenim worked for that person in telegram |
12:52:07 | FromDiscord | <Rika> can you not run choosenim -v? |
12:52:21 | narimiran | @Rika he already updated it |
12:52:27 | FromDiscord | <dom96> my god |
12:52:32 | FromDiscord | <Rika> oh you mean |
12:52:33 | Yardanico | @dom96 it's fine |
12:52:33 | FromDiscord | <Rika> i see |
12:52:35 | FromDiscord | <Rika> i was confused |
12:52:38 | PMunch | Ah, but updating choosenim did indeed fix it |
12:52:39 | Yardanico | that person on telegram had the same issue |
12:52:45 | Yardanico | but it got fixed by updating choosenim |
12:52:46 | FromDiscord | <dom96> good |
12:52:51 | Yardanico | need to mention this somewhere |
12:52:59 | Yardanico | "please run choosenim update self if you're not on latest choosenim" |
12:53:13 | narimiran | well, we can update the command provided in the article |
12:53:16 | narimiran | doing that right now |
12:53:30 | narimiran | so, `choosenim update self` is the command needed? |
12:53:33 | Yardanico | yes |
12:53:35 | FromDiscord | <dom96> AFAIK this doesn't work on Windows though |
12:53:37 | PMunch | Maybe choosenim should check for an update and prompt the user to upgrade if a new version is available? |
12:53:48 | Yardanico | narimiran: what do you think about changing https://www.youtube.com/watch?v=yA32Wxl59wo to https://www.youtube.com/watch?v=aUJcYTnPWCg |
12:53:51 | Yardanico | the second one is more fresh |
12:53:51 | FromDiscord | <dom96> sure, make an issue |
12:53:52 | Yardanico | and longer |
12:53:53 | PMunch | At least when it have to download a new version |
12:53:59 | narimiran | Yardanico: ok |
12:54:10 | Yardanico | the first one doesn't talk about ORC |
12:54:13 | FromDiscord | <dom96> jesus, stupid Discord with its link thumbnails |
12:55:37 | FromDiscord | <dom96> As a side note, we are once again not explicitly mentioning breaking changes in the release notes... |
12:56:07 | narimiran | Yardanico: updated. check if i fucked up the link :) |
12:56:31 | Yardanico | narimiran: you didn't ๐๐๐ |
12:57:12 | narimiran | i have an extra dot, but let's see what else will need to be fixed so i'll do it at the same time |
12:58:21 | narimiran | (some upvotes on lobsters would be nice) |
12:58:49 | Yardanico | narimiran: seems like people are getting confused about ARC and cycles |
12:58:55 | Yardanico | they don't seem to notice that ORC is ARC but can deal with cycles |
12:59:01 | Yardanico | see https://news.ycombinator.com/item?id=24800296 |
12:59:20 | narimiran | aaaaargh |
12:59:25 | narimiran | --gc:aaaaargh |
12:59:34 | Yardanico | --gc:RAAAAAAAAAWRRRRRRR |
13:00:09 | FromDiscord | <Rika> --gc:orca |
13:00:31 | FromDiscord | <haxscramper> Need to post disrupek's comment from yesterday verbatim to new thread. |
13:01:09 | narimiran | Yardanico: how come he came to that part and didn't read a previous paragraph that says, and i quote: "ORC is the existing ARC algorithm plus a cycle collector" |
13:01:20 | Yardanico | narimiran: too long didn't read |
13:01:29 | Yardanico | ther're professionals |
13:01:34 | FromDiscord | <dom96> I think the disconnect is with the fact that async needs cycles |
13:01:51 | FromDiscord | <dom96> Can we rephrase to make that more explicit? |
13:02:06 | * | abm joined #nim |
13:03:07 | FromDiscord | <haxscramper> > The only downside of ARC is that it can't deal with cycles (and not recommended for use with async), so for general use we'd recommend orc (which would be a new default) |
13:03:25 | narimiran | without that last part in (...) |
13:03:27 | FromDiscord | <dom96> But I take that person's point, it's not easy to know. Would be nice if the compiler could tell you whether your code has cycles |
13:04:01 | Yardanico | it does |
13:04:05 | Yardanico | for simple cases |
13:04:18 | Yardanico | if it could do that for all cases - there would be no need in a cycle collector kind of :P |
13:04:27 | Yardanico | there was an idea proposed by treeform to add logging to orc |
13:04:33 | Yardanico | so it would show what types form cycles |
13:04:34 | FromDiscord | <dom96> Am I reading a rephrased article now? |
13:04:36 | Yardanico | 4raq said that it's a good idea |
13:04:41 | FromDiscord | <dom96> because it looks perfectly clear to me |
13:04:49 | narimiran | haha, nope |
13:04:50 | FromDiscord | <haxscramper> I just don't see any reason to put things that could be viewed even remotely negative anywhere except for footnotes or end of the article |
13:05:30 | FromDiscord | <haxscramper> Because nobody ever reads anything, but immediately start start *assuming* |
13:11:59 | FromGitter | <offbeat-stuff> I have a long `array[x,float64]` how to convert it to `array[x,float32]` in a convinient way |
13:15:09 | FromGitter | <offbeat-stuff> Hi |
13:15:26 | FromGitter | <offbeat-stuff> Anyone online |
13:15:52 | FromDiscord | <Vindaar> we're here, lurking in the shadows.โตโตand hey ๐ |
13:16:18 | FromGitter | <offbeat-stuff> so can you answer my question |
13:17:19 | FromDiscord | <Vindaar> well, given that it's an array you cannot use procs from `sequtils`, e.g. `mapIt`. From the top of my head I'd just use a for loop. That's only 2 lines after all |
13:17:49 | narimiran | `for i, element in firstArray: secondArray[i] = float32(element)`? |
13:18:05 | FromGitter | <offbeat-stuff> okay so create a new array |
13:18:09 | FromGitter | <offbeat-stuff> and map to it |
13:18:11 | FromGitter | <offbeat-stuff> thanks |
13:18:46 | FromDiscord | <Vindaar> yes, for instance.โตIt's up to you to be certain of course that your float64 can be represented by float32 |
13:21:18 | narimiran | leorize, leorize[m]1 add some empty lines between your list on HN |
13:22:25 | leorize[m] | yea I just did |
13:44:20 | * | user0 joined #nim |
13:49:11 | * | Kiloneie quit (Read error: Connection reset by peer) |
13:52:18 | * | Kaivo quit (Quit: WeeChat 2.9) |
13:53:10 | * | cow-orker joined #nim |
13:54:36 | * | Kaivo joined #nim |
14:12:19 | * | PMunch quit (Quit: Leaving) |
14:16:30 | * | oculuxe joined #nim |
14:17:01 | * | oculux quit (Ping timeout: 264 seconds) |
14:28:19 | * | oculuxe quit (Ping timeout: 260 seconds) |
14:30:36 | FromGitter | <offbeat-stuff> I have a shaderProgramID from easygl How to check if it a viable shader |
14:33:05 | * | Lord_Nightmare quit (Ping timeout: 258 seconds) |
14:34:13 | * | i7d3v3l0p3r joined #nim |
14:34:22 | * | i7d3v3l0p3r quit (Remote host closed the connection) |
14:38:00 | * | oculux joined #nim |
14:38:21 | * | astronavt joined #nim |
14:38:56 | * | i7d3v3l0p3r joined #nim |
14:41:02 | FromDiscord | <KaiOShin> Hey |
14:41:33 | FromDiscord | <KaiOShin> How do I check I have a shaderProgramID from easygl How to check if it a viable shader |
14:41:43 | FromDiscord | <KaiOShin> Any help |
14:46:30 | * | kenran joined #nim |
14:46:30 | disruptek | you probably want to consult an easygl community. |
14:48:40 | * | rockcavera quit (Killed (hitchcock.freenode.net (Nickname regained by services))) |
14:48:41 | * | rockcavera joined #nim |
14:49:42 | FromDiscord | <KaiOShin> Okay lets talk opengl |
14:49:57 | FromDiscord | <KaiOShin> I have a var shaderProgramId = distinct Glint |
14:50:02 | FromDiscord | <KaiOShin> How do I check it |
14:50:12 | FromDiscord | <KaiOShin> Any gamedevs here |
14:50:14 | disruptek | sir, this is #nim. |
14:50:38 | FromDiscord | <Rika> <#706542664643772436> bruh |
14:50:45 | disruptek | #nim-gamedev seems to be a thing. |
14:50:46 | * | rockcavera quit (Killed (verne.freenode.net (Nickname regained by services))) |
14:50:47 | * | rockcavera joined #nim |
14:50:54 | FromDiscord | <Yardanico> indeed |
14:51:29 | * | kenran quit (Ping timeout: 258 seconds) |
14:51:45 | disruptek | clyybber: do you want me to pr criterion into important packages? |
14:52:07 | FromDiscord | <KaiOShin> How to do object orientied |
14:52:19 | FromDiscord | <KaiOShin> I want to extend a object |
14:52:24 | FromDiscord | <KaiOShin> with more properties |
14:52:34 | FromDiscord | <KaiOShin> type a = object |
14:52:37 | FromDiscord | <KaiOShin> thingy |
14:52:43 | disruptek | type NewObj = object of SomeOther ... |
14:52:56 | Prestige | https://nim-lang.org/docs/tut2.html#object-oriented-programming |
14:56:04 | FromDiscord | <KaiOShin> It says inheritence only works on non-final objects |
14:56:16 | disruptek | indeed. |
14:56:35 | FromDiscord | <KaiOShin> What is a rootObj |
14:56:47 | disruptek | did you see that link provided by Prestige? |
14:57:15 | FromDiscord | <KaiOShin> Yeah |
14:57:22 | FromDiscord | <KaiOShin> also what is that ref |
14:57:45 | disruptek | ~manual |
14:57:45 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek |
14:58:06 | disruptek | i think maybe scanning through the manual would save us all a lot of time. |
14:59:02 | FromDiscord | <KaiOShin> Got it ref is like a pointer |
14:59:10 | disruptek | a managed pointer, yes. |
15:03:25 | FromDiscord | <KaiOShin> How do i convert into another variable whose type is the extended version of it |
15:03:39 | FromDiscord | <KaiOShin> convert a var into another var |
15:03:54 | disruptek | NewType oldInstance or oldInstance.NewType |
15:05:55 | FromDiscord | <KaiOShin> It shows got that but wanted that error |
15:06:10 | FromDiscord | <Rika> what |
15:06:25 | FromDiscord | <KaiOShin> I have a new function for the main type |
15:06:38 | FromDiscord | <KaiOShin> I wanna use that to create the variable |
15:06:38 | FromDiscord | <Rika> that means youre passing the wrong type doesnt it? |
15:06:51 | disruptek | ~paste |
15:06:52 | disbot | paste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. -- disruptek |
15:06:55 | FromDiscord | <KaiOShin> then attach the other properties to it |
15:07:12 | disruptek | i think some time with the manual is warranted. there are code examples there that can give you a better feel for the language. |
15:08:10 | FromDiscord | <KaiOShin> https://play.nim-lang.org/#ix=2AVq |
15:09:10 | disruptek | model2d needs to be a ref. |
15:09:39 | disruptek | pro tip: when using inheritance, only use refs. |
15:10:12 | disruptek | nModel() needs to alloc result, also. |
15:13:22 | * | vicfred joined #nim |
15:14:24 | * | vicfred quit (Max SendQ exceeded) |
15:14:55 | * | vicfred joined #nim |
15:20:46 | FromGitter | <BeboBBM> Yeaaa, 1.4.0 is here ๐ฅฐ |
15:21:42 | TomDotTom | Does anyone know of a nim json (de)serialization library similar to Python's Marshmallow ? |
15:22:02 | disruptek | what's special about marshmallow? |
15:22:33 | supakeen | It's a deserialization library that uses object definitions. |
15:22:49 | supakeen | So you make an object and then say 'yo gimme this object from these bytes' or 'yo put this object into some bytes plx' |
15:23:00 | disruptek | sounds like json.to |
15:23:02 | supakeen | basically orm |
15:23:19 | supakeen | since it also does yo this object has a sequence of this object |
15:32:04 | narimiran | invalid links saga continues: https://forum.nim-lang.org/t/6936 |
15:32:20 | Yardanico | narimiran: there's a PR |
15:32:21 | Yardanico | to fix that |
15:32:34 | Yardanico | https://github.com/nim-lang/website/pull/236 |
15:32:35 | disbot | โฅ Fix #235 - invalid links |
15:32:47 | kinkinkijkin | hey disruptek, I'm having a bit of a hard time getting which specifics of swayipc are specific to sway ipc and which are necessary for unix socket comms |
15:33:05 | * | xioren joined #nim |
15:33:07 | narimiran | Yardanico: merged |
15:33:51 | Yardanico | it's not mine but good :) |
15:34:58 | disruptek | kinkinkijkin: only the socket.send or socket.recv stuff is unix socket related. |
15:35:11 | kinkinkijkin | ah |
15:35:14 | narimiran | still semi broken |
15:35:17 | narimiran | fixing again |
15:35:43 | kinkinkijkin | so, writing entirely between two nim processes, no serialization is needed? |
15:35:55 | FromDiscord | <Clyybber> disruptek: Sure |
15:36:08 | disruptek | serialization is (likely) needed, yes, but you don't need to use nesm. |
15:36:31 | disruptek | i mean, what is serialization? it's not needed if you don't need to serialize. ๐ |
15:36:49 | disruptek | you can use frosty for simple native serialization. |
15:36:49 | disruptek | !repo frosty |
15:36:49 | disbot | https://github.com/disruptek/frosty -- 9frosty: 11Serialize native Nim objects to strings, streams, or sockets โ 15 16โญ 0๐ด |
15:36:53 | kinkinkijkin | heh, im just writing strings |
15:36:59 | disruptek | use frosty. |
15:37:18 | disruptek | and maybe wrap supersnappy around it if you want compression. |
15:37:23 | disruptek | !repo supersnappy |
15:37:24 | disbot | https://github.com/guzba/supersnappy -- 9supersnappy: 11Dependency-free and performant Nim Snappy implementation. 15 15โญ 0๐ด |
15:37:42 | disruptek | clyybber: ๐ |
15:38:16 | kinkinkijkin | im just writing strings from one application to another, this is required? |
15:38:21 | kinkinkijkin | nim strings both ways |
15:38:31 | disruptek | no. if you're certain it's just strings, you don't need either. |
15:38:40 | * | Lord_Nightmare joined #nim |
15:39:00 | disruptek | there's a proc for sending strings; sendStr or recvStr or similarly named. |
15:39:13 | disruptek | it has a trivial impl. |
15:39:34 | kinkinkijkin | well that puts me back at 0 |
15:39:41 | disruptek | how do you figure? |
15:39:43 | kinkinkijkin | actually i can check something |
15:40:01 | kinkinkijkin | daemon is not reading anything from the ui client |
15:40:16 | kinkinkijkin | even though the ui client is successfully sending it |
15:40:23 | * | clyybber joined #nim |
15:40:31 | * | clyybber quit (Client Quit) |
15:40:47 | disruptek | what happens as a result of the recv? |
15:41:05 | kinkinkijkin | oh i just checked, .accept isn't even working for some reason |
15:41:13 | kinkinkijkin | the recv was returning nothing |
15:41:18 | kinkinkijkin | accept is waiting forever |
15:41:37 | disruptek | are you using async? |
15:41:40 | kinkinkijkin | yeah |
15:42:03 | disruptek | i dunno if i have an async server i can point you to. |
15:45:49 | kinkinkijkin | oh I got past that... changed an asyncCheck to a waitFor and it started working |
15:46:03 | disruptek | asyncCheck is for chumps. |
15:46:29 | * | clyybber joined #nim |
15:46:31 | kinkinkijkin | i gotta runForever so i gotta use *something* |
15:46:49 | disruptek | yes, but asyncCheck is never what you want. |
15:47:03 | kinkinkijkin | good to know then |
15:47:22 | * | arecacea1 quit (Remote host closed the connection) |
15:47:47 | disruptek | cue dom96 popping in to disagree. |
15:48:23 | disruptek | anyway, does your c/s work now? |
15:48:32 | disruptek | client/server |
15:48:41 | kinkinkijkin | almosst |
15:49:08 | kinkinkijkin | now crashes setting up the special sockets for daemon/ui communication |
15:49:12 | * | arecacea1 joined #nim |
15:49:18 | FromDiscord | <dom96> heh, asyncCheck is a fact of life |
15:49:20 | * | clyybber quit (Client Quit) |
15:49:26 | FromDiscord | <dom96> It's default behaviour sucks though |
15:49:26 | disruptek | your life, maybe. |
15:49:37 | FromDiscord | <dom96> (edit) 'It's' => 'Its' |
15:49:40 | disruptek | crashes how? |
15:50:22 | kinkinkijkin | real long repeating recursive error |
15:50:30 | kinkinkijkin | so im doing something VERY wrong here |
15:50:30 | TomDotTom | disruptek/supakeen: Got pulled afk at exactly the wrong time. Marshmallow is ORMish. Basically I'd like to be able do things like define defaults for missing fields when deserialising json into a Nim obj. |
15:51:00 | disruptek | you should maybe look at the status stuff. it's likely more full-featured. |
15:51:06 | disruptek | !repo nim-serialization |
15:51:08 | disbot | https://github.com/jangko/msgpack4nim -- 9msgpack4nim: 11 MessagePack serializer/deserializer implementation for Nim / msgpack.org[Nim] 15 86โญ 15๐ด 7& 13 more... |
15:51:34 | disruptek | well, not that. i forget what it's called. just trawling the status repos should find it right quick. |
15:56:26 | TomDotTom | Thx for the starting point I think status json-nim-serialization may do just enough |
15:56:33 | disruptek | nice. |
15:59:49 | TomDotTom | Ah, maybe not. Still no default pragma |
16:01:11 | TomDotTom | Might just have to handcode a bunch of `to` procs for the time being. |
16:02:01 | disruptek | !repo eminim |
16:02:02 | disbot | https://github.com/planetis-m/eminim -- 9eminim: 11JSON deserialization macro for nim 15 16โญ 4๐ด |
16:02:27 | disruptek | this might be worth working with. |
16:03:22 | Prestige | Dang, that's pretty neat |
16:03:57 | disruptek | yeah, it'll probably be the basic of a serialization side for my jason lib. |
16:04:04 | disruptek | er, deserialization |
16:05:01 | * | hnOsmium0001 joined #nim |
16:06:34 | TomDotTom | That might make life easier :) |
16:10:46 | * | TomDotTom quit (Ping timeout: 246 seconds) |
16:10:58 | * | natrys quit (Quit: natrys) |
16:14:32 | * | mipri joined #nim |
16:21:37 | * | Digitalcraftsman joined #nim |
16:31:52 | * | nature joined #nim |
16:33:15 | * | TomDotTom joined #nim |
16:38:09 | FromDiscord | <nikki> https://github.com/beached/daw_json_link |
16:38:16 | FromDiscord | <nikki> this one was cool for c++ |
16:38:48 | FromDiscord | <nikki> basically parses json directly into your user types without an intermediate representation |
16:44:29 | * | i7d3v3l0p3r quit (Remote host closed the connection) |
16:45:17 | * | aenesidemus joined #nim |
16:47:22 | * | kenran joined #nim |
16:48:55 | * | mmohammadi981266 joined #nim |
16:52:25 | * | kenran quit (Ping timeout: 246 seconds) |
16:55:03 | nikki93 | leorize: now that 1.4 is out, should nimlsp be updated for that change in nimsuggest for 1.4? or is that change not in 1.4 |
16:56:43 | * | arecacea1 quit (Remote host closed the connection) |
16:57:03 | * | arecacea1 joined #nim |
17:00:28 | disruptek | it's in 1.4. |
17:01:44 | * | mmohammadi981266 quit (Ping timeout: 260 seconds) |
17:03:32 | * | Digitalcraftsman quit (Quit: Connection closed) |
17:04:18 | * | Vladar quit (Quit: Leaving) |
17:07:16 | * | bunkford joined #nim |
17:11:35 | * | bung quit (Quit: Lost terminal) |
17:15:56 | * | bunkford quit (Quit: Leaving) |
17:16:02 | * | bunkf0rd joined #nim |
17:19:24 | * | mmohammadi981266 joined #nim |
17:31:57 | * | mmohammadi981266 quit (Ping timeout: 256 seconds) |
17:32:40 | * | mmohammadi981266 joined #nim |
17:38:13 | * | Ven`` joined #nim |
17:39:59 | * | mmohammadi981266 quit (Quit: I quit (โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป) |
17:40:34 | FromDiscord | <Innokentiy Sokolov> that c++ logo is a state of art |
17:49:19 | * | qeeg quit (Remote host closed the connection) |
17:51:38 | * | qeeg joined #nim |
17:51:53 | FromDiscord | <exelotl> needs lens flare |
17:58:15 | * | NimBot joined #nim |
17:59:44 | * | bunkf0rd quit (Quit: Leaving) |
18:05:25 | FromDiscord | <Avatarfighter> msgpack for nim |
18:05:30 | FromDiscord | <Avatarfighter> i love who ever made that |
18:13:56 | * | user0_ joined #nim |
18:14:57 | * | lritter quit (Quit: Leaving) |
18:15:25 | * | user0 quit (Ping timeout: 258 seconds) |
18:17:39 | * | Jesin quit (Quit: Leaving) |
18:18:10 | FromDiscord | <reilly> I'm making a Nimble package that relies on a submodule. Will Nimble automatically get that submodule when `nimble install`ing? |
18:18:38 | Yardanico | what is a "submodule"? |
18:18:41 | Yardanico | other nimble module or what? |
18:18:51 | FromDiscord | <reilly> A Git submodule. |
18:18:55 | Yardanico | no |
18:19:15 | * | TomDotTom quit (Ping timeout: 258 seconds) |
18:19:39 | FromDiscord | <reilly> Is there anything I can do about that, or am I just going to have to include a copy? |
18:20:04 | Yardanico | you can require a git submodule in .nimble requirements I think |
18:20:05 | disruptek | you can complain to shashlick or contribute to nimph. |
18:20:20 | disruptek | https://github.com/disruptek/nimph/pull/140 |
18:20:21 | disbot | โฅ nimph 2.0 |
18:20:48 | Yardanico | @reilly your submodule will need to have correct nimble structure too |
18:21:15 | disruptek | if you want nimble to understand it, i really wouldn't bother trying to make it work with submodules. |
18:21:51 | Yardanico | @reilly wait so your submodule is a different git repo right? |
18:21:55 | Yardanico | then there's no problem at all |
18:22:17 | Yardanico | just add it to .nimble file with a direct github link (that package will need to have correct nimble structure too) |
18:22:26 | Yardanico | and then you will be able to use it in your project just fine |
18:22:28 | Yardanico | with normal imports |
18:22:38 | disruptek | well, no. |
18:22:46 | Yardanico | why? |
18:23:01 | FromDiscord | <reilly> No, it's not another Nim thing anyway. It's basically just a load of json that I need, so that wouldn't work. |
18:23:05 | disruptek | because the path will be wrong and it won't be a submodule. |
18:23:15 | Yardanico | disruptek: we are talking about nimble packages |
18:23:32 | disruptek | Yardanico: are you sure about that? |
18:23:35 | Yardanico | @reilly it's better to include all files which are needed by the package statically |
18:23:39 | Yardanico | instead of downloading them |
18:23:50 | disruptek | don't tell the guy how to do his job. |
18:23:51 | supakeen | why is it parsecsv, parsecfg, parsesql vs xmlparser, htmlparser |
18:24:17 | supakeen | and how much would people be annoyed if it was parsexml and parsehtml |
18:24:30 | Yardanico | supakeen: |
18:24:30 | Yardanico | https://nim-lang.org/docs/parsexml.html |
18:24:46 | Yardanico | parse* packages offer "low-level" parsing |
18:24:51 | Yardanico | without any high level stuff, just parsing |
18:24:51 | supakeen | aha |
18:24:55 | supakeen | mrm |
18:25:40 | Yardanico | @treeform |
18:25:47 | Yardanico | there was a reason why 1.4 release wasn't linked on the forum ;) |
18:26:12 | Yardanico | it's not like narimiran forgot about it, no, it was done intentionally |
18:26:23 | Yardanico | see e.g. https://forum.nim-lang.org/t/6935#43448 |
18:34:43 | FromDiscord | <Clyybber> @reilly Maybe you could init the submodule in the .nimble |
18:35:30 | FromDiscord | <Clyybber> @dom96 might know more |
18:37:14 | * | gmaggior joined #nim |
18:40:04 | disruptek | you can do anything in nimscript, that's why it's such a poor choice. |
18:47:34 | FromDiscord | <treeform> @Yardanico lol the cat is out of the bag now, its on HN front page with tons of comments. You can't hide it now. |
18:47:55 | * | TomDotTom joined #nim |
18:48:16 | * | kenran joined #nim |
18:49:41 | * | lander joined #nim |
18:50:08 | reversem3 | What language paradigm are you supposed to use if not oop? Functional? |
18:51:39 | FromDiscord | <reilly> Procedural, probably. |
18:52:55 | FromDiscord | <Yardanico> @treeform no, HN was posted intentionally :)) |
18:53:08 | FromDiscord | <Yardanico> no forum post an no tweet - intentionally too |
18:53:37 | * | kenran quit (Ping timeout: 264 seconds) |
18:53:54 | disruptek | treeform: problem is, we still haven't learned how to do a release. |
18:54:27 | FromDiscord | <Rika> procedural, or afaik functional works too |
18:54:28 | * | Jesin joined #nim |
18:55:34 | FromDiscord | <lqdev> nim is more aimed at procedural |
18:56:01 | FromDiscord | <lqdev> with a tad of object oriented |
18:57:17 | FromDiscord | <nikki> also "generic programming" |
18:57:40 | disruptek | funny, i think of it as a compiled lisp. |
18:57:53 | FromDiscord | <nikki> is sbcl a compiled lisp |
18:57:58 | disruptek | sure. |
18:58:03 | FromDiscord | <nikki> cool |
18:58:26 | FromDiscord | <nikki> most lisps aren't heavy on static typing i think. there's eg. shen, and racket has a typing module |
18:58:47 | disruptek | well, i see these as the earliest days of a long future for nim. |
18:58:48 | FromDiscord | <nikki> oh also carp. which is kind of new and interesting. also compiles to C |
18:59:03 | disruptek | i expect us to get more functional as we go forward. |
18:59:18 | FromDiscord | <nikki> for sure. personally to me nim doesn't feel like about any one paradigm out there as much as just ... you just use its constructs and keep coding and it ends up fitting each thing you're doing |
18:59:23 | FromDiscord | <nikki> but also i haven't written that much nim yet at all lol |
18:59:57 | FromDiscord | <nikki> yea seems like that with the recent thing of taking non-var params mostly, but then var params when you need to modify. vs. ref objects everywhere |
19:00:54 | FromDiscord | <Rika> nim fits both procedural and functional |
19:00:57 | FromDiscord | <nikki> https://github.com/carp-lang/Carp this is carp -- doesn't have a gc. uses linear-ish things |
19:00:59 | FromDiscord | <Rika> it is up to the programmer which they uise |
19:02:02 | FromDiscord | <Recruit_main707> even oop if you really want to, but in a minimalistic way (that you can extend with macros) |
19:02:22 | FromDiscord | <Vindaar> I'm really surprised how positive most of the Nim reception is on e.g. HN these days ๐ |
19:02:52 | FromDiscord | <nikki> yea it also depends i guess on whether oop means static-classy oop like c++/java; or dynamic-classy oop like smaltalk/ruby, or just actor model shenanigans like erlang, and also whether multimethods like clos |
19:02:58 | disruptek | agree; people seem to be taking it more seriously lately. |
19:03:21 | FromDiscord | <Rika> maybe the trolls are sleeping right now |
19:03:34 | FromDiscord | <nikki> i feel like nim's ast ergonomics lend themselves to macros more nicely than s-exps. like the resultant DSLs end up looking really nice |
19:03:39 | FromDiscord | <Yardanico> trolls understood that Nim has grown past their influence :) |
19:03:58 | FromDiscord | <Clyybber> disruptek: Did you try --useVersion:1.2 with criterion now? |
19:04:12 | disruptek | not with head. |
19:04:33 | disruptek | criterion head uses --useVersion:1.2 in a test, though. |
19:05:19 | FromDiscord | <nikki> nim's flexibility is kind of incredible imo. https://github.com/yglukhov/nimsl i don't think this is really that achievable in any other statically typed lang out there |
19:06:45 | FromDiscord | <Recruit_main707> could the go gc be broken? |
19:07:33 | FromDiscord | <Vindaar> @nikki everytime I hack together some new DSL I'm almost aghast at how far Nim syntax can be abused, haha |
19:07:36 | disruptek | i think google would be making a bigger stink. ๐ |
19:08:17 | FromDiscord | <nikki> @Recruit_main707 broken as in leaking or sth? |
19:08:40 | * | TomDotTom quit (Quit: Leaving) |
19:08:50 | FromDiscord | <Recruit_main707> when i run the thavlak test it just said everything was nil and looped hella fast without doing nothing |
19:08:51 | FromDiscord | <nikki> @Vindaar lol i really want to make a DSL that basically turns vim into a tracker (like a fasttracker 2 style music tracker) |
19:08:55 | * | TomDotTom joined #nim |
19:09:29 | FromDiscord | <nikki> @Recruit_main707 maybe it biases toward not deallocating at all if it's a quick-run program? is it a long-running program? |
19:09:47 | FromDiscord | <Recruit_main707> n |
19:10:05 | FromDiscord | <Recruit_main707> pressed enter too soon |
19:10:06 | FromDiscord | <Recruit_main707> no |
19:10:15 | FromDiscord | <nikki> as in not long-running? |
19:10:19 | FromDiscord | <Recruit_main707> ye |
19:10:30 | FromDiscord | <nikki> i think go may just not run the GC |
19:11:03 | FromDiscord | <Vindaar> @nikki how would _that_ work though? |
19:11:26 | FromDiscord | <nikki> @Vindaar the tracker DSL? |
19:11:51 | FromDiscord | <Vindaar> yes |
19:11:56 | FromDiscord | <Recruit_main707> i tried it yesterday and it didnt work, im trying today and it says it couldnt load libgo.dll, so im looking for it before opening an issue |
19:12:10 | FromDiscord | <Recruit_main707> (edit) 'work,' => 'work correctly,' |
19:12:27 | disruptek | you probably need the later windows dist. |
19:12:28 | FromDiscord | <nikki> @Vindaar i was thinking that maybe you could have different parts. like a drum machine. and then some synth weirdness. and trigger samples. and they're all having local programs to time themselves at various intervals. so you could make weird polyrhythmic techno. so not really a tracker necessarily but you could have modules that read data that looks like a bunch of lines of notes that would be tracker-like |
19:12:43 | FromDiscord | <nikki> i haven't tried go on windows and don't plan to lol |
19:12:49 | FromDiscord | <nikki> only have used it on macos / linux so far |
19:13:03 | * | kenran joined #nim |
19:13:08 | FromDiscord | <Yardanico> @disruptek good joke |
19:13:10 | disruptek | there was an issue with windows dist not getting all the binaries it needed. |
19:13:15 | FromDiscord | <Yardanico> But we don't ship go dll :) |
19:13:23 | FromDiscord | <tinygiant> Got another one ... need to pull function comments and prototypes from a plain text code file, including multi-line comments (and possibly multi- line prototypes) that use various methods for marking the comments. Is this a job for npeg? Anyone know if there is a working example out there somewhere? |
19:13:40 | FromDiscord | <Vindaar> @nikki wait I'm just not quite following how you'd use macros for that, but that's probably because the idea is over my head, hehe |
19:14:13 | disruptek | tinygiant: something like that (still in devel): |
19:14:15 | disruptek | !repo gully |
19:14:16 | disbot | https://github.com/disruptek/gully -- 9gully: 11a code comment formatter 15 3โญ 0๐ด |
19:14:21 | FromDiscord | <nikki> haha just like (in multiple lines) `drums: x x - x x - x -; synth: c e - c#` or something |
19:14:25 | disruptek | uses npeg for comment parsing. |
19:14:31 | FromDiscord | <nikki> @Vindaar ^ like a notes + timing DSL for musix |
19:14:34 | FromDiscord | <nikki> (edit) '@Vindaar ^ like a notes + timing DSL for ... musix' => '@Vindaar ^ like a notes + timing DSL fortriggering' |
19:14:36 | FromDiscord | <Vindaar> ohh! that makes sense @nikki haha |
19:14:39 | FromDiscord | <Recruit_main707> > But we don't ship go dll :)โต@Yardanico where can i get it |
19:14:51 | disruptek | how is it that you had it yesterday and not today? |
19:14:51 | FromDiscord | <Yardanico> I don't know |
19:14:53 | FromDiscord | <Yardanico> Never tried it |
19:15:06 | FromDiscord | <nikki> @Vindaar nice. and yeah you can imagine different parts having different lengths and thus making weird offbeat music |
19:15:13 | FromDiscord | <Vindaar> yup |
19:15:16 | FromDiscord | <Recruit_main707> disruptek, maybe i missed the error message yesterday |
19:15:19 | FromDiscord | <Yardanico> Try downloading Go |
19:15:24 | FromDiscord | <Yardanico> Maybe it has that dll |
19:15:29 | FromDiscord | <Yardanico> Seems logical, right? |
19:15:36 | FromDiscord | <Recruit_main707> and there it goes the go gc benchmark |
19:15:43 | FromDiscord | <nikki> @Vindaar one thing that'd be cool is you could actually have code that says like "increase this parameter of the drum machine over time, until time T" or sth. like code in logic for your song. instead of needing to draw those curves out in Ableton or w/e |
19:15:50 | disruptek | i thought go was a learning language for der kinder koden. |
19:16:10 | FromDiscord | <tinygiant> Thanks! I'll take a look as soon as I can. |
19:16:11 | Prestige | Haha. |
19:16:16 | FromDiscord | <nikki> imagining kubernetes as a drawing hung on a kindergarten wall rn |
19:16:32 | FromDiscord | <nikki> it makes sense! each drawing is a 'node' and you use crayons to connect them |
19:16:35 | FromDiscord | <nikki> distributed systems woohoo |
19:17:17 | disruptek | kubes rhymes with pubes. |
19:17:31 | disruptek | horribad. |
19:17:38 | * | kenran quit (Ping timeout: 265 seconds) |
19:17:41 | disruptek | hateful no-good platform. |
19:18:33 | FromDiscord | <Vindaar> @nikki doesn't omni allow you to do this sort of stuff? |
19:18:56 | * | kenran joined #nim |
19:19:23 | FromDiscord | <nikki> oh i think it might. only briefly looked at it |
19:19:45 | FromDiscord | <nikki> it seems to be the same idea haha ๐ yeag |
19:19:49 | FromDiscord | <Vindaar> (music stuff is really not my expertise haha) |
19:20:01 | FromDiscord | <nikki> the main successful other real langs out there for this kinda thing seem to be ChucK, supercollider, ... |
19:21:43 | FromDiscord | <nikki> @Vindaar what are you hacking on in nim? |
19:21:59 | FromDiscord | <Vindaar> @nikki gotta go for a bit, bbl |
19:27:27 | FromDiscord | <treeform> disruptek, are you going to name thing with constant-constant-y too now? |
19:27:35 | FromDiscord | <treeform> like https://github.com/disruptek/gully |
19:27:36 | disruptek | no. |
19:27:41 | disruptek | that shit is old. |
19:28:20 | FromDiscord | <treeform> ok |
19:28:57 | disruptek | your naming scheme is safe, bro. |
19:29:07 | FromDiscord | <treeform> thanks |
19:29:18 | disruptek | frosty slipped in accidentally. |
19:29:27 | disruptek | lunacy, too. |
19:30:08 | disruptek | i don't want long-term association with the dogshit i publish. |
19:31:59 | FromDiscord | <tomck> Hello, what's nim's support for bitfields? |
19:32:08 | disruptek | see the manual for sets. |
19:32:50 | FromDiscord | <tomck> Sorry, i'm talking about 'bitsize' |
19:32:59 | disruptek | they can be converted to bitfields by default; you can set the conversion type with {.sizeof: int32.} or whatever, if necessary. |
19:33:10 | FromDiscord | <tomck> I've seen there's a pragma for generating them through to C, is that guaranteed for any other platforms or is it just backend dependent? |
19:33:25 | disruptek | which pragma? |
19:33:34 | FromDiscord | <tomck> sent a long message, see http://ix.io/2AXm |
19:33:39 | FromDiscord | <tomck> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-bitsize-pragma |
19:34:03 | FromDiscord | <tomck> does this just hint for c generation, or is there any support for other backends? |
19:34:16 | disruptek | you mean like objc? |
19:34:24 | FromDiscord | <tomck> I'm writing some graphics code, need to be assured that certain bits are being packed correctly |
19:34:26 | FromDiscord | <tomck> yeah or c++ |
19:34:30 | FromDiscord | <tomck> there's a c++ backend right..? |
19:34:49 | FromDiscord | <tomck> Like, is this only defined in terms of the c backend |
19:34:51 | disruptek | should be fine for c/c++. |
19:35:01 | * | Digitalcraftsman joined #nim |
19:35:12 | FromDiscord | <tomck> alright cool |
19:35:40 | disruptek | sorry, i was still thinking you meant a .bitsize on a set type.. ๐ |
19:36:52 | disruptek | tomck: where have you been hiding, anyway; seems like i haven't seen you aroun' lately. |
19:38:07 | FromDiscord | <shashlick> Who wants some help on something? Have some brain cells to offer for the next hour |
19:38:27 | disruptek | i don't believe it. |
19:39:25 | reversem3 | So donโt treat nim like python then I take it? |
19:39:52 | FromDiscord | <Elegant Beef> Nope |
19:40:14 | FromDiscord | <Elegant Beef> Nimscript can kinda be treated like python, but they're very different languages significant whitespace aside |
19:40:41 | disruptek | c'mon, nim is basically python. |
19:40:52 | disruptek | let's just stop pretending. |
19:40:55 | FromDiscord | <Elegant Beef> How's python's IC coming |
19:41:10 | disruptek | i have an infinite loop in my pycompiler. |
19:42:52 | FromDiscord | <tomck> disruptek: Just busy with stuff, just got a brand new baby so don't have much time for stuff like this |
19:43:14 | disruptek | nice, i hear the 2020 models are pretty sweet. |
19:43:21 | FromDiscord | <tomck> mm, quite loud |
19:43:33 | FromDiscord | <tomck> Plus old project got a bit bogged down in the details, same as always |
19:44:03 | FromDiscord | <tomck> Really like nim though, so will probably be popping back in for new projects as they come, doing a voxel game engine atm, prepare for more arc questions! |
19:44:18 | disruptek | cool, we need more arc problems. |
19:44:34 | disruptek | arc bugs been getting pretty thin on the ground. |
19:46:50 | * | kenran quit (Ping timeout: 260 seconds) |
19:47:02 | reversem3 | Iโm just trying to figure the right way to program with nim |
19:47:27 | FromDiscord | <Elegant Beef> Preferablly with your keyboard |
19:49:08 | disruptek | it's closer to go than python, i'd say. |
19:49:18 | disruptek | closer to rust than go. |
19:50:11 | FromDiscord | <tomck> disruptek: What're you working on >? |
19:50:29 | disruptek | i'm trying to heat my whole house with infinite loops. |
19:50:37 | nikki93 | reversem3: may make sense to just keep practicing and then you'll develop your own ideas of ways to program with it |
19:50:46 | FromDiscord | <Rika> mm, computer-as-a-space-heater |
19:50:55 | FromDiscord | <Rika> CaaSH |
19:51:14 | * | Digitalcraftsman quit (Quit: Connection closed) |
19:51:17 | nikki93 | reversem3: like, you may develop insights that aren't describable purely in terms of other programming languages, and those are the must fun + valuable ones in my experience |
19:51:28 | disruptek | !pull mangling |
19:51:30 | disbot | https://github.com/nim-lang/Nim/pull/14632 -- 3porting name mangling from ic effort 7& 19 more... |
19:52:01 | nikki93 | reversem3: having practical projects to work through is useful, the "nim in action" book has some ideas and guidance |
19:52:15 | FromDiscord | <dom96> > I'm making a Nimble package that relies on a submodule. Will Nimble automatically get that submodule when `nimble install`ing?โต@reilly I mean I don't know why @Yardanico said no, pretty sure this should work |
19:52:45 | FromDiscord | <nikki> if it does the equivalent of `git clone --recursive` then it should work right? |
19:53:51 | FromDiscord | <dom96> pretty sure it runs `git submodule --init` |
19:54:31 | FromDiscord | <shashlick> @dom96 - https://github.com/dom96/choosenim/pull/231 |
19:54:32 | disbot | โฅ Post all builds on master |
19:55:18 | FromDiscord | <dom96> where do I find the built binaries? |
19:55:29 | * | Digitalcraftsman joined #nim |
19:56:02 | FromDiscord | <shashlick> i have some posted here - https://github.com/genotrance/choosenim/releases |
19:56:04 | FromDiscord | <nikki> https://github.com/nim-lang/nimble/blob/6609a490a97510c14d4d7784d06e33e1c5e9f3dc/src/nimblepkg/download.nim#L53-L54 seems like it does to `--recursive` on the initial clone too |
19:56:13 | FromDiscord | <shashlick> they won't get built on your repo until you merge it cause it only builds for master |
19:56:31 | * | Digitalcraftsman quit (Client Quit) |
19:56:43 | FromDiscord | <Recruit_main707> can you get the gc that is being used instead of checking if x gc is being used? |
19:56:56 | disruptek | from config options, most likely. |
19:57:17 | disruptek | TGCMode from compiler/options.nim |
19:57:29 | FromDiscord | <dom96> > they won't get built on your repo until you merge it cause it only builds for masterโต@shashlick sure, I understand. Releasing is priority right now |
19:57:32 | FromDiscord | <dom96> I'll review that PR later |
19:57:37 | disruptek | ConfigRef.selectedGC |
19:58:00 | FromDiscord | <shashlick> @dom96 - you can use those binaries to verify that the new static builds work |
19:58:04 | FromDiscord | <shashlick> i tested them and they seem fine |
19:58:13 | FromDiscord | <shashlick> i have osx 10.13 tho so not sure if that's old enough |
19:58:34 | FromDiscord | <dom96> Which platforms did you test? |
19:58:43 | FromDiscord | <dom96> Anyone else around that wants to help us test them? ๐ |
19:58:43 | FromDiscord | <shashlick> win/lin/osx |
19:58:52 | FromDiscord | <shashlick> i asked multiple times here, no responses |
19:59:20 | FromDiscord | <dom96> Test your current platforms here: https://github.com/genotrance/choosenim/releases |
20:00:06 | FromDiscord | <Recruit_main707> thanks disruptek |
20:01:16 | FromDiscord | <dom96> @shashlick hm, this seems like a bug https://media.discordapp.net/attachments/371759389889003532/766752642578776084/unknown.png |
20:01:22 | FromDiscord | <dom96> not a showstopper though |
20:01:30 | FromDiscord | <tomck> disruptek: What infinite loops? i may have some of my own if you're still cold |
20:01:47 | FromDiscord | <tomck> @dom96 Nim's on 1.4 now? |
20:01:58 | FromDiscord | <dom96> yep, it was just released today |
20:02:07 | FromDiscord | <tomck> ah, cool |
20:02:22 | disruptek | it gets cold in vermont; i may need more cores. |
20:02:52 | FromDiscord | <shashlick> @dom96 isn't that because they have their PATH set incorrectly |
20:03:29 | FromDiscord | <dom96> it is set correctly though |
20:03:36 | FromDiscord | <dom96> and I just got the same on my mac |
20:04:11 | FromDiscord | <dom96> oh wait, on mac the warning is valid |
20:04:32 | FromDiscord | <shashlick> i'm also seeing it on linux - hmm |
20:04:53 | FromDiscord | <dom96> it shouldn't happen on ~/.nimble/bin though since that is where choosenim installs |
20:05:54 | FromDiscord | <dom96> is that what it complains about on Linux for you? |
20:06:24 | FromDiscord | <nikki> how does one build the .rst files under doc/ ? looking to render manual.rst to a pdf that is well-sized and formatted for reading on my ipad |
20:06:39 | FromDiscord | <reilly> A bit of poking around reveals it doesn't appear to be cloning the submodule. I wouldn't be surprised if this was an error on my part, though. |
20:06:42 | FromDiscord | <shashlick> @dom96 - ya it complains on install but is fine if I just switch around |
20:06:53 | FromDiscord | <shashlick> also, remove doesn't really work either |
20:07:03 | FromDiscord | <dom96> @shashlick I also get the "blah blah use --firstInstall" message when switching on Windows |
20:07:30 | FromDiscord | <shashlick> https://media.discordapp.net/attachments/371759389889003532/766754206967136276/unknown.png |
20:07:37 | FromDiscord | <nikki> ah i see, it's through koch |
20:08:09 | FromDiscord | <dom96> huh, weird |
20:08:28 | FromDiscord | <shashlick> remove is not even in the help |
20:08:42 | FromDiscord | <shashlick> hm, probably cause my branch wasn't rebased |
20:08:43 | FromDiscord | <shashlick> meh |
20:08:51 | FromDiscord | <dom96> ahh, yeah, probably. |
20:09:05 | FromDiscord | <dom96> do the builds take long? |
20:09:12 | FromDiscord | <shashlick> 15 minutes |
20:09:30 | FromDiscord | <shashlick> if you merge that PR, it will build latest master |
20:09:49 | FromDiscord | <shashlick> changes aren't much beyond getting some values from git and setting env vars |
20:10:14 | FromDiscord | <dom96> ok, merged. I don't like that build.sh is in the top-level but oh well |
20:10:41 | * | narimiran quit (Quit: leaving) |
20:10:48 | reversem3 | <nikki93 "nixfreak: having practical proje"> Thanks Iโll just keep practicing |
20:11:19 | FromDiscord | <shashlick> @dom96 - you need to set GITHUB_OAUTH_TOKEN in travis tho - i removed the secure key and forgot about it ๐ |
20:11:35 | FromDiscord | <shashlick> meh |
20:11:57 | FromDiscord | <shashlick> had to do that so that i could test deploy on my fork |
20:13:55 | FromDiscord | <dom96> where do I put that? |
20:14:00 | FromDiscord | <shashlick> in the UI |
20:14:05 | FromDiscord | <dom96> lol |
20:14:11 | FromDiscord | <dom96> can you be more specific? ๐ |
20:14:16 | FromDiscord | <shashlick> https://travis-ci.org/github/dom96/choosenim/settings |
20:14:34 | FromDiscord | <shashlick> i seem to have access - i can add my token |
20:15:03 | FromDiscord | <shashlick> but it might show my account on releases |
20:15:11 | FromDiscord | <shashlick> lmk i can do it if you prefer |
20:15:23 | * | TomDotTom quit (Ping timeout: 260 seconds) |
20:15:51 | FromDiscord | <dom96> yeah, go for it |
20:17:11 | FromDiscord | <shashlick> okay done |
20:17:43 | Zevv | congrats again folks! |
20:20:44 | * | TomDotTom joined #nim |
20:20:52 | Zevv | HN discussions ending up _very_ positive as well, excellent PR |
20:23:25 | FromGitter | <iffy> Yes, congrats everyone! |
20:23:32 | FromDiscord | <dom96> yeah, nice to see some testimonials ๐ |
20:24:02 | FromDiscord | <Elegant Beef> Hey my nico test of my nimscript interop works nicely ๐ https://streamable.com/i0boat |
20:24:13 | Prestige | Nice :) |
20:24:40 | Prestige | that's really cool @ele |
20:25:01 | FromDiscord | <Recruit_main707> it surely is |
20:25:10 | FromDiscord | <Elegant Beef> Thanks, i'm just happy my past few days work actually sorta works |
20:25:30 | FromGitter | <iffy> And @dom96, I'm really excited to see a choosenim pre-release coming up! Thanks for all your work on that |
20:26:02 | FromDiscord | <dom96> Big thanks to @shashlick too, he's been doing a lot more work than me lately, and not just on choosenim but also on nimble ๐ |
20:26:41 | FromDiscord | <Elegant Beef> I still have an issue with my const i use to store the script signatures, order of declaration is the difference between having a working project |
20:28:53 | FromDiscord | <Clyybber> @Elegant Beef damn, awesome |
20:29:05 | FromDiscord | <Clyybber> although, I cannot forgive `){.` |
20:29:44 | FromDiscord | <Elegant Beef> I mean i dont deserve any praise, i'm just mostly removing boilerplate from pmunch's writeup |
20:30:38 | FromDiscord | <Elegant Beef> The most creative thing i've done is cry cause of that const : P |
20:32:16 | FromDiscord | <Elegant Beef> These two lines are the bane of my existance working on this project https://media.discordapp.net/attachments/371759389889003532/766760444487925760/unknown.png |
20:34:38 | FromDiscord | <exelotl> in the future it won't be possible to use IC when you have {.compileTime.} variables right? |
20:35:24 | FromDiscord | <exelotl> (I'm using them a fair bit, in my project, and it probably won't be easy to port them all to using macrocache) |
20:38:44 | FromDiscord | <dom96> there is a module you can use for storing data between macros invokations if that's what you're using this for |
20:38:54 | FromDiscord | <dom96> for some reason the name of this module always escapes me, but I use it in jester |
20:39:28 | FromDiscord | <notchris> Hello all! |
20:39:42 | Zevv | hi chris |
20:39:43 | Zevv | oh wait |
20:40:18 | FromDiscord | <Rika> hi !chris |
20:40:23 | FromDiscord | <notchris> I'm a new nim user, and I'm having an issue with VsCode where I have a procedure and type in one file, i 'import' it, but in my main file, when i save, it will error and say it does not exist until i save again |
20:40:33 | FromDiscord | <notchris> also hi @Rika zevv ๐ |
20:40:36 | FromDiscord | <exelotl> @dom96 it's this one: https://nim-lang.org/docs/macrocache.html |
20:41:29 | FromDiscord | <lqdev> some docs for this module would be niceโฆ |
20:41:32 | FromDiscord | <notchris> I am using "Nim Alt" for vscode |
20:41:50 | FromDiscord | <lqdev> @notchris that's actually intended |
20:41:54 | FromDiscord | <Elegant Beef> Doesnt nim suggest only lint saved files? |
20:41:55 | FromDiscord | <lqdev> how else would you implement that? |
20:42:01 | FromDiscord | <lqdev> nimsuggest only sees what you saved |
20:42:16 | FromDiscord | <lqdev> or rather, the compiler |
20:42:18 | FromDiscord | <notchris> Ah I see, i think its because i come from js, and the imports update automatically |
20:42:22 | FromDiscord | <lqdev> because errors are handled by `nim check` :) |
20:42:36 | FromDiscord | <notchris> Is that because JS doesnt need compilation? |
20:42:47 | FromDiscord | <lqdev> that's probably part of the reason |
20:43:06 | FromDiscord | <lqdev> compiling nim is much slower than executing js |
20:43:10 | FromDiscord | <InventorMatt> If you turn autosave on you could quietly solve the problem permanently |
20:43:18 | FromDiscord | <notchris> That would be cool |
20:43:24 | FromDiscord | <notchris> Also, in nims defense |
20:43:35 | FromDiscord | <notchris> compiling / running nim takes 1/2 the time to run a webpack app |
20:43:50 | FromDiscord | <lqdev> i just used to ctrl+s every two seconds lol |
20:44:14 | FromDiscord | <notchris> @InventorMatt Is that option in the vscode config? |
20:44:39 | * | lander quit (Ping timeout: 245 seconds) |
20:45:08 | FromDiscord | <Elegant Beef> Vscode has a setting for autosaving every X seconds |
20:45:13 | FromDiscord | <notchris> ๐ฎ |
20:45:33 | FromDiscord | <notchris> Is there a potential downside? |
20:45:49 | FromDiscord | <Elegant Beef> You have a record player as a HDD and it takes ages to save ๐ |
20:46:13 | FromDiscord | <notchris> Haha fair |
20:46:39 | FromDiscord | <shashlick> @dom96 - https://github.com/dom96/choosenim/releases |
20:47:02 | FromDiscord | <dom96> @shashlick brilliant. I guess it would be nice to fix those warnings before releasing |
20:47:09 | FromDiscord | <dom96> I'm currently distracted by HN ๐ |
20:47:23 | FromDiscord | <shashlick> makes sense - will try to figure it out |
20:48:15 | FromDiscord | <shashlick> remove works now ๐ |
20:48:26 | FromDiscord | <Elegant Beef> So going back to my const thing, this static call, is there a better way to implement this without using a static call? https://play.nim-lang.org/#ix=2AXK |
20:49:06 | FromDiscord | <notchris> I need to learn about macros / what they do ๐ |
20:49:28 | FromDiscord | <Elegant Beef> Lol they work on the AST to modify the passed in user written code |
20:49:32 | FromDiscord | <Rika> if you're a beginner, i recommend only doing so after learning more about nim |
20:49:33 | FromDiscord | <Elegant Beef> They're awesome and yes you do |
20:49:51 | FromDiscord | <Elegant Beef> Yea you dont need to learn them as a beginner but once you start using them you'll always use them |
20:50:08 | FromDiscord | <dom96> also, welcome to the Nim discord @notchris ๐ |
20:50:11 | FromDiscord | <notchris> @Rika True, also is your name from Hirgurashi? |
20:50:24 | FromDiscord | <notchris> thank you @dom96 my friend introduced me to Nim and im enjoying it a lot! |
20:50:41 | FromDiscord | <Rika> no it is not |
20:50:44 | FromDiscord | <notchris> I've only made a few small things so far |
20:50:45 | FromDiscord | <Elegant Beef> Good friend |
20:50:56 | FromDiscord | <notchris> @Rika Ah okay, Rika from higurashi has a purple hair xD |
20:51:24 | FromDiscord | <Rika> okay |
20:52:10 | FromDiscord | <notchris> @Rika I saw your avatar and thought maybe it was. Which title is from? |
20:52:20 | FromDiscord | <Rika> not an anime |
20:52:26 | FromDiscord | <Rika> https://www.youtube.com/channel/UCkngxfPbmGyGl_RIq4FA3MQ/ |
20:52:58 | FromDiscord | <notchris> Ah musical artist? |
20:53:05 | FromDiscord | <notchris> It sounds good |
20:53:32 | FromDiscord | <Rika> no, streamer |
20:53:44 | FromDiscord | <notchris> Haha im just totally guessing wrong today! |
20:54:10 | * | TomDotTom quit (Ping timeout: 256 seconds) |
20:55:32 | FromDiscord | <notchris> It's cool how they sync the animation with the audio in a way |
20:56:09 | FromDiscord | <Rika> let's move to <#371759607934353448> |
21:06:26 | FromDiscord | <Elegant Beef> I just keep playing with this interop and have got inputs from nico now |
21:12:35 | FromDiscord | <shashlick> @dom96 - all builds are done |
21:12:44 | FromDiscord | <shashlick> am not able to reproduce that shadowed issue anymore |
21:15:35 | FromGitter | <alehander92> toi |
21:15:36 | FromGitter | <alehander92> oi |
21:15:49 | FromGitter | <alehander92> i am looking at chats to find out people looking for me |
21:15:58 | FromGitter | <alehander92> and i only found out disruptek and yardanico are best pals now |
21:16:05 | FromGitter | <alehander92> so dissapointed |
21:16:19 | FromGitter | <alehander92> i am so off nim these days, that i saw from HN |
21:16:22 | FromGitter | <alehander92> that 1.4 is out :D |
21:16:33 | FromGitter | <alehander92> i think |
21:17:41 | Prestige | Yep! |
21:17:42 | * | rockcavera quit (Remote host closed the connection) |
21:17:53 | FromDiscord | <Vindaar> @nikki still around? |
21:18:08 | FromDiscord | <Clyybber> alehander92: Hey |
21:18:12 | FromDiscord | <Clyybber> why disappointed? |
21:18:15 | FromDiscord | <nikki> @Vindaar hai |
21:19:28 | FromDiscord | <Vindaar> @nikki I'm mostly doing science related stuff. my thesis (data analysis), plotting, optimization, data storage, ... recent weekend projects have been a R โ Nim bridge and a DSL to write CT checked TeX code from Nim |
21:19:36 | FromDiscord | <nikki> ah i see |
21:19:48 | FromDiscord | <dom96> @shashlick okay, in that case I'm releasing |
21:19:58 | FromDiscord | <dom96> can't even remember how to release choosenim anymore lol |
21:20:17 | * | lum_mobile joined #nim |
21:20:49 | * | lum_mobile quit (Client Quit) |
21:20:53 | FromDiscord | <shashlick> just need to tag v0.6.1 and update the nim-lang.org version file I guess |
21:20:57 | FromDiscord | <shashlick> but we need a change log |
21:21:24 | FromDiscord | <dom96> yeah, writing one |
21:21:30 | FromDiscord | <dom96> also, I think we can bump to 0.7.0 |
21:22:25 | FromGitter | <alehander92> i am kidding Clyybber |
21:22:47 | FromGitter | <alehander92> wow disruptek writing top HN comments |
21:22:51 | FromGitter | <alehander92> so corporate dude |
21:23:24 | FromGitter | <alehander92> what else is new these days |
21:25:28 | FromDiscord | <shashlick> cool |
21:27:27 | leorize[m] | HN stopped hating Nim |
21:27:29 | leorize[m] | that's kinda new tbh |
21:28:56 | FromDiscord | <shashlick> it's just the remove command and static builds, plus bug fixes |
21:29:01 | FromGitter | <akavel> Hi! In JS backend, I have a thirdparty func returning a JS Promise. Can I wrap it somehow with Nim's `asyncjs`? |
21:30:45 | * | mathsaey joined #nim |
21:31:41 | FromGitter | <akavel> (specifically, I'm in progress of trying to write a Firefox Webextension, and most API calls there return Promises) |
21:32:48 | FromDiscord | <dom96> bah, forgot I had this PR https://github.com/dom96/choosenim/pull/226 |
21:32:49 | disbot | โฅ Nightly update improvements |
21:32:56 | FromDiscord | <dom96> Let's hope merging it doesn't break anything ๐ |
21:32:56 | FromGitter | <akavel> (e.g. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks/create - I want to create several bookmarks in order, so I believe I need to chain them sequentially one by one) |
21:33:14 | * | mathsaey quit (Client Quit) |
21:34:28 | FromDiscord | <Clyybber> aleahdner92: Ah, thought so :P |
21:36:18 | leorize[m] | @alehander92 should be proficient in nim's js IIRC |
21:36:25 | leorize[m] | or was it someone else? |
21:38:09 | * | xet7 quit (Quit: Leaving) |
21:40:28 | leorize[m] | @akavel looks like `Future[T]` is basically Promises |
21:40:55 | * | xet7 joined #nim |
21:41:03 | leorize[m] | just tell the compiler that those procedures return `Future[T]`, then they will be usable with asyncjs |
21:43:17 | FromGitter | <akavel> hm; so, something like: `proc createBookmark(params: JsObject): Future[JsObject] {.async, importcpp: "browser.bookmarks.create(#)".}` ? |
21:50:08 | FromDiscord | <dom96> oh, I forgot about reddit. Wow. 400 upvotes almost |
21:50:37 | FromGitter | <akavel> hm, but when I'm trying to call `await createBookmark`, I'm getting `Error: undeclared identifier: 'await'` ๐ค |
21:50:49 | FromDiscord | <dom96> async await isn't supported for the JS backend |
21:51:51 | FromGitter | <akavel> dom96: the https://nim-lang.org/docs/asyncjs.html page shows some `await` - so is this sample of JS code, not Nim? |
21:52:42 | FromDiscord | <dom96> hm, interesting |
21:52:47 | FromDiscord | <dom96> looks like there is some support there |
21:52:54 | FromDiscord | <dom96> where are you using `await createBookmark`? |
21:53:02 | FromDiscord | <dom96> is it in a {.async.} proc? |
21:53:24 | FromDiscord | <dom96> oooh, since when does godbolt support Nim? ๐ฎ https://godbolt.org/z/bTses1 |
21:54:44 | FromGitter | <akavel> Not really in an {.async.} proc as of now; it needs to be in one, yes? |
21:56:01 | * | nature quit (Ping timeout: 264 seconds) |
21:56:34 | * | solitudesf quit (Ping timeout: 260 seconds) |
21:57:17 | * | user0 joined #nim |
21:57:41 | leorize[m] | @akavel yea |
21:57:59 | leorize[m] | @dom96 since 1.2 |
21:59:48 | * | user0_ quit (Ping timeout: 260 seconds) |
22:03:10 | FromGitter | <akavel> leorize[m]: hm, seems to have helped somewhat indeed - when I put `await` in `{.async.}` func, Nim no longer complains about unknown identifier; thanks! Now, still not sure how I connect such an async func into JS `Promise.then(...)` or something like this... do I just yank it as `some_promise.then(my_async_func)`? |
22:08:13 | FromDiscord | <dom96> alehander42: can you help? |
22:08:51 | * | nixfreak joined #nim |
22:10:01 | FromDiscord | <shashlick> @dom96 - did you get my message |
22:10:38 | FromDiscord | <dom96> where? |
22:10:55 | FromGitter | <akavel> alehander42: basically, I'm in a karax callback (onclick), and I need to call several async APIs in a sequence... |
22:11:39 | FromDiscord | <dom96> looks like travis is waiting on Windows/Mac machines... |
22:12:38 | FromGitter | <akavel> alehander42: till I needed only 1 call, it worked with `createBookmark(...).then(proc callback() = ...)`; but now I need to do more of them, and with complex conditionals & flow, and with then-s it's getting super tricky; async/await could hopefully help here... |
22:14:59 | * | astronavt quit (Remote host closed the connection) |
22:15:25 | FromDiscord | <shashlick> @dom96 - DM'd you - the v0.7.0 tag is on a branch, not master |
22:22:14 | FromDiscord | <shashlick> fixed the tag situation - will rebuild - your PR worked without issues |
22:22:18 | FromDiscord | <neow> > @nikki I'm mostly doing science related stuff. my thesis (data analysis), plotting, optimization, data storage, ... recent weekend projects have been a R โ Nim bridge and a DSL to write CT checked TeX code from Nimโต@Vindaar TeX code using nim macros? is there a repo? |
22:30:10 | FromDiscord | <dom96> @shashlick ahh yeah, sorry, been a long day. I don't see your DM though |
22:30:16 | FromDiscord | <dom96> did you send on Discord? |
22:30:39 | FromDiscord | <Yardanico> @neow |
22:30:43 | FromDiscord | <Yardanico> !repo latex |
22:30:44 | disbot | https://github.com/Vindaar/LatexDSL -- 9LatexDSL: 11A mini DSL to generate LaTeX from Nim 15 11โญ 2๐ด 7& 4 more... |
22:32:05 | FromDiscord | <neow> oh thank you |
22:33:11 | kinkinkijkin | okay, so ive got all the socket stuff figured out mostly |
22:33:18 | disruptek | booyah. |
22:34:47 | kinkinkijkin | i just gotta serialize stuff for connecting to networks then you should see a user called "niceuser" pop up a few times |
22:38:06 | kinkinkijkin | disruptek, what would you recommend for serializing strings for irc? |
22:38:19 | disruptek | strings don't need to be serialized, right? |
22:38:39 | disruptek | they generally appear serially. |
22:38:44 | kinkinkijkin | over the network and using nim strings against ansi strings id think so |
22:38:54 | disruptek | huh. why is that? |
22:39:11 | * | nixfreak quit (Ping timeout: 265 seconds) |
22:39:21 | kinkinkijkin | well, i am succeeding at connecting to freenode but freenode isn't understanding my first command sent to it |
22:39:36 | disruptek | are you familiar with the irc module? |
22:40:09 | FromDiscord | <shashlick> @dom96 - no worries, its building |
22:40:22 | * | user0 quit (Ping timeout: 256 seconds) |
22:40:25 | kinkinkijkin | im not even using the irc module |
22:40:34 | FromDiscord | <shashlick> builds are being posted - https://github.com/dom96/choosenim/releases/tag/v0.7.0 |
22:40:55 | disruptek | it does reproduce the network traffic that you want, right? |
22:41:18 | kinkinkijkin | my code or the irc module? |
22:41:24 | disruptek | the module. |
22:41:34 | kinkinkijkin | i wouldn't know, havent looked into it |
22:41:43 | disruptek | it might be good inspiration. |
22:41:55 | * | Ven`` quit (Quit: Textual IRC Client: www.textualapp.com) |
22:48:45 | kinkinkijkin | okay im juuuust a little stuck for now |
22:48:58 | kinkinkijkin | seems there's something blocking and nothing is being sent to freenode at all |
22:49:29 | disruptek | you said you're doing this async, right? |
22:52:02 | kinkinkijkin | yeah |
22:52:10 | kinkinkijkin | im just gonna put this down for the night |
22:52:15 | kinkinkijkin | getting a bit of a headache |
22:52:25 | disruptek | fair enough, sounds like you made progress. |
23:04:57 | * | sschwarzer joined #nim |
23:05:31 | sschwarzer | Thanks for the 1.4 release. You're awesome! :-) |
23:07:50 | * | sschwarzer quit (Client Quit) |
23:07:52 | FromDiscord | <Vindaar> @neow if you have questions about it, just shoot. Will go to bed soonish, but will answer tomorrow in that case |
23:12:30 | FromDiscord | <dom96> @shashlick okay. Iโll release it tomorrow. |
23:19:06 | mipri | can you write something like canFail(5).ifThrown(0) , with the apparent method catching canFail's exception? |
23:21:36 | Prestige | I think you just have to use try/except |
23:26:34 | FromDiscord | <InventorMatt> is there a way to enforce certain structures on a datatype without adding exceptions into procs that accept them? like a simple dumb example being a seq that can only have 4 values in it. |
23:27:03 | disruptek | make them distinct and then control the means by which they are created and modified. |
23:28:38 | leorize[m] | mipri: you can but it's not really idomatic like that |
23:28:38 | FromDiscord | <InventorMatt> okay, thanks |