00:00:11 | disruptek | sounds great so far. |
00:02:32 | * | clyybber joined #nim |
00:02:41 | clyybber | disruptek: Ha, I know what the issue was |
00:03:05 | clyybber | I hadn't had mesa-intel-drm installed because from the repo I figured its just an alias for mesa |
00:03:10 | clyybber | but apparently it is not |
00:03:19 | clyybber | and now everything just works TM |
00:03:21 | clyybber | awesome |
00:03:26 | disruptek | nice. |
00:03:39 | disruptek | how's the alt-tab working out? |
00:03:47 | clyybber | rebooted |
00:03:48 | clyybber | lol |
00:04:02 | clyybber | but holy shit those wobbly animations are smooth af |
00:04:10 | clyybber | feels so weird |
00:04:40 | clyybber | this is so fucking nice |
00:04:46 | disruptek | like going back in time to 1998 and enlightenment wm. |
00:04:55 | * | Hideki_ joined #nim |
00:06:59 | * | clyybber quit (Client Quit) |
00:08:57 | * | Hideki_ quit (Ping timeout: 240 seconds) |
00:09:29 | * | kungtotte joined #nim |
00:13:31 | FromGitter | <bung87> `CONSTANT: MNT_CMDFLAGS flags{ MNT_UPDATE MNT_RELOAD MNT_FORCE }` I found this in machos.factor , what’s the type in nim? |
00:24:08 | * | liam_ joined #nim |
00:35:20 | * | gour_ quit (Quit: Leaving) |
00:41:26 | * | endragor quit (Remote host closed the connection) |
00:43:16 | * | krux02_ joined #nim |
00:46:57 | * | krux02 quit (Ping timeout: 240 seconds) |
01:05:00 | * | endragor joined #nim |
01:10:11 | * | endragor quit (Ping timeout: 276 seconds) |
01:22:29 | * | hexeratops quit (Quit: Leaving) |
01:39:16 | * | Kaynatwo joined #nim |
01:43:25 | * | Kaynato quit (Ping timeout: 268 seconds) |
01:46:23 | * | Kaynatwo is now known as Kaynato |
02:06:22 | * | Hideki_ joined #nim |
02:08:28 | * | disbot quit (Read error: Connection reset by peer) |
02:08:30 | * | disruptek quit (Read error: Connection reset by peer) |
02:09:37 | * | disbot joined #nim |
02:10:27 | * | disruptek joined #nim |
02:11:17 | * | Hideki_ quit (Ping timeout: 276 seconds) |
02:11:48 | * | rockcavera joined #nim |
02:27:14 | * | krux02_ quit (Remote host closed the connection) |
02:27:58 | * | endragor joined #nim |
03:02:18 | yumaikas | Is there an easy way to get at nim docs from the command line, or do you have to go through a web interface? |
03:02:46 | disruptek | gotta use the web. |
03:03:03 | * | yumaikas is tempted to try to change that... |
03:03:05 | yumaikas | But not tnight |
03:03:08 | yumaikas | *tonight |
03:03:12 | disruptek | !repo ndoc |
03:03:14 | disbot | https://github.com/nodeca/ndoc -- 9ndoc: 11js port of pdoc, with extentions 15 93⭐ 8🍴 7& 29 more... |
03:03:25 | disruptek | nope, that wasn't it. |
03:03:29 | disruptek | !repo disruptek/ndoc |
03:03:30 | disbot | https://github.com/disruptek/ndoc -- 9ndoc: 11like pydoc but for nim 15 0⭐ 0🍴 |
03:03:41 | disruptek | we should build it. |
03:05:23 | yumaikas | Perhaps. I have a lot on my plat for now tho. TBH, even just a "dump all of the docs for a given module" so I can grep it would be a nice start |
03:05:57 | disruptek | yeah. well, rst is greppable. |
03:06:06 | * | liam_ quit (Quit: Leaving) |
03:07:27 | yumaikas | Hrm... That is a fair point. |
03:11:23 | * | rockcavera quit (Remote host closed the connection) |
03:17:35 | * | Tanger joined #nim |
03:19:02 | * | ltriant joined #nim |
03:23:41 | yumaikas | So, there doesn't seem to be a way to clear out a timer using asyncdispatch? Unless you just re-add one-shot timers over and over? |
03:25:01 | disruptek | you could do that, or sleep in a loop and periodically do something fun. |
03:26:41 | yumaikas | Hrm, I suppose I'd not thought about doing it that way. |
03:27:01 | yumaikas | And sleepAsync returns a future, which makes it a better fit for what I want to do anyway |
03:27:42 | yumaikas | (I was wanting to create an event loop that waits on a handful of futures, and then takes different actions depending on which one completed) |
03:28:58 | disruptek | somewhere, i have a little proc that waits for any of a group of futures and yields the one that finishes. |
03:29:18 | disruptek | pretty sure it's in this rest thingy |
03:29:21 | disruptek | !repo disruptek/rest |
03:29:23 | disbot | https://github.com/disruptek/rest -- 9rest: 11REST comfort 15 0⭐ 0🍴 |
03:29:50 | yumaikas | Yeah, C# has something called Task.WaitAny() that does something similar. Isn't there a part of the standard library that does something similar? |
03:29:50 | disruptek | yeah, `any` |
03:30:10 | disruptek | no, it's notably absent from the stdlib. |
03:30:17 | disruptek | that's why i'm mentioning it. 😉 |
03:30:45 | yumaikas | Ah, fair |
03:31:18 | * | liam_ joined #nim |
03:31:40 | yumaikas | I see a proc "first"? |
03:31:56 | disruptek | that's the first proc. |
03:34:29 | * | drewr joined #nim |
03:34:39 | yumaikas | Hrm, ok. |
03:34:54 | yumaikas | I also see you have a proc that drains a queue |
03:34:59 | yumaikas | of futures |
03:35:03 | yumaikas | or rather, an iterator |
03:35:27 | disruptek | what can i say? |
03:35:30 | disruptek | i'm a wild man. |
03:36:03 | * | yumaikas doesn't see it as that wild |
03:36:23 | yumaikas | I copypasta'd something similar into some C# code I was writing for work |
03:36:53 | disruptek | you just might be a wild man, too. |
03:38:08 | yumaikas | I am writing Nim on a Sunday night |
03:38:36 | yumaikas | lol |
03:38:46 | * | yumaikas is trying to remember how to get stdin as an async file... |
03:48:51 | * | yumaikas could have sworn someone mentioned a way to get stdin as an async stream at on point |
04:08:57 | * | kungtotte quit (*.net *.split) |
04:08:57 | * | dddddd quit (*.net *.split) |
04:08:57 | * | zyklon quit (*.net *.split) |
04:08:57 | * | letto quit (*.net *.split) |
04:08:57 | * | beatmox quit (*.net *.split) |
04:08:58 | * | dv^_^ quit (*.net *.split) |
04:08:58 | * | sammich quit (*.net *.split) |
04:08:58 | * | nixfreak quit (*.net *.split) |
04:08:58 | * | Sargun quit (*.net *.split) |
04:08:58 | * | joshbaptiste quit (*.net *.split) |
04:08:58 | * | mwbrown quit (*.net *.split) |
04:08:59 | * | go|dfish quit (*.net *.split) |
04:08:59 | * | dom96 quit (*.net *.split) |
04:08:59 | * | federico3 quit (*.net *.split) |
04:08:59 | * | def- quit (*.net *.split) |
04:27:51 | * | chemist69 quit (Ping timeout: 246 seconds) |
04:29:47 | * | nsf joined #nim |
04:29:53 | * | chemist69 joined #nim |
04:41:33 | * | Tanger quit (Ping timeout: 245 seconds) |
04:47:40 | * | Tanger joined #nim |
04:53:21 | * | disruptek quit (Ping timeout: 268 seconds) |
04:53:47 | * | disbot quit (Ping timeout: 250 seconds) |
05:12:16 | * | gour joined #nim |
05:41:45 | * | sealmove quit (Quit: WeeChat 2.6) |
05:55:38 | * | ltriant quit (Quit: leaving) |
06:05:26 | FromGitter | <Varriount> @Clyybber @sealmove Commandant was a project for a university course |
06:06:05 | FromGitter | <Varriount> Even if I continued work on it, I don't see it gaining actual use - it's too different from other shells |
06:07:55 | * | Hideki_ joined #nim |
06:12:54 | * | Hideki_ quit (Ping timeout: 268 seconds) |
06:25:10 | * | narimiran joined #nim |
06:37:17 | liam_ | Is there a proc in the standard library that lists all the files in a given directory? |
06:47:32 | * | Tanger quit (Ping timeout: 276 seconds) |
06:50:12 | * | Tanger joined #nim |
07:00:18 | livcd | liam_: for sure |
07:00:35 | liam_ | Yeah I found it in the end |
07:00:48 | liam_ | walkFiles |
07:01:11 | livcd | or walkDir |
07:22:29 | * | elronnd joined #nim |
07:23:02 | * | elronnd is now known as moon-chilled |
07:29:21 | * | PMunch joined #nim |
07:50:15 | * | solitudesf joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:05:07 | * | gmpreussner joined #nim |
08:17:40 | FromDiscord | <Kaynato> I should stop doing advent of code..... it's been bad for my health..... I need to convince myself that a leaderboard position is pointless... |
08:18:33 | lqdev[m] | @Kaynato dude, a leaderboard position is pointless. |
08:21:39 | FromDiscord | <Kaynato> competitive programming can encourage bad practices... staying up to 4 AM each day with high stress is unhealthy... |
08:22:02 | FromDiscord | <Kaynato> thank you, hopefully after i sleep on it, it will get through my stubborn subconscious |
08:24:56 | FromGitter | <authenticode> Hi guys! I am very interested in Nim and have been learning Nim for about a week and it's been truly exciting! Thanks to you guys for making Nim such a great programming language! |
08:25:35 | FromGitter | <forthy> Ditto here! |
08:26:10 | * | liam_ quit (Quit: Leaving) |
08:28:00 | FromGitter | <authenticode> My humble question here - does nim have a plan to add a feature similar to interface in Java or protocol in Objective-C? |
08:31:34 | FromDiscord | <Kaynato> I think the new concept format posed in that RFC would be it |
08:31:57 | FromDiscord | <Kaynato> for now however, concepts are... not exactly safe to use in that way |
08:33:46 | FromGitter | <authenticode> yeah that's what i am talking about. even without it i am in love with nim. unfortunately i am not skilled enough to add that feature to nim... |
08:41:53 | * | Vladar joined #nim |
09:11:31 | PMunch | Kaynato, shush, don't let Araq hear you calling concepts for interfaces :P |
09:12:05 | PMunch | If you look at how Streams are implemented that is the closest we have to interfaces in Nim at the moment |
09:13:02 | PMunch | Or rather it is what is recommended to replicate that pattern |
09:23:55 | leorize | !repo interfaced |
09:24:51 | leorize | !repo andreaferretti/interfaced |
09:25:12 | leorize | oh disbot is offline :P |
09:25:13 | leorize | https://github.com/andreaferretti/interfaced |
09:25:28 | PMunch | Did it die? |
09:25:39 | leorize | I think disruptek internet is gone |
09:25:55 | PMunch | Ah |
09:26:24 | PMunch | Wait, does he run it on his own machine? |
09:26:36 | leorize | yep |
09:26:57 | FromGitter | <gogolxdong> How to get git2 wrapper from nimgit2? |
09:27:41 | shashlick | @gogolxdong what do you mean |
09:28:47 | FromGitter | <gogolxdong> get nim source code for git2 |
09:29:41 | leorize | shashlick: I think they wanted a static wrapper from nimgit2 |
09:30:22 | shashlick | I see - you can nim c nimgit2 > abc.nim and then modify it as needed to work |
09:30:44 | shashlick | But you won't get any of the getHeader stuff |
09:30:52 | shashlick | Just the cimport portion |
09:31:26 | FromGitter | <gogolxdong> `/mnt/c/nimgit2/nimgit2.nim(11, 13) Error: undeclared identifier: 'getProjectCacheDir'` |
09:32:29 | leorize | what version of Nim are you running? |
09:32:34 | leorize | getProjectCacheDir is a new thing iirc |
09:32:46 | FromGitter | <gogolxdong> latest devel |
09:33:27 | shashlick | You need latest nimterop for that |
09:34:23 | shashlick | What version do you have |
09:34:35 | FromGitter | <gogolxdong> 1) 3.3? |
09:35:00 | FromGitter | <gogolxdong> I think it's the latest. |
09:35:13 | shashlick | Are you importing nimterop/build? |
09:35:20 | FromGitter | <gogolxdong> yes |
09:36:10 | shashlick | What's your wrapper looking like |
09:36:23 | shashlick | Did you modify it |
09:36:26 | shashlick | https://github.com/nimterop/nimterop/blob/master/nimterop/build.nim#L141 |
09:47:08 | leorize | @mratsim: weave looks really cool, but I'm rather curious of your decision to use parallelFor over a kind of for-loop macros |
09:47:48 | leorize | I think for loop macros would look more integrated with Nim's syntax, but I might not be aware of its shortcomings |
09:50:16 | FromGitter | <gogolxdong> I didn't touch it. |
09:50:24 | livcd | would weave eventually power parallel async/await? |
09:59:46 | FromGitter | <sheerluck> `proc toFloat(i: int): float` is not defined for `BiggestInt` that I got from `getFileSize` ⏎ How would I divide filesize by 3.1415? |
10:00:34 | leorize | @sheerluck: use `float()` |
10:00:50 | FromGitter | <sheerluck> Thank you |
10:05:19 | * | beatmox joined #nim |
10:05:20 | * | dv^_^ joined #nim |
10:05:25 | * | def- joined #nim |
10:05:26 | * | sammich joined #nim |
10:05:26 | * | federico3 joined #nim |
10:05:26 | * | Sargun joined #nim |
10:05:34 | * | joshbaptiste joined #nim |
10:05:34 | * | kungtotte joined #nim |
10:05:36 | * | letto joined #nim |
10:05:40 | * | zyklon joined #nim |
10:05:52 | * | nixfreak joined #nim |
10:05:55 | * | go|dfish joined #nim |
10:07:00 | * | dom96 joined #nim |
10:07:07 | * | dom96 quit (Changing host) |
10:07:07 | * | dom96 joined #nim |
10:07:07 | * | mwbrown joined #nim |
10:07:28 | * | Vladar quit (Remote host closed the connection) |
10:09:31 | * | Hideki_ joined #nim |
10:13:34 | * | lritter joined #nim |
10:14:00 | * | Hideki_ quit (Ping timeout: 252 seconds) |
10:15:32 | FromDiscord | <Fern & Simula (They/Them)> does nim have something equivalent to python's enumerate iterator? |
10:15:59 | FromDiscord | <Fern & Simula (They/Them)> oh it just works TM |
10:16:08 | leorize | pairs()? |
10:16:32 | leorize | iiuc it's not as good, but it works :P |
10:16:51 | FromDiscord | <Fern & Simula (They/Them)> i can just use `for i, val in myseq` |
10:17:39 | leorize | yea, it implicitly calls pairs() |
10:17:47 | FromDiscord | <Fern & Simula (They/Them)> oh that's really nice |
10:17:49 | FromDiscord | <Fern & Simula (They/Them)> thanks :) |
10:18:10 | leorize | a `for` with 1 item calls `items()`, with 2 items calls `pairs()` |
10:21:43 | FromDiscord | <Fern & Simula (They/Them)> huh, that's interesting |
10:22:17 | FromDiscord | <Fern & Simula (They/Them)> does anyone else ever have trouble reading code with an indentation of only two spaces? |
10:24:37 | leorize | there are probably people like so, but the majority of Nim code is written in 2-space indentation :P |
10:25:31 | PMunch | You get used to it after a while |
10:25:44 | PMunch | And then all 4 space indented code looks so wasteful :P |
10:25:54 | PMunch | But it helps to have an editor that will draw lines for you |
10:26:18 | FromDiscord | <Fern & Simula (They/Them)> i've been bitten a few times by emacs deciding to reindent something and breaking things |
10:26:26 | FromDiscord | <Fern & Simula (They/Them)> i'll have to set it up with dots or something |
10:29:09 | PMunch | In Vim at least you can get line- |
10:30:25 | leorize | i guess emacs indentation plugin is terrible :P |
10:32:41 | FromDiscord | <Fern & Simula (They/Them)> i love emacs but my god its complicatedf |
10:35:33 | leorize | well, it's emacs |
10:38:28 | * | nsf quit (Quit: WeeChat 2.6) |
10:53:42 | FromGitter | <bung87> fs[i].f_flags ` error: subscript of pointer to incomplete type 'struct statfs’` where fs is `ptr UncheckedArray[statfs]` how to fix this ? |
11:04:09 | FromDiscord | <Clyybber> disruptek: For some reason installing libreoffice fucked my fonts |
11:04:17 | FromDiscord | <Clyybber> only on wayland though |
11:15:53 | FromDiscord | <mratsim> @leorize: I don't mind rewriting as for-loop macros but I think "parallel" is important enough to be the first part of the statement and not hidden on the right. |
11:17:02 | FromDiscord | <mratsim> @livcd: for now at least, I don't plan to tackle parallel async/await. There are already asyncdispatch, reaktor and Chronos for that. I just plan to play well with them. |
11:19:30 | FromDiscord | <mratsim> Maybe the best would be to design some hook/point for the event loop to run or in the event loop design some hook/point for compute to run. It's a bit complex to do it well in a generic manner I think. I probably don't know enough. Anyway if you have suggestions to look into feel free: https://github.com/mratsim/weave/issues/22 |
11:29:27 | FromDiscord | <Clyybber> libreoffice wasn't the culprit 😦 |
11:34:08 | * | clyybber joined #nim |
11:35:20 | * | rockcavera joined #nim |
11:46:32 | * | Hideki_ joined #nim |
11:49:34 | PMunch | Clyybber, sure it didn't leave some fonts in a directory with priority over your system installed fonts? |
11:50:20 | PMunch | bung87, hard to tell without knowing what statfs is/is supposed to be |
11:50:47 | clyybber | PMunch: I installed some fonts now, gonna try again |
11:51:02 | clyybber | Ha |
11:51:05 | clyybber | Works now |
11:51:18 | clyybber | I really don't get font configuration though |
11:51:36 | PMunch | What's so hard about it? |
11:52:01 | clyybber | making stuff use the fonts I have installed already |
11:52:19 | clyybber | and not having to install extra fonts |
11:54:21 | PMunch | Well if they are requesting a font by name it's easy |
11:54:29 | PMunch | Default fonts might be a tad more tricky |
12:04:31 | * | ng0_ joined #nim |
12:05:24 | * | ng0 quit (Ping timeout: 260 seconds) |
12:05:26 | * | ng0_ is now known as ng0 |
12:05:37 | FromGitter | <bung87> @PMunch forget it , problem changed.. |
12:07:44 | FromGitter | <bung87> how to cast cstring to string ? I does once |
12:12:06 | PMunch | You can't cast it directly since they have different memory layouts. But you can convert with `$` |
12:15:31 | lqdev[m] | that's if it has a terminating null byte, otherwise you use newString and copyMem |
12:17:06 | FromDiscord | <mratsim> are there cstring without a null byte? |
12:17:11 | FromGitter | <bung87> I using `caststring (cstr) ` seems work |
12:17:41 | FromDiscord | <mratsim> I'm pretty sure that's relying on some flawed cast logic |
12:17:50 | FromDiscord | <mratsim> you really want a conversion here |
12:19:17 | FromGitter | <bung87> ok , the c version using `opts[0] = 0` ,so I need `newString` or `copyMem` ? |
12:21:33 | * | krux02 joined #nim |
12:22:42 | PMunch | opts[0]? |
12:22:51 | PMunch | That sets the first byte to a null byte.. |
12:23:03 | PMunch | Which means that it's a string of length 0 |
12:29:09 | FromGitter | <bung87> `opts: array[400, char]` then `popts = cast[cstring](opts.addr)` `cast[string](popts)` that will not work .. |
12:29:15 | * | clyybber quit (Quit: WeeChat 2.7) |
12:38:34 | FromGitter | <bung87> porting c still hard to me, maybe I’ll choose simpler task. |
12:41:37 | lqdev[m] | you do `var popts = newString(sizeof(opts)); popts.copyMem(opts, sizeof(opts)) |
12:44:52 | FromGitter | <authenticode> maybe we can introduce a new keyword `protocol` for interface. Nim would be performing a compile-time check for protocols on the Nim level. When translated into C or JavaScript, protocols will be erased and have no effect... What do you think @dom96 |
12:46:41 | lqdev[m] | there's already an RFC for a redesign of concept. |
12:48:23 | livcd | mratsim: but they are not parallel right ? or are they ? oO |
12:48:38 | * | Hideki_ quit (Ping timeout: 245 seconds) |
12:49:04 | * | Vladar joined #nim |
12:54:22 | lqdev[m] | @mratsim yes, there are strings without a terminating null byte. look at OpenGL's KHR_debug callback, it gives you a string with a length |
13:00:48 | * | abm joined #nim |
13:02:36 | leorize | @authenticode: https://github.com/b3liever/protocoled |
13:02:40 | * | endragor quit (Remote host closed the connection) |
13:02:42 | leorize | that might be what you're looking fore |
13:10:32 | * | couven92 joined #nim |
13:11:39 | * | gour quit (Remote host closed the connection) |
13:27:01 | FromGitter | <sheerluck> `for key in table.keys:` works, but `for key in sorted(table.keys):` gives `Error: undeclared field: 'keys'` |
13:27:29 | PMunch | sheerluck, that's because keys is an iterator |
13:28:36 | PMunch | What is your table? |
13:28:50 | * | nsf joined #nim |
13:28:53 | FromGitter | <sheerluck> str -> str |
13:29:52 | FromGitter | <sheerluck> oh, TableRef[system.string, seq[string]] |
13:30:01 | PMunch | for key in toSeq(table.keys).sort: |
13:30:14 | FromGitter | <sheerluck> Thank you! |
13:30:16 | FromDiscord | <yewpad> for key in toOrderedTable(table): |
13:30:26 | PMunch | (this needs sequtils and algorithm) |
13:30:40 | PMunch | yewpad, OrderedTable is ordered on insertion order, not key order |
13:30:47 | FromDiscord | <yewpad> oh, aight |
13:30:49 | FromDiscord | <yewpad> my bad |
13:32:36 | narimiran | also, take a look at `strtabs` if you have table with strings as keys: https://nim-lang.github.io/Nim/strtabs.html |
13:34:03 | * | clyybber joined #nim |
13:34:48 | * | sealmove joined #nim |
13:35:04 | clyybber | krux02: Do you have an idea whats causing/how to fix #12897 ? |
13:35:15 | clyybber | https://github.com/nim-lang/Nim/issues/12897 |
13:35:35 | krux02 | I can take a look |
13:46:13 | clyybber | Thank you! |
13:46:23 | * | clyybber quit (Quit: WeeChat 2.7) |
13:46:57 | FromDiscord | <Clyybber> I think its related to alignment and the static int |
13:47:30 | PMunch | Ugh, the pain of working with bits and bytes.. |
13:56:08 | Zevv | said the dude hacking away on the teenie weeniest MCUs still in use in 2019 |
13:58:01 | * | nsf quit (Quit: WeeChat 2.6) |
13:58:46 | PMunch | Hihi, the challenge is fun. Actually working with the bits and bytes are still a pain.. |
13:59:43 | PMunch | I'm writing a macro that huffman encodes a bunch of sprites, and then creates a decoder proc using case statements for that specific tree |
13:59:57 | PMunch | To see what kind of saving that might result in |
14:00:11 | PMunch | And whether the speed of decoding is acceptable |
14:05:53 | krux02 | clyybber: I looked into it. |
14:06:26 | krux02 | there is some lastOrd and first ord call on an unresolved type. |
14:07:48 | krux02 | the type is ``0..static pred(n)`` |
14:15:01 | livcd | This is really funny if you think about it https://github.com/nim-lang/Nim/issues/12833 |
14:21:07 | FromDiscord | <Clyybber> krux02: Ah |
14:21:21 | FromDiscord | <Clyybber> krux02: How do you think it should be solved? |
14:23:26 | * | solitudesf- joined #nim |
14:23:46 | * | solitudesf quit (Ping timeout: 268 seconds) |
14:23:53 | krux02 | I am not sure right now |
14:24:29 | krux02 | the correct solution would be to compute the size when the type is resolved. |
14:25:09 | krux02 | the way it is currently done is, the size computation is triggered when the type is incomplete, the computation returns garbage and the garbage causes an overflow. |
14:26:22 | krux02 | I should probably investigaty why the size computation is already triggered |
14:28:02 | * | solitudesf joined #nim |
14:28:05 | * | solitudesf- quit (Ping timeout: 268 seconds) |
14:28:06 | * | sagax quit (Ping timeout: 252 seconds) |
14:33:37 | * | disbot joined #nim |
14:34:27 | * | disruptek joined #nim |
14:39:44 | * | endragor joined #nim |
14:39:57 | FromGitter | <alehander92> and for (a, b) in c: |
14:39:59 | FromGitter | <alehander92> ops |
14:40:02 | FromGitter | <alehander92> works for tuples |
14:40:06 | FromGitter | <alehander92> i saw an old message ops |
14:43:49 | * | Romanson joined #nim |
14:53:51 | disruptek | hearts and minds, people; hearts and minds! |
14:55:16 | FromGitter | <Willyboar> hey Dis |
14:55:27 | disruptek | sup mr. boar. |
14:55:42 | disruptek | it is time to make magic. |
14:57:50 | aeverr[m] | disruptek I've seen that message before, is that your opening nessage |
14:58:02 | disruptek | my wut |
14:58:22 | aeverr[m] | Do you say that when you enter a chat room or whatever |
14:58:46 | disruptek | nah; i have a much longer monologue that i use when i enter a room. |
14:59:11 | disruptek | no, i don't get invited to many parties. why do you ask? |
14:59:33 | aeverr[m] | Ahahaha |
15:00:32 | * | dddddd joined #nim |
15:00:57 | disruptek | disbot: are you awake? |
15:00:58 | disbot | yep. 😊 |
15:01:02 | disruptek | okay, cool. |
15:02:23 | * | ng0_ joined #nim |
15:04:36 | * | ng0 quit (Ping timeout: 260 seconds) |
15:05:26 | FromDiscord | <Clyybber> disruptek: Setup wayfire now |
15:05:31 | FromDiscord | <Clyybber> It is fucking amazing |
15:05:40 | FromDiscord | <Clyybber> its like compiz |
15:05:43 | FromDiscord | <Clyybber> on crack |
15:06:02 | disruptek | but then i have to give up my sway. |
15:06:17 | FromDiscord | <Clyybber> the wobble and the blur will make you forget |
15:06:20 | disruptek | my windows don't need to wiggle. |
15:06:26 | aeverr[m] | I heard compiz on crack |
15:06:28 | aeverr[m] | I'm in |
15:06:34 | FromDiscord | <Clyybber> aeverr[m]: wayfire |
15:06:40 | FromDiscord | <Clyybber> wayland equivalent of compiz |
15:06:54 | aeverr[m] | Well issue is is that I'm on x11 still |
15:07:09 | FromDiscord | <Clyybber> aeverr[m]: Me too, until yesterday |
15:07:30 | aeverr[m] | I'll watch and star it for now |
15:07:46 | aeverr[m] | Still alpha quality |
15:07:50 | FromDiscord | <Clyybber> yeah |
15:08:21 | * | sagax joined #nim |
15:08:27 | sealmove | if I have a string which I know is of len 1, what is the best way to turn it into a char? |
15:08:34 | sealmove | s[0]? |
15:08:35 | FromDiscord | <Clyybber> also a productivity killer |
15:08:39 | FromDiscord | <Clyybber> sealmove: Yeah |
15:09:09 | FromDiscord | <Clyybber> I'm just constantly opening transparent terminals, putting asciiquarium on them and wobbling them around |
15:09:10 | FromDiscord | <Clyybber> pls help |
15:09:23 | * | ng0_ is now known as ng0 |
15:11:56 | * | Hideki_ joined #nim |
15:12:08 | FromDiscord | <Clyybber> disruptek: You think they don't. But you'll come to a different conclusion after trying this |
15:12:10 | disruptek | blur, as a concept, is a useful one. but everything else in my env is pretty good. i know i'd be investing to switch, and then lose something. not least, swayipc. |
15:12:28 | disruptek | but i don't move windows with a pointer. |
15:12:35 | FromDiscord | <Clyybber> i dont either |
15:12:39 | aeverr[m] | clyybber: make a script that will uninstall your wm if you fuck aroun dwith it too much :P |
15:12:40 | FromDiscord | <Clyybber> but now I'm addicted |
15:13:01 | aeverr[m] | am i the only one who doesnt move windows at all |
15:13:07 | disruptek | i get it. like i said, 1998 all over again. |
15:13:13 | FromDiscord | <Clyybber> aeverr[m]: Nope, I'm coming from bspwm |
15:13:17 | FromDiscord | <Clyybber> im not a floating guy |
15:13:18 | FromDiscord | <Clyybber> but damn |
15:13:21 | aeverr[m] | i mean, of course other than expansion |
15:13:21 | FromDiscord | <Clyybber> that wobble |
15:13:25 | aeverr[m] | maximization rather |
15:13:26 | FromDiscord | <Clyybber> that blur |
15:13:30 | krux02 | clyybber, just took a look at wayfire, looks exactly like what I used 10 years ago |
15:13:32 | disruptek | i really only use 2-up. |
15:13:34 | aeverr[m] | blur is great tho |
15:13:35 | krux02 | more than 10 years ago |
15:13:46 | FromDiscord | <Clyybber> krux02: What did you use? |
15:13:51 | FromDiscord | <Clyybber> emwh? |
15:13:57 | krux02 | I don't know |
15:13:59 | krux02 | breyl |
15:14:03 | krux02 | or something |
15:14:07 | disruptek | yes, i believe someone put wiggle in fvwm in the '90s. |
15:14:21 | FromDiscord | <Clyybber> krux02: So compiz? |
15:14:30 | FromDiscord | <Clyybber> breyl was an old name for compiz afaik |
15:14:39 | FromDiscord | <Clyybber> wayfire is basically compiz |
15:14:42 | krux02 | I don't know |
15:14:57 | krux02 | it had a cube, it had flames and all types of particle effects |
15:15:03 | krux02 | also wobbly windows |
15:15:08 | FromDiscord | <Clyybber> yep, that was compiz |
15:15:10 | FromDiscord | <Clyybber> probably |
15:15:18 | aeverr[m] | sounds like compiz alright |
15:15:32 | krux02 | at some point in the past it removed a lot of featuers as far as I remember. |
15:15:48 | leorize | https://en.wikipedia.org/wiki/Compiz#Beryl |
15:15:48 | krux02 | but I am not doing this 3D desktop anymore. |
15:15:49 | FromDiscord | <Clyybber> yeah |
15:15:58 | FromDiscord | <Clyybber> it was rewritten in cpp |
15:16:04 | FromDiscord | <Clyybber> and then forked |
15:16:09 | FromDiscord | <Clyybber> (and still maintained) |
15:16:12 | krux02 | I am interested in VR desktops, I think there is a lot of potential to hava a VR office. |
15:16:14 | FromDiscord | <Clyybber> the c version |
15:16:15 | disruptek | life without window decoration is simpler. 😉 |
15:16:19 | FromDiscord | <Clyybber> as compiz reloaded |
15:16:19 | krux02 | But that is still far away. |
15:16:36 | krux02 | I just live without compositing |
15:16:40 | aeverr[m] | i dont know man, i like my animations |
15:16:55 | FromDiscord | <Clyybber> I too don't need them. I was using no compositor on x11 |
15:17:05 | * | Hideki_ quit (Remote host closed the connection) |
15:17:12 | FromDiscord | <Clyybber> but hey, having two setups one for eyecandy and the other one for legacy isn't too bad |
15:17:12 | leorize | you don't get tearing? |
15:17:15 | leorize | damn you're lucky |
15:17:16 | krux02 | I like not to have animations, why wait for an animation when you can have the content instantly? |
15:17:41 | krux02 | I have tearing on videos |
15:17:45 | FromDiscord | <Clyybber> krux02: My talking normally. But when the animations fill you with joy I can't be helped |
15:18:00 | leorize | krux02: use picom |
15:18:01 | krux02 | it's annoying, but I don't have tearing in games as far as I can see |
15:18:03 | FromDiscord | <Clyybber> leorize: Your brain ignores it after a while |
15:18:13 | disruptek | the animations will get old, and then they'll just be in the way. |
15:18:14 | leorize | it's a lightweight compositor that does vsync for you |
15:18:23 | FromDiscord | <Clyybber> its a compton fork |
15:18:30 | FromDiscord | <Clyybber> and its great |
15:18:33 | aeverr[m] | theres a delay for me to notice information anyway so why not fill it in with an animation |
15:18:38 | krux02 | well the animations did fill me with joy, and then with frustration because they constantly brok with updates |
15:18:49 | krux02 | and now I relate them with frustration. |
15:18:56 | FromDiscord | <Clyybber> I guess thats where wayland improves |
15:19:09 | krux02 | but that was in 2006 or something like that |
15:19:09 | disruptek | i think i'd rather have content fulfilling my need for compu-joy. |
15:19:28 | disruptek | krux02: bad news; software has only gone downhill since '06. |
15:19:40 | aeverr[m] | hey we all have different opinions |
15:19:40 | krux02 | well, not everything |
15:19:53 | disruptek | present company excluded, of course. |
15:19:57 | FromDiscord | <Clyybber> aeverr: And exchanging them is fun 🙂 |
15:19:57 | FromDiscord | <mratsim> I wonder if Wayland or Godot will come first, I'm still waiting |
15:20:08 | FromDiscord | <Clyybber> what |
15:20:12 | krux02 | there are still people around who fight for high quality. |
15:20:13 | krux02 | (me) |
15:20:45 | krux02 | I still thing Nim is too much and because of that it has too many bugs. |
15:20:53 | krux02 | It is simpler to keep simple software free of bugs. |
15:21:04 | krux02 | I think Go here really shines as a programming language. |
15:21:09 | aeverr[m] | >me, loves animations yet uses an e-ink device |
15:21:23 | krux02 | Everything in ther (except GC) is a simple easy to maintain and get right thing. |
15:21:24 | disruptek | i've found that using less of nim is a viable solution. |
15:21:27 | FromDiscord | <Clyybber> @mratsim Godot won't compete with the big engines ever IMO. Not until they get rid of their variant bullshit and improve their performance |
15:21:43 | FromDiscord | <Clyybber> And I say that as one who initially loved godot |
15:21:48 | FromDiscord | <Clyybber> loves godot still |
15:21:49 | FromDiscord | <mratsim> ah you failed for it, waiting for Godot 😉 |
15:21:51 | krux02 | it does't have this constant shift in paradigms like other programming languages. |
15:22:04 | FromDiscord | <Clyybber> @mratsim ah damnit. sry Im an uncultured swine |
15:22:10 | FromDiscord | <Clyybber> no theatre for me |
15:22:33 | disruptek | krux02: it's a smart observation. |
15:22:39 | FromDiscord | <mratsim> @krux02, you didn't look into their channels, concurrency and goroutines |
15:22:51 | krux02 | Clyybber: I don't think super high performance is the ipmortant part to get a good open source engine become the default. |
15:22:59 | FromDiscord | <mratsim> it's very well engineered, especially their data race tool, but it's a huge piece of code to maintain |
15:23:25 | krux02 | what it needs is consistentcy. People who want to make godot great for a long time. |
15:23:34 | krux02 | that is what made blender what it is today. |
15:23:41 | FromDiscord | <Clyybber> krux02: Exactly, and godot isn't really consistent |
15:24:02 | aeverr[m] | but didnt blender break a lot of shit on their 2.8 update |
15:24:37 | FromDiscord | <Clyybber> aeverr: by improving basically everything |
15:24:41 | krux02 | well they changed a lot |
15:24:48 | krux02 | in order to become more accessable. |
15:24:52 | aeverr[m] | that is true |
15:24:54 | krux02 | for exapmle left click for select. |
15:25:10 | FromDiscord | <Clyybber> but its all configurable |
15:25:12 | krux02 | every program has left click select, blender had since the beginning right click select. |
15:25:22 | aeverr[m] | that still puts them in a difficult position |
15:25:23 | krux02 | confused everybody. Thas has changed now. |
15:25:39 | FromDiscord | <Clyybber> IMO godot is suffering from its accessibility |
15:26:10 | FromDiscord | <Clyybber> I feel like their scripting system could be a lot more elegant |
15:26:12 | krux02 | yes everything is configurable, but that doesn't mean much. |
15:26:24 | FromDiscord | <Clyybber> if they had gone for composition instead of their strict inheritance |
15:26:34 | krux02 | I didn't script in blenedr yet, but I really do like the python logging. |
15:26:41 | krux02 | Every action is logged as a python command |
15:26:54 | aeverr[m] | oof since i learned nuim i started using composition more |
15:26:55 | aeverr[m] | nim |
15:26:58 | krux02 | so if you know how to do semething manual, you get an idea of how to automate it. |
15:27:21 | krux02 | aeverr[m], what composition do you mean? |
15:27:35 | aeverr[m] | the same one Clyybber mentioned |
15:28:31 | krux02 | ah yes sorry overlooked it |
15:29:00 | FromDiscord | <Clyybber> to be concrete: Its really dumb having to extend a node and a script as a workaround to attaching multiple scripts to a node |
15:29:24 | aeverr[m] | sounds painful |
15:32:10 | aeverr[m] | my qualm with nim right now is the multithreading documentations |
15:32:23 | aeverr[m] | *{dont pluralize the last word sorry} |
15:33:25 | disruptek | multithreading is a love story that is still being written. |
15:37:13 | * | xet7 quit (Quit: Leaving) |
15:39:12 | * | ng0 quit (Remote host closed the connection) |
15:40:15 | * | ng0 joined #nim |
15:40:36 | disruptek | need some new bugs for nimph. |
15:42:36 | * | xet7 joined #nim |
15:43:10 | aeverr[m] | so which is the multithreading system you use? |
15:43:30 | disruptek | none. i'm waiting for weave. |
15:43:46 | disruptek | threads are rarely the right solution for my code. |
15:49:06 | FromDiscord | <mratsim> nimph is bottlenecked by IO not compute |
15:49:12 | FromDiscord | <mratsim> it should use async not weave |
15:51:23 | disruptek | yes, but golden will use weave eventually. |
15:52:29 | disruptek | nimph might also use threads for git operations that i can't use async for. |
15:52:51 | disruptek | other than that, threads really aren't the right solution afaict. |
15:54:16 | * | xet7 quit (Quit: Leaving) |
15:54:36 | * | xet7 joined #nim |
15:54:47 | * | xet7 quit (Remote host closed the connection) |
15:55:59 | * | xet7 joined #nim |
15:55:59 | * | xet7 quit (Client Quit) |
15:56:54 | * | xet7 joined #nim |
15:57:38 | * | couven92 quit (Quit: Client disconnecting) |
15:58:43 | FromGitter | <alehander92> wow disruptek |
15:58:45 | FromGitter | <alehander92> poetic |
15:59:41 | * | xet7 quit (Remote host closed the connection) |
16:00:02 | * | xet7 joined #nim |
16:00:11 | disruptek | ooookay xet. |
16:01:20 | shashlick | I wrote a tool in Nim that used async and threads together 2 years ago and it still works |
16:01:43 | leorize | disruptek: you can make it async by sourcing out to git cli instead :P |
16:02:04 | shashlick | Long running process that went thru 100+gb of data |
16:02:09 | disruptek | no point; libgit supports threading. |
16:02:26 | * | PMunch quit (Quit: Leaving) |
16:02:37 | disruptek | it's just not a priority because it will only help people who have huge pipes. |
16:03:25 | shashlick | Used cheatfate's asynctools |
16:03:29 | disruptek | shashlick: us mortals need a paint-by-numbers threading solution. |
16:04:38 | * | nsf joined #nim |
16:05:48 | disruptek | i guess today's priority is setting up branch-tracking remotes. |
16:06:07 | disruptek | maybe a downgrade command if that goes smoothly. |
16:19:56 | * | couven92 joined #nim |
16:20:48 | * | endragor quit (Remote host closed the connection) |
16:45:23 | skrylar[m] | hmm my blake port's checksums are coming out weird |
16:46:50 | * | MightyJoe quit (Ping timeout: 268 seconds) |
16:47:05 | * | cyraxjoe joined #nim |
16:52:39 | * | endragor joined #nim |
16:56:58 | * | endragor quit (Ping timeout: 252 seconds) |
17:13:15 | FromDiscord | <mratsim> blake2b? |
17:13:25 | * | Romanson quit (Quit: Connection closed for inactivity) |
17:20:42 | skrylar[m] | yup |
17:31:34 | disruptek | !package anycase |
17:31:35 | disbot | no packages match 😢 |
17:31:56 | disruptek | !repo anycase |
17:31:57 | disbot | https://github.com/lamartire/anycase -- 9anycase: 11Convert strings to any case 15 0⭐ 0🍴 |
17:32:15 | disruptek | wut |
17:32:21 | * | endragor joined #nim |
17:35:40 | * | Trustable joined #nim |
17:35:59 | FromGitter | <alehander92> krux02 while this is true |
17:36:01 | FromGitter | <alehander92> i disagree |
17:36:28 | FromGitter | <alehander92> a programming language is a tool that is reused by potentially huge amount of other programmers |
17:36:43 | FromGitter | <alehander92> so making its implementation somewhat more complicated |
17:36:50 | FromGitter | <alehander92> is a *very* valid tradeoff |
17:36:58 | * | endragor quit (Ping timeout: 245 seconds) |
17:37:02 | FromGitter | <alehander92> if a language is popular enough |
17:37:16 | disruptek | !repo release tags |
17:37:18 | disbot | https://github.com/jgm/pandoc-templates -- 9pandoc-templates: 11Templates for pandoc, tagged to release 15 121⭐ 125🍴 7& 29 more... |
17:37:21 | disruptek | nope. |
17:37:26 | FromGitter | <alehander92> as this might ease the work of much more people as a result |
17:38:29 | FromGitter | <alehander92> making people reimplement code generation and generics and other basic features in 10 different incompatible ways just for go to be simpler: its a valid strategy but i feel misleading one |
17:38:39 | FromGitter | <alehander92> which just moves the complexity back to third party/the user |
17:38:56 | FromGitter | <alehander92> there is inherent complexity |
17:39:07 | krux02 | maybe my words were not the right |
17:39:37 | krux02 | complicated implementation often means complicated language with complicated features and complicated (hard to learn) behavior. |
17:39:49 | FromGitter | <alehander92> no, i agree with the overall premise that sometimes simpler features are best, but i wanted to show nuance |
17:40:00 | krux02 | And this complexity you have to muliply with the amout of people who use the language to compute the cost. |
17:40:02 | FromGitter | <alehander92> but some of those features are inevitable |
17:40:17 | FromGitter | <alehander92> error handling and polymorphism have complexity in their problem domain |
17:40:25 | FromGitter | <alehander92> and when you move it to |
17:40:37 | FromGitter | <alehander92> each project to decide its own approach/manual alternative |
17:40:52 | FromGitter | <alehander92> this isnt always making things really simpler |
17:41:06 | krux02 | GC is one of the best examples here. On the surface you solve the problem for the users, but in reality you often make it harder for the programmer to reason about performance because of the increased complexity. |
17:41:24 | krux02 | not being against GC per se |
17:41:27 | FromGitter | <alehander92> and thats why its good to have options |
17:41:44 | FromGitter | <alehander92> different tradeoffs for different groups of people |
17:42:57 | krux02 | yes, give the users more options that he has time to read them all. |
17:43:02 | FromGitter | <alehander92> no |
17:43:07 | FromGitter | <alehander92> what i meant was different languages |
17:43:18 | FromGitter | <alehander92> with different tradeoffs |
17:43:46 | krux02 | I disagree that we need different languages. I think we can have one universal programming language that is suitable for everything, I just doubt that we will ever end up there. |
17:44:01 | FromGitter | <alehander92> but ... its absolutely impossible for this language |
17:44:09 | FromGitter | <alehander92> to not be very powerful => relatively complex |
17:44:24 | FromGitter | <alehander92> you can layer it |
17:44:30 | FromGitter | <alehander92> so people can use simpler subsets of it |
17:44:34 | FromGitter | <alehander92> i guess |
17:44:58 | FromGitter | <alehander92> and overally i feel this is just not the way we develop tools |
17:45:40 | FromGitter | <alehander92> people develop different projects, which influence each other and lead to new versions and generations of projects |
17:45:47 | krux02 | well, scala tried this "layering" approach. |
17:45:49 | FromGitter | <alehander92> its like having just one brand of a car |
17:46:06 | krux02 | by actively hiding scala features to make the interface look simpler than it actually was. |
17:46:07 | FromGitter | <alehander92> maybe good, but i dont know |
17:46:12 | krux02 | it really backfires. |
17:46:24 | lqdev[m] | does returning a `cstring` from a proc make a copy of it, or do I have to handle the copying myself? |
17:46:52 | krux02 | cstring doesn't copy |
17:47:09 | lqdev[m] | all right |
17:47:50 | krux02 | a string has a size field and a '\0' terminator for this very reason |
17:51:23 | FromGitter | <Willyboar> By the way. Where is araq ? |
17:52:15 | leorize | lqdev[m]: careful, if you don't allocate memory yourself the gc might eat the string |
17:53:20 | * | jjido joined #nim |
17:58:46 | krux02 | yea don't expect the cstring to live forever, far passing it down to functions there is no problem at all. |
17:59:35 | * | icebattle joined #nim |
18:12:56 | lqdev[m] | leorize: that's what I did in the end. the library frees the string later, so I suppose that's what should've been done |
18:13:38 | leorize | uhmm, if you allocate it using the Nim allocator, then don't let anything non-Nim free it |
18:13:54 | leorize | use `malloc` if you want to pass it to C and have them free it |
18:14:11 | lqdev[m] | why? |
18:14:43 | leorize | Nim uses a custom allocator |
18:14:46 | * | rockcavera quit (Remote host closed the connection) |
18:14:48 | leorize | it's not compatible with malloc |
18:14:53 | lqdev[m] | shashlick: I think I found a bug in nimterop, this https://github.com/wren-lang/wren/blob/master/src/include/wren.h#L69 is wrapped as `type WrenLoadModuleFn* = proc (vm: ptr WrenVM, name: cstring): cchar` |
18:15:03 | lqdev[m] | leorize: thanks for the tip, I'll fix my code then |
18:15:25 | lqdev[m] | is it safe to use `copyMem` on the `malloc`-allocated memory? |
18:15:43 | leorize | np, as long as you're not trying to free it |
18:16:01 | leorize | or resize it :P |
18:16:25 | leorize | the heap structures are different, but memory is memory so data can still be accessed normally :p |
18:17:33 | * | rockcavera joined #nim |
18:17:39 | lqdev[m] | what if the library allows me to specify a custom allocator? should I set it to Nim's `realloc`? |
18:17:51 | lqdev[m] | (because `realloc` is precisely what the library needs) |
18:19:22 | leorize | if all memory you ever pass to it is from Nim, then yes |
18:19:35 | leorize | be sure to make a cdecl wrapper for it though |
18:19:59 | lqdev[m] | yeah, I know |
18:20:17 | lqdev[m] | let's see if it will work |
18:20:37 | leorize | note that Nim's allocator is thread-local by default |
18:20:56 | leorize | if the library does threading then give it the `Shared` versions |
18:21:20 | lqdev[m] | Wren's a single-threaded language, so I'll use the normal versions |
18:22:18 | shashlick | @lqdev - should return cstring right? |
18:22:29 | shashlick | can you please open an issue? |
18:22:35 | lqdev[m] | shashlick: indeed |
18:22:37 | lqdev[m] | I'll do |
18:37:59 | * | rayman22201 joined #nim |
18:38:36 | * | lkw quit (Ping timeout: 265 seconds) |
18:39:07 | * | sealmove quit (Quit: WeeChat 2.6) |
18:39:44 | * | lkw joined #nim |
18:46:40 | * | gour joined #nim |
18:47:20 | * | gangstacat quit (Quit: Ĝis!) |
18:47:48 | lqdev[m] | leorize: passing Nim's `reallocate` to Wren's `reallocateFn` seems to have been a success; is there any performance difference between libc realloc and Nim reallocate? |
18:48:31 | FromGitter | <zacharycarter> !repo colors |
18:48:32 | disbot | https://github.com/treeform/chroma -- 9chroma: 11Everything you want to do with colors, in nim. 15 28⭐ 5🍴 7& 7 more... |
18:58:49 | * | letto quit (Read error: Connection reset by peer) |
18:59:20 | * | letto joined #nim |
19:03:09 | Araq | lqdev[m]: there is no reallocate, it's called 'realloc' |
19:05:30 | * | letto quit (Read error: Connection reset by peer) |
19:06:01 | * | letto joined #nim |
19:06:50 | leorize | lqdev[m]: iirc Araq uses an O(1) allocator for Nim, so it might be faster in soft realtime cases |
19:07:11 | Araq | that's correct |
19:07:55 | Araq | unfortunately nobody ever made the algorithms threadsafe beyond the trivial "let's put it inside a lock" solution |
19:08:10 | Araq | so we're moving to mimalloc |
19:08:19 | * | jwm224 quit (Ping timeout: 250 seconds) |
19:10:28 | * | jwm224 joined #nim |
19:18:45 | disruptek | Araq: wb |
19:19:25 | * | gangstacat joined #nim |
19:19:32 | FromDiscord | <Clyybber> krux02: That solution you posted on github sounds good. I remember someone proposed that on a different issue some time ago (I think it was dumjyl) |
19:32:04 | lqdev[m] | is it possible to echo the location where a ref object was constructed, in its finalizer? |
19:33:02 | lqdev[m] | I guess valgrind is the only solution? |
19:41:02 | * | letto quit (Quit: Konversation terminated!) |
19:42:34 | FromGitter | <bung87> is there a tool can show me why my pegAst does not match ? |
19:48:49 | leorize | lqdev[m]: location where it was constructed? |
19:49:22 | leorize | @bung87: usually the error messages are your friend |
19:49:26 | leorize | are you using npeg? |
19:49:38 | FromGitter | <bung87> some experience like using regex in sublime or viscose? |
19:49:50 | FromGitter | <bung87> the std lib pegs |
19:50:01 | krux02 | lqdev[m]: there isn't any tooling built into Nim for that purpose as far as I know |
19:50:53 | FromGitter | <bung87> any other tools will be ok even a online site |
19:51:54 | leorize | @bung87: no idea then, can we see your peg? and what you are trying to match? |
19:52:52 | FromGitter | <bung87> hold on, let me push it to github |
19:53:31 | * | letto joined #nim |
19:54:28 | FromGitter | <bung87> I want to parse `elm` view |
19:55:12 | FromGitter | <bung87> https://github.com/bung87/nlm/blob/master/src/nlm.nim |
19:57:35 | * | adeohluwa joined #nim |
19:58:54 | FromGitter | <bung87> maybe I’ll implement in this way, peg may too complicated to me https://github.com/pavanmishra/htmly/blob/master/htmly/htmly.py |
19:59:06 | * | adeohluwa quit (Remote host closed the connection) |
20:00:43 | leorize | I'd recommend npeg because pegs API seems to be a bit more complicated than it should be |
20:06:21 | FromGitter | <bung87> reading the doc, seems as peg’s complexity to me . but it atleast have debug flag |
20:11:48 | * | gour quit (Ping timeout: 246 seconds) |
20:12:49 | * | nsf quit (Quit: WeeChat 2.6) |
20:16:17 | Zevv | where is this syntax described? |
20:16:32 | lqdev[m] | leorize: yeah, just like valgrind shows you where a block causing a leak was allocated |
20:17:37 | FromGitter | <bung87> https://elm-lang.org/docs/syntax but not as peg |
20:18:23 | FromGitter | <bung87> I also found a grammar as .pegjs https://github.com/joeandaverde/elm-module-parser/blob/master/src/grammar/elm_module.elm.pegjs |
20:19:01 | Zevv | you need all of the elm language, or only this html subset |
20:19:20 | FromGitter | <alehander92> i think it would be easier to port the view dsl |
20:19:21 | FromGitter | <alehander92> to nim |
20:19:31 | FromGitter | <alehander92> or use an elm native parser |
20:19:37 | FromGitter | <alehander92> if you just need it once |
20:19:38 | FromGitter | <bung87> I tried one day, but it seems many package broken as elm version update |
20:19:47 | FromGitter | <alehander92> ah |
20:19:55 | FromGitter | <alehander92> dont they have their own parser lib |
20:20:29 | FromGitter | <bung87> they have but write in elm |
20:21:48 | FromGitter | <bung87> I only want the view parts can be use as a html template |
20:23:36 | FromGitter | <alehander92> ah |
20:23:46 | * | disruptek quit (Ping timeout: 252 seconds) |
20:23:48 | FromGitter | <bung87> the day I try elm I face problems: network condition, packages incompatity with elm newer version , packages small as nodejs ecosystem. |
20:24:03 | * | disbot quit (Ping timeout: 245 seconds) |
20:24:06 | Zevv | bung87: in your example, A uses commas to separate items, but B does not |
20:24:08 | Zevv | how does that work |
20:24:57 | * | luis_ joined #nim |
20:25:14 | * | disbot joined #nim |
20:25:23 | FromGitter | <bung87> ah , sorry , A coming from official website , B comming from a repo using fsharp to parse it |
20:25:38 | Zevv | but are they both valid? |
20:25:53 | FromGitter | <bung87> https://github.com/asmundstavdahl/fsharp-simple-html/blob/master/SimpleHtml.fs if you interested you can see it |
20:26:02 | * | disruptek joined #nim |
20:26:55 | * | luis_ quit (Remote host closed the connection) |
20:29:01 | FromGitter | <bung87> I can’t confirm B , but B syntax seems less coding. |
20:30:42 | FromGitter | <bung87> I guess I prefer B syntax, even it not functional as A |
20:33:44 | * | luis_ joined #nim |
20:34:02 | * | luis_ quit (Remote host closed the connection) |
20:34:37 | * | Ckat joined #nim |
20:34:57 | Ckat | any way to span sql querries over multiple lines? |
20:35:30 | Ckat | theres a severe lack of community behind nim where I can just search for these random questions |
20:35:38 | Ckat | maybe I missed it in an example though |
20:36:26 | FromGitter | <bung87> https://nim-lang.org/docs/manual.html#lexical-analysis-triple-quoted-string-literals ? this one |
20:37:09 | Ckat | ah those might do the job |
20:37:37 | Zevv | bung87: for what it's worth: http://ix.io/24CJ |
20:37:47 | Ckat | yup, cheers |
20:37:48 | FromGitter | <bung87> the lib you using may have `sql””” “””` |
20:37:56 | Ckat | it did, neat |
20:38:06 | Zevv | not sure of the syntax, some elements have attributes and children, some have text, some elements are only text, etc |
20:38:13 | Zevv | but it might get you started |
20:38:34 | Ckat | for my fully plaintext sql querry needs, the triple quotes work out |
20:38:35 | FromGitter | <bung87> @Zevv you really did ? wow let me check |
20:39:30 | Zevv | npeg is a bit inside out from normal pegs, it mostly uses prefixes instead of suffixes because the npeg grammar is parsed by the nim parser |
20:40:08 | FromGitter | <bung87> OMG, how could you write this in short time... |
20:40:36 | * | luis_ joined #nim |
20:41:15 | Zevv | http://zevv.nl/div/elm.png comes with the package |
20:41:32 | Zevv | to make things even more confusing :) |
20:42:27 | FromGitter | <bung87> Thank you very much ! yeah you really did it. |
20:42:36 | * | narimiran quit (Ping timeout: 246 seconds) |
20:42:43 | * | luis_ quit (Remote host closed the connection) |
20:44:54 | Zevv | yw |
20:45:19 | * | luis_ joined #nim |
20:47:06 | Zevv | your strings probably need to be able to handle escaping |
20:48:00 | * | luis_ quit (Client Quit) |
20:48:24 | * | luis_ joined #nim |
20:48:48 | * | luis_ quit (Remote host closed the connection) |
20:50:48 | * | luis_ joined #nim |
20:54:15 | * | gour joined #nim |
20:57:01 | * | luis_ quit (Remote host closed the connection) |
20:58:06 | * | luis_ joined #nim |
20:59:52 | * | luis_ quit (Remote host closed the connection) |
21:01:46 | * | luis_ joined #nim |
21:02:23 | FromGitter | <bung87> ah I see , if there is `\”` it will end up matching rest to string |
21:04:47 | * | ng0 quit (Remote host closed the connection) |
21:06:18 | * | luis__ joined #nim |
21:06:19 | Zevv | right |
21:06:47 | FromGitter | <bung87> how do I aware of tag end ? |
21:07:23 | * | luis_ quit (Ping timeout: 245 seconds) |
21:07:47 | Zevv | add a code block to the 'kids' rule |
21:08:13 | Zevv | oh no wait, what exactly do you mean by a 'tag end' in this case? |
21:08:47 | FromGitter | <Willyboar> Sa |
21:10:00 | * | rockcavera quit (Remote host closed the connection) |
21:10:54 | * | luis__ quit (Remote host closed the connection) |
21:11:15 | FromGitter | <sheerluck> @Zevv can I use https://github.com/zevv/aoc2019 as a tutorial? |
21:11:42 | FromGitter | <bung87> maybe it’s not about npeg, I need something like `enter` `leave` so I can appending eg.`</html>` to result html string |
21:12:35 | Zevv | sheerluck: I can't stop you: https://github.com/zevv/aoc2019/blob/master/LICENSE :) |
21:13:10 | Zevv | bung87: enter and leave I usually do with empty matches. One second, I'll give an example |
21:13:57 | Zevv | bung87: http://ix.io/24CX |
21:14:16 | * | luis_ joined #nim |
21:17:30 | Zevv | sheerluck: I'm honoured |
21:17:48 | Zevv | but I think stuff is a bit to terse here and there |
21:19:21 | FromGitter | <bung87> ah That works, I only need check previous tag info , then ending the tag. |
21:20:36 | Zevv | yeah, but you can recurse into childs, so you probably need to keep track of your state on a stack |
21:21:00 | * | ng0 joined #nim |
21:21:22 | * | liam_ joined #nim |
21:21:45 | Zevv | like so: http://ix.io/24D3 |
21:25:21 | FromGitter | <bung87> cool, using stack I can fetch previous n tag |
21:25:33 | * | rockcavera joined #nim |
21:25:57 | FromGitter | <bung87> solve my big problem. |
21:26:22 | * | luis_ quit (Remote host closed the connection) |
21:28:23 | * | luis_ joined #nim |
21:29:39 | FromGitter | <bung87> I have another question, I see you write a http report parse as example, does it efficient than some http lib I’v seen , using O(n) method |
21:30:04 | Zevv | oh no don't use that in real life, it's just an example |
21:30:16 | Zevv | PEGs are often not the right solution |
21:30:32 | FromGitter | <bung87> ok, I get it. |
21:30:51 | Zevv | teriffic for quick prototyping and oneoffs, but if you need raw performance you're better of hand coding in 99% of the cases |
21:30:56 | FromGitter | <bung87> but as template parse it fit the use case ha? |
21:31:05 | Zevv | oh sure, why not |
21:31:32 | * | luis_ quit (Remote host closed the connection) |
21:32:12 | FromGitter | <bung87> cool |
21:32:15 | * | letto quit (Read error: Connection reset by peer) |
21:32:59 | * | luis_ joined #nim |
21:33:04 | Zevv | and npeg can be fast: the json parser keeps up well with nim's default json parser |
21:33:15 | Zevv | but that might also say something about nims default json parser, of course :) |
21:33:31 | disruptek | shhhh |
21:33:35 | disruptek | hearts and minds. |
21:33:50 | Zevv | disruptek spreading the love |
21:33:56 | * | luis_ quit (Remote host closed the connection) |
21:34:23 | FromGitter | <bung87> I guess for performance they might choose fastjson lib |
21:36:34 | * | Trustable quit (Remote host closed the connection) |
21:36:41 | * | luis_ joined #nim |
21:38:04 | FromGitter | <bung87> @ disruptek you sleeping less than 6 hours? I think |
21:39:50 | Zevv | http://zevv.nl/div/disruptek.png |
21:39:56 | * | luis_ quit (Remote host closed the connection) |
21:40:28 | Zevv | that's dutch time. Seems like a pretty normal sleep/wake pattern to me. A solid 8 hours of sleep! |
21:40:46 | Zevv | he seems to be kind of a morning person though |
21:41:17 | leorize | did you made that from his commit history :p |
21:41:24 | Zevv | irc log :) |
21:41:45 | * | NimBot joined #nim |
21:42:02 | FromGitter | <bung87> you using a tool automatic analyse this and generate a chart ? |
21:42:24 | Zevv | leorize: you are a mess dude: http://zevv.nl/div/leorize.png |
21:42:29 | * | luis_ joined #nim |
21:42:42 | Zevv | bung87: grep -r 'leorize>' irc/2019/ | cut -d ':' -f 2 | sort | uniq -c |
21:42:44 | Zevv | and gnuplot |
21:43:19 | leorize | hmm I do believe I sleep 8 hrs or so :p |
21:43:28 | FromGitter | <Willyboar> i think i am the late guy |
21:43:34 | FromGitter | <bung87> never thought someone do this kind of thing |
21:43:47 | shashlick | @Zevv - this is dangerous info 🙂 |
21:43:53 | leorize | also disruptek is utc-5, at least from his commits :P |
21:44:00 | Zevv | leorize: makes sense |
21:44:51 | * | luis_ quit (Remote host closed the connection) |
21:45:29 | * | gour quit (Remote host closed the connection) |
21:48:22 | * | luis_ joined #nim |
21:55:55 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
21:56:13 | Zevv | bung87: I'm off to ZzZzz, it you have any other issues drop me a line here, I usually read back |
21:56:17 | dom96 | hello all |
21:56:21 | dom96 | Holidays finally here |
21:56:32 | Zevv | \o/ |
21:56:41 | Zevv | two solid weeks of Nimming, right! :) |
21:56:53 | * | luis_ quit (Ping timeout: 250 seconds) |
21:56:59 | FromGitter | <bung87> OK,very thanks, you give me a bright morning |
21:57:09 | dom96 | hah, I wish. |
21:57:23 | dom96 | Some flights plus some time with family here and there |
21:57:53 | Zevv | yeah, that's what you get from having parents. your own fault! |
21:58:14 | * | luis_ joined #nim |
21:58:14 | Zevv | family, pffff |
21:58:42 | * | ng0 joined #nim |
22:00:24 | shashlick | In Soviet Russia, your parents have you |
22:00:34 | Zevv | funny, here also |
22:00:35 | shashlick | Uh wait |
22:00:39 | Zevv | :) |
22:03:34 | dom96 | :) |
22:03:52 | dom96 | In any case, if there are things you want me to look at, PRs, issues, etc. now would be the time to send me links :) |
22:05:13 | * | solitudesf- joined #nim |
22:06:02 | * | Vladar quit (Remote host closed the connection) |
22:06:46 | dom96 | I like how some want everything to be output by Nimble, whereas others don't https://github.com/nim-lang/nimble/issues/749 |
22:07:06 | * | luis_ quit (Quit: luis_) |
22:07:23 | * | solitudesf quit (Ping timeout: 245 seconds) |
22:07:37 | * | luis_ joined #nim |
22:11:02 | Zevv | I like my tools to be silent by default: if all is well, just say nothing. |
22:11:08 | FromGitter | <bung87> sounds reasonable, they can just copy paste test result. |
22:11:13 | Zevv | I always hated nims hints and output. |
22:11:39 | * | luis_ quit (Client Quit) |
22:12:04 | Zevv | it is actually the only compiler I know that tells me what it is doing for every file |
22:12:37 | dom96 | please be around the next time people argue that `nimble build` should output everything |
22:12:48 | Zevv | ping me :) |
22:13:29 | FromGitter | <bung87> just need a cli flag |
22:13:44 | solitudesf- | nimble build should output everything |
22:13:49 | dom96 | hm, NiGui is maturing fast |
22:14:24 | * | luis_ joined #nim |
22:15:24 | FromGitter | <bung87> ```task test,”loop” ⏎ exec “nimble test"``` [https://gitter.im/nim-lang/Nim?at=5df801fb7ce7ea1e3597bdd4] |
22:15:32 | Zevv | My CD has finished, now it's really time for bed. laters! |
22:19:53 | * | luis_ quit (Ping timeout: 245 seconds) |
22:20:07 | * | luis__ joined #nim |
22:20:18 | * | luis__ quit (Remote host closed the connection) |
22:22:35 | * | luis_ joined #nim |
22:23:04 | federico3 | dom96: I usually disable hints: the are mostly useless |
22:23:50 | * | solitudesf- quit (Ping timeout: 265 seconds) |
22:24:53 | * | luis_ quit (Remote host closed the connection) |
22:24:58 | federico3 | the problem is in the compiler. Nimble should just forward the output or stay silent |
22:25:35 | federico3 | even better if it dumps the compiler output only on error by default |
22:31:03 | FromDiscord | <mratsim> @Clyybber, I'm on my way to fix the deadlock once and for all. I manage to get my system modelized in a formal verification tool, and reproduced the deadlock |
22:31:15 | FromDiscord | <mratsim> |
22:31:15 | FromDiscord | <mratsim> https://cdn.discordapp.com/attachments/371759389889003532/656262088586690572/unknown.png |
22:31:51 | * | luis_ joined #nim |
22:32:02 | skrylar[m] | i don't see how pegs are necessarily slower than doing it by hand, but then i'm used to red/janet pegs which are fairly potent |
22:32:08 | dom96 | federico3, nimble will stay silent, for certain commands |
22:32:15 | * | luis_ quit (Remote host closed the connection) |
22:33:36 | * | luis_ joined #nim |
22:34:31 | * | luis_ quit (Remote host closed the connection) |
22:36:12 | * | luis_ joined #nim |
22:38:02 | * | luis_ quit (Read error: Connection reset by peer) |
22:39:51 | * | luis_ joined #nim |
22:40:39 | * | thomasross_ joined #nim |
22:40:39 | * | thomasross quit (Killed (karatkievich.freenode.net (Nickname regained by services))) |
22:40:39 | * | thomasross_ is now known as thomasross |
22:40:40 | * | Jjp137 quit (Read error: Connection reset by peer) |
22:41:23 | * | Jjp137 joined #nim |
22:42:13 | * | luis_ quit (Remote host closed the connection) |
22:44:55 | * | krux02 quit (Remote host closed the connection) |
22:46:07 | federico3 | dom96: that's a bit part of the problem |
22:46:29 | * | luis_ joined #nim |
22:49:30 | * | luis_ quit (Remote host closed the connection) |
22:50:22 | * | luis_ joined #nim |
22:54:02 | * | luis_ quit (Remote host closed the connection) |
22:54:53 | * | thomasross quit (Read error: Connection reset by peer) |
22:56:07 | * | luis_ joined #nim |
22:56:10 | * | luis_ quit (Read error: Connection reset by peer) |
22:56:54 | * | thomasross joined #nim |
23:01:25 | * | luis__ joined #nim |
23:02:49 | * | jjido quit (Quit: Connection closed for inactivity) |
23:05:46 | * | luis__ quit (Remote host closed the connection) |
23:10:25 | * | luis_ joined #nim |
23:11:50 | * | luis_ quit (Remote host closed the connection) |
23:14:07 | * | luis_ joined #nim |
23:19:12 | FromDiscord | <Clyybber> @mratsim Ooh, intetesting. Keep me updated |
23:19:40 | * | luis_ quit (Remote host closed the connection) |
23:19:50 | FromDiscord | <mratsim> well that deadlock is actually not interesting I didn't understand how to have a thread do several thing 😛 |
23:20:08 | FromDiscord | <mratsim> so it doesn't send the termination signal in the trace |
23:20:16 | FromDiscord | <mratsim> because it asked for work ... |
23:20:18 | FromDiscord | <Clyybber> heh, are you still going to rewrite it using a statemachine? |
23:20:50 | * | luis_ joined #nim |
23:25:39 | FromDiscord | <Clyybber> @mratsim ping |
23:26:20 | FromDiscord | <mratsim> not now |
23:26:38 | FromDiscord | <mratsim> for now I'm doing formal verification of the concurrent stuff so that it doesn't deadlock |
23:27:29 | FromDiscord | <Clyybber> cool, would there be a performance improvement\decrease with a statemachine approach? |
23:27:35 | FromDiscord | <mratsim> The state machine is a bit complex because I would need to create some state diagram to understand where I'm going |
23:27:45 | disruptek | pffbt |
23:28:22 | FromDiscord | <mratsim> no idea. maybe maybe not. Hopefully it's an increase as the synthesis generates pretty tight code |
23:29:27 | FromDiscord | <mratsim> what's for sure is that it should be easier to follow what's going on and to understand where you would adjust some nuts and bolts if you want to add new behaviours |
23:34:48 | * | Tanger quit (Ping timeout: 246 seconds) |
23:37:18 | * | Tanger joined #nim |
23:41:53 | * | luis_ quit (Remote host closed the connection) |
23:42:33 | * | luis_ joined #nim |
23:44:34 | * | luis_ quit (Client Quit) |
23:45:08 | * | lritter quit (Ping timeout: 248 seconds) |
23:45:30 | * | luis_ joined #nim |
23:46:03 | * | luis_ quit (Remote host closed the connection) |
23:47:24 | * | luis_ joined #nim |
23:49:53 | * | abm quit (Read error: Connection reset by peer) |
23:50:25 | * | luis_ quit (Remote host closed the connection) |
23:51:06 | * | luis_ joined #nim |
23:51:45 | * | luis_ quit (Client Quit) |
23:53:00 | * | luis_ joined #nim |
23:56:27 | * | letto joined #nim |