00:01:34 | * | yglukhov quit (Remote host closed the connection) |
00:02:29 | * | MJCaley joined #nim |
00:02:53 | * | endragor joined #nim |
00:07:33 | * | endragor quit (Ping timeout: 264 seconds) |
00:11:56 | * | MJCaley quit (Quit: MJCaley) |
00:19:55 | * | MJCaley joined #nim |
00:24:41 | * | qwertfisch quit (Remote host closed the connection) |
00:30:06 | * | MJCaley quit (Quit: MJCaley) |
00:32:07 | * | yglukhov joined #nim |
00:36:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
00:43:57 | * | qwertfisch joined #nim |
00:45:04 | * | MJCaley joined #nim |
00:50:09 | * | endragor joined #nim |
00:54:55 | * | endragor quit (Ping timeout: 248 seconds) |
00:55:38 | * | MJCaley quit (Quit: MJCaley) |
01:01:55 | * | MJCaley joined #nim |
01:03:01 | * | endragor joined #nim |
01:07:33 | * | endragor quit (Ping timeout: 264 seconds) |
01:12:21 | * | MJCaley quit (Quit: MJCaley) |
01:23:56 | * | endragor joined #nim |
01:28:27 | * | endragor quit (Ping timeout: 240 seconds) |
01:36:01 | * | MJCaley joined #nim |
01:46:18 | * | MJCaley quit (Quit: MJCaley) |
01:48:13 | * | yglukhov joined #nim |
01:52:33 | * | yglukhov quit (Ping timeout: 248 seconds) |
02:01:06 | * | MJCaley joined #nim |
02:03:47 | * | endragor joined #nim |
02:04:11 | * | gokr quit (Ping timeout: 252 seconds) |
02:08:32 | * | endragor quit (Ping timeout: 248 seconds) |
02:10:08 | * | endragor joined #nim |
02:11:47 | * | MJCaley quit (Quit: MJCaley) |
02:14:38 | * | endragor quit (Ping timeout: 252 seconds) |
02:29:41 | * | endragor joined #nim |
02:34:18 | * | endragor quit (Ping timeout: 268 seconds) |
02:38:04 | * | darithorn quit (Quit: Leaving) |
02:43:44 | * | dandevelo quit (Ping timeout: 248 seconds) |
02:45:01 | * | endragor joined #nim |
02:49:39 | * | endragor quit (Ping timeout: 265 seconds) |
03:00:47 | * | endragor joined #nim |
03:02:55 | * | chemist69 quit (Ping timeout: 255 seconds) |
03:04:57 | * | endragor quit (Ping timeout: 240 seconds) |
03:13:13 | * | endragor joined #nim |
03:15:16 | * | dddddd quit (Remote host closed the connection) |
03:16:48 | * | chemist69 joined #nim |
03:17:39 | * | marenz__ joined #nim |
03:18:11 | * | endragor quit (Ping timeout: 260 seconds) |
03:18:15 | * | craigger quit (Quit: bye) |
03:20:09 | * | craigger joined #nim |
03:21:01 | * | craigger quit (Client Quit) |
03:21:21 | * | marenz_ quit (Ping timeout: 265 seconds) |
03:21:27 | * | craigger joined #nim |
03:25:55 | * | craigger quit (Client Quit) |
03:27:56 | * | craigger joined #nim |
03:30:22 | * | jjido quit (Read error: Connection reset by peer) |
03:35:20 | * | yglukhov joined #nim |
03:36:54 | * | endragor joined #nim |
03:39:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
03:45:27 | * | endragor quit (Ping timeout: 240 seconds) |
03:59:54 | * | craigger quit (Quit: bye) |
04:01:36 | * | craigger joined #nim |
04:10:49 | * | dandevelo joined #nim |
04:11:40 | * | noonien quit (Quit: Connection closed for inactivity) |
04:13:05 | * | craigger quit (Quit: bye) |
04:14:51 | * | craigger joined #nim |
04:15:55 | * | dandevelo quit (Ping timeout: 260 seconds) |
04:22:39 | * | craigger quit (Quit: bye) |
04:24:27 | * | craigger joined #nim |
04:29:05 | * | Yardanico[Phone] joined #nim |
04:41:11 | * | endragor joined #nim |
04:45:26 | * | yglukhov joined #nim |
04:45:35 | * | endragor quit (Ping timeout: 240 seconds) |
04:49:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
04:51:05 | * | user0 joined #nim |
04:53:57 | * | endragor joined #nim |
04:58:32 | * | endragor quit (Ping timeout: 252 seconds) |
05:05:38 | * | craigger quit (Quit: bye) |
05:07:30 | * | craigger joined #nim |
05:13:17 | * | dandevelo joined #nim |
05:13:56 | * | endragor joined #nim |
05:14:46 | * | craigger quit (Quit: bye) |
05:16:37 | * | craigger joined #nim |
05:18:21 | * | dandevelo quit (Ping timeout: 264 seconds) |
05:18:25 | * | endragor quit (Ping timeout: 248 seconds) |
05:19:44 | * | craigger quit (Client Quit) |
05:21:35 | * | craigger joined #nim |
05:22:34 | * | craigger quit (Client Quit) |
05:24:26 | * | craigger joined #nim |
05:27:25 | * | craigger quit (Client Quit) |
05:29:17 | * | craigger joined #nim |
05:32:51 | * | craigger quit (Client Quit) |
05:34:31 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:34:44 | * | craigger joined #nim |
05:43:33 | * | yglukhov joined #nim |
05:43:55 | * | endragor joined #nim |
05:44:35 | * | craigger quit (Quit: bye) |
05:46:29 | * | craigger joined #nim |
05:48:21 | * | yglukhov quit (Ping timeout: 264 seconds) |
05:48:35 | * | endragor quit (Ping timeout: 252 seconds) |
05:50:26 | * | user0 quit (Quit: user0) |
05:53:18 | * | endragor joined #nim |
05:54:57 | * | nsf joined #nim |
05:58:01 | * | endragor quit (Ping timeout: 260 seconds) |
06:00:00 | * | Xe quit (Ping timeout: 246 seconds) |
06:00:47 | * | user0 joined #nim |
06:14:01 | * | endragor joined #nim |
06:19:01 | * | endragor quit (Ping timeout: 260 seconds) |
06:20:09 | * | user0 quit (Quit: user0) |
06:29:56 | * | arecacea1 quit (Remote host closed the connection) |
06:30:19 | * | arecacea1 joined #nim |
06:32:42 | * | yglukhov joined #nim |
06:37:33 | * | yglukhov quit (Ping timeout: 264 seconds) |
06:49:04 | * | endragor joined #nim |
06:54:00 | * | endragor quit (Ping timeout: 260 seconds) |
06:58:40 | * | Xe joined #nim |
07:11:05 | * | vlad1777d quit (Ping timeout: 240 seconds) |
07:14:00 | * | miran joined #nim |
07:14:44 | * | dandevelo joined #nim |
07:18:56 | * | couven92 joined #nim |
07:19:41 | * | dandevelo quit (Ping timeout: 260 seconds) |
07:47:25 | * | yglukhov joined #nim |
07:51:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
07:55:12 | * | marenz__ quit (Ping timeout: 248 seconds) |
07:59:41 | * | jjido joined #nim |
08:04:56 | * | endragor joined #nim |
08:09:46 | * | endragor quit (Ping timeout: 268 seconds) |
08:12:18 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:15:19 | * | endragor joined #nim |
08:15:48 | * | PMunch joined #nim |
08:16:41 | * | dandevelo joined #nim |
08:19:37 | * | endragor quit (Ping timeout: 256 seconds) |
08:24:23 | * | claudiuinberlin joined #nim |
08:25:01 | * | endragor joined #nim |
08:29:19 | * | endragor quit (Ping timeout: 248 seconds) |
08:34:56 | * | dandevelo quit (Ping timeout: 260 seconds) |
08:46:06 | * | def- quit (Quit: -) |
08:47:36 | * | def- joined #nim |
08:50:14 | * | Vladar joined #nim |
08:54:54 | * | endragor joined #nim |
08:55:59 | * | floppydh joined #nim |
08:56:12 | * | couven92 quit (Quit: Client Disconnecting) |
08:59:27 | * | endragor quit (Ping timeout: 240 seconds) |
09:01:45 | PMunch | Saw some guy on Reddit requesting tutorials for programming beginners |
09:01:50 | PMunch | Considering to write some |
09:03:29 | livcd | good thing would be about using objects in Nim, or how to structure Nim programs |
09:03:34 | livcd | i think that one is missing |
09:04:25 | * | endragor joined #nim |
09:06:56 | PMunch | Hmm, good point |
09:07:08 | PMunch | That's a bit more subjective though |
09:10:32 | livcd | yeah ut maybe still a bit better than having to check all those existing projects to ksee how everyone else is doing it |
09:12:58 | PMunch | Fair point |
09:31:47 | * | yglukhov joined #nim |
09:43:52 | * | Trustable joined #nim |
09:45:00 | * | vlad1777d joined #nim |
09:45:01 | * | miran quit (Quit: Konversation terminated!) |
09:55:38 | * | ketralnis quit (Read error: Connection reset by peer) |
09:55:54 | * | ketralnis joined #nim |
10:03:49 | * | endragor quit (Quit: Leaving...) |
10:05:19 | * | vlad1777d quit (Ping timeout: 248 seconds) |
10:05:23 | * | miran joined #nim |
10:07:12 | miran | PMunch: i also had an idea to maybe write some basic nim tutorial after seeing that.... |
10:07:19 | * | gokr joined #nim |
10:08:18 | * | endragor joined #nim |
10:09:15 | miran | but i guess i should learn more nim myself before trying to teach anybody else.... |
10:12:43 | * | sendell joined #nim |
10:15:10 | PMunch | Well this is about teaching the beginner stuff |
10:15:47 | PMunch | So you shouldn't need too much knowledge of Nim itself |
10:19:01 | * | dandevelo joined #nim |
10:28:52 | FromGitter | <mratsim> Yeah, just do it, and link it, people will correct it if needed |
10:29:59 | FromGitter | <mratsim> I remember when I was learning and teaching go, if intermediate players didn't teach beginners (even if sometimes they teach something wrong) we would have no player base at all. |
10:32:18 | FromGitter | <mratsim> The big issue with "programming beginner" is the assumptions you make. Should we assume that the person knows about their OS, files, command line, memory/RAM. |
10:34:00 | FromGitter | <mratsim> Do we assume that they know what is "compiling". Explaining those can muddy a tutorial but not explaining those will make beginners unwelcome. |
10:34:27 | FromGitter | <mratsim> --> "Teaching is hard" |
10:41:11 | miran | mratsim: agreed on everything you said |
10:41:50 | miran | PMunch: how seriously are you considering doing that? |
10:42:23 | miran | because i can try to do it but i cannot promise when (or if) it will be publicly available |
10:45:49 | FromGitter | <mratsim> @miran or maybe just add small parts to the cookbook: https://github.com/btbytes/nim-cookbook |
10:46:55 | miran | mratsim: i contributed to it when it just started, but had neglected it since |
10:48:24 | * | user0 joined #nim |
10:48:40 | miran | but something like that might be good beginner intro |
10:49:57 | miran | probably should have more general stuff - what are loops, how if-else works, and similar "well-known" stuff |
11:03:30 | PMunch | So seriously that I might sit down over the weekend and type up some stuff |
11:03:40 | PMunch | I'm pretty busy however so I'm not sure if I have time.. |
11:04:44 | PMunch | Huh, never seen the cookbook before |
11:04:47 | PMunch | Neat! |
11:06:36 | FromGitter | <mratsim> It needs more marketing ;) |
11:08:36 | livcd | did not know about the cookbook as well |
11:08:47 | livcd | honestly a lot of nim resources / docu are scattered all over the place |
11:35:10 | PMunch | Hmm, it might actually be cheaper for me to fly into Amsterdam and go by train to Bruxelles if I want to attend FOSSDEM |
11:35:10 | * | yglukhov quit (Read error: Connection reset by peer) |
11:35:19 | * | yglukhov joined #nim |
11:36:37 | PMunch | Or I could stay a night in Oslo.. |
11:37:04 | dom96 | Would be awesome to have you attend :) |
11:38:51 | PMunch | So plane tickets would be ~€350, if I can cheap out and live in a hostel and not a proper hotel I could probably keep the cost for living pretty low... |
11:38:56 | PMunch | It's definitely doable |
11:39:56 | PMunch | I'd have to take some time off-of work but that shouldn't be an issue |
11:44:47 | FromGitter | <zetashift> I study in Antwerp which is not far away from FOSDEM but I got exams x( |
12:02:58 | * | Snircle joined #nim |
12:04:18 | * | noonien joined #nim |
12:31:15 | FromGitter | <alehander42> i have a weird issue, I have a template log and If I call it for strings, it isn't expanded, but it still compiles, probably to some other invocation of log |
12:31:25 | FromGitter | <alehander42> however I can only think of math log which doesnt make sense for strings |
12:31:42 | FromGitter | <alehander42> is there another builtin log function ? |
12:32:45 | PMunch | Not builtin |
12:32:53 | PMunch | But there might be one in one of your imports |
12:34:15 | FromGitter | <alehander42> even in that case, shouldn't my local log have the priority ? |
12:34:26 | PMunch | Hmm, yea |
12:34:32 | PMunch | Code? |
12:34:48 | FromGitter | <andreaferretti> I think there is no priority for local functions |
12:34:59 | FromGitter | <andreaferretti> You might have to disambiguate explicitly |
12:35:19 | FromGitter | <alehander42> I think the issue is that it takes a concept |
12:35:29 | FromGitter | <alehander42> if I type the arg as string, it's invoked in all cases |
12:35:46 | PMunch | Oooh, yeah that might mess things up |
12:54:58 | livcd | If I want to use EnumServicesStatusEx do I need to do dll call manually ? or can i use c2nim to generate the code ? the definitions for dword etc already exist in some nim modules right ? |
12:57:22 | FromGitter | <tim-st> When I want to append a rune r to a string s is the normal way s.add($r) ? |
13:01:06 | FromGitter | <tim-st> Ah, I see add wasnt ovreloaded for Rune, but for char, str, float, etc |
13:09:01 | FromGitter | <barcharcraz> @livecd one of the windows modules may have it. What api and library is it in? |
13:09:22 | FromGitter | <barcharcraz> also is it in lean and mean or no? |
13:10:20 | FromGitter | <barcharcraz> Dword and friends are defined in one of the windows modules, also dword will always be int32 (or maybe uint32 I forget) |
13:12:19 | livcd | barcharcraz: this is advapi32.dll. I want to get the windows services. i checked winlean but it did not have it |
13:16:12 | FromGitter | <barcharcraz> Maybe oldwin would have it, you could also try running c2nim on the mingw version of the header |
13:16:25 | FromGitter | <barcharcraz> The windows headers are annoying to parse |
13:16:52 | FromGitter | <barcharcraz> If you just need a few procs you could just write out the definition manually |
13:17:01 | FromGitter | <barcharcraz> And importc them |
13:18:22 | * | floppydh quit (Read error: Connection reset by peer) |
13:19:09 | * | floppydh joined #nim |
13:22:47 | livcd | ok i will try it at home |
13:23:03 | livcd | i do not want to do it manually :D i did it few months ago in Go and it was not pleasant |
13:23:05 | * | benoliver999 quit (Quit: ZNC - http://znc.in) |
13:31:21 | * | benoliver999 joined #nim |
13:46:57 | * | Arrrr joined #nim |
13:46:58 | * | Arrrr quit (Changing host) |
13:46:58 | * | Arrrr joined #nim |
13:47:48 | * | dandevelo_ joined #nim |
13:48:15 | * | demi- quit (Ping timeout: 248 seconds) |
13:48:49 | * | kier quit (Quit: No Ping reply in 180 seconds.) |
13:49:19 | * | Yardanico[Phone] quit (Ping timeout: 248 seconds) |
13:49:26 | * | derlafff quit (Quit: No Ping reply in 180 seconds.) |
13:50:16 | FromGitter | <codenoid> can i compile my python script using nim compiler ? |
13:50:23 | * | dandevelo quit (Ping timeout: 248 seconds) |
13:50:38 | * | demi- joined #nim |
13:51:01 | * | derlafff joined #nim |
13:53:48 | PMunch | codenoid, Python isn't a compiled language.. |
13:54:02 | PMunch | And the Nim compiler only compiles Nim code |
13:54:06 | * | kier joined #nim |
13:55:00 | * | Yardanico joined #nim |
13:55:34 | FromGitter | <codenoid> okay then |
13:56:07 | * | jjido joined #nim |
13:56:17 | PMunch | There was one guy however who wrote some crazy macros that made it possible to write something which was pretty much the same as Python which was actually Nim code |
13:57:07 | PMunch | https://github.com/Yardanico/nimpylib |
13:57:19 | Yardanico | :P |
13:57:24 | Yardanico | it's just a PoC |
13:57:43 | PMunch | Still though, it's pretty cool that it actually sorta works |
13:57:58 | PMunch | Just says something about how flexible Nim macros actually are |
13:58:26 | Yardanico | simple example of macros - https://github.com/Yardanico/nimpylib/blob/master/src/pylib/print.nim :) |
13:59:10 | Yardanico | emulating keyword-only arguments |
14:00:41 | Yardanico | the craziest macro here is `class`, I think I should separate different parts of it and rewrite it, because it's very hard to understand |
14:02:30 | * | jjido quit (Ping timeout: 268 seconds) |
14:04:26 | PMunch | Man, I could sit and watch this coloured game of life thing for days |
14:04:45 | * | gokr quit (Ping timeout: 246 seconds) |
14:20:05 | * | craigger quit (Quit: bye) |
14:28:55 | * | craigger joined #nim |
14:31:40 | * | craigger quit (Client Quit) |
14:36:17 | * | craigger joined #nim |
14:36:49 | * | craigger quit (Client Quit) |
14:42:09 | FromGitter | <RedBeard0531> @PMunch does it crash for you if you shrink your terminal too small? |
14:42:19 | PMunch | While it's running? |
14:42:34 | Yardanico | yeah |
14:42:40 | FromGitter | <RedBeard0531> or before it starts |
14:42:40 | Yardanico | it crashes for me too in small terminal |
14:42:44 | Yardanico | before drawing starts |
14:43:07 | PMunch | Huh, so it does |
14:43:26 | PMunch | Aah |
14:43:27 | PMunch | I know why |
14:43:31 | FromGitter | <RedBeard0531> not that this needs to be the most stable product, but hey, it is an example :) |
14:43:41 | PMunch | Because of the stuff it puts in the game to begin with |
14:43:47 | PMunch | Those are hard coded addresses. |
14:44:06 | PMunch | If you remove the long list of c.set calls in the beginning it should work fine |
14:44:15 | PMunch | Then just hit c to start it off with some noise |
14:44:44 | Yardanico | ah |
14:44:45 | PMunch | Or replace those with a smaller or correctly positioned set of starting points |
14:45:50 | PMunch | I was considering to add the possibility to load a start pattern from a file |
14:45:58 | PMunch | But I've already spent way to long on this :P |
14:46:13 | PMunch | If someone does it though I'd be happy to merge it in :) |
14:46:55 | Yardanico | OOH |
14:46:59 | Yardanico | I'll record a small video now |
14:47:04 | Yardanico | it's worth it |
14:47:33 | FromGitter | <RedBeard0531> https://asciinema.org/? |
14:47:52 | Yardanico | no, I'll use special terminal emulator :P |
14:48:46 | PMunch | Oooh: https://asciinema.org/a/117813 |
14:49:01 | PMunch | Someone has created google maps with drawille |
14:49:17 | PMunch | Well, OpenStreetMap |
14:51:47 | FromGitter | <RedBeard0531> Whatever makes the gifs like this that are popular in vim plugins is nice because you can embed them in the github readme: https://github.com/Valloric/YouCompleteMe#intro |
14:52:32 | * | gokr joined #nim |
14:53:09 | PMunch | I'd guess that that was just a simple screen recording |
14:53:15 | PMunch | https://github.com/rastapasta/mapscii |
14:53:25 | PMunch | You can embed from asciinema too though |
14:54:51 | * | marenz__ joined #nim |
14:57:15 | Yardanico | PMunch, uploading video to youtube (link-only access) :) |
14:57:29 | FromGitter | <RedBeard0531> linking != embedding :) |
14:57:54 | Yardanico | well it's 1080p 60fps |
14:58:06 | PMunch | Nice |
14:58:07 | FromGitter | <RedBeard0531> overkill much? |
14:58:12 | Yardanico | no, you'll see :) |
14:58:57 | Yardanico | https://www.youtube.com/watch?v=HWVkKrEeIpk |
14:59:09 | Yardanico | watch in fullscreen in best quality you can :P |
14:59:35 | Yardanico | there's still some artefacts though (because I used hardware-accelerated encoding - NVENC) |
15:00:09 | PMunch | Hoho. ndcu |
15:00:12 | PMunch | Woops |
15:00:15 | PMunch | Haha, nice |
15:00:52 | Yardanico | you can also add custom profiles (and change effect settings) in this cool-retro-term terminal emulator |
15:00:53 | PMunch | Some of them seem to bug out a bit with line width though |
15:00:57 | Yardanico | yeah |
15:01:01 | PMunch | It doesn't resize the lines to the current width |
15:02:20 | FromGitter | <RedBeard0531> Shameless link to a tool my interns wrote a few years ago (that some of you may find useful) because it highlights the advantages of embedding gifs: https://github.com/mongodb-labs/disasm#features |
15:02:35 | * | gokr quit (Ping timeout: 240 seconds) |
15:02:54 | Yardanico | but IMO gifs are not very efficient for videos |
15:03:08 | Yardanico | they can take more space than mp4 |
15:03:37 | livcd | that's insane |
15:04:12 | PMunch | http://rosettacode.org/wiki/Bitmap/Write_a_PPM_file#Nim maybe someone could do the opposite of this and be able to load PPMs into drawille? |
15:04:53 | Yardanico | PPM is really raw image info :) |
15:05:03 | livcd | oh btw is there a malware written in Nim already ? |
15:05:20 | PMunch | Yardanico, exactly, which makes it super easy to read |
15:05:22 | Yardanico | livcd, yeah there was some viros for linux |
15:05:28 | Yardanico | PMunch, main problem is resizing it properly |
15:05:33 | PMunch | livcd, I did see something like that in nim yes |
15:05:48 | PMunch | Yardanico, well take the file and an x and y and stamp out a copy at that position |
15:06:02 | livcd | realyl ? is there an article / source code around ? |
15:06:02 | Yardanico | PMunch, but your terminal may be smaller than image :) |
15:06:14 | FromGitter | <RedBeard0531> I don't know if that is true for low-entropy computer graphics like a (normal) terminal. That is the use case that gifs are optimized for. Either way, I'm used to >= 300MBs internet so maybe I'm just spoiled. |
15:06:17 | * | maximpertsov joined #nim |
15:06:33 | Yardanico | livcd, https://www.guitmz.com/linux-cephei-a-nim-virus/ |
15:06:43 | Yardanico | some low-level ELF stuff |
15:07:00 | PMunch | Yardanico, well that would be my own fault :P |
15:07:15 | PMunch | I just want to be able to seed my game of life with created patterns |
15:07:39 | livcd | Yardanico: just found it when you pasted it :D |
15:07:50 | Yardanico | source - https://github.com/guitmz/nim-cephei |
15:08:46 | * | Jesin quit (Quit: Leaving) |
15:09:21 | * | gokr joined #nim |
15:13:43 | * | Jesin joined #nim |
15:16:33 | * | gokr quit (Ping timeout: 264 seconds) |
15:21:47 | * | gokr joined #nim |
15:25:36 | * | noonien left #nim (#nim) |
15:25:59 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:26:02 | FromGitter | <mratsim> You cannot embedded gifs on GitHub README it must be stored in your repo and linked from there iirc. For gifs in comments you can use drag and drop though. |
15:26:36 | Yardanico | maybe you can use gh-pages branch and store gifs there? |
15:26:39 | PMunch | https://asciinema.org/a/gUd7ehpZQ4yzRfSXY3O6lckoS |
15:27:02 | PMunch | A lot of people use a separate branch with just screenshots |
15:27:15 | * | profkitkat joined #nim |
15:27:26 | PMunch | Or an issue where they can use images and then link to them in the readme |
15:27:34 | Yardanico | PMunch, compile with -d:release and you will have much less flickering |
15:27:48 | PMunch | I don't see any flickering in my terminal.. |
15:30:30 | PMunch | I actually see more flickering if I do -d:release :S |
15:32:05 | Yardanico | maybe I'll update this somewhere in 2018 :P https://www.youtube.com/watch?v=rUJ7Bzgv3n0 |
15:32:51 | PMunch | Oh yeah, that would be cool |
15:32:54 | * | floppydh quit (Quit: WeeChat 2.0.1) |
15:33:07 | Yardanico | it's not very outdated yet |
15:40:49 | * | dddddd joined #nim |
15:44:35 | * | gokr quit (Ping timeout: 240 seconds) |
15:49:25 | * | gokr joined #nim |
15:52:37 | * | azur_kind joined #nim |
16:02:51 | * | craigger joined #nim |
16:04:41 | * | PMunch quit (Quit: Leaving) |
16:12:33 | * | regtools joined #nim |
16:18:02 | livcd | ddoh. I keep checking from time to time nim code on rosettacode and it seems like i always learn about new keywords or pragmas |
16:18:44 | Yardanico | a lot of nim examples on rosetta code are outdated though :) |
16:18:51 | Yardanico | e.g. typeless proc arguments |
16:19:35 | livcd | ah yeah seen it mentioned by dom96 here |
16:25:41 | * | gokr quit (Ping timeout: 260 seconds) |
16:30:04 | FromGitter | <data-man> http://golly.sourceforge.net - For fans of Game of Life :-) |
16:37:14 | FromGitter | <data-man> Has anyone tried https://github.com/jwilm/alacritty ? |
16:37:40 | Yardanico | thanks god it's not electron xD |
16:38:26 | livcd | data-man that looks interesting |
16:38:28 | subsetpark | data-man - I have, but it chokes on my system font |
16:38:55 | miran | Yardanico: "a lot of nim examples on rosetta code are outdated" --> i was thinking about going through RC to see what is not yet implemented or needs an update.... |
16:39:14 | Yardanico | miran, good luck! I mean it's a lot of work probably |
16:39:16 | miran | now only i need to find the time for all these ideas.... |
16:39:26 | Araq | https://www.youtube.com/watch?v=xP5-iIeKXE8 |
16:39:53 | Yardanico | ah, yeah, that's crazy |
16:40:52 | livcd | oh the rust syntax looks incredibly cryptic to me |
16:41:53 | miran | is there a prefered nim code style? i know i've seen a lot of parantheses-less code at RC |
16:42:02 | Yardanico | miran, NEP-1 :) |
16:42:16 | Yardanico | https://nim-lang.org/docs/nep1.html |
16:42:35 | Yardanico | but there's no info about parentheses sadly |
16:43:14 | miran | Yardanico: thanks for the link, will take a look and see if i violate some of those in my code |
16:44:45 | FromGitter | <data-man> The Alacritty uses the vte library by the same author. I liked the UTF8-parser. |
16:45:07 | redlegion | subsetpark, what font do you use? |
16:45:26 | subsetpark | Iosevka Term |
16:45:33 | * | craigger quit (Quit: bye) |
16:46:12 | redlegion | Is it TTF, Opentype, bitmap font? |
16:47:26 | * | craigger joined #nim |
16:48:38 | redlegion | Man, i wanna try that terminal emulator now |
16:49:03 | redlegion | GPU rendering and written in rust |
16:49:05 | FromGitter | <RedBeard0531> I can't use a term without scrollback so alacritty is out for me. I've found gnome-terminal (which also uses vte) to be the best on linux. It supports all the crazy gui-in-term stuff vim needs, is extremely fast, and supports the killer feature of reflowing text output when I toggle in and out of fullscreen. The only thing missing seems to be ligature support in the font renderer. |
16:49:11 | redlegion | Kinda neat |
16:49:40 | redlegion | I currently use termite |
16:49:48 | Yardanico | RedBeard0531: there's alacritty with scrollback |
16:50:01 | redlegion | Smaller footprint |
16:50:04 | Yardanico | just installing it via AUR |
16:50:42 | redlegion | besides, if you use tmux or screen you kinda have inherent scrollback |
16:50:57 | Yardanico | https://github.com/jwilm/alacritty/pull/657 it's not yet merged |
16:51:14 | FromGitter | <RedBeard0531> mintty (the cygwin) term is also shockingly good, although it doesn't support reflow. Its the only term I've found that lets me send <S-Esc> as a unique key in vim. And the one time I filed a bug the guy fixed it really quickly. |
16:51:15 | Yardanico | but yeah, it takes a while to compile from source |
16:51:27 | * | sendell quit (Remote host closed the connection) |
16:51:37 | Yardanico | because it uses a lot of rust packages |
16:51:49 | FromGitter | <RedBeard0531> Hmm, that didn't exist last time I tried |
16:52:04 | FromGitter | <RedBeard0531> I'll give it another go |
16:52:10 | redlegion | RedBeard0531, for sure, when I'm stuck on Windows it's my go to |
16:52:39 | subsetpark | redlegion: https://be5invis.github.io/Iosevka/ |
16:53:21 | Yardanico | redlegion, it's TTF it seems |
16:53:53 | Yardanico | well, alacritty really takes a WHILE to compile :D |
16:54:05 | Yardanico | and rustc uses one core only too |
16:54:39 | Yardanico | ah |
16:54:42 | Yardanico | it uses LTO |
16:55:14 | FromGitter | <RedBeard0531> subsetpark redlegion: if you are into ligature fonts, https://github.com/tonsky/FiraCode is quite nice |
16:55:53 | Yardanico | hmm, alacritty doesn't seem to be different from gnome-terminal performance-wise |
16:56:03 | Yardanico | I don't see any changes :D |
16:56:26 | redlegion | subsetpark, thanks for the link, I'm probably going to dump pragmatapro now |
16:56:52 | subsetpark | RedBeard0531 - Nice, I'll give it a spin. I'm a big fan of Fira |
16:57:38 | subsetpark | whoa, wide! |
16:59:08 | miran | i was/am a big fan of fira code, but now i'm experimenting with iosevka |
16:59:34 | miran | it takes some time to get used to its narrowness |
17:00:06 | redlegion | I'm already used to pragmatapro, so the narrowness is welcome for me |
17:02:01 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
17:03:33 | FromGitter | <RedBeard0531> alacritty can't reflow text on resize, and it actually seems *slower* than gnome-terminal on my work machine |
17:04:07 | Yardanico | well I didn't really see any difference |
17:04:33 | FromGitter | <RedBeard0531> could be that I'm pushing WQHD on a 10 year-old low-end radeon |
17:05:08 | FromGitter | <RedBeard0531> And my 4GHz sandybridge is probably faster at rendering :) |
17:11:05 | * | azur_kind quit (Remote host closed the connection) |
17:11:54 | FromGitter | <RedBeard0531> Speaking of terminal emulators, for anyone else who uses vim on archlinux, it is worth editing the pkgbuild and compiling yourself to add --enable-terminal and change gtk3 to gtk2. |
17:12:04 | * | Arrrr quit (Read error: Connection reset by peer) |
17:19:50 | Yardanico | as I said - I didn't see any difference |
17:19:59 | Yardanico | so I think I'll use gnome-terminal for now |
17:22:32 | * | Jesin quit (Quit: Leaving) |
17:32:31 | * | yglukhov quit (Remote host closed the connection) |
17:33:04 | * | yglukhov joined #nim |
17:37:35 | * | yglukhov quit (Ping timeout: 248 seconds) |
17:41:11 | FromGitter | <data-man> DMD 2.078.0 Has Been Released |
17:41:28 | Araq | good for them. |
17:41:54 | * | arecacea1 quit (Remote host closed the connection) |
17:42:10 | Araq | what's new? |
17:42:15 | * | arecacea1 joined #nim |
17:42:36 | * | mal`` quit (Quit: Leaving) |
17:42:57 | Araq | are the parameter and effect lists finally longer than the proc bodies? ;-) |
17:43:19 | * | yglukhov joined #nim |
17:44:03 | Yardanico | https://dlang.org/blog/2018/01/04/dmd-2-078-0-has-been-released/ |
17:44:21 | Yardanico | RAII for -betterC |
17:44:44 | Yardanico | many improvements to betterC it seems |
17:47:29 | Araq | the languages all seem to converge to C++ :P |
17:47:41 | * | mal`` joined #nim |
17:47:55 | Araq | there are some things C++ got fundamentally right, apparently. |
17:48:10 | * | yglukhov quit (Ping timeout: 265 seconds) |
17:48:15 | Araq | hint: it's not the syntax. |
17:50:00 | Araq | I read some comparisons Eiffel vs C++ from the 90ies. interesting stuff. |
17:51:37 | FromGitter | <data-man> @Araq: Maybe to create an official repository of suggestions/discussion for the stdlib? |
17:54:07 | Yardanico | it would be harder to keep track of stuff |
17:54:18 | Yardanico | we already have needed-libraries for example, and it's not very active :P |
17:58:39 | FromGitter | <data-man> Third-party libraries can be written or not, but everyone needs a standard library. |
18:07:44 | * | beatmox quit (Remote host closed the connection) |
18:10:13 | subsetpark | Can someone help me with the socket interface? It seems that socket.recv(n) blocks until it has received n data, and times out if it receives something less than n. I'm expecting the Pythonesque behavior, where recv(n) (somehow, magically) returns what's on the line, up to a max of n |
18:10:17 | subsetpark | Is my understanding correct? |
18:11:35 | * | beatmox joined #nim |
18:21:23 | * | yglukhov joined #nim |
18:23:02 | subsetpark | yglukhov: I feel like you might be able to help :0 |
18:23:41 | FromGitter | <RedBeard0531> C++ is also converging on every other language... |
18:25:05 | * | yglukhov quit (Remote host closed the connection) |
18:25:17 | * | yglukhov joined #nim |
18:28:13 | * | yglukhov quit (Read error: Connection reset by peer) |
18:28:48 | * | yglukhov joined #nim |
18:34:19 | subsetpark | Araq: you around? |
18:41:12 | * | miran quit (Quit: Konversation terminated!) |
18:49:06 | Araq | subsetpark: yes but I can't answer your question, sorry |
18:49:52 | Araq | RedBeard0531: maybe. though the "C++ needs a GC" meme has faded |
18:52:53 | livcd | and for a second i thought C++ dead, replaced by Rust |
18:53:10 | subsetpark | Araq: what part can't you answer? Your previous comments on the forum posts and elsewhere make it sound like 'loop on recv until you get back ""' is how you're supposed to receive from a socket - but whenever i do that, it loops repeatedly and then blocks until the socket is closed, rather than returning "" |
18:54:12 | * | dandevelo_ quit (Ping timeout: 240 seconds) |
18:54:13 | Yardanico | subsetpark, maybe detect if it blocks? :D |
18:54:27 | Yardanico | but yeah, I faced the same problem too a while ago |
18:54:36 | Yardanico | Don't know how to fix it |
18:54:44 | Yardanico | (porting some socket stuff from python) |
18:54:56 | Araq | subsetpark: if you want lines, use recvLine |
18:54:57 | FromGitter | <RedBeard0531> I'm considering proposing some features from nim at the next C++ committee meeting in march |
18:55:09 | subsetpark | Araq: I don't want lines, I'm receiving binary data |
18:55:39 | Araq | then you need recvBuffer() ? not sure |
18:56:04 | subsetpark | ok... recvBuffer, that sounds promising |
18:56:23 | * | profkitkat quit (Ping timeout: 255 seconds) |
18:56:38 | FromGitter | <RedBeard0531> subsetpark, you can probably use the raw recv from nativesockets/posix, but it won't be as friendly |
18:57:21 | Araq | I never really understood sockets or streams. I understand the concept of "you don't know the length" but why it lacks any kind of bytesAvailable() feature escapes me |
18:57:56 | Araq | part of the Unix simplicity I guess. "we don't need features, we lose your data instead". |
18:58:57 | FromGitter | <RedBeard0531> There is a bytesAvailable, its just a pain to use and may be non-standard |
18:59:19 | * | yglukhov quit (Remote host closed the connection) |
18:59:51 | maximpertsov | hey, why is recursively referencing an object's type illegal if it's wrapped in a container other than `seq`? |
18:59:55 | * | yglukhov joined #nim |
19:00:01 | maximpertsov | (e.g. `type T = object: x: seq[T]` works but `type T = object: x: Option[T]` is illegal) |
19:00:28 | Araq | because there is no pointer indirection going on, it would take an infinite amount of memory |
19:01:10 | maximpertsov | ah okay, i thought there was pointer indirection for Option types too... makes sense |
19:02:07 | Araq | I worked on an opt[T] that hides the pointer like seq[T] does but IMO it's messy to work with. |
19:02:35 | Araq | not that Option[T] is any better in this regard but at least it's not builtin and so I can ignore it. |
19:03:07 | maximpertsov | gotcha.. thanks for the info :) |
19:03:52 | subsetpark | I'm baffled that this is so difficult... |
19:04:01 | Yardanico | Araq, are you working on new symbol files locally or you're improving --symbolfiles? https://github.com/nim-lang/Nim/commit/3ae434a086145768b93405aaa35e58afab451879 |
19:04:06 | Yardanico | subsetpark, did recvLine work? |
19:04:21 | subsetpark | Yardanico: It's not ASCII data, so there's no lines |
19:04:28 | Yardanico | well you can always try :) |
19:04:32 | * | yglukhov quit (Ping timeout: 265 seconds) |
19:04:42 | subsetpark | I did :) There's line terminators in random places and none at the end |
19:05:02 | Yardanico | dirty way - have a timeout |
19:05:28 | FromGitter | <RedBeard0531> ioctl FIONREAD will tell you how much data is in the recv buffer |
19:05:30 | * | profkitkat joined #nim |
19:05:45 | * | devdri joined #nim |
19:06:29 | Yardanico | FromGitter, but it's linux only? |
19:06:29 | FromGitter | Yardanico, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
19:06:48 | Yardanico | @RedBeard0531 |
19:08:23 | subsetpark | Yardanico: I tried that too, but if you try recv(buffer, maxSize = 100_000, timeout = 10), then the resulting size of buffer is always 100_000 |
19:10:54 | subsetpark | And it doesn't actually fill the buffer with whatever was received before the timeout... |
19:11:12 | subsetpark | Araq: does recvBuffer actually exist? |
19:11:17 | FromGitter | <RedBeard0531> @Yardanico This implies it is widely supported http://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/socket_base/bytes_readable.html |
19:11:56 | FromGitter | <RedBeard0531> https://msdn.microsoft.com/en-us/library/windows/desktop/ms738573(v=vs.85).aspx |
19:14:03 | Araq | subsetpark: sorry, maybe I misremember |
19:16:59 | * | maximpertsov quit (Ping timeout: 260 seconds) |
19:17:54 | Araq | subsetpark: I think you can use var b: byte; recv(socket, addr(b), 1) |
19:18:15 | Araq | since the socket is buffered this should be fast enough |
19:18:36 | Araq | RedBeard0531: do you know this one: https://youtu.be/Qq_WaiwzOtI?t=812 ? |
19:21:06 | FromGitter | <RedBeard0531> No, but I know of him. I thought he ragequit C++ a while ago. I'll give it a watch. |
19:21:59 | * | devdri quit () |
19:24:06 | Araq | yardanico: I'm improving --symbolFiles but I'm about to introduce --symbolFiles:v2 or something, the current way of doing things seems too fragile |
19:24:15 | Yardanico | Araq, ok, thanks! |
19:26:09 | * | yglukhov joined #nim |
19:33:19 | * | deathstar joined #nim |
19:36:01 | * | profkitkat quit (Ping timeout: 248 seconds) |
19:43:34 | * | yglukhov quit (Remote host closed the connection) |
19:50:57 | * | yglukhov joined #nim |
19:53:00 | FromGitter | <RedBeard0531> @Araq, I haven't seen inline dtors cause problems, but I have seen the opposite. Compilers seem pretty good about not inlining when it would make things worse. They often make things better in cases where the struct is never passed to any out-of-line functions, because it allows the compiler to avoid buildint the actual struct layout in memory and just keeps the data in registers. The only real exception I've seen |
19:53:00 | FromGitter | ... is that it is useful to NOINLINE conditional slow paths so things like `if (doesntFit) grow()` become a conditional-jump + call rather than inlining the grow. I've even gone as far as using a NOINLINE lambda to convince the compiler to out-of-line a slow path just to avoid spilling registers in the happy-path. But ... [https://gitter.im/nim-lang/Nim?at=5a4fd79c0505ad8b45bc1287] |
19:54:06 | Yardanico | https://support.google.com/faqs/answer/7625886 |
19:54:20 | Yardanico | ^they submitted a patch to LLVM and GCC |
19:55:26 | Yardanico | LLVM - https://reviews.llvm.org/D41723 |
19:57:47 | dom96 | subsetpark: does the same happen without a timeout? |
20:05:36 | dom96 | Looking at the code I think that is the problem. |
20:07:16 | subsetpark | dom96: without a timeout it just hangs |
20:07:28 | subsetpark | basically the behavior without a timeout is the same as the behavior of the last loop with a timeout |
20:08:04 | Yardanico | dom96, AFAIK there's timer support in new asyncdispatch? |
20:08:32 | dom96 | hrm |
20:08:52 | dom96 | It looks like this is indeed a bug in the synchronous buffered implementation |
20:09:03 | dom96 | you can try using an unbuffered socket |
20:09:24 | dom96 | and it seems I'll need to break this to fix it :\ |
20:10:06 | dom96 | The asyncnet recv's docs explicitly mentions "Reads up to `size` bytes": https://nim-lang.org/docs/asyncnet.html#recv,AsyncSocket,int |
20:10:42 | dom96 | oh |
20:10:58 | FromGitter | <RedBeard0531> It would be nice if there will still be a way to just wait for either full size or close, since that is what you want 99% of the time |
20:11:26 | dom96 | The code is the same, so they are consistent |
20:11:43 | dom96 | the only case where all requested data won't be read is if the socket is disconnected |
20:12:20 | dom96 | Using an unbuffered socket seems like a good enough solution |
20:12:52 | Yardanico | dom96, also very strange that in new asyncdispatch addTimer() is exposed but Callback type is not |
20:12:52 | subsetpark | dom96: can you link me? |
20:12:53 | FromGitter | <RedBeard0531> Also it may be a good idea to set MSG_WAITALL flag if it isn't already set to tell the kernel not to waste time waking us until the full data is recv'd. |
20:13:14 | dom96 | subsetpark: just pass buffered=false to newSocket() |
20:13:36 | FromGitter | <brentp> is there a way to have nimble build a binary with "-" in the name? e.g. my-utils-ex.nim ? |
20:13:52 | subsetpark | oh, and then you expect the `s: string = socket.recv(maxLength)` will not block? |
20:13:57 | Yardanico | brentp: use _ instead :) |
20:14:06 | dom96 | nimble c --out:my-utils-ex my_utils_ex.nim |
20:14:39 | Yardanico | ah, |
20:14:46 | dom96 | subsetpark: depends what you mean by "block" |
20:14:55 | dom96 | it will block until it receives /some/ data |
20:15:10 | subsetpark | right, i meant block after it has received "all" the data |
20:16:50 | subsetpark | no, unfortunately it's the exact same behavior with buffered = false |
20:16:58 | FromGitter | <brentp> thanks |
20:18:05 | subsetpark | dom96: my problem is not that all the requested data is not read; it's that all the data sent is read, which is less than the max requested, but then the connection simply blocks until the other side closes the socket |
20:18:20 | subsetpark | and if i use timeouts to close my own socket, i can't get the data to actually stick around |
20:19:39 | subsetpark | but maybe i can use a combination of Araq's format and a timeout |
20:19:56 | dom96 | I don't understand, can you show some code? |
20:20:24 | * | dom96 has been studying all day for an exam so his head is probably not in the best state :) |
20:20:41 | subsetpark | well, i can show you the naive implementation that definitely doesn't work |
20:20:45 | subsetpark | and we can go from there... |
20:20:46 | dom96 | sure |
20:21:14 | subsetpark | https://github.com/makingspace/rmq/blob/master/rmqsrc/connection.nim#L102 |
20:21:35 | * | dandevelo joined #nim |
20:22:50 | dom96 | Isn't the problem that 'recv' blocks until FRAME_MAX_SIZE len of data is read? |
20:22:58 | subsetpark | So, that is a direct translation of the Python. As you might guess, FRAME_MAX_SIZE is very big. Python's socket implementation is smart enough to read all of the data on the wire and return, without a timeout, when the provider has finished sending data. But this implementation reads all the data that's provided, but then blocks because it hasn't hit FRAME_MAX_SIZE yet. After a second or so, the server on the |
20:23:00 | subsetpark | other end of the socket closes the socket |
20:23:06 | subsetpark | dom96: that's right |
20:25:49 | dom96 | Hrm, problem seems to be that it ends up calling this: https://github.com/nim-lang/Nim/blob/master/lib/pure/net.nim#L1105 |
20:26:45 | * | dandevelo quit (Ping timeout: 264 seconds) |
20:26:46 | Yardanico | dom96, nevermind, it's actually very easy to write a template to do that :) https://gist.github.com/Yardanico/5ffda1e507ba024de63f26a1f060f274 |
20:26:46 | dom96 | What you can do is: var data = newString(FRAME_MAX_SIZE); socket.recv(addr data[0], FRAME_MAX_SIZE) |
20:26:55 | Yardanico | (about scheduling async procs) |
20:28:10 | dom96 | subsetpark: That being said, I have a feeling that this isn't the correct way to read this protocol :) |
20:28:17 | dom96 | Why do you need to read FRAME_MAX_SIZE? |
20:28:36 | subsetpark | I don't need to; that's just the maximum I can - it's almost always going to be less |
20:28:54 | dom96 | so after you read this, how do you know the frame size? |
20:28:59 | subsetpark | What about this? https://gist.github.com/subsetpark/bfefbd31ff88e03849de12913001b9a9 |
20:29:19 | dom96 | (ugh, why has xchat decided to open all links in Safari all of a sudden) |
20:30:08 | dom96 | that seems insanely inefficient |
20:30:18 | subsetpark | Yeah.. |
20:30:19 | Yardanico | Oh wait, is it possible to create unique procedure in a template? |
20:30:19 | dom96 | Do you have any docs for the protocol? |
20:30:46 | Yardanico | proc myproc() {.gensym, async.} doesn't work :) |
20:31:14 | subsetpark | If i could guarantee that the frame length is always the first thing on the stream, do you think it would be correct to: 1. look for the frame length (with very short timeout) 2. On timeout: the thing is empty, return 2b. Read as an integer 3. recv(frameLength) as string |
20:31:39 | Yardanico | ah, seems to be that I can't use gensym with async |
20:31:57 | subsetpark | ugh, no, I can't guarantee that |
20:32:08 | dom96 | subsetpark: Why can't you guarantee that? |
20:32:52 | subsetpark | That's the problemwith this fucking thing...It's AMQP. Sometimes the first four characters are "AMQP". Other times, the stream consists starts with two 16 bit integers of use elsewhere, *then* the frame size. |
20:33:09 | dom96 | From what I can tell, the way you're trying to code this is error prone. Even if it works in Python, what if you happen to receive 1.5 frames? |
20:33:32 | subsetpark | In the python code, all received strings are appended to a framebuffer and then frames are analyzed there |
20:34:27 | * | yglukhov quit (Remote host closed the connection) |
20:35:11 | subsetpark | The problem is that even knowing the frame length doesn't resolve this issue. |
20:35:21 | subsetpark | Because let's say I frontload all the frame analysis so I always know the length - |
20:35:26 | subsetpark | I still might only get half a frame |
20:35:36 | subsetpark | Which I need to put away for later |
20:37:07 | dom96 | I'm trying to find the protocol docs for this and it's amazingly difficult |
20:37:15 | subsetpark | yeah it is really painful :) |
20:37:18 | subsetpark | welcome to my last week |
20:38:08 | dom96 | well, anyway, if you want Python behaviour just do socket.recv(addr(b), FRAME_MAX_SIZE) |
20:38:24 | dom96 | Not sure why you're trying to read 1 by one |
20:38:43 | dom96 | You literally just need this: var data = newString(FRAME_MAX_SIZE); socket.recv(addr data[0], FRAME_MAX_SIZE) |
20:38:47 | dom96 | with a unbuffered socket |
20:41:32 | subsetpark | I'm telling you, that has the same behavior :/ |
20:42:42 | dom96 | That uses posix's recv directly with a flag of '0 |
20:42:48 | dom96 | Maybe the flag is the problem |
20:43:11 | subsetpark | It reads fine when something is there; Then, when the socket is empty, it hangs. After a few seconds the server closes the socket. After that all recvs return immediately |
20:43:24 | dom96 | oh |
20:43:45 | dom96 | so it no longer waits for the full FRAME_MAX_SIZE? |
20:43:53 | dom96 | well, that's python behaviour isn't it? |
20:44:26 | subsetpark | It does when the socket is empty... I guess I can combine that with a timeout to get both behaviors. |
20:46:41 | Yardanico | dom96, about scheduling stuff: this looks pretty good and doesn't affect stack traces: https://gist.github.com/Yardanico/5ffda1e507ba024de63f26a1f060f274 |
20:47:15 | Yardanico | but the problem here is if call() raised an error - you can't know the location where it was scheduled |
20:47:30 | dom96 | right... I don't need this. |
20:49:34 | * | yglukhov joined #nim |
20:50:10 | subsetpark | dom96: This seems to put everything together https://gist.github.com/subsetpark/65a7ea312a2a5334a5eb2833dbe8396e |
20:51:38 | dom96 | I would still say you should try and read the protocol differently. By getting the size of the frame, then reading that size. |
20:51:45 | dom96 | I assume the protocol offers this. |
20:54:25 | subsetpark | It sort of does... But I wouldn't be able to remove any of this stuff, because I'd have to account for the circumstance that the protocol announces a frame of size N but there's only N/2 bytes actually available |
20:55:17 | dom96 | why is that a problem? |
20:55:23 | dom96 | Just wait for N bytes? |
20:56:31 | subsetpark | Because you don't know when N bytes is actually going to come... You need to get back onto your event loop so the client can send messages |
20:57:43 | dom96 | Oh man, that's not the way to do it. |
20:58:05 | dom96 | There is a reason asynchronous IO exists. Why don't you use it? |
20:59:26 | subsetpark | I can try. I'm honestly not sure it will cover all my use cases. But I'm not married to this. |
21:07:32 | livcd | dom96: i am now looking at the nimbot source code and it kinda feels odd |
21:07:45 | Yardanico | livcd, why? |
21:08:21 | livcd | like bunch of weird words jumbled together |
21:09:36 | Yardanico | its' code is very old |
21:09:43 | Yardanico | for example look at this async usage :) https://github.com/nim-lang/nimbot/blob/master/src/nimbot.nim#L219 |
21:10:05 | dom96 | livcd: care to elaborate? :) |
21:10:15 | dom96 | Yardanico: That's not old. There is a good reason for doing this. |
21:10:39 | dom96 | (Forward declarations) |
21:11:24 | livcd | i cant elaborate really but that is because i do not use nim enough |
21:11:33 | livcd | it just feels odd |
21:11:57 | dom96 | Here is something old :) https://github.com/dom96/c4hbot |
21:12:12 | Yardanico | wow |
21:12:24 | livcd | and maybe the default github syntax highlighting is giving it a weird look |
21:13:35 | Yardanico | github highlighting is broken for nim sadly |
21:13:41 | Yardanico | if you use something like 0'u8 |
21:13:51 | dom96 | cahbot.nim(5, 10) Error: undeclared identifier: 'PIRC' D: |
21:14:04 | Yardanico | dom96, this website is redirecting to some strange japanese website now |
21:14:12 | * | dddddd quit (Remote host closed the connection) |
21:14:12 | Yardanico | I'm about http://www.houseofcardsagainsthumanity.com/ :0 |
21:14:26 | dom96 | interesting |
21:23:16 | dom96 | Didn't take much to fix -> #nim-offtopic :) |
21:27:26 | livcd | now that i think of it I seriously miss a chapter about oop in nim dom96 |
21:29:02 | * | devdri joined #nim |
21:32:52 | dom96 | Nim isn't really about OOP though |
21:38:13 | FromGitter | <RedBeard0531> @Varriount It looks like github uses your lib for syntax highliting nim: https://github.com/Varriount/NimLime (according to https://github.com/github/linguist/blob/master/vendor/README.md) can you fix the highlighting for https://github.com/nim-lang/Nim/blob/devel/lib/pure/strformat.nim |
21:39:32 | Yardanico | ah, probably it doesn't understand ##[ comments |
21:39:36 | Yardanico | documentation multi-line comments |
21:40:02 | FromGitter | <RedBeard0531> yeah. that is the most eye-bleeding page I've seen... |
21:41:24 | Yardanico | xd |
21:42:13 | * | Yardanico quit (Remote host closed the connection) |
21:44:06 | * | Yardanico[Phone] joined #nim |
21:49:03 | * | nsf joined #nim |
21:55:06 | FromGitter | <Varriount> Nag nag nag. I never asked for my library to be used as the official highlighter! :P |
21:58:08 | FromGitter | <RedBeard0531> Think of it as extra battle testing! Everyone who clicks a "source" link from docs is another tester |
21:58:58 | FromGitter | <RedBeard0531> "with enough eyes all bugs are shallow" <-- said by someone who hasn't read the news in the past few years |
21:59:46 | FromGitter | <Varriount> I'll have a fix out tomorrow. Should be simple. |
22:00:24 | FromGitter | <RedBeard0531> 🎊 |
22:06:54 | * | Vladar quit (Quit: Leaving) |
22:09:16 | GitDisc | <NopeDK> How solid is Nimsuggest at suggestions and how does the highlighting work? |
22:09:42 | * | endragor quit (Remote host closed the connection) |
22:10:09 | * | endragor joined #nim |
22:13:26 | FromGitter | <RedBeard0531> Pretty solid suggestions (when it doesn't crash) |
22:13:33 | FromGitter | <RedBeard0531> Which editor do you use? |
22:14:23 | * | endragor quit (Ping timeout: 248 seconds) |
22:19:09 | GitDisc | <NopeDK> Micro, so writing the plugin myself at some point. |
22:20:39 | GitDisc | <NopeDK> Desktop wise will be Sublime when I get it set up |
22:23:35 | * | dandevelo joined #nim |
22:23:45 | * | marenz__ quit (Ping timeout: 264 seconds) |
22:27:55 | * | dandevelo quit (Ping timeout: 256 seconds) |
22:29:40 | Araq | Varriount: When you're at it, remove any kind of "semantic" highlighting please. 'expr' is NOT a keyword. |
22:29:50 | Araq | nor is 'len'. |
22:30:30 | Araq | and 'of' is control flow keyword much more often than it is an operator |
22:34:52 | FromGitter | <RedBeard0531> Do you consider `result` a keyword worthy of highlighting? (I do) |
22:36:42 | FromGitter | <RedBeard0531> How about addr? It technically is, but it is close enough to a function that x.addr works fine. |
22:45:23 | * | Trustable quit (Remote host closed the connection) |
23:01:53 | * | MJCaley joined #nim |
23:05:17 | * | nsf quit (Quit: WeeChat 2.0.1) |
23:10:06 | subsetpark | BTW if anybody wants to check out what I've been hacking on |
23:10:13 | subsetpark | https://github.com/makingspace/rmq |
23:11:53 | * | ofelas joined #nim |
23:12:05 | * | MJCaley quit (Quit: MJCaley) |
23:17:38 | FromGitter | <Quelklef> @Varriount Thank you for making your plugin! I was using Atom with an outdated Nim plugin before. |
23:18:10 | * | cspar joined #nim |
23:18:29 | FromGitter | <Varriount> @Quelklef Eh, I can't say NimLime is the best. It gets the job done though. |
23:18:44 | FromGitter | <Quelklef> works for me =) |
23:29:38 | dom96 | subsetpark: any luck with async? :) |
23:31:02 | livcd | so some people use vscode here right ? |
23:31:15 | dom96 | the majority do |
23:32:18 | * | deathstar quit (Remote host closed the connection) |
23:32:22 | livcd | anyone knows how / if i can configure the "F6" to open / build / run the nim command in a new tmux window ? |
23:35:42 | * | yglukhov quit (Remote host closed the connection) |
23:39:05 | livcd | found it i think! |
23:46:09 | * | gokr joined #nim |