00:05:58 | * | vsantana joined #nim |
00:06:35 | * | vsantana quit (Client Quit) |
00:22:40 | * | azed quit (Quit: WeeChat 2.9) |
00:38:42 | * | mbuchel quit (Ping timeout: 260 seconds) |
00:50:24 | * | maier joined #nim |
00:54:59 | * | maier quit (Ping timeout: 240 seconds) |
01:06:51 | * | letto quit (Remote host closed the connection) |
01:07:18 | * | letto joined #nim |
01:30:51 | * | mbuchel joined #nim |
01:50:13 | * | Jjp137 quit (Read error: Connection reset by peer) |
01:50:53 | * | Jjp137 joined #nim |
01:53:50 | * | Jjp137 quit (Read error: Connection reset by peer) |
01:59:15 | * | apahl quit (Ping timeout: 272 seconds) |
02:00:44 | * | apahl joined #nim |
02:17:15 | * | Jjp137 joined #nim |
02:21:41 | * | vicfred quit (Remote host closed the connection) |
02:22:06 | * | vicfred joined #nim |
02:24:49 | * | arecacea1 quit (Read error: Connection reset by peer) |
02:25:36 | * | arecacea1 joined #nim |
02:26:36 | FromDiscord | <drsensor👹> Hi, how to check value is available in a `Table`?↵Something like `myTable.values.contains("some value")`↵but it give me an error when I try `echo myTable.values`.↵Do I need to convert the iterator into sequence or openArray first? |
02:26:59 | disruptek | if "some value" in sometable: ... |
02:27:29 | disruptek | actually, that's for keys. |
02:28:00 | disruptek | you might need to `"somevalue" in toSeq(sometable.values)` |
02:28:23 | * | Cthalupa quit (Ping timeout: 272 seconds) |
02:31:45 | FromDiscord | <drsensor👹> thankyou, it works! |
02:35:37 | * | mbuchel quit (Ping timeout: 264 seconds) |
02:36:50 | * | Cthalupa joined #nim |
02:37:01 | * | mbuchel joined #nim |
02:50:32 | * | muffindrake quit (Ping timeout: 246 seconds) |
02:51:15 | * | maier joined #nim |
02:52:08 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
02:52:48 | * | muffindrake joined #nim |
02:56:14 | * | maier quit (Ping timeout: 256 seconds) |
02:56:22 | * | mbuchel quit (Ping timeout: 260 seconds) |
03:01:54 | * | aenesidemus_ joined #nim |
03:04:41 | * | aenesidemus quit (Ping timeout: 256 seconds) |
03:04:41 | * | pulux quit (Ping timeout: 256 seconds) |
03:04:59 | * | pulux joined #nim |
03:15:59 | * | rockcavera quit (Remote host closed the connection) |
03:18:46 | * | mbuchel joined #nim |
03:20:37 | * | Cthalupa quit (Ping timeout: 264 seconds) |
03:24:06 | * | Cthalupa joined #nim |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:37 | * | supakeen joined #nim |
04:20:29 | FromDiscord | <Nisha> Guess who~ |
04:24:27 | FromDiscord | <Rika> Who are you |
04:25:19 | FromDiscord | <Nisha> Bruh- |
04:25:30 | FromDiscord | <Nisha> My name isn't familiar- |
04:25:33 | FromDiscord | <Nisha> At all?- |
04:25:38 | FromDiscord | <Nisha> (edit) 'familiar-' => 'familiar?-' |
04:52:38 | * | maier joined #nim |
04:56:58 | * | maier quit (Ping timeout: 246 seconds) |
05:01:57 | voltist | You know your personal project is getting serious when you have to write a legal notice for the README |
05:03:25 | * | bung_ quit (Ping timeout: 240 seconds) |
05:12:55 | FromDiscord | <Nisha> Oof- |
05:30:47 | * | maier joined #nim |
05:34:02 | * | bung joined #nim |
05:38:16 | * | bung quit (Ping timeout: 246 seconds) |
05:38:57 | FromDiscord | <Rika> voltist: what happened? |
05:42:46 | * | Cthalupa quit (Ping timeout: 256 seconds) |
05:46:13 | voltist | @Rika I'm planning on publishing an open source driver derived from a serial protocol I'm working on reverse engineering |
05:47:40 | Zevv | ah protocol of what? |
05:47:41 | voltist | Basically the legal notice will say "The DMCA is alright with this, and it's perfectly legal to use, but reverse engineering the original manufacturer's products in order to contribute may make you liable for litigation depending on your location" |
05:47:51 | voltist | Zevv: Telescope mount |
05:49:13 | Zevv | cool stuff |
05:49:33 | Zevv | I never cared about any of thece dmca things. silly stuff |
05:49:53 | Zevv | and for obscure stuff like a telescope mount, I don't think you will ever get a C&D notice |
05:51:37 | voltist | The manufacturer has a business model that is very dependent on their software staying closed source and very expensive, so they have made serious legal threats to those who have considered doing this (so far none have gone open source) |
05:52:21 | FromDiscord | <Rika> you can reverse engineer products legally, depending on the kind of reverse engineering you do |
05:52:47 | voltist | Yeah it's not as illegal as they make it out to be at all |
05:53:08 | Zevv | just make a separate github account and put it on there |
05:53:10 | Zevv | I'll clone |
05:53:13 | Zevv | rika'll clone |
05:53:14 | Zevv | and its out |
05:54:01 | * | solitudesf joined #nim |
05:54:27 | voltist | My understanding is that the act of reverse engineering could be considered a breach of trade secrets, but the DMCA provides a safe harbor for the actual description/software written as a result |
05:55:21 | * | Cthalupa joined #nim |
05:55:52 | voltist | But "trade secrets" don't exist in my country's law anyway (beyond NDAs), and since we don't have an agreement with the US, the manufacturer can't sue on those grounds |
05:56:25 | voltist | I'm very much not a lawyer; this is just what I've managed to gather from the web |
05:56:50 | voltist | But yeah, the good thing is that I can host it on GitHub because it's DMCA friendly |
05:59:32 | voltist | Do I even have to mention that the manufacture's software is terrible? As in, literally the worst I have ever used |
06:02:33 | FromGitter | <gogolxdong> How to convert seq to JsonNode? |
06:06:35 | Zevv | gogolxdong: % |
06:06:38 | Zevv | https://play.nim-lang.org/#ix=2tRf |
06:08:06 | * | Cthalupa quit (Ping timeout: 265 seconds) |
06:08:33 | Zevv | voltist: just hook your stuff up to stellarium |
06:08:55 | FromGitter | <gogolxdong> ah, I forgot the most familiar friend. |
06:09:07 | Zevv | who, me? :) |
06:09:10 | Zevv | voltist: http://stellarium.sourceforge.net/wiki/index.php/Telescope_Control_plug-in |
06:09:36 | Zevv | whats your brand and type? |
06:10:55 | Zevv | and always remember kids: don't stare into the sun! |
06:11:01 | Zevv | when looking through your telescope, particulary |
06:19:55 | * | Cthalupa joined #nim |
06:23:37 | * | endragor_ quit (Remote host closed the connection) |
06:23:52 | * | PMunch joined #nim |
06:24:07 | * | hnOsmium0001[m] joined #nim |
06:28:02 | * | muffindrake quit (Ping timeout: 260 seconds) |
06:30:56 | * | Cthalupa quit (Ping timeout: 256 seconds) |
06:33:12 | * | Cthalupa joined #nim |
06:42:01 | * | endragor joined #nim |
06:45:40 | * | Vladar joined #nim |
06:59:58 | PMunch | Is there a way of doing single-line case statements? |
07:01:14 | FromDiscord | <lqdev> nope. how'd you do it anyways? |
07:02:37 | PMunch | Well I just tried "let x = case someEnum: of One: 100 of Two: 200" |
07:02:42 | PMunch | But that didn't work :P |
07:03:33 | FromDiscord | <lqdev> it'd be unparsable as `of` is also an operator |
07:04:01 | FromDiscord | <Elegant Beef> One lining case statemes seems hideous |
07:04:08 | FromDiscord | <Elegant Beef> (edit) 'statemes' => 'statemets' |
07:17:25 | * | superbia1 is now known as superbia |
07:17:57 | * | bung joined #nim |
07:51:04 | * | muffindrake joined #nim |
07:51:42 | voltist | Zevv: I'm going to make an Indi driver |
08:03:41 | * | oddp joined #nim |
08:08:00 | PMunch | Indi? |
08:12:49 | Zevv | voltist: indi is cool, but what would you interface with on the other side of the driver? |
08:28:20 | voltist | I'd probably use KStars, but the point of indi is that folks can use whatever they want |
08:30:19 | voltist | Zevv: Are you into astronomy yourself? |
08:30:24 | FromDiscord | <Vindaar> @voltist sorry, was away for a week without internet. The ping still relevant? |
08:30:55 | voltist | @Vindaar Nah all good, I got my FITS reader working |
08:31:56 | * | kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in) |
08:32:13 | * | kitech1 joined #nim |
08:33:20 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:33:40 | FromDiscord | <Vindaar> oh great work! is it pushed somewhere? |
08:34:15 | voltist | Not quite yet |
08:34:22 | voltist | I'll do that when I get home |
08:34:38 | voltist | I'm at the observatory now, taking some images :) |
08:37:01 | FromDiscord | <Vindaar> nice! |
08:48:53 | FromGitter | <Lecale> I'm having one of those bad mornings. Is there any real reason why the string "11.69" shouldn't be able to be parsed as a float? I know floats are a bit cuckoo sometimes, but I didn't expect to change the data in my file and see "Error: unhandled exception: invalid float: 11.69 [ValueError]" |
08:49:50 | FromDiscord | <lqdev> check for leading/trailing whitespace |
08:50:20 | FromDiscord | <lqdev> !eval import strutils; echo parseFloat("11.69") |
08:50:22 | NimBot | 11.69 |
08:50:49 | FromDiscord | <lqdev> !eval import strutils; echo parseFloat(" 11.69 ") |
08:50:52 | NimBot | /usercode/in.nim(1) in↵/playground/nim/lib/pure/strutils.nim(1127) parseFloat↵Error: unhandled exception: invalid float: 11.69 [ValueError] |
08:51:00 | FromDiscord | <lqdev> cc @Lecale |
08:51:42 | FromGitter | <Lecale> There isn't anything easy like hidden whitespace to solve the error, no. |
08:52:12 | FromDiscord | <lqdev> hm |
08:52:13 | * | oddp quit (Quit: quit) |
08:52:55 | PMunch | Hmm, did something about changing CPU architecture change in the past couple versions? |
08:54:09 | FromGitter | <Lecale> I am using Nim Compiler Version 1.2.4 [Windows: amd64] , it was fine for one dataset, then every other one after that went penguin |
09:00:22 | PMunch | Hmm, that is indeed weird |
09:03:19 | Zevv | wow. I found this 1.6Ghz celeron notebook in the bottom of my cupboard. might be handy for the kids to take on holidays. Put an SSD disk in, 2Ggis of ram |
09:03:40 | Zevv | but guess what. Friggin youtube can't even properly play on that hardware anymre |
09:03:49 | Zevv | 1.6 Ghz! |
09:03:51 | * | pbb_ joined #nim |
09:03:59 | Zevv | What the *HELL* is youtube trying to do? |
09:04:08 | Zevv | 2 cores loaded to the max |
09:04:21 | Zevv | why is all software so crap shit today |
09:04:30 | PMunch | @Lecale, try to cast it to a sequence of bytes and see if there is anything weird there: https://play.nim-lang.org/#ix=2tRI |
09:05:00 | PMunch | Zevv, probably trying to use hardware h.256 decoding |
09:05:33 | FromDiscord | <lqdev> youtube uses h.264 or vp9 |
09:05:37 | FromDiscord | <lqdev> never seen it use h.265 |
09:05:45 | FromDiscord | <Elegant Beef> an easier solution to the casting is just returning the length 😄 |
09:05:47 | * | pbb_ quit (Client Quit) |
09:05:48 | PMunch | I just didn't remember the name of it :P |
09:05:53 | PMunch | I meant h.264 |
09:05:55 | FromDiscord | <Elegant Beef> if it's != 5 you did something wrong! |
09:06:09 | FromDiscord | <lqdev> PMunch: h.264 is relatively lightweight to decode tho |
09:06:11 | PMunch | Hmm, true |
09:06:21 | FromDiscord | <lqdev> my rpi 3b can handle it perfectly |
09:06:44 | PMunch | Well, it might be lightweight, but if YouTube is trying to execute instructions that doesn't exist on your CPU you're still going to have a bad time :P |
09:06:45 | FromDiscord | <lqdev> though, it doesn't go up to any resolutions higher than 480p |
09:07:07 | FromDiscord | <lqdev> it's, uh, javascript. |
09:07:30 | PMunch | Still ends up getting executed by your CPU at some point |
09:07:44 | PMunch | (or GPU I guess, but that's beside the point) |
09:10:29 | FromDiscord | <Rika> javascript engines would know what instructions to execute, and whether to use software or hardware decoding, i assume |
09:11:01 | FromDiscord | <Rika> anyway i dont think the video player is the heaviest on youtube, its probably all the other shit it runs |
09:13:24 | PMunch | But still, it should be able to handle all the other stuff on a 1.6GHz processor.. |
09:14:03 | PMunch | The hardware h.264 decoding is the only thing I can think of that an old CPU would simply miss, which could explain why YouTube doesn't work.. |
09:14:23 | FromDiscord | <Elegant Beef> If zevv isnt on a unix-like that's getting taken from Windows updates running in the backgrounf suddenly |
09:14:35 | FromDiscord | <Elegant Beef> (edit) 'backgrounf' => 'background' |
09:14:46 | PMunch | Haha, fair point |
09:15:01 | PMunch | But knowing Zevv it's probably some kind of Linux he's running |
09:15:11 | PMunch | Eh, maybe not for his kids I guess |
09:15:14 | FromDiscord | <Elegant Beef> In all seriousness windows is the death of low spec hardware that'd otherwise be usable |
09:15:49 | PMunch | Mhm, it's pretty crazy |
09:15:54 | FromDiscord | <Elegant Beef> I mean i dont see why not force them to use LFS 😄 |
09:16:04 | FromDiscord | <Elegant Beef> That way you dont have to solve any problems |
09:16:13 | PMunch | It's backwards compatible to 1000 with software, but hardware you can barely run it on a couple year old machines |
09:16:32 | PMunch | Meanwhile you can use a fairly modern Linux system on decades old machines with some work :P |
09:16:51 | FromDiscord | <Elegant Beef> I mean it's mostly the sub $400 computers that just cant handle it |
09:17:05 | Zevv | it's just plain xubuntu |
09:18:07 | Zevv | and I know of course, but I'm just always enraged by how fast hardware gets deprecated because software just gets kind of crappier |
09:18:24 | Zevv | it's not just the video decoder. Just the sheer amount of work that has to be done to even load up a site like youtube |
09:18:28 | Zevv | even before it starts playing |
09:19:11 | FromDiscord | <Elegant Beef> How does https://dev.invidio.us/ fair against youtube? |
09:19:12 | FromDiscord | <Rika> its more of "sites start doing more intensive shit because the majority of people's devices can handle it" |
09:19:33 | Zevv | it's also about devs being lazy as hell. |
09:19:58 | Zevv | I've been doing a lot of android work lately, we're making some kind of "thin client" solution. All these APKS are *so* *full* *of* *shit* |
09:20:06 | Zevv | devs just pull in tons of libs from everywhere |
09:20:08 | Zevv | glue it all together |
09:20:13 | Zevv | they all ship the world |
09:20:37 | Zevv | it's just like web devs. npm here npm there and now I have to load 37Mb of trash before a page shows |
09:21:02 | FromDiscord | <Rika> that is true too |
09:21:08 | Zevv | really, I know it's old-fart-whining, but I remember the days when I would boot my PC and it would go *beep* ready in 2 seconds |
09:21:12 | PMunch | Always fun to hear the front-end devs swearing over having to run "npm restore" :P |
09:21:18 | FromDiscord | <Rika> its barely old fart whining imo |
09:21:21 | PMunch | Or whatever the command is to reload all packages :P |
09:21:40 | FromDiscord | <Rika> always fun forgetting to not back "node_modules" up |
09:21:44 | FromGitter | <Lecale> Okay, there seems to be three chars preceeding the string that don't belong there: 239, 187, 191 |
09:21:49 | PMunch | Zevv, I mean you can still set that up with the correct Linux stuff |
09:22:04 | PMunch | As long as your motherboard BIOS isn't too slow |
09:22:09 | FromDiscord | <Elegant Beef> I mean Zevv im only 21, and i agree software is a hellscape, look im using a electron application as my main communication method, and just accept that it's taking >500mb of ram for basically nothing |
09:22:52 | Zevv | right |
09:23:16 | Zevv | and on the other side of the spectrum. I'm fighting these guys in my team over all that docker shit |
09:23:39 | Zevv | they want be to build and dev my software in their docker because everyting is so prone to dependency failures, it's no longer possible to do anything on a normal machine |
09:23:57 | PMunch | @Lecale, that is a BOM |
09:24:00 | PMunch | Byte order marker |
09:24:15 | Zevv | Why the *hell* do I need to do gRPC for one single call to somewhere? Now I need gRPC compilers with golang code generators, I always have version mismatches, everything is broken |
09:24:20 | FromGitter | <Lecale> Looks like BOOM to me |
09:24:20 | PMunch | Stupid Windows think to tell the program which format the file is in |
09:25:16 | PMunch | That one in particular EF BB BF means that it's UTF-8 |
09:25:28 | FromDiscord | <kodkuce> we need join ISIS kill all devs and windows users and start a new programming standards |
09:25:34 | FromDiscord | <Rika> bruh |
09:25:39 | FromDiscord | <Rika> a bit too edgy there |
09:25:44 | FromDiscord | <kodkuce> (edit) 'users' => 'users( spare araq)' |
09:26:00 | FromDiscord | <Elegant Beef> It's more ethical to just make less shitty software that is on par with the shitty alternatives |
09:26:15 | PMunch | I kinda like Docker though Zevv, I can build a tiny container that just has the stuff I need, and I don't have to tell anyone I've snuck Nim in there :P |
09:26:23 | FromDiscord | <Elegant Beef> Although people dont care about free range software |
09:26:24 | FromDiscord | <kodkuce> flaming sword of revolution xD |
09:27:03 | FromDiscord | <kodkuce> i like too docker cuz its easyer to setup soem db sewer insted to really have to install it on pc |
09:27:14 | PMunch | I was actually surprised when I copied a Nim binary of some program I had lying around over to another machine and it just worked. Let that sink in for a second |
09:27:47 | FromDiscord | <Rika> static binaries |
09:27:48 | PMunch | It's so bad that I don't even expect binaries to work across two Linux machines with the same architecture -_- |
09:28:12 | FromDiscord | <lqdev> welcome to glibc versioning land, where We Are Retarded™ |
09:28:28 | FromDiscord | <Rika> lmao |
09:28:30 | FromDiscord | <Elegant Beef> Well there would be no issue if you guys used the one true linux, hannah montana linux |
09:28:32 | PMunch | Haha :P |
09:28:45 | FromGitter | <Lecale> heretic |
09:28:47 | PMunch | Oh well, lunchtime |
09:28:55 | FromDiscord | <Elegant Beef> No it's sleep time |
09:28:57 | FromDiscord | <Elegant Beef> Buh bye |
09:29:00 | PMunch | Have to figure out this weird 32-bit linking issue mess when I get back.. |
09:29:34 | FromDiscord | <lqdev> ~~beef where are you going it's 11:30 am~~ |
09:29:52 | FromDiscord | <Elegant Beef> Dude im in NA it's 3:30 am |
09:29:56 | FromDiscord | <lqdev> ik ik |
09:30:14 | FromDiscord | <Elegant Beef> Fucking poles man i tell you... they're poles |
09:30:36 | FromGitter | <Lecale> Most polish are |
09:30:43 | FromDiscord | <lqdev> dumb |
09:31:11 | FromDiscord | <Elegant Beef> Shit you're onto something Lecale, has the all Poles are Poles conspiracy been started? |
09:31:34 | FromDiscord | <Elegant Beef> Well now that we've made dumb jokes, i now do need to sleep |
09:32:16 | Zevv | PMunch: there is *so* much I hate about docker. Just add more layers of complexity, add more potential points of failures. |
09:32:37 | Zevv | I have this app running in a docker container because I need to for "reasons". Getting logs out with "docker-compose logs". No more then 10k lines per second |
09:32:48 | Zevv | I just sit there waiting up to half a minute for the log to poor out |
09:33:08 | Zevv | Don't get me started about getting IPv6 to work in docker. This is 2020. But nooo, sorry, ipv6 is not really something we support ,sorry |
09:37:00 | FromGitter | <Lecale> Thanks @PMunch I didn't expect that to be inserted invisibly |
09:37:47 | alehander92 | oi |
09:42:31 | * | lritter joined #nim |
09:48:39 | * | Vladar quit (Remote host closed the connection) |
09:50:49 | * | NimBot joined #nim |
10:03:39 | FromDiscord | <XxDiCaprioxX> Is there a function to compare 2 strings? |
10:03:46 | FromDiscord | <XxDiCaprioxX> Except for if a == b |
10:04:02 | FromDiscord | <XxDiCaprioxX> And can you ignore the case? |
10:04:24 | FromDiscord | <Rika> strutils.cmpIgnoreCase |
10:04:33 | FromDiscord | <XxDiCaprioxX> okay thanks |
10:04:46 | FromDiscord | <Rika> read the docs, it returns an int |
10:04:57 | FromDiscord | <XxDiCaprioxX> what |
10:05:02 | FromDiscord | <Rika> -1 for less than, 0 for equal, 1 for greater than |
10:05:18 | FromDiscord | <Rika> or actually just "less than 0" for less than, etc |
10:05:24 | FromDiscord | <Rika> not necessarily -1 |
10:06:11 | FromDiscord | <XxDiCaprioxX> But like what I need is "is a equal to b, case doesn't matter" |
10:06:28 | FromDiscord | <Rika> yes yes |
10:06:36 | FromDiscord | <XxDiCaprioxX> Like Java's .equalsIgnoreCase |
10:06:37 | FromDiscord | <Rika> so its just `a.cmpIgnoreCase(b) == 0" |
10:06:41 | FromDiscord | <Rika> (edit) '0"' => '0`' |
10:06:45 | FromDiscord | <XxDiCaprioxX> Oh okay |
10:09:45 | FromDiscord | <XxDiCaprioxX> Is the func keyword really used? |
10:09:50 | FromDiscord | <Rika> yes |
10:09:53 | FromDiscord | <XxDiCaprioxX> Or can I just call everything proc? |
10:10:01 | FromDiscord | <Rika> you can do either |
10:10:08 | FromDiscord | <XxDiCaprioxX> Is there any real advantage with func? |
10:10:12 | FromDiscord | <Rika> func just gives a bit more ensurance |
10:10:17 | FromDiscord | <XxDiCaprioxX> oh okay |
10:10:42 | FromDiscord | <XxDiCaprioxX> Anything that contains no output can be a func, correct? |
10:11:59 | FromDiscord | <Rika> anything that uses no globals |
10:12:35 | FromDiscord | <Rika> procs that use globals include `echo` |
10:13:19 | FromDiscord | <XxDiCaprioxX> Okay |
10:14:31 | FromDiscord | <lqdev> it's not procs that don't use globals |
10:14:37 | FromDiscord | <lqdev> it's procs that don't have side effects |
10:14:47 | FromDiscord | <lqdev> using globals is a side effect |
10:14:50 | FromDiscord | <lqdev> IO is also a side effect |
10:15:00 | FromDiscord | <Rika> eh i forget |
10:15:00 | FromDiscord | <lqdev> echo doesn't use globals |
10:15:16 | FromDiscord | <Rika> is stdout not technically counted as a global |
10:15:25 | FromDiscord | <lqdev> echo doesn't use the stdout variable |
10:15:26 | alehander92 | what happened |
10:15:33 | alehander92 | to the alternative |
10:15:34 | alehander92 | funcs |
10:15:41 | FromDiscord | <XxDiCaprioxX> okay so no globals and no io. will the compiler complain automatically if func doesn't work? |
10:15:53 | FromDiscord | <lqdev> yes |
10:15:55 | FromDiscord | <Rika> yes |
10:18:04 | * | sky59 joined #nim |
10:26:36 | FromDiscord | <XxDiCaprioxX> ah then its fine+ |
10:51:43 | * | sky59 quit (Remote host closed the connection) |
10:54:13 | * | maier quit (Ping timeout: 264 seconds) |
10:57:03 | PMunch | Zevv, oh I use docker for building my project. Which is great, because I can give the docker container to the testers and they can build their own version without having to set up everything (because I've done it for them in the docker container). I've also used it for a web-page thingy, which was also nice because I could just send a container to ops and they could run it without having to set up anything. |
10:57:22 | PMunch | Just saves me a lot of work from trying to explain how to set up all these bits and pieces |
10:57:48 | PMunch | @Lecale, that's the "magic" of BOM.. |
11:10:12 | * | maier joined #nim |
11:27:41 | * | theelous3 joined #nim |
11:29:36 | FromDiscord | <Kiloneie> I used the same code to compare tuples to showcase that different type tuples with same fields of same name in same order are identical, but i don't know how to do it with objects...↵https://play.nim-lang.org/#ix=2tSj |
11:31:15 | PMunch | You can't compare two different objects like that |
11:31:50 | PMunch | Since in this case the objects are identical you can cast one to the other |
11:32:11 | PMunch | Or you could simply remove one of them |
11:33:16 | FromDiscord | <Kiloneie> Well i am trying to prove the statement... i think the fact that you can't == them proves the statement that objects are not comparable like tuples are. |
11:33:46 | PMunch | Well not arbitrary objects.. |
11:36:48 | FromDiscord | <XxDiCaprioxX> How can you divide a string using spaces? |
11:37:18 | FromDiscord | <lqdev> splitWhitespace |
11:38:29 | FromDiscord | <XxDiCaprioxX> And say I have the string "a b" it will give me seq["a", "b"], correct? |
11:38:52 | PMunch | !eval import strutils; echo "a b".splitWhitespace |
11:38:54 | NimBot | @["a", "b"] |
11:40:00 | FromDiscord | <XxDiCaprioxX> And I can say var substring = "a b".splitWhitespace[0] and I get substring = "a" ? |
11:40:19 | FromDiscord | <XxDiCaprioxX> (edit) 'var' => '`var' | 'b".splitWhitespace[0]' => 'b".splitWhitespace[0]`' | removed 'I' | 'substring' => '`substring' | '"a"' => '"a"`' |
11:40:24 | PMunch | !eval import strutils; var substring = "a b".splitWhitespace[0]; echo substring |
11:40:26 | NimBot | a |
11:40:39 | FromDiscord | <XxDiCaprioxX> what is this !eval? |
11:40:55 | PMunch | It's telling NimBot to evaluate NimCode by using the playground :P |
11:40:58 | FromDiscord | <Rika> bot runs the code after "eval" |
11:41:00 | FromDiscord | <XxDiCaprioxX> Ah okay makes sense |
11:41:07 | FromDiscord | <XxDiCaprioxX> Okay thanks |
11:41:23 | PMunch | play.nim-lang.org |
11:41:28 | PMunch | Using that |
11:43:05 | PMunch | Hmm, strange. When cross-compiling to a 32-bit binary I must add "nodecl" to a procedure I import from C, lest I get "undefined reference to `edns_opt_list_append@20'" |
11:43:21 | PMunch | Works fine when compiling with 64-bit |
11:43:26 | PMunch | With and without the pragma |
11:43:40 | PMunch | Is this a subtle error where the signatures doesn't actually match? |
11:43:53 | FromDiscord | <Kiloneie> So for comparing tuples with tuples, using the "==" operator is good right ? |
11:44:02 | PMunch | Yup |
11:44:11 | FromDiscord | <Kiloneie> okay |
11:44:12 | PMunch | Should be at least |
11:45:12 | FromDiscord | <Kiloneie> vs code instantly whines if the fields are not the same, so that should prove inequality. (Man these videos take forever, i always end up adding more than i thought i will) |
11:48:23 | FromDiscord | <Pixeye> hey! is there a way to pass as macro param array element ? |
11:48:33 | FromDiscord | <Pixeye> (edit) 'as' => 'to' | 'tomacro param ... array' => 'tomacro paramas' |
11:49:25 | FromDiscord | <Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tSn |
11:49:58 | FromDiscord | <Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tSo |
11:49:59 | FromDiscord | <XxDiCaprioxX> Maybe arrays cant be untyped |
11:50:18 | FromDiscord | <Pixeye> oh, sry, not even the array, it's from tuple |
11:51:04 | FromDiscord | <XxDiCaprioxX> Then I have no idea sorry |
11:51:12 | FromDiscord | <XxDiCaprioxX> How can I make a program await input? |
11:51:26 | FromDiscord | <Pixeye> making game? |
11:51:41 | FromDiscord | <Pixeye> use glfw or smthing ? |
11:53:47 | FromDiscord | <Recruit_main707> stdin.readLine() iirc |
11:57:57 | * | rockcavera joined #nim |
11:58:23 | FromDiscord | <XxDiCaprioxX> Not in the console |
11:58:58 | FromDiscord | <XxDiCaprioxX> Program is running until one point where it needs an input (e. g. press enter) to continue |
12:00:37 | * | waleee-cl joined #nim |
12:00:40 | * | krux02 joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:38 | * | supakeen joined #nim |
12:19:31 | * | maier_ joined #nim |
12:23:01 | * | maier quit (Ping timeout: 264 seconds) |
12:24:37 | * | moerm joined #nim |
12:24:51 | moerm | Hello everyone ;) |
12:25:14 | PMunch | Hi moerm |
12:25:29 | PMunch | @XxDiCaprioxX, you want a popup? |
12:27:24 | FromDiscord | <lqdev> @Pixeye what are you trying to do? |
12:29:57 | FromGitter | <alehander92> test |
12:30:21 | alehander92 | sorry, wanted to see something on gitter |
12:35:43 | FromDiscord | <XxDiCaprioxX> I do not want a popup |
12:36:06 | FromDiscord | <XxDiCaprioxX> Just the program doing nothing until a certain event# |
12:36:45 | PMunch | Hmm, so you want your program to just sit idle until you hit enter in the terminal? |
12:36:55 | FromDiscord | <XxDiCaprioxX> Basically yes |
12:37:10 | FromDiscord | <XxDiCaprioxX> I see asyncdispatch has proc waitFor[T](fut: Future[T]): T |
12:37:29 | FromDiscord | <XxDiCaprioxX> As I am working on a discord bot that should work, right? |
12:37:55 | PMunch | Wait, should the program do something in the background? |
12:38:38 | FromDiscord | <XxDiCaprioxX> No |
12:40:40 | PMunch | Then why not just a blocking call to read from stdin? |
12:41:10 | FromDiscord | <XxDiCaprioxX> It is a discord bot |
12:41:12 | FromDiscord | <XxDiCaprioxX> So no option |
12:41:32 | FromDiscord | <XxDiCaprioxX> I just wanted to make a simple example |
12:41:59 | PMunch | Why is it not an option? |
12:42:28 | FromDiscord | <XxDiCaprioxX> Isn't stdin a system thing? |
12:42:57 | PMunch | It's standard input, basically just the input to the terminal |
12:43:25 | FromDiscord | <XxDiCaprioxX> But on a discord server |
12:43:29 | FromDiscord | <XxDiCaprioxX> How would it do that |
12:43:58 | PMunch | What do you mean "on a discord server"? You said you wanted to hit enter on the command line.. |
12:44:24 | FromDiscord | <XxDiCaprioxX> I said that because I did not want to complicate unnecessarily |
12:44:33 | FromDiscord | <XxDiCaprioxX> And just have a simple example |
12:44:44 | PMunch | I think you simplified a bit too much :P |
12:45:10 | FromDiscord | <XxDiCaprioxX> yeah probably haha |
12:48:17 | FromDiscord | <XxDiCaprioxX> So basically I want to have my bot wait for a certain message in the channel after it got called |
12:49:29 | FromDiscord | <XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2tSA |
13:03:05 | alehander92 | don't use waitFor |
13:03:12 | alehander92 | it shouldn't be used in async functions |
13:03:41 | alehander92 | use it only in sync functions that invoke async, e.g. your top level code |
13:04:39 | alehander92 | use await <call that receives messag> |
13:05:04 | alehander92 | and now, this call can be a completion of a future |
13:05:25 | alehander92 | that gets completed on an event somewhere else (but i'd guess your discord code already has an api for that) |
13:05:59 | * | dulsi_ joined #nim |
13:08:04 | moerm | Have a nice day everyone |
13:08:13 | * | moerm quit (Quit: Leaving) |
13:08:22 | * | dulsi quit (Ping timeout: 246 seconds) |
13:09:51 | FromDiscord | <XxDiCaprioxX> you too |
13:16:26 | * | Senketsu joined #nim |
13:39:44 | FromDiscord | <Pixeye> @lqdev I'm trying to put untyped macro into the template |
13:41:54 | FromDiscord | <lqdev> not sure what you mean |
13:42:09 | FromDiscord | <lqdev> which template? |
13:43:08 | FromDiscord | <Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tST |
13:43:28 | FromDiscord | <Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tSU |
13:43:41 | FromDiscord | <lqdev> right. makes sense so far |
13:43:59 | FromDiscord | <lqdev> lemme think |
13:44:23 | FromDiscord | <Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tSV |
13:44:38 | FromDiscord | <Pixeye> https://github.com/nim-lang/Nim/issues/11091 this is the nearest related stuff I found |
13:44:40 | disbot | ➥ untyped macro nested in template: getting sym instead of idents ; snippet at 12https://play.nim-lang.org/#ix=2tSW |
13:45:19 | FromDiscord | <lqdev> you don't need the {.used.} if your template is exported btw |
13:45:31 | FromDiscord | <lqdev> i suppose testMask is what generates your variable? |
13:45:42 | FromDiscord | <lqdev> with the modified name |
13:56:57 | * | liblq-dev joined #nim |
14:00:18 | FromDiscord | <Pixeye> sent a code paste, see https://paste.rs/PkU |
14:01:01 | * | liblq-dev quit (Client Quit) |
14:01:11 | * | liblq-dev joined #nim |
14:01:17 | * | Vladar joined #nim |
14:01:55 | FromDiscord | <Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tTd |
14:02:32 | * | liblq-dev quit (Client Quit) |
14:02:40 | * | liblq-dev joined #nim |
14:04:17 | * | liblq-dev quit (Client Quit) |
14:04:26 | * | liblq-dev joined #nim |
14:05:03 | * | PMunch quit (Quit: Leaving) |
14:06:04 | * | oz quit (Read error: Connection reset by peer) |
14:10:14 | * | vicfred quit (Remote host closed the connection) |
14:10:40 | * | vicfred joined #nim |
14:10:56 | disruptek | gonna be a hot one, nimions. |
14:17:22 | FromDiscord | <Zachary Carter> does `nimble install` define `release` or `danger` by default? |
14:18:41 | FromDiscord | <Zachary Carter> I guess it does - becaue `nimble build` doesn't follow the same code path |
14:19:01 | dom96 | release |
14:20:22 | FromDiscord | <Zachary Carter> if I define `danger` in a `config.nims` will that override? |
14:20:56 | FromDiscord | <Zachary Carter> I would assume so |
14:21:37 | disruptek | danger/release in config files is overridden by the cli. |
14:22:20 | disruptek | annoyingly, the compiler's notice about the build type is inaccurate. |
14:22:24 | FromDiscord | <Zachary Carter> ooph |
14:23:19 | FromDiscord | <Zachary Carter> well - for now it doesn't matter too much but eventually it will |
14:23:38 | FromDiscord | <Zachary Carter> (edit) 'well - for now it doesn't matter too much ... but' => 'well - for now it doesn't matter too much(for me)' |
14:24:01 | disruptek | diplomacy, i like it. |
14:24:17 | FromDiscord | <Zachary Carter> eh it might mean using nimph or something |
14:24:49 | disruptek | as soon as i released 1.0.0, it stopped working. |
14:25:00 | FromDiscord | <Zachary Carter> heh |
14:25:30 | FromDiscord | <Zachary Carter> is there a way to use nimble solely as a dependency manager and not a build tool? |
14:25:39 | FromDiscord | <Zachary Carter> like is there a `install dependencies` command for nimble? |
14:25:52 | FromDiscord | <Zachary Carter> and then can you overload `nimble build / install` to do nothing? |
14:26:01 | disruptek | --depsOnly |
14:26:07 | FromDiscord | <Zachary Carter> ah cool - that will work then |
14:26:09 | disruptek | try --help once in awhile, chucklehead. |
14:26:15 | FromDiscord | <Zachary Carter> man I'm way too lazy for that |
14:27:44 | * | arecacea1 quit (Remote host closed the connection) |
14:28:38 | * | arecacea1 joined #nim |
14:33:25 | * | Guest85438 quit (Ping timeout: 240 seconds) |
14:33:25 | * | liblq-dev quit (Quit: WeeChat 2.9) |
14:33:33 | * | liblq-dev joined #nim |
14:35:26 | * | dadada joined #nim |
14:35:49 | * | dadada is now known as Guest63171 |
14:37:29 | shashlick | nimble build -d:danger works |
14:51:29 | FromDiscord | <Kiloneie> https://youtu.be/aME-tyPCPvE↵↵Heres another one of my videos on Nim for beginners.↵I hope i didn't make any errors(besides 4-5 seconds missing at object init. with values(how the F. did that happen in the cutting part... meh)) |
14:54:47 | disruptek | let's try making things better. |
14:55:11 | disruptek | WHO IS WITH ME? |
14:55:32 | Zevv | i am so tired |
14:55:41 | Zevv | i just gave up |
15:00:19 | Oddmonger | maybe tomorrow |
15:09:03 | * | leorize quit (Quit: WeeChat 2.8) |
15:10:29 | * | oz joined #nim |
15:12:12 | * | maier joined #nim |
15:14:11 | * | maier_ quit (Ping timeout: 240 seconds) |
15:31:43 | FromDiscord | <kodkuce> @Kiloneie keep the good work 🙂 |
15:31:56 | * | liblq-dev quit (Quit: WeeChat 2.9) |
15:35:45 | * | ehmry_ joined #nim |
15:45:15 | * | maier quit (Quit: leaving) |
15:45:56 | FromDiscord | <haxscramper> How do I 'transfer' mutability from parameter type to result type? I want to declare function that accepts either mutable or immutable argument and returns one of its fields as `var` or non-var type depending on argument mutability. E.g. I want to have a *single* function that behaves like `proc aux(a: var Type): var Field` or `proc aux(a: Type): Field`. |
15:47:47 | FromDiscord | <haxscramper> The only solution that I could come up with is moving implementation to template and declaring two functions but this is just glorified copy-pasting and I want to know if there is some kind of 'cleaner' way to do this. |
15:50:10 | leorize[m] | sadly this is the easiest way |
15:50:16 | leorize[m] | or... you can just make a template and export that instead |
15:51:07 | leorize[m] | since it's a template (which is just an AST snippet), the mutability of the underlying field will translate directly into the "return type" |
15:51:11 | Zevv | haxscramper: do you have philisophical issues with using two procs and a template? |
15:51:16 | Zevv | because you implement your code only once |
15:51:24 | Zevv | it is true that you end up with two compiled implementations |
15:53:10 | alehander92 | zevv |
15:53:21 | Zevv | alehander92 |
15:53:21 | alehander92 | i have philosophical issues with your philosophyu |
15:53:29 | alehander92 | i am writing you so you can prepare |
15:53:34 | alehander92 | for my great analysis |
15:53:34 | Zevv | what is that, a philosophyu |
15:53:51 | alehander92 | come on man the interviews with my accent are enough |
15:54:01 | alehander92 | be happy you're not google meeting me |
15:54:29 | alehander92 | it does sound romanian tho |
15:56:11 | FromDiscord | <haxscramper> I just wanted to know if there is something better than copy-pasting (in this case template is just more convenient Ctrl-C Ctrl-V) |
15:56:45 | Zevv | alehander92: I have extensive experience with romanians |
15:56:47 | Zevv | I own three of them |
15:56:52 | Zevv | eh, rule |
15:56:53 | Zevv | no |
15:56:54 | Zevv | manage |
15:56:58 | Zevv | yes, that's the word |
15:57:21 | Zevv | an to be honest, I don't understand their inside jokes, but the romanian humor suits me |
15:57:30 | Zevv | what I do not like though |
15:57:39 | Zevv | are the romanian sweets they bring with them after holidays |
15:58:03 | Zevv | Except for the ROMs |
15:58:08 | Zevv | I can take ROMs |
16:00:14 | alehander92 | oh is this the wafer |
16:00:25 | alehander92 | when i went to romania i saw those chocolates with the romanian flag |
16:00:30 | alehander92 | very patriotic |
16:00:52 | alehander92 | they do have nice pastry btw |
16:01:18 | Zevv | lets make a deal |
16:01:22 | Zevv | you send me roms |
16:01:27 | Zevv | i send you stroopwafels |
16:01:29 | alehander92 | and they are famous for corn in bulgaria |
16:01:31 | alehander92 | i think |
16:01:40 | alehander92 | oh dude |
16:01:43 | Zevv | i can also send you weed, but that'll be for your own risk |
16:01:45 | alehander92 | i eat too much of those in belgium |
16:01:47 | alehander92 | on fosdem |
16:01:55 | alehander92 | i shouldn't eat so much |
16:02:15 | Zevv | ~nono you are mixing things up |
16:02:16 | disbot | no footnotes for `nono`. 🙁 |
16:02:18 | alehander92 | and i don't think we have ROM-s here, they are some kind of national thing |
16:02:24 | Zevv | stroopwafels != wafels |
16:02:34 | Zevv | google that shit |
16:02:38 | Zevv | oh no deal then |
16:02:41 | alehander92 | i can send you svoge |
16:03:06 | Zevv | whats the promillage? |
16:03:10 | alehander92 | and honey |
16:03:11 | Zevv | alcohol co |
16:03:15 | Zevv | ntent |
16:03:21 | alehander92 | haha no |
16:03:32 | alehander92 | rakia is huge, but i am not making you a drunk, dude |
16:03:51 | alehander92 | i can send you yoghurt tho, it's like big in japan |
16:03:55 | Zevv | we shoudl do that next fosdem meetup. everybody bring 3 national goodies, put it all on the table and divide |
16:04:01 | alehander92 | they fly the stuff with planes |
16:04:07 | alehander92 | iirc |
16:04:16 | Zevv | not with cows |
16:04:22 | Zevv | but with planes |
16:04:27 | alehander92 | it can't grow there |
16:04:33 | Zevv | because cows have a hard time handling the landing |
16:04:38 | alehander92 | like, if you leave your milk here on the sun |
16:04:45 | alehander92 | it just yoghurts or something |
16:04:46 | Zevv | wht cant it grow there? |
16:04:50 | alehander92 | i am very bad at biology |
16:04:56 | Zevv | yeah its like magic |
16:04:56 | alehander92 | it depends on particular bacteria i think |
16:05:03 | Zevv | just like this bread i make. i just m |
16:05:05 | alehander92 | yeah cows handle a lot more man |
16:05:10 | alehander92 | they even handle writes |
16:05:15 | alehander92 | .... ohhhhhh so good |
16:05:23 | Zevv | ix flour and water, scratch my skull and genitals over the bowl and voila |
16:05:31 | alehander92 | C O W i expect my linux award |
16:05:36 | Zevv | three days later I have a live dough going |
16:06:03 | alehander92 | did you pass the keyboard to disruptek |
16:06:06 | alehander92 | in the middle of the sentence |
16:06:12 | alehander92 | this is NSFL |
16:06:26 | Zevv | oh sorry, bad influences I guess |
16:06:36 | Zevv | anyway, im afk because of diner! |
16:06:42 | Zevv | it was a pleasure! |
16:06:46 | alehander92 | my wife also made me sandwiches |
16:06:48 | alehander92 | see ya! |
16:11:12 | * | bung quit (Quit: Lost terminal) |
16:13:34 | * | apahl quit (Remote host closed the connection) |
16:14:02 | * | apahl joined #nim |
16:20:07 | disruptek | dat bread dough |
16:21:59 | alehander92 | dude |
16:22:13 | alehander92 | keep zevv of the bad language! |
16:22:26 | disruptek | the man is a menace. |
16:22:43 | alehander92 | i dont know. |
16:22:56 | alehander92 | he is a man, and an ace |
16:23:29 | alehander92 | today i read about OT |
16:23:34 | disruptek | OT? |
16:23:34 | alehander92 | i do a lot of other stuff |
16:23:37 | alehander92 | but i am trying to get it |
16:23:43 | alehander92 | operational transforms |
16:23:49 | disruptek | what is that/ |
16:23:52 | alehander92 | it seems crdt is not everything |
16:24:07 | disruptek | crdt is not everything. |
16:24:15 | alehander92 | basically a simple way to encode how people collaborate |
16:24:24 | alehander92 | with a central server |
16:24:27 | disruptek | have you seen gun? |
16:24:56 | alehander92 | i am preparing for an interview at an american company. |
16:25:02 | disruptek | oh yeah? |
16:25:09 | alehander92 | i hope it's not really insensitive |
16:25:22 | alehander92 | i haven't seen the gun you're talking about yet |
16:25:23 | disruptek | which part? |
16:25:29 | disruptek | https://gun.eco/ |
16:25:43 | alehander92 | well, you told me there are many jobless in usa |
16:26:11 | alehander92 | but you guys have cool software |
16:27:14 | alehander92 | hm, it sounds as something different |
16:27:24 | alehander92 | it seems OT specifcally needs a central server |
16:27:41 | disruptek | yes, but just as an aside... look at how gun does conflict resolution. |
16:27:48 | disruptek | it's pretty interesting. |
16:28:09 | disruptek | https://github.com/amark/gun |
16:28:10 | alehander92 | https://www.tiny.cloud/blog/real-time-collaboration-ot-vs-crdt/ |
16:28:41 | disruptek | damn sidebar takes up most of the page. the content is one word per line. |
16:28:50 | alehander92 | `cat.slave = mark;` |
16:28:55 | alehander92 | those people live freely |
16:29:00 | alehander92 | <3 |
16:29:05 | * | Jesin quit (Quit: Leaving) |
16:29:30 | alehander92 | but i like they still use a cat as an example of a boss |
16:29:46 | alehander92 | as you get the vegans on your side like that |
16:29:57 | disruptek | i eat vegans for breakfast. |
16:30:14 | alehander92 | don't do that |
16:30:20 | * | tane joined #nim |
16:30:30 | disruptek | dude, ima impl goroutines in nim. |
16:30:45 | disruptek | i think i'm ready. |
16:31:25 | alehander92 | oh man you just know someone did it, right |
16:31:33 | alehander92 | or maybe it was just interfacing with them |
16:31:55 | disruptek | no. |
16:31:58 | disruptek | that's golib. |
16:32:09 | alehander92 | https://github.com/stefantalpalaru/golib-nim |
16:32:13 | disruptek | i've come full circle. |
16:32:20 | disruptek | https://irclogs.nim-lang.org/29-04-2019.html#16:31:55 |
16:32:24 | alehander92 | ok, sounds cool: otherwise thanks for the gun link, i'll keep it in mind |
16:32:44 | disruptek | you have to look at the gun paper. it's the science that is interesting, not the impl. |
16:33:13 | alehander92 | ok |
16:33:21 | alehander92 | i'll leave it for tomorrow! |
16:33:22 | disruptek | which company are you interviewing with? |
16:33:27 | alehander92 | repl.it |
16:33:35 | disruptek | oh that's cool. |
16:33:46 | alehander92 | i mean probably they get super many ppl |
16:33:51 | * | Jesin joined #nim |
16:33:55 | disruptek | not many super people, though. |
16:33:56 | alehander92 | but it's worth a try |
16:34:07 | alehander92 | i am trying at many other companies |
16:34:12 | disruptek | yeah? |
16:34:14 | alehander92 | wait, i wanted to write those guys |
16:34:53 | alehander92 | https://news.ycombinator.com/item?id=24054343 |
16:35:34 | alehander92 | but mostly it's hard to get a response from those, probably they get too many emails after hn |
16:35:47 | alehander92 | most of my interviews seem local to bulgaria |
16:36:07 | alehander92 | including the haskell thing. still trying to wrap my head around stuff |
16:36:30 | disruptek | i'm learning that people just don't want what i'm selling. |
16:38:42 | alehander92 | hm, this is always a pickle |
16:38:45 | alehander92 | for us programmers |
16:39:28 | disruptek | i dunno, i think talented and experienced people get hired easily. |
16:42:45 | * | Cthalupa quit (Ping timeout: 272 seconds) |
16:44:45 | FromDiscord | <dom96> people with connections get hired easily |
16:45:31 | alehander92 | praise God, i found the ad |
16:45:41 | disruptek | oh i have connections. that's the problem: people know me. |
16:45:43 | alehander92 | i just need to write down a little intro |
16:46:00 | * | Cthalupa joined #nim |
16:46:22 | alehander92 | disruptek you're right, but i think personal motivation plays a role |
16:47:02 | alehander92 | e.g. mismatching interests/expectations can often happen |
16:47:33 | disruptek | i'm not sure about that. i can usually convince an interviewer that i will kill their family if they don't hire me. |
16:47:43 | disruptek | it's just hard to get those interviews. |
16:47:46 | alehander92 | which can't possibly help |
16:47:56 | alehander92 | that's weird |
16:48:01 | disruptek | i know. |
16:48:11 | alehander92 | i am almost sure, i can get you interviews |
16:48:22 | alehander92 | if it wasn't for the weirdness of a third person sending cold mails |
16:48:56 | disruptek | i need to work at self-promotion. it's just hard with so many agencies surveilling. |
16:49:15 | alehander92 | i think it would be very easy for you |
16:49:22 | alehander92 | but i suspect you're looking for something niche |
16:49:24 | disruptek | also, the nim compiler is letting me down in a big way. |
16:49:45 | alehander92 | the old chap |
16:49:51 | disruptek | have you played with my testes? |
16:50:24 | FromDiscord | <dom96> That sort of talk will only get you hired in very specific industries, and it won't be at a tech company |
16:50:38 | disruptek | what? |
16:50:46 | alehander92 | i really thought old chap means something more innocent |
16:51:02 | FromDiscord | <dom96> Hrm, actually, maybe you could try PornHub? 😛 |
16:51:04 | disruptek | dom96: get your mind out of the gutter. |
16:51:34 | alehander92 | dom96 looking at the linux code comments from the 90s .. |
16:51:42 | alehander92 | it wasn't always like that |
16:52:24 | alehander92 | but i also wish for a normal library name. just call it `testio-bear` |
16:52:55 | alehander92 | or something |
16:52:58 | disruptek | bare-testes? |
16:53:33 | alehander92 | ~naming is . |
16:53:34 | disbot | naming: 11. |
16:53:52 | alehander92 | you can use random bulgarian words |
16:53:59 | alehander92 | `проба |
16:54:13 | disruptek | i can't even type that shit. |
16:54:14 | alehander92 | look: sounds misterious, and it's hard to write. great name |
16:54:26 | alehander92 | it makes it hard to copy! |
16:54:37 | FromDiscord | <dom96> best passwords are soviet passwords |
16:54:52 | alehander92 | i hope they dont recognize you |
16:54:58 | alehander92 | would be a bit chinese tech level! |
16:55:01 | * | Trustable joined #nim |
16:55:08 | FromDiscord | <lqdev> disruptek: npo6a |
16:55:17 | disruptek | we will all be chinese soon enough. |
16:55:21 | alehander92 | sounds like a rapper |
16:57:09 | * | superbia1 joined #nim |
17:00:36 | * | superbia quit (Ping timeout: 265 seconds) |
17:01:21 | * | ehmry_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
17:01:42 | FromDiscord | <tomck> Is there a way to allocate & copy a value into that spot, in a single expression? |
17:01:44 | Zevv | so disruptek, where were we |
17:02:09 | FromDiscord | <tomck> like, `newInit(MyValue(x: ...))` to get a `ref MyValue` |
17:02:29 | FromDiscord | <tomck> seems I can only do `newInit(MyValue)` in one line, then manually assign all the values afterwards, which can be a pain sometimes |
17:02:45 | FromDiscord | <tomck> (I don't care about extra copies) |
17:03:04 | disruptek | can you give an example? |
17:03:07 | disruptek | a real example? |
17:03:34 | disruptek | Zevv: i first threatened to impl csp in april of 2019. it's overdue! |
17:03:47 | Zevv | no no you threatened to impl core async |
17:03:52 | Zevv | I remember that |
17:03:54 | disruptek | same difference. |
17:04:08 | Zevv | that was end of april somewhere I believe |
17:04:19 | disruptek | tomck: myNewRefObject(x: 1, y: 2) -- alloc and return |
17:04:30 | Zevv | disruptek: https://www.youtube.com/watch?v=JUrOebC5HmA other one |
17:04:42 | Zevv | "split it up into a state machine" |
17:05:05 | FromDiscord | <tomck> I have an 'init' function which returns a value of the object, is there any standard function to take a `T` and return a `ref T`? |
17:05:32 | FromDiscord | <tomck> otherwise if I have an object whihc I sometimes want to use as a value, and i sometimes want to use as a ref, I need to double-implement all the construction functions |
17:05:49 | disruptek | sometimes you want it on the stack and other times you don't? |
17:05:51 | FromDiscord | <Clyybber> Ah, no, but zevv proposed to add it to the stdlib |
17:05:51 | disruptek | why? |
17:06:03 | FromDiscord | <tomck> Err i just do |
17:06:09 | FromDiscord | <tomck> that seems pretty common (to me) |
17:06:19 | disruptek | write a template. |
17:06:31 | Zevv | no you can't do that. You cant magically "ref" a non ref |
17:06:42 | Zevv | it requires a deep copy |
17:06:42 | disruptek | you can. |
17:06:47 | Zevv | no dude. |
17:06:50 | FromDiscord | <tomck> i want to shallow copy |
17:06:52 | FromDiscord | <Clyybber> its not a deep copy |
17:07:04 | FromDiscord | <Clyybber> you don't have to copy ref fields |
17:07:07 | Zevv | oh right, it doesn't need to be deep |
17:07:07 | disruptek | everybody in the world, is bent. |
17:07:12 | Zevv | sorry |
17:07:14 | Zevv | my wrong |
17:07:22 | FromDiscord | <Clyybber> *you* proposed it haha |
17:07:22 | disruptek | no apologize. |
17:07:24 | Zevv | but still, it *is* a copy :) |
17:07:26 | disruptek | now apologize. |
17:07:28 | disruptek | now apologize! |
17:07:34 | Zevv | no, I proposed syntax for new object constructors |
17:07:37 | Zevv | new Thing(val: 42) |
17:07:46 | disruptek | (ref Thing) |
17:07:53 | Zevv | that is nasty |
17:07:59 | FromDiscord | <tomck> yes, is there a way to allocate + copy something into a `ref T`, or do i write that myself? |
17:08:26 | FromDiscord | <Clyybber> @tomck proc new(a: T): ref T = result = new T; result[] = a |
17:08:34 | FromDiscord | <tomck> Can i explicitly shallow copy? LIke if I moved a `seq[T]` to a `ref seq[T]`, would that copy the whole contents of the `seq[T]`? because I wouldn't want that, I'd want a 'move constructor' or whatever |
17:08:56 | FromDiscord | <Clyybber> Are you using arc? |
17:09:00 | FromDiscord | <tomck> no |
17:09:04 | disruptek | why not? |
17:09:11 | FromDiscord | <Clyybber> In general, you can trust the compiler to move it |
17:09:22 | FromDiscord | <tomck> i have a gc project & i don't want to just move to move semantics + refs + all that |
17:09:29 | FromDiscord | <tomck> errrrrrrrrrr interesting ok |
17:10:09 | FromDiscord | <tomck> alright ta, i'll just hope that works i suppose, i'll be back if there are weird performance issues dw;) |
17:10:18 | FromDiscord | <tomck> thanks for the help |
17:10:20 | FromDiscord | <Clyybber> np |
17:10:33 | FromDiscord | <tomck> also, any chance this gets added to the stdlib? seems like a really common function, i'm surprised it's not there already |
17:10:41 | disruptek | clyybber: does your pr fix some cps stuff? |
17:10:49 | disruptek | tomck: it's smelly. |
17:10:51 | FromDiscord | <tomck> that way we can also get the `new T(x: 0, y: 0)` syntax |
17:11:00 | FromDiscord | <Clyybber> @tomck Yeah, I vor for adding it to the stdlib |
17:11:01 | FromDiscord | <tomck> which would probably always optimise away the copy trivially |
17:11:01 | disruptek | we already have that. |
17:11:06 | FromDiscord | <tomck> do we? |
17:11:08 | FromDiscord | <Clyybber> But araq is on holidays currently |
17:11:12 | FromDiscord | <Clyybber> disruptek: We don't |
17:11:18 | FromDiscord | <Clyybber> You are thinking RefObject(x:0) |
17:11:21 | disruptek | yes. |
17:11:29 | disruptek | true, we did talk about adding new. |
17:11:30 | FromDiscord | <Clyybber> He wants new NoRefObject(x: 0) |
17:11:38 | disruptek | rude. |
17:11:47 | FromDiscord | <tomck> Ah gtg, ty for help |
17:11:55 | FromDiscord | <Clyybber> oh, eh my PR doesn't fix any CPS issues I think |
17:12:09 | FromDiscord | <Clyybber> but it should at least give you confidence that your nimcall actually is a nimcall |
17:12:09 | Zevv | https://play.nim-lang.org/#ix=2tUC |
17:12:10 | Zevv | too bad |
17:12:17 | FromDiscord | <Clyybber> because before it would get silently turned into a closure |
17:12:18 | disruptek | i'm starting to think my mangling bug is a nim bug. |
17:12:23 | Zevv | We need a '--gc:arc' checkbox on nim playground |
17:12:27 | FromDiscord | <Clyybber> if you ever pass a closure to it |
17:12:37 | disruptek | right. |
17:12:49 | Zevv | it does do the right thing with arc tho |
17:14:11 | FromDiscord | <Clyybber> disruptek: The cpp bug? |
17:14:16 | disruptek | yeah. |
17:14:18 | Zevv | all of them! |
17:14:34 | disruptek | well, we have a couple macro bugs and an arc bug blocking us, too. |
17:14:43 | Zevv | the arc is not blocking |
17:14:55 | Zevv | we can work perfectly fine without arc, we only can't do proper performance testing |
17:15:07 | Zevv | the gensym we can work around as well, for now |
17:15:27 | disruptek | exceptions. |
17:15:29 | FromDiscord | <Clyybber> I wonder if devel will break you |
17:15:38 | FromDiscord | <Clyybber> koch boot faster |
17:15:40 | Zevv | I was broken long ago |
17:16:25 | disruptek | it's 31° in here. 😩 |
17:16:46 | Oddmonger | lucky man |
17:16:47 | FromDiscord | <Clyybber> hey, it didn't break you \o/ |
17:17:10 | FromDiscord | <Clyybber> disruptek: probs to you for not using the F word |
17:17:23 | * | Senketsu quit (Ping timeout: 240 seconds) |
17:18:29 | disruptek | it's annoying that proc prototypes are generated without actually having a source proc. |
17:18:44 | Zevv | man the more I read clojure, the more I want to drop nim and go there |
17:18:57 | disruptek | the problem is performance and ffi. |
17:19:00 | Zevv | life without syntax must be great |
17:19:18 | disruptek | we can build it inside nim. |
17:19:31 | FromDiscord | <Yardanico> Life with JVM must be great |
17:19:34 | FromDiscord | <Clyybber> or you can just use closure, and come back crying |
17:19:49 | disruptek | i think it's pretty damned nice. |
17:19:55 | FromDiscord | <IanIAnIAN> use Nyquist instead |
17:20:07 | disruptek | but, we can get into the jvm with graal, eventually. |
17:20:27 | FromDiscord | <Clyybber> disruptek: It is, but braces just arent for humans IMO |
17:20:54 | disruptek | silly. |
17:20:57 | FromDiscord | <Clyybber> and after all the language is the medium between us and the computer |
17:20:58 | FromDiscord | <dom96> > it's 31° in here. 😩↵@disruptek[IRC]#0000 34C here and no AC |
17:21:16 | FromDiscord | <Clyybber> getting cloudy here, finally |
17:21:36 | disruptek | 35 inside my rv. |
17:21:44 | disruptek | poor dog. |
17:21:46 | disruptek | ~bentley |
17:21:47 | disbot | bentley: 11https://imgur.com/gallery/yEXiWWG -- disruptek |
17:21:47 | disbot | bentley: 11a good boy |
17:21:52 | FromDiscord | <dom96> Just waiting for https://media.discordapp.net/attachments/371759389889003532/742794926005420123/unknown.png |
17:22:01 | FromDiscord | <dom96> RAIN ON MEHHH |
17:22:37 | Zevv | we just had a nice hour of downpour |
17:22:48 | Zevv | it's at least, like, 1.5°C cooler now |
17:24:07 | disruptek | anyway, let's build this thing. |
17:27:20 | disruptek | or would you rather switch to clojure? |
17:27:49 | Zevv | nah i'm watching this vid. It was cool when the procs were 4 lines big and there were 3 of them. But the larger examples are becoming totally illegible |
17:28:15 | Zevv | just this whirling soup of parentheses on my screen |
17:30:12 | * | vicfred quit (Quit: Leaving) |
17:38:26 | FromGitter | <benash> Anyone know why I might be getting an SSL error when doing a GET with `httpClient` but not `libcurl`? I also only get it for one particular host, not all https connections. The message is: `Error: unhandled exception: TLS/SSL connection failed to initiate, socket closed prematurely. [SslError]` |
17:39:25 | FromDiscord | <Varriount> Zevv: Can I see the example of the soup? |
17:40:45 | Zevv | https://youtu.be/JUrOebC5HmA?t=1106 |
17:41:00 | Zevv | I count 6 )s in a ro |
17:41:05 | Zevv | can also be 7, can't tell |
17:41:34 | Zevv | ain't nobody got eyes to look at that |
17:41:45 | FromDiscord | <Clyybber> exactly |
17:44:20 | FromDiscord | <PizzaFox> does the openssl wrapper library have aes support? i looked at the docs page and didnt see anything but wanted to double check |
17:44:48 | FromDiscord | <dom96> Zevv, disruptek: What is this? A Clojure channel? |
17:45:06 | FromDiscord | <dom96> > does the openssl wrapper library have aes support? i looked at the docs page and didnt see anything but wanted to double check↵@PizzaFox dunno, but if it doesn't then add it 🙂 |
17:45:17 | Zevv | sure. We praise the high level concepts, but we bash the syntax and the implementation |
17:49:46 | disruptek | i think dom96 is afraid of clojure. |
17:50:32 | FromDiscord | <dom96> I created a website for a Clojure book once |
17:50:35 | Zevv | so disruptek, given your #31, what do you propose. Do we put them in the right order and implement them one by one? |
17:50:51 | disruptek | do we have that many issues? |
17:50:53 | FromDiscord | <dom96> Back in my blunder years |
17:51:10 | disruptek | oh shoot. |
17:51:15 | Zevv | dom96: I bet a clojure book would have brought in more money then a nim book |
17:51:16 | Zevv | :) |
17:53:02 | FromDiscord | <Clyybber> afaik there a pr open for aes support |
17:53:04 | FromDiscord | <dom96> The only Clojure book vs. the only Nim book, perhaps. But one of many Clojure books, not so sure 🙂 |
17:53:20 | Zevv | true, that :) |
17:53:47 | FromDiscord | <Clyybber> ah scratch that |
17:54:20 | FromDiscord | <dom96> The advance for Nim in Action has been paid off btw, which from what I've read is rare for (programming) books |
17:56:14 | disruptek | Zevv: it's not a linear rewrite; it's more of a graph. |
17:58:02 | Zevv | sure, but is it possible to isolate each stage, concentrate on that, test it, and then do the next one |
17:58:08 | * | natrys joined #nim |
17:58:23 | Zevv | the alternative is just take what there is now and iteratively mold it into where you want it to go, of course |
17:59:14 | disruptek | i think we probably do want to iterate. i have a bad habit of writing a lot of code that doesn't work for weeks on end. |
17:59:31 | Zevv | hehe |
17:59:58 | disruptek | IC is mostly done once mangling works. kinda funny. |
18:01:14 | disruptek | do you have a workaround for typed? because iirc, we are blocked there. |
18:01:33 | disruptek | holy shit, cps has 27 stars already. |
18:01:35 | Zevv | well, the only problem is that you can't generate a function with the same name, right? |
18:01:41 | Zevv | why not just call it another name for now |
18:01:49 | disruptek | who are these people and why don't we have any issues from them? |
18:01:56 | Zevv | no one actually runs this stuff |
18:02:02 | alehander92 | it sounds cool |
18:02:28 | Zevv | I thought it would be cool as hell. But now that it kind of works, it's not es enthralling as I expected it to be. |
18:02:37 | disruptek | don't be silly. |
18:02:39 | Zevv | it's just doing what it should do. the magic is gone |
18:02:45 | disruptek | lol |
18:02:56 | disruptek | it was sexier when it was more magical? |
18:03:00 | Zevv | sure |
18:03:06 | Zevv | just like sex was sexier when it was magical |
18:03:06 | disruptek | that's too funny. |
18:03:44 | Zevv | but still, all I do is talk talk, but I don't do any of the coding on this |
18:03:45 | disruptek | csp over cps is going to blow some minds. |
18:04:52 | FromDiscord | <Clyybber> I think calling it another name is a fine workaround for now |
18:05:17 | disruptek | show me. |
18:05:50 | FromDiscord | <Clyybber> I'd rather fix the root cause |
18:06:02 | disruptek | show me. |
18:06:04 | FromDiscord | <Clyybber> of course |
18:06:09 | FromDiscord | <Clyybber> show me. |
18:06:18 | disruptek | i'm trying. |
18:06:21 | FromDiscord | <Clyybber> disruptek: I'm trying. But my fix is wrong |
18:06:25 | FromDiscord | <Clyybber> wtf |
18:06:29 | disruptek | wtf |
18:06:42 | FromDiscord | <Clyybber> one mind two ppl |
18:07:15 | FromDiscord | <Clyybber> whats this https://github.com/disruptek/dust |
18:07:19 | disruptek | wherever you think the problem is, it's not there. |
18:07:27 | disruptek | dust? |
18:07:50 | FromDiscord | <Clyybber> disruptek: WDYM? |
18:08:05 | disruptek | you're looking for the problem in the wrong place. |
18:08:15 | FromDiscord | <Clyybber> the problem is typed args leaking into the caller scope |
18:08:31 | FromDiscord | <Clyybber> which they must not |
18:09:25 | disruptek | dust is unattended syntax truncation, obviously. |
18:10:17 | FromDiscord | <Clyybber> and wine is not an emulator, got it |
18:10:55 | disruptek | yep. |
18:15:35 | disruptek | i'm out of tequila. |
18:15:50 | disruptek | normally, this wouldn't be a problem, but i'm out of edibles, too. |
18:16:24 | FromDiscord | <dom96> Note: The Nim community does not condone drug use. |
18:16:42 | disruptek | speak for yourself. |
18:16:56 | Yardanico | we need a new channel for disruptek specifically |
18:16:58 | Yardanico | #nim-wild |
18:17:11 | Yardanico | and I'm not even fully joking |
18:17:16 | * | hnOsmium0001 joined #nim |
18:17:32 | disruptek | hey man, one cannot approach hacking the compiler with a clear mind. |
18:17:44 | FromDiscord | <KingDarBoja> 😄 |
18:17:48 | FromDiscord | <😬🤣> is there a workaround for {.inject.} not working on proc args? |
18:18:05 | disruptek | what? |
18:18:09 | Yardanico | by using "var arg {.inject.} = arg" |
18:18:15 | FromDiscord | <😬🤣> compiler freaks out if I do `template someArgs: untyped = someArgImpl` |
18:18:17 | Yardanico | disruptek: I think they're talking about procs made by templates |
18:18:25 | Yardanico | and injecting proc arguments |
18:18:28 | FromDiscord | <😬🤣> some of them are `var` types... |
18:18:51 | Yardanico | provide the name of the arg to the call to the template |
18:19:33 | Yardanico | or use simple macros |
18:19:39 | Yardanico | stuff like quote do or getAst exists |
18:19:40 | FromDiscord | <Clyybber> I don't understand the issue |
18:19:48 | Yardanico | @Clyybber it's simple |
18:19:51 | disruptek | once i had tequila. |
18:19:53 | disruptek | now i don't. |
18:20:41 | FromDiscord | <Clyybber> Yardanico: Is it about `proc p(a {.inject.}: T)` not owkring? |
18:20:44 | Yardanico | if I understood correctly, they're asking for how to inject data here |
18:20:45 | Yardanico | https://play.nim-lang.org/#ix=2tUR |
18:20:46 | Yardanico | yeah |
18:20:59 | FromDiscord | <Clyybber> yeah, I remember asking araq about that one |
18:21:08 | FromDiscord | <Clyybber> if it makes sense to gensym proc args at all |
18:21:26 | FromDiscord | <Clyybber> but he was too tired to think about it that day :) |
18:21:31 | Yardanico | I think you can use byaddr |
18:21:32 | FromDiscord | <Clyybber> and now hes gone into the abyss |
18:21:50 | FromDiscord | <😬🤣> sent a code paste, see https://play.nim-lang.org/#ix=2tUS |
18:22:13 | FromDiscord | <😬🤣> basically the line saying `inc x` doesn't compile because there's no `x` |
18:22:17 | Yardanico | yeah see, almost like my example |
18:22:34 | Yardanico | @😬🤣 simplest way is to add argument names to the template arguments |
18:22:51 | Yardanico | also myProc will be gensym'd too |
18:23:07 | Yardanico | maybe you want a dirty template? |
18:23:09 | Yardanico | it'll work then |
18:23:33 | disruptek | when i take power, people that don't add argument names to templates will be first against the wall. |
18:24:06 | FromDiscord | <😬🤣> right, I got it working |
18:24:12 | FromDiscord | <😬🤣> sent a code paste, see https://play.nim-lang.org/#ix=2tUT |
18:24:15 | FromDiscord | <😬🤣> Thanks |
18:24:40 | FromDiscord | <Clyybber> I'll make a fix for the fact that you can't do {.inject.} on the param |
18:24:45 | FromDiscord | <😬🤣> `myProc` didn't get gensym's btw |
18:24:58 | FromDiscord | <Clyybber> yeah |
18:25:01 | FromDiscord | <Clyybber> but its params did |
18:25:09 | FromDiscord | <Clyybber> thats the thing I'm not sure is a good idea :P |
18:26:00 | FromDiscord | <😬🤣> I'm guessing it's been in Nim forever so changing it would be a breaking change |
18:26:13 | FromDiscord | <😬🤣> procs not getting gensym'd |
18:27:09 | Yardanico | also if you are not against it, can you please change your discord nickname (I mean the one used for the handle, not the display name)? It would be a bit easier to ping you and talk with you :) |
18:27:43 | FromDiscord | <Clyybber> @😬🤣 Nah, thats intended |
18:27:52 | FromDiscord | <Clyybber> Procs are {.inject.} by default |
18:27:58 | FromDiscord | <Clyybber> I'm talking about gensymming their parameters |
18:28:37 | FromDiscord | <Clyybber> @Yardanico You could fix it in the bridge :P |
18:28:40 | Yardanico | fix what? |
18:28:46 | FromDiscord | <Clyybber> the name |
18:28:48 | Yardanico | ?? |
18:28:50 | Yardanico | it's emojis |
18:28:54 | FromDiscord | <Clyybber> by translating emojis to their text equivalent |
18:28:55 | Yardanico | meh |
18:29:01 | Yardanico | that would be much more verbose |
18:29:07 | * | Guest63171 quit (Ping timeout: 256 seconds) |
18:29:12 | FromDiscord | <Clyybber> grimainglaughing |
18:29:12 | Yardanico | Honestly I wish services never allowed for full UTF-8 in handles :) |
18:29:22 | Yardanico | it's fine for display names, but not for handles |
18:29:34 | disruptek | it's almost like irc was a sufficient impl. |
18:29:39 | Yardanico | almost |
18:29:46 | Yardanico | need message editing support |
18:30:33 | FromDiscord | <dk> I'm pretty sure there's no difference between a handle and a display name in Discord |
18:30:39 | * | vicfred joined #nim |
18:30:42 | FromDiscord | <dk> I'm the emoji person btw |
18:30:58 | Yardanico | there can be difference |
18:31:03 | Yardanico | if you change your display name on a server :) |
18:31:07 | Yardanico | on some specific server |
18:31:53 | FromDiscord | <KingDarBoja> Welcome DK (aka EmojiGuy) |
18:36:25 | FromDiscord | <Kiloneie> If you change that lowercase dk to uppercase DK, you can be known as Donkey Kong. |
18:37:32 | FromDiscord | <dom96> https://tenor.com/view/confident-cocky-smirk-smile-sneer-gif-16053968 |
18:37:40 | FromDiscord | <dom96> That's drift king to you |
18:37:43 | Yardanico | "https://tenor.com/view/confident-cocky-smirk-smile-sneer-gif-16053968" |
18:37:51 | Yardanico | that name |
18:37:51 | FromDiscord | <dom96> great url lol |
18:38:21 | FromDiscord | <Kiloneie> Did you both just get the same idea lol ? |
18:38:29 | Yardanico | no? |
18:38:37 | Yardanico | I posted the URL of the GIF because I thought it was funny |
18:38:46 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/742814282961518623/unknown.png |
18:38:48 | FromDiscord | <Kiloneie> ah okay, what movie is that ? |
18:39:05 | disruptek | fast and bi-curious. |
18:40:34 | FromDiscord | <Kiloneie> is that the tokyo one ? |
18:40:42 | FromDiscord | <Kiloneie> i think i watched it |
18:40:46 | disruptek | nah. |
18:41:29 | FromDiscord | <Kiloneie> google says no imdb page, therefore, o.o eh ? |
18:42:44 | FromDiscord | <dom96> yep, it's the Tokyo one |
18:50:22 | FromDiscord | <--HA--> When I iterate over an object with fieldPairs how do I check the type of the value? I want to do something if it's a string, something else if int and otherwise ignore it. |
18:50:32 | disruptek | when |
18:51:28 | disruptek | when value is int: ... |
18:51:37 | FromDiscord | <Kiloneie> objectVar.fieldname.typeof is string ? |
18:51:42 | leorize[m] | @dom96 https://github.com/nim-lang/Nim/pull/15174 need your wisdom on this |
18:51:43 | disbot | ➥ asyncnet: don't try to close the socket again [backport] |
18:54:59 | FromDiscord | <--HA--> Ah `is` works well for this. Thanks |
18:58:01 | FromDiscord | <dom96> leorize: commented |
18:58:38 | leorize[m] | so... why is there even a closed flag in the first place? |
18:58:54 | FromDiscord | <dom96> Check the blame? |
19:00:34 | leorize[m] | I did and you added it to fix asynchttpserver |
19:00:49 | leorize[m] | why it was done as a flag is beyond me |
19:02:08 | dom96 | link to the commit? |
19:05:23 | * | Jesin quit (Ping timeout: 240 seconds) |
19:09:52 | leorize[m] | dom96: https://github.com/nim-lang/Nim/commit/efca06c71c47eb636aacefe97e5816dc2e1082ff |
19:11:16 | dom96 | Well, it's obvious, no? |
19:11:26 | dom96 | If the user of asynchttpserver closes the socket then asynchttpserver would blow uo |
19:11:28 | dom96 | *up |
19:11:31 | dom96 | with this change it won't |
19:11:49 | leorize[m] | but why a flag instead of just invalidating the socket? |
19:12:48 | leorize[m] | `net` seems to get by just fine without even having `isClosed` exported |
19:13:04 | * | Jesin joined #nim |
19:14:20 | * | leorize joined #nim |
19:14:27 | * | Jesin quit (Remote host closed the connection) |
19:15:42 | dom96 | guess I preferred using a flag? |
19:16:44 | leorize[m] | but you're also the person who make the change for `net` to invalidate the socket... https://github.com/nim-lang/Nim/commit/1661062ebf147e55e29a0bfb8fc62dc7959b8614#diff-df7c4ae903eab01bc8c4f64f425b48c3R871 |
19:17:21 | dom96 | I didn't write `net` originally |
19:17:50 | dom96 | well, the very early version that used osInvalidSocket |
19:18:03 | dom96 | so I decided to just keep those semantics |
19:20:06 | disruptek | Zevv: you lied to me. |
19:20:15 | leorize[m] | so do you want me to get rid of `closed`? I don't see why we should waste a byte to store that one flag when it can be stored by `fd` |
19:20:19 | disruptek | there is no such thing as _flossin' easter_ |
19:21:20 | dom96 | sure, if you want, in a separate PR |
19:21:39 | Zevv | it's a dutch tradition |
19:21:58 | disruptek | creepy af. |
19:22:12 | Zevv | all the men of the village gather around the water pump, wearing their wooden shoes |
19:22:49 | disruptek | circle floss? |
19:23:13 | Zevv | kind of. floss is limited, so they just share this one piece, going round and round |
19:23:39 | disruptek | when i was wealthy, i had a prepubescent manling floss me in the nude. it's been awhile since i had a proper flossing. |
19:26:09 | Zevv | so, is thsi gensym bug blocking or is it not |
19:26:24 | FromDiscord | <Clyybber> the weird one? |
19:27:14 | Zevv | the "redefinition of 'X'; previous declaration here" one |
19:27:34 | disruptek | that's not a gensym bug afaik. |
19:27:49 | Zevv | aw right, I'm mixing things up |
19:27:53 | FromDiscord | <Clyybber> yeah, more like a template/macro bug in general |
19:27:53 | Zevv | no wonder, with all these bugs we're having |
19:27:54 | * | Jesin joined #nim |
19:27:57 | disruptek | it's side-effects due to sem afaict. |
19:28:09 | Zevv | ok, but is this one blocking for us, it's not really, is it |
19:28:10 | disruptek | you can be forgiven. |
19:28:15 | Zevv | it's inconvenient at most |
19:28:17 | disruptek | show me it's not. |
19:28:34 | Zevv | ok, reading the kids, then I'll give it a go |
19:28:39 | disruptek | kk |
19:28:47 | Zevv | today it's quantum fluctuations |
19:28:52 | Zevv | this book is so cool |
19:28:56 | disruptek | i was wondering when you'd get to that. |
19:31:01 | Zevv | http://www.letterenfonds.nl/en/book/1255/the-mystery-of-nothing-and-infinite-snot |
19:33:16 | disruptek | too bad it's dutch. i guess you can look at the pictures, at least. |
19:39:17 | * | vicfred quit (Quit: Leaving) |
19:46:22 | Zevv | the pictures are *also* very cool |
19:48:17 | Zevv | I hate how macros hae newTHisThat for some types and not for others |
19:48:24 | disruptek | yeah. |
19:48:34 | disruptek | i only use newThis for a couple of 'em. |
19:48:42 | Zevv | why don't we go build this stuff on pmunch's macro tools instead |
19:48:56 | disruptek | i thought about it, but i could tell you didn't like the sorta dep. |
19:49:09 | disruptek | admittedly, it's a little different. |
19:49:23 | Zevv | well, you saw my dep adventures the other day. Not being able to run nimph |
19:49:25 | Zevv | because of deps |
19:49:26 | disruptek | anyway, macros are going away. |
19:49:35 | Zevv | to be replaced by? |
19:49:36 | disruptek | don't feel bad, nimph doesn't work for me, either. |
19:49:44 | disruptek | to be replaced by runtime. |
19:49:53 | Zevv | elaborate |
19:49:58 | disruptek | actually, i re-tagged 1.0. it should work for people. |
19:50:23 | disruptek | the holy man comes down from the mountain in 3 days. |
19:50:37 | disruptek | he told us before he left that he'd be removing the vm. |
19:50:40 | FromDiscord | <Clyybber> disruptek is being sarcastic I think |
19:50:43 | FromDiscord | <Clyybber> what |
19:50:45 | disruptek | nah. |
19:50:49 | FromDiscord | <Clyybber> oh, yeah |
19:50:58 | FromDiscord | <Clyybber> but that doesn't mean macros are going away |
19:51:14 | FromDiscord | <Clyybber> and they aren't going to runtime either |
19:51:14 | disruptek | it's a slippery slope. |
19:51:24 | Zevv | so it pulls in half the compiler instead, or what? |
19:51:27 | disruptek | we won't need them much longer. |
19:51:32 | FromDiscord | <Clyybber> bs |
19:51:37 | FromDiscord | <Rika> thonk |
19:51:39 | Yardanico | it's just experiments |
19:51:49 | FromDiscord | <Clyybber> Zevv: I think the idea was instead of using the VM you'd compile it to C and staticExec it |
19:52:01 | FromDiscord | <lqdev> if the vm goes away, now my scripting language will actually have a reason to exist ;) |
19:52:01 | disruptek | take the blue pill, wake up and believe whatever you want to believe. |
19:52:02 | FromDiscord | <Clyybber> but the devil is in the details |
19:52:20 | Zevv | hmm that sounds non-trivial |
19:52:53 | disruptek | what's nontrivial is supporting two languages that do the same thing. |
19:53:04 | FromDiscord | <Clyybber> its one language two impls:) |
19:53:14 | FromDiscord | <Clyybber> and not even that |
19:53:28 | FromDiscord | <Clyybber> they share the parse, sem phase |
19:53:34 | disruptek | you're allowed to be wrong, but first you must concede the point. |
19:53:35 | FromDiscord | <Clyybber> so its really just the execution phase |
19:53:52 | Zevv | disruptek: http://ix.io/2tVn |
19:54:03 | Zevv | "show me how" |
19:54:06 | FromDiscord | <Recruit_main707> i am reading 4raq's destructor page, and this appears about nim without gc, `Strings and seqs will support O(1) slicing`, can somebody explain it to me, i still havent been teached big O notation :v |
19:54:11 | Zevv | am I that smart or are you that stupid? |
19:54:22 | disruptek | yes? |
19:54:29 | FromDiscord | <Clyybber> @Recruit_main707 it means its constant time. No copying |
19:55:09 | Zevv | disruptek: no magic to it right? Just give it another name for now |
19:55:12 | Yardanico | @Recruit_main707 |
19:55:19 | * | Vladar quit (Quit: Leaving) |
19:55:24 | Yardanico | O(1) usually means same timing regardless of the size/values/etc |
19:55:34 | disruptek | Zevv: have doFoo make two procs. |
19:56:37 | Zevv | http://ix.io/2tVo |
19:56:43 | Zevv | I can do three too, if you like that sort of thing |
19:56:52 | FromDiscord | <Recruit_main707> so... in practice, what restrictions does it have, it means i cant save a slice in a new variable? |
19:58:21 | Yardanico | ? |
19:58:37 | Yardanico | that's not related to O notation at all |
19:58:50 | FromDiscord | <Recruit_main707> i dont understand what, "same timing" means here |
19:58:50 | disruptek | Zevv: so hack it into the typed branch? |
19:59:11 | Yardanico | @Recruit_main707 well, first of all IDK if it was implemented |
19:59:24 | Yardanico | it should probably be possible (or already done) with cursor inference |
19:59:32 | Zevv | I can't touch your code. My hands get dirty. |
19:59:38 | Yardanico | but basically if string is 1 char |
19:59:39 | Yardanico | or 1000000000 chars |
19:59:43 | disruptek | c'mon. just replace the clone() calls. |
19:59:45 | Yardanico | the slicing sped will be the same |
19:59:53 | Zevv | disruptek: lemm see |
20:00:01 | Yardanico | @Recruit that article is pretty outdated btwe |
20:00:02 | Yardanico | btw |
20:00:02 | FromDiscord | <Clyybber> it wasn't implemented yet |
20:00:14 | Yardanico | is it possible with cursor inference? |
20:00:24 | Yardanico | if it's safe to do, you don't need a copy for slicing |
20:00:24 | FromDiscord | <Clyybber> it should be in theory |
20:00:28 | FromDiscord | <Clyybber> yeah |
20:00:47 | FromDiscord | <Clyybber> but its a bit more complicated |
20:00:54 | disruptek | we really need to make a views feature for people. |
20:01:00 | disruptek | it's crazy. |
20:01:57 | Zevv | I have this nasty problem where nim complication get cached if it's the wrong file with the same name. |
20:02:09 | Zevv | I have a t.nim in 50 places, and if I compile one of them, nim gives me the last cached one |
20:02:15 | Zevv | I don't rembember always seeing that |
20:02:29 | disruptek | i have too many t.nims, too. |
20:03:10 | Yardanico | for me it's usually a.nim b.nim or tt.nim :D |
20:03:18 | Yardanico | 1-2 letter combinations |
20:03:59 | disruptek | i don't have the cache problem, but i tend to use local caches. |
20:04:00 | Zevv | 2 letters, man, that's *so* much work to type |
20:04:38 | Zevv | disruptek: I have other issues with typed: /home/ico/external/Nim/lib/system/fatal.nim(49, 5) Error: unhandled exception: /home/ico/sandbox/prjs/cps/cps/environment.nim(482, 3) `not via.isEmpty` [AssertionDefect] |
20:06:12 | disruptek | it might need a tweak to know the root type. |
20:06:27 | disruptek | via is the parent Cont. |
20:07:08 | Zevv | hm but I don't even get to clone() now |
20:08:16 | disruptek | you should be running line 622. |
20:09:30 | Zevv | no I don't get there |
20:09:52 | Zevv | hm wait |
20:10:01 | disruptek | you're on 54c8...? |
20:10:28 | disruptek | 622 in cps.nim, i mean. |
20:10:46 | Zevv | no, i need to add the :C now I guess |
20:11:17 | * | FromDiscord quit (Remote host closed the connection) |
20:11:30 | Zevv | ok i'm good |
20:11:32 | * | FromDiscord joined #nim |
20:11:34 | disruptek | yes, because we don't use the return value -- it will be for the user's use. |
20:12:40 | disruptek | :C looks like a very unhappy muppet. |
20:12:42 | * | FromDiscord quit (Remote host closed the connection) |
20:12:57 | * | FromDiscord joined #nim |
20:12:57 | * | FromDiscord quit (Remote host closed the connection) |
20:13:12 | * | FromDiscord joined #nim |
20:14:13 | Zevv | beaker |
20:14:32 | disruptek | lol |
20:15:24 | disruptek | i was convinced i could see color on our black & white television until we upgraded and i saw that show in color. |
20:17:39 | Zevv | http://zevv.nl/div/adamsfamily.jpg |
20:18:02 | disruptek | yikes. |
20:19:49 | Zevv | pull your typed |
20:19:50 | * | a_chou joined #nim |
20:19:53 | * | a_chou quit (Remote host closed the connection) |
20:20:02 | Zevv | it now generates two foo_clone() procs |
20:20:20 | * | a_chou joined #nim |
20:20:54 | disruptek | is that good? |
20:21:27 | disruptek | did we try adding a template? |
20:21:30 | disruptek | i can't remember. |
20:24:42 | * | a_chou quit (Client Quit) |
20:28:17 | Zevv | I don't know. but this works for now, right? |
20:28:43 | disruptek | i forget how to git. |
20:28:59 | disruptek | why don't they show your changes? |
20:29:23 | FromDiscord | <Clyybber> @dk Putting the inject pragma on the param should work now |
20:31:04 | FromDiscord | <dk> @Clyybber Wow, that was fast |
20:31:09 | FromDiscord | <Clyybber> :D |
20:31:21 | disruptek | he works quickly when he wants to. |
20:31:30 | Zevv | oh I didn't push properly sorry |
20:31:31 | Zevv | one moment |
20:31:34 | disruptek | too bad he never wants to close our bugs. |
20:31:47 | Zevv | done |
20:31:53 | Zevv | now you do a 'git pull --rebase' |
20:31:57 | Zevv | you can do it! |
20:32:01 | disruptek | yeah, thanks, buddy. |
20:32:13 | disruptek | but it doesn't work. |
20:33:09 | FromDiscord | <Clyybber> disruptek: Your bugs are the hard ones :D |
20:33:21 | Zevv | disruptek: well, that it doesn't *work* is not my fault |
20:33:22 | FromDiscord | <Clyybber> not so much bugs as to undesigned features |
20:33:26 | Zevv | it was already broken, wasnt it |
20:33:30 | Zevv | but the bug is gone |
20:33:34 | disruptek | fair enough. nice job. |
20:33:43 | Zevv | and the xfrm shows to properly converted procs |
20:33:49 | disruptek | the output looks good, yes. |
20:34:01 | disruptek | now if only the compiler worked... 😉 |
20:34:24 | disruptek | s/clone/clyybber/ should help. |
20:34:58 | Zevv | I can append "_clyybber" instead of "_clone", would that help? |
20:35:05 | disruptek | already pushed, my friend. |
20:35:16 | Zevv | git commit -a --amend; git push -f |
20:35:38 | FromDiscord | <Clyybber> lol |
20:36:47 | disruptek | clyybber wants us to believe that mutating or copying typed ast inside a macro is an undesigned feature. |
20:37:11 | disruptek | never before in the history of nim has anyone wanted to do such a thing. |
20:37:17 | FromDiscord | <Clyybber> tell me, this: `macro m(a: typed): untyped = a; m: static: echo "hey"` *should* echo hey twice |
20:37:45 | FromDiscord | <Clyybber> disruptek: Oh noe, I mean that when you try to fix it, you get into undesigned territory |
20:37:48 | disruptek | yes. |
20:38:02 | FromDiscord | <Clyybber> guess what it does rn |
20:38:04 | FromDiscord | <Clyybber> it echos once |
20:38:11 | disruptek | sweet. |
20:38:11 | FromDiscord | <Clyybber> and not after the macro has been evaluated |
20:38:23 | disruptek | doesn't anyone ever test this shit? |
20:38:24 | FromDiscord | <Clyybber> so thats the undesigned part |
20:38:48 | disruptek | the manual literally says that macro output is re-evaluated. |
20:38:54 | Zevv | wait what |
20:38:58 | Zevv | you cant mutate typed AST? |
20:39:03 | FromDiscord | <Clyybber> we don't resem untyped ast |
20:39:14 | disruptek | he means typed. |
20:40:07 | Zevv | well, we will do it anyway, right |
20:40:09 | FromDiscord | <Clyybber> disruptek: oh, where does it say that? |
20:40:16 | disruptek | ~manual |
20:40:16 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek |
20:40:19 | FromDiscord | <Clyybber> I thought there basically was no spec on that |
20:40:33 | FromDiscord | <Clyybber> i must be blind |
20:40:33 | disruptek | oh maybe i'm thinking of clojure. |
20:40:43 | Zevv | dude |
20:41:00 | FromDiscord | <Clyybber> bruh |
20:41:01 | Zevv | disruptek: What is this? A Clojure channel? |
20:41:07 | disruptek | semantic analysis happens at least twice: |
20:41:16 | disruptek | https://nim-lang.org/docs/manual.html#macros |
20:41:27 | disruptek | It repeats semantic analysis of that region of the code. |
20:41:46 | Zevv | yeah because if not, what would be the friggin use?! |
20:42:02 | Zevv | Hey its still there, I threw that out! "However, this is no real restriction because Nim's syntax is flexible enough anyway." |
20:42:04 | disruptek | tell it to _clyybber(). |
20:42:20 | FromDiscord | <Clyybber> Zevv: Thats the stable docs buddy |
20:42:23 | Zevv | oh you're reading old manuals. don't do that |
20:42:32 | Zevv | stable docs are outdated docs |
20:42:36 | disruptek | new for nim 1.3: macros only sem once. |
20:42:41 | Zevv | haha |
20:43:03 | Zevv | so, just ignore clyybber and go where no man has gone before, right |
20:43:20 | Zevv | boldly |
20:43:33 | disruptek | what? |
20:43:39 | disruptek | plenty of people have built stuff with clojure. |
20:44:03 | disruptek | oh you mean nim? |
20:44:04 | Zevv | I've heard its slow and the FFI sucks |
20:44:42 | disruptek | i heard their macros sem twice. |
20:44:56 | disruptek | no wonder it's so slow. |
20:45:46 | Zevv | ghehe |
20:46:01 | Zevv | anyway, early to bed because all wake makes zevv a dull boy |
20:46:07 | disruptek | nice job, zevv. |
20:46:18 | Zevv | well, was it *that* hard |
20:46:24 | disruptek | hopefully you will have tuple destructuring tomorrow AM. |
20:46:48 | Zevv | go for it. I'll put in the channels and then we can have a presentation at NimConf |
20:47:00 | Zevv | you do the talking, I'll do the mime |
20:47:14 | disruptek | i probably won't be alive by then, but i can record my voice. |
20:47:38 | Zevv | yes, record some stories so we can AI synthesize you |
20:47:46 | Zevv | and then complain and play you at 1.5x speed on youtube |
20:47:54 | disruptek | probably easier done than said. |
20:48:17 | Zevv | so, remember: no checking in of broken code in master anymore |
20:48:31 | Zevv | this stuff is getting serious now, with 27 stars |
20:48:39 | disruptek | i should put a little markov chain generator into the bot. just regurgitates disruptek commentary. |
20:48:55 | disruptek | i know, that's a whole constellation and a half. |
20:48:59 | Zevv | pretty repetative anyway |
20:49:08 | disruptek | aight, sleep tight, zevv. |
20:49:15 | Zevv | o/ |
20:49:46 | FromDiscord | <Clyybber> gn |
20:50:36 | disruptek | man, i really miss tequila. |
20:50:53 | disruptek | last week i belched so violently that i cracked a rib. |
20:51:04 | disruptek | hard to keep my mind on code with all this pain. |
20:51:13 | Zevv | no, you shouldnt have moved to absynth, that was a bad decision |
20:51:34 | disruptek | absynth doesn't give me gas; it's the garlic that does it. |
20:51:36 | Zevv | absint absinth whatever the spelling |
20:51:44 | FromDiscord | <Clyybber> its a bit tricky |
20:51:47 | disruptek | absinthe, i believe. |
20:52:06 | FromDiscord | <Clyybber> when a macro arg is typed and we return it as typed |
20:52:15 | FromDiscord | <Clyybber> we need to sem it before passing it to the macro |
20:52:38 | disruptek | mutation sucks. |
20:52:43 | FromDiscord | <Clyybber> but afterwards we have to sem it a bit again, so that we get the symbols into scope |
20:52:45 | disruptek | side-effects, i mean. |
20:52:49 | FromDiscord | <Clyybber> yeah |
20:53:08 | disruptek | you have to remove the old stuff, though, no? |
20:53:26 | FromDiscord | <Clyybber> yeah, my PR currently only does that |
20:53:28 | FromDiscord | <Clyybber> remove the old stuff |
20:53:45 | disruptek | okay, so you remove it, macro it, sem it back in? |
20:53:51 | disruptek | in theory. |
20:53:56 | FromDiscord | <Clyybber> in theory |
20:54:09 | FromDiscord | <Clyybber> but what if the macro returns typed |
20:54:10 | disruptek | sounds like a problem to me. |
20:54:13 | FromDiscord | <Clyybber> and you sem it back in |
20:54:16 | FromDiscord | <Clyybber> what should happen |
20:54:36 | FromDiscord | <Clyybber> ok, well the typed ast can either be a copy, then we resem it completely |
20:54:38 | FromDiscord | <Clyybber> right? |
20:54:40 | disruptek | the bigger problem is, whatever if the input to the macro has necessary side-effects to the macro? |
20:55:14 | disruptek | you have to leave it in, then remove the old version after the macro is done making the new version. |
20:55:15 | FromDiscord | <Clyybber> yeah, because we wouldn't want those to get triggered twice in macro noop(a: typed) typed = a |
20:55:50 | disruptek | it does seem like it has to be a copy, but a perfect copy. |
20:55:57 | FromDiscord | <Clyybber> I mean the sideeffect of wahtever you pass to noop should only be get evaluated once |
20:56:03 | FromDiscord | <Clyybber> unless you somehow deepcopy a |
20:56:12 | FromDiscord | <Clyybber> which I'm not sure allows mutation then |
20:56:14 | FromDiscord | <Clyybber> I think not |
20:56:19 | disruptek | it's a problem. |
20:56:20 | FromDiscord | <Clyybber> so we are protected on that front |
20:56:26 | FromDiscord | <Clyybber> the problem is the scope |
20:56:34 | FromDiscord | <Clyybber> we sem it before the evaluation |
20:56:46 | FromDiscord | <Clyybber> but we need the symbols afterwards |
20:57:05 | FromDiscord | <Clyybber> so we need to store the symbols that it introduces somewhere |
20:57:29 | FromDiscord | <Clyybber> so that we don't resem it. |
20:57:58 | disruptek | well, we can compare the two. |
20:58:09 | FromDiscord | <Clyybber> you mean the ASTs? |
20:58:11 | disruptek | yeah. |
20:58:20 | FromDiscord | <Clyybber> I mean we are protected from typed AST mutation |
20:58:23 | FromDiscord | <Clyybber> so its not a problem |
20:58:34 | disruptek | not a problem to compare them, no. |
20:58:45 | FromDiscord | <Clyybber> no I mean we don't have to resem it |
20:58:51 | FromDiscord | <Clyybber> since it can't have changed |
20:59:04 | disruptek | right, but the comparison can show us symbol changes. |
20:59:04 | FromDiscord | <Clyybber> so we can keep the sideeffect count to 1 |
20:59:11 | FromDiscord | <Clyybber> oh, that you mean |
20:59:21 | FromDiscord | <Clyybber> yeah, but such a comparison is complicated |
20:59:28 | disruptek | sure. |
20:59:38 | FromDiscord | <Clyybber> and since there could be a when random: in there |
20:59:45 | FromDiscord | <Clyybber> its nigh impossible |
20:59:51 | FromDiscord | <Clyybber> without saving some state at least |
21:00:17 | FromDiscord | <Clyybber> and if we start saving the state of symbols that affect the AST then we can just save the symbols it introduces instead |
21:00:18 | FromDiscord | <Clyybber> IMO |
21:00:53 | disruptek | if you think it's easier... my limited experience suggests that it's pretty tricky. |
21:01:08 | FromDiscord | <Clyybber> I mean we must store symbols anyways |
21:01:10 | FromDiscord | <Clyybber> or state |
21:01:21 | FromDiscord | <Clyybber> I find symbols easier than storing whatever made random go 1 |
21:01:28 | disruptek | well, they never go away. right. |
21:01:37 | FromDiscord | <Clyybber> the symbols? |
21:01:40 | disruptek | right. |
21:01:44 | FromDiscord | <Clyybber> they do |
21:01:53 | disruptek | only when we tell them to. |
21:01:54 | FromDiscord | <Clyybber> currently you can create C codegen errors with that |
21:02:17 | FromDiscord | <Clyybber> just macro m(a: typed): untyped = discard; m: var a = 1; echo a 1 |
21:02:24 | FromDiscord | <Clyybber> (edit) removed '1' |
21:02:39 | FromDiscord | <Clyybber> var a won't exist because the macro discards the result |
21:02:45 | FromDiscord | <Clyybber> (edit) 'the result' => 'it' |
21:02:58 | disruptek | i'm talking about inside the compiler. |
21:03:04 | FromDiscord | <Clyybber> oh |
21:03:24 | FromDiscord | <Clyybber> with they you mean the symbols introduced by the typed arg? |
21:03:37 | disruptek | the pre-macro ast. |
21:04:42 | FromDiscord | <Clyybber> where would they go |
21:04:52 | FromDiscord | <Clyybber> currently they go into the scope and then the macro gets evalled |
21:05:05 | FromDiscord | <Clyybber> with my "fix" they get pulled out of the scope again |
21:05:19 | FromDiscord | <Clyybber> but the missing part is reintroducing them again if the macro returned the arg |
21:05:30 | FromDiscord | <Clyybber> I think we generally need to attach scopes to nodes |
21:05:44 | FromDiscord | <Clyybber> to typed nodes |
21:05:46 | disruptek | we need explicit scope nodes, imo. |
21:05:51 | FromDiscord | <Clyybber> yeah |
21:06:21 | disruptek | it solves a few problems. |
21:06:35 | disruptek | and try and while else and defer. |
21:06:36 | FromDiscord | <Clyybber> I thought I would need them for the gensym fix too |
21:06:38 | FromDiscord | <Clyybber> but I didn't |
21:06:45 | FromDiscord | <Clyybber> but for this one I definitely need |
21:09:02 | disruptek | maybe araq will have some 5 line hack to solve it. |
21:09:30 | * | dulsi__ joined #nim |
21:10:12 | FromDiscord | <Clyybber> I hope not :p |
21:10:22 | FromDiscord | <Clyybber> I mean, I do, but it will be bad |
21:10:24 | disruptek | heh |
21:10:36 | disruptek | a 95% solution would be bad. |
21:10:40 | FromDiscord | <Clyybber> we really need such a node |
21:10:56 | FromDiscord | <Clyybber> because you could put different typed ast params into a nkStmtList and return it |
21:11:10 | disruptek | of course. |
21:11:18 | FromDiscord | <Clyybber> and then the nkStmtList needs to properly mix in all the symbols |
21:11:45 | * | dulsi_ quit (Ping timeout: 240 seconds) |
21:11:46 | FromDiscord | <Clyybber> its interesting stuff. I actually like that its so broken currently, because it gives thinking food |
21:12:02 | disruptek | well, there's a lot of room for improvement. |
21:12:07 | FromDiscord | <Clyybber> yeah |
21:12:12 | disruptek | i'm just annoyed that it's so half-baked. |
21:12:32 | FromDiscord | <Clyybber> I guess the implications just weren't clear when it was introduced |
21:12:37 | disruptek | i wish more of this stuff was fully consistent. |
21:12:44 | FromDiscord | <Clyybber> thats why I said earlier its an "undesigned feature" |
21:13:14 | disruptek | the manual sets the wrong expectation. |
21:17:59 | FromDiscord | <Rebel> sent a long message, see https://paste.rs/Asz |
21:20:03 | * | vicfred joined #nim |
21:25:35 | FromDiscord | <Rika> @Rebel https://github.com/khchen/winim/blob/e73ecec5679a58488d42d35b39ebeb785baa1564/winim/inc/windef.nim#L623 |
21:26:05 | FromDiscord | <Rika> ~~have fun, the file's massive lol~~ |
21:26:22 | * | audiofile joined #nim |
21:26:41 | FromDiscord | <Rebel> dam I should've just cloned the repo and used regex to search for it |
21:28:02 | FromDiscord | <Rebel> yeah I will need to tweak the final results by hand not sure if I can pass an enum to cDefine as it just wants a string |
21:28:10 | FromDiscord | <Rebel> thanks |
21:35:54 | * | solitudesf quit (Ping timeout: 256 seconds) |
21:37:40 | * | natrys quit (Ping timeout: 256 seconds) |
21:39:33 | FromDiscord | <Kiloneie> Where all could i post my videos of Nim for more visibility ? |
21:40:59 | FromDiscord | <Elegant Beef> r/programming possibly, they're more lax on self promotion, programming discord/matrix serers |
21:41:05 | FromDiscord | <Elegant Beef> What videos? |
21:54:50 | FromDiscord | <KingDarBoja> YouTube (?) |
21:58:00 | * | natrys joined #nim |
22:01:50 | Yardanico | @Kiloneie programming videos generally don't get a lot of views |
22:02:07 | Yardanico | except if it's a very popular topic or you're doing scipop-like videos |
22:02:32 | FromDiscord | <Elegant Beef> Or if you're brackeys doing unity |
22:02:36 | Yardanico | no |
22:02:40 | Yardanico | if you're doing C++ |
22:02:47 | Yardanico | and your channel is named "freecodecamp.org" |
22:08:51 | * | natrys quit (Quit: natrys) |
22:12:47 | FromDiscord | <Kiloneie> well anything Nim related really |
22:18:53 | * | Trustable quit (Remote host closed the connection) |
22:22:56 | * | lritter quit (Quit: Leaving) |
22:26:22 | FromDiscord | <Kiloneie> Imma ask this again tomorrow when more people are awake xD. Most of my views are from subs i already have, forum, here and a few from other Nim videos from other people. 30% is apparently youtube search. Gotta at least try. |
22:26:42 | Yardanico | well if you want to earn money off programming videos - it's not easy ;) |
22:26:47 | FromDiscord | <Kiloneie> also what the hell is voat.co(im getting 15% of all traffic from there) |
22:26:54 | FromDiscord | <Kiloneie> i know D: |
22:27:06 | FromDiscord | <Kiloneie> before i even make a cent... |
22:27:07 | Yardanico | https://atlas.eff.org//domains/voat.co.html ? |
22:27:31 | Yardanico | ah nvm |
22:27:44 | Yardanico | https://en.wikipedia.org/wiki/Voat |
22:28:14 | FromDiscord | <Kiloneie> hub for the alt right, sure. |
22:28:18 | FromDiscord | <Kiloneie> lol |
22:28:53 | FromDiscord | <Elegant Beef> Dude nim's logo is a crown you cant get more authoritarian than a king 😛 |
22:29:12 | FromDiscord | <Kiloneie> (little man in the sky can) |
22:29:29 | FromDiscord | <Elegant Beef> I thought he was the little man all around us |
22:30:08 | FromDiscord | <Kiloneie> Java has the sun D: |
22:30:16 | FromDiscord | <Kiloneie> or ... atleast it did xD |
22:31:07 | * | dulsi__ is now known as dulsi |
22:31:35 | FromDiscord | <Kiloneie> libman posted my video on voat |
22:31:38 | FromDiscord | <Kiloneie> ahhh |
22:33:13 | FromDiscord | <Kiloneie> I think if i make a thread on many of these popular programming websites and reddit in p. section i could probably at least double the traffic. |
22:36:10 | FromDiscord | <Kiloneie> does posting in a reddit thread bump it higher ? Asking if i make a thread and post my videos there will it bump it or not(otherwise a thread per video) |
22:36:35 | leorize | nope |
22:36:44 | leorize | actually I don't know for sure :P |
22:37:08 | FromDiscord | <Elegant Beef> Nah, reddit shows based off updoot rate/post time afaik |
22:38:16 | FromDiscord | <Kiloneie> hmm nice, then i can keep a bookmark on that 😛 |
22:38:48 | FromDiscord | <Kiloneie> probably gonna end up with a dozen pages to post. |
22:38:55 | FromDiscord | <Elegant Beef> Oh god |
22:39:15 | leorize | creators usually just have their own subreddit instead |
22:39:32 | leorize | then if there's anything worth promoting they just crosspost over to other sub |
22:39:33 | FromDiscord | <Elegant Beef> Yea, also you could just share a trailer of what your videos go over or w/e |
22:42:44 | FromDiscord | <Kiloneie> If i make my own subreddit, its probably gonna get like 2 views per video. Idk |
22:43:24 | leorize | you can easily promote your own subreddit by telling people to use it as better yt comments :P |
22:43:44 | leorize | then if you want to start promoting you can x-post the vid to other subs |
22:43:52 | FromDiscord | <Kiloneie> For a trailer... Not yet, i havent covered much yet, and i mentally cant finish Nim for Beginners in less than a month. |
22:44:03 | FromDiscord | <Kiloneie> Hmm i guess |
22:45:06 | FromDiscord | <Kiloneie> Imma start doing some video editing on fiverr to make some cents till this gets any, could probably cross promote D: |
22:45:58 | leorize | it's never easy to get business off the ground, esp when you start off with a relatively niche language like Nim :P |
22:46:26 | leorize | fiverr sounds like a good idea to get some fund for your projects :) |
22:46:35 | FromDiscord | <Kiloneie> Atleast i can establish a monopoly xD... If i keep going |
22:46:47 | * | tane quit (Quit: Leaving) |
22:46:59 | FromDiscord | <Kiloneie> Yea, i just hope my current videos showcase some skill in that... |
22:47:09 | FromDiscord | <Kiloneie> I dont believe in my skills |
22:51:24 | FromDiscord | <Elegant Beef> In my opinion your videos have audio issues and tend to play around a bit too much. For example you show off `1..10` `countUp(1,10)` and `countDown(10,1)` in real time, and dont just mention them as other iterators. |
22:51:39 | FromDiscord | <Elegant Beef> Mouseclicks + keyboard noise is a huge turnoff for me |
22:52:17 | leorize | I think there are plugins that can filter those |
22:52:21 | FromDiscord | <Kiloneie> Yeah... i've been adressing this issue for a while, i really want a mic arm and i got 0$. |
22:52:37 | FromDiscord | <Kiloneie> it's way better now all in all, but yeah. |
22:53:00 | FromDiscord | <Kiloneie> still not the kind of issue last dude posted videos on nim forum |
22:53:02 | FromDiscord | <Kiloneie> ahem... |
22:53:03 | FromDiscord | <Kiloneie> xD |
22:53:21 | leorize | you have some competition now xd |
22:53:27 | FromDiscord | <Kiloneie> yeah.... no |
22:53:27 | FromDiscord | <Elegant Beef> Yea you do sorta got me wanting to make tutorialization too 😄 |
22:53:36 | FromDiscord | <Kiloneie> just try video #2 on that guy... |
22:54:00 | FromDiscord | <Kiloneie> hes quieter than the insane amount of background noise he has, also mono channel from the right side |
22:54:50 | FromDiscord | <Kiloneie> i found a dude who started a week after i started my nim videos then quit 1 week after i first quit as well, like... as if he was copying me lol |
22:54:58 | * | ehmry_ joined #nim |
22:55:02 | FromDiscord | <Kiloneie> i did a better job though... |
22:56:05 | leorize | they're just starting off, maybe they will be better than you if you slack off for too long :P |
22:56:18 | FromDiscord | <Kiloneie> Yeah, i know xD... |
22:57:53 | FromDiscord | <Kiloneie> if i don't stop this time, i am planning a ton of videos, including game dev which i really want to touch on(i really wanna make a good game already, my dream since i first tried that path when i was 11 lol) |
22:58:18 | FromDiscord | <Recruit_main707> That would be nice |
22:58:58 | FromDiscord | <Kiloneie> first with Nico, then SDL2 basics into a pong game or smthing like that. Maybe one day make a good game for steam, then make tuts on how to make that game... |
23:00:01 | FromDiscord | <--HA--> sent a code paste, see https://play.nim-lang.org/#ix=2tW4 |
23:01:23 | leorize | if you have a static lib of sqlite, just `--dynlibOverride:sqlite --passL:-lsqlite3` |
23:01:42 | leorize | you can also do `--passL:/path/to/libsqlite3.a` |
23:02:39 | FromDiscord | <Clyybber> disruptek: Can you elaborate on your mangling issue with jsonutils? |
23:06:07 | leorize | I found some of my very old Nim code: https://github.com/alaviss/pong |
23:06:18 | leorize | and yes it's a textbook pong game |
23:06:24 | FromDiscord | <Clyybber> leorize: Heh, does it still compile? |
23:06:37 | leorize | I don't think I cut out to be a gamedev when I can't even finish a simple pong game lol |
23:06:42 | FromDiscord | <Kiloneie> interesting |
23:06:57 | leorize | @Clyybber probably not, I used not nil |
23:07:11 | FromDiscord | <Kiloneie> i've spent on a single project 1 year before... twice... but then i quit for a long time D: |
23:07:24 | leorize | oh lol `nim >= 0.16.1` as requirement, yea that one is definitely not compiling |
23:07:45 | FromDiscord | <Kiloneie> probably a few edits here and there will fix it |
23:09:51 | leorize | sometimes I'm amazed by the amount of hacks I'm willing to put up: https://github.com/alaviss/pong/blob/67740800a586874cdb69eb55c4062efe20633cd8/src/pong.nim#L32-L38 |
23:10:31 | FromDiscord | <Kiloneie> That's outside of my Nim knowledge xD... |
23:11:04 | FromDiscord | <Kiloneie> i can't make sense of that lol |
23:11:48 | leorize | I wouldn't fault you for that. My early Nim code isn't the best |
23:12:36 | FromDiscord | <Kiloneie> xD. I haven't touched pragmas much yet, and when i did i couldn't remember any of it. |
23:13:22 | FromDiscord | <Kiloneie> also i looked the manual a few days ago and couldn't find any explanation on {.inline.} and {.base.}... could you elaborate maybe ? |
23:13:54 | leorize | {.inline.} is a hint to tell the compiler to inline a function |
23:14:14 | FromDiscord | <--HA--> leorize, with --passL:/path/to/libsqlite3.a it compiles but then at runtime still tries to load libsqlite3.so |
23:14:45 | leorize | --HA-- try `--dynlibOverride:sqlite3` then? |
23:15:03 | FromDiscord | <Kiloneie> And {.base.} ? |
23:15:13 | FromDiscord | <--HA--> should --dynlibOverrideAll not work? |
23:15:27 | leorize | that works too |
23:16:19 | leorize | @Kiloneie tell the compiler that a method is the "base" method, meaning that it will be the method that's called if an object didn't override it with its own implementation |
23:16:24 | * | tiorock joined #nim |
23:16:24 | * | tiorock quit (Changing host) |
23:16:24 | * | tiorock joined #nim |
23:16:24 | * | rockcavera quit (Killed (barjavel.freenode.net (Nickname regained by services))) |
23:16:24 | * | tiorock is now known as rockcavera |
23:16:48 | FromDiscord | <Kiloneie> ah okay, thanks! |
23:17:08 | leorize | all of this is documented in the manual fwiw :P |
23:17:17 | FromDiscord | <Kiloneie> i couldn't find it D:... |
23:17:28 | FromDiscord | <Kiloneie> not for those 2 pragmas |
23:17:32 | FromDiscord | <Kiloneie> D: |
23:19:27 | leorize[m] | yea, they're documented very sneakily |
23:19:28 | leorize[m] | inline: https://nim-lang.org/docs/manual.html#types-procedural-type |
23:19:37 | leorize[m] | base: https://nim-lang.org/docs/manual.html#multiminusmethods |
23:21:26 | FromDiscord | <--HA--> leorize, I now get this when compiling https://pastebin.ubuntu.com/p/GKFS3CvY3R/ sadly I don't really know much about these things. I'm on debian and installed a bunch of sqlite packages, one of them is libsqlite3-dev |
23:22:24 | leorize | ah, you need musl-compiled versions of sqlite |
23:22:32 | FromDiscord | <brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2tW9 |
23:22:41 | FromDiscord | <brainproxy> both x and y are uint64 |
23:23:04 | FromDiscord | <Rika> can you show the whole line |
23:23:18 | FromDiscord | <Rika> bitops.bitand returns the same types it is given |
23:23:19 | leorize | --HA-- you can get them from julia binary builder |
23:23:22 | FromDiscord | <--HA--> leorize, now that you say it, that makes a lot of sense 🙂 |
23:23:28 | leorize | or alternatively |
23:23:41 | leorize | just use sqlite single source file and add it as a `{.compile.}` to your app |
23:23:44 | FromDiscord | <Elegant Beef> probably want bitops.bitand(x,y) == 0 or w/e you're looking for |
23:23:57 | FromDiscord | <Rika> likely |
23:26:30 | * | NimBot joined #nim |
23:33:55 | FromDiscord | <--HA--> leorize, thank you! that single source sqlite c file and {.compile.} pragma worked perfectly. I'm hoping this way I'll also have it not so difficult to cross compile to windows later. |
23:35:28 | FromDiscord | <brainproxy> > probably want bitops.bitand(x,y) == 0 or w/e you're looking for↵@Elegant Beef too many years o JavaScript 🤪 |
23:37:01 | FromDiscord | <brainproxy> (edit) 'o' => 'of' |
23:46:53 | * | krux02_ joined #nim |
23:49:05 | * | vsantana joined #nim |
23:49:37 | * | vsantana quit (Client Quit) |
23:49:52 | * | krux02 quit (Ping timeout: 260 seconds) |
23:49:58 | FromDiscord | <--HA--> Now the regular build fails, with the {.compile: "sqlite3.c".} in there. Can I check with `when` if the --passL:-static is defined by any chance? |
23:52:36 | leorize | alternatively you can just add --dynlibOverrideAll to your config |